@bosch-iot-console/rollouts 0.0.1-security → 99.0.1

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.

Potentially problematic release.


This version of @bosch-iot-console/rollouts might be problematic. Click here for more details.

package/rollouts.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see rollouts.js.LICENSE.txt */
2
+ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("@bosch-iot-console/suite-elements"),require("@bosch/react-frok"),require("react"),require("react-dom"),require("react-router-dom")):"function"===typeof define&&define.amd?define(["@bosch-iot-console/suite-elements","@bosch/react-frok","react","react-dom","react-router-dom"],t):"object"===typeof exports?exports.RolloutsMF=t(require("@bosch-iot-console/suite-elements"),require("@bosch/react-frok"),require("react"),require("react-dom"),require("react-router-dom")):e.RolloutsMF=t(e["@bosch-iot-console/suite-elements"],e["@bosch/react-frok"],e.react,e["react-dom"],e["react-router-dom"])}(self,((e,t,n,r,o)=>(()=>{var i={2564:(e,t,n)=>{"use strict";var r=n(8156);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=r.useState,a=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return l((function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})}),[e,n,t]),a((function(){return u(o)&&c({inst:o}),e((function(){u(o)&&c({inst:o})}))}),[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},4601:(e,t,n)=>{"use strict";e.exports=n(2564)},4032:(e,t,n)=>{"use strict";t.Q=void 0;var r=n(3802);Object.defineProperty(t,"Q",{enumerable:!0,get:function(){return r.parse}})},3802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.FIELD_INFO=void 0;const n="-",r={"@yearly":"0 0 1 1 ?","@monthly":"0 0 1 * ?","@weekly":"0 0 ? * 0","@daily":"0 0 * * ?","@hourly":"0 * * * ?"};t.FIELD_INFO={second:{min:0,max:59},minute:{min:0,max:59},hour:{min:0,max:23},day_of_month:{min:1,max:31},month:{min:1,max:12,alias:{jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12}},day_of_week:{min:0,max:7,alias:{7:0,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}},year:{min:1970,max:2099}};const o=["second","minute","hour","day_of_month","month","day_of_week","year"];function i(e,t=(e=>e)){const n=new Set,r=[];return e.forEach((e=>{const o=t(e);n.has(o)||(n.add(o),r.push(e))})),r}function a(e,t){return i(e.split(t).map((e=>e.trim())).filter((e=>e)))}function l(e,t){return new Error(`Invalid cron expression [${e}]. ${t}`)}function s(e,t,r){if("*"===(r=r.toLowerCase().trim()))return{all:!0};if("?"===r)return function(e,t,n){if("day_of_week"===t||"day_of_month"===t)return{omit:!0};throw l(e,`Invalid Value [${n}] for field [${t}]. It can be specified only for [day_of_month or day_of_week] fields.`)}(e,t,r);const o=a(r,","),s={};for(const i of o)i&&(i.indexOf("/")>=0?(s.steps=s.steps||[],s.steps.push(f(e,t,i))):i.indexOf(n)>=0?(s.ranges=s.ranges||[],s.ranges.push(g(e,t,i))):i.indexOf("#")>=0?(s.nthDays=s.nthDays||[],s.nthDays.push(p(e,t,i))):"l"===i?s.lastDay=u(e,t,i):"lw"===i?s.lastWeekday=c(e,t,i):"day_of_month"===t&&i.indexOf("w")>=0?(s.nearestWeekdays=s.nearestWeekdays||[],s.nearestWeekdays.push(h(e,t,i))):"day_of_week"===t&&i.endsWith("l")?(s.lastDays=s.lastDays||[],s.lastDays.push(m(e,t,i))):(s.values=s.values||[],s.values.push(d(e,t,i))));return s.values&&(s.values=i(s.values)),s}function u(e,t,n){if("day_of_week"===t||"day_of_month"===t)return!0;throw l(e,`Invalid value for [${n}] for field [${t}]. It can be used only for [day_of_month or day_of_week] fields.`)}function c(e,t,n){if("day_of_month"===t)return!0;throw l(e,`Invalid value for [${n}] for field [${t}]. It can be used only for [day_of_month] fields.`)}function d(e,n,r){const o=y(e,n,r),i=t.FIELD_INFO[n];if(o<i.min)throw l(e,`Value [${r}] out of range for field [${n}]. It must be greater than or equals to [${i.min}].`);if(i.max&&o>i.max)throw l(e,`Value [${r}] out of range for field [${n}]. It must be less than or equals to [${i.max}].`);return o}function f(e,r,o){const i=o.split("/");if(2!=i.length)throw l(e,`Invalid step range [${o}] for field [${r}]. Expected exactly 2 values separated by a / but got [${i.length}] values.`);const a=t.FIELD_INFO[r],s=i[0].indexOf(n)>=0?i[0].split(n):[i[0]],u="*"===s[0]?a.min:y(e,r,b(r,s[0])),c=s.length>1?y(e,r,b(r,s[1])):a.max,d=y(e,r,b(r,i[1]));if(u<a.min)throw l(e,`Invalid step range [${o}] for field [${r}]. From value [${u}] out of range. It must be greater than or equals to [${a.min}]`);if(c>a.max)throw l(e,`Invalid step range [${o}] for field [${r}]. To value [${c}] out of range. It must be less than or equals to [${a.max}]`);if(d>a.max)throw l(e,`Invalid step range [${o}] for field [${r}]. Step value [${o}] out of range. It must be less than or equals to [${a.max}]`);return{from:u,to:c,step:d}}function p(e,t,n){if("day_of_week"!==t)throw l(e,`Invalid value [${n}] for field [${t}]. Nth day can be used only in [day_of_week] field.`);const r=n.split("#");if(2!==r.length)throw l(e,`Invalid nth day value [${n}] for field [${t}]. It must be in [day_of_week#instance] format.`);const o=y(e,t,r[0]),i=y(e,void 0,r[1]);if(i<1||i>5)throw l(e,`Invalid Day of Week instance value [${i}] for field [${t}]. It must be between 1 and 5.`);return{day_of_week:o,instance:i}}function h(e,t,n){if("day_of_month"!==t)throw l(e,`Invalid value [${n}] for field [${t}]. Nearest weekday can be used only in [day_of_month] field.`);return y(e,t,n.split("w")[0])}function m(e,t,n){return y(e,t,n.split("l")[0])}function g(e,r,o){const i=o.split(n);if(2!=i.length)throw l(e,`Invalid range [${o}] for field [${r}]. Range should have two values separated by a - but got [${i.length}] values.`);const a=y(e,r,b(r,i[0]));let s=y(e,r,b(r,i[1]));if("day_of_week"==r&&0===s&&(s=7),a>=s)throw l(e,`Invalid range [${o}] for field [${r}]. From value must be less than to value.`);const u=t.FIELD_INFO[r];if(a<u.min||s>u.max)throw l(e,`Invalid range [${o}] for field [${r}]. From or to value is out of allowed min/max values. Allowed values are between [${u.min}-${u.max}].`);return{from:a,to:s}}function y(e,t,n){const r=parseInt(b(t,n),10);if(Number.isNaN(r))throw l(e,`Invalid numeric value [${n}] in field [${t}].`);return r}function b(e,n){if(!e)return n;const r=(t.FIELD_INFO[e].alias||{})[n];return void 0===r?n:r.toString()}t.parse=function(e,t={}){if(!e)throw new Error("Cron expression cannot be blank");var n;t.hasSeconds=(n=t.hasSeconds)&&"true"===n.toString();const i={pattern:e,expressions:a(e,"|").map((e=>function(e,t){if(!e)throw new Error("Cron expression cannot be blank");let n=e,i=t.hasSeconds;r[n]&&(n=r[e],i=!1);const a=i?5:4,l=i?7:6,u=n.split(/\s+/).map((e=>e.trim())).filter((e=>e));if(u.length<a||u.length>l)throw new Error(`Invalid cron expression [${e}]. Expected [${a} to ${l}] fields but found [${u.length}] fields.`);i||u.unshift("0"),5===u.length&&u.push("?"),6===u.length&&u.push("*");const c={};for(let r=0;r<o.length;r++)c[o[r]]=u[r];const d={};for(const r of o)d[r]="second"!==r||i?s(e,r,c[r]):{omit:!0};return d}(e,t)))};return i}},9630:function(e,t){!function(e){"use strict";var t="==",n="!=",r="<=",o=">=",i="<",a=">",l="=in=",s="=out=",u="=le=",c="=ge=",d="=lt=",f="=gt=",p=[t,n,r,o,i,a,l,s],h=[u,c,d,f],m=[t,n,r,o,i,a,l,s,u,c,d,f];function g(e){switch(e){case u:return r;case d:return i;case c:return o;case f:return a;default:return e}}var y=/^=[a-z]+=$/;function b(e){return e.length>2&&y.test(e)}function v(e,p){switch(e){case t:case n:case r:case o:case i:case a:case l:case s:case u:case c:case d:case f:return void 0===p||g(e)===g(p);default:return!!b(e)&&(void 0===p||e===p)}}var S=";",E=",",w="and",O="or",A=[S,E],C=[w,O],T=[S,E,w,O];function D(e){switch(e){case w:return S;case O:return E;default:return e}}function x(e,t){switch(e){case S:case E:case w:case O:return void 0===t||D(e)===D(t);default:return!1}}var P=['"',"'","(",")",";",",","=","!","~","<",">"," ","\n","\t","\r"],M={SELECTOR:"SELECTOR",VALUE:"VALUE",COMPARISON:"COMPARISON",LOGIC:"LOGIC"};function I(e,t){return Object.defineProperty(e,"toString",{value:t,enumerable:!1,configurable:!1,writable:!1}),e}function R(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e)throw new TypeError('The "selector" has to be a "string", "'+String(e)+'" passed.');if(!e||0===e.length)throw new Error('The "selector" cannot be an empty string.');var n=P.find((function(t){return-1!==e.indexOf(t)}));if(n){var r=e.indexOf(n)+1;throw new Error('The "selector" contains reserved character \''+n+"' at position "+r+' in "'+e+'".')}}return I({type:M.SELECTOR,selector:e},(function(){return'SelectorNode("'+e+'")'}))}function L(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e&&!Array.isArray(e))throw new TypeError('The "value" has to be a "string | string[]", "'+String(e)+'" passed.');if(Array.isArray(e)&&0===e.length)throw new Error('The "value" cannot be an empty array.')}return I({type:M.VALUE,value:e},(function(){return"ValueNode("+JSON.stringify(e)+")"}))}function k(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!F(e))throw new TypeError('The "selector" has to be a "SelectorNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "SelectorNode", "'+String(t)+'" passed.');if(!v(t))throw new TypeError('The "operator" has to be a valid "ComparisonOperator", '+String(t)+" passed.");if(!N(n))throw new TypeError('The "value" has to be a "ValueNode", "'+String(n)+'" passed.')}return I({type:M.COMPARISON,left:e,operator:t,right:n},(function(){return"ComparisonNode("+e+","+t+","+n+")"}))}function j(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!H(e))throw new TypeError('The "left" has to be a "ExpressionNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "string", "'+String(t)+'" passed.');if(!x(t))throw new TypeError('The "operator" has to be a valid "LogicOperator", '+String(t)+" passed.");if(!H(n))throw new TypeError('The "right" has to be a "ExpressionNode", "'+String(n)+'" passed.')}return I({type:M.LOGIC,left:e,operator:t,right:n},(function(){return"LogicNode("+e+","+t+","+n+")"}))}function _(e){return void 0!==e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"type")}function F(e){return _(e)&&e.type===M.SELECTOR}function N(e){return _(e)&&e.type===M.VALUE}function B(e,t){return _(e)&&e.type===M.COMPARISON&&(void 0===t||v(e.operator,t))}function U(e,t){return _(e)&&e.type===M.LOGIC&&(void 0===t||x(e.operator,t))}function H(e){return B(e)||U(e)}function V(e){if(!B(e))throw new TypeError('The "comparison" has to be a valid "ComparisonNode", '+String(e)+" passed.");return e.left.selector}function q(e){if(!B(e))throw new TypeError('The "comparison" has to be a valid "ComparisonNode", '+String(e)+" passed.");return e.right.value}function W(e){var t=q(e);if(Array.isArray(t))throw new Error('The "comparison" passed to the "getSingleValue" function has to contain string value, but contains an array.');return t}function z(e){var t=q(e);if("string"===typeof t)throw new Error('The "comparison" passed to the "getMultiValue" function has to contain array value, but contains a single string.');return t}e.AND=S,e.AND_VERBOSE=w,e.CanonicalComparisonOperators=p,e.CanonicalLogicOperators=A,e.ComparisonOperators=m,e.EQ=t,e.GE=o,e.GE_VERBOSE=c,e.GT=a,e.GT_VERBOSE=f,e.IN=l,e.LE=r,e.LE_VERBOSE=u,e.LT=i,e.LT_VERBOSE=d,e.LogicOperators=T,e.NEQ=n,e.OR=E,e.OR_VERBOSE=O,e.OUT=s,e.ReservedChars=P,e.VerboseComparisonOperators=h,e.VerboseLogicOperators=C,e.createComparisonNode=k,e.createLogicNode=j,e.createSelectorNode=R,e.createValueNode=L,e.getMultiValue=z,e.getSelector=V,e.getSingleValue=W,e.getValue=q,e.isComparisonNode=B,e.isComparisonOperator=v,e.isExpressionNode=H,e.isLogicNode=U,e.isLogicOperator=x,e.isNode=_,e.isSelectorNode=F,e.isValueNode=N,Object.defineProperty(e,"__esModule",{value:!0})}(t)},5710:function(e){e.exports=function(){"use strict";var e="==",t="!=",n="<=",r=">=",o="<",i=">",a="=in=",l="=out=",s="=le=",u="=ge=",c="=lt=",d="=gt=";function f(e){switch(e){case s:return n;case c:return o;case u:return r;case d:return i;default:return e}}var p=/^=[a-z]+=$/;function h(e){return e.length>2&&p.test(e)}function m(p,m){switch(p){case e:case t:case n:case r:case o:case i:case a:case l:case s:case u:case c:case d:return void 0===m||f(p)===f(m);default:return!!h(p)&&(void 0===m||p===m)}}var g=";",y=",",b="and",v="or";function S(e){switch(e){case b:return g;case v:return y;default:return e}}function E(e,t){switch(e){case g:case y:case b:case v:return void 0===t||S(e)===S(t);default:return!1}}var w=['"',"'","(",")",";",",","=","!","~","<",">"," ","\n","\t","\r"],O={SELECTOR:"SELECTOR",VALUE:"VALUE",COMPARISON:"COMPARISON",LOGIC:"LOGIC"};function A(e,t){return Object.defineProperty(e,"toString",{value:t,enumerable:!1,configurable:!1,writable:!1}),e}function C(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e)throw new TypeError('The "selector" has to be a "string", "'+String(e)+'" passed.');if(!e||0===e.length)throw new Error('The "selector" cannot be an empty string.');var n=w.find((function(t){return-1!==e.indexOf(t)}));if(n){var r=e.indexOf(n)+1;throw new Error('The "selector" contains reserved character \''+n+"' at position "+r+' in "'+e+'".')}}return A({type:O.SELECTOR,selector:e},(function(){return'SelectorNode("'+e+'")'}))}function T(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e&&!Array.isArray(e))throw new TypeError('The "value" has to be a "string | string[]", "'+String(e)+'" passed.');if(Array.isArray(e)&&0===e.length)throw new Error('The "value" cannot be an empty array.')}return A({type:O.VALUE,value:e},(function(){return"ValueNode("+JSON.stringify(e)+")"}))}function D(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!M(e))throw new TypeError('The "selector" has to be a "SelectorNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "SelectorNode", "'+String(t)+'" passed.');if(!m(t))throw new TypeError('The "operator" has to be a valid "ComparisonOperator", '+String(t)+" passed.");if(!I(n))throw new TypeError('The "value" has to be a "ValueNode", "'+String(n)+'" passed.')}return A({type:O.COMPARISON,left:e,operator:t,right:n},(function(){return"ComparisonNode("+e+","+t+","+n+")"}))}function x(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!k(e))throw new TypeError('The "left" has to be a "ExpressionNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "string", "'+String(t)+'" passed.');if(!E(t))throw new TypeError('The "operator" has to be a valid "LogicOperator", '+String(t)+" passed.");if(!k(n))throw new TypeError('The "right" has to be a "ExpressionNode", "'+String(n)+'" passed.')}return A({type:O.LOGIC,left:e,operator:t,right:n},(function(){return"LogicNode("+e+","+t+","+n+")"}))}function P(e){return void 0!==e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"type")}function M(e){return P(e)&&e.type===O.SELECTOR}function I(e){return P(e)&&e.type===O.VALUE}function R(e,t){return P(e)&&e.type===O.COMPARISON&&(void 0===t||m(e.operator,t))}function L(e,t){return P(e)&&e.type===O.LOGIC&&(void 0===t||E(e.operator,t))}function k(e){return R(e)||L(e)}var j={comparison:function(e,t,n){return D(C(e),t,T(Array.isArray(n)?n.map((function(e){return String(e)})):String(n)))},eq:function(t,n){return j.comparison(t,e,n)},neq:function(e,n){return j.comparison(e,t,n)},le:function(e,t){return j.comparison(e,n,t)},lt:function(e,t){return j.comparison(e,o,t)},ge:function(e,t){return j.comparison(e,r,t)},gt:function(e,t){return j.comparison(e,i,t)},in:function(e,t){return j.comparison(e,a,t)},out:function(e,t){return j.comparison(e,l,t)},logic:function(e,t){if(!e.length)throw new Error("The logic expression builder requires at least one expression but none passed.");return e.slice(1).reduce((function(e,n){return x(e,t,n)}),e[0])},and:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j.logic(e,g)},or:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j.logic(e,y)}};return j}()},6605:function(e,t){!function(e){"use strict";var t="==",n="!=",r="<=",o=">=",i="<",a=">",l="=in=",s="=out=",u="=le=",c="=ge=",d="=lt=",f="=gt=";function p(e){switch(e){case u:return r;case d:return i;case c:return o;case f:return a;default:return e}}var h=/^=[a-z]+=$/;function m(e){return e.length>2&&h.test(e)}function g(e,h){switch(e){case t:case n:case r:case o:case i:case a:case l:case s:case u:case c:case d:case f:return void 0===h||p(e)===p(h);default:return!!m(e)&&(void 0===h||e===h)}}var y=";",b=",",v="and",S="or";function E(e){switch(e){case v:return y;case S:return b;default:return e}}function w(e,t){switch(e){case y:case b:case v:case S:return void 0===t||E(e)===E(t);default:return!1}}var O=['"',"'","(",")",";",",","=","!","~","<",">"," ","\n","\t","\r"],A={SELECTOR:"SELECTOR",VALUE:"VALUE",COMPARISON:"COMPARISON",LOGIC:"LOGIC"};function C(e){return void 0!==e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"type")}function T(e,t){return C(e)&&e.type===A.COMPARISON&&(void 0===t||g(e.operator,t))}function D(e,t){return C(e)&&e.type===A.LOGIC&&(void 0===t||w(e.operator,t))}var x={preferredQuote:'"',optimizeQuotes:!0},P={'"':/"|\\/g,"'":/'|\\/g};function M(e,t){return e.replace(P[t],"\\$&")}function I(e,t){for(var n=0,r=0;r<e.length;++r)e[r]===t&&n++;return n}function R(e,t){var n=t.preferredQuote,r=void 0===n?x.preferredQuote:n,o=t.optimizeQuotes;if(void 0===o?x.optimizeQuotes:o){var i='"'===r?"'":'"';return I(e,i)<I(e,r)?i:r}return r}function L(e,t){if(""===e||O.some((function(t){return e.includes(t)}))){var n=R(e,t);return""+n+M(e,n)+n}return e}function k(e){return e.selector}function j(e,t){return Array.isArray(e.value)?"("+e.value.map((function(e){return L(e,t)})).join(",")+")":L(e.value,t)}function _(e,t){return""+k(e.left)+e.operator+j(e.right,t)}function F(e,t){var n=N(e.left,t),r=N(e.right,t);return w(e.operator,y)&&(D(e.left,b)&&(n="("+n+")"),D(e.right,b)&&(r="("+r+")")),""+n+(e.operator===v||e.operator===S?" "+e.operator+" ":e.operator)+r}function N(e,t){if(T(e))return _(e,t);if(D(e))return F(e,t);throw new TypeError('The "expression" has to be a valid "ExpressionNode", '+String(e)+" passed.")}function B(e,t){if(void 0===t&&(t={}),void 0!==t.preferredQuote&&'"'!==t.preferredQuote&&"'"!==t.preferredQuote)throw new TypeError('Invalid "preferredQuote" option: '+t.preferredQuote+". Must be either \" (the ASCII double quote character) or ' (the ASCII single quote character).");return N(e,t)}e.emit=B,Object.defineProperty(e,"__esModule",{value:!0})}(t)},4641:function(e,t){!function(e){"use strict";var t="==",n="!=",r="<=",o=">=",i="<",a=">",l="=in=",s="=out=",u="=le=",c="=ge=",d="=lt=",f="=gt=";function p(e){switch(e){case u:return r;case d:return i;case c:return o;case f:return a;default:return e}}var h=/^=[a-z]+=$/;function m(e){return e.length>2&&h.test(e)}function g(e,h){switch(e){case t:case n:case r:case o:case i:case a:case l:case s:case u:case c:case d:case f:return void 0===h||p(e)===p(h);default:return!!m(e)&&(void 0===h||e===h)}}var y=";",b=",",v="and",S="or",E=[v,S];function w(e){switch(e){case v:return y;case S:return b;default:return e}}function O(e,t){switch(e){case y:case b:case v:case S:return void 0===t||w(e)===w(t);default:return!1}}var A=['"',"'","(",")",";",",","=","!","~","<",">"," ","\n","\t","\r"],C={SELECTOR:"SELECTOR",VALUE:"VALUE",COMPARISON:"COMPARISON",LOGIC:"LOGIC"};function T(e,t){return Object.defineProperty(e,"toString",{value:t,enumerable:!1,configurable:!1,writable:!1}),e}function D(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e)throw new TypeError('The "selector" has to be a "string", "'+String(e)+'" passed.');if(!e||0===e.length)throw new Error('The "selector" cannot be an empty string.');var n=A.find((function(t){return-1!==e.indexOf(t)}));if(n){var r=e.indexOf(n)+1;throw new Error('The "selector" contains reserved character \''+n+"' at position "+r+' in "'+e+'".')}}return T({type:C.SELECTOR,selector:e},(function(){return'SelectorNode("'+e+'")'}))}function x(e,t){if(void 0===t&&(t=!1),!t){if("string"!==typeof e&&!Array.isArray(e))throw new TypeError('The "value" has to be a "string | string[]", "'+String(e)+'" passed.');if(Array.isArray(e)&&0===e.length)throw new Error('The "value" cannot be an empty array.')}return T({type:C.VALUE,value:e},(function(){return"ValueNode("+JSON.stringify(e)+")"}))}function P(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!R(e))throw new TypeError('The "selector" has to be a "SelectorNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "SelectorNode", "'+String(t)+'" passed.');if(!g(t))throw new TypeError('The "operator" has to be a valid "ComparisonOperator", '+String(t)+" passed.");if(!L(n))throw new TypeError('The "value" has to be a "ValueNode", "'+String(n)+'" passed.')}return T({type:C.COMPARISON,left:e,operator:t,right:n},(function(){return"ComparisonNode("+e+","+t+","+n+")"}))}function M(e,t,n,r){if(void 0===r&&(r=!1),!r){if(!_(e))throw new TypeError('The "left" has to be a "ExpressionNode", "'+String(e)+'" passed.');if("string"!==typeof t)throw new TypeError('The "operator" has to be a "string", "'+String(t)+'" passed.');if(!O(t))throw new TypeError('The "operator" has to be a valid "LogicOperator", '+String(t)+" passed.");if(!_(n))throw new TypeError('The "right" has to be a "ExpressionNode", "'+String(n)+'" passed.')}return T({type:C.LOGIC,left:e,operator:t,right:n},(function(){return"LogicNode("+e+","+t+","+n+")"}))}function I(e){return void 0!==e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"type")}function R(e){return I(e)&&e.type===C.SELECTOR}function L(e){return I(e)&&e.type===C.VALUE}function k(e,t){return I(e)&&e.type===C.COMPARISON&&(void 0===t||g(e.operator,t))}function j(e,t){return I(e)&&e.type===C.LOGIC&&(void 0===t||O(e.operator,t))}function _(e){return k(e)||j(e)}var F={UNQUOTED:"UNQUOTED",QUOTED:"QUOTED",PARENTHESIS:"PARENTHESIS",OPERATOR:"OPERATOR",END:"END"};function N(e,t){return Object.defineProperty(e,"toString",{value:t,enumerable:!1,configurable:!1,writable:!1}),e}function B(e,t){return N({type:F.UNQUOTED,value:e,position:t},(function(){return"UnquotedToken("+e+")"}))}function U(e,t){return N({type:F.QUOTED,value:e,position:t},(function(){return"QuotedToken("+e+")"}))}function H(e,t){return N({type:F.PARENTHESIS,value:e,position:t},(function(){return"ParenthesisToken("+e+")"}))}function V(e,t){return N({type:F.OPERATOR,value:e,position:t},(function(){return"OperatorToken("+e+")"}))}function q(e){return N({type:F.END,value:"END",position:e},(function(){return"EndToken"}))}function W(e){return Object.prototype.hasOwnProperty.call(e,"type")&&Object.prototype.hasOwnProperty.call(e,"value")&&Object.prototype.hasOwnProperty.call(e,"position")}function z(e){return W(e)&&e.type===F.UNQUOTED}function Q(e){return W(e)&&e.type===F.QUOTED}function G(e){return W(e)&&e.type===F.PARENTHESIS}function $(e){return G(e)&&"("===e.value}function K(e){return G(e)&&")"===e.value}function Y(e){return W(e)&&e.type===F.OPERATOR}function J(e){return Y(e)&&g(e.value)}function X(e){return Y(e)&&O(e.value,b)}function Z(e){return Y(e)&&O(e.value,y)}function ee(e){return W(e)&&e.type===F.END}function te(e,t){var n=t[e];return new SyntaxError("Unexpected character '"+n+"' at position "+(e+1)+' in "'+t+'".')}function ne(e,t){var n=t[e];return new SyntaxError("Unclosed quote '"+n+"' at position "+(e+1)+' in "'+t+'".')}function re(e,t){return new SyntaxError(ee(e)?'Unexpected end in "'+t+'".':"Unexpected "+(e.value.length>1?"string":"character")+" '"+e.value+"' at position "+(e.position+1)+' in "'+t+'".')}function oe(e,t,n){return new SyntaxError('Unexpected end in "'+t+'". Did you forget to close parenthesis at position '+(n+1)+"?")}function ie(e,t){return new SyntaxError('Unexpected end in "'+t+'". Cannot parse empty string.')}function ae(e){return{position:0,buffer:e,length:e.length}}var le=function(e){for(var t=e.position+1;t<e.length&&e.buffer.charCodeAt(t)>=97&&e.buffer.charCodeAt(t)<=122;)t++;if("="===e.buffer[t]){var n=e.buffer.slice(e.position,t+1),r=V(n,e.position);return e.position+=n.length,r}return null};function se(e){return function(t){return e.find((function(e){return t.buffer.substr(t.position,e.length)===e}))||null}}var ue=se([t,n,r,o,i,a,l,s,u,c,d,f]),ce=function(e){var t=ue(e);if(t){var n=V(t,e.position);return e.position+=t.length,n}return null},de=function(e){var t=V(e.buffer.charAt(e.position),e.position);return e.position+=1,t};function fe(e){return function(t){return e.find((function(e){return t.buffer.substr(t.position,e.length)===e&&" "===t.buffer[t.position+e.length]}))||null}}var pe=fe(E),he=function(e){var t=pe(e);if(t){var n=V(t,e.position);return e.position+=t.length,n}return null},me=function(e){var t=H(e.buffer.charAt(e.position),e.position);return e.position+=1,t},ge=function(e){for(var t=e.buffer.charAt(e.position),n=e.position;n<e.length;){if(-1===(n=e.buffer.indexOf(t,n+1)))throw ne(e.position,e.buffer);for(var r=!1,o=n-1;"\\"===e.buffer[o]&&o>e.position;o--)r=!r;if(!r)break}var i=U(e.buffer.substring(e.position,n+1),e.position);return e.position=n+1,i},ye=function(e){for(var t=e.position+1;t<e.length&&-1===A.indexOf(e.buffer.charAt(t));)t++;var n=B(e.buffer.substring(e.position,t),e.position);return e.position=t,n},be=[" ","\n","\t","\r"],ve=function(e){for(;e.position<e.length&&-1!==be.indexOf(e.buffer.charAt(e.position));)e.position++},Se=function(e){if(ve(e),e.position>=e.length)return null;var t=e.buffer.charAt(e.position),n=null;switch(t){case"'":case'"':n=ge(e);break;case"(":case")":n=me(e);break;case",":case";":n=de(e);break;case"=":case"!":case"~":case"<":case">":(n=ce(e))||"="!==t||(n=le(e));break;default:(n=he(e))||(n=ye(e))}if(!n)throw te(e.position,e.buffer);return n};function Ee(e){for(var t=ae(e),n=[],r=Se(t);null!==r;r=Se(t))n.push(r);return n.push(q(t.position)),n}function we(e){return e.state[e.state.length-1]}function Oe(e){return e.tokens[e.position]}function Ae(e){return e.stack[e.stack.length-1]}function Ce(e){return{position:0,tokens:e,stack:[],state:[0],parent:null}}var Te={SHIFT:0,PUSH:1,REDUCE:2,POP:3,GOTO:4,ACCEPT:5};function De(e){return{type:Te.SHIFT,state:e}}function xe(e){return{type:Te.REDUCE,production:e}}function Pe(e){return{type:Te.PUSH,state:e}}function Me(e){return{type:Te.POP,production:e}}function Ie(e){return{type:Te.GOTO,state:e}}function Re(){return{type:Te.ACCEPT}}var Le=void 0,ke=function(e){var t=e[e.length-1];return{consumed:1,produced:x(Fe(t),!0)}},je=function(e){var t=e.length-1,n=e.map((function(e){return $(e)})).lastIndexOf(!0);return{consumed:t-n+1,produced:x(e.slice(n,t).filter((function(e){return z(e)||Q(e)})).map(Fe),!0)}},_e=/\\([\s\S])/g,Fe=function(e){return Q(e)?e.value.slice(1,-1).replace(_e,"$1"):e.value},Ne=[function(e){return{consumed:1,produced:D(e[e.length-1].value,!0)}},ke,je,function(e){var t=e[e.length-3],n=e[e.length-2],r=e[e.length-1];return{consumed:3,produced:P(t,n.value,r,!0)}},function(e){var t=e[e.length-3],n=e[e.length-2],r=e[e.length-1];return{consumed:3,produced:M(t,n.value,r,!0)}},function(e){return{consumed:3,produced:e[e.length-2]}}],Be=[$,K,z,Q,J,X,Z,ee],Ue=[R,L,_],He=[[[Pe(0),Le,De(8),Le,Le,Le,Le,Le],[Ie(3),Le,Ie(7)]],[[Pe(0),Le,De(8),Le,Le,Le,Le,Le],[Ie(3),Le,Ie(12)]],[[Pe(0),Le,De(8),Le,Le,Le,Le,Le],[Ie(3),Le,Ie(13)]],[[Le,Le,Le,Le,De(4),Le,Le,Le],[Le,Le,Le]],[[De(5),Le,De(9),De(9),Le,Le,Le,Le],[Le,Ie(11),Le]],[[Le,Le,De(6),De(6),Le,Le,Le,Le],[Le,Le,Le]],[[Le,De(10),Le,Le,Le,De(5),Le,Le],[Le,Le,Le]],[[Le,De(14),Le,Le,Le,De(1),De(2),Re()],[Le,Le,Le]],[[Le,Le,Le,Le,xe(0),Le,Le,Le],[Le,Le,Le]],[[Le,xe(1),Le,Le,Le,xe(1),xe(1),xe(1)],[Le,Le,Le]],[[Le,xe(2),Le,Le,Le,xe(2),xe(2),xe(2)],[Le,Le,Le]],[[Le,xe(3),Le,Le,Le,xe(3),xe(3),xe(3)],[Le,Le,Le]],[[Le,xe(4),Le,Le,Le,xe(4),De(2),xe(4)],[Le,Le,Le]],[[Le,xe(4),Le,Le,Le,xe(4),xe(4),xe(4)],[Le,Le,Le]],[[Le,Me(5),Le,Le,Le,Me(5),Me(5),Me(5)],[Le,Le,Le]]];function Ve(e,t){return He[e][0][Be.findIndex((function(e){return e(t)}))]}function qe(e,t){return He[e][1][Ue.findIndex((function(e){return e(t)}))]}function We(e){return e.position>0&&K(e.tokens[e.position-1])&&null===e.parent?e.tokens[e.position-1]:e.tokens[e.position]}function ze(e,t){return e.stack.push(e.tokens[e.position]),e.state.push(t.state),e.position=e.position+1,e}function Qe(e,t){return{position:e.position+1,tokens:e.tokens,stack:[e.tokens[e.position]],state:[t.state],parent:e}}function Ge(e,t){return e.state.push(t.state),e}function $e(e,t,n){for(var r=Ne[t.production](e.stack),o=r.consumed,i=r.produced,a=0;a<o;++a)e.stack.pop(),e.state.pop();e.stack.push(i);var l=qe(we(e),Ae(e));if(!l)throw re(We(e),n);return e=Ge(e,l)}function Ke(e,t,n){if(!e.parent)throw re(We(e),n);var r=Ne[t.production](e.stack).produced;e.parent.position=e.position,e.parent.stack.push(r);var o=qe(we(e=e.parent),Ae(e));if(!o)throw re(We(e),n);return e=Ge(e,o)}function Ye(e,t){if(null!==e.parent)throw oe(We(e),t,e.parent.position);return Ae(e)}function Je(e){if("string"!==typeof e)throw new TypeError('The argument passed to the "parse" function has to be a string, "'+e+'" passed.');var t=Ee(e);if(1===t.length&&"END"===t[0].type)throw ie(t[0],e);for(var n=Ce(t);n.position<n.tokens.length;){var r=Ve(we(n),Oe(n));if(!r)throw re(We(n),e);switch(r.type){case Te.SHIFT:n=ze(n,r);break;case Te.PUSH:n=Qe(n,r);break;case Te.REDUCE:n=$e(n,r,e);break;case Te.POP:n=Ke(n,r,e);break;case Te.ACCEPT:return Ye(n,e)}}throw re(We(n),e)}e.parse=Je,Object.defineProperty(e,"__esModule",{value:!0})}(t)},339:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},1024:(e,t,n)=>{var r=n(5303);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},618:(e,t,n)=>{var r=n(8374),o=n(7289),i=n(1922),a=r("unscopables"),l=Array.prototype;void 0==l[a]&&i.f(l,a,{configurable:!0,value:o(null)}),e.exports=function(e){l[a][e]=!0}},5299:(e,t,n)=>{"use strict";var r=n(3501).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},1438:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},1778:(e,t,n)=>{var r=n(5303);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},5681:e=>{e.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},7479:(e,t,n)=>{"use strict";var r,o=n(5681),i=n(9771),a=n(9658),l=n(5303),s=n(4837),u=n(9834),c=n(767),d=n(3557),f=n(1922).f,p=n(220),h=n(8252),m=n(8374),g=n(712),y=a.Int8Array,b=y&&y.prototype,v=a.Uint8ClampedArray,S=v&&v.prototype,E=y&&p(y),w=b&&p(b),O=Object.prototype,A=O.isPrototypeOf,C=m("toStringTag"),T=g("TYPED_ARRAY_TAG"),D=o&&!!h&&"Opera"!==u(a.opera),x=!1,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},M={BigInt64Array:8,BigUint64Array:8},I=function(e){if(!l(e))return!1;var t=u(e);return s(P,t)||s(M,t)};for(r in P)a[r]||(D=!1);if((!D||"function"!=typeof E||E===Function.prototype)&&(E=function(){throw TypeError("Incorrect invocation")},D))for(r in P)a[r]&&h(a[r],E);if((!D||!w||w===O)&&(w=E.prototype,D))for(r in P)a[r]&&h(a[r].prototype,w);if(D&&p(S)!==w&&h(S,w),i&&!s(w,C))for(r in x=!0,f(w,C,{get:function(){return l(this)?this[T]:void 0}}),P)a[r]&&c(a[r],T,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:x&&T,aTypedArray:function(e){if(I(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(A.call(E,e))return e}else for(var t in P)if(s(P,r)){var n=a[t];if(n&&(e===n||A.call(n,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n){if(i){if(n)for(var r in P){var o=a[r];o&&s(o.prototype,e)&&delete o.prototype[e]}w[e]&&!n||d(w,e,n?t:D&&b[e]||t)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(i){if(h){if(n)for(r in P)(o=a[r])&&s(o,e)&&delete o[e];if(E[e]&&!n)return;try{return d(E,e,n?t:D&&y[e]||t)}catch(l){}}for(r in P)!(o=a[r])||o[e]&&!n||d(o,e,t)}},isView:function(e){if(!l(e))return!1;var t=u(e);return"DataView"===t||s(P,t)||s(M,t)},isTypedArray:I,TypedArray:E,TypedArrayPrototype:w}},3941:(e,t,n)=>{"use strict";var r=n(9658),o=n(9771),i=n(5681),a=n(767),l=n(5267),s=n(5162),u=n(1438),c=n(6958),d=n(5256),f=n(2264),p=n(5550),h=n(220),m=n(8252),g=n(7287).f,y=n(1922).f,b=n(9851),v=n(3114),S=n(1461),E=S.get,w=S.set,O="ArrayBuffer",A="DataView",C="Wrong index",T=r.ArrayBuffer,D=T,x=r.DataView,P=x&&x.prototype,M=Object.prototype,I=r.RangeError,R=p.pack,L=p.unpack,k=function(e){return[255&e]},j=function(e){return[255&e,e>>8&255]},_=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},F=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},N=function(e){return R(e,23,4)},B=function(e){return R(e,52,8)},U=function(e,t){y(e.prototype,t,{get:function(){return E(this)[t]}})},H=function(e,t,n,r){var o=f(n),i=E(e);if(o+t>i.byteLength)throw I(C);var a=E(i.buffer).bytes,l=o+i.byteOffset,s=a.slice(l,l+t);return r?s:s.reverse()},V=function(e,t,n,r,o,i){var a=f(n),l=E(e);if(a+t>l.byteLength)throw I(C);for(var s=E(l.buffer).bytes,u=a+l.byteOffset,c=r(+o),d=0;d<t;d++)s[u+d]=c[i?d:t-d-1]};if(i){if(!s((function(){T(1)}))||!s((function(){new T(-1)}))||s((function(){return new T,new T(1.5),new T(NaN),T.name!=O}))){for(var q,W=(D=function(e){return u(this,D),new T(f(e))}).prototype=T.prototype,z=g(T),Q=0;z.length>Q;)(q=z[Q++])in D||a(D,q,T[q]);W.constructor=D}m&&h(P)!==M&&m(P,M);var G=new x(new D(2)),$=P.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||l(P,{setInt8:function(e,t){$.call(this,e,t<<24>>24)},setUint8:function(e,t){$.call(this,e,t<<24>>24)}},{unsafe:!0})}else D=function(e){u(this,D,O);var t=f(e);w(this,{bytes:b.call(new Array(t),0),byteLength:t}),o||(this.byteLength=t)},x=function(e,t,n){u(this,x,A),u(e,D,A);var r=E(e).byteLength,i=c(t);if(i<0||i>r)throw I("Wrong offset");if(i+(n=void 0===n?r-i:d(n))>r)throw I("Wrong length");w(this,{buffer:e,byteLength:n,byteOffset:i}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},o&&(U(D,"byteLength"),U(x,"buffer"),U(x,"byteLength"),U(x,"byteOffset")),l(x.prototype,{getInt8:function(e){return H(this,1,e)[0]<<24>>24},getUint8:function(e){return H(this,1,e)[0]},getInt16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=H(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return F(H(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return F(H(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return L(H(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return L(H(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){V(this,1,e,k,t)},setUint8:function(e,t){V(this,1,e,k,t)},setInt16:function(e,t){V(this,2,e,j,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){V(this,2,e,j,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){V(this,4,e,_,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){V(this,4,e,_,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){V(this,4,e,N,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){V(this,8,e,B,t,arguments.length>2?arguments[2]:void 0)}});v(D,O),v(x,A),e.exports={ArrayBuffer:D,DataView:x}},9794:(e,t,n)=>{"use strict";var r=n(9738),o=n(4),i=n(5256),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),l=i(n.length),s=o(e,l),u=o(t,l),c=arguments.length>2?arguments[2]:void 0,d=a((void 0===c?l:o(c,l))-u,l-s),f=1;for(u<s&&s<u+d&&(f=-1,u+=d-1,s+=d-1);d-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},9851:(e,t,n)=>{"use strict";var r=n(9738),o=n(4),i=n(5256);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,l=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,u=void 0===s?n:o(s,n);u>l;)t[l++]=e;return t}},3417:(e,t,n)=>{"use strict";var r=n(7550).forEach,o=n(1341),i=n(6770),a=o("forEach"),l=i("forEach");e.exports=a&&l?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},5886:(e,t,n)=>{"use strict";var r=n(3708),o=n(9738),i=n(5406),a=n(1603),l=n(5256),s=n(56),u=n(6819);e.exports=function(e){var t,n,c,d,f,p,h=o(e),m="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,b=void 0!==y,v=u(h),S=0;if(b&&(y=r(y,g>2?arguments[2]:void 0,2)),void 0==v||m==Array&&a(v))for(n=new m(t=l(h.length));t>S;S++)p=b?y(h[S],S):h[S],s(n,S,p);else for(f=(d=v.call(h)).next,n=new m;!(c=f.call(d)).done;S++)p=b?i(d,y,[c.value,S],!0):c.value,s(n,S,p);return n.length=S,n}},1194:(e,t,n)=>{var r=n(8888),o=n(5256),i=n(4),a=function(e){return function(t,n,a){var l,s=r(t),u=o(s.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},7550:(e,t,n)=>{var r=n(3708),o=n(6883),i=n(9738),a=n(5256),l=n(7641),s=[].push,u=function(e){var t=1==e,n=2==e,u=3==e,c=4==e,d=6==e,f=7==e,p=5==e||d;return function(h,m,g,y){for(var b,v,S=i(h),E=o(S),w=r(m,g,3),O=a(E.length),A=0,C=y||l,T=t?C(h,O):n||f?C(h,0):void 0;O>A;A++)if((p||A in E)&&(v=w(b=E[A],A,S),e))if(t)T[A]=v;else if(v)switch(e){case 3:return!0;case 5:return b;case 6:return A;case 2:s.call(T,b)}else switch(e){case 4:return!1;case 7:s.call(T,b)}return d?-1:u||c?c:T}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterOut:u(7)}},823:(e,t,n)=>{"use strict";var r=n(8888),o=n(6958),i=n(5256),a=n(1341),l=n(6770),s=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,d=a("lastIndexOf"),f=l("indexOf",{ACCESSORS:!0,1:0}),p=c||!d||!f;e.exports=p?function(e){if(c)return u.apply(this,arguments)||0;var t=r(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=s(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},2063:(e,t,n)=>{var r=n(5162),o=n(8374),i=n(3483),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},1341:(e,t,n)=>{"use strict";var r=n(5162);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},6770:(e,t,n)=>{var r=n(9771),o=n(5162),i=n(4837),a=Object.defineProperty,l={},s=function(e){throw e};e.exports=function(e,t){if(i(l,e))return l[e];t||(t={});var n=[][e],u=!!i(t,"ACCESSORS")&&t.ACCESSORS,c=i(t,0)?t[0]:s,d=i(t,1)?t[1]:void 0;return l[e]=!!n&&!o((function(){if(u&&!r)return!0;var e={length:-1};u?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,c,d)}))}},7693:(e,t,n)=>{var r=n(339),o=n(9738),i=n(6883),a=n(5256),l=function(e){return function(t,n,l,s){r(n);var u=o(t),c=i(u),d=a(u.length),f=e?d-1:0,p=e?-1:1;if(l<2)for(;;){if(f in c){s=c[f],f+=p;break}if(f+=p,e?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=p)f in c&&(s=n(s,c[f],f,u));return s}};e.exports={left:l(!1),right:l(!0)}},7641:(e,t,n)=>{var r=n(5303),o=n(7729),i=n(8374)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},5406:(e,t,n)=>{var r=n(1778),o=n(7767);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(a){throw o(e),a}}},2138:(e,t,n)=>{var r=n(8374)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(l){}return n}},480:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},9834:(e,t,n)=>{var r=n(6563),o=n(480),i=n(8374)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},5145:(e,t,n)=>{"use strict";var r=n(1922).f,o=n(7289),i=n(5267),a=n(3708),l=n(1438),s=n(151),u=n(651),c=n(965),d=n(9771),f=n(3751).fastKey,p=n(1461),h=p.set,m=p.getterFor;e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){l(e,c,t),h(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),void 0!=r&&s(r,e[u],{that:e,AS_ENTRIES:n})})),p=m(t),g=function(e,t,n){var r,o,i=p(e),a=y(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),d?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},y=function(e,t){var n,r=p(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(c.prototype,{clear:function(){for(var e=p(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,n=p(t),r=y(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),d?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=p(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!y(this,e)}}),i(c.prototype,n?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(c.prototype,"size",{get:function(){return p(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",o=m(t),i=m(r);u(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},3147:(e,t,n)=>{"use strict";var r=n(6949),o=n(9658),i=n(1325),a=n(3557),l=n(3751),s=n(151),u=n(1438),c=n(5303),d=n(5162),f=n(2138),p=n(3114),h=n(4301);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),y=m?"set":"add",b=o[e],v=b&&b.prototype,S=b,E={},w=function(e){var t=v[e];a(v,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof b||!(g||v.forEach&&!d((function(){(new b).entries().next()})))))S=n.getConstructor(t,e,m,y),l.REQUIRED=!0;else if(i(e,!0)){var O=new S,A=O[y](g?{}:-0,1)!=O,C=d((function(){O.has(1)})),T=f((function(e){new b(e)})),D=!g&&d((function(){for(var e=new b,t=5;t--;)e[y](t,t);return!e.has(-0)}));T||((S=t((function(t,n){u(t,S,e);var r=h(new b,t,S);return void 0!=n&&s(n,r[y],{that:r,AS_ENTRIES:m}),r}))).prototype=v,v.constructor=S),(C||D)&&(w("delete"),w("has"),m&&w("get")),(D||A)&&w(y),g&&v.clear&&delete v.clear}return E[e]=S,r({global:!0,forced:S!=b},E),p(S,e),g||n.setStrong(S,e,m),S}},3498:(e,t,n)=>{var r=n(4837),o=n(3577),i=n(8533),a=n(1922);e.exports=function(e,t){for(var n=o(t),l=a.f,s=i.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||l(e,c,s(t,c))}}},6818:(e,t,n)=>{var r=n(8374)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(o){}}return!1}},3026:(e,t,n)=>{var r=n(5162);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4477:(e,t,n)=>{"use strict";var r=n(9986).IteratorPrototype,o=n(7289),i=n(2701),a=n(3114),l=n(4940),s=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,u,!1,!0),l[u]=s,e}},767:(e,t,n)=>{var r=n(9771),o=n(1922),i=n(2701);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},2701:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},56:(e,t,n)=>{"use strict";var r=n(262),o=n(1922),i=n(2701);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},4290:(e,t,n)=>{"use strict";var r=n(5162),o=n(1917).start,i=Math.abs,a=Date.prototype,l=a.getTime,s=a.toISOString;e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=s.call(new Date(-50000000000001))}))||!r((function(){s.call(new Date(NaN))}))?function(){if(!isFinite(l.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+o(i(t),r?6:4,0)+"-"+o(e.getUTCMonth()+1,2,0)+"-"+o(e.getUTCDate(),2,0)+"T"+o(e.getUTCHours(),2,0)+":"+o(e.getUTCMinutes(),2,0)+":"+o(e.getUTCSeconds(),2,0)+"."+o(n,3,0)+"Z"}:s},651:(e,t,n)=>{"use strict";var r=n(6949),o=n(4477),i=n(220),a=n(8252),l=n(3114),s=n(767),u=n(3557),c=n(8374),d=n(4856),f=n(4940),p=n(9986),h=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,g=c("iterator"),y="keys",b="values",v="entries",S=function(){return this};e.exports=function(e,t,n,c,p,E,w){o(n,t,c);var O,A,C,T=function(e){if(e===p&&I)return I;if(!m&&e in P)return P[e];switch(e){case y:case b:case v:return function(){return new n(this,e)}}return function(){return new n(this)}},D=t+" Iterator",x=!1,P=e.prototype,M=P[g]||P["@@iterator"]||p&&P[p],I=!m&&M||T(p),R="Array"==t&&P.entries||M;if(R&&(O=i(R.call(new e)),h!==Object.prototype&&O.next&&(d||i(O)===h||(a?a(O,h):"function"!=typeof O[g]&&s(O,g,S)),l(O,D,!0,!0),d&&(f[D]=S))),p==b&&M&&M.name!==b&&(x=!0,I=function(){return M.call(this)}),d&&!w||P[g]===I||s(P,g,I),f[t]=I,p)if(A={values:T(b),keys:E?I:T(y),entries:T(v)},w)for(C in A)(m||x||!(C in P))&&u(P,C,A[C]);else r({target:t,proto:!0,forced:m||x},A);return A}},1830:(e,t,n)=>{var r=n(9155),o=n(4837),i=n(8235),a=n(1922).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},9771:(e,t,n)=>{var r=n(5162);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9307:(e,t,n)=>{var r=n(9658),o=n(5303),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},8284:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},1509:(e,t,n)=>{var r=n(293);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},4928:(e,t,n)=>{var r=n(480),o=n(9658);e.exports="process"==r(o.process)},9604:(e,t,n)=>{var r=n(293);e.exports=/web0s(?!.*chrome)/i.test(r)},293:(e,t,n)=>{var r=n(1757);e.exports=r("navigator","userAgent")||""},3483:(e,t,n)=>{var r,o,i=n(9658),a=n(293),l=i.process,s=l&&l.versions,u=s&&s.v8;u?o=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},7515:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6949:(e,t,n)=>{var r=n(9658),o=n(8533).f,i=n(767),a=n(3557),l=n(2319),s=n(3498),u=n(1325);e.exports=function(e,t){var n,c,d,f,p,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||l(h,{}):(r[h]||{}).prototype)for(c in t){if(f=t[c],d=e.noTargetGet?(p=o(n,c))&&p.value:n[c],!u(m?c:h+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof f===typeof d)continue;s(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),a(n,c,f,e)}}},5162:e=>{e.exports=function(e){try{return!!e()}catch(t){return!0}}},7631:(e,t,n)=>{"use strict";n(8208);var r=n(3557),o=n(5162),i=n(8374),a=n(633),l=n(767),s=i("species"),u=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c="$0"==="a".replace(/./,"$0"),d=i("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=i(e),m=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!c||f)||"split"===e&&!p){var y=/./[h],b=n(h,""[e],(function(e,t,n,r,o){return t.exec===a?m&&!o?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),v=b[0],S=b[1];r(String.prototype,e,v),r(RegExp.prototype,h,2==t?function(e,t){return S.call(e,this,t)}:function(e){return S.call(e,this)})}d&&l(RegExp.prototype[h],"sham",!0)}},8892:(e,t,n)=>{"use strict";var r=n(7729),o=n(5256),i=n(3708),a=function(e,t,n,l,s,u,c,d){for(var f,p=s,h=0,m=!!c&&i(c,d,3);h<l;){if(h in n){if(f=m?m(n[h],h,t):n[h],u>0&&r(f))p=a(e,t,f,o(f.length),p,u-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[p]=f}p++}h++}return p};e.exports=a},5554:(e,t,n)=>{var r=n(5162);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3708:(e,t,n)=>{var r=n(339);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},3389:(e,t,n)=>{"use strict";var r=n(339),o=n(5303),i=[].slice,a={},l=function(e,t,n){if(!(t in a)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";a[t]=Function("C,a","return new C("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?l(t,r.length,r):t.apply(e,r)};return o(t.prototype)&&(a.prototype=t.prototype),a}},1757:(e,t,n)=>{var r=n(9155),o=n(9658),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},6819:(e,t,n)=>{var r=n(9834),o=n(4940),i=n(8374)("iterator");e.exports=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},7224:(e,t,n)=>{var r=n(1778),o=n(6819);e.exports=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},4889:(e,t,n)=>{var r=n(9738),o=Math.floor,i="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,l=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,s,u,c){var d=n+e.length,f=s.length,p=l;return void 0!==u&&(u=r(u),p=a),i.call(c,p,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(d);case"<":a=u[i.slice(1,-1)];break;default:var l=+i;if(0===l)return r;if(l>f){var c=o(l/10);return 0===c?r:c<=f?void 0===s[c-1]?i.charAt(1):s[c-1]+i.charAt(1):r}a=s[l-1]}return void 0===a?"":a}))}},9658:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},4837:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},4794:e=>{e.exports={}},1521:(e,t,n)=>{var r=n(9658);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},2709:(e,t,n)=>{var r=n(1757);e.exports=r("document","documentElement")},5143:(e,t,n)=>{var r=n(9771),o=n(5162),i=n(9307);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},5550:e=>{var t=1/0,n=Math.abs,r=Math.pow,o=Math.floor,i=Math.log,a=Math.LN2;e.exports={pack:function(e,l,s){var u,c,d,f=new Array(s),p=8*s-l-1,h=(1<<p)-1,m=h>>1,g=23===l?r(2,-24)-r(2,-77):0,y=e<0||0===e&&1/e<0?1:0,b=0;for((e=n(e))!=e||e===t?(c=e!=e?1:0,u=h):(u=o(i(e)/a),e*(d=r(2,-u))<1&&(u--,d*=2),(e+=u+m>=1?g/d:g*r(2,1-m))*d>=2&&(u++,d/=2),u+m>=h?(c=0,u=h):u+m>=1?(c=(e*d-1)*r(2,l),u+=m):(c=e*r(2,m-1)*r(2,l),u=0));l>=8;f[b++]=255&c,c/=256,l-=8);for(u=u<<l|c,p+=l;p>0;f[b++]=255&u,u/=256,p-=8);return f[--b]|=128*y,f},unpack:function(e,n){var o,i=e.length,a=8*i-n-1,l=(1<<a)-1,s=l>>1,u=a-7,c=i-1,d=e[c--],f=127&d;for(d>>=7;u>0;f=256*f+e[c],c--,u-=8);for(o=f&(1<<-u)-1,f>>=-u,u+=n;u>0;o=256*o+e[c],c--,u-=8);if(0===f)f=1-s;else{if(f===l)return o?NaN:d?-1/0:t;o+=r(2,n),f-=s}return(d?-1:1)*o*r(2,f-n)}}},6883:(e,t,n)=>{var r=n(5162),o=n(480),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},4301:(e,t,n)=>{var r=n(5303),o=n(8252);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},2423:(e,t,n)=>{var r=n(5351),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},3751:(e,t,n)=>{var r=n(4794),o=n(5303),i=n(4837),a=n(1922).f,l=n(712),s=n(5554),u=l("meta"),c=0,d=Object.isExtensible||function(){return!0},f=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,u)){if(!d(e))return"F";if(!t)return"E";f(e)}return e[u].objectID},getWeakData:function(e,t){if(!i(e,u)){if(!d(e))return!0;if(!t)return!1;f(e)}return e[u].weakData},onFreeze:function(e){return s&&p.REQUIRED&&d(e)&&!i(e,u)&&f(e),e}};r[u]=!0},1461:(e,t,n)=>{var r,o,i,a=n(8590),l=n(9658),s=n(5303),u=n(767),c=n(4837),d=n(5351),f=n(7493),p=n(4794),h=l.WeakMap;if(a){var m=d.state||(d.state=new h),g=m.get,y=m.has,b=m.set;r=function(e,t){return t.facade=e,b.call(m,e,t),t},o=function(e){return g.call(m,e)||{}},i=function(e){return y.call(m,e)}}else{var v=f("state");p[v]=!0,r=function(e,t){return t.facade=e,u(e,v,t),t},o=function(e){return c(e,v)?e[v]:{}},i=function(e){return c(e,v)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},1603:(e,t,n)=>{var r=n(8374),o=n(4940),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},7729:(e,t,n)=>{var r=n(480);e.exports=Array.isArray||function(e){return"Array"==r(e)}},1325:(e,t,n)=>{var r=n(5162),o=/#|\.prototype\./,i=function(e,t){var n=l[a(e)];return n==u||n!=s&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=i.data={},s=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},5303:e=>{e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},4856:e=>{e.exports=!1},9971:(e,t,n)=>{var r=n(5303),o=n(480),i=n(8374)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},151:(e,t,n)=>{var r=n(1778),o=n(1603),i=n(5256),a=n(3708),l=n(6819),s=n(7767),u=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var c,d,f,p,h,m,g,y=n&&n.that,b=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),S=!(!n||!n.INTERRUPTED),E=a(t,y,1+b+S),w=function(e){return c&&s(c),new u(!0,e)},O=function(e){return b?(r(e),S?E(e[0],e[1],w):E(e[0],e[1])):S?E(e,w):E(e)};if(v)c=e;else{if("function"!=typeof(d=l(e)))throw TypeError("Target is not iterable");if(o(d)){for(f=0,p=i(e.length);p>f;f++)if((h=O(e[f]))&&h instanceof u)return h;return new u(!1)}c=d.call(e)}for(m=c.next;!(g=m.call(c)).done;){try{h=O(g.value)}catch(A){throw s(c),A}if("object"==typeof h&&h&&h instanceof u)return h}return new u(!1)}},7767:(e,t,n)=>{var r=n(1778);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},9986:(e,t,n)=>{"use strict";var r,o,i,a=n(5162),l=n(220),s=n(767),u=n(4837),c=n(8374),d=n(4856),f=c("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):p=!0);var h=void 0==r||a((function(){var e={};return r[f].call(e)!==e}));h&&(r={}),d&&!h||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},4940:e=>{e.exports={}},8486:(e,t,n)=>{var r,o,i,a,l,s,u,c,d=n(9658),f=n(8533).f,p=n(4906).set,h=n(1509),m=n(9604),g=n(4928),y=d.MutationObserver||d.WebKitMutationObserver,b=d.document,v=d.process,S=d.Promise,E=f(d,"queueMicrotask"),w=E&&E.value;w||(r=function(){var e,t;for(g&&(e=v.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=void 0,n}}i=void 0,e&&e.enter()},h||g||m||!y||!b?S&&S.resolve?(u=S.resolve(void 0),c=u.then,a=function(){c.call(u,r)}):a=g?function(){v.nextTick(r)}:function(){p.call(d,r)}:(l=!0,s=b.createTextNode(""),new y(r).observe(s,{characterData:!0}),a=function(){s.data=l=!l})),e.exports=w||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},9315:(e,t,n)=>{var r=n(9658);e.exports=r.Promise},4545:(e,t,n)=>{var r=n(5162);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},5342:(e,t,n)=>{var r=n(5162),o=n(8374),i=n(4856),a=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8590:(e,t,n)=>{var r=n(9658),o=n(2423),i=r.WeakMap;e.exports="function"===typeof i&&/native code/.test(o(i))},3987:(e,t,n)=>{"use strict";var r=n(339),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},1678:(e,t,n)=>{var r=n(9971);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},6584:(e,t,n)=>{var r=n(9658),o=n(526).trim,i=n(3363),a=r.parseInt,l=/^[+-]?0[Xx]/,s=8!==a(i+"08")||22!==a(i+"0x16");e.exports=s?function(e,t){var n=o(String(e));return a(n,t>>>0||(l.test(n)?16:10))}:a},1223:(e,t,n)=>{"use strict";var r=n(9771),o=n(5162),i=n(8801),a=n(4255),l=n(3274),s=n(9738),u=n(6883),c=Object.assign,d=Object.defineProperty;e.exports=!c||o((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||i(c({},t)).join("")!=o}))?function(e,t){for(var n=s(e),o=arguments.length,c=1,d=a.f,f=l.f;o>c;)for(var p,h=u(arguments[c++]),m=d?i(h).concat(d(h)):i(h),g=m.length,y=0;g>y;)p=m[y++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:c},7289:(e,t,n)=>{var r,o=n(1778),i=n(4378),a=n(7515),l=n(4794),s=n(2709),u=n(9307),c=n(7493),d=c("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"</"+"script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):function(){var e,t=u("iframe");return t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F}();for(var e=a.length;e--;)delete h.prototype[a[e]];return h()};l[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=h(),void 0===t?n:i(n,t)}},4378:(e,t,n)=>{var r=n(9771),o=n(1922),i=n(1778),a=n(8801);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),l=r.length,s=0;l>s;)o.f(e,n=r[s++],t[n]);return e}},1922:(e,t,n)=>{var r=n(9771),o=n(5143),i=n(1778),a=n(262),l=Object.defineProperty;t.f=r?l:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return l(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},8533:(e,t,n)=>{var r=n(9771),o=n(3274),i=n(2701),a=n(8888),l=n(262),s=n(4837),u=n(5143),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=l(t,!0),u)try{return c(e,t)}catch(n){}if(s(e,t))return i(!o.f.call(e,t),e[t])}},2262:(e,t,n)=>{var r=n(8888),o=n(7287).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(t){return a.slice()}}(e):o(r(e))}},7287:(e,t,n)=>{var r=n(8641),o=n(7515).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},4255:(e,t)=>{t.f=Object.getOwnPropertySymbols},220:(e,t,n)=>{var r=n(4837),o=n(9738),i=n(7493),a=n(3026),l=i("IE_PROTO"),s=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,l)?e[l]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},8641:(e,t,n)=>{var r=n(4837),o=n(8888),i=n(1194).indexOf,a=n(4794);e.exports=function(e,t){var n,l=o(e),s=0,u=[];for(n in l)!r(a,n)&&r(l,n)&&u.push(n);for(;t.length>s;)r(l,n=t[s++])&&(~i(u,n)||u.push(n));return u}},8801:(e,t,n)=>{var r=n(8641),o=n(7515);e.exports=Object.keys||function(e){return r(e,o)}},3274:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},8252:(e,t,n)=>{var r=n(1778),o=n(1024);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},4275:(e,t,n)=>{var r=n(9771),o=n(8801),i=n(8888),a=n(3274).f,l=function(e){return function(t){for(var n,l=i(t),s=o(l),u=s.length,c=0,d=[];u>c;)n=s[c++],r&&!a.call(l,n)||d.push(e?[n,l[n]]:l[n]);return d}};e.exports={entries:l(!0),values:l(!1)}},7856:(e,t,n)=>{"use strict";var r=n(6563),o=n(9834);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},3577:(e,t,n)=>{var r=n(1757),o=n(7287),i=n(4255),a=n(1778);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},9155:(e,t,n)=>{var r=n(9658);e.exports=r},649:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},7569:(e,t,n)=>{var r=n(1778),o=n(5303),i=n(3987);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},5267:(e,t,n)=>{var r=n(3557);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},3557:(e,t,n)=>{var r=n(9658),o=n(767),i=n(4837),a=n(2319),l=n(2423),s=n(1461),u=s.get,c=s.enforce,d=String(String).split("String");(e.exports=function(e,t,n,l){var s,u=!!l&&!!l.unsafe,f=!!l&&!!l.enumerable,p=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),(s=c(n)).source||(s.source=d.join("string"==typeof t?t:""))),e!==r?(u?!p&&e[t]&&(f=!0):delete e[t],f?e[t]=n:o(e,t,n)):f?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||l(this)}))},4544:(e,t,n)=>{var r=n(480),o=n(633);e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var i=n.call(e,t);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},633:(e,t,n)=>{"use strict";var r=n(7980),o=n(1374),i=RegExp.prototype.exec,a=String.prototype.replace,l=i,s=function(){var e=/a/,t=/b*/g;return i.call(e,"a"),i.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),u=o.UNSUPPORTED_Y||o.BROKEN_CARET,c=void 0!==/()??/.exec("")[1];(s||c||u)&&(l=function(e){var t,n,o,l,d=this,f=u&&d.sticky,p=r.call(d),h=d.source,m=0,g=e;return f&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==e[d.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",p)),c&&(n=new RegExp("^"+h+"$(?!\\s)",p)),s&&(t=d.lastIndex),o=i.call(f?n:d,g),f?o?(o.input=o.input.slice(m),o[0]=o[0].slice(m),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:s&&o&&(d.lastIndex=d.global?o.index+o[0].length:t),c&&o&&o.length>1&&a.call(o[0],n,(function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(o[l]=void 0)})),o}),e.exports=l},7980:(e,t,n)=>{"use strict";var r=n(1778);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},1374:(e,t,n)=>{"use strict";var r=n(5162);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4750:e=>{e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},8925:e=>{e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},2319:(e,t,n)=>{var r=n(9658),o=n(767);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},965:(e,t,n)=>{"use strict";var r=n(1757),o=n(1922),i=n(8374),a=n(9771),l=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[l]&&n(t,l,{configurable:!0,get:function(){return this}})}},3114:(e,t,n)=>{var r=n(1922).f,o=n(4837),i=n(8374)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},7493:(e,t,n)=>{var r=n(1981),o=n(712),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5351:(e,t,n)=>{var r=n(9658),o=n(2319),i="__core-js_shared__",a=r[i]||o(i,{});e.exports=a},1981:(e,t,n)=>{var r=n(4856),o=n(5351);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},5613:(e,t,n)=>{var r=n(1778),o=n(339),i=n(8374)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},3501:(e,t,n)=>{var r=n(6958),o=n(4750),i=function(e){return function(t,n){var i,a,l=String(o(t)),s=r(n),u=l.length;return s<0||s>=u?e?"":void 0:(i=l.charCodeAt(s))<55296||i>56319||s+1===u||(a=l.charCodeAt(s+1))<56320||a>57343?e?l.charAt(s):i:e?l.slice(s,s+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},5250:(e,t,n)=>{var r=n(293);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},1917:(e,t,n)=>{var r=n(5256),o=n(1875),i=n(4750),a=Math.ceil,l=function(e){return function(t,n,l){var s,u,c=String(i(t)),d=c.length,f=void 0===l?" ":String(l),p=r(n);return p<=d||""==f?c:(s=p-d,(u=o.call(f,a(s/f.length))).length>s&&(u=u.slice(0,s)),e?c+u:u+c)}};e.exports={start:l(!1),end:l(!0)}},3497:e=>{"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=Math.floor,a=String.fromCharCode,l=function(e){return e+22+75*(e<26)},s=function(e,t,n){var r=0;for(e=n?i(e/700):e>>1,e+=i(e/t);e>455;r+=36)e=i(e/35);return i(r+36*e/(e+38))},u=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}(e);var r,u,c=e.length,d=128,f=0,p=72;for(r=0;r<e.length;r++)(u=e[r])<128&&n.push(a(u));var h=n.length,m=h;for(h&&n.push("-");m<c;){var g=t;for(r=0;r<e.length;r++)(u=e[r])>=d&&u<g&&(g=u);var y=m+1;if(g-d>i((t-f)/y))throw RangeError(o);for(f+=(g-d)*y,d=g,r=0;r<e.length;r++){if((u=e[r])<d&&++f>t)throw RangeError(o);if(u==d){for(var b=f,v=36;;v+=36){var S=v<=p?1:v>=p+26?26:v-p;if(b<S)break;var E=b-S,w=36-S;n.push(a(l(S+E%w))),b=i(E/w)}n.push(a(l(b))),p=s(f,y,m==h),f=0,++m}}++f,++d}return n.join("")};e.exports=function(e){var t,o,i=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)o=a[t],i.push(n.test(o)?"xn--"+u(o):o);return i.join(".")}},1875:(e,t,n)=>{"use strict";var r=n(6958),o=n(4750);e.exports="".repeat||function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},4586:(e,t,n)=>{var r=n(5162),o=n(3363);e.exports=function(e){return r((function(){return!!o[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||o[e].name!==e}))}},526:(e,t,n)=>{var r=n(4750),o="["+n(3363)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),l=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},4906:(e,t,n)=>{var r,o,i,a=n(9658),l=n(5162),s=n(3708),u=n(2709),c=n(9307),d=n(1509),f=n(4928),p=a.location,h=a.setImmediate,m=a.clearImmediate,g=a.process,y=a.MessageChannel,b=a.Dispatch,v=0,S={},E="onreadystatechange",w=function(e){if(S.hasOwnProperty(e)){var t=S[e];delete S[e],t()}},O=function(e){return function(){w(e)}},A=function(e){w(e.data)},C=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};h&&m||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return S[++v]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(v),v},m=function(e){delete S[e]},f?r=function(e){g.nextTick(O(e))}:b&&b.now?r=function(e){b.now(O(e))}:y&&!d?(i=(o=new y).port2,o.port1.onmessage=A,r=s(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&p&&"file:"!==p.protocol&&!l(C)?(r=C,a.addEventListener("message",A,!1)):r=E in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),w(e)}}:function(e){setTimeout(O(e),0)}),e.exports={set:h,clear:m}},9308:(e,t,n)=>{var r=n(480);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},4:(e,t,n)=>{var r=n(6958),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},2264:(e,t,n)=>{var r=n(6958),o=n(5256);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length or index");return n}},8888:(e,t,n)=>{var r=n(6883),o=n(4750);e.exports=function(e){return r(o(e))}},6958:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},5256:(e,t,n)=>{var r=n(6958),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},9738:(e,t,n)=>{var r=n(4750);e.exports=function(e){return Object(r(e))}},4884:(e,t,n)=>{var r=n(1477);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},1477:(e,t,n)=>{var r=n(6958);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},262:(e,t,n)=>{var r=n(5303);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},6563:(e,t,n)=>{var r={};r[n(8374)("toStringTag")]="z",e.exports="[object z]"===String(r)},3693:(e,t,n)=>{"use strict";var r=n(6949),o=n(9658),i=n(9771),a=n(557),l=n(7479),s=n(3941),u=n(1438),c=n(2701),d=n(767),f=n(5256),p=n(2264),h=n(4884),m=n(262),g=n(4837),y=n(9834),b=n(5303),v=n(7289),S=n(8252),E=n(7287).f,w=n(8240),O=n(7550).forEach,A=n(965),C=n(1922),T=n(8533),D=n(1461),x=n(4301),P=D.get,M=D.set,I=C.f,R=T.f,L=Math.round,k=o.RangeError,j=s.ArrayBuffer,_=s.DataView,F=l.NATIVE_ARRAY_BUFFER_VIEWS,N=l.TYPED_ARRAY_TAG,B=l.TypedArray,U=l.TypedArrayPrototype,H=l.aTypedArrayConstructor,V=l.isTypedArray,q="BYTES_PER_ELEMENT",W="Wrong length",z=function(e,t){for(var n=0,r=t.length,o=new(H(e))(r);r>n;)o[n]=t[n++];return o},Q=function(e,t){I(e,t,{get:function(){return P(this)[t]}})},G=function(e){var t;return e instanceof j||"ArrayBuffer"==(t=y(e))||"SharedArrayBuffer"==t},$=function(e,t){return V(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},K=function(e,t){return $(e,t=m(t,!0))?c(2,e[t]):R(e,t)},Y=function(e,t,n){return!($(e,t=m(t,!0))&&b(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?I(e,t,n):(e[t]=n.value,e)};i?(F||(T.f=K,C.f=Y,Q(U,"buffer"),Q(U,"byteOffset"),Q(U,"byteLength"),Q(U,"length")),r({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:K,defineProperty:Y}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,l=e+(n?"Clamped":"")+"Array",s="get"+e,c="set"+e,m=o[l],g=m,y=g&&g.prototype,C={},T=function(e,t){I(e,t,{get:function(){return function(e,t){var n=P(e);return n.view[s](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=P(e);n&&(r=(r=L(r))<0?0:r>255?255:255&r),o.view[c](t*i+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};F?a&&(g=t((function(e,t,n,r){return u(e,g,l),x(b(t)?G(t)?void 0!==r?new m(t,h(n,i),r):void 0!==n?new m(t,h(n,i)):new m(t):V(t)?z(g,t):w.call(g,t):new m(p(t)),e,g)})),S&&S(g,B),O(E(m),(function(e){e in g||d(g,e,m[e])})),g.prototype=y):(g=t((function(e,t,n,r){u(e,g,l);var o,a,s,c=0,d=0;if(b(t)){if(!G(t))return V(t)?z(g,t):w.call(g,t);o=t,d=h(n,i);var m=t.byteLength;if(void 0===r){if(m%i)throw k(W);if((a=m-d)<0)throw k(W)}else if((a=f(r)*i)+d>m)throw k(W);s=a/i}else s=p(t),o=new j(a=s*i);for(M(e,{buffer:o,byteOffset:d,byteLength:a,length:s,view:new _(o)});c<s;)T(e,c++)})),S&&S(g,B),y=g.prototype=v(U)),y.constructor!==g&&d(y,"constructor",g),N&&d(y,N,l),C[l]=g,r({global:!0,forced:g!=m,sham:!F},C),q in g||d(g,q,i),q in y||d(y,q,i),A(l)}):e.exports=function(){}},557:(e,t,n)=>{var r=n(9658),o=n(5162),i=n(2138),a=n(7479).NATIVE_ARRAY_BUFFER_VIEWS,l=r.ArrayBuffer,s=r.Int8Array;e.exports=!a||!o((function(){s(1)}))||!o((function(){new s(-1)}))||!i((function(e){new s,new s(null),new s(1.5),new s(e)}),!0)||o((function(){return 1!==new s(new l(2),1,void 0).length}))},8240:(e,t,n)=>{var r=n(9738),o=n(5256),i=n(6819),a=n(1603),l=n(3708),s=n(7479).aTypedArrayConstructor;e.exports=function(e){var t,n,u,c,d,f,p=r(e),h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m,y=i(p);if(void 0!=y&&!a(y))for(f=(d=y.call(p)).next,p=[];!(c=f.call(d)).done;)p.push(c.value);for(g&&h>2&&(m=l(m,arguments[2],2)),n=o(p.length),u=new(s(this))(n),t=0;n>t;t++)u[t]=g?m(p[t],t):p[t];return u}},712:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},4474:(e,t,n)=>{var r=n(4545);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8235:(e,t,n)=>{var r=n(8374);t.f=r},8374:(e,t,n)=>{var r=n(9658),o=n(1981),i=n(4837),a=n(712),l=n(4545),s=n(4474),u=o("wks"),c=r.Symbol,d=s?c:c&&c.withoutSetter||a;e.exports=function(e){return i(u,e)||(l&&i(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[e]}},3363:e=>{e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},6172:(e,t,n)=>{"use strict";var r=n(6949),o=n(220),i=n(8252),a=n(7289),l=n(767),s=n(2701),u=n(151),c=function(e,t){var n=this;if(!(n instanceof c))return new c(e,t);i&&(n=i(new Error(void 0),o(n))),void 0!==t&&l(n,"message",String(t));var r=[];return u(e,r.push,{that:r}),l(n,"errors",r),n};c.prototype=a(Error.prototype,{constructor:s(5,c),message:s(5,""),name:s(5,"AggregateError")}),r({global:!0},{AggregateError:c})},4990:(e,t,n)=>{"use strict";var r=n(6949),o=n(5162),i=n(3941),a=n(1778),l=n(4),s=n(5256),u=n(5613),c=i.ArrayBuffer,d=i.DataView,f=c.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new c(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(void 0!==f&&void 0===t)return f.call(a(this),e);for(var n=a(this).byteLength,r=l(e,n),o=l(void 0===t?n:t,n),i=new(u(this,c))(s(o-r)),p=new d(this),h=new d(i),m=0;r<o;)h.setUint8(m++,p.getUint8(r++));return i}})},8382:(e,t,n)=>{"use strict";var r=n(6949),o=n(5162),i=n(7729),a=n(5303),l=n(9738),s=n(5256),u=n(56),c=n(7641),d=n(2063),f=n(8374),p=n(3483),h=f("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",y=p>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),b=d("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!y||!b},{concat:function(e){var t,n,r,o,i,a=l(this),d=c(a,0),f=0;for(t=-1,r=arguments.length;t<r;t++)if(v(i=-1===t?a:arguments[t])){if(f+(o=s(i.length))>m)throw TypeError(g);for(n=0;n<o;n++,f++)n in i&&u(d,f,i[n])}else{if(f>=m)throw TypeError(g);u(d,f++,i)}return d.length=f,d}})},8113:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).every,i=n(1341),a=n(6770),l=i("every"),s=a("every");r({target:"Array",proto:!0,forced:!l||!s},{every:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},4351:(e,t,n)=>{var r=n(6949),o=n(9851),i=n(618);r({target:"Array",proto:!0},{fill:o}),i("fill")},2140:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).filter,i=n(2063),a=n(6770),l=i("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},6208:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).findIndex,i=n(618),a=n(6770),l="findIndex",s=!0,u=a(l);l in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(l)},2745:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).find,i=n(618),a=n(6770),l="find",s=!0,u=a(l);l in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!u},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(l)},8192:(e,t,n)=>{"use strict";var r=n(6949),o=n(8892),i=n(9738),a=n(5256),l=n(339),s=n(7641);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),r=a(n.length);return l(e),(t=s(n,0)).length=o(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},9936:(e,t,n)=>{"use strict";var r=n(6949),o=n(3417);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},4105:(e,t,n)=>{var r=n(6949),o=n(5886);r({target:"Array",stat:!0,forced:!n(2138)((function(e){Array.from(e)}))},{from:o})},7152:(e,t,n)=>{"use strict";var r=n(6949),o=n(1194).includes,i=n(618);r({target:"Array",proto:!0,forced:!n(6770)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},4263:(e,t,n)=>{"use strict";var r=n(6949),o=n(1194).indexOf,i=n(1341),a=n(6770),l=[].indexOf,s=!!l&&1/[1].indexOf(1,-0)<0,u=i("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:s||!u||!c},{indexOf:function(e){return s?l.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},4162:(e,t,n)=>{"use strict";var r=n(8888),o=n(618),i=n(4940),a=n(1461),l=n(651),s="Array Iterator",u=a.set,c=a.getterFor(s);e.exports=l(Array,"Array",(function(e,t){u(this,{type:s,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},6736:(e,t,n)=>{"use strict";var r=n(6949),o=n(6883),i=n(8888),a=n(1341),l=[].join,s=o!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:s||!u},{join:function(e){return l.call(i(this),void 0===e?",":e)}})},2844:(e,t,n)=>{var r=n(6949),o=n(823);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},1116:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).map,i=n(2063),a=n(6770),l=i("map"),s=a("map");r({target:"Array",proto:!0,forced:!l||!s},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},7394:(e,t,n)=>{"use strict";var r=n(6949),o=n(7693).left,i=n(1341),a=n(6770),l=n(3483),s=n(4928),u=i("reduce"),c=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!u||!c||!s&&l>79&&l<83},{reduce:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},4461:(e,t,n)=>{"use strict";var r=n(6949),o=n(7729),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},5150:(e,t,n)=>{"use strict";var r=n(6949),o=n(5303),i=n(7729),a=n(4),l=n(5256),s=n(8888),u=n(56),c=n(8374),d=n(2063),f=n(6770),p=d("slice"),h=f("slice",{ACCESSORS:!0,0:0,1:2}),m=c("species"),g=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!p||!h},{slice:function(e,t){var n,r,c,d=s(this),f=l(d.length),p=a(e,f),h=a(void 0===t?f:t,f);if(i(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(d,p,h);for(r=new(void 0===n?Array:n)(y(h-p,0)),c=0;p<h;p++,c++)p in d&&u(r,c,d[p]);return r.length=c,r}})},4772:(e,t,n)=>{"use strict";var r=n(6949),o=n(7550).some,i=n(1341),a=n(6770),l=i("some"),s=a("some");r({target:"Array",proto:!0,forced:!l||!s},{some:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},840:(e,t,n)=>{"use strict";var r=n(6949),o=n(339),i=n(9738),a=n(5162),l=n(1341),s=[],u=s.sort,c=a((function(){s.sort(void 0)})),d=a((function(){s.sort(null)})),f=l("sort");r({target:"Array",proto:!0,forced:c||!d||!f},{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),o(e))}})},3408:(e,t,n)=>{"use strict";var r=n(6949),o=n(4),i=n(6958),a=n(5256),l=n(9738),s=n(7641),u=n(56),c=n(2063),d=n(6770),f=c("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,m=Math.min,g=9007199254740991,y="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f||!p},{splice:function(e,t){var n,r,c,d,f,p,b=l(this),v=a(b.length),S=o(e,v),E=arguments.length;if(0===E?n=r=0:1===E?(n=0,r=v-S):(n=E-2,r=m(h(i(t),0),v-S)),v+n-r>g)throw TypeError(y);for(c=s(b,r),d=0;d<r;d++)(f=S+d)in b&&u(c,d,b[f]);if(c.length=r,n<r){for(d=S;d<v-r;d++)p=d+n,(f=d+r)in b?b[p]=b[f]:delete b[p];for(d=v;d>v-r+n;d--)delete b[d-1]}else if(n>r)for(d=v-r;d>S;d--)p=d+n-1,(f=d+r-1)in b?b[p]=b[f]:delete b[p];for(d=0;d<n;d++)b[d+S]=arguments[d+2];return b.length=v-r+n,c}})},1344:(e,t,n)=>{n(618)("flatMap")},1160:(e,t,n)=>{var r=n(6949),o=n(4290);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},4791:(e,t,n)=>{var r=n(9771),o=n(1922).f,i=Function.prototype,a=i.toString,l=/^\s*function ([^ (]*)/,s="name";r&&!(s in i)&&o(i,s,{configurable:!0,get:function(){try{return a.call(this).match(l)[1]}catch(e){return""}}})},5607:(e,t,n)=>{n(6949)({global:!0},{globalThis:n(9658)})},8698:(e,t,n)=>{var r=n(6949),o=n(1757),i=n(5162),a=o("JSON","stringify"),l=/[\uD800-\uDFFF]/g,s=/^[\uD800-\uDBFF]$/,u=/^[\uDC00-\uDFFF]$/,c=function(e,t,n){var r=n.charAt(t-1),o=n.charAt(t+1);return s.test(e)&&!u.test(o)||u.test(e)&&!s.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},d=i((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:d},{stringify:function(e,t,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(l,c):r}})},6491:(e,t,n)=>{"use strict";var r=n(3147),o=n(5145);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},2388:(e,t,n)=>{"use strict";var r=n(9771),o=n(9658),i=n(1325),a=n(3557),l=n(4837),s=n(480),u=n(4301),c=n(262),d=n(5162),f=n(7289),p=n(7287).f,h=n(8533).f,m=n(1922).f,g=n(526).trim,y="Number",b=o.Number,v=b.prototype,S=s(f(v))==y,E=function(e){var t,n,r,o,i,a,l,s,u=c(e,!1);if("string"==typeof u&&u.length>2)if(43===(t=(u=g(u)).charCodeAt(0))||45===t){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+u}for(a=(i=u.slice(2)).length,l=0;l<a;l++)if((s=i.charCodeAt(l))<48||s>o)return NaN;return parseInt(i,r)}return+u};if(i(y,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var w,O=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof O&&(S?d((function(){v.valueOf.call(n)})):s(n)!=y)?u(new b(E(t)),n,O):E(t)},A=r?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),C=0;A.length>C;C++)l(b,w=A[C])&&!l(O,w)&&m(O,w,h(b,w));O.prototype=v,v.constructor=O,a(o,y,O)}},1946:(e,t,n)=>{n(6949)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},9675:(e,t,n)=>{n(6949)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},9249:(e,t,n)=>{n(6949)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},3459:(e,t,n)=>{"use strict";var r=n(6949),o=n(6958),i=n(9308),a=n(1875),l=n(5162),s=1..toFixed,u=Math.floor,c=function(e,t,n){return 0===t?n:t%2===1?c(e,t-1,n*e):c(e*e,t/2,n)};r({target:"Number",proto:!0,forced:s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!l((function(){s.call({})}))},{toFixed:function(e){var t,n,r,l,s=i(this),d=o(e),f=[0,0,0,0,0,0],p="",h="0",m=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*f[n],f[n]=r%1e7,r=u(r/1e7)},g=function(e){for(var t=6,n=0;--t>=0;)n+=f[t],f[t]=u(n/e),n=n%e*1e7},y=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==f[e]){var n=String(f[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(p="-",s=-s),s>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(s*c(2,69,1))-69)<0?s*c(2,-t,1):s/c(2,t,1),n*=4503599627370496,(t=52-t)>0){for(m(0,n),r=d;r>=7;)m(1e7,0),r-=7;for(m(c(10,r,1),0),r=t-1;r>=23;)g(1<<23),r-=23;g(1<<r),m(1,1),g(2),h=y()}else m(0,n),m(1<<-t,0),h=y()+a.call("0",d);return h=d>0?p+((l=h.length)<=d?"0."+a.call("0",d-l)+h:h.slice(0,l-d)+"."+h.slice(l-d)):p+h}})},6370:(e,t,n)=>{var r=n(6949),o=n(1223);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},3025:(e,t,n)=>{var r=n(6949),o=n(4275).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},5937:(e,t,n)=>{var r=n(6949),o=n(5554),i=n(5162),a=n(5303),l=n(3751).onFreeze,s=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){s(1)})),sham:!o},{freeze:function(e){return s&&a(e)?s(l(e)):e}})},1712:(e,t,n)=>{var r=n(6949),o=n(151),i=n(56);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),{AS_ENTRIES:!0}),t}})},5513:(e,t,n)=>{var r=n(6949),o=n(5162),i=n(8888),a=n(8533).f,l=n(9771),s=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!l||s,sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},5302:(e,t,n)=>{var r=n(6949),o=n(9771),i=n(3577),a=n(8888),l=n(8533),s=n(56);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=l.f,u=i(r),c={},d=0;u.length>d;)void 0!==(n=o(r,t=u[d++]))&&s(c,t,n);return c}})},9540:(e,t,n)=>{var r=n(6949),o=n(5162),i=n(9738),a=n(220),l=n(3026);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!l},{getPrototypeOf:function(e){return a(i(e))}})},4042:(e,t,n)=>{var r=n(6949),o=n(9738),i=n(8801);r({target:"Object",stat:!0,forced:n(5162)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},1665:(e,t,n)=>{n(6949)({target:"Object",stat:!0},{setPrototypeOf:n(8252)})},8132:(e,t,n)=>{var r=n(6563),o=n(3557),i=n(7856);r||o(Object.prototype,"toString",i,{unsafe:!0})},8627:(e,t,n)=>{var r=n(6949),o=n(4275).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},6565:(e,t,n)=>{var r=n(6949),o=n(6584);r({global:!0,forced:parseInt!=o},{parseInt:o})},1437:(e,t,n)=>{"use strict";var r=n(6949),o=n(4856),i=n(9315),a=n(5162),l=n(1757),s=n(5613),u=n(7569),c=n(3557);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=s(this,l("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),o||"function"!=typeof i||i.prototype.finally||c(i.prototype,"finally",l("Promise").prototype.finally)},9816:(e,t,n)=>{"use strict";var r,o,i,a,l=n(6949),s=n(4856),u=n(9658),c=n(1757),d=n(9315),f=n(3557),p=n(5267),h=n(3114),m=n(965),g=n(5303),y=n(339),b=n(1438),v=n(2423),S=n(151),E=n(2138),w=n(5613),O=n(4906).set,A=n(8486),C=n(7569),T=n(1521),D=n(3987),x=n(649),P=n(1461),M=n(1325),I=n(8374),R=n(4928),L=n(3483),k=I("species"),j="Promise",_=P.get,F=P.set,N=P.getterFor(j),B=d,U=u.TypeError,H=u.document,V=u.process,q=c("fetch"),W=D.f,z=W,Q=!!(H&&H.createEvent&&u.dispatchEvent),G="function"==typeof PromiseRejectionEvent,$="unhandledrejection",K=M(j,(function(){if(!(v(B)!==String(B))){if(66===L)return!0;if(!R&&!G)return!0}if(s&&!B.prototype.finally)return!0;if(L>=51&&/native code/.test(B))return!1;var e=B.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[k]=t,!(e.then((function(){}))instanceof t)})),Y=K||!E((function(e){B.all(e).catch((function(){}))})),J=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;A((function(){for(var r=e.value,o=1==e.state,i=0;n.length>i;){var a,l,s,u=n[i++],c=o?u.ok:u.fail,d=u.resolve,f=u.reject,p=u.domain;try{c?(o||(2===e.rejection&&ne(e),e.rejection=1),!0===c?a=r:(p&&p.enter(),a=c(r),p&&(p.exit(),s=!0)),a===u.promise?f(U("Promise-chain cycle")):(l=J(a))?l.call(a,d,f):d(a)):f(r)}catch(h){p&&!s&&p.exit(),f(h)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ee(e)}))}},Z=function(e,t,n){var r,o;Q?((r=H.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!G&&(o=u["on"+e])?o(r):e===$&&T("Unhandled promise rejection",n)},ee=function(e){O.call(u,(function(){var t,n=e.facade,r=e.value;if(te(e)&&(t=x((function(){R?V.emit("unhandledRejection",r,n):Z($,n,r)})),e.rejection=R||te(e)?2:1,t.error))throw t.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e){O.call(u,(function(){var t=e.facade;R?V.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},re=function(e,t,n){return function(r){e(t,r,n)}},oe=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,X(e,!0))},ie=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw U("Promise can't be resolved itself");var r=J(t);r?A((function(){var n={done:!1};try{r.call(t,re(ie,n,e),re(oe,n,e))}catch(o){oe(n,o,e)}})):(e.value=t,e.state=1,X(e,!1))}catch(o){oe({done:!1},o,e)}}};K&&(B=function(e){b(this,B,j),y(e),r.call(this);var t=_(this);try{e(re(ie,t),re(oe,t))}catch(n){oe(t,n)}},(r=function(e){F(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(B.prototype,{then:function(e,t){var n=N(this),r=W(w(this,B));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=R?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r,t=_(e);this.promise=e,this.resolve=re(ie,t),this.reject=re(oe,t)},D.f=W=function(e){return e===B||e===i?new o(e):z(e)},s||"function"!=typeof d||(a=d.prototype.then,f(d.prototype,"then",(function(e,t){var n=this;return new B((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof q&&l({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(B,q.apply(u,arguments))}}))),l({global:!0,wrap:!0,forced:K},{Promise:B}),h(B,j,!1,!0),m(j),i=c(j),l({target:j,stat:!0,forced:K},{reject:function(e){var t=W(this);return t.reject.call(void 0,e),t.promise}}),l({target:j,stat:!0,forced:s||K},{resolve:function(e){return C(s&&this===i?B:this,e)}}),l({target:j,stat:!0,forced:Y},{all:function(e){var t=this,n=W(t),r=n.resolve,o=n.reject,i=x((function(){var n=y(t.resolve),i=[],a=0,l=1;S(e,(function(e){var s=a++,u=!1;i.push(void 0),l++,n.call(t,e).then((function(e){u||(u=!0,i[s]=e,--l||r(i))}),o)})),--l||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=W(t),r=n.reject,o=x((function(){var o=y(t.resolve);S(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},6662:(e,t,n)=>{var r=n(6949),o=n(1757),i=n(339),a=n(1778),l=n(5303),s=n(7289),u=n(3389),c=n(5162),d=o("Reflect","construct"),f=c((function(){function e(){}return!(d((function(){}),[],e)instanceof e)})),p=!c((function(){d((function(){}))})),h=f||p;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!f)return d(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var o=n.prototype,c=s(l(o)?o:Object.prototype),h=Function.apply.call(e,c,t);return l(h)?h:c}})},7486:(e,t,n)=>{var r=n(6949),o=n(1778),i=n(8533).f;r({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},2378:(e,t,n)=>{var r=n(6949),o=n(9658),i=n(3114);r({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},122:(e,t,n)=>{var r=n(9771),o=n(9658),i=n(1325),a=n(4301),l=n(1922).f,s=n(7287).f,u=n(9971),c=n(7980),d=n(1374),f=n(3557),p=n(5162),h=n(1461).set,m=n(965),g=n(8374)("match"),y=o.RegExp,b=y.prototype,v=/a/g,S=/a/g,E=new y(v)!==v,w=d.UNSUPPORTED_Y;if(r&&i("RegExp",!E||w||p((function(){return S[g]=!1,y(v)!=v||y(S)==S||"/a/i"!=y(v,"i")})))){for(var O=function(e,t){var n,r=this instanceof O,o=u(e),i=void 0===t;if(!r&&o&&e.constructor===O&&i)return e;E?o&&!i&&(e=e.source):e instanceof O&&(i&&(t=c.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var l=a(E?new y(e,t):y(e,t),r?this:b,O);return w&&n&&h(l,{sticky:n}),l},A=function(e){e in O||l(O,e,{configurable:!0,get:function(){return y[e]},set:function(t){y[e]=t}})},C=s(y),T=0;C.length>T;)A(C[T++]);b.constructor=O,O.prototype=b,f(o,"RegExp",O)}m("RegExp")},8208:(e,t,n)=>{"use strict";var r=n(6949),o=n(633);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},3422:(e,t,n)=>{var r=n(9771),o=n(1374).UNSUPPORTED_Y,i=n(1922).f,a=n(1461).get,l=RegExp.prototype;r&&o&&i(RegExp.prototype,"sticky",{configurable:!0,get:function(){if(this!==l){if(this instanceof RegExp)return!!a(this).sticky;throw TypeError("Incompatible receiver, RegExp required")}}})},3983:(e,t,n)=>{"use strict";n(8208);var r=n(6949),o=n(5303),i=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},!0===t.test("abc")&&e}(),a=/./.test;r({target:"RegExp",proto:!0,forced:!i},{test:function(e){if("function"!==typeof this.exec)return a.call(this,e);var t=this.exec(e);if(null!==t&&!o(t))throw new Error("RegExp exec method returned something other than an Object or null");return!!t}})},3466:(e,t,n)=>{"use strict";var r=n(3557),o=n(1778),i=n(5162),a=n(7980),l="toString",s=RegExp.prototype,u=s.toString,c=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),d=u.name!=l;(c||d)&&r(RegExp.prototype,l,(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},9097:(e,t,n)=>{"use strict";var r=n(3147),o=n(5145);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},7466:(e,t,n)=>{"use strict";var r=n(6949),o=n(8533).f,i=n(5256),a=n(1678),l=n(4750),s=n(6818),u=n(4856),c="".endsWith,d=Math.min,f=s("endsWith");r({target:"String",proto:!0,forced:!(!u&&!f&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}())&&!f},{endsWith:function(e){var t=String(l(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),o=void 0===n?r:d(i(n),r),s=String(e);return c?c.call(t,s,o):t.slice(o-s.length,o)===s}})},4602:(e,t,n)=>{"use strict";var r=n(6949),o=n(1678),i=n(4750);r({target:"String",proto:!0,forced:!n(6818)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},1734:(e,t,n)=>{"use strict";var r=n(3501).charAt,o=n(1461),i=n(651),a="String Iterator",l=o.set,s=o.getterFor(a);i(String,"String",(function(e){l(this,{type:a,string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},9075:(e,t,n)=>{"use strict";var r=n(7631),o=n(1778),i=n(5256),a=n(4750),l=n(5299),s=n(4544);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=o(e),u=String(this);if(!a.global)return s(a,u);var c=a.unicode;a.lastIndex=0;for(var d,f=[],p=0;null!==(d=s(a,u));){var h=String(d[0]);f[p]=h,""===h&&(a.lastIndex=l(u,i(a.lastIndex),c)),p++}return 0===p?null:f}]}))},6993:(e,t,n)=>{"use strict";var r=n(6949),o=n(1917).start;r({target:"String",proto:!0,forced:n(5250)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},3857:(e,t,n)=>{"use strict";var r=n(6949),o=n(4750),i=n(9971),a=n(7980),l=n(4889),s=n(8374),u=n(4856),c=s("replace"),d=RegExp.prototype,f=Math.max,p=function(e,t,n){return n>e.length?-1:""===t?n:e.indexOf(t,n)};r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,s,h,m,g,y,b,v=o(this),S=0,E=0,w="";if(null!=e){if((n=i(e))&&!~String(o("flags"in d?e.flags:a.call(e))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(r=e[c]))return r.call(e,v,t);if(u&&n)return String(v).replace(e,t)}for(s=String(v),h=String(e),(m="function"===typeof t)||(t=String(t)),g=h.length,y=f(1,g),S=p(s,h,0);-1!==S;)b=m?String(t(h,S,s)):l(h,s,S,[],void 0,t),w+=s.slice(E,S)+b,E=S+g,S=p(s,h,S+y);return E<s.length&&(w+=s.slice(E)),w}})},1499:(e,t,n)=>{"use strict";var r=n(7631),o=n(1778),i=n(5256),a=n(6958),l=n(4750),s=n(5299),u=n(4889),c=n(4544),d=Math.max,f=Math.min;r("replace",2,(function(e,t,n,r){var p=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,h=r.REPLACE_KEEPS_$0,m=p?"$":"$0";return[function(n,r){var o=l(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!p&&h||"string"===typeof r&&-1===r.indexOf(m)){var l=n(t,e,this,r);if(l.done)return l.value}var g=o(e),y=String(this),b="function"===typeof r;b||(r=String(r));var v=g.global;if(v){var S=g.unicode;g.lastIndex=0}for(var E=[];;){var w=c(g,y);if(null===w)break;if(E.push(w),!v)break;""===String(w[0])&&(g.lastIndex=s(y,i(g.lastIndex),S))}for(var O,A="",C=0,T=0;T<E.length;T++){w=E[T];for(var D=String(w[0]),x=d(f(a(w.index),y.length),0),P=[],M=1;M<w.length;M++)P.push(void 0===(O=w[M])?O:String(O));var I=w.groups;if(b){var R=[D].concat(P,x,y);void 0!==I&&R.push(I);var L=String(r.apply(void 0,R))}else L=u(D,y,x,P,I,r);x>=C&&(A+=y.slice(C,x)+L,C=x+D.length)}return A+y.slice(C)}]}))},3137:(e,t,n)=>{"use strict";var r=n(7631),o=n(1778),i=n(4750),a=n(8925),l=n(4544);r("search",1,(function(e,t,n){return[function(t){var n=i(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=o(e),s=String(this),u=i.lastIndex;a(u,0)||(i.lastIndex=0);var c=l(i,s);return a(i.lastIndex,u)||(i.lastIndex=u),null===c?-1:c.index}]}))},3024:(e,t,n)=>{"use strict";var r=n(7631),o=n(9971),i=n(1778),a=n(4750),l=n(5613),s=n(5299),u=n(5256),c=n(4544),d=n(633),f=n(5162),p=[].push,h=Math.min,m=4294967295,g=!f((function(){return!RegExp(m,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=void 0===n?m:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!o(e))return t.call(r,e,i);for(var l,s,u,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,g=new RegExp(e.source,f+"g");(l=d.call(g,r))&&!((s=g.lastIndex)>h&&(c.push(r.slice(h,l.index)),l.length>1&&l.index<r.length&&p.apply(c,l.slice(1)),u=l[0].length,h=s,c.length>=i));)g.lastIndex===l.index&&g.lastIndex++;return h===r.length?!u&&g.test("")||c.push(""):c.push(r.slice(h)),c.length>i?c.slice(0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=void 0==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var d=i(e),f=String(this),p=l(d,RegExp),y=d.unicode,b=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(g?"y":"g"),v=new p(g?d:"^(?:"+d.source+")",b),S=void 0===o?m:o>>>0;if(0===S)return[];if(0===f.length)return null===c(v,f)?[f]:[];for(var E=0,w=0,O=[];w<f.length;){v.lastIndex=g?w:0;var A,C=c(v,g?f:f.slice(w));if(null===C||(A=h(u(v.lastIndex+(g?0:w)),f.length))===E)w=s(f,w,y);else{if(O.push(f.slice(E,w)),O.length===S)return O;for(var T=1;T<=C.length-1;T++)if(O.push(C[T]),O.length===S)return O;w=E=A}}return O.push(f.slice(E)),O}]}),!g)},5211:(e,t,n)=>{"use strict";var r=n(6949),o=n(8533).f,i=n(5256),a=n(1678),l=n(4750),s=n(6818),u=n(4856),c="".startsWith,d=Math.min,f=s("startsWith");r({target:"String",proto:!0,forced:!(!u&&!f&&!!function(){var e=o(String.prototype,"startsWith");return e&&!e.writable}())&&!f},{startsWith:function(e){var t=String(l(this));a(e);var n=i(d(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return c?c.call(t,r,n):t.slice(n,n+r.length)===r}})},9135:(e,t,n)=>{"use strict";var r=n(6949),o=n(526).trim;r({target:"String",proto:!0,forced:n(4586)("trim")},{trim:function(){return o(this)}})},7781:(e,t,n)=>{"use strict";var r=n(6949),o=n(9771),i=n(9658),a=n(4837),l=n(5303),s=n(1922).f,u=n(3498),c=i.Symbol;if(o&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var d={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new c(e):void 0===e?c():c(e);return""===e&&(d[t]=!0),t};u(f,c);var p=f.prototype=c.prototype;p.constructor=f;var h=p.toString,m="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;s(p,"description",{configurable:!0,get:function(){var e=l(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:f})}},9030:(e,t,n)=>{n(1830)("iterator")},896:(e,t,n)=>{"use strict";var r=n(6949),o=n(9658),i=n(1757),a=n(4856),l=n(9771),s=n(4545),u=n(4474),c=n(5162),d=n(4837),f=n(7729),p=n(5303),h=n(1778),m=n(9738),g=n(8888),y=n(262),b=n(2701),v=n(7289),S=n(8801),E=n(7287),w=n(2262),O=n(4255),A=n(8533),C=n(1922),T=n(3274),D=n(767),x=n(3557),P=n(1981),M=n(7493),I=n(4794),R=n(712),L=n(8374),k=n(8235),j=n(1830),_=n(3114),F=n(1461),N=n(7550).forEach,B=M("hidden"),U="Symbol",H=L("toPrimitive"),V=F.set,q=F.getterFor(U),W=Object.prototype,z=o.Symbol,Q=i("JSON","stringify"),G=A.f,$=C.f,K=w.f,Y=T.f,J=P("symbols"),X=P("op-symbols"),Z=P("string-to-symbol-registry"),ee=P("symbol-to-string-registry"),te=P("wks"),ne=o.QObject,re=!ne||!ne.prototype||!ne.prototype.findChild,oe=l&&c((function(){return 7!=v($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=G(W,t);r&&delete W[t],$(e,t,n),r&&e!==W&&$(W,t,r)}:$,ie=function(e,t){var n=J[e]=v(z.prototype);return V(n,{type:U,tag:e,description:t}),l||(n.description=t),n},ae=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},le=function(e,t,n){e===W&&le(X,t,n),h(e);var r=y(t,!0);return h(n),d(J,r)?(n.enumerable?(d(e,B)&&e[B][r]&&(e[B][r]=!1),n=v(n,{enumerable:b(0,!1)})):(d(e,B)||$(e,B,b(1,{})),e[B][r]=!0),oe(e,r,n)):$(e,r,n)},se=function(e,t){h(e);var n=g(t),r=S(n).concat(fe(n));return N(r,(function(t){l&&!ue.call(n,t)||le(e,t,n[t])})),e},ue=function(e){var t=y(e,!0),n=Y.call(this,t);return!(this===W&&d(J,t)&&!d(X,t))&&(!(n||!d(this,t)||!d(J,t)||d(this,B)&&this[B][t])||n)},ce=function(e,t){var n=g(e),r=y(t,!0);if(n!==W||!d(J,r)||d(X,r)){var o=G(n,r);return!o||!d(J,r)||d(n,B)&&n[B][r]||(o.enumerable=!0),o}},de=function(e){var t=K(g(e)),n=[];return N(t,(function(e){d(J,e)||d(I,e)||n.push(e)})),n},fe=function(e){var t=e===W,n=K(t?X:g(e)),r=[];return N(n,(function(e){!d(J,e)||t&&!d(W,e)||r.push(J[e])})),r};(s||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e),n=function(e){this===W&&n.call(X,e),d(this,B)&&d(this[B],t)&&(this[B][t]=!1),oe(this,t,b(1,e))};return l&&re&&oe(W,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return q(this).tag})),x(z,"withoutSetter",(function(e){return ie(R(e),e)})),T.f=ue,C.f=le,A.f=ce,E.f=w.f=de,O.f=fe,k.f=function(e){return ie(L(e),e)},l&&($(z.prototype,"description",{configurable:!0,get:function(){return q(this).description}}),a||x(W,"propertyIsEnumerable",ue,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:z}),N(S(te),(function(e){j(e)})),r({target:U,stat:!0,forced:!s},{for:function(e){var t=String(e);if(d(Z,t))return Z[t];var n=z(t);return Z[t]=n,ee[n]=t,n},keyFor:function(e){if(!ae(e))throw TypeError(e+" is not a symbol");if(d(ee,e))return ee[e]},useSetter:function(){re=!0},useSimple:function(){re=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!l},{create:function(e,t){return void 0===t?v(e):se(v(e),t)},defineProperty:le,defineProperties:se,getOwnPropertyDescriptor:ce}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:de,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:c((function(){O.f(1)}))},{getOwnPropertySymbols:function(e){return O.f(m(e))}}),Q)&&r({target:"JSON",stat:!0,forced:!s||c((function(){var e=z();return"[null]"!=Q([e])||"{}"!=Q({a:e})||"{}"!=Q(Object(e))}))},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(p(t)||void 0!==e)&&!ae(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ae(t))return t}),o[1]=t,Q.apply(null,o)}});z.prototype[H]||D(z.prototype,H,z.prototype.valueOf),_(z,U),I[B]=!0},6899:(e,t,n)=>{"use strict";var r=n(7479),o=n(9794),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o.call(i(this),e,t,arguments.length>2?arguments[2]:void 0)}))},7357:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},8187:(e,t,n)=>{"use strict";var r=n(7479),o=n(9851),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return o.apply(i(this),arguments)}))},7825:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).filter,i=n(5613),a=r.aTypedArray,l=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("filter",(function(e){for(var t=o(a(this),e,arguments.length>1?arguments[1]:void 0),n=i(this,this.constructor),r=0,s=t.length,u=new(l(n))(s);s>r;)u[r]=t[r++];return u}))},5480:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4307:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},6802:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},9901:(e,t,n)=>{"use strict";var r=n(7479),o=n(1194).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},5729:(e,t,n)=>{"use strict";var r=n(7479),o=n(1194).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},1543:(e,t,n)=>{"use strict";var r=n(9658),o=n(7479),i=n(4162),a=n(8374)("iterator"),l=r.Uint8Array,s=i.values,u=i.keys,c=i.entries,d=o.aTypedArray,f=o.exportTypedArrayMethod,p=l&&l.prototype[a],h=!!p&&("values"==p.name||void 0==p.name),m=function(){return s.call(d(this))};f("entries",(function(){return c.call(d(this))})),f("keys",(function(){return u.call(d(this))})),f("values",m,!h),f(a,m,!h)},274:(e,t,n)=>{"use strict";var r=n(7479),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(o(this),arguments)}))},4450:(e,t,n)=>{"use strict";var r=n(7479),o=n(823),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return o.apply(i(this),arguments)}))},4483:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).map,i=n(5613),a=r.aTypedArray,l=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(l(i(e,e.constructor)))(t)}))}))},3117:(e,t,n)=>{"use strict";var r=n(7479),o=n(7693).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},7217:(e,t,n)=>{"use strict";var r=n(7479),o=n(7693).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},4321:(e,t,n)=>{"use strict";var r=n(7479),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,n=o(t).length,r=a(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t}))},7136:(e,t,n)=>{"use strict";var r=n(7479),o=n(5256),i=n(4884),a=n(9738),l=n(5162),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(e){s(this);var t=i(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=a(e),l=o(r.length),u=0;if(l+t>n)throw RangeError("Wrong length");for(;u<l;)this[t+u]=r[u++]}),l((function(){new Int8Array(1).set({})})))},1950:(e,t,n)=>{"use strict";var r=n(7479),o=n(5613),i=n(5162),a=r.aTypedArray,l=r.aTypedArrayConstructor,s=r.exportTypedArrayMethod,u=[].slice;s("slice",(function(e,t){for(var n=u.call(a(this),e,t),r=o(this,this.constructor),i=0,s=n.length,c=new(l(r))(s);s>i;)c[i]=n[i++];return c}),i((function(){new Int8Array(1).slice()})))},299:(e,t,n)=>{"use strict";var r=n(7479),o=n(7550).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},1311:(e,t,n)=>{"use strict";var r=n(7479),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(o(this),e)}))},58:(e,t,n)=>{"use strict";var r=n(7479),o=n(5256),i=n(4),a=n(5613),l=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=l(this),r=n.length,s=i(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+s*n.BYTES_PER_ELEMENT,o((void 0===t?r:i(t,r))-s))}))},4065:(e,t,n)=>{"use strict";var r=n(9658),o=n(7479),i=n(5162),a=r.Int8Array,l=o.aTypedArray,s=o.exportTypedArrayMethod,u=[].toLocaleString,c=[].slice,d=!!a&&i((function(){u.call(new a(1))}));s("toLocaleString",(function(){return u.apply(d?c.call(l(this)):l(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},9969:(e,t,n)=>{"use strict";var r=n(7479).exportTypedArrayMethod,o=n(5162),i=n(9658).Uint8Array,a=i&&i.prototype||{},l=[].toString,s=[].join;o((function(){l.call({})}))&&(l=function(){return s.call(this)});var u=a.toString!=l;r("toString",l,u)},5984:(e,t,n)=>{n(3693)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},931:(e,t,n)=>{"use strict";var r=n(7479),o=n(5256),i=n(6958),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("at",(function(e){var t=a(this),n=o(t.length),r=i(e),l=r>=0?r:n+r;return l<0||l>=n?void 0:t[l]}))},4130:(e,t,n)=>{var r=n(9658),o=n(8284),i=n(3417),a=n(767);for(var l in o){var s=r[l],u=s&&s.prototype;if(u&&u.forEach!==i)try{a(u,"forEach",i)}catch(c){u.forEach=i}}},9792:(e,t,n)=>{var r=n(9658),o=n(8284),i=n(4162),a=n(767),l=n(8374),s=l("iterator"),u=l("toStringTag"),c=i.values;for(var d in o){var f=r[d],p=f&&f.prototype;if(p){if(p[s]!==c)try{a(p,s,c)}catch(m){p[s]=c}if(p[u]||a(p,u,d),o[d])for(var h in i)if(p[h]!==i[h])try{a(p,h,i[h])}catch(m){p[h]=i[h]}}}},1395:(e,t,n)=>{"use strict";n(4162);var r=n(6949),o=n(1757),i=n(5342),a=n(3557),l=n(5267),s=n(3114),u=n(4477),c=n(1461),d=n(1438),f=n(4837),p=n(3708),h=n(9834),m=n(1778),g=n(5303),y=n(7289),b=n(2701),v=n(7224),S=n(6819),E=n(8374),w=o("fetch"),O=o("Headers"),A=E("iterator"),C="URLSearchParams",T="URLSearchParamsIterator",D=c.set,x=c.getterFor(C),P=c.getterFor(T),M=/\+/g,I=Array(4),R=function(e){return I[e-1]||(I[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},k=function(e){var t=e.replace(M," "),n=4;try{return decodeURIComponent(t)}catch(r){for(;n;)t=t.replace(R(n--),L);return t}},j=/[!'()~]|%20/g,_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(e){return _[e]},N=function(e){return encodeURIComponent(e).replace(j,F)},B=function(e,t){if(t)for(var n,r,o=t.split("&"),i=0;i<o.length;)(n=o[i++]).length&&(r=n.split("="),e.push({key:k(r.shift()),value:k(r.join("="))}))},U=function(e){this.entries.length=0,B(this.entries,e)},H=function(e,t){if(e<t)throw TypeError("Not enough arguments")},V=u((function(e,t){D(this,{type:T,iterator:v(x(e).entries),kind:t})}),"Iterator",(function(){var e=P(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),q=function(){d(this,q,C);var e,t,n,r,o,i,a,l,s,u=arguments.length>0?arguments[0]:void 0,c=this,p=[];if(D(c,{type:C,entries:p,updateURL:function(){},updateSearchParams:U}),void 0!==u)if(g(u))if("function"===typeof(e=S(u)))for(n=(t=e.call(u)).next;!(r=n.call(t)).done;){if((a=(i=(o=v(m(r.value))).next).call(o)).done||(l=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:l.value+""})}else for(s in u)f(u,s)&&p.push({key:s,value:u[s]+""});else B(p,"string"===typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},W=q.prototype;l(W,{append:function(e,t){H(arguments.length,2);var n=x(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){H(arguments.length,1);for(var t=x(this),n=t.entries,r=e+"",o=0;o<n.length;)n[o].key===r?n.splice(o,1):o++;t.updateURL()},get:function(e){H(arguments.length,1);for(var t=x(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){H(arguments.length,1);for(var t=x(this).entries,n=e+"",r=[],o=0;o<t.length;o++)t[o].key===n&&r.push(t[o].value);return r},has:function(e){H(arguments.length,1);for(var t=x(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){H(arguments.length,1);for(var n,r=x(this),o=r.entries,i=!1,a=e+"",l=t+"",s=0;s<o.length;s++)(n=o[s]).key===a&&(i?o.splice(s--,1):(i=!0,n.value=l));i||o.push({key:a,value:l}),r.updateURL()},sort:function(){var e,t,n,r=x(this),o=r.entries,i=o.slice();for(o.length=0,n=0;n<i.length;n++){for(e=i[n],t=0;t<n;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=x(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),a(W,A,W.entries),a(W,"toString",(function(){for(var e,t=x(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(N(e.key)+"="+N(e.value));return n.join("&")}),{enumerable:!0}),s(q,C),r({global:!0,forced:!i},{URLSearchParams:q}),i||"function"!=typeof w||"function"!=typeof O||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,o=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,h(n)===C&&((r=t.headers?new O(t.headers):new O).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:b(0,String(n)),headers:b(0,r)}))),o.push(t)),w.apply(this,o)}}),e.exports={URLSearchParams:q,getState:x}},2533:(e,t,n)=>{"use strict";n(1734);var r,o=n(6949),i=n(9771),a=n(5342),l=n(9658),s=n(4378),u=n(3557),c=n(1438),d=n(4837),f=n(1223),p=n(5886),h=n(3501).codeAt,m=n(3497),g=n(3114),y=n(1395),b=n(1461),v=l.URL,S=y.URLSearchParams,E=y.getState,w=b.set,O=b.getterFor("URL"),A=Math.floor,C=Math.pow,T="Invalid scheme",D="Invalid host",x="Invalid port",P=/[A-Za-z]/,M=/[\d+-.A-Za-z]/,I=/\d/,R=/^(0x|0X)/,L=/^[0-7]+$/,k=/^\d+$/,j=/^[\dA-Fa-f]+$/,_=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,F=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,U=function(e,t){var n,r,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return D;if(!(n=V(t.slice(1,-1))))return D;e.host=n}else if(Y(e)){if(t=m(t),_.test(t))return D;if(null===(n=H(t)))return D;e.host=n}else{if(F.test(t))return D;for(n="",r=p(t),o=0;o<r.length;o++)n+=$(r[o],W);e.host=n}},H=function(e){var t,n,r,o,i,a,l,s=e.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(t=s.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=s[r]))return e;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=R.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?k:8==i?L:j).test(o))return e;a=parseInt(o,i)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=C(256,5-t))return null}else if(a>255)return null;for(l=n.pop(),r=0;r<n.length;r++)l+=n[r]*C(256,3-r);return l},V=function(e){var t,n,r,o,i,a,l,s=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&j.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!I.test(f()))return;for(;I.test(f());){if(i=parseInt(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}s[u]=256*s[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;s[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)l=s[u],s[u--]=s[c+a-1],s[c+--a]=l;else if(8!=u)return;return s},q=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=A(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},W={},z=f({},W,{" ":1,'"':1,"<":1,">":1,"`":1}),Q=f({},z,{"#":1,"?":1,"{":1,"}":1}),G=f({},Q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),$=function(e,t){var n=h(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Y=function(e){return d(K,e.scheme)},J=function(e){return""!=e.username||""!=e.password},X=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Z=function(e,t){var n;return 2==e.length&&P.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Z(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Z(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},oe={},ie={},ae={},le={},se={},ue={},ce={},de={},fe={},pe={},he={},me={},ge={},ye={},be={},ve={},Se={},Ee={},we={},Oe={},Ae=function(e,t,n,o){var i,a,l,s,u,c=n||re,f=0,h="",m=!1,g=!1,y=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(N,"")),t=t.replace(B,""),i=p(t);f<=i.length;){switch(a=i[f],c){case re:if(!a||!P.test(a)){if(n)return T;c=ie;continue}h+=a.toLowerCase(),c=oe;break;case oe:if(a&&(M.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return T;h="",c=ie,f=0;continue}if(n&&(Y(e)!=d(K,h)||"file"==h&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(Y(e)&&K[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?c=ge:Y(e)&&o&&o.scheme==e.scheme?c=ae:Y(e)?c=ce:"/"==i[f+1]?(c=le,f++):(e.cannotBeABaseURL=!0,e.path.push(""),c=Ee)}break;case ie:if(!o||o.cannotBeABaseURL&&"#"!=a)return T;if(o.cannotBeABaseURL&&"#"==a){e.scheme=o.scheme,e.path=o.path.slice(),e.query=o.query,e.fragment="",e.cannotBeABaseURL=!0,c=Oe;break}c="file"==o.scheme?ge:se;continue;case ae:if("/"!=a||"/"!=i[f+1]){c=se;continue}c=de,f++;break;case le:if("/"==a){c=fe;break}c=Se;continue;case se:if(e.scheme=o.scheme,a==r)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query;else if("/"==a||"\\"==a&&Y(e))c=ue;else if("?"==a)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query="",c=we;else{if("#"!=a){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.path.pop(),c=Se;continue}e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query,e.fragment="",c=Oe}break;case ue:if(!Y(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,c=Se;continue}c=fe}else c=de;break;case ce:if(c=de,"/"!=a||"/"!=h.charAt(f+1))continue;f++;break;case de:if("/"!=a&&"\\"!=a){c=fe;continue}break;case fe:if("@"==a){m&&(h="%40"+h),m=!0,l=p(h);for(var b=0;b<l.length;b++){var v=l[b];if(":"!=v||y){var S=$(v,G);y?e.password+=S:e.username+=S}else y=!0}h=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Y(e)){if(m&&""==h)return"Invalid authority";f-=p(h).length+1,h="",c=pe}else h+=a;break;case pe:case he:if(n&&"file"==e.scheme){c=be;continue}if(":"!=a||g){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Y(e)){if(Y(e)&&""==h)return D;if(n&&""==h&&(J(e)||null!==e.port))return;if(s=U(e,h))return s;if(h="",c=ve,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),h+=a}else{if(""==h)return D;if(s=U(e,h))return s;if(h="",c=me,n==he)return}break;case me:if(!I.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Y(e)||n){if(""!=h){var E=parseInt(h,10);if(E>65535)return x;e.port=Y(e)&&E===K[e.scheme]?null:E,h=""}if(n)return;c=ve;continue}return x}h+=a;break;case ge:if(e.scheme="file","/"==a||"\\"==a)c=ye;else{if(!o||"file"!=o.scheme){c=Se;continue}if(a==r)e.host=o.host,e.path=o.path.slice(),e.query=o.query;else if("?"==a)e.host=o.host,e.path=o.path.slice(),e.query="",c=we;else{if("#"!=a){ee(i.slice(f).join(""))||(e.host=o.host,e.path=o.path.slice(),te(e)),c=Se;continue}e.host=o.host,e.path=o.path.slice(),e.query=o.query,e.fragment="",c=Oe}}break;case ye:if("/"==a||"\\"==a){c=be;break}o&&"file"==o.scheme&&!ee(i.slice(f).join(""))&&(Z(o.path[0],!0)?e.path.push(o.path[0]):e.host=o.host),c=Se;continue;case be:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Z(h))c=Se;else if(""==h){if(e.host="",n)return;c=ve}else{if(s=U(e,h))return s;if("localhost"==e.host&&(e.host=""),n)return;h="",c=ve}continue}h+=a;break;case ve:if(Y(e)){if(c=Se,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(c=Se,"/"!=a))continue}else e.fragment="",c=Oe;else e.query="",c=we;break;case Se:if(a==r||"/"==a||"\\"==a&&Y(e)||!n&&("?"==a||"#"==a)){if(".."===(u=(u=h).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(te(e),"/"==a||"\\"==a&&Y(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&Y(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Z(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=we):"#"==a&&(e.fragment="",c=Oe)}else h+=$(a,Q);break;case Ee:"?"==a?(e.query="",c=we):"#"==a?(e.fragment="",c=Oe):a!=r&&(e.path[0]+=$(a,W));break;case we:n||"#"!=a?a!=r&&("'"==a&&Y(e)?e.query+="%27":e.query+="#"==a?"%23":$(a,W)):(e.fragment="",c=Oe);break;case Oe:a!=r&&(e.fragment+=$(a,z))}f++}},Ce=function(e){var t,n,r=c(this,Ce,"URL"),o=arguments.length>1?arguments[1]:void 0,a=String(e),l=w(r,{type:"URL"});if(void 0!==o)if(o instanceof Ce)t=O(o);else if(n=Ae(t={},String(o)))throw TypeError(n);if(n=Ae(l,a,null,t))throw TypeError(n);var s=l.searchParams=new S,u=E(s);u.updateSearchParams(l.query),u.updateURL=function(){l.query=String(s)||null},i||(r.href=De.call(r),r.origin=xe.call(r),r.protocol=Pe.call(r),r.username=Me.call(r),r.password=Ie.call(r),r.host=Re.call(r),r.hostname=Le.call(r),r.port=ke.call(r),r.pathname=je.call(r),r.search=_e.call(r),r.searchParams=Fe.call(r),r.hash=Ne.call(r))},Te=Ce.prototype,De=function(){var e=O(this),t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,l=e.query,s=e.fragment,u=t+":";return null!==o?(u+="//",J(e)&&(u+=n+(r?":"+r:"")+"@"),u+=q(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==l&&(u+="?"+l),null!==s&&(u+="#"+s),u},xe=function(){var e=O(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(r){return"null"}return"file"!=t&&Y(e)?t+"://"+q(e.host)+(null!==n?":"+n:""):"null"},Pe=function(){return O(this).scheme+":"},Me=function(){return O(this).username},Ie=function(){return O(this).password},Re=function(){var e=O(this),t=e.host,n=e.port;return null===t?"":null===n?q(t):q(t)+":"+n},Le=function(){var e=O(this).host;return null===e?"":q(e)},ke=function(){var e=O(this).port;return null===e?"":String(e)},je=function(){var e=O(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},_e=function(){var e=O(this).query;return e?"?"+e:""},Fe=function(){return O(this).searchParams},Ne=function(){var e=O(this).fragment;return e?"#"+e:""},Be=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&s(Te,{href:Be(De,(function(e){var t=O(this),n=String(e),r=Ae(t,n);if(r)throw TypeError(r);E(t.searchParams).updateSearchParams(t.query)})),origin:Be(xe),protocol:Be(Pe,(function(e){var t=O(this);Ae(t,String(e)+":",re)})),username:Be(Me,(function(e){var t=O(this),n=p(String(e));if(!X(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=$(n[r],G)}})),password:Be(Ie,(function(e){var t=O(this),n=p(String(e));if(!X(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=$(n[r],G)}})),host:Be(Re,(function(e){var t=O(this);t.cannotBeABaseURL||Ae(t,String(e),pe)})),hostname:Be(Le,(function(e){var t=O(this);t.cannotBeABaseURL||Ae(t,String(e),he)})),port:Be(ke,(function(e){var t=O(this);X(t)||(""==(e=String(e))?t.port=null:Ae(t,e,me))})),pathname:Be(je,(function(e){var t=O(this);t.cannotBeABaseURL||(t.path=[],Ae(t,e+"",ve))})),search:Be(_e,(function(e){var t=O(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Ae(t,e,we)),E(t.searchParams).updateSearchParams(t.query)})),searchParams:Be(Fe),hash:Be(Ne,(function(e){var t=O(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Ae(t,e,Oe)):t.fragment=null}))}),u(Te,"toJSON",(function(){return De.call(this)}),{enumerable:!0}),u(Te,"toString",(function(){return De.call(this)}),{enumerable:!0}),v){var Ue=v.createObjectURL,He=v.revokeObjectURL;Ue&&u(Ce,"createObjectURL",(function(e){return Ue.apply(v,arguments)})),He&&u(Ce,"revokeObjectURL",(function(e){return He.apply(v,arguments)}))}g(Ce,"URL"),o({global:!0,forced:!a,sham:!i},{URL:Ce})},9502:function(e,t,n){var r,o,i;o=[],r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,l=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,n){var l=a.URL||a.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?i(s):o(s.href)?r(e,t,n):i(s,s.target="_blank")):(s.href=l.createObjectURL(e),setTimeout((function(){l.revokeObjectURL(s.href)}),4e4),setTimeout((function(){i(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(o(e))r(e,n,a);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout((function(){i(l)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var i="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&s||l)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},c.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,f=d.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});a.saveAs=s.saveAs=s,e.exports=s},void 0===(i="function"===typeof r?r.apply(t,o):r)||(e.exports=i)},4243:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=s||u||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||a.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,a,l,s,u=0,c=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function v(e){return u=e,l=setTimeout(E,t),c?b(e):a}function S(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-u>=i}function E(){var e=h();if(S(e))return w(e);l=setTimeout(E,function(e){var n=t-(e-s);return d?p(n,i-(e-u)):n}(e))}function w(e){return l=void 0,y&&r?b(e):(r=o=void 0,a)}function O(){var e=h(),n=S(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return v(s);if(d)return l=setTimeout(E,t),b(s)}return void 0===l&&(l=setTimeout(E,t)),a}return t=g(t)||0,m(n)&&(c=!!n.leading,i=(d="maxWait"in n)?f(g(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y),O.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=s=o=l=void 0},O.flush=function(){return void 0===l?a:w(h())},O}},5488:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",i="[object GeneratorFunction]",a=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,u=l||s||Function("return this")();var c=Array.prototype,d=Function.prototype,f=Object.prototype,p=u["__core-js_shared__"],h=function(){var e=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),m=d.toString,g=f.hasOwnProperty,y=f.toString,b=RegExp("^"+m.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=c.splice,S=x(u,"Map"),E=x(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function C(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!==n&&r!==r)return o;return-1}function T(e){if(!M(e)||(t=e,h&&h in t))return!1;var t,n=function(e){var t=M(e)?y.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?b:a;return n.test(function(e){if(null!=e){try{return m.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function D(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function x(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return T(n)?n:void 0}function P(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(P.Cache||A),n}function M(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}w.prototype.clear=function(){this.__data__=E?E(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(E){var n=t[e];return n===r?void 0:n}return g.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return E?void 0!==t[e]:g.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=E&&void 0===t?r:t,this},O.prototype.clear=function(){this.__data__=[]},O.prototype.delete=function(e){var t=this.__data__,n=C(t,e);return!(n<0)&&(n==t.length-1?t.pop():v.call(t,n,1),!0)},O.prototype.get=function(e){var t=this.__data__,n=C(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return C(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,r=C(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},A.prototype.clear=function(){this.__data__={hash:new w,map:new(S||O),string:new w}},A.prototype.delete=function(e){return D(this,e).delete(e)},A.prototype.get=function(e){return D(this,e).get(e)},A.prototype.has=function(e){return D(this,e).has(e)},A.prototype.set=function(e,t){return D(this,e).set(e,t),this},P.Cache=A,e.exports=P},2069:function(e,t){var n,r,o;r=[],n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,o={},i=0,a={parse:function(n,r){var l=(r=r||{}).dynamicTyping||!1;if(E(l)&&(r.dynamicTypingFunction=l,l={}),r.dynamicTyping=l,r.transform=!!E(r.transform)&&r.transform,r.worker&&a.WORKERS_SUPPORTED){var s=function(){if(!a.WORKERS_SUPPORTED)return!1;var n,r,l=(n=t.URL||t.webkitURL||null,r=e.toString(),a.BLOB_URL||(a.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),s=new t.Worker(l);return s.onmessage=g,s.id=i++,o[s.id]=s}();return s.userStep=r.step,s.userChunk=r.chunk,s.userComplete=r.complete,s.userError=r.error,r.step=E(r.step),r.chunk=E(r.chunk),r.complete=E(r.complete),r.error=E(r.error),delete r.worker,void s.postMessage({input:n,config:r,workerId:s.id})}var p=null;return a.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),p=r.download?new u(r):new d(r)):!0===n.readable&&E(n.read)&&E(n.on)?p=new f(r):(t.File&&n instanceof File||n instanceof Object)&&(p=new c(r)),p.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",i="\r\n",l='"',s=l+l,u=!1,c=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(i=t.newline),"string"==typeof t.quoteChar&&(l=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(s=t.escapeChar+l),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(d=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var f=new RegExp(h(l),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function p(e,t,n){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var l=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(l&&r){for(var u=0;u<e.length;u++)0<u&&(a+=o),a+=m(e[u],u);0<t.length&&(a+=i)}for(var c=0;c<t.length;c++){var d=l?e.length:t[c].length,f=!1,p=l?0===Object.keys(t[c]).length:0===t[c].length;if(n&&!l&&(f="greedy"===n?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===n&&l){for(var h=[],g=0;g<d;g++){var y=s?e[g]:g;h.push(t[c][y])}f=""===h.join("").trim()}if(!f){for(var b=0;b<d;b++){0<b&&!p&&(a+=o);var v=l&&s?e[b]:b;a+=m(t[c][v],b)}c<t.length-1&&(!n||0<d&&!p)&&(a+=i)}}return a}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;d&&"string"==typeof e&&d.test(e)&&(e="'"+e,r=!0);var i=e.toString().replace(f,s);return(r=r||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(i,a.BAD_DELIMITERS)||-1<i.indexOf(o)||" "===i.charAt(0)||" "===i.charAt(i.length-1))?l+i+l:i}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!n&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=m,a.ParserHandle=p,a.NetworkStreamer=u,a.FileStreamer=c,a.StringStreamer=d,a.ReadableStreamStreamer=f,t.jQuery){var l=t.jQuery;l.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)r.push({file:this.files[o],inputElem:this,instanceConfig:l.extend({},n)})})),o(),this;function o(){if(0!==r.length){var t,n,o,s,u=r[0];if(E(e.before)){var c=e.before(u.file,u.inputElem);if("object"==typeof c){if("abort"===c.action)return t="AbortError",n=u.file,o=u.inputElem,s=c.reason,void(E(e.error)&&e.error({name:t},n,o,s));if("skip"===c.action)return void i();"object"==typeof c.config&&(u.instanceConfig=l.extend(u.instanceConfig,c.config))}else if("skip"===c)return void i()}var d=u.instanceConfig.complete;u.instanceConfig.complete=function(e){E(d)&&d(e,u.file,u.inputElem),i()},a.parse(u.file,u.instanceConfig)}else E(e.complete)&&e.complete()}function i(){r.splice(0,1),o()}}}function s(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=v(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&E(this._config.beforeFirstChunk)){var o=this._config.beforeFirstChunk(e);void 0!==o&&(e=o)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+e;this._partialLine="";var l=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=l.meta.cursor;this._finished||(this._partialLine=i.substring(s-this._baseIndex),this._baseIndex=s),l&&l.data&&(this._rowCount+=l.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:l,workerId:a.WORKER_ID,finished:u});else if(E(this._config.chunk)&&!n){if(this._config.chunk(l,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);l=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(l.data),this._completeResults.errors=this._completeResults.errors.concat(l.errors),this._completeResults.meta=l.meta),this._completed||!u||!E(this._config.complete)||l&&l.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||l&&l.meta.paused||this._nextChunk(),l}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),s.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function c(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),s.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var o=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,o)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;s.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function f(e){s.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){s.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){s.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=S((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=S((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=S((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=S((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function p(e){var t,n,r,o=Math.pow(2,53),i=-o,l=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,s=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,c=0,d=0,f=!1,p=!1,g=[],y={data:[],errors:[],meta:{}};if(E(e.step)){var b=e.step;e.step=function(t){if(y=t,O())w();else{if(w(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?n.abort():(y.data=y.data[0],b(y,u))}}}function S(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(C("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!S(e)}))),O()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;O()&&t<y.data.length;t++)y.data[t].forEach(n);y.data.splice(0,1)}else y.data.forEach(n);function n(t,n){E(e.transformHeader)&&(t=e.transformHeader(t,n)),g.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,n){var r,o=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,a=t[r];e.header&&(i=r>=g.length?"__parsed_extra":g[r]),e.transform&&(a=e.transform(a,i)),a=A(i,a),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(a)):o[i]=a}return e.header&&(r>g.length?C("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,d+n):r<g.length&&C("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+r,d+n)),o}var n=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),n=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=g),d+=n,y}()}function O(){return e.header&&0===g.length}function A(t,n){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(l.test(e)){var t=parseFloat(e);if(i<t&&t<o)return!0}return!1}(n)?parseFloat(n):s.test(n)?new Date(n):""===n?null:n):n;var r}function C(e,t,n,r){var o={type:e,code:t,message:n};void 0!==r&&(o.row=r),y.errors.push(o)}this.parse=function(o,i,l){var s=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(h(t)+"([^]*?)"+h(t),"gm"),r=(e=e.replace(n,"")).split("\r"),o=e.split("\n"),i=1<o.length&&o[0].length<r[0].length;if(1===r.length||i)return"\n";for(var a=0,l=0;l<r.length;l++)"\n"===r[l][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(o,s)),r=!1,e.delimiter)E(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var u=function(t,n,r,o,i){var l,s,u,c;i=i||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var d=0;d<i.length;d++){var f=i[d],p=0,h=0,g=0;u=void 0;for(var y=new m({comments:o,delimiter:f,newline:n,preview:10}).parse(t),b=0;b<y.data.length;b++)if(r&&S(y.data[b]))g++;else{var v=y.data[b].length;h+=v,void 0!==u?0<v&&(p+=Math.abs(v-u),u=v):u=v}0<y.data.length&&(h/=y.data.length-g),(void 0===s||p<=s)&&(void 0===c||c<h)&&1.99<h&&(s=p,l=f,c=h)}return{successful:!!(e.delimiter=l),bestDelimiter:l}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var c=v(e);return e.preview&&e.header&&c.preview++,t=o,n=new m(c),y=n.parse(t,i,l),w(),f?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=E(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,n.abort(),y.meta.aborted=!0,E(e.complete)&&e.complete(y),t=""}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,n=(e=e||{}).delimiter,r=e.newline,o=e.comments,i=e.step,l=e.preview,s=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=","),o===n)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<a.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var c=0,d=!1;this.parse=function(a,f,p){if("string"!=typeof a)throw new Error("Input must be a string");var m=a.length,g=n.length,y=r.length,b=o.length,v=E(i),S=[],w=[],O=[],A=c=0;if(!a)return Q();if(e.header&&!f){var C=a.split(r)[0].split(n),T=[],D={},x=!1;for(var P in C){var M=C[P];E(e.transformHeader)&&(M=e.transformHeader(M,P));var I=M,R=D[M]||0;for(0<R&&(x=!0,I=M+"_"+R),D[M]=R+1;T.includes(I);)I=I+"_"+R;T.push(I)}if(x){var L=a.split(r);L[0]=T.join(n),a=L.join(r)}}if(s||!1!==s&&-1===a.indexOf(t)){for(var k=a.split(r),j=0;j<k.length;j++){if(O=k[j],c+=O.length,j!==k.length-1)c+=r.length;else if(p)return Q();if(!o||O.substring(0,b)!==o){if(v){if(S=[],V(O.split(n)),G(),d)return Q()}else V(O.split(n));if(l&&l<=j)return S=S.slice(0,l),Q(!0)}}return Q()}for(var _=a.indexOf(n,c),F=a.indexOf(r,c),N=new RegExp(h(u)+h(t),"g"),B=a.indexOf(t,c);;)if(a[c]!==t)if(o&&0===O.length&&a.substring(c,c+b)===o){if(-1===F)return Q();c=F+y,F=a.indexOf(r,c),_=a.indexOf(n,c)}else if(-1!==_&&(_<F||-1===F))O.push(a.substring(c,_)),c=_+g,_=a.indexOf(n,c);else{if(-1===F)break;if(O.push(a.substring(c,F)),z(F+y),v&&(G(),d))return Q();if(l&&S.length>=l)return Q(!0)}else for(B=c,c++;;){if(-1===(B=a.indexOf(t,B+1)))return p||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:S.length,index:c}),W();if(B===m-1)return W(a.substring(c,B).replace(N,t));if(t!==u||a[B+1]!==u){if(t===u||0===B||a[B-1]!==u){-1!==_&&_<B+1&&(_=a.indexOf(n,B+1)),-1!==F&&F<B+1&&(F=a.indexOf(r,B+1));var U=q(-1===F?_:Math.min(_,F));if(a.substr(B+1+U,g)===n){O.push(a.substring(c,B).replace(N,t)),a[c=B+1+U+g]!==t&&(B=a.indexOf(t,c)),_=a.indexOf(n,c),F=a.indexOf(r,c);break}var H=q(F);if(a.substring(B+1+H,B+1+H+y)===r){if(O.push(a.substring(c,B).replace(N,t)),z(B+1+H+y),_=a.indexOf(n,c),B=a.indexOf(t,c),v&&(G(),d))return Q();if(l&&S.length>=l)return Q(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:S.length,index:c}),B++}}else B++}return W();function V(e){S.push(e),A=c}function q(e){var t=0;if(-1!==e){var n=a.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function W(e){return p||(void 0===e&&(e=a.substring(c)),O.push(e),c=m,V(O),v&&G()),Q()}function z(e){c=e,V(O),O=[],F=a.indexOf(r,c)}function Q(e){return{data:S,errors:w,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:A+(f||0)}}}function G(){i(Q()),S=[],w=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return c}}function g(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(E(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},i),!r);a++);delete t.results}else E(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&y(t.workerId,t.results)}function y(e,t){var n=o[e];E(n.userComplete)&&n.userComplete(t),n.terminate(),delete o[e]}function b(){throw new Error("Not implemented.")}function v(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=v(e[n]);return t}function S(e,t){return function(){e.apply(t,arguments)}}function E(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===a.WORKER_ID&&n&&(a.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=a.parse(n.input,n.config);r&&t.postMessage({workerId:a.WORKER_ID,results:r,finished:!0})}}),(u.prototype=Object.create(s.prototype)).constructor=u,(c.prototype=Object.create(s.prototype)).constructor=c,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(s.prototype)).constructor=f,a},void 0===(o="function"===typeof n?n.apply(t,r):n)||(e.exports=o)},8838:(e,t,n)=>{"use strict";var r=n(9089);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},4272:(e,t,n)=>{e.exports=n(8838)()},9089:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1960:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(I){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r=d;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=C(a,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?h:f,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",m={};function g(){}function y(){}function b(){}var v={};v[i]=function(){return this};var S=Object.getPrototypeOf,E=S&&S(S(P([])));E&&E!==n&&r.call(E,i)&&(v=E);var w=b.prototype=g.prototype=Object.create(v);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"===typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:M}}function M(){return{value:t,done:!0}}return y.prototype=w.constructor=b,b.constructor=y,y.displayName=s(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},O(A.prototype),A.prototype[a]=function(){return this},e.AsyncIterator=A,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(w),s(w,l,"Generator"),w[i]=function(){return this},w.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;D(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(n){Function("r","regeneratorRuntime = r")(t)}},7320:(e,t,n)=>{var r=document,o=r.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=n.p+"main.css",r.head.appendChild(o)},1230:t=>{"use strict";t.exports=e},8518:e=>{"use strict";e.exports=t},8156:e=>{"use strict";e.exports=n},7111:e=>{"use strict";e.exports=r},6128:e=>{"use strict";e.exports=o}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return i[e].call(n.exports,n,n.exports,l),n.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.p="./";var s={};return(()=>{"use strict";l(8208),l(9075),l(1499);l.p=function(){try{throw new Error}catch(t){var e=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(e)return e[0].replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}return"/"}()})(),(()=>{"use strict";l.r(s),l.d(s,{setup:()=>aX});var e={};l.r(e),l.d(e,{hasBrowserEnv:()=>Dj,hasStandardBrowserEnv:()=>Pj,hasStandardBrowserWebWorkerEnv:()=>Mj,navigator:()=>xj,origin:()=>Ij});l(1116);const t="undefined"===typeof window||"Deno"in window;function n(){}function r(e){return"number"===typeof e&&e>=0&&e!==1/0}function o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function i(e,t,n){return S(e)?"function"===typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function a(e,t,n){return S(e)?[{...t,queryKey:e},n]:[e||{},t]}function u(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(S(a))if(r){if(t.queryHash!==d(a,t.options))return!1}else if(!p(t.queryKey,a))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof l||t.isStale()===l)&&(("undefined"===typeof o||o===t.state.fetchStatus)&&!(i&&!i(t)))}function c(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(S(i)){if(!t.options.mutationKey)return!1;if(n){if(f(t.options.mutationKey)!==f(i))return!1}else if(!p(t.options.mutationKey,i))return!1}return("boolean"!==typeof r||"loading"===t.state.status===r)&&!(o&&!o(t))}function d(e,t){return((null==t?void 0:t.queryKeyHashFn)||f)(e)}function f(e){return JSON.stringify(e,((e,t)=>b(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function p(e,t){return h(e,t)}function h(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some((n=>!h(e[n],t[n]))))}function m(e,t){if(e===t)return e;const n=y(e)&&y(t);if(n||b(e)&&b(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let l=0;for(let s=0;s<i;s++){const r=n?s:o[s];a[r]=m(e[r],t[r]),a[r]===e[r]&&l++}return r===i&&l===r?e:a}return t}function g(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b(e){if(!v(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!v(n)&&!!n.hasOwnProperty("isPrototypeOf")}function v(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return Array.isArray(e)}function E(e){return new Promise((t=>{setTimeout(t,e)}))}function w(e){E(0).then(e)}function O(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?m(e,t):t}const A=console;const C=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()};const o=r=>{t?e.push(r):w((()=>{n(r)}))},i=()=>{const t=e;e=[],t.length&&w((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||i()}return n},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}();class T{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const D=new class extends T{constructor(){super(),this.setup=e=>{if(!t&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach((({listener:e})=>{e()}))}isFocused(){return"boolean"===typeof this.focused?this.focused:"undefined"===typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},x=["online","offline"];const P=new class extends T{constructor(){super(),this.setup=e=>{if(!t&&window.addEventListener){const t=()=>e();return x.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{x.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"===typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach((({listener:e})=>{e()}))}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}};function M(e){return Math.min(1e3*2**e,3e4)}function I(e){return"online"!==(null!=e?e:"online")||P.isOnline()}class R{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function L(e){return e instanceof R}function k(e){let t,n,r,o=!1,i=0,a=!1;const l=new Promise(((e,t)=>{n=e,r=t})),s=()=>!D.isFocused()||"always"!==e.networkMode&&!P.isOnline(),u=r=>{a||(a=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},c=n=>{a||(a=!0,null==e.onError||e.onError(n),null==t||t(),r(n))},d=()=>new Promise((n=>{t=e=>{const t=a||!s();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,a||null==e.onContinue||e.onContinue()})),f=()=>{if(a)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(u).catch((t=>{var n,r;if(a)return;const l=null!=(n=e.retry)?n:3,u=null!=(r=e.retryDelay)?r:M,p="function"===typeof u?u(i,t):u,h=!0===l||"number"===typeof l&&i<l||"function"===typeof l&&l(i,t);!o&&h?(i++,null==e.onFail||e.onFail(i,t),E(p).then((()=>{if(s())return d()})).then((()=>{o?c(t):f()}))):c(t)}))};return I(e.networkMode)?f():d().then(f),{promise:l,cancel:t=>{a||(c(new R(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?l:Promise.resolve(),cancelRetry:()=>{o=!0},continueRetry:()=>{o=!1}}}class j{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),r(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:t?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class _ extends j{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||A,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n="undefined"!==typeof t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=O(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(n).catch(n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!o(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return null==(o=this.retryer)||o.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const i=function(){if("function"===typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(i)return this.abortSignalConsumed=!0,i.signal}})};l(a);const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};var u;(l(s),null==(n=this.options.behavior)||n.onFetch(s),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=s.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(u=s.fetchOptions)?void 0:u.meta});const c=e=>{var t,n,r,o;(L(e)&&e.silent||this.dispatch({type:"error",error:e}),L(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=k({fn:s.fetchFn,abort:null==i?void 0:i.abort.bind(i),onSuccess:e=>{var t,n,r,o;"undefined"!==typeof e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(o=this.cache.config).onSettled)||r.call(o,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):c(new Error(this.queryHash+" data is undefined"))},onError:c,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:I(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return L(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),C.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}class F extends T{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const o=t.queryKey,i=null!=(r=t.queryHash)?r:d(o,t);let a=this.get(i);return a||(a=new _({cache:this,logger:e.getLogger(),queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){C.batch((()=>{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=a(e,t);return"undefined"===typeof n.exact&&(n.exact=!0),this.queries.find((e=>u(n,e)))}findAll(e,t){const[n]=a(e,t);return Object.keys(n).length>0?this.queries.filter((e=>u(n,e))):this.queries}notify(e){C.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}onFocus(){C.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){C.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}class N extends j{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||A,this.observers=[],this.state=e.state||B(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=k({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,o,i,a,l,s,u;if(!t){var c,d,f,p;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(c=(d=this.mutationCache.config).onMutate)?void 0:c.call(d,this.state.variables,this));const e=await(null==(f=(p=this.options).onMutate)?void 0:f.call(p,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const h=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,h,this.state.variables,this.state.context,this)),await(null==(o=(i=this.options).onSuccess)?void 0:o.call(i,h,this.state.variables,this.state.context)),await(null==(a=(l=this.mutationCache.config).onSettled)?void 0:a.call(l,h,null,this.state.variables,this.state.context,this)),await(null==(s=(u=this.options).onSettled)?void 0:s.call(u,h,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:h}),h}catch(w){try{var h,m,g,y,b,v,S,E;throw await(null==(h=(m=this.mutationCache.config).onError)?void 0:h.call(m,w,this.state.variables,this.state.context,this)),await(null==(g=(y=this.options).onError)?void 0:g.call(y,w,this.state.variables,this.state.context)),await(null==(b=(v=this.mutationCache.config).onSettled)?void 0:b.call(v,void 0,w,this.state.variables,this.state.context,this)),await(null==(S=(E=this.options).onSettled)?void 0:S.call(E,void 0,w,this.state.variables,this.state.context)),w}finally{this.dispatch({type:"error",error:w})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!I(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),C.batch((()=>{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function B(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class U extends T{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new N({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){C.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return"undefined"===typeof e.exact&&(e.exact=!0),this.mutations.find((t=>c(e,t)))}findAll(e){return this.mutations.filter((t=>c(e,t)))}notify(e){C.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>e.state.isPaused));return C.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(n)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function H(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const l=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,s=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,u=null==s?void 0:s.pageParam,c="forward"===(null==s?void 0:s.direction),d="backward"===(null==s?void 0:s.direction),f=(null==(i=e.state.data)?void 0:i.pages)||[],p=(null==(a=e.state.data)?void 0:a.pageParams)||[];let h=p,m=!1;const g=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),y=(e,t,n,r)=>(h=r?[t,...h]:[...h,t],r?[n,...e]:[...e,n]),b=(t,n,r,o)=>{if(m)return Promise.reject("Cancelled");if("undefined"===typeof r&&!n&&t.length)return Promise.resolve(t);const i={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var a;a=i,Object.defineProperty(a,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?m=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{m=!0})),e.signal}});const l=g(i);return Promise.resolve(l).then((e=>y(t,r,e,o)))};let v;if(f.length)if(c){const t="undefined"!==typeof u,n=t?u:V(e.options,f);v=b(f,t,n)}else if(d){const t="undefined"!==typeof u,n=t?u:q(e.options,f);v=b(f,t,n,!0)}else{h=[];const t="undefined"===typeof e.options.getNextPageParam;v=!l||!f[0]||l(f[0],0,f)?b([],t,p[0]):Promise.resolve(y([],p[0],f[0]));for(let n=1;n<f.length;n++)v=v.then((r=>{if(!l||!f[n]||l(f[n],n,f)){const o=t?p[n]:V(e.options,r);return b(r,t,o)}return Promise.resolve(y(r,p[n],f[n]))}))}else v=b([]);return v.then((e=>({pages:e,pageParams:h})))}}}}function V(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function q(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}function W(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=V(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}function z(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=q(e,t);return"undefined"!==typeof n&&null!==n&&!1!==n}}class Q{constructor(e={}){this.queryCache=e.queryCache||new F,this.mutationCache=e.mutationCache||new U,this.logger=e.logger||A,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=D.subscribe((()=>{D.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=P.subscribe((()=>{P.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=a(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=i(e,t,n),o=this.getQueryData(r.queryKey);return o?Promise.resolve(o):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.queryCache.find(e),o=function(e,t){return"function"===typeof e?e(t):e}(t,null==r?void 0:r.state.data);if("undefined"===typeof o)return;const a=i(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return C.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=a(e,t),r=this.queryCache;C.batch((()=>{r.findAll(n).forEach((e=>{r.remove(e)}))}))}resetQueries(e,t,n){const[r,o]=a(e,t,n),i=this.queryCache,l={type:"active",...r};return C.batch((()=>(i.findAll(r).forEach((e=>{e.reset()})),this.refetchQueries(l,o))))}cancelQueries(e,t,r){const[o,i={}]=a(e,t,r);"undefined"===typeof i.revert&&(i.revert=!0);const l=C.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(i)))));return Promise.all(l).then(n).catch(n)}invalidateQueries(e,t,n){const[r,o]=a(e,t,n);return C.batch((()=>{var e,t;if(this.queryCache.findAll(r).forEach((e=>{e.invalidate()})),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,o)}))}refetchQueries(e,t,r){const[o,i]=a(e,t,r),l=C.batch((()=>this.queryCache.findAll(o).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:o.refetchPage}})}))));let s=Promise.all(l).then(n);return null!=i&&i.throwOnError||(s=s.catch(n)),s}fetchQuery(e,t,n){const r=i(e,t,n),o=this.defaultQueryOptions(r);"undefined"===typeof o.retry&&(o.retry=!1);const a=this.queryCache.build(this,o);return a.isStaleByTime(o.staleTime)?a.fetch(o):Promise.resolve(a.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(n).catch(n)}fetchInfiniteQuery(e,t,n){const r=i(e,t,n);return r.behavior=H(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(n).catch(n)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>f(e)===f(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>p(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>f(e)===f(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>p(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=d(t.queryKey,t)),"undefined"===typeof t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),"undefined"===typeof t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}l(7394),l(8132),l(4042),l(896),l(2140),l(5513),l(9936),l(4130),l(5302);var G=l(8156),$=l.n(G),K=(0,G.createContext)(void 0),Y={timeout:6e4,baseURL:"/"},J={errorWithoutResponse:"Error.ErrorWithoutResponseMessage",unexpectedRequestContent:"Error.UnexpectedRequestContentMessage"},X={defaultOptions:{queries:{retry:!1,staleTime:1/0,cacheTime:0,refetchOnWindowFocus:!1},mutations:{cacheTime:0}}},Z=5e3;function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(e){return{state:{shell:e,axios:e.createAxios(te(te({},Y),{},{timeout:e.getHttpRequestTimeout()||Y.timeout,baseURL:e.resolveMgmtApiUrl()}))},actions:{i18n:function(t,n,r){return e.translate(n,r)},showModal:function(t,n,r){return e.showModal(n,r)},showToasterMessage:function(t,n){e.showToasterMessage(n)},showBanner:function(t,n,r){e.showBanner(n,r)},removeCurrentBanner:function(t){e.removeCurrentBanner()}}}}l(4263);var oe=["state","actions"];function ie(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const ae=G.createContext(void 0),le=G.createContext(!1);function se(e,t){return e||(t&&"undefined"!==typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ae),window.ReactQueryClientContext):ae)}const ue=({context:e}={})=>{const t=G.useContext(se(e,G.useContext(le)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ce=({client:e,children:t,context:n,contextSharing:r=!1})=>{G.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const o=se(n,r);return G.createElement(le.Provider,{value:!n&&r},G.createElement(o.Provider,{value:e},t))},de=function(){return null};var fe;l(4791);function pe(e,t){var n=[];return e.forEach((function(e){return n.push({name:e.name,value:e.key})})),t&&n.length<=0&&n.push({name:t.type,value:t.type}),n}const he=JSON.parse('{"Global.SaveButton":"Save","Global.CancelButton":"Cancel","OAuth2Client.ListView.NoMatchingClients":"There are no OAuth2 clients that match the search criteria","OAuth2Client.ListView.NoClients":"There are no OAuth2 clients to display","OAuth2Client.ListView.Search":"Search OAuth2 clients","OAuth2Client.ListView.NameColumn":"Name","OAuth2Client.ListView.ClientIdColumn":"Client Id","OAuth2Client.ListView.LastModifiedColumn":"Last modified","OAuth2Client.ListView.Button.Add":"Create OAuth2 client","OAuth2ClientListBlade.Header":"OAuth2 clients","OAuth2Client.DetailsView.ClientScopesSection.Title":"Service scopes","OAuth2Client.DetailsView.ClientScopesSection.EmptyMessage":"No service scopes available.","OAuth2Client.DetailsView.ClientScopesSection.SubscriptionHeading":"Subscription","OAuth2Client.DetailsView.ClientScopesSection.ServiceHeading":"Service","OAuth2Client.DetailsView.ClientScopesSection.ScopeHeading":"Scope","OAuth2Client.DetailsView.ClientScopesSection.InsightsTitle":"Custom Insights scopes","OAuth2Client.DetailsView.PropertiesSection.Title":"Properties","OAuth2Client.DetailsView.PropertiesSection.Name":"Name","OAuth2Client.DetailsView.PropertiesSection.Id":"Client ID","OAuth2Client.DetailsView.PropertiesSection.Secret":"Client secret","OAuth2Client.DetailsView.PropertiesSection.Button.ShowSecret":"Show secret","OAuth2Client.DetailsView.PropertiesSection.LastModified":"Last modified","OAuth2Client.DetailsView.Form.Validation.AtLeastOneScope":"Select at least one service scope","OAuth2Client.DetailsView.Form.Validation.New.SecretMinLength":"Enter a secret which has at least 8 characters. If you leave the field empty, the secret will be created by the system","OAuth2Client.DetailsView.Form.Validation.SecretMinLength":"Enter a secret which has at least 8 characters","OAuth2Client.DetailsView.Form.Validation.NameMinLength":"Enter a client name","OAuth2Client.DetailsView.Form.Validation.SecretValid":"Valid","OAuth2Client.DetailsBlade.Header":"OAuth2 client","OAuth2Client.DetailsView.MissingClient":"OAuth2 client \\"{clientId}\\" was not found.","OAuth2Client.DetailsView.Action.OpenContextMenu":"Oauth2 client actions","OAuth2Client.DetailsView.Action.New":"New","OAuth2Client.DetailsView.Action.New.SuccessToast":"Client successfully created","OAuth2Client.DetailsView.Action.Edit":"Edit","OAuth2Client.DetailsView.Action.Edit.SuccessToast":"Client successfully updated","OAuth2Client.DetailsView.Action.AccessToken":"Use access token","OAuth2Client.DetailsView.Action.Delete":"Delete","OAuth2Client.DetailsView.Action.Delete.SuccessToast":"Client successfully deleted","OAuth2Client.DeleteConfirmation.Header":"Delete OAuth2 client?","OAuth2Client.DeleteConfirmation.Message":"The action will delete the OAuth2 client below","OAuth2Client.Example.AccessExample.Description":"Following you will find examples of how to use the obtained access token to access a Bosch IoT Rollouts Service API.","OAuth2Client.Example.AccessExample.SpringDescription":"The Spring Security Framework provides an easy way to use OAuth authentication for securing Server-to-Server communication using the standardized OAuth Client Credential grant flow.","OAuth2Client.Example.AccessExample.SpringDependency":"Add the following Maven dependency to your Spring Boot application pom.xml:","OAuth2Client.Example.AccessExample.SpringProperties":"Define the configuration properties in application.properties:","OAuth2Client.Example.AccessExample.SpringConfig":"Define the Spring Beans in your @Configuration class:","OAuth2Client.Example.AccessExample.SpringRest":"Use the RestTemplate to invoke an endpoint, e.g. on Bosch IoT Rollouts","OAuth2Client.Example.FetchExample.Description":"Following you will find examples of how to fetch an access token for your client. The response body will contain the access token, which can then be used in the Authorization HTTP header for subsequent API calls, and some additional meta information such as expiration time, actually granted scopes and the token type.","OAuth2Client.Example.FetchExample.RequestLabel":"Request","OAuth2Client.Example.FetchExample.ResponseLabel":"Response","OAuth2Client.Example.CURL":"cURL","OAuth2Client.Example.Https":"HTTPS","OAuth2Client.Example.JQuery":"jQuery","OAuth2Client.Example.JS.XHR":"JS - XHR","OAuth2Client.Example.JS.Fetch":"JS - Fetch","OAuth2Client.Example.Spring":"Spring","OAuth2Client.AccessTokenBlade.Header":"Use access token","OAuth2Client.AccessTokenBlade.MissingClient":"No OAuth2 client to generate token with","OAuth2Client.AccessTokenBlade.IntroText":"You can use your OAuth2 client \xab{clientId}\xbb to create an access token for service API requests.","OAuth2Client.AccessTokenBlade.AccessToken.Header":"Test access token","OAuth2Client.AccessTokenBlade.FetchExample.Header":"Fetch access token examples","OAuth2Client.AccessTokenBlade.AccessAPIExample.Header":"Use Service API examples","OAuth2Client.TestAccessToken.Explanation":"Here is a test token created with your OAuth2 client. You can use the token to test an API call manually. Don\'t use this token in your application configuration. It will expire after {expiresIn} minutes.","OAuth2Client.ManageInsightsScope.Heading.Create":"Create custom Bosch IoT Insights scope","OAuth2Client.ManageInsightsScope.Heading.Edit":"Edit custom Bosch IoT Insights scope","OAuth2Client.ManageInsightsScope.Role.isEmpty":"Role cannot be empty","OAuth2Client.ManageInsightsScope.ProjectLabel":"Project","OAuth2Client.ManageInsightsScope.RoleLabel":"Role","OAuth2Client.ManageInsightsScope.ScopeExist":"Scope already exists","OAuth2Client.DetailsView.ClientScopesSection.InsightsProject":"Project","OAuth2Client.DetailsView.ClientScopesSection.InsightsRole":"Role","OAuth2Client.DetailsView.ClientScopesSection.InsightsDeleteColumn":"Delete custom Bosch IoT Insights scope","OAuth2Client.DeleteInsightsScopeConfirmation.Header":"Delete custom Bosch IoT Insights scope","OAuth2Client.DeleteInsightsScopeConfirmation.Message":"The action will delete the Bosch IoT Insights scope below","TextSecret.Button.Show.Label":"Show","OAuth2Page.FetchInsightsRepeatNotification":"Error occurred during loading of Insights Projects","OAuth2Page.FetchInsightsRepeat":"Try again"}');var me=function(e){e.shell.registerTranslation({en:he})};l(8382),l(6370),l(4162),l(1734),l(9792),l(1395);function ge(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ye(e){return!!e&&!!e[ot]}function be(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===it}(e)||Array.isArray(e)||!!e[rt]||!!e.constructor[rt]||Ce(e)||Te(e))}function ve(e,t,n){void 0===n&&(n=!1),0===Se(e)?(n?Object.keys:at)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function Se(e){var t=e[ot];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ce(e)?2:Te(e)?3:0}function Ee(e,t){return 2===Se(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function we(e,t){return 2===Se(e)?e.get(t):e[t]}function Oe(e,t,n){var r=Se(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function Ae(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function Ce(e){return Ze&&e instanceof Map}function Te(e){return et&&e instanceof Set}function De(e){return e.o||e.t}function xe(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=lt(e);delete t[ot];for(var n=at(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function Pe(e,t){return void 0===t&&(t=!1),Ie(e)||ye(e)||!be(e)||(Se(e)>1&&(e.set=e.add=e.clear=e.delete=Me),Object.freeze(e),t&&ve(e,(function(e,t){return Pe(t,!0)}),!0)),e}function Me(){ge(2)}function Ie(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Re(e){var t=st[e];return t||ge(18,e),t}function Le(){return Je}function ke(e,t){t&&(Re("Patches"),e.u=[],e.s=[],e.v=t)}function je(e){_e(e),e.p.forEach(Ne),e.p=null}function _e(e){e===Je&&(Je=e.l)}function Fe(e){return Je={p:[],l:Je,h:e,m:!0,_:0}}function Ne(e){var t=e[ot];0===t.i||1===t.i?t.j():t.O=!0}function Be(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||Re("ES5").S(t,e,r),r?(n[ot].P&&(je(t),ge(4)),be(e)&&(e=Ue(t,e),t.l||Ve(t,e)),t.u&&Re("Patches").M(n[ot].t,e,t.u,t.s)):e=Ue(t,n,[]),je(t),t.u&&t.v(t.u,t.s),e!==nt?e:void 0}function Ue(e,t,n){if(Ie(t))return t;var r=t[ot];if(!r)return ve(t,(function(o,i){return He(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return Ve(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=xe(r.k):r.o;ve(3===r.i?new Set(o):o,(function(t,i){return He(e,r,o,t,i,n)})),Ve(e,o,!1),n&&e.u&&Re("Patches").R(r,n,e.u,e.s)}return r.o}function He(e,t,n,r,o,i){if(ye(o)){var a=Ue(e,o,i&&t&&3!==t.i&&!Ee(t.D,r)?i.concat(r):void 0);if(Oe(n,r,a),!ye(a))return;e.m=!1}if(be(o)&&!Ie(o)){if(!e.h.F&&e._<1)return;Ue(e,o),t&&t.A.l||Ve(e,o)}}function Ve(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&Pe(t,n)}function qe(e,t){var n=e[ot];return(n?De(n):e)[t]}function We(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function Qe(e){e.o||(e.o=xe(e.t))}function Ge(e,t,n){var r=Ce(t)?Re("MapSet").N(t,n):Te(t)?Re("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Le(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=ut;n&&(o=[r],i=ct);var a=Proxy.revocable(o,i),l=a.revoke,s=a.proxy;return r.k=s,r.j=l,s}(t,n):Re("ES5").J(t,n);return(n?n.A:Le()).p.push(r),r}function $e(e){return ye(e)||ge(22,e),function e(t){if(!be(t))return t;var n,r=t[ot],o=Se(t);if(r){if(!r.P&&(r.i<4||!Re("ES5").K(r)))return r.t;r.I=!0,n=Ke(t,o),r.I=!1}else n=Ke(t,o);return ve(n,(function(t,o){r&&we(r.t,t)===o||Oe(n,t,e(o))})),3===o?new Set(n):n}(e)}function Ke(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return xe(e)}var Ye,Je,Xe="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Ze="undefined"!=typeof Map,et="undefined"!=typeof Set,tt="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,nt=Xe?Symbol.for("immer-nothing"):((Ye={})["immer-nothing"]=!0,Ye),rt=Xe?Symbol.for("immer-draftable"):"__$immer_draftable",ot=Xe?Symbol.for("immer-state"):"__$immer_state",it=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),at="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,lt=Object.getOwnPropertyDescriptors||function(e){var t={};return at(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},st={},ut={get:function(e,t){if(t===ot)return e;var n=De(e);if(!Ee(n,t))return function(e,t,n){var r,o=We(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!be(r)?r:r===qe(e.t,t)?(Qe(e),e.o[t]=Ge(e.A.h,r,e)):r},has:function(e,t){return t in De(e)},ownKeys:function(e){return Reflect.ownKeys(De(e))},set:function(e,t,n){var r=We(De(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=qe(De(e),t),i=null==o?void 0:o[ot];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(Ae(n,o)&&(void 0!==n||Ee(e.t,t)))return!0;Qe(e),ze(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==qe(e.t,t)||t in e.t?(e.D[t]=!1,Qe(e),ze(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=De(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){ge(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ge(12)}},ct={};ve(ut,(function(e,t){ct[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ct.deleteProperty=function(e,t){return ct.set.call(this,e,t,void 0)},ct.set=function(e,t,n){return ut.set.call(this,e[0],t,n,e[0])};var dt=function(){function e(e){var t=this;this.g=tt,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),l=1;l<r;l++)a[l-1]=arguments[l];return i.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&ge(6),void 0!==r&&"function"!=typeof r&&ge(7),be(e)){var l=Fe(t),s=Ge(t,e,void 0),u=!0;try{a=n(s),u=!1}finally{u?je(l):_e(l)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return ke(l,r),Be(e,l)}),(function(e){throw je(l),e})):(ke(l,r),Be(a,l))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===nt&&(a=void 0),t.F&&Pe(a,!0),r){var c=[],d=[];Re("Patches").M(e,a,c,d),r(c,d)}return a}ge(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){be(e)||ge(8),ye(e)&&(e=$e(e));var t=Fe(this),n=Ge(this,e,void 0);return n[ot].C=!0,_e(t),n},t.finishDraft=function(e,t){var n=(e&&e[ot]).A;return ke(n,t),Be(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!tt&&ge(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=Re("Patches").$;return ye(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),ft=new dt,pt=ft.produce;ft.produceWithPatches.bind(ft),ft.setAutoFreeze.bind(ft),ft.setUseProxies.bind(ft),ft.applyPatches.bind(ft),ft.createDraft.bind(ft),ft.finishDraft.bind(ft);const ht=pt;function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(e,t){return function(n){var r=n.response,o=r?"".concat(r.status," ").concat(r.data):n.message;e(St({type:t,error:o}))}}var vt={clients:{list:[],errorMessage:null,loading:!1,updating:!1,updateSuccess:!1},details:{entity:null,errorMessage:null,loading:!1,updating:!1,updateSuccess:!1},accessToken:{pending:!1,token:null,error:null}},St=function(e){return function(t){return function(e,t){return ht(e,(function(e){switch(t.type){case"clients-fetch-pending":e.clients.updateSuccess=!1,e.clients.errorMessage=null,e.clients.loading=!0;break;case"clients-fetch-fullfilled":e.clients.list=t.clients,e.clients.errorMessage=null,e.clients.loading=!1;break;case"clients-fetch-failure":e.clients.errorMessage=t.error,e.clients.loading=!1;break;case"details-fetch-pending":e.details.updateSuccess=!1,e.details.errorMessage=null,e.details.loading=!0;break;case"details-fetch-fullfilled":e.details.loading=!1,e.details.entity=t.client;break;case"details-fetch-failure":e.details.loading=!1,e.details.errorMessage=t.error;break;case"details-update-pending":e.details.errorMessage=null,e.details.updateSuccess=!1,e.details.updating=!0;break;case"details-update-fullfilled":e.details.entity=t.client,e.details.updating=!1,e.details.updateSuccess=!0;break;case"details-update-failure":e.details.errorMessage=t.error,e.details.updateSuccess=!1,e.details.updating=!1;break;case"access-token-fetch-pending":e.accessToken.pending=!0;break;case"access-token-fetch-fullfilled":e.accessToken.pending=!1,e.accessToken.token=t.token;break;case"access-token-fetch-failure":e.accessToken.pending=!1,e.accessToken.error=t.error}}))}(t,e)}};function Et(e){var t=e.createAxios(Y),n=e.getAuthBaseUrl(),r=e.getOauthTokenEndpoint();return{state:vt,actions:{getClient:function(e,r){e(St({type:"details-fetch-pending"})),t.get("".concat(n,"/api/v1/oauth2/clients/").concat(encodeURIComponent(r))).then((function(t){e(St({type:"details-fetch-fullfilled",client:t.data}))})).catch(bt(e,"details-fetch-failure"))},fetchClients:function(e){e(St({type:"clients-fetch-pending"})),t.get("".concat(n,"/api/v1/oauth2/clients")).then((function(t){e(St({type:"clients-fetch-fullfilled",clients:t.data}))})).catch(bt(e,"clients-fetch-failure"))},createClient:function(r,o){r(St({type:"details-update-pending"})),t.post("".concat(n,"/api/v1/oauth2/clients"),o).then((function(t){r(St({type:"details-update-fullfilled",client:t.data})),e.showToasterMessage(e.translate("OAuth2Client.DetailsView.Action.New.SuccessToast"))})).catch(bt(r,"details-update-failure"))},updateClient:function(r,o,i){r(St({type:"details-update-pending"})),t.put("".concat(n,"/api/v1/oauth2/clients/").concat(encodeURIComponent(o)),i).then((function(t){r(St({type:"details-update-fullfilled",client:t.data})),e.showToasterMessage(e.translate("OAuth2Client.DetailsView.Action.Edit.SuccessToast"))})).catch(bt(r,"details-update-failure"))},resetState:function(e){var t=Object.assign({},vt);e((function(e){return gt(gt({},e),t)}))},resetDetails:function(e){e((function(e){return gt(gt({},e),{},{details:vt.details})}))},deleteClient:function(r,o){r(St({type:"details-update-pending"})),t.delete("".concat(n,"/api/v1/oauth2/clients/").concat(encodeURIComponent(o))).then((function(){r(St({type:"details-update-fullfilled",client:null})),e.showToasterMessage(e.translate("OAuth2Client.DetailsView.Action.Delete.SuccessToast"))})).catch(bt(r,"details-update-failure"))},fetchAccessToken:function(e,n){e(St({type:"access-token-fetch-pending",clientId:n.clientId})),t.post(r,new URLSearchParams({grant_type:"client_credentials",client_id:n.clientId,client_secret:n.secret,scope:n.scopes||""}),{headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}}).then((function(t){e(St({type:"access-token-fetch-fullfilled",token:gt({},t.data)}))})).catch(bt(e,"access-token-fetch-failure"))}}}}l(9097),l(5937),l(7781),l(9030),l(4105),l(5150),l(8208),l(3983);function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function At(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e){return function(e){if(Array.isArray(e))return Tt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dt={rolloutsWizard:{rollout:{type:"forced",successThresholdPercentage:50,errorThresholdValue:50,errorThresholdUnits:"percentage",startType:"manual",groupDefinitionMode:"static",weight:1e3},steps:{currentStep:1,completedSteps:[],totalStepsNumber:4}}},xt=function(e){return function(t){return function(e,t){return ht(e,(function(n){switch(t.type){case"set-current-step":n.rolloutsWizard.steps.currentStep=t.stepId;break;case"set-step-completed":var r=new Set(Ct(e.rolloutsWizard.steps.completedSteps));t.isCompleted?r.add(t.stepId):r.delete(t.stepId),n.rolloutsWizard.steps.completedSteps=Ct(r);break;case"update-rollouts-wizard-data":n.rolloutsWizard.rollout=Ot(Ot({},e.rolloutsWizard.rollout),t.rollout);break;case"reset-rollouts-wizard":n.rolloutsWizard.rollout=Dt.rolloutsWizard.rollout,n.rolloutsWizard.steps=Dt.rolloutsWizard.steps;break;case"set-confirmation-flow":n.rolloutsWizard.confirmationFlowEnabled=t.confirmationFlowEnabled;break;default:throw new Error("The action handler was not implemented")}}))}(t,e)}};function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){It(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rt="rollouts:list-columns",Lt="SoftwareModuleAddModal",kt="SoftwareModuleUpdateModal",jt="SoftwareModuleFilterModal";const _t=JSON.parse('{"SoftwareModules.List.Empty":"No software modules found","SoftwareModules.Add":"Add software module","SoftwareModules.Edit":"Edit software module","SoftwareModuleListBlade.Header":"Software modules","SoftwareModuleDetailsBlade.Header":"Software module","SoftwareModuleArtifactsBlade.Header":"Artifacts","SoftwareModuleFilterModal.Header":"Select software module filter","SoftwareModuleFilterModal.Type":"Type","SoftwareModules.List.Vendor":"Vendor","SoftwareModules.List.Encrypted":"Encrypted","SoftwareModules.List.IsEncrypted":"encrypted","SoftwareModules.List.IsNotEncrypted":"not encrypted","SoftwareModuleDetailsView.ProgressMonitor.Message":"Applying changes...","SoftwareModuleDetailsView.ProgressMonitor.Headline":"Update","SoftwareModuleDetailsView.Vendor":"Vendor","SoftwareModuleDetailsView.DistributionSets":"Distribution sets","SoftwareModuleDetailsView.DistributionSets.Empty":"No distribution sets","SoftwareModuleDetailsView.Encryption":"Encryption","SoftwareModuleDetailsView.Encryption.Enabled":"Enabled","SoftwareModuleDetailsView.Encryption.Disabled":"Disabled","SoftwareModuleDetailsActions.ContextMenu.Title":"Software module actions","SoftwareModuleDetailsActions.Delete.Tooltip":"Delete software module","SoftwareModuleDetailsActions.Lock.Tooltip":"Lock software module","SoftwareModuleDetailsActions.Unlock.Tooltip":"Unlock software module","SoftwareModuleDetailsActions.Lock.Label":"Lock","SoftwareModuleDetailsActions.Unlock.Label":"Unlock","SoftwareModules.Label.Locked":"Locked","SoftwareModules.IconTooltip.Locked":"Locked","SoftwareModuleCreateModal.SuccessMessage":"Software module successfully created","SoftwareModuleCreateModal.TypesLoading":"Loading software module types","SoftwareModuleCreateModal.TypesLoadingError":"Unable to load software module types","SoftwareModuleEditModal.SuccessMessage":"Software module successfully updated","SoftwareModuleDeleteModal.Header":"Delete software module?","SoftwareModuleDeleteModal.Message":"This action will delete the software module below","SoftwareModuleDeleteModal.SuccessMessage":"Software module successfully deleted","SoftwareModuleDeleteModal.Error.Header":"The operation ended with an error","SoftwareModuleDeleteModal.Error.Close":"Close","SoftwareModuleDeleteModal.ListItem":"{softwareModule} (version: {version}, type: {type})","SoftwareModuleDialog.Header.Lock":"Lock software module","SoftwareModuleDialog.Header.Unlock":"Unlock software module","SoftwareModule.Input.AlreadyExists":"A software module with the given type, name and version already exists","SoftwareModule.Input.EnableEncryption":"Enable artifact encryption","SoftwareModule.Artifacts.Actions":"Actions","SoftwareModule.Artifacts.Actions.Delete":"Delete","SoftwareModule.Artifacts.Actions.Download":"Download","SoftwareModule.Artifacts.Filename":"File name","SoftwareModule.Artifacts.Size":"Size","SoftwareModule.Artifacts.UploadedAt":"Uploaded At","SoftwareModule.Artifacts.UploadedBy":"Uploaded By","SoftwareModule.Artifacts.Hashes.Md5":"MD5 checksum","SoftwareModule.Artifacts.Hashes.Sha1":"SHA1 checksum","SoftwareModule.Artifacts.Hashes.Sha256":"SHA256 checksum","SoftwareModule.Artifacts.Empty":"No Artifacts","SoftwareModule.Artifacts.Add.Tooltip":"Add an artifact","SoftwareModule.Artifacts.Add.Tooltip.Locked":"Artifacts adding disabled because software module is locked","SoftwareModule.Artifacts.Add.Loading.DialogHeadline":"Add artifact","SoftwareModule.Artifacts.Add.Loading.DialogMessage":"Adding an artifact..","SoftwareModule.Artifacts.Add.Error.DialogHeadline":"Error adding artifact","SoftwareModule.Artifacts.Add.Error.DialogMessage":"There was an error adding artifact \'<b>\'{artifactName}\'</b>\': \'<error>\'{error}\'</error>\'","SoftwareModule.Artifacts.Add.Error.DialogComfirmButton":"OK","SoftwareModule.Artifacts.Add.Success.ToastMesage":"Artifact successfully added","SoftwareModule.Artifacts.Deleted":"Artifact successfully deleted","SoftwareModule.Artifacts.DeleteModal.Header":"Delete artifact?","SoftwareModule.Artifacts.DeleteModal.Message":"This action will delete the artifact below","SoftwareModule.Artifacts.DeleteModal.Delete":"Delete","SoftwareModule.Artifacts.DeleteModal.Retry":"Retry","SoftwareModule.Artifacts.Download.Progress.DialogMessage":"Downloading artifact...","SoftwareModule.Artifacts.Download.Error.DialogHeadline":"Error downloading artifact","SoftwareModule.Artifacts.Download.Error.DialogMessage":"There was an error downloading artifact \'<b>\'{artifactName}\'</b>\': \'<error>\'{error}\'</error>\'"}');var Ft=l(8518);function Nt(){var e=(0,G.useContext)(K);if(void 0===e)throw new Error("context is used without a provider");return e}function Bt(){return Nt().state.axios}function Ut(){return Nt().actions.i18n}function Ht(){return Nt().actions.showModal}function Vt(){return Nt().actions.showToasterMessage}l(1960),l(9816);class qt extends T{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),Wt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zt(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zt(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),g(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&Qt(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return function(e,t,n){if(n.keepPreviousData)return!1;if(void 0!==n.placeholderData)return t.isPlaceholderData;if(!g(e.getCurrentResult(),t))return!0;return!1}(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(n)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),t||this.currentResult.isStale||!r(this.options.staleTime))return;const e=o(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!t&&!1!==this.options.enabled&&r(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||D.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,r=this.options,o=this.currentResult,i=this.currentResultState,a=this.currentResultOptions,l=e!==n,s=l?e.state:this.currentQueryInitialState,u=l?this.currentResult:this.previousQueryResult,{state:c}=e;let d,{dataUpdatedAt:f,error:p,errorUpdatedAt:h,fetchStatus:m,status:g}=c,y=!1,b=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&Wt(e,t),a=o&&Qt(e,n,t,r);(i||a)&&(m=I(e.options.networkMode)?"fetching":"paused",f||(g="loading")),"isRestoring"===t._optimisticResults&&(m="idle")}if(t.keepPreviousData&&!c.dataUpdatedAt&&null!=u&&u.isSuccess&&"error"!==g)d=u.data,f=u.dataUpdatedAt,g=u.status,y=!0;else if(t.select&&"undefined"!==typeof c.data)if(o&&c.data===(null==i?void 0:i.data)&&t.select===this.selectFn)d=this.selectResult;else try{this.selectFn=t.select,d=t.select(c.data),d=O(null==o?void 0:o.data,d,t),this.selectResult=d,this.selectError=null}catch(w){0,this.selectError=w}else d=c.data;if("undefined"!==typeof t.placeholderData&&"undefined"===typeof d&&"loading"===g){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"===typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&"undefined"!==typeof e)try{e=t.select(e),this.selectError=null}catch(w){0,this.selectError=w}"undefined"!==typeof e&&(g="success",d=O(null==o?void 0:o.data,e,t),b=!0)}this.selectError&&(p=this.selectError,d=this.selectResult,h=Date.now(),g="error");const v="fetching"===m,S="loading"===g,E="error"===g;return{status:g,fetchStatus:m,isLoading:S,isSuccess:"success"===g,isError:E,isInitialLoading:S&&v,data:d,dataUpdatedAt:f,error:p,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:v,isRefetching:v&&!S,isLoadingError:E&&0===c.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:b,isPreviousData:y,isRefetchError:E&&0!==c.dataUpdatedAt,isStale:Gt(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,g(n,t))return;this.currentResult=n;const r={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"===typeof e?e():e;if("all"===n||!n&&!this.trackedProps.size)return!0;const r=new Set(null!=n?n:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some((e=>{const n=e;return this.currentResult[n]!==t[n]&&r.has(n)}))})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||L(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){C.batch((()=>{var t,n,r,o;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(e.onError){var i,a,l,s;null==(i=(a=this.options).onError)||i.call(a,this.currentResult.error),null==(l=(s=this.options).onSettled)||l.call(s,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function Wt(e,t){return function(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&zt(e,t,t.refetchOnMount)}function zt(e,t,n){if(!1!==t.enabled){const r="function"===typeof n?n(e):n;return"always"===r||!1!==r&&Gt(e,t)}return!1}function Qt(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&Gt(e,n)}function Gt(e,t){return e.isStaleByTime(t.staleTime)}class $t extends qt{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:H()},t)}getOptimisticResult(e){return e.behavior=H(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var n,r,o,i,a,l;const{state:s}=e,u=super.createResult(e,t),{isFetching:c,isRefetching:d}=u,f=c&&"forward"===(null==(n=s.fetchMeta)||null==(r=n.fetchMore)?void 0:r.direction),p=c&&"backward"===(null==(o=s.fetchMeta)||null==(i=o.fetchMore)?void 0:i.direction);return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:W(t,null==(a=s.data)?void 0:a.pages),hasPreviousPage:z(t,null==(l=s.data)?void 0:l.pages),isFetchingNextPage:f,isFetchingPreviousPage:p,isRefetching:d&&!f&&!p}}}const Kt=l(4601).useSyncExternalStore;function Yt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Jt=G.createContext(Yt()),Xt=G.createContext(!1);Xt.Provider;function Zt(e,t){return"function"===typeof e?e(...t):!!e}function en(e,t){const n=ue({context:e.context}),r=G.useContext(Xt),o=G.useContext(Jt),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=C.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=C.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=C.batchCalls(i.onSettled)),(e=>{e.suspense&&"number"!==typeof e.staleTime&&(e.staleTime=1e3)})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,o),(e=>{G.useEffect((()=>{e.clearReset()}),[e])})(o);const[a]=G.useState((()=>new t(n,i))),l=a.getOptimisticResult(i);if(Kt(G.useCallback((e=>{const t=r?()=>{}:a.subscribe(C.batchCalls(e));return a.updateResult(),t}),[a,r]),(()=>a.getCurrentResult()),(()=>a.getCurrentResult())),G.useEffect((()=>{a.setOptions(i,{listeners:!1})}),[i,a]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,l,r))throw((e,t,n)=>t.fetchOptimistic(e).then((({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)})).catch((t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)})))(i,a,o);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Zt(n,[e.error,r]))({result:l,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return i.notifyOnChangeProps?l:a.trackResult(l)}l(1665),l(9540),l(2378),l(6662),l(6172),l(3137),l(1499),l(3857),l(7152),l(4602),l(840),l(3466),l(3024),l(8192),l(1344),l(9075),l(6736);var tn=l(1230),nn=["search"];function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cn(e,t,n){return t&&un(e.prototype,t),n&&un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fn(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pn(e,t)}function pn(e,t){return pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pn(e,t)}function hn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yn(e);if(t){var o=yn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mn(this,n)}}function mn(e,t){if(t&&("object"===rn(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gn(e)}function gn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yn(e){return yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},yn(e)}function bn(e){return e.message||e.status&&e.error&&"".concat(e.status," ").concat(e.error)||""}var vn=function(e){fn(n,e);var t=hn(n);function n(e,r){return dn(this,n),t.call(this,e,J,r,bn)}return cn(n)}(tn.AxiosApiError),Sn=function(e){fn(n,AggregateError);var t=hn(n);function n(e,r){var o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return dn(this,n),sn(gn(o=t.call(this,e,r,{cause:null})),"code",void 0),o.code=i,o}return cn(n)}();function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.escape,r=void 0===n||n,o=t.asContainsQuery,i=void 0===o||o,a=t.convertToQParam,l=e;return r&&(l=On(l)),i&&(l=An(l)),a?a(l):l}function wn(e,t){if(!e)return e;if(!e.search)return e;var n=e.search,r=ln(e,nn),o=En(n,null===t||void 0===t?void 0:t.search);return an(an({},r),{},{q:o})}function On(e){var t=e.replaceAll("\\","\\\\").replaceAll('"','\\"').replaceAll("*","\\*");return t.includes(" ")?'"'.concat(t,'"'):t}function An(e){return e.includes(" ")?'"*'.concat(e.substring(1,e.length-1),'*"'):'"*'.concat(e,'*"')}function Cn(e){var t=Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&t.push([n,e[n]+""]),t}),[]),n=new URLSearchParams(t);return n.sort(),n.toString()}function Tn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return("string"===typeof e?e:e.href).split("/rest/")[1]}function Dn(e){var t,n;return{totalCount:null!==(t=null===e||void 0===e?void 0:e.pages[e.pages.length-1].total)&&void 0!==t?t:0,entities:null!==(n=null===e||void 0===e?void 0:e.pages.flatMap((function(e){return e.content})))&&void 0!==n?n:[]}}var xn=/["'();,=!~<> ]/,Pn=/["\\]/g;function Mn(e){return e.match(xn)?'"'.concat(e.replace(Pn,"\\$&"),'"'):e}function In(e,t){var n='"*'.concat(e.replaceAll('"','\\"'),'*"');return t.map((function(e){return"".concat(e,"==").concat(n)})).join(" , ")}function Rn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(n),!0).forEach((function(t){jn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _n={limit:100};function Fn(e,t,n,r){var o,a,l,s=Ut(),u=Bt();return o=kn(kn({getNextPageParam:function(e,t){if(!t.length)return 0;var n=t.reduce((function(e,t){return e+t.size}),0);return e.total>n?n:void 0}},r),{},{queryKey:e,queryFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Rn(i,r,o,a,l,"next",e)}function l(e){Rn(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(r){var o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Cn(kn(kn(kn({},_n),n),{offset:r.pageParam})),e.prev=1,e.next=4,u.get("".concat(t,"?").concat(o));case 4:return i=e.sent,e.abrupt("return",i.data);case 8:throw e.prev=8,e.t0=e.catch(1),new vn(e.t0,s);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()}),en(i(o,a,l),$t)}class Nn extends T{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),g(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.currentMutation)||e.removeObserver(this))}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:"undefined"!==typeof e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){C.batch((()=>{var t,n,r,o;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(o=this.mutateOptions).onSettled)||r.call(o,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var i,a,l,s;null==(i=(a=this.mutateOptions).onError)||i.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(l=(s=this.mutateOptions).onSettled)||l.call(s,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)}))}))}}function Bn(e,t,n){const r=function(e,t,n){return S(e)?"function"===typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"===typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),o=ue({context:r.context}),[i]=G.useState((()=>new Nn(o,r)));G.useEffect((()=>{i.setOptions(r)}),[i,r]);const a=Kt(G.useCallback((e=>i.subscribe(C.batchCalls(e))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),l=G.useCallback(((e,t)=>{i.mutate(e,t).catch(Un)}),[i]);if(a.error&&Zt(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function Un(){}function Hn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){Wn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zn(e,t,n){var r=Ut(),o=Bt();return Bn(qn(qn({},n),{},{mutationKey:e,mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Hn(i,r,o,a,l,"next",e)}function l(e){Hn(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post(t,null!==n&&void 0!==n?n:{});case 3:return i=e.sent,e.abrupt("return",i.data);case 7:throw e.prev=7,e.t0=e.catch(0),new vn(e.t0,r);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()}))}function Qn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(e,t,n){var r=Ut(),o=Bt();return Bn($n($n({},n),{},{mutationKey:e,mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qn(i,r,o,a,l,"next",e)}function l(e){Qn(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(n){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.put(t,n);case 3:return i=e.sent,e.abrupt("return",i.data);case 7:throw e.prev=7,e.t0=e.catch(0),new vn(e.t0,r);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()}))}function Jn(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Xn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jn(i,r,o,a,l,"next",e)}function l(e){Jn(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach((function(t){tr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ut(),r=Bt();return Bn(er(er({},t),{},{mutationFn:function(){var t=Xn(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.delete(e);case 3:t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(0),new vn(t.t0,n);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}()}))}var rr=["mutate","mutateAsync","reset"];function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach((function(t){ar(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function sr(e,t,n){var r,o,i=t.headline,a=t.message,l=t.entityText,s=t.successMessage,u=Ut(),c=gr(),d=Vt(),f=nr(e,n),p=null!==(r=t.cancelLabel)&&void 0!==r?r:u("Button.Cancel"),h=null!==(o=t.confirmLabel)&&void 0!==o?o:u("Button.Delete"),m=f.mutate,g=(f.mutateAsync,f.reset),y=lr(f,rr),b=(0,G.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c("delete",(function(t){return m(void 0,ir(ir({},e),{},{onSuccess:function(){var t;d(s);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===e||void 0===e||null===(t=e.onSuccess)||void 0===t?void 0:t.call.apply(t,[e].concat(r))},onError:function(n,r,o){var i;return t(n),null===e||void 0===e||null===(i=e.onError)||void 0===i?void 0:i.call(e,n,r,o)}}))}),{variant:"warning",confirmLabel:h,cancelLabel:p,headline:i,message:a,deleteItems:l?[l]:void 0,onCancel:function(){g()}})}),[c,s,i,a,l,m,g,d,p,h]);return ir(ir({},y),{},{showConfirmation:(0,G.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return b(e)}),[b])})}var ur=function(e){return"key==".concat(e,",value==").concat(e)};function cr(e,t,n){var r=ue();return zn(t,e,{onSuccess:function(){r.resetQueries(n)}})}var dr=["showConfirmation"];function fr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function pr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(n),!0).forEach((function(t){mr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gr(){var e=Ut(),t=Ht(),n=(0,G.useCallback)((function(r,o,i,a){var l=function(e){return n(r,o,i,e)},s=t(r,hr(hr({},i),{},{variant:a?"error":null===i||void 0===i?void 0:i.variant,confirmLabel:a?e("Button.Retry"):null===i||void 0===i?void 0:i.confirmLabel,error:a,onConfirm:function(){o(l),s()},onCancel:function(){var e;s(),null===i||void 0===i||null===(e=i.onCancel)||void 0===e||e.call(i)}}))}),[e,t]);return function(e,t,r){return n(e,t,r)}}l(6208);function yr(e){return function(e){if(Array.isArray(e))return br(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return br(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vr(e,t,n){var r=(0,G.useRef)([]);return(0,G.useEffect)((function(){n&&(r.current=[])}),[n]),(0,G.useMemo)((function(){var n=yr(e),o=yr(r.current);if(t){var i=o.findIndex((function(e){return e.id===t.id}));-1===i?o.push(t):o[i]=t,r.current=o}for(var a=function(e){var t=o.findIndex((function(t){return t.id===n[e].id}));-1!==t&&(n[e]=o[t])},l=0;l<n.length;l++)a(l);return n}),[t,e])}function Sr(e,t){return e.multiSortingOrder&&t.multiSortingOrder?e.multiSortingOrder-t.multiSortingOrder:0}function Er(e,t){(0,G.useEffect)((function(){var n,r=e.filter((function(e){return e.isSorted&&e.data.sortParamName}));r.length&&(r.sort(Sr),n=function(e){return e.map((function(e){return e.isSortedDescending?"".concat(e.data.sortParamName,":DESC"):"".concat(e.data.sortParamName,":ASC")})).join(",")}(r)),t(n)}),[e,t])}var wr=e=>"checkbox"===e.type,Or=e=>e instanceof Date,Ar=e=>null==e;const Cr=e=>"object"===typeof e;var Tr=e=>!Ar(e)&&!Array.isArray(e)&&Cr(e)&&!Or(e),Dr=e=>Tr(e)&&e.target?wr(e.target)?e.target.checked:e.target.value:e,xr=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Pr="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document;function Mr(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(Pr&&(e instanceof Blob||e instanceof FileList)||!n&&!Tr(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return Tr(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=Mr(e[n]));else t=e}return t}var Ir=e=>Array.isArray(e)?e.filter(Boolean):[],Rr=e=>void 0===e,Lr=(e,t,n)=>{if(!t||!Tr(e))return n;const r=Ir(t.split(/[,[\].]+?/)).reduce(((e,t)=>Ar(e)?e:e[t]),e);return Rr(r)||r===e?Rr(e[t])?n:e[t]:r},kr=e=>"boolean"===typeof e,jr=e=>/^\w*$/.test(e),_r=e=>Ir(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Fr=(e,t,n)=>{let r=-1;const o=jr(t)?[t]:_r(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=Tr(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}if("__proto__"===t)return;e[t]=i,e=e[t]}return e};const Nr="blur",Br="focusout",Ur="change",Hr="onBlur",Vr="onChange",qr="onSubmit",Wr="onTouched",zr="all",Qr="max",Gr="min",$r="maxLength",Kr="minLength",Yr="pattern",Jr="required",Xr="validate",Zr=G.createContext(null),eo=()=>G.useContext(Zr);var to=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==zr&&(t._proxyFormState[o]=!r||zr),n&&(n[o]=!0),e[o]}});return o},no=e=>Tr(e)&&!Object.keys(e).length,ro=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return no(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!r||zr)))},oo=e=>Array.isArray(e)?e:[e],io=(e,t,n)=>!e||!t||e===t||oo(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function ao(e){const t=G.useRef(e);t.current=e,G.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var lo=e=>"string"===typeof e,so=(e,t,n,r,o)=>lo(e)?(r&&t.watch.add(e),Lr(n,e,o)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Lr(n,e)))):(r&&(t.watchAll=!0),n);function uo(e){const t=eo(),{name:n,disabled:r,control:o=t.control,shouldUnregister:i}=e,a=xr(o._names.array,n),l=function(e){const t=eo(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:a}=e||{},l=G.useRef(r);l.current=r,ao({disabled:i,subject:n._subjects.values,next:e=>{io(l.current,e.name,a)&&u(Mr(so(l.current,n._names,e.values||n._formValues,!1,o)))}});const[s,u]=G.useState(n._getWatch(r,o));return G.useEffect((()=>n._removeUnmounted())),s}({control:o,name:n,defaultValue:Lr(o._formValues,n,Lr(o._defaultValues,n,e.defaultValue)),exact:!0}),s=function(e){const t=eo(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[a,l]=G.useState(n._formState),s=G.useRef(!0),u=G.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=G.useRef(o);return c.current=o,ao({disabled:r,next:e=>s.current&&io(c.current,e.name,i)&&ro(e,u.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),G.useEffect((()=>(s.current=!0,u.current.isValid&&n._updateValid(!0),()=>{s.current=!1})),[n]),to(a,n,u.current,!1)}({control:o,name:n,exact:!0}),u=G.useRef(o.register(n,{...e.rules,value:l,...kr(e.disabled)?{disabled:e.disabled}:{}}));return G.useEffect((()=>{const e=o._options.shouldUnregister||i,t=(e,t)=>{const n=Lr(o._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=Mr(Lr(o._options.defaultValues,n));Fr(o._defaultValues,n,e),Rr(Lr(o._formValues,n))&&Fr(o._formValues,n,e)}return()=>{(a?e&&!o._state.action:e)?o.unregister(n):t(n,!1)}}),[n,o,a,i]),G.useEffect((()=>{Lr(o._fields,n)&&o._updateDisabledField({disabled:r,fields:o._fields,name:n,value:Lr(o._fields,n)._f.value})}),[r,n,o]),{field:{name:n,value:l,...kr(r)||s.disabled?{disabled:s.disabled||r}:{},onChange:G.useCallback((e=>u.current.onChange({target:{value:Dr(e),name:n},type:Ur})),[n]),onBlur:G.useCallback((()=>u.current.onBlur({target:{value:Lr(o._formValues,n),name:n},type:Nr})),[n,o]),ref:G.useCallback((e=>{const t=Lr(o._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}),[o._fields,n])},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Lr(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Lr(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Lr(s.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Lr(s.validatingFields,n)},error:{enumerable:!0,get:()=>Lr(s.errors,n)}})}}const co=e=>e.render(uo(e));var fo=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},po=e=>({isOnSubmit:!e||e===qr,isOnBlur:e===Hr,isOnChange:e===Vr,isOnAll:e===zr,isOnTouch:e===Wr}),ho=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const mo=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const n=Lr(e,o);if(n){const{_f:e,...i}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],o)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(mo(i,t))break}else if(Tr(i)&&mo(i,t))break}}};var go=(e,t,n)=>{const r=oo(Lr(e,n));return Fr(r,"root",t[n]),Fr(e,n,r),e},yo=e=>"file"===e.type,bo=e=>"function"===typeof e,vo=e=>{if(!Pr)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},So=e=>lo(e),Eo=e=>"radio"===e.type,wo=e=>e instanceof RegExp;const Oo={value:!1,isValid:!1},Ao={value:!0,isValid:!0};var Co=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Rr(e[0].attributes.value)?Rr(e[0].value)||""===e[0].value?Ao:{value:e[0].value,isValid:!0}:Ao:Oo}return Oo};const To={isValid:!1,value:null};var Do=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),To):To;function xo(e,t,n="validate"){if(So(e)||Array.isArray(e)&&e.every(So)||kr(e)&&!e)return{type:n,message:So(e)?e:"",ref:t}}var Po=e=>Tr(e)&&!wo(e)?e:{value:e,message:""},Mo=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:l,maxLength:s,minLength:u,min:c,max:d,pattern:f,validate:p,name:h,valueAsNumber:m,mount:g,disabled:y}=e._f,b=Lr(t,h);if(!g||y)return{};const v=a?a[0]:i,S=e=>{r&&v.reportValidity&&(v.setCustomValidity(kr(e)?"":e||""),v.reportValidity())},E={},w=Eo(i),O=wr(i),A=w||O,C=(m||yo(i))&&Rr(i.value)&&Rr(b)||vo(i)&&""===i.value||""===b||Array.isArray(b)&&!b.length,T=fo.bind(null,h,n,E),D=(e,t,n,r=$r,o=Kr)=>{const a=e?t:n;E[h]={type:e?r:o,message:a,ref:i,...T(e?r:o,a)}};if(o?!Array.isArray(b)||!b.length:l&&(!A&&(C||Ar(b))||kr(b)&&!b||O&&!Co(a).isValid||w&&!Do(a).isValid)){const{value:e,message:t}=So(l)?{value:!!l,message:l}:Po(l);if(e&&(E[h]={type:Jr,message:t,ref:v,...T(Jr,t)},!n))return S(t),E}if(!C&&(!Ar(c)||!Ar(d))){let e,t;const r=Po(d),o=Po(c);if(Ar(b)||isNaN(b)){const n=i.valueAsDate||new Date(b),a=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,s="week"==i.type;lo(r.value)&&b&&(e=l?a(b)>a(r.value):s?b>r.value:n>new Date(r.value)),lo(o.value)&&b&&(t=l?a(b)<a(o.value):s?b<o.value:n<new Date(o.value))}else{const n=i.valueAsNumber||(b?+b:b);Ar(r.value)||(e=n>r.value),Ar(o.value)||(t=n<o.value)}if((e||t)&&(D(!!e,r.message,o.message,Qr,Gr),!n))return S(E[h].message),E}if((s||u)&&!C&&(lo(b)||o&&Array.isArray(b))){const e=Po(s),t=Po(u),r=!Ar(e.value)&&b.length>+e.value,o=!Ar(t.value)&&b.length<+t.value;if((r||o)&&(D(r,e.message,t.message),!n))return S(E[h].message),E}if(f&&!C&&lo(b)){const{value:e,message:t}=Po(f);if(wo(e)&&!b.match(e)&&(E[h]={type:Yr,message:t,ref:i,...T(Yr,t)},!n))return S(t),E}if(p)if(bo(p)){const e=xo(await p(b,t),v);if(e&&(E[h]={...e,...T(Xr,e.message)},!n))return S(e.message),E}else if(Tr(p)){let e={};for(const r in p){if(!no(e)&&!n)break;const o=xo(await p[r](b,t),v,r);o&&(e={...o,...T(r,o.message)},S(o.message),n&&(E[h]=e))}if(!no(e)&&(E[h]={ref:v,...e},!n))return E}return S(!0),E};function Io(e,t){const n=Array.isArray(t)?t:jr(t)?[t]:_r(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Rr(e)?r++:e[t[r++]];return e}(e,n),o=n.length-1,i=n[o];return r&&delete r[i],0!==o&&(Tr(r)&&no(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!Rr(e[t]))return!1;return!0}(r))&&Io(e,n.slice(0,-1)),e}var Ro=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},Lo=e=>Ar(e)||!Cr(e);function ko(e,t){if(Lo(e)||Lo(t))return e===t;if(Or(e)&&Or(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(Or(n)&&Or(e)||Tr(n)&&Tr(e)||Array.isArray(n)&&Array.isArray(e)?!ko(n,e):n!==e)return!1}}return!0}var jo=e=>"select-multiple"===e.type,_o=e=>vo(e)&&e.isConnected,Fo=e=>{for(const t in e)if(bo(e[t]))return!0;return!1};function No(e,t={}){const n=Array.isArray(e);if(Tr(e)||n)for(const r in e)Array.isArray(e[r])||Tr(e[r])&&!Fo(e[r])?(t[r]=Array.isArray(e[r])?[]:{},No(e[r],t[r])):Ar(e[r])||(t[r]=!0);return t}function Bo(e,t,n){const r=Array.isArray(e);if(Tr(e)||r)for(const o in e)Array.isArray(e[o])||Tr(e[o])&&!Fo(e[o])?Rr(t)||Lo(n[o])?n[o]=Array.isArray(e[o])?No(e[o],[]):{...No(e[o])}:Bo(e[o],Ar(t)?{}:t[o],n[o]):n[o]=!ko(e[o],t[o]);return n}var Uo=(e,t)=>Bo(e,t,No(t)),Ho=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Rr(e)?e:t?""===e?NaN:e?+e:e:n&&lo(e)?new Date(e):r?r(e):e;function Vo(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return yo(t)?t.files:Eo(t)?Do(e.refs).value:jo(t)?[...t.selectedOptions].map((({value:e})=>e)):wr(t)?Co(e.refs).value:Ho(Rr(t.value)?e.ref.value:t.value,e)}var qo=e=>Rr(e)?e:wo(e)?e.source:Tr(e)?wo(e.value)?e.value.source:e.value:e;const Wo="AsyncFunction";function zo(e,t,n){const r=Lr(e,n);if(r||jr(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=Lr(t,r),a=Lr(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};o.pop()}return{name:n}}const Qo={mode:qr,reValidateMode:Vr,shouldFocusError:!0};function Go(e={}){let t,n={...Qo,...e},r={submitCount:0,isDirty:!1,isLoading:bo(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},o={},i=(Tr(n.defaultValues)||Tr(n.values))&&Mr(n.defaultValues||n.values)||{},a=n.shouldUnregister?{}:Mr(i),l={action:!1,mount:!1,watch:!1},s={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:Ro(),array:Ro(),state:Ro()},f=po(n.mode),p=po(n.reValidateMode),h=n.criteriaMode===zr,m=async t=>{if(!e.disabled&&(c.isValid||t)){const e=n.resolver?no((await S()).errors):await E(o,!0);e!==r.isValid&&d.state.next({isValid:e})}},g=(t,n)=>{e.disabled||!c.isValidating&&!c.validatingFields||((t||Array.from(s.mount)).forEach((e=>{e&&(n?Fr(r.validatingFields,e,n):Io(r.validatingFields,e))})),d.state.next({validatingFields:r.validatingFields,isValidating:!no(r.validatingFields)}))},y=(e,t,n,r)=>{const s=Lr(o,e);if(s){const o=Lr(a,e,Rr(n)?Lr(i,e):n);Rr(o)||r&&r.defaultChecked||t?Fr(a,e,t?o:Vo(s._f)):A(e,o),l.mount&&m()}},b=(t,n,a,l,s)=>{let u=!1,f=!1;const p={name:t};if(!e.disabled){const e=!!(Lr(o,t)&&Lr(o,t)._f&&Lr(o,t)._f.disabled);if(!a||l){c.isDirty&&(f=r.isDirty,r.isDirty=p.isDirty=w(),u=f!==p.isDirty);const o=e||ko(Lr(i,t),n);f=!(e||!Lr(r.dirtyFields,t)),o||e?Io(r.dirtyFields,t):Fr(r.dirtyFields,t,!0),p.dirtyFields=r.dirtyFields,u=u||c.dirtyFields&&f!==!o}if(a){const e=Lr(r.touchedFields,t);e||(Fr(r.touchedFields,t,a),p.touchedFields=r.touchedFields,u=u||c.touchedFields&&e!==a)}u&&s&&d.state.next(p)}return u?p:{}},v=(n,o,i,a)=>{const l=Lr(r.errors,n),s=c.isValid&&kr(o)&&r.isValid!==o;if(e.delayError&&i?(t=(e=>t=>{clearTimeout(u),u=setTimeout(e,t)})((()=>((e,t)=>{Fr(r.errors,e,t),d.state.next({errors:r.errors})})(n,i))),t(e.delayError)):(clearTimeout(u),t=null,i?Fr(r.errors,n,i):Io(r.errors,n)),(i?!ko(l,i):l)||!no(a)||s){const e={...a,...s&&kr(o)?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}},S=async e=>{g(e,!0);const t=await n.resolver(a,n.context,((e,t,n,r)=>{const o={};for(const i of e){const e=Lr(t,i);e&&Fr(o,i,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}})(e||s.mount,o,n.criteriaMode,n.shouldUseNativeValidation));return g(e),t},E=async(e,t,o={valid:!0})=>{for(const l in e){const u=e[l];if(u){const{_f:e,...d}=u;if(e){const d=s.array.has(e.name),f=u._f&&((!(i=u._f)||!i.validate)&&!!(bo(i.validate)&&i.validate.constructor.name===Wo||Tr(i.validate)&&Object.values(i.validate).find((e=>e.constructor.name===Wo))));f&&c.validatingFields&&g([l],!0);const p=await Mo(u,a,h,n.shouldUseNativeValidation&&!t,d);if(f&&c.validatingFields&&g([l]),p[e.name]&&(o.valid=!1,t))break;!t&&(Lr(p,e.name)?d?go(r.errors,p,e.name):Fr(r.errors,e.name,p[e.name]):Io(r.errors,e.name))}!no(d)&&await E(d,t,o)}}var i;return o.valid},w=(t,n)=>!e.disabled&&(t&&n&&Fr(a,t,n),!ko(M(),i)),O=(e,t,n)=>so(e,s,{...l.mount?a:Rr(t)?i:lo(e)?{[e]:t}:t},n,t),A=(e,t,n={})=>{const r=Lr(o,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&Fr(a,e,Ho(t,n)),i=vo(n.ref)&&Ar(t)?"":t,jo(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?wr(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):yo(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||d.values.next({name:e,values:{...a}})))}(n.shouldDirty||n.shouldTouch)&&b(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},C=(e,t,n)=>{for(const r in t){const i=t[r],a=`${e}.${r}`,l=Lr(o,a);(s.array.has(e)||Tr(i)||l&&!l._f)&&!Or(i)?C(a,i,n):A(a,i,n)}},T=(e,t,n={})=>{const u=Lr(o,e),f=s.array.has(e),p=Mr(t);Fr(a,e,p),f?(d.array.next({name:e,values:{...a}}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&d.state.next({name:e,dirtyFields:Uo(i,a),isDirty:w(e,p)})):!u||u._f||Ar(p)?A(e,p,n):C(e,p,n),ho(e,s)&&d.state.next({...r}),d.values.next({name:l.mount?e:void 0,values:{...a}})},D=async i=>{l.mount=!0;const u=i.target;let y=u.name,w=!0;const O=Lr(o,y),A=e=>{w=Number.isNaN(e)||Or(e)&&isNaN(e.getTime())||ko(e,Lr(a,y,e))};if(O){let l,T;const D=u.type?Vo(O._f):Dr(i),x=i.type===Nr||i.type===Br,M=!((C=O._f).mount&&(C.required||C.min||C.max||C.maxLength||C.minLength||C.pattern||C.validate))&&!n.resolver&&!Lr(r.errors,y)&&!O._f.deps||((e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e))(x,Lr(r.touchedFields,y),r.isSubmitted,p,f),I=ho(y,s,x);Fr(a,y,D),x?(O._f.onBlur&&O._f.onBlur(i),t&&t(0)):O._f.onChange&&O._f.onChange(i);const R=b(y,D,x,!1),L=!no(R)||I;if(!x&&d.values.next({name:y,type:i.type,values:{...a}}),M)return c.isValid&&("onBlur"===e.mode?x&&m():m()),L&&d.state.next({name:y,...I?{}:R});if(!x&&I&&d.state.next({...r}),n.resolver){const{errors:e}=await S([y]);if(A(D),w){const t=zo(r.errors,o,y),n=zo(e,o,t.name||y);l=n.error,y=n.name,T=no(e)}}else g([y],!0),l=(await Mo(O,a,h,n.shouldUseNativeValidation))[y],g([y]),A(D),w&&(l?T=!1:c.isValid&&(T=await E(o,!0)));w&&(O._f.deps&&P(O._f.deps),v(y,T,l,R))}var C},x=(e,t)=>{if(Lr(r.errors,t)&&e.focus)return e.focus(),1},P=async(e,t={})=>{let i,a;const l=oo(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await S(e);if(e)for(const n of e){const e=Lr(t,n);e?Fr(r.errors,n,e):Io(r.errors,n)}else r.errors=t;return t})(Rr(e)?e:l);i=no(t),a=e?!l.some((e=>Lr(t,e))):i}else e?(a=(await Promise.all(l.map((async e=>{const t=Lr(o,e);return await E(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&m()):a=i=await E(o);return d.state.next({...!lo(e)||c.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors}),t.shouldFocus&&!a&&mo(o,x,e?l:s.mount),a},M=e=>{const t={...l.mount?a:i};return Rr(e)?t:lo(e)?Lr(t,e):e.map((e=>Lr(t,e)))},I=(e,t)=>({invalid:!!Lr((t||r).errors,e),isDirty:!!Lr((t||r).dirtyFields,e),error:Lr((t||r).errors,e),isValidating:!!Lr(r.validatingFields,e),isTouched:!!Lr((t||r).touchedFields,e)}),R=(e,t,n)=>{const i=(Lr(o,e,{_f:{}})._f||{}).ref,a=Lr(r.errors,e)||{},{ref:l,message:s,type:u,...c}=a;Fr(r.errors,e,{...c,...t,ref:i}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},L=(e,t={})=>{for(const l of e?oo(e):s.mount)s.mount.delete(l),s.array.delete(l),t.keepValue||(Io(o,l),Io(a,l)),!t.keepError&&Io(r.errors,l),!t.keepDirty&&Io(r.dirtyFields,l),!t.keepTouched&&Io(r.touchedFields,l),!t.keepIsValidating&&Io(r.validatingFields,l),!n.shouldUnregister&&!t.keepDefaultValue&&Io(i,l);d.values.next({values:{...a}}),d.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&m()},k=({disabled:e,name:t,field:n,fields:r,value:o})=>{if(kr(e)&&l.mount||e){const i=e?void 0:Rr(o)?Vo(n?n._f:Lr(r,t)._f):o;Fr(a,t,i),b(t,i,!1,!1,!0)}},j=(t,r={})=>{let a=Lr(o,t);const u=kr(r.disabled)||kr(e.disabled);return Fr(o,t,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:t}},name:t,mount:!0,...r}}),s.mount.add(t),a?k({field:a,disabled:kr(r.disabled)?r.disabled:e.disabled,name:t,value:r.value}):y(t,!0,r.value),{...u?{disabled:r.disabled||e.disabled}:{},...n.progressive?{required:!!r.required,min:qo(r.min),max:qo(r.max),minLength:qo(r.minLength),maxLength:qo(r.maxLength),pattern:qo(r.pattern)}:{},name:t,onChange:D,onBlur:D,ref:e=>{if(e){j(t,r),a=Lr(o,t);const n=Rr(e.value)&&e.querySelectorAll&&e.querySelectorAll("input,select,textarea")[0]||e,l=(e=>Eo(e)||wr(e))(n),s=a._f.refs||[];if(l?s.find((e=>e===n)):n===a._f.ref)return;Fr(o,t,{_f:{...a._f,...l?{refs:[...s.filter(_o),n,...Array.isArray(Lr(i,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),y(t,!1,void 0,n)}else a=Lr(o,t,{}),a._f&&(a._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!xr(s.array,t)||!l.action)&&s.unMount.add(t)}}},_=()=>n.shouldFocusError&&mo(o,x,s.mount),F=(e,t)=>async i=>{let l;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let s=Mr(a);if(d.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await S();r.errors=e,s=t}else await E(o);if(Io(r.errors,"root"),no(r.errors)){d.state.next({errors:{}});try{await e(s,i)}catch(u){l=u}}else t&&await t({...r.errors},i),_(),setTimeout(_);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:no(r.errors)&&!l,submitCount:r.submitCount+1,errors:r.errors}),l)throw l},N=(t,n={})=>{const u=t?Mr(t):i,f=Mr(u),p=no(t),h=p?i:f;if(n.keepDefaultValues||(i=u),!n.keepValues){if(n.keepDirtyValues){const e=new Set([...s.mount,...Object.keys(Uo(i,a))]);for(const t of Array.from(e))Lr(r.dirtyFields,t)?Fr(h,t,Lr(a,t)):T(t,Lr(h,t))}else{if(Pr&&Rr(t))for(const e of s.mount){const t=Lr(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(vo(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}a=e.shouldUnregister?n.keepDefaultValues?Mr(i):{}:Mr(h),d.array.next({values:{...h}}),d.values.next({values:{...h}})}s={mount:n.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!c.isValid||!!n.keepIsValid||!!n.keepDirtyValues,l.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||ko(t,i))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&a?Uo(i,a):r.dirtyFields:n.keepDefaultValues&&t?Uo(i,t):n.keepDirty?r.dirtyFields:{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},B=(e,t)=>N(bo(e)?e(a):e,t);return{control:{register:j,unregister:L,getFieldState:I,handleSubmit:F,setError:R,_executeSchema:S,_getWatch:O,_getDirty:w,_updateValid:m,_removeUnmounted:()=>{for(const e of s.unMount){const t=Lr(o,e);t&&(t._f.refs?t._f.refs.every((e=>!_o(e))):!_o(t._f.ref))&&L(e)}s.unMount=new Set},_updateFieldArray:(t,n=[],s,u,f=!0,p=!0)=>{if(u&&s&&!e.disabled){if(l.action=!0,p&&Array.isArray(Lr(o,t))){const e=s(Lr(o,t),u.argA,u.argB);f&&Fr(o,t,e)}if(p&&Array.isArray(Lr(r.errors,t))){const e=s(Lr(r.errors,t),u.argA,u.argB);f&&Fr(r.errors,t,e),((e,t)=>{!Ir(Lr(e,t)).length&&Io(e,t)})(r.errors,t)}if(c.touchedFields&&p&&Array.isArray(Lr(r.touchedFields,t))){const e=s(Lr(r.touchedFields,t),u.argA,u.argB);f&&Fr(r.touchedFields,t,e)}c.dirtyFields&&(r.dirtyFields=Uo(i,a)),d.state.next({name:t,isDirty:w(t,n),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Fr(a,t,n)},_updateDisabledField:k,_getFieldArray:t=>Ir(Lr(l.mount?a:i,t,e.shouldUnregister?Lr(i,t,[]):[])),_reset:N,_resetDefaultValues:()=>bo(n.defaultValues)&&n.defaultValues().then((e=>{B(e,n.resetOptions),d.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{kr(e)&&(d.state.next({disabled:e}),mo(o,((t,n)=>{const r=Lr(o,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:d,_proxyFormState:c,_setErrors:e=>{r.errors=e,d.state.next({errors:r.errors,isValid:!1})},get _fields(){return o},get _formValues(){return a},get _state(){return l},set _state(e){l=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:P,register:j,handleSubmit:F,watch:(e,t)=>bo(e)?d.values.subscribe({next:n=>e(O(void 0,t),n)}):O(e,t,!0),setValue:T,getValues:M,reset:B,resetField:(e,t={})=>{Lr(o,e)&&(Rr(t.defaultValue)?T(e,Mr(Lr(i,e))):(T(e,t.defaultValue),Fr(i,e,Mr(t.defaultValue))),t.keepTouched||Io(r.touchedFields,e),t.keepDirty||(Io(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Mr(Lr(i,e))):w()),t.keepError||(Io(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e&&oo(e).forEach((e=>Io(r.errors,e))),d.state.next({errors:e?r.errors:{}})},unregister:L,setError:R,setFocus:(e,t={})=>{const n=Lr(o,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:I}}function $o(e={}){const t=G.useRef(),n=G.useRef(),[r,o]=G.useState({isDirty:!1,isValidating:!1,isLoading:bo(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:bo(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Go(e),formState:r});const i=t.current.control;return i._options=e,ao({subject:i._subjects.state,next:e=>{ro(e,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),G.useEffect((()=>i._disableForm(e.disabled)),[i,e.disabled]),G.useEffect((()=>{if(i._proxyFormState.isDirty){const e=i._getDirty();e!==r.isDirty&&i._subjects.state.next({isDirty:e})}}),[i,r.isDirty]),G.useEffect((()=>{e.values&&!ko(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,o((e=>({...e})))):i._resetDefaultValues()}),[e.values,i]),G.useEffect((()=>{e.errors&&i._setErrors(e.errors)}),[e.errors,i]),G.useEffect((()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),G.useEffect((()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})}),[e.shouldUnregister,i]),G.useEffect((()=>{t.current&&(t.current.watch=t.current.watch.bind({}))}),[r]),t.current.formState=to(r,i),t.current}l(2745),l(9135);function Ko(){return Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}function Yo(e){var t=e.register,n=e.getValues,r=e.field,o=e.label,i=e.maxSize,a=e.onChange,l=e.notificationText,s=e.notAllowedDuplicates,u=void 0===s?[]:s,c=e.validationPattern,d=e.isRequired,f=void 0!==d&&d,p=e.isDisabled,h=void 0!==p&&p,m=e.autoFocus,g=void 0!==m&&m,y=Ut(),b=(0,G.useCallback)((function(e){return!u.find((function(t){return e.trim().toLowerCase()===t.toLowerCase()}))||y("FormField.ValidationMsg.NoRepetition")}),[u,y]);return h?$().createElement(tn.LabelledSection,{header:y(o),value:String(n(r))}):$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:l},$().createElement(Ft.TextField,Ko({autoFocus:g,required:f,id:r,disabled:h,label:y(o)},t(r,{onChange:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return null===a||void 0===a?void 0:a(e.target.value)})),required:f?y("FormField.ValidationMsg.Required"):void 0,maxLength:{value:i,message:y("FormField.ValidationMsg.MaxLength",{length:i})},pattern:c,validate:function(e){return b(String(e))}}))))}var Jo=function(e){return e};function Xo(e){var t=e.useFormReturn,n=e.loading,r=e.error,o=e.onCancel,i=e.onSubmit,a=e.submit,l=void 0===a?"enter":a,s=e.isUpdate,u=void 0!==s&&s,c=e.convertError,d=void 0===c?Jo:c,f=e.createLabel,p=void 0===f?"Button.Add":f,h=e.formName,m=e.children,g=Ut(),y=t.formState,b=y.isValid,v=y.isDirty,S=t.trigger,E=t.getValues,w=(0,G.useCallback)((function(e){return"enter"===l?"Enter"===e.key:"Enter"===e.key&&e.ctrlKey}),[l]);function O(){S().then((function(e){e&&i(E())}))}return $().createElement("form",{name:h,"aria-label":h,onKeyUp:function(e){w(e)&&O()}},m,n&&$().createElement(Ft.ProgressIndicator,{id:"inviting",type:"indeterminate",value:0}),r&&$().createElement(tn.ErrorState,{error:d(r)}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:g("Button.Cancel"),onClick:function(){o()}}),$().createElement(Ft.Button,{mode:"primary",label:g(u?"Button.OK":p),disabled:!b||!v||n,onClick:function(){O()}})))}l(122),l(3422);function Zo(){return Zo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(this,arguments)}function ei(e){var t=e.i18n,n=e.register,r=e.field,o=e.label,i=e.maxSize,a=e.notificationText,l=e.isDisabled,s=void 0!==l&&l,u=(0,G.useMemo)((function(){return new RegExp("^.{0,".concat(i,"}$"))}),[i]);return $().createElement(Ft.FormField,{fieldType:"textarea",notificationType:"error",notificationText:a},$().createElement(Ft.TextArea,Zo({id:r,label:t(o),disabled:s},n(r,{pattern:{value:u,message:t("FormField.ValidationMsg.MaxLength",{length:i})}}))))}function ti(){return ti=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ti.apply(this,arguments)}function ni(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ni(Object(n),!0).forEach((function(t){oi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ii={id:0,type:"",name:"",version:"",vendor:"",description:"",createdAt:0,createdBy:"",lastModifiedAt:0,lastModifiedBy:"",encrypted:!1,deleted:!1},ai=[];function li(e){var t,n,r,o,i=e.onCancel,a=e.onSubmit,l=e.loading,s=e.error,u=e.softwareModuleTypes,c=void 0===u?ai:u,d=e.initialEntry,f=Ut(),p=(0,G.useMemo)((function(){return pe(c,d)}),[c,d]),h=$o({defaultValues:null!==d&&void 0!==d?d:ii,mode:"onChange"}),m=h.getValues,g=h.setValue,y=h.register,b=h.formState.errors,v=h.setFocus;(0,G.useEffect)((function(){""===m().type&&p.length>0&&g("type",String(p[0].value))}),[p,m,g]),(0,G.useEffect)((function(){v(void 0===d?"name":"vendor")}),[v,d]);var S=(0,G.useCallback)((function(e){return 409!==e.code?e:ri(ri({},e),{},{message:f("SoftwareModule.Input.AlreadyExists")})}),[f]);return(0,G.useEffect)((function(){var e;null===(e=document.getElementById("type"))||void 0===e||e.focus()}),[]),$().createElement(Xo,{useFormReturn:h,loading:l,error:s,onCancel:i,onSubmit:a,submit:"ctrl+enter",convertError:S,isUpdate:void 0!==d},void 0!==d?$().createElement(tn.LabelledSection,{header:f("Entity.Label.Type"),value:d.type}):$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,ti({required:!0,id:"type",label:f("Entity.Label.Type"),options:p},y("type",{required:f("FormField.ValidationMsg.Required")})))),$().createElement(Yo,{register:y,getValues:m,field:"name",label:"Entity.Label.Name",maxSize:128,notificationText:null===b||void 0===b||null===(t=b.name)||void 0===t?void 0:t.message,isRequired:!0,isDisabled:void 0!==d}),$().createElement(Yo,{register:y,getValues:m,field:"version",label:"Entity.Label.Version",maxSize:64,notificationText:null===b||void 0===b||null===(n=b.version)||void 0===n?void 0:n.message,isRequired:!0,isDisabled:void 0!==d}),$().createElement(Yo,{register:y,getValues:m,field:"vendor",label:"SoftwareModuleDetailsView.Vendor",maxSize:256,notificationText:null===b||void 0===b||null===(r=b.vendor)||void 0===r?void 0:r.message}),$().createElement(ei,{i18n:f,register:y,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===b||void 0===b||null===(o=b.description)||void 0===o?void 0:o.message}),void 0!==d?$().createElement(tn.LabelledSection,{header:f("SoftwareModuleDetailsView.Encryption")},d.encrypted?f("SoftwareModuleDetailsView.Encryption.Enabled"):f("SoftwareModuleDetailsView.Encryption.Disabled")):$().createElement(Ft.FormField,{fieldType:"toggle"},$().createElement(Ft.Toggle,ti({id:"isArtifactEncryptionEnabled",rightLabel:f("SoftwareModule.Input.EnableEncryption")},y("encrypted")))))}var si="RolloutsMetadataAddModal",ui="RolloutsMetadataUpdateModal",ci="v1/system/configs",di="v1/system/amqp",fi="v1/distributionsets",pi="v1/distributionsettypes",hi="v2/roles",mi="v1/users",gi="v1/rollouts",yi="v1/softwaremodules",bi="v1/softwaremoduletypes",vi="v1/targets",Si="v1/targettypes",Ei="v1/targettags",wi="v1/targetfilters";function Oi(e){return function(e){if(Array.isArray(e))return Ai(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Ai(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ai(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ci={all:["softwareModules"],lists:function(){return[].concat(Oi(Ci.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(Oi(Ci.lists()),[e])},details:function(){return[].concat(Oi(Ci.all),["details"])},softwareModulesDetails:function(e){return[].concat(Oi(Ci.details()),[e])},add:function(){return[].concat(Oi(Ci.all),["add"])},update:function(e){return[].concat(Oi(Ci.softwareModulesDetails(e)),["update"])},delete:function(e){return[].concat(Oi(Ci.softwareModulesDetails(e)),["delete"])},metadata:function(e){return[].concat(Oi(Ci.softwareModulesDetails(e)),["metadata"])},metadataList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_n;return[].concat(Oi(Ci.metadata(e)),[t])},metadataDelete:function(e,t){return[].concat(Oi(Ci.metadata(e)),["delete",t])},metadataUpdate:function(e,t){return[].concat(Oi(Ci.metadata(e)),["update",t])},metadataAdd:function(e){return[].concat(Oi(Ci.metadata(e)),["add"])},artifacts:function(e){return[].concat(Oi(Ci.softwareModulesDetails(e)),["artifacts"])},artifactsList:function(e){return[].concat(Oi(Ci.artifacts(e)),["list"])},artifactsDelete:function(e){return[].concat(Oi(Ci.artifacts(e)),["delete"])},artifactsAdd:function(e){return[].concat(Oi(Ci.artifacts(e)),["add"])}};function Ti(e){return function(e){if(Array.isArray(e))return Di(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Di(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xi={all:["softwareModuleTypes"],add:function(){return[].concat(Ti(xi.all),["add"])},lists:function(){return[].concat(Ti(xi.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(Ti(xi.lists()),[e])},details:function(){return[].concat(Ti(xi.all),["details"])},smtDetails:function(e){return[].concat(Ti(xi.details()),[e])},delete:function(e){return[].concat(Ti(xi.all),[e,"delete"])},update:function(e){return[].concat(Ti(xi.smtDetails(e)),["update"])}},Pi=function(e){return"name==".concat(e,",key==").concat(e,",description==").concat(e)};function Mi(e,t){var n=wn(e,{search:{convertToQParam:Pi}});return Fn(xi.list(n),bi,n,t)}function Ii(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=Ht(),i=(0,G.useRef)(null),a=zn(Ci.add(),yi),l=a.mutate,s=a.isLoading,u=a.error,c=Mi(),d=c.data,f=c.isLoading,p=c.error,h=Dn(d).entities,m=(0,G.useCallback)((function(){return o("progress",{message:n("SoftwareModuleCreateModal.TypesLoading"),noCancel:!0})}),[o,n]),g=(0,G.useCallback)((function(){o("error",{message:n("SoftwareModuleCreateModal.TypesLoadingError"),onClose:t.onCancel,noCancel:!0})}),[o,n,t.onCancel]);return(0,G.useEffect)((function(){f?i.current=m():i.current&&(i.current(),i.current=null)}),[f,m,n]),(0,G.useEffect)((function(){p&&g()}),[p,g]),$().createElement(Ft.Dialog,{dialogId:Lt,title:n("SoftwareModules.Add"),onClose:t.onCancel,modal:!0,open:!0},$().createElement(li,{onCancel:t.onCancel,onSubmit:function(e){l([{name:e.name,version:e.version,type:e.type,vendor:e.vendor,description:e.description,encrypted:e.encrypted}],{onSuccess:function(e){t.onSuccess(e[0]),r(n("SoftwareModuleCreateModal.SuccessMessage"))}})},loading:s,error:u,softwareModuleTypes:h.map((function(e){return{key:e.key,name:e.name}}))}))}function Ri(e){var t=ue();return Yn(Ci.update(e),"".concat(yi,"/").concat(e),{onSuccess:function(n){t.setQueryData(Ci.softwareModulesDetails(e),{data:n}),t.resetQueries(Ci.lists()),t.resetQueries(Ci.softwareModulesDetails(e))}})}function Li(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=Ri(t.toUpdate.id),i=o.mutate,a=o.isLoading,l=o.error;return $().createElement(Ft.Dialog,{dialogId:kt,title:n("SoftwareModules.Edit"),onClose:t.onCancel,modal:!0,open:!0},$().createElement(li,{onCancel:t.onCancel,onSubmit:function(e){return i({description:e.description,vendor:e.vendor,id:e.id},{onSuccess:function(){t.onSuccess(),r(n("SoftwareModuleEditModal.SuccessMessage"))}})},loading:a,error:l,initialEntry:t.toUpdate}))}l(1712);var ki=l(6128);function ji(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ji(Object(n),!0).forEach((function(t){Fi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ji(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ni(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Bi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ui(e){return Object.fromEntries(new URLSearchParams(e))}function Hi(){var e=(0,ki.useNavigate)(),t=(0,ki.useLocation)(),n=Ni((0,G.useState)(Ui(t.search)),2),r=n[0],o=n[1];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams;return Object.keys(e).forEach((function(n){var r,o=null===(r=e[n])||void 0===r?void 0:r.toString();void 0!==o&&o.length>0&&t.append(n,o.toString())})),t}function a(n){e(_i(_i({},t),{},{search:i(n).toString()}))}return(0,G.useEffect)((function(){o(Ui(t.search))}),[t.search,o]),{setFilters:a,removeFilter:function(e){var t=Object.assign({},r);t[e]=void 0,a(t)},currentFilter:r}}function Vi(e){var t,n=e.options,r=Ut(),o=Hi(),i=o.setFilters,a=o.currentFilter;if(!n)throw Error("Parameters are required.");var l=$o({defaultValues:a,mode:"onChange"}),s=Mi(),u=s.data,c=s.error,d=s.isLoading,f=Dn(u).entities.map((function(e){return{value:e.key,displayValue:e.name}})),p=l.control,h=l.formState;var m=(0,G.useRef)(null);return(0,G.useEffect)((function(){var e;null===(e=m.current)||void 0===e||e.focus()}),[]),$().createElement("div",{className:"rollouts_software-module-filter-modal"},$().createElement(Ft.Dialog,{variant:"info",dialogId:jt,title:r("SoftwareModuleFilterModal.Header"),onClose:n.onClose,modal:!0,open:!0,className:"suggestions-containing-modal"},$().createElement(Xo,{useFormReturn:l,onCancel:n.onClose,onSubmit:function(e){null===n||void 0===n||n.onClose(),i(e)},submit:"ctrl+enter",createLabel:"Button.Apply",loading:d,error:c},$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(t=h.errors.type)||void 0===t?void 0:t.message},$().createElement(co,{control:p,name:"type",render:function(e){var t,n=e.field,o=n.onChange,i=n.value;return $().createElement(tn.MultiDropdown,{ref:m,labels:{fieldName:r("SoftwareModuleFilterModal.Type")},options:f,selected:null!==(t=null===i||void 0===i?void 0:i.split(",").filter(Boolean))&&void 0!==t?t:[],onChange:function(e){o(e.map((function(e){return e.value})).join(","))},displayChips:!0})}})))))}var qi=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:_t}),t.registerModal(Lt,n(Ii)),t.registerModal(kt,n(Li)),t.registerModal(jt,n(Vi))};const Wi=JSON.parse('{"UIFeature.Name.SM":"Software modules","UIFeature.Description.SM":"Aggregate firmware and software artifacts (binaries) into versioned and typed software modules to prepare your software rollouts","UIFeature.Name.DS":"Distribution sets","UIFeature.Description.DS":"Compose your distribution sets of software modules you want to roll out to your devices. Organize the distribution sets based on distribution set types and tags","UIFeature.Name.Targets":"Targets","UIFeature.Description.Targets":"Manage your connected targets and organize them using target types, tags, and metadata. Define target filters to select the targets you want to use for your firmware and software rollouts","UIFeature.Name.Actions":"Actions","UIFeature.Description.Actions":"Monitor the software update actions that are executed on your target devices. Drill down into your actions to inspect the status messages that are sent by the target devices","UIFeature.Name.TargetFilters":"Target filters","UIFeature.Description.TargetFilters":"Manage your target filters to select the targets you want to use for your firmware and software rollouts","UIFeature.Name.Rollouts":"Rollouts","UIFeature.Description.Rollouts":"Manage and control the rollouts of your distribution sets to your fleet of target devices. Orchestrate new rollouts by structuring them into groups and coordinate their execution based on thresholds. Monitor the status and progress of your rollouts","UIFeature.Name.Configuration":"Configuration","UIFeature.Description.Configuration":"View and configure tenant settings for IoT Rollouts","UIFeature.Name.Quotas":"Quotas","UIFeature.Description.Quotas":"View the current utilization of the available resources","UIFeature.Name.AccessControl":"Access control","UIFeature.Description.AccessControl":"Manage access control on tenant-level via users and roles. Grant specific permissions to users","UIFeature.Name.OAuth2":"OAuth2 clients","UIFeature.Description.OAuth2":"Create OAuth2 clients and use the access tokens to authenticate your IoT application","UIFeature.Name.WhoAmI":"Whoami","UIFeature.Description.WhoAmI":"Provides additional information about the current user","ColumnSelector.ResetButtonTitle":"Reset default columns","ColumnSelector.SearchPlaceholder":"Search columns","ColumnSelector.SettingsTooltip":"Configure columns","ColumnSelector.IconColumns":"Icon columns","ColumnSelector.TextColumns":"Text columns","ColumnSelector.SortMultipleCheckboxLabel":"Sort multiple columns","SortingMenuHeader.Ascending":"Ascending","SortingMenuHeader.Descending":"Descending","SortingMenuHeader.AriaLabel":"Sorting menu for header {name}","SearchField.SearchPlaceholder":"Search","SearchField.SearchTooltip.MultipleFields":"Searches in the following fields: {columnNames}","SearchField.SearchTooltip.SingleField":"Searches in the following field: {columnName}","Dropdown.PleaseSelect":"Please select...","Dropdown.ViewOptions":"View available options","DistributionSetLink.Tooltip":"Open distribution set {id}","TargetLink.Tooltip":"Open target {controllerId}","RolloutLink.Tooltip":"Open rollout {id}","RolloutsLink.Tooltip":"Open rollouts","ActionsLink.NoActions":"No actions yet","ActionsLink.Name":"View actions","ActionsLink.Tooltip":"Open actions for the targets of this rollout","Error.ErrorWithoutResponseMessage":"Error occurred without message","Error.UnexpectedRequestContentMessage":"Request failed with status code {code}","Entity.List.TotalCount":"{count} {count, plural, =1 {item} other {items}}","FormField.ValidationMsg.Required":"This field is required","FormField.ValidationMsg.MaxLength":"Only up to {length} characters are allowed","FormField.ValidationMsg.NoWhiteSpace":"No white space allowed","FormField.ValidationMsg.NoRepetition":"Already exists","FormField.ValidationMsg.Numeric":"Only numeric value allowed","IntegerValue":"{val, number}","Entity.Label.ID":"ID","Entity.Label.Key":"Key","Entity.Label.Name":"Name","Entity.Label.Version":"Version","Entity.Label.Type":"Type","Entity.Label.Description":"Description","Entity.Label.CreatedAt":"Created at","Entity.Label.CreatedBy":"Created by","Entity.Label.LastModifiedAt":"Last modified at","Entity.Label.LastModifiedBy":"Last modified by","Entity.Label.Metadata":"Metadata","Entity.Label.ReleaseNotes":"Release notes","Entity.Label.Query":"Query","Entity.Label.Target":"Target","Entity.Label.Repository":"Repository","Entity.Label.Rollout":"Rollout","Entity.Label.DistributionSet":"Distribution set","Entity.Label.Misc":"Misc","Entity.Label.Role":"Role","Entity.Label.Tag":"Tag","Entity.Label.Status":"Status","Entity.Label.Permissions":"Permissions","Entity.Label.AllPermissions":"All permissions","Entity.SoftDelete.Start":"This {entity} has been","Entity.SoftDelete.LinkLabel":"soft deleted","Entity.SoftDelete.End":"thus no actions can be invoked.","Entity.Total":"{count} {count, plural, =1 {entry} other {entries}}","Entity.Metadata.Label.Key":"Key","Entity.Metadata.Label.Value":"Value","Entity.Metadata.VisibleToTarget":"Visible to devices","Entity.Metadata.AssignTagToTargets":"Assign tag to targets","Entity.Metadata.CreateTooltip":"Create entry","Entity.Metadata.CreateSuccess":"Metadata successfully created","Entity.Metadata.EditTooltip":"Edit entry","Entity.Metadata.DeleteTooltip":"Delete entry","Entity.Metadata.AddMetadata":"Add metadata","Entity.Metadata.UpdateMetadata":"Update metadata","Entity.Metadata.UpdateSuccess":"Metadata successfully updated","Entity.Metadata.Delete.Header":"Delete metadata","Entity.Metadata.Delete.Message":"Do you want to delete the metadata entry \\"{metadataKey}\\"?","Entity.Metadata.Delete.ErrorMessage":"Metadata entry \\"{metadataKey}\\" could not be deleted","Entity.Metadata.Delete.SuccessMessage":"Metadata successfully deleted","Entity.Metadata.EmptyList":"No metadata","Entity.Metadata.Total":"{count} {count, plural, =1 {entry} other {entries}}","Entity.Metadata.Actions":"Actions","Entity.Permissions.Update":"update","Entity.Permissions.Create":"create","Entity.Permissions.Delete":"delete","Entity.Permissions.Read":"read","Entity.Permissions.Approve":"approve","Entity.Permissions.Handle":"stop/pause","Entity.Permissions.UserManagement":"users","Entity.Permissions.RoleManagement":"roles","Entity.Permissions.DownloadRepositoryArtifact":"download","Entity.Permissions.ReadTargetSecurityToken":"read target security token","Entity.Permissions.TenantConfiguration":"update configuration","Entity.Permissions.ReadTenantConfiguration":"read configuration","Entity.Permissions.ReadGatewaySecurityToken":"read gateway security token","Entity.Permissions.None":"none","Entity.Permissions.All":"all","Entity.Permissions.Admin":"all","Entity.Permissions.Category":"Category","Entity.Permissions.Permission":"Permission","Entity.Permissions.ScopeType":"Scope type","Entity.Permissions.ScopeValue":"Scope value","Entity.Permissions.Scope.TargetType":"Target type","PermissionsScopes.AddScopes":"Add permission with scopes","PermissionsScopes.EditScopes":"Edit permission scopes","PermissionsScopes.Delete":"Unset permission","PermissionsScopes.SetPermission":"Set permission","PermissionsScopes.Label.Category":"Category","PermissionsScopes.Label.Permission":"Permission","PermissionsScopes.Label.targetTypeScopes":"Target type scopes","PermissionsScopes.Notification.AllSet":"All permissions in this category are set.","PermissionsScopes.Modify.Success":"Permissions successfully updated","Button.Add":"Add","Button.Assign":"Assign","Button.Unassign":"Unassign","Button.OK":"OK","Button.Dismiss":"Dismiss","Button.Cancel":"Cancel","Button.Delete":"Delete","Button.Refresh":"Refresh","Button.Retry":"Retry","Button.Reset":"Reset","Button.Edit":"Edit","Button.Update":"Update","Button.Save":"Save","Button.Discard":"Discard","Button.No":"No","Button.Yes":"Yes","Button.Apply":"Apply","Button.Invoke":"Invoke","Button.Filter":"Filter","Button.Next":"Next","Button.Back":"Back","Button.Create":"Create","Button.Copy":"Copy","Button.Remove":"Remove","Button.Set":"Set","Button.Download":"Download","Button.Close":"Close","Button.Clear":"Clear","Button.AutoRefresh.EnableTooltip":"Enable auto-refresh","Button.AutoRefresh.DisableTooltip":"Disable auto-refresh","Button.Approve":"Approve/Deny","Button.ImportFromCsv":"Import from csv","ToggleButton.Label.Enabled":"Enabled","ToggleButton.Label.Disabled":"Disabled","URL":"URL","Global.No":"No","Global.Yes":"Yes","Global.LoadMore":"Load more ...","Global.NA":"N/A","Global.Label.All":"All","Global.Label.Status":"Status","TextSecret.Button.Show.Label":"Show","RetryOnError.Message.Start":"Do you want to ","RetryOnError.Message.End":"?","RetryOnError.Message.Retry":"retry","RolloutsCommandBar.Actions.Refresh":"Refresh","RolloutsNavigation.Label.List":"List","RolloutsNavigation.Label.Tags":"Tags","RolloutsNavigation.Label.Types":"Types","RolloutsNavigation.Label.Insight":"Insights","RolloutsNavigation.Label.Users":"Users","RolloutsNavigation.Label.Roles":"Roles","RolloutsNavigation.Label.OAuth2":"OAuth2","RolloutsNavigation.Label.Configs.General":"Configuration","RolloutsNavigation.Label.Configs.AMQP":"AMQP","TimeZone.Offset.Label":"Time zone (from GMT)","TenantConfiguration.Heading.Help.UserConsentFlow":"User consent flow","TenantAdmin":"Admin","KeyedSearchField.Dropdown.Title":"Field to search in","FieldFilter.Dropdown.Title":"Field to search by","FieldFilter.Placeholder":"Search in field","File.Empty.Warning.Message":"File is empty"}');var zi="DistributionSetAddModal",Qi="DistributionSetUpdateModal",Gi="AssignSoftwareModulesModal",$i="DistributionSetsFilterModal",Ki="ConfirmDistributionSetInvalidation",Yi="soft",Ji="forced",Xi="timeforced",Zi="downloadonly",ea=["ref"];function ta(){return ta=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ta.apply(this,arguments)}function na(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach((function(t){ia(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ia(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var aa={id:0,type:"",typeName:"",name:"",version:"",description:"",createdAt:0,createdBy:"",lastModifiedAt:0,lastModifiedBy:"",deleted:!1,requiredMigrationStep:!1,complete:!1},la=[];function sa(e){var t,n,r,o=e.onCancel,i=e.onSubmit,a=e.loading,l=e.error,s=e.distributionSetTypes,u=void 0===s?la:s,c=e.initialEntry,d=Ut(),f=(0,G.useMemo)((function(){return pe(u,c)}),[u,c]),p=$o({defaultValues:null!==c&&void 0!==c?c:aa,mode:"onChange"}),h=p.getValues,m=p.setValue,g=p.register,y=p.formState.errors,b=p.setFocus;(0,G.useEffect)((function(){""===h().type&&f.length>0&&m("type",String(f[0].value))}),[f,h,m]),(0,G.useEffect)((function(){b(void 0===c?"name":"description")}),[b,c]);var v=(0,G.useCallback)((function(e){return 409!==e.code?e:oa(oa({},e),{},{message:d("DistributionSet.Input.AlreadyExists")})}),[d]),S=g("type",{required:d("FormField.ValidationMsg.Required")}),E=S.ref,w=na(S,ea);return(0,G.useEffect)((function(){var e;null===(e=document.getElementById("type"))||void 0===e||e.focus()}),[]),$().createElement(Xo,{useFormReturn:p,loading:a,error:l,onCancel:o,onSubmit:i,submit:"ctrl+enter",convertError:v,isUpdate:void 0!==c},void 0!==c?$().createElement(tn.LabelledSection,{header:d("Entity.Label.Type"),value:c.type}):$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,ta({required:!0,id:"type",label:d("Entity.Label.Type"),options:f,ref:E},w))),$().createElement(Yo,{register:g,getValues:h,field:"name",label:"Entity.Label.Name",maxSize:128,notificationText:null===y||void 0===y||null===(t=y.name)||void 0===t?void 0:t.message,isRequired:!0,isDisabled:void 0!==c}),$().createElement(Yo,{register:g,getValues:h,field:"version",label:"Entity.Label.Version",maxSize:64,notificationText:null===y||void 0===y||null===(n=y.version)||void 0===n?void 0:n.message,isRequired:!0,isDisabled:void 0!==c}),$().createElement(ei,{i18n:d,register:g,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===y||void 0===y||null===(r=y.description)||void 0===r?void 0:r.message}),void 0!==c?$().createElement(tn.LabelledSection,{header:d("DistributionSetDetailsView.MigrationRequired")},c.requiredMigrationStep?d("DistributionSetDetailsView.Migration.Enabled"):d("DistributionSetDetailsView.Migration.Disabled")):$().createElement(Ft.FormField,{fieldType:"toggle"},$().createElement(Ft.Toggle,ta({id:"isMigrationStepRequired",rightLabel:d("DistributionSet.Input.MigrationStepIsRequired")},g("requiredMigrationStep")))))}function ua(e){return function(e){if(Array.isArray(e))return ca(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return ca(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ca(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var da={all:["distributionSets"],lists:function(){return[].concat(ua(da.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(ua(da.lists()),[e])},details:function(){return[].concat(ua(da.all),["details"])},dsDetails:function(e){return[].concat(ua(da.details()),[e])},add:function(){return[].concat(ua(da.all),["add"])},assignModules:function(e){return[].concat(ua(da.dsDetails(e)),["assignModules"])},unassignModules:function(e){return[].concat(ua(da.dsDetails(e)),["unassignModules"])},assignedModules:function(e){return[].concat(ua(da.dsDetails(e)),["assignedModules"])},delete:function(e){return[].concat(ua(da.dsDetails(e)),["delete"])},update:function(e){return[].concat(ua(da.dsDetails(e)),["update"])},metadata:function(e){return[].concat(ua(da.dsDetails(e)),["metadata"])},metadataList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_n;return[].concat(ua(da.metadata(e)),[t])},metadataDelete:function(e,t){return[].concat(ua(da.metadata(e)),["delete",t])},metadataUpdate:function(e,t){return[].concat(ua(da.metadata(e)),["update",t])},metadataAdd:function(e){return[].concat(ua(da.metadata(e)),["add"])},statistics:function(e){return[].concat(ua(da.dsDetails(e)),["statistics"])},invalidate:function(e){return[].concat(ua(da.all),[e,"invalidate"])},assignTargets:function(e,t){return[].concat(ua(da.all),[e,"assign-targets"],ua(t))},compatibleTypes:function(){return["compatibleTypes"]},releaseNotes:function(e){return[].concat(ua(da.dsDetails(e)),["releaseNotes"])},releaseNotesList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_n;return[].concat(ua(da.releaseNotes(e)),[t])},releaseNotesDelete:function(e,t){return[].concat(ua(da.releaseNotes(e)),["delete",t])},releaseNotesAdd:function(e){return[].concat(ua(da.releaseNotes(e)),["add"])},releaseNotesDownload:function(e,t){return[].concat(ua(da.releaseNotes(e)),["download",t])}};function fa(e){var t=ue();return Yn(da.update(e),"".concat(fi,"/").concat(e),{onSuccess:function(n){t.setQueryData(da.dsDetails(e),{data:n}),t.resetQueries(da.lists())}})}function pa(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=fa(t.toUpdate.id),i=o.mutate,a=o.isLoading,l=o.error;return $().createElement(Ft.Dialog,{dialogId:Qi,title:n("DistributionSet.Edit"),onClose:t.onCancel,modal:!0,open:!0},$().createElement(sa,{onCancel:t.onCancel,onSubmit:function(e){return i({description:e.description},{onSuccess:function(){t.onCancel(),r(n("DistributionSetEditModal.SuccessMessage"))}})},loading:a,error:l,initialEntry:t.toUpdate}))}const ha=l.p+"static/ActionsList.0a90972c.md";l(6491),l(3025),l(6565);function ma(e){return e?"".concat(KG,"/").concat(e):KG}function ga(){var e=(0,ki.useNavigate)(),t=(0,ki.useLocation)();return(0,G.useMemo)((function(){return function(e,t){return{toHome:function(){e(ma()+t.search)},toStatus:function(n){e(ma(n)+t.search)}}}(e,t)}),[e,t])}var ya,ba;l(2388);function va(e){var t=e.indexOf(":");return-1!==t&&t<e.length-1?e.slice(e.indexOf(":")+1):e}function Sa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isDefault:!1,isSortable:!1,isSorted:!1},r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;return{data:{columnId:t.toString(),isDefault:n.isDefault,isSortable:n.isSortable,sortParamName:n.isSortable?t.toString():void 0},header:e,resolveCellTitle:r,fieldName:o?void 0:t,renderCell:o,style:i,isSorted:n.isSorted}}function Ea(e,t,n,r,o){var i=function(e){var n=String(e[t]);return n.length<1?null!==o&&void 0!==o?o:"":n};return Sa(e,t,n,i,void 0!==o?i:void 0,r)}function wa(e,t,n,r,o){var i=function(e){return e[t]?n("Global.Yes"):n("Global.No")};return Sa(e,t,r,i,i,o)}function Oa(e,t,n,r,o){return Sa(e,t,r,(function(e){return n("IntegerValue",{val:e[t]})}),void 0,o)}function Aa(e,t,n){return Sa(e,t,n,(function(e){var n,r=e[t];return void 0===r?"":(n=Number(r),(0,tn.parseTimeWithReadable)(n))}),(function(e){var n,r=e[t];return void 0===r?"":(n=Number(r),(0,tn.parseTimestamp)(n))}))}function Ca(e,t,n){var r=function(e){return va(String(e[t]))};return Sa(e,t,n,r,r)}function Ta(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return{data:{columnId:t.toString(),isDefault:r,isIcon:!0},header:e,onRenderHeader:function(){return null},style:{width:"4em"},renderCell:function(e){var r="function"===typeof n?n(e):n;return Boolean(e[t])?r:null},ariaLabel:e}}function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Forced="forced",e.Soft="soft",e.TimeForced="timeforced",e.DownloadOnly="downloadonly"}(ya||(ya={}));var xa=(Da(ba={},ya.Forced,{icon:"flash",tooltip:"Actions.Icon.Status.Forced"}),Da(ba,ya.TimeForced,{icon:"clock",tooltip:"Actions.Icon.Status.TimeForced"}),Da(ba,ya.Soft,{icon:"agility",tooltip:"Actions.Icon.Status.Soft"}),Da(ba,ya.DownloadOnly,{icon:"download",tooltip:"Actions.Icon.Status.Download"}),ba);function Pa(e){var t=e.forceType,n=e.forceTime,r=Ut(),o=(0,G.useCallback)((function(e){return n?"".concat(r(e)).concat((0,tn.parseTimeWithReadable)(Number(n))):r(e)}),[r,n]);return $().createElement(tn.MappedIcon,{value:t,infos:xa,processTooltip:o})}l(4772);var Ma=Symbol("rollouts-nav-group");function Ia(e,t){var n=[];return t.list&&n.push({pathname:t.list,label:"RolloutsNavigation.Label.List",icon:"table"}),t.tags&&n.push({pathname:t.tags,label:"RolloutsNavigation.Label.Tags",icon:"label"}),t.types&&n.push({pathname:t.types,label:"RolloutsNavigation.Label.Types",icon:"chip"}),t.insight&&n.push({pathname:t.insight,label:"RolloutsNavigation.Label.Insight",icon:"bar-chart"}),Ra(e,n)}function Ra(e,t){var n={title:e,items:t};return n[Ma]=!0,n}function La(e){return!!e&&e[Ma]}var ka,ja,_a,Fa=["tags","types","insights"];function Na(e){return!!e&&Fa.some((function(t){return e===t}))}function Ba(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.invalidate){var n=t.invalidate,r=n.name,o=n.version;return"".concat((0,ki.generatePath)(w$,{id:Ka(e)}),"?dsName=").concat(encodeURIComponent(r),"&dsVersion=").concat(encodeURIComponent(o))}return(0,ki.generatePath)(E$,{id:Ka(e)})}function Ua(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(v$,{id:Ka(e)})}function Ha(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(S$,{id:Ka(e)})}function Va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(A$,{id:Ka(e)})}function qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){var t=Na(e)?encodeURIComponent(" ".concat(e)):encodeURIComponent(e);return(0,ki.generatePath)(C$,{controllerId:t})}return(0,ki.generatePath)(C$)}function Wa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(T$,{id:Ka(e)})}function za(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(x$,{id:Ka(e)})}function Qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=(0,ki.generatePath)(P$,{actionOrId:Ka(e)}),r=t?"?".concat(t):"";return"".concat(n).concat(r)}function Ga(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(M$,{id:Ka(e)})}function $a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return(0,ki.generatePath)(I$,{id:Ka(e)})}function Ka(e){return"number"===typeof e?e+"":e}function Ya(e){var t=e.id,n=e.name,r=e.version,o=Ut(),i=r?"".concat(n,":").concat(r):n;return $().createElement("div",{className:"a-link a-link--simple"},$().createElement(ki.Link,{to:Ba(t),title:o("DistributionSetLink.Tooltip",{id:t})},i))}function Ja(e){var t=e.controllerId,n=e.name,r=Ut();return $().createElement("div",{className:"a-link a-link--simple"},$().createElement(ki.Link,{to:qa(t),title:r("TargetLink.Tooltip",{controllerId:t})},n))}function Xa(e){var t=e.id,n=e.name,r=Ut();return $().createElement("div",{className:"a-link a-link--simple"},$().createElement(ki.Link,{to:Qa(t),title:r("RolloutLink.Tooltip",{id:t})},n))}function Za(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var el="ActionsFilterModal",tl="finished",nl="pending",rl=(Za(ka={},tl,"Actions.Status.Finished"),Za(ka,nl,"Actions.Status.Pending"),ka),ol="finished",il="error",al="warning",ll="running",sl="canceled",ul="canceling",cl="retrieved",dl="download",fl="scheduled",pl="cancel_rejected",hl="downloaded",ml="wait_for_confirmation",gl=(Za(ja={},ol,"Actions.ReportedStatus.Finished"),Za(ja,il,"Actions.ReportedStatus.Error"),Za(ja,al,"Actions.ReportedStatus.Warning"),Za(ja,ll,"Actions.ReportedStatus.Running"),Za(ja,sl,"Actions.ReportedStatus.Canceled"),Za(ja,ul,"Actions.ReportedStatus.Canceling"),Za(ja,cl,"Actions.ReportedStatus.Retrieved"),Za(ja,dl,"Actions.ReportedStatus.Download"),Za(ja,fl,"Actions.ReportedStatus.Scheduled"),Za(ja,pl,"Actions.ReportedStatus.CancelRejected"),Za(ja,hl,"Actions.ReportedStatus.Downloaded"),Za(ja,ml,"Actions.ReportedStatus.WaitForConfirmation"),ja),yl=(Za(_a={},ol,"alert-success"),Za(_a,il,"alert-error"),Za(_a,al,"alert-warning"),Za(_a,ll,"refresh-checkmark"),Za(_a,sl,"close"),Za(_a,ul,"abort-frame"),Za(_a,cl,"checkmark"),Za(_a,dl,"cloud-download"),Za(_a,hl,"download"),Za(_a,fl,"clock"),Za(_a,pl,"denied"),Za(_a,ml,"box-questionmark1"),_a);function bl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return vl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Sl,El={icon:"question",tooltip:"Actions.Icon.Status.Unknown"},wl=Object.entries(yl).reduce((function(e,t){var n=bl(t,2),r=n[0],o=n[1];return e[r]={icon:o,tooltip:gl[r]},e}),{});function Ol(){return El}function Al(e){var t=e.status,n=Ut();return $().createElement(tn.MappedIcon,{value:t,infos:wl,processTooltip:n,processUnknown:Ol})}function Cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tl=(Cl(Sl={},nl,{icon:"circle-full",tooltip:rl.pending,color:"var(--color-green-50)"}),Cl(Sl,tl,{icon:"circle-full",tooltip:rl.finished,color:"var(--color-gray-70)"}),Sl);function Dl(e){var t=e.status,n=Ut();return $().createElement(tn.MappedIcon,{value:t,infos:Tl,processTooltip:n})}function xl(e){return[{data:{columnId:"createdAt",isDefault:!0},header:e("Actions.List.DateAndTime"),resolveCellTitle:function(e){return(0,tn.parseTimeWithReadable)(e.createdAt)},renderCell:function(e){return(0,tn.parseTimeToFormat)(e.createdAt,"lll")}},Ta(e("Actions.List.Active"),"status",(function(e){return(null===e||void 0===e?void 0:e.status)&&$().createElement(Dl,{status:e.status})}),!0),Ta(e("Actions.List.Status"),"detailStatus",(function(e){return(null===e||void 0===e?void 0:e.detailStatus)&&$().createElement(Al,{status:e.detailStatus})}),!0),Ea(e("Actions.List.ActionID"),"id",{isDefault:!0,isSortable:!0}),Sa(e("Actions.List.Target"),"target",{isDefault:!0,isSortable:!0},(function(){return""}),(function(e){var t,n,r,o;return $().createElement(Ja,{name:null===e||void 0===e||null===(t=e._links)||void 0===t||null===(n=t.target)||void 0===n?void 0:n.name,controllerId:null===e||void 0===e||null===(r=e._links)||void 0===r||null===(o=r.target)||void 0===o?void 0:o.href.split("/").pop()})})),Sa(e("Actions.List.Rollout"),"rollout",{isDefault:!0,isSortable:!0},(function(){return""}),(function(e){return null!==e&&void 0!==e&&e.rollout&&null!==e&&void 0!==e&&e.rolloutName?$().createElement(Xa,{id:null===e||void 0===e?void 0:e.rollout,name:null===e||void 0===e?void 0:e.rolloutName}):null})),Sa(e("Actions.List.DistributionSet"),"distributionSet",{isDefault:!0,isSortable:!0},(function(){return""}),(function(e){var t,n,r,o,i,a;return $().createElement(Ya,{id:null===e||void 0===e||null===(t=e._links)||void 0===t||null===(n=t.distributionset)||void 0===n?void 0:n.href.split("/").pop(),name:null===e||void 0===e||null===(r=e._links)||void 0===r||null===(o=r.distributionset)||void 0===o?void 0:o.name.split(":")[0],version:null===e||void 0===e||null===(i=e._links)||void 0===i||null===(a=i.distributionset)||void 0===a?void 0:a.name.split(":")[1]})})),Ta(e("Entity.Label.Type"),"forceType",(function(e){return(null===e||void 0===e?void 0:e.forceType)&&$().createElement(Pa,{forceType:e.forceType,forceTime:e.forceTime})}),!1),{data:{columnId:"maintenanceWindow",isDefault:!1},header:e("Actions.List.Maintenance"),resolveCellTitle:function(e){return function(e){return null!==e&&void 0!==e&&e.maintenanceWindow?(0,tn.parseTimeWithReadable)(Number(e.maintenanceWindow.nextStartAt)):""}(e)},renderCell:function(e){return function(e){if(null!==e&&void 0!==e&&e.maintenanceWindow){var t=e.maintenanceWindow;return"".concat(t.schedule,"/").concat(t.duration,"/").concat(t.timezone)}return""}(e)},fieldName:"maintenanceWindow"},Sa(e("Actions.List.Weight"),"weight",{isSortable:!0},(function(){return""}),(function(t){return t.weight||e("Global.NA")})),Sa(e("Actions.List.ExternalReference"),"externalRef",void 0,(function(e){return e.externalRef}))]}function Pl(){var e=Ut();return(0,G.useMemo)((function(){return function(e){return[{data:{columnId:"timestamp",isDefault:!1},header:e("Actions.StatusEntries.Timestamp"),resolveCellTitle:function(e){return(0,tn.parseTimeWithReadable)(e.timestamp)},renderCell:function(e){return(0,tn.parseTimeToFormat)(e.timestamp,"lll")}},{data:{columnId:"reportedAt",isDefault:!0},header:e("Actions.StatusEntries.Reported"),resolveCellTitle:function(e){return(0,tn.parseTimeWithReadable)(e.reportedAt)},renderCell:function(e){return(0,tn.parseTimeToFormat)(e.reportedAt,"lll")}},{data:{columnId:"code",isDefault:!0},header:e("Action.StatusEntries.StatusCode"),renderCell:function(t){var n;return null!==(n=t.code)&&void 0!==n?n:e("Global.NA")},style:{width:"8.5rem"}},Ta(e("Actions.List.Status"),"type",(function(e){return(null===e||void 0===e?void 0:e.type)&&$().createElement(Al,{status:e.type})}),!0)]}(e)}),[e])}function Ml(e){var t=e.typeName,n=e.allColumns,r=e.onColumnSelectionChange,o=e.multiSortProps,i=Ut(),a=(0,tn.useColumnSelection)(n,Rt,t),l=a.selectedColumnIds,s=a.setSelectedColumnIds;(0,G.useEffect)((function(){r(n.filter((function(e){return l.includes(e.data.columnId)})))}),[n,l,r]);var u=(0,tn.useGroupedColumns)({columns:n,textGroupTitle:i("ColumnSelector.TextColumns"),iconGroupTitle:i("ColumnSelector.IconColumns")});return $().createElement(tn.ColumnSelector,{columnGroups:u,selectedIds:l,onChange:s,searchPlaceholder:i("ColumnSelector.SearchPlaceholder"),resetButtonTitle:i("ColumnSelector.ResetButtonTitle"),settingsTooltip:i("ColumnSelector.SettingsTooltip"),header:o?$().createElement(Ft.Toggle,{id:"rollouts_".concat(t,"-list-sort-multiple-columns"),rightLabel:i("ColumnSelector.SortMultipleCheckboxLabel"),checked:null===o||void 0===o?void 0:o.isMultiSort,onChange:function(e){return null===o||void 0===o?void 0:o.onToggleMultiSort(e.target.checked)}}):void 0})}l(4351);var Il=["SvgElem","fill"];function Rl(){return Rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rl.apply(this,arguments)}function Ll(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function kl(e){var t=e.SvgElem,n=e.fill,r=void 0===n?"var(--bosch-gray-15)":n,o=Ll(e,Il);return $().createElement(t,Rl({fill:r},o))}var jl=["title","titleId"];function _l(){return _l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_l.apply(this,arguments)}function Fl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nl=G.createElement("path",{d:"M60.44824,146.77979l-4.59473,6.54883C37.16016,140.21484,26,118.78369,26,96 c0-15.14941,4.78229-29.56238,13.62848-41.51959l-6.1275,1.23346l-1.5791-7.84277l19.60693-3.94727l3.94727,19.60693 l-7.84277,1.5791l-1.26337-6.27606C38.34662,69.50116,34,82.41498,34,96C34,116.17871,43.88721,135.16162,60.44824,146.77979z M127,149.69385c-11.76471,6.79199-25.12134,9.48541-38.37195,7.8703l4.80359-4.2326l-5.28906-6.00195l-15.00586,13.22168 l13.22119,15.00635l6.00293-5.28906l-4.13824-4.69653c2.63104,0.29974,5.26495,0.45825,7.89166,0.45825 c12.12891,0,24.1001-3.18115,34.88574-9.40869c19.73145-11.3916,32.71143-31.77246,34.72119-54.51807l-7.96875-0.7041 C155.97168,121.55029,144.47559,139.604,127,149.69385z M127,42.30615c11.76501,6.79272,20.77496,17.01355,26.00165,29.2959 l-6.06659-2.04346l-2.55371,7.58105l18.95312,6.38525l6.38525-18.95312l-7.58105-2.5542l-1.99579,5.92334 C154.21045,54.30103,144.11975,42.95282,131,35.37842c-19.73193-11.39209-43.87061-12.44238-64.5752-2.81055l3.375,7.25342 C88.1416,31.28711,109.52441,32.21631,127,42.30615z M63.48804,124l28.90894-59.93799h7.20605L128.51196,124h-8.88239l-7.71692-16 H80.08734l-7.71692,16H63.48804z M83.9458,100h24.1084L96,75.00732L83.9458,100z"});function Bl(e,t){var n=e.title,r=e.titleId,o=Fl(e,jl);return G.createElement("svg",_l({id:"Icon_x5F_contour",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 192 192",style:{enableBackground:"new 0 0 192 192"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?G.createElement("title",{id:r},n):null,Nl)}var Ul=G.forwardRef(Bl);l.p;var Hl=["title","titleId"];function Vl(){return Vl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vl.apply(this,arguments)}function ql(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wl=G.createElement("path",{d:"M60.44824,146.77979l-4.59473,6.54883C37.16016,140.21484,26,118.78369,26,96 c0-15.14941,4.78229-29.56238,13.62848-41.51959l-6.1275,1.23346l-1.5791-7.84277l19.60693-3.94727l3.94727,19.60693 l-7.84277,1.5791l-1.26337-6.27606C38.34662,69.50116,34,82.41498,34,96C34,116.17871,43.88721,135.16162,60.44824,146.77979z M127,149.69385c-11.76471,6.79199-25.12134,9.48541-38.37195,7.8703l4.80359-4.2326l-5.28906-6.00195l-15.00586,13.22168 l13.22119,15.00635l6.00293-5.28906l-4.13824-4.69653c2.63104,0.29974,5.26495,0.45825,7.89166,0.45825 c12.12891,0,24.1001-3.18115,34.88574-9.40869c19.73145-11.3916,32.71143-31.77246,34.72119-54.51807l-7.96875-0.7041 C155.97168,121.55029,144.47559,139.604,127,149.69385z M127,42.30615c11.76501,6.79272,20.77496,17.01355,26.00165,29.2959 l-6.06659-2.04346l-2.55371,7.58105l18.95312,6.38525l6.38525-18.95312l-7.58105-2.5542l-1.99579,5.92334 C154.21045,54.30103,144.11975,42.95282,131,35.37842c-19.73193-11.39209-43.87061-12.44238-64.5752-2.81055l3.375,7.25342 C88.1416,31.28711,109.52441,32.21631,127,42.30615z M63.48804,124l28.90894-59.93799h7.20605L128.51196,124h-8.88239l-7.71692-16 H80.08734l-7.71692,16H63.48804z M83.9458,100h24.1084L96,75.00732L83.9458,100z M22.8,174.8l-5.7-5.7l152-152l5.7,5.7L22.8,174.8z"});function zl(e,t){var n=e.title,r=e.titleId,o=ql(e,Hl);return G.createElement("svg",Vl({id:"Icon_x5F_contour",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 192 192",style:{enableBackground:"new 0 0 192 192"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?G.createElement("title",{id:r},n):null,Wl)}var Ql=G.forwardRef(zl);l.p;var Gl=["autoRefresh"];function $l(){return $l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$l.apply(this,arguments)}function Kl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yl={icon:Ul,tooltip:"Button.AutoRefresh.EnableTooltip"},Jl={icon:Ql,tooltip:"Button.AutoRefresh.DisableTooltip"},Xl=(0,G.forwardRef)((function(e,t){var n=e.autoRefresh,r=void 0!==n&&n,o=Kl(e,Gl),i=Ut(),a=r?Jl:Yl,l=a.icon,s=a.tooltip;return $().createElement("button",$l({type:"button",title:i(s),className:"a-button a-button--integrated -without-label customIconButton"},o,{ref:t}),$().createElement(kl,{SvgElem:l}))}));function Zl(e){var t=e.count,n=e.onRefresh,r=e.onToggleAutoRefresh,o=e.autoRefresh,i=e.refreshDisabled,a=e.actions,l=e.columnSelectorProps,s=e.mainAction,u=e.content,c=e.filterSelector,d=Ut();return $().createElement(Ft.CommandBar,{style:{marginBottom:"1rem",minHeight:"4rem",height:"auto"},content:$().createElement($().Fragment,null,null!==t&&$().createElement("div",null,d("Entity.List.TotalCount",{count:t})),c,u),actions:a||$().createElement(es,{autoRefresh:o,onRefresh:n,onToggleAutoRefresh:r,refreshDisabled:i}),mainAction:$().createElement($().Fragment,null,l&&$().createElement(Ml,l),s||null)})}function es(e){var t=e.onRefresh,n=e.onToggleAutoRefresh,r=e.autoRefresh,o=e.refreshDisabled,i=Ut();return $().createElement($().Fragment,null,$().createElement("div",{className:"rollouts-command-bar_separator"}),n&&$().createElement(Xl,{autoRefresh:r,onClick:n,mode:"integrated",disabled:o}),t&&$().createElement(Ft.Button,{title:i("RolloutsCommandBar.Actions.Refresh"),icon:"refresh",mode:"integrated",onClick:t,disabled:o}))}var ts=l(4243);var ns="undefined"!==typeof window?G.useLayoutEffect:G.useEffect;function rs(e,t,n,r){const o=(0,G.useRef)(t);ns((()=>{o.current=t}),[t]),(0,G.useEffect)((()=>{const t=(null==n?void 0:n.current)??window;if(!t||!t.addEventListener)return;const i=e=>{o.current(e)};return t.addEventListener(e,i,r),()=>{t.removeEventListener(e,i,r)}}),[e,n,r])}function os(e){const t=(0,G.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return ns((()=>{t.current=e}),[e]),(0,G.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var is="undefined"===typeof window;function as(e,t,n={}){const{initializeWithValue:r=!0}=n,o=(0,G.useCallback)((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),i=(0,G.useCallback)((e=>{if(n.deserializer)return n.deserializer(e);if("undefined"===e)return;const r=t instanceof Function?t():t;let o;try{o=JSON.parse(e)}catch(i){return console.error("Error parsing JSON:",i),r}return o}),[n,t]),a=(0,G.useCallback)((()=>{const n=t instanceof Function?t():t;if(is)return n;try{const t=window.localStorage.getItem(e);return t?i(t):n}catch(r){return console.warn(`Error reading localStorage key \u201c${e}\u201d:`,r),n}}),[t,e,i]),[l,s]=(0,G.useState)((()=>r?a():t instanceof Function?t():t)),u=os((t=>{is&&console.warn(`Tried setting localStorage key \u201c${e}\u201d even though environment is not a client`);try{const n=t instanceof Function?t(a()):t;window.localStorage.setItem(e,o(n)),s(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(n){console.warn(`Error setting localStorage key \u201c${e}\u201d:`,n)}})),c=os((()=>{is&&console.warn(`Tried removing localStorage key \u201c${e}\u201d even though environment is not a client`);const n=t instanceof Function?t():t;window.localStorage.removeItem(e),s(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));(0,G.useEffect)((()=>{s(a())}),[e]);const d=(0,G.useCallback)((t=>{t.key&&t.key!==e||s(a())}),[e,a]);return rs("storage",d),rs("local-storage",d),[l,u,c]}function ls(e){const t=(0,G.useRef)(e);t.current=e,(0,G.useEffect)((()=>()=>{t.current()}),[])}function ss(e,t=500,n){const r=(0,G.useRef)();ls((()=>{r.current&&r.current.cancel()}));const o=(0,G.useMemo)((()=>{const o=ts(e,t,n),i=(...e)=>o(...e);return i.cancel=()=>{o.cancel()},i.isPending=()=>!!r.current,i.flush=()=>o.flush(),i}),[e,t,n]);return(0,G.useEffect)((()=>{r.current=ts(e,t,n)}),[e,t,n]),o}function us(e,t,n){const r=(null==n?void 0:n.equalityFn)??((e,t)=>e===t),o=e instanceof Function?e():e,[i,a]=(0,G.useState)(o),l=(0,G.useRef)(o),s=ss(a,t,n);return r(l.current,o)||(s(o),l.current=o),[i,s]}function cs(e){const[t,n]=(0,G.useState)(!!e),r=(0,G.useCallback)((()=>{n((e=>!e))}),[]);return[t,r,n]}function ds(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return fs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ps(e){var t=e.searchId,n=e.columnNames,r=void 0===n?[]:n,o=e.onSearchChange,i=e.searchTextInitial,a=void 0===i?"":i,l=Ut(),s=ds((0,G.useState)(a),2),u=s[0],c=s[1],d=ds(us(u,500),2),f=d[0],p=d[1],h=(0,G.useRef)(o);h.current=o,(0,G.useEffect)((function(){h.current&&h.current(f)}),[f]);var m=(0,G.useMemo)((function(){return function(e,t){var n;if(!t.length)return n;if(t.length>1){var r=t.map((function(t){return e(t)})).join(", ");n=e("SearchField.SearchTooltip.MultipleFields",{columnNames:r})}else n=e("SearchField.SearchTooltip.SingleField",{columnName:e(t[0])});return n}(l,r)}),[l,r]);return $().createElement(Ft.SearchForm,{onReset:function(){c(""),p("")},className:"rollouts-search-form".concat(u?"":" hide-reset-button"),searchField:{style:{minWidth:"17rem"},type:"search",id:t,placeholder:l("SearchField.SearchPlaceholder"),title:m,value:u,onChange:function(e){c(e.target.value),p(e.target.value)}}})}function hs(e){var t=e.keyedSearchId,n=e.keys,r=e.searchKey,o=e.onSearchKeyChange,i=e.onSearchChange,a=Ut(),l=(0,G.useMemo)((function(){return n.map((function(e){return{name:a(e),value:e}}))}),[n,a]);return $().createElement($().Fragment,null,$().createElement(Ft.Dropdown,{id:"".concat(t,"-key"),style:{minWidth:"7rem"},title:a("KeyedSearchField.Dropdown.Title"),options:l,value:r,onChange:function(e){o(e.target.value)}}),$().createElement(ps,{searchId:"".concat(t,"-search"),columnNames:[r],onSearchChange:i}))}function ms(e){var t=e.trigger,n=e.ascLabel,r=e.descLabel,o=e.onAscClick,i=e.onDescClick,a=e.isSorted,l=e.isSortedDescending,s=e.ariaLabel,u=e.headerName,c=void 0===u?"":u,d=Ut();return $().createElement(Ft.ContextMenu,{trigger:$().createElement("span",{style:{cursor:"pointer"}},t),style:{width:"100%"},"aria-label":null!==s&&void 0!==s?s:d("SortingMenuHeader.AriaLabel",{name:c})},$().createElement(Ft.MenuItem,{disabled:a&&!1===l},$().createElement(Ft.MenuItemLink,{onClick:o},$().createElement(Ft.Icon,{iconName:"arrow-up"}),$().createElement(Ft.MenuItemLabel,null,null!==n&&void 0!==n?n:d("SortingMenuHeader.Ascending")))),$().createElement(Ft.MenuItem,{disabled:a&&!0===l},$().createElement(Ft.MenuItemLink,{onClick:i},$().createElement(Ft.Icon,{iconName:"arrow-down"}),$().createElement(Ft.MenuItemLabel,null,null!==r&&void 0!==r?r:d("SortingMenuHeader.Descending")))))}function gs(e){return function(t,n,r){var o=t,i=r(o,n);return o.data.isSortable?$().createElement(ms,{trigger:i,ascLabel:o.data.ascLabel,descLabel:o.data.descLabel,onAscClick:function(){e(o,!1)},onDescClick:function(){e(o,!0)},isSorted:o.isSorted,isSortedDescending:o.isSortedDescending,headerName:o.header}):i}}function ys(e,t,n){return en(i(e,t,n),qt)}function bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(n),!0).forEach((function(t){Ss(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ss(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Es(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ut(),o=Bt();return ys(vs(vs({select:function(e){return e.data}},n),{},{queryKey:e,queryFn:function(){return o.get(t).catch((function(e){throw new vn(e,r)}))}}))}function ws(e){return function(e){if(Array.isArray(e))return Os(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Os(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Os(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Os(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var As,Cs={all:["actions"],lists:function(){return[].concat(ws(Cs.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(ws(Cs.lists()),[e])},details:function(){return[].concat(ws(Cs.all),["details"])},actionDetails:function(e){return[].concat(ws(Cs.details()),[e])},statuses:function(e){return[].concat(ws(Cs.actionDetails(e)),["statuses"])}};function Ts(e,t){var n="".concat(vi,"/").concat(encodeURIComponent(e||""),"/actions/").concat(t);return Es(Cs.actionDetails(t),n,{enabled:!!e})}!function(e){e.OR="or",e.AND="and"}(As||(As={}));var Ds={distributionSetId:"distributionset.id",distributionSetName:"distributionset.name",distributionSetVersion:"distributionset.version",distributionSetType:"distributionset.type.id",rolloutName:"rollout.name",rolloutsId:"rollout.id",targetId:"target.controllerId",targetName:"target.name",rolloutsGroupId:"rolloutgroup.id"};function xs(e){var t=Ut(),n=Hi(),r=n.currentFilter,o=n.removeFilter,i=e.labels,a=e.translations,l=e.multiSelectionFields,s=function(e){var n,r=e&&(null===a||void 0===a?void 0:a.get(e.toString()));return r?t(r):null!==(n=null===e||void 0===e?void 0:e.toString())&&void 0!==n?n:""},u=function(e,t){if(l&&l[t]){var n=(null===e||void 0===e?void 0:e.toString().split(","))||[];if(n.length>1)return n.map((function(e){return s(e)}))}return s(e)},c=[];return Object.keys(i).forEach((function(e){r[e]&&c.push({filterKey:e,categoryKey:i[e],value:u(r[e],e)})})),$().createElement($().Fragment,null,c.map((function(e){var n,r=e.filterKey,i=e.value,a=e.categoryKey;return $().createElement("div",{className:"rollouts-command-bar_filter-chip",key:a},$().createElement(tn.FilterChipComponent,{key:r,onClose:function(){return o(r)},category:a&&t(a),value:i,multiValueOperator:(n=r,l&&l[n]===As.AND?"&":"|")}))})))}function Ps(e,t,n){var r=[];t.split(",").forEach((function(t){r.push("".concat(e,'=="').concat(t.trim().toString(),'"'))}));var o=" ".concat(n," ");return"(".concat(r.join(o),")")}function Ms(e,t,n,r){var o,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Ds,a=[],l=function(e){return i[e]||e.toLowerCase()};if(Object.keys(e).forEach((function(t){var n;r&&null!==(n=Object.keys(r))&&void 0!==n&&n.includes(t)?a.push(Ps(l(t),e[t],r[t])):a.push("".concat(l(t),'=="').concat(e[t],'"'))})),(null!==(o=null===n||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0&&t){var s=In(n||"",t);a.push("(".concat(s,")"))}return a.length>0?a.join(" and "):void 0}function Is(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Ls(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rs(e){return function(e){if(Array.isArray(e))return ks(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ls(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ls(e,t){if(e){if("string"===typeof e)return ks(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ks(e,t):void 0}}function ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var js={id:"Entity.Label.ID",detailStatus:"Entity.Label.Status",lastStatusCode:"ActionsFilterModal.Status.Code",rolloutsId:"ActionsFilterModal.RolloutID",rolloutsGroupId:"ActionsFilterModal.RolloutGroupID",distributionSetId:"ActionsFilterModal.DistributionSetID",status:"ActionsFilterModal.Active",targetId:"ActionsFilterModal.TargetID",externalRef:"Actions.List.ExternalReference"},_s=new Map([].concat(Rs(Object.entries(rl)),Rs(Object.entries(gl))));function Fs(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=void 0!==r&&r,i=e.fetchMoreData,a=e.refresh,l=e.toggleAutoRefresh,s=e.autoRefresh,u=e.searchKey,c=e.searchColumns,d=e.onSearchChange,f=e.onSearchKeyChange,p=e.onSortQueryChange,h=Ut(),m=Ht(),g=(0,ki.useParams)().id,y=parseInt(null===g||void 0===g?void 0:g.split(";")[0],10),b=(null===g||void 0===g?void 0:g.split(";")[1])||"",v=ga(),S=function(){var e=Ut();return(0,G.useMemo)((function(){return xl(e)}),[e])}(),E=Is((0,G.useState)(S),2),w=E[0],O=E[1],A=Is((0,G.useState)(S),2),C=A[0],T=A[1];Er(w,p);var D=(0,tn.useSortableColumns)(w,O),x=D.sortColumn,P=D.isSortingMultipleColumns,M=D.setIsSortingMultipleColumns,I=D.resetSorting,R=(0,G.useMemo)((function(){return gs(x)}),[x]),L=(0,G.useCallback)((function(e){var t,n;v.toStatus("".concat(e.id,";").concat(null===e||void 0===e||null===(t=e._links)||void 0===t||null===(n=t.target)||void 0===n?void 0:n.href.split("/").pop()))}),[v]),k=Ts(b,y),j=vr(t,null===k||void 0===k?void 0:k.data,o);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,onRefresh:a,refreshDisabled:o,content:$().createElement(xs,{labels:js,translations:_s}),filterSelector:$().createElement($().Fragment,null,$().createElement(hs,{keyedSearchId:"actions-list-search",keys:c,searchKey:u,onSearchChange:d,onSearchKeyChange:f}),$().createElement(Ft.Button,{title:h("Button.Filter"),icon:"filter",label:h("Button.Filter"),mode:"integrated",onClick:function(){var e=m(el,{onClose:function(){return e()}})}})),mainAction:$().createElement($().Fragment,null,$().createElement(Ml,{typeName:"actions-list",allColumns:w,onColumnSelectionChange:T,multiSortProps:{isMultiSort:P,onToggleMultiSort:function(e){M(e),I()}}})),actions:$().createElement($().Fragment,null,$().createElement("div",{className:"rollouts-command-bar_separator"}),$().createElement(Xl,{autoRefresh:s,onClick:l,mode:"integrated"}),$().createElement(Ft.Button,{title:h("RolloutsCommandBar.Actions.Refresh"),icon:"refresh",mode:"integrated",onClick:a,disabled:o}))}),$().createElement(Ft.DataList,{items:j,columns:C,hideCheckBoxes:!0,enableScrolling:!0,onSelect:L,selected:j.find((function(e){return g&&e.id===parseInt(g)})),onScrollToBottom:function(){return i()},emptyStateMessage:h("Actions.List.Empty"),onRenderColumnHeader:R},o&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"actions-list-loading"})))}function Ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Us(e,t){return Fn(Cs.list(e),"v1/actions",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ns(Object(n),!0).forEach((function(t){Bs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ns(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({representation:"full"},e),t)}function Hs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Vs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qs={"Actions.List.ActionID":"id","Actions.List.Target":"target.name","Actions.List.DistributionSet":"distributionset.name","Actions.List.Rollout":"rollout.name"};function Ws(){var e=Hs((0,G.useState)(!1),2),t=e[0],n=e[1],r=Hs((0,G.useState)("Actions.List.ActionID"),2),o=r[0],i=r[1],a=Hs((0,G.useState)(),2),l=a[0],s=a[1],u=Hs((0,G.useState)(),2),c=u[0],d=u[1],f=Us({sort:l,q:Ms(Hi().currentFilter,[qs[o]],c)},{refetchInterval:!!t&&5e3}),p=f.data,h=f.isLoading,m=f.isFetchingNextPage,g=f.isFetching,y=f.error,b=f.fetchNextPage,v=ue(),S=(0,G.useCallback)((function(){v.resetQueries({queryKey:Cs.lists()})}),[v]);if(y)return $().createElement(tn.ErrorState,{error:y});var E=Dn(p),w=E.totalCount,O=E.entities;return $().createElement(Fs,{data:O,totalCount:w,loadingData:h||m||g,fetchMoreData:b,refresh:S,searchKey:o,searchColumns:Object.keys(qs),autoRefresh:t,toggleAutoRefresh:function(){n((function(e){return!e}))},onSearchChange:d,onSearchKeyChange:function(e){return i(e)},onSortQueryChange:s})}function zs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Qs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ws.displayName="ActionsListBlade",Ws.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("ActionsListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("ActionsListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:ha}))))};function Gs(e){var t=e.statusEntries,n=e.totalCount,r=e.loadingData,o=e.refreshDisabled,i=e.autoRefresh,a=e.fetchMoreData,l=e.refresh,s=e.toggleAutoRefresh,u=Ut(),c=Pl(),d=zs((0,G.useState)(c),2),f=d[0],p=d[1],h=function(e){return(0,G.useMemo)((function(){var t=[];return e.forEach((function(e,n){var r;null===e||void 0===e||null===(r=e.messages)||void 0===r||r.forEach((function(e){t.push({detailsInfo:e,index:n})}))})),t}),[e])}(t),m=(0,G.useMemo)((function(){return{allColumns:c,onColumnSelectionChange:p,typeName:"status-entries"}}),[c]);return $().createElement(tn.FlexibleColumnWrapper,{style:{marginTop:"1rem",overflow:"visible"}},$().createElement(Zl,{count:n,columnSelectorProps:m,onRefresh:l,refreshDisabled:r,actions:$().createElement($().Fragment,null,$().createElement(Xl,{autoRefresh:i,onClick:s,mode:"integrated",disabled:r||o}),$().createElement(Ft.Button,{title:u("RolloutsCommandBar.Actions.Refresh"),icon:"refresh",mode:"integrated",onClick:l,disabled:r||o}))}),$().createElement(Ft.DataList,{items:t,columns:f,hideCheckBoxes:!0,enableScrolling:!0,onScrollToBottom:a,emptyStateMessage:u("Action.StatusEntries.Empty"),expandableDetails:h},r&&$().createElement(tn.InlineLoadingIndicator,null)))}function $s(e){var t,n,r,o,i,a,l,s,u,c,d=e.action,f=e.statusEntries,p=e.totalCount,h=e.loadingData,m=void 0!==h&&h,g=e.refreshDisabled,y=void 0!==g&&g,b=e.autoRefresh,v=e.fetchMoreData,S=e.refresh,E=e.toggleAutoRefresh,w=Ut();return $().createElement($().Fragment,null,d&&$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},$().createElement(tn.LabelledSection,{header:w("Actions.List.ActionID"),value:d.id.toString()}),$().createElement(tn.LabelledSection,{header:w("Actions.List.Target")},$().createElement(Ja,{name:null===d||void 0===d||null===(t=d._links)||void 0===t||null===(n=t.target)||void 0===n?void 0:n.name,controllerId:null===d||void 0===d||null===(r=d._links)||void 0===r||null===(o=r.target)||void 0===o?void 0:o.href.split("/").pop()})),d.rollout&&d.rolloutName&&$().createElement(tn.LabelledSection,{header:w("Actions.List.Rollout")},$().createElement(Xa,{id:d.rollout,name:d.rolloutName})),$().createElement(tn.LabelledSection,{header:w("Actions.List.DistributionSet")},$().createElement(Ya,{id:null===(i=d._links)||void 0===i||null===(a=i.distributionset)||void 0===a?void 0:a.href.split("/").pop(),name:null===(l=d._links)||void 0===l||null===(s=l.distributionset)||void 0===s?void 0:s.name.split(":")[0],version:null===(u=d._links)||void 0===u||null===(c=u.distributionset)||void 0===c?void 0:c.name.split(":")[1]})),d.externalRef&&$().createElement(tn.LabelledSection,{showCopy:!0,header:w("Actions.List.ExternalReference"),value:d.externalRef}),$().createElement(Ft.Divider,null),$().createElement(Gs,{key:d.id,statusEntries:f,totalCount:p,loadingData:m,refreshDisabled:y,autoRefresh:b,fetchMoreData:v,refresh:S,toggleAutoRefresh:E})))}const Ks=l.p+"static/ActionStatus.958d2f37.md";function Ys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ys(Object(n),!0).forEach((function(t){Xs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zs(e,t,n){return $().createElement($().Fragment,null,$().createElement("p",null,e(t?"Action.ForceQuitConfirmation.Message":"Action.CancelConfirmation.Message")),$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},$().createElement(tn.LabelledSection,{header:e("Action.CancelForceQuitConfirmation.Target"),value:n._links.target.name}),$().createElement(tn.LabelledSection,{header:e("Action.CancelForceQuitConfirmation.DistributionSet"),value:n._links.distributionset.name})))}function eu(e,t){var n=Ut(),r=ue(),o=Tn(null===e||void 0===e?void 0:e._links.self.href);return sr("".concat(o,"?force=").concat(t),{headline:n(t?"Action.ForceQuitConfirmation.Header":"Action.CancelConfirmation.Header"),message:e?Zs(n,t,e):"",confirmLabel:n("Button.Yes"),cancelLabel:n("Button.No"),successMessage:n(t?"Action.ForceQuitSuccess.Message":"Action.CancelSuccess.Message")},{onSuccess:function(){e&&r.resetQueries({queryKey:Cs.actionDetails(e.id)})}}).showConfirmation}function tu(e){var t=e.action,n=Ut(),r=eu(t,!1),o=eu(t,!0),i=(null===t||void 0===t?void 0:t.detailStatus)===ul||(null===t||void 0===t?void 0:t.detailStatus)===sl,a=(null===t||void 0===t?void 0:t.status)===nl&&!i,l=(null===t||void 0===t?void 0:t.status)===nl&&i;return $().createElement($().Fragment,null,t&&$().createElement($().Fragment,null,$().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n("Action.Actions.Title")},$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Action.Actions.Cancel")),icon:"close",onClick:r,title:n("Action.Actions.Cancel.Tooltip"),disabled:!a}),$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Action.Actions.ForceQuit")),icon:"abort-frame",onClick:o,title:n("Action.Actions.ForceQuit.Tooltip"),disabled:!l}))))}function nu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ru(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ru(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ru(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ou(){var e=nu((0,G.useState)(!1),2),t=e[0],n=e[1],r=(0,ki.useParams)().id,o=parseInt(null===r||void 0===r?void 0:r.split(";")[0],10),i=Ts((null===r||void 0===r?void 0:r.split(";")[1])||"",o),a=function(e,t){var n,r=Tn(null===e||void 0===e?void 0:e._links.self),o="".concat(r,"/status");return Fn(Cs.statuses(null!==(n=null===e||void 0===e?void 0:e.id)&&void 0!==n?n:-1),o,{},Js(Js({},t),{},{enabled:!!e}))}(i.data,{refetchInterval:!!t&&5e3}),l=a.data,s=a.isLoading,u=a.isFetchingNextPage,c=a.isFetching,d=a.error,f=a.fetchNextPage,p=ue(),h=(0,G.useCallback)((function(){p.refetchQueries({queryKey:Cs.actionDetails(o)})}),[p,o]),m=!!i.data&&i.data.status===tl,g=(0,G.useCallback)((function(){n((function(e){return!e}))}),[]);if(m&&t&&g(),d)return $().createElement(tn.ErrorState,{error:d});var y=Dn(l),b=y.totalCount,v=y.entities;return $().createElement($().Fragment,null,$().createElement(tu,{action:i.data}),$().createElement($s,{action:i.data,statusEntries:v,totalCount:b||0,loadingData:s||u||c,refreshDisabled:m,autoRefresh:t,fetchMoreData:f,refresh:h,toggleAutoRefresh:g}))}function iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function au(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iu(Object(n),!0).forEach((function(t){lu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ou.displayName="ActionStatusBlade",ou.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("ActionStatusBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("ActionStatusBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Ks}))))};var su={component:Ws,name:Ws.displayName,open:!0,defaults:{fluid:!0,header:$().createElement(Ws.Header,null),showCloseButton:!1}},uu={component:ou,name:ou.displayName,open:!0,defaults:{initialWidth:600,active:!0,header:$().createElement(ou.Header,null),onClose:function(){}}};var cu=function(){var e=ga(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[au(au({},su),{},{defaults:au(au({},su.defaults),{},{collapsed:!1})}),au(au({},uu),{},{defaults:au(au({},uu.defaults),{},{onClose:function(){return e.toHome()}})})]:[au(au({},su),{},{defaults:au(au({},su.defaults),{},{collapsed:!1})})]}),[t,e]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};l(5211),l(8627);function du(e){return du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},du(e)}function fu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return pu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"bosch:iot-suite:rollouts:".concat(e,"-").concat(t)}("nav-menu-open",1),mu=(0,tn.withContentBodyTemplate)((function(e){var t=Ut(),n=(0,ki.useNavigate)(),r=fu(as(hu,!0),2),o=r[0],i=r[1],a=(0,ki.useMatches)(),l=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(La(n.handle))return n.handle;if(null!==n.handle&&"object"===du(n.handle)){var r=Object.values(n.handle).find(La);if(r)return r}}return null}(a),s=null===l||void 0===l?void 0:l.items.map((function(e){return e.pathname})).sort((function(e,t){return t.split("/").length-e.split("/").length})).find((function(e){return a[a.length-1].pathname.startsWith(e)})),u=(0,G.useMemo)((function(){var e;return function(e,t){return e.map((function(e){return{value:e.pathname,label:t(e.label),icon:e.icon,tooltip:e.tooltip?t(e.tooltip):e.tooltip,disabled:e.disabled}}))}(null!==(e=null===l||void 0===l?void 0:l.items)&&void 0!==e?e:[],t)}),[t,l]),c=(0,G.useMemo)((function(){return{label:l?t(l.title):void 0}}),[t,l]),d=(0,G.useMemo)((function(){return{menuItems:u}}),[u]),f=(0,G.useCallback)((function(e,t){n(t.value,{relative:"path"})}),[n]);return!l||l.items.length<2?$().createElement($().Fragment,null,e.children):$().createElement($().Fragment,null,$().createElement("div",{className:"rollouts-navigation-layout"},$().createElement(Ft.SideNavigation,{defaultOpen:!0,open:o,onOpenChange:i,header:c,body:d,selectedItem:s,defaultSelectedItem:u[0].value,onSelectedItemChange:f,contrast:!1}),$().createElement("div",{className:"rollouts-navigation-items"},e.children)))}));const gu=l.p+"static/Configurations.b302bda1.md";function yu(e){return function(e){if(Array.isArray(e))return bu(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return bu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vu,Su={all:["configurations"],parameters:function(){return[].concat(yu(Su.all),["parameters"])},update:function(){return[].concat(yu(Su.all),["update"])},distributionSetTypesList:function(){return[].concat(yu(Su.all),["dsTypesList"])}};function Eu(e){return Es(Su.parameters(),ci,e)}function wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ou="action.cleanup.actionExpiry",Au="action.cleanup.actionStatus",Cu="action.cleanup.enabled",Tu="authentication.gatewaytoken.enabled",Du="authentication.gatewaytoken.key",xu="authentication.header.authority",Pu="authentication.header.enabled",Mu="authentication.targettoken.enabled",Iu="cdn.validity.days",Ru="dmf.enabled",Lu="multi.assignments.enabled",ku="rollout.approval.enabled",ju="repository.actions.autoclose.enabled",_u="pollingOverdueTime",Fu="pollingTime",Nu="sie.enabled",Bu="user.confirmation.flow.enabled",Uu="default.ds.type",Hu="implicit.lock.enabled",Vu="12:00:00",qu="23:59:59",Wu="CANCELED",zu="ERROR",Qu="ERROR,CANCELED",Gu=(wu(vu={},Ou,2592e6),wu(vu,Au,Qu),wu(vu,Cu,!1),wu(vu,"anonymous.download.enabled",!1),wu(vu,Tu,!1),wu(vu,Du,""),wu(vu,xu,""),wu(vu,Pu,!1),wu(vu,Mu,!1),wu(vu,"batch.assignments.enabled",!1),wu(vu,Iu,30),wu(vu,Ru,!1),wu(vu,Lu,!1),wu(vu,ju,!1),wu(vu,ku,!1),wu(vu,"maintenanceWindowPollCount",3),wu(vu,Fu,Vu),wu(vu,_u,qu),wu(vu,Nu,!1),wu(vu,Bu,!1),wu(vu,Uu,0),wu(vu,Hu,!0),vu),$u={inEdit:!1,initialConfigurations:Object.assign({},Gu),configurations:Object.assign({},Gu),invalidConfigurations:{},effectiveInvalidConfigsCount:0,changes:null};var Ku=pt((function(e,t){switch(t.action){case"resetConfigurations":!function(e){e.initialConfigurations=Object.assign({},e.initialConfigurations),e.configurations=Object.assign({},e.initialConfigurations),e.invalidConfigurations={},e.effectiveInvalidConfigsCount=0,e.changes=null}(e);break;case"resetParameter":Ju(e,{key:t.data,value:e.initialConfigurations[t.data],errorMessage:null});break;case"initialize":!function(e,t){e.inEdit=!1,e.configurations=(n=t,Object.keys(n).reduce((function(e,t){return e[t]=n[t].value,e}),{})),e.initialConfigurations=Object.assign({},e.configurations),e.invalidConfigurations={},e.effectiveInvalidConfigsCount=0,e.changes=null;var n}(e,t.data);break;case"setInEdit":e.inEdit=t.data;break;case"setParameter":Ju(e,t.data)}}));var Yu=new Map([[Cu,[Ou,Au]],[Pu,[xu]],[Tu,[Du]]]);function Ju(e,t){var n=t.key,r=t.value,o=t.errorMessage,i=e.invalidConfigurations;o?(i[n]||e.effectiveInvalidConfigsCount++,e.invalidConfigurations[n]=o):e.invalidConfigurations[n]&&(e.effectiveInvalidConfigsCount--,delete e.invalidConfigurations[n]),e.configurations[n]!==r&&function(e,t,n){e.configurations[t]=n,Xu(e,t,n),Yu.has(t)&&(n?Yu.get(t).forEach((function(t){Xu(e,t,e.configurations[t]),e.invalidConfigurations[t]&&e.effectiveInvalidConfigsCount++})):Yu.get(t).forEach((function(t){Xu(e,t,e.initialConfigurations[t]),e.invalidConfigurations[t]&&e.effectiveInvalidConfigsCount--})))}(e,n,r)}function Xu(e,t,n){e.initialConfigurations[t]!==n?e.changes?e.changes[t]!==n&&(e.changes[t]=n):e.changes=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n):e.changes&&(delete e.changes[t],Object.keys(e.changes).length||(e.changes=null))}function Zu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ec(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tc=(0,G.createContext)(null),nc=(0,G.createContext)(null);function rc(e){var t=e.children,n=Zu((0,G.useReducer)(Ku,$u),2),r=n[0],o=n[1],i=(0,G.useMemo)((function(){return{initialize:function(e){o({action:"initialize",data:e})},setParameter:function(e,t,n){o({action:"setParameter",data:{key:e,value:t,errorMessage:n}})},setInEdit:function(e){o({action:"setInEdit",data:e})},resetParameter:function(e){o({action:"resetParameter",data:e})},resetConfigurations:function(){o({action:"resetConfigurations"})}}}),[o]);return $().createElement(tc.Provider,{value:r},$().createElement(nc.Provider,{value:i},t))}function oc(){return(0,G.useContext)(tc)}function ic(){return(0,G.useContext)(nc)}l(4990),l(5984),l(931),l(6899),l(7357),l(8187),l(7825),l(4307),l(5480),l(6802),l(9901),l(5729),l(1543),l(274),l(4450),l(4483),l(7217),l(3117),l(4321),l(7136),l(1950),l(299),l(1311),l(58),l(4065),l(9969),l(5607);function ac(e){return"cfg-param__".concat(e.replaceAll(".","-"))}function lc(e){var t=e.configParamName,n=e.className,r=Ut(),o=oc(),i=o.configurations,a=o.initialConfigurations,l=o.inEdit,s=ic().resetParameter,u=(0,G.useCallback)((function(){s(t)}),[t,s]),c=l&&i[t]!==a[t];return $().createElement($().Fragment,null,c&&$().createElement(Ft.Button,{mode:"integrated",title:r("ConfigurationsSection.Tooltip.Reset"),icon:"back-menu",onClick:u,className:"cfg-param__reset-btn".concat(n?" ".concat(n):"")}))}function sc(e){var t=e.name,n=e.after,r=void 0===n?null:n,o=e.showAfter,i=void 0===o||o,a=e.disabled,l=void 0!==a&&a,s=e.onChange,u=e.className,c=Ut(),d=oc(),f=d.inEdit,p=d.configurations,h=ic().setParameter,m=(0,G.useCallback)((function(e){(s||h)(t,e.target.checked)}),[t,h,s]);return $().createElement("div",{className:"tenant-cfg-param cfg-param-boolean".concat(u?" ".concat(u):"")},$().createElement("div",{className:"cfg-param-layout --reset"},$().createElement(Ft.Toggle,{id:ac(t),checked:p[t],rightLabel:c("ConfigurationParameter.Label.".concat(t)),disabled:l||!f,className:"cfg-param-boolean__toggle",onChange:m}),$().createElement(lc,{configParamName:t})),r&&i&&$().createElement("div",{className:"configuration-parameter-after"},r))}function uc(e){var t=e.title,n=e.helpPath,r=e.subsection,o=void 0!==r&&r,i=e.children,a=3,l="-size-xl";o&&(a=4,l="-size-l");var s="h".concat(a);return $().createElement("section",{className:"rollouts-configurations-section"},$().createElement(s,{className:l},t,n&&$().createElement(tn.InfoButton,{popoverHeading:t},$().createElement(tn.Documentation,{markdownFilePath:n}))),$().createElement("div",{className:"configurations-section-content"},i))}var cc=l(7111),dc=l(4272),fc=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},pc=fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc(fc([],["onCopy","onCut","onPaste"],!0),["onCompositionEnd","onCompositionStart","onCompositionUpdate"],!0),["onFocus","onBlur"],!0),["onInput","onInvalid","onReset","onSubmit"],!0),["onLoad","onError"],!0),["onKeyDown","onKeyPress","onKeyUp"],!0),["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],!0),["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],!0),["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],!0),["onSelect"],!0),["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],!0),["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],!0),["onScroll"],!0),["onWheel"],!0),["onAnimationStart","onAnimationEnd","onAnimationIteration"],!0),["onTransitionEnd"],!0),["onChange"],!0),["onToggle"],!0);function hc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}const mc=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hc(e))&&(r&&(r+=" "),r+=t);return r};function gc(e,t,n){return function(r,o){void 0===o&&(o=n);var i=e(r)+o;return t(i)}}function yc(e){return function(t){return new Date(e(t).getTime()-1)}}function bc(e,t){return function(n){return[e(n),t(n)]}}function vc(e){if(e instanceof Date)return e.getFullYear();if("number"===typeof e)return e;var t=parseInt(e,10);if("string"===typeof e&&!isNaN(t))return t;throw new Error("Failed to get year from date: ".concat(e,"."))}function Sc(e){if(e instanceof Date)return e.getMonth();throw new Error("Failed to get month from date: ".concat(e,"."))}function Ec(e){if(e instanceof Date)return e.getDate();throw new Error("Failed to get year from date: ".concat(e,"."))}function wc(e){if(e instanceof Date)return e.getHours();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var r=parseInt(n,10);if(!isNaN(r))return r}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function Oc(e){if(e instanceof Date)return e.getMinutes();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function Ac(e){if(e instanceof Date)return e.getSeconds();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function Cc(e){if(e instanceof Date)return e.getMilliseconds();if("string"===typeof e){var t=e.split(":");if(t.length>=2){var n=(t[2]||"0").split(".")[1]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function Tc(e){var t=vc(e),n=t+(1-t)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}gc(vc,Tc,-100);var Dc=yc(gc(vc,Tc,100));gc(vc,Dc,-100),gc(vc,Dc,100),bc(Tc,Dc);function xc(e){var t=vc(e),n=t+(1-t)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}gc(vc,xc,-10);var Pc=yc(gc(vc,xc,10));gc(vc,Pc,-10),gc(vc,Pc,10),bc(xc,Pc);function Mc(e){var t=vc(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}gc(vc,Mc,-1);var Ic=yc(gc(vc,Mc,1));gc(vc,Ic,-1),gc(vc,Ic,1),bc(Mc,Ic);function Rc(e,t){return function(n,r){void 0===r&&(r=t);var o=vc(n),i=Sc(n)+r,a=new Date;return a.setFullYear(o,i,1),a.setHours(0,0,0,0),e(a)}}function Lc(e){var t=vc(e),n=Sc(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}Rc(Lc,-1);var kc=yc(Rc(Lc,1));Rc(kc,-1),Rc(kc,1),bc(Lc,kc);function jc(e,t){return function(n,r){void 0===r&&(r=t);var o=vc(n),i=Sc(n),a=Ec(n)+r,l=new Date;return l.setFullYear(o,i,a),l.setHours(0,0,0,0),e(l)}}function _c(e){var t=vc(e),n=Sc(e),r=Ec(e),o=new Date;return o.setFullYear(t,n,r),o.setHours(0,0,0,0),o}jc(_c,-1);var Fc=yc(jc(_c,1));jc(Fc,-1),jc(Fc,1),bc(_c,Fc);function Nc(e,t){void 0===t&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function Bc(e){var t=Nc(wc(e)),n=Nc(Oc(e));return"".concat(t,":").concat(n)}function Uc(e){var t=Nc(wc(e)),n=Nc(Oc(e)),r=Nc(Ac(e));return"".concat(t,":").concat(n,":").concat(r)}function Hc(e){var t=e.angle,n=void 0===t?0:t,r=e.name,o=e.length,i=void 0===o?100:o,a=e.oppositeLength,l=void 0===a?10:a,s=e.width,u=void 0===s?1:s;return G.createElement("div",{className:"react-clock__hand react-clock__".concat(r,"-hand"),style:{transform:"rotate(".concat(n,"deg)")}},G.createElement("div",{className:"react-clock__hand__body react-clock__".concat(r,"-hand__body"),style:{width:"".concat(u,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-l/2,"%")}}))}function Vc(e){var t=e.angle,n=void 0===t?0:t,r=e.length,o=void 0===r?10:r,i=e.name,a=e.width,l=void 0===a?1:a,s=e.number;return G.createElement("div",{className:"react-clock__mark react-clock__".concat(i,"-mark"),style:{transform:"rotate(".concat(n,"deg)")}},G.createElement("div",{className:"react-clock__mark__body react-clock__".concat(i,"-mark__body"),style:{width:"".concat(l,"px"),top:0,bottom:"".concat(100-o/2,"%")}}),s?G.createElement("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(n,"deg)"),top:"".concat(o/2,"%")}},s):null)}var qc=function(){return qc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qc.apply(this,arguments)};const Wc=(0,G.memo)((function(e){return G.createElement(Vc,qc({},e))}));var zc=l(5488);function Qc(e){return JSON.stringify(e)}function Gc(e){return"string"===typeof e}function $c(e,t,n){return n.indexOf(e)===t}function Kc(e){return-1===e.indexOf(",")?e:e.split(",")}function Yc(e){if(!e)return e;if("C"===e||"posix"===e||"POSIX"===e)return"en-US";if(-1!==e.indexOf(".")){var t=e.split(".")[0];return Yc(void 0===t?"":t)}if(-1!==e.indexOf("@")){var n=e.split("@")[0];return Yc(void 0===n?"":n)}if(-1===e.indexOf("-")||(r=e).toLowerCase()!==r)return e;var r,o=e.split("-"),i=o[0],a=o[1],l=void 0===a?"":a;return"".concat(i,"-").concat(l.toUpperCase())}var Jc=zc((function(e){var t=void 0===e?{}:e,n=t.useFallbackLocale,r=void 0===n||n,o=t.fallbackLocale,i=void 0===o?"en-US":o,a=[];if("undefined"!==typeof navigator){for(var l=[],s=0,u=navigator.languages||[];s<u.length;s++){var c=u[s];l=l.concat(Kc(c))}var d=navigator.language,f=d?Kc(d):d;a=a.concat(l,f)}return r&&a.push(i),a.filter(Gc).map(Yc).filter($c)}),Qc);var Xc=zc((function(e){return Jc(e)[0]||null}),Qc);const Zc=Xc;function ed(e,t){return t.toLocaleString(e||Zc()||void 0)}var td=function(){return td=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},td.apply(this,arguments)},nd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const rd=(0,G.memo)((function(e){var t=e.formatHour,n=void 0===t?ed:t,r=e.locale,o=e.number,i=nd(e,["formatHour","locale","number"]);return G.createElement(Vc,td({number:o?n(r,o):null},i))}));function od(e,t){return function(n,r,o){var i=n[r];if("undefined"!==typeof i){if("number"!==typeof i)return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof i,"` supplied to `").concat(o,"`, expected `number`."));if(i<e||i>t)return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof i,"` supplied to `").concat(o,"`, length must be between ").concat(e," and ").concat(t,"."))}return null}}var id=od(0,100),ad=od(-100,100),ld=function(e,t,n){var r=e[t];if("undefined"!==typeof r){if("number"!==typeof r)return new Error("Invalid prop `".concat(t,"` of type `").concat(typeof r,"` supplied to `").concat(n,"`, expected `number`."));if(r<0)return new Error("Invalid prop `".concat(t,"` of type `").concat(typeof r,"` supplied to `").concat(n,"`, width must be greater or equal to 0."))}return null},sd=id,ud=ld,cd=function(e){var t=e.className,n=e.formatHour,r=e.hourHandLength,o=void 0===r?50:r,i=e.hourHandOppositeLength,a=e.hourHandWidth,l=void 0===a?4:a,s=e.hourMarksLength,u=void 0===s?10:s,c=e.hourMarksWidth,d=void 0===c?3:c,f=e.locale,p=e.minuteHandLength,h=void 0===p?70:p,m=e.minuteHandOppositeLength,g=e.minuteHandWidth,y=void 0===g?2:g,b=e.minuteMarksLength,v=void 0===b?6:b,S=e.minuteMarksWidth,E=void 0===S?1:S,w=e.renderHourMarks,O=void 0===w||w,A=e.renderMinuteHand,C=void 0===A||A,T=e.renderMinuteMarks,D=void 0===T||T,x=e.renderNumbers,P=e.renderSecondHand,M=void 0===P||P,I=e.secondHandLength,R=void 0===I?90:I,L=e.secondHandOppositeLength,k=e.secondHandWidth,j=void 0===k?1:k,_=e.size,F=void 0===_?150:_,N=e.useMillisecondPrecision,B=e.value;return G.createElement("time",{className:mc("react-clock",t),dateTime:B instanceof Date?B.toISOString():B||void 0,style:{width:F,height:F}},G.createElement("div",{className:"react-clock__face"},function(){if(!D)return null;for(var e=[],t=1;t<=60;t+=1)O&&!(t%5)||e.push(G.createElement(Wc,{key:"minute_".concat(t),angle:6*t,length:v,name:"minute",width:E}));return e}(),function(){if(!O)return null;for(var e=[],t=1;t<=12;t+=1)e.push(G.createElement(rd,{key:"hour_".concat(t),angle:30*t,formatHour:n,length:u,locale:f,name:"hour",number:x?t:void 0,width:d}));return e}()),function(){var e=B?30*wc(B)+Oc(B)/2+Ac(B)/120+(N?Cc(B)/12e4:0):0;return G.createElement(Hc,{angle:e,length:o,name:"hour",oppositeLength:i,width:l})}(),function(){if(!C)return null;var e=B?360*wc(B)+6*Oc(B)+Ac(B)/10+(N?Cc(B)/1e4:0):0;return G.createElement(Hc,{angle:e,length:h,name:"minute",oppositeLength:m,width:y})}(),function(){if(!M)return null;var e=B?360*Oc(B)+6*Ac(B)+(N?.006*Cc(B):0):0;return G.createElement(Hc,{angle:e,length:R,name:"second",oppositeLength:L,width:j})}())};cd.propTypes={className:dc.oneOfType([dc.string,dc.arrayOf(dc.string)]),formatHour:dc.func,hourHandLength:id,hourHandOppositeLength:ad,hourHandWidth:ld,hourMarksLength:sd,hourMarksWidth:ud,locale:dc.string,minuteHandLength:id,minuteHandOppositeLength:ad,minuteHandWidth:ld,minuteMarksLength:sd,minuteMarksWidth:ud,renderHourMarks:dc.bool,renderMinuteHand:dc.bool,renderMinuteMarks:dc.bool,renderNumbers:dc.bool,renderSecondHand:dc.bool,secondHandLength:id,secondHandOppositeLength:ad,secondHandWidth:ld,size:dc.oneOfType([dc.number,dc.string]),value:dc.oneOfType([dc.string,dc.instanceOf(Date)])};const dd=cd;function fd(e){return e.getBoundingClientRect()}function pd(e,t){return{get collidedTop(){return fd(e).top<fd(t).top},get collidedBottom(){return fd(e).bottom>fd(t).bottom},get collidedLeft(){return fd(e).left<fd(t).left},get collidedRight(){return fd(e).right>fd(t).right},get overflowTop(){return fd(t).top-fd(e).top},get overflowBottom(){return fd(e).bottom-fd(t).bottom},get overflowLeft(){return fd(t).left-fd(e).left},get overflowRight(){return fd(e).right-fd(t).right}}}const hd=function(e,t){};var md=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gd=function(){return gd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gd.apply(this,arguments)},yd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},bd="undefined"!==typeof document,vd=bd&&"CSS"in window&&"supports"in window.CSS&&CSS.supports("display","contents"),Sd=bd&&"MutationObserver"in window;function Ed(e){return e.charAt(0).toUpperCase()+e.slice(1)}function wd(e){for(var t=e.parentElement;t;){if(window.getComputedStyle(t).overflow.split(" ").every((function(e){return"auto"===e||"scroll"===e})))return t;t=t.parentElement}return document.documentElement}function Od(e){var t=e.axis,n=e.container,r=e.element,o=e.invertAxis,i=e.scrollContainer,a=e.secondary,l=e.spacing,s=window.getComputedStyle(r),u=n.parentElement;if(u){var c=pd(u,i),d=pd(u,document.documentElement),f="x"===t,p=f?"left":"top",h=f?"right":"bottom",m=f?"width":"height",g="overflow".concat(Ed(p)),y="overflow".concat(Ed(h)),b="scroll".concat(Ed(p)),v=Ed(m),S="offset".concat(v),E="client".concat(v),w="min-".concat(m),O=i[S]-i[E],A="object"===typeof l?l[p]:l,C=-Math.max(c[g],d[g]+document.documentElement[b])-A,T="object"===typeof l?l[h]:l,D=-Math.max(c[y],d[y]-document.documentElement[b])-T-O;a&&(C+=u[E],D+=u[E]);var x=r[S];(o?R()||L():L()||R())||function(){var e=C>D,t=s.getPropertyValue(w),n=t?parseInt(t,10):null;function o(e){hd(!n||e>=n,"<Fit />'s child will not fit anywhere with its current ".concat(w," of ").concat(n,"px."));var t=Math.max(e,n||0);hd(!1,"<Fit />'s child needed to have its ".concat(m," decreased to ").concat(t,"px.")),r.style[m]="".concat(t,"px")}e?(o(C),P()):(o(D),M())}()}function P(){r.style[p]="auto",r.style[h]=a?"0":"100%"}function M(){r.style[p]=a?"0":"100%",r.style[h]="auto"}function I(e,t){var n=x<=e;return n&&t(),n}function R(){return I(C,P)}function L(){return I(D,M)}}function Ad(e){var t=e.invertAxis,n=e.invertSecondaryAxis,r=yd(e,["invertAxis","invertSecondaryAxis"]);!function(e){Od(e)}(gd(gd({},r),{invertAxis:t})),function(e){Od(gd(gd({},e),{axis:"x"===e.axis?"y":"x",secondary:!0}))}(gd(gd({},r),{invertAxis:n}))}const Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fit=function(){var e=t,n=e.scrollContainer,r=e.container,o=e.element;if(n&&r&&o){var i=o.clientWidth,a=o.clientHeight;if(t.elementWidth!==i||t.elementHeight!==a){t.elementWidth=i,t.elementHeight=a;var l=r.parentElement;if(l){"absolute"!==window.getComputedStyle(o).position&&(o.style.position="absolute");var s=window.getComputedStyle(l).position;"relative"!==s&&"absolute"!==s&&(l.style.position="relative");var u=t.props,c=u.invertAxis,d=u.invertSecondaryAxis,f=u.mainAxis,p=void 0===f?"y":f,h=u.spacing;Ad({axis:p,container:r,element:o,invertAxis:c,invertSecondaryAxis:d,scrollContainer:n,spacing:void 0===h?8:h})}}}},t}return md(t,e),t.prototype.componentDidMount=function(){var e=this;if(!vd){var t=(0,cc.findDOMNode)(this);if(!t||!(t instanceof HTMLElement))return;this.container=t,this.element=t,this.scrollContainer=wd(t)}this.fit();Sd&&this.element&&new MutationObserver((function(){e.fit()})).observe(this.element,{attributes:!0,attributeFilter:["class","style"]})},t.prototype.render=function(){var e=this,t=this.props.children,n=G.Children.only(t);return vd?G.createElement("span",{ref:function(t){e.container=t;var n=t&&t.firstElementChild;n&&n instanceof HTMLElement&&(e.element=n,e.scrollContainer=wd(n))},style:{display:"contents"}},n):n},t.propTypes={children:dc.node.isRequired,invertAxis:dc.bool,invertSecondaryAxis:dc.bool,mainAxis:dc.oneOf(["x","y"]),spacing:dc.oneOfType([dc.number,dc.shape({bottom:dc.number.isRequired,left:dc.number.isRequired,right:dc.number.isRequired,top:dc.number.isRequired})])},t}(G.Component);function Td(e){var t=e.children;return G.createElement("span",{className:"react-time-picker__inputGroup__divider"},t)}var Dd,xd=["normal","small-caps"];function Pd(e){if(!e)return"";var t=window.getComputedStyle(e);if(t.font)return t.font;if(!(""!==t.fontFamily))return"";var n=xd.includes(t.fontVariant)?t.fontVariant:"normal";return"".concat(t.fontStyle," ").concat(n," ").concat(t.fontWeight," ").concat(t.fontSize," / ").concat(t.lineHeight," ").concat(t.fontFamily)}const Md=function(e){if("undefined"===typeof document||!e)return null;var t=Pd(e),n=function(e,t){var n=(Dd||(Dd=document.createElement("canvas"))).getContext("2d");if(!n)return null;n.font=t;var r=n.measureText(e).width;return Math.ceil(r)}(e.value||e.placeholder,t);return null===n?null:(e.style.width="".concat(n,"px"),n)};var Id="undefined"!==typeof document,Rd=Id?G.useLayoutEffect:G.useEffect,Ld=Id&&/(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent),kd=Id&&/Firefox/.test(navigator.userAgent);function jd(e){var t=e.target;Ld?requestAnimationFrame((function(){return t.select()})):t.select()}function _d(e){if(null!==e)return function(t){if(!kd){var n=t.key,r=t.target,o=r.value,i=1===n.length&&/\d/.test(n),a=function(e){if(e&&"selectionStart"in e&&null!==e.selectionStart&&"selectionEnd"in e&&null!==e.selectionEnd)return e.value.slice(e.selectionStart,e.selectionEnd);if("getSelection"in window){var t=window.getSelection();return t&&t.toString()}return null}(r);i&&(a||o.length<e)||t.preventDefault()}}}function Fd(e){var t=e.ariaLabel,n=e.autoFocus,r=e.className,o=e.disabled,i=e.inputRef,a=e.max,l=e.min,s=e.name,u=e.nameForClass,c=e.onChange,d=e.onKeyDown,f=e.onKeyUp,p=e.placeholder,h=void 0===p?"--":p,m=e.required,g=e.showLeadingZeros,y=e.step,b=e.value;Rd((function(){var e;i&&i.current&&(Md(i.current),e=i.current,"complete"!==document.readyState&&window.addEventListener("load",(function(){Md(e)})),function(e){if(document.fonts){var t=Pd(e);t&&(document.fonts.check(t)||document.fonts.addEventListener("loadingdone",(function(){Md(e)})))}}(i.current))}),[i,b]);var v=g&&b&&Number(b)<10&&("0"===b||!b.toString().startsWith("0")),S=a?a.toString().length:null;return G.createElement(G.Fragment,null,v?G.createElement("span",{className:"".concat(r,"__leadingZero")},"0"):null,G.createElement("input",{"aria-label":t,autoComplete:"off",autoFocus:n,className:mc("".concat(r,"__input"),"".concat(r,"__").concat(u||s),v&&"".concat(r,"__input--hasLeadingZero")),"data-input":"true",disabled:o,inputMode:"numeric",max:a,min:l,name:s,onChange:c,onFocus:jd,onKeyDown:d,onKeyPress:_d(S),onKeyUp:function(e){Md(e.target),f&&f(e)},placeholder:h,ref:i,required:m,step:y,type:"number",value:null!==b?b:""}))}function Nd(e,t){var n=Number(e);return"am"===t&&12===n?n=0:"pm"===t&&n<12&&(n+=12),n}function Bd(e){return[Number(e)%12||12,Number(e)<12?"am":"pm"]}var Ud=new Map;function Hd(e){return function(t,n){var r=t||Zc();Ud.has(r)||Ud.set(r,new Map);var o=Ud.get(r);return o.has(e)||o.set(e,new Intl.DateTimeFormat(r||void 0,e).format),o.get(e)(n)}}var Vd=new Map;var qd=new RegExp("[".concat(["9","\u0669"].join(""),"]")),Wd=Hd({hour:"numeric"});function zd(e){var t=Wd(e,new Date(2017,0,1,9)),n=Wd(e,new Date(2017,0,1,21)),r=t.split(qd),o=r[0],i=r[1],a=n.split(qd),l=a[0],s=a[1];if(void 0!==s){if(o!==l)return[o,l].map((function(e){return e.trim()}));if(i!==s)return[i,s].map((function(e){return e.trim()}))}return["AM","PM"]}function Qd(e){return null!==e&&!1!==e&&!Number.isNaN(Number(e))}function Gd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.min.apply(Math,e.filter(Qd))}function $d(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(Qd))}var Kd=function(){return Kd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Kd.apply(this,arguments)},Yd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Jd(e){var t=e.amPm,n=e.maxTime,r=e.minTime,o=e.value,i=Yd(e,["amPm","maxTime","minTime","value"]),a=Gd(12,n&&function(){var e=Bd(wc(n)),r=e[0];return e[1]!==t?null:r}()),l=$d(1,r&&function(){var e=Bd(wc(r)),n=e[0];return e[1]!==t||12===n?null:n}()),s=o?Bd(o)[0].toString():"";return G.createElement(Fd,Kd({max:a,min:l,name:"hour12",nameForClass:"hour",value:s},i))}var Xd=function(){return Xd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xd.apply(this,arguments)},Zd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ef(e){var t=e.maxTime,n=e.minTime,r=Zd(e,["maxTime","minTime"]),o=Gd(23,t&&wc(t)),i=$d(0,n&&wc(n));return G.createElement(Fd,Xd({max:o,min:i,name:"hour24",nameForClass:"hour"},r))}var tf=function(){return tf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tf.apply(this,arguments)},nf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function rf(e){var t=e.hour,n=e.maxTime,r=e.minTime,o=e.showLeadingZeros,i=void 0===o||o,a=nf(e,["hour","maxTime","minTime","showLeadingZeros"]);function l(e){return t===wc(e).toString()}var s=Gd(59,n&&l(n)&&Oc(n)),u=$d(0,r&&l(r)&&Oc(r));return G.createElement(Fd,tf({max:s,min:u,name:"minute",showLeadingZeros:i},a))}var of=function(){return of=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},of.apply(this,arguments)},af=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function lf(e){var t=e.hour,n=e.maxTime,r=e.minTime,o=e.minute,i=e.showLeadingZeros,a=void 0===i||i,l=af(e,["hour","maxTime","minTime","minute","showLeadingZeros"]);function s(e){return t===wc(e).toString()&&o===Oc(e).toString()}var u=Gd(59,n&&s(n)&&Ac(n)),c=$d(0,r&&s(r)&&Ac(r));return G.createElement(Fd,of({max:u,min:c,name:"second",showLeadingZeros:a},l))}function sf(e){var t=e.ariaLabel,n=e.disabled,r=e.maxTime,o=e.minTime,i=e.name,a=e.onChange,l=e.required,s=e.value,u=e.valueType,c=function(){switch(u){case"hour":return function(e){return"".concat(wc(e),":00")};case"minute":return Bc;case"second":return Uc;default:throw new Error("Invalid valueType")}}(),d=function(){switch(u){case"hour":return 3600;case"minute":return 60;case"second":return 1;default:throw new Error("Invalid valueType")}}();return G.createElement("input",{"aria-label":t,disabled:n,hidden:!0,max:r?c(r):void 0,min:o?c(o):void 0,name:i,onChange:a,onFocus:function(e){e.stopPropagation()},required:l,step:d,style:{visibility:"hidden",position:"absolute",zIndex:"-999"},type:"time",value:s?c(s):""})}function uf(e){var t=e.ariaLabel,n=e.autoFocus,r=e.className,o=e.disabled,i=e.inputRef,a=e.locale,l=e.maxTime,s=e.minTime,u=e.onChange,c=e.onKeyDown,d=e.required,f=e.value,p=!!s&&"pm"===Bd(wc(s))[1],h=!!l&&"am"===Bd(wc(l))[1],m="amPm",g=zd(a),y=g[0],b=g[1];return G.createElement("select",{"aria-label":t,autoFocus:n,className:mc("".concat(r,"__input"),"".concat(r,"__").concat(m)),"data-input":"true","data-select":"true",disabled:o,name:m,onChange:u,onKeyDown:c,ref:i,required:d,value:null!==f?f:""},!f&&G.createElement("option",{value:""},"--"),G.createElement("option",{disabled:p,value:"am"},y),G.createElement("option",{disabled:h,value:"pm"},b))}var cf=function(){return cf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cf.apply(this,arguments)},df=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ff={},pf=["hour","minute","second"];function hf(e){return"true"===e.dataset.input}function mf(e,t){var n=e;do{n=n[t]}while(n&&!hf(n));return n}function gf(e){e&&e.focus()}var yf,bf=(yf={useGrouping:!1},function(e,t){var n=e||Zc();Vd.has(n)||Vd.set(n,new Map);var r=Vd.get(n);return r.has(yf)||r.set(yf,new Intl.NumberFormat(n||void 0,yf).format),r.get(yf)(t)});function vf(e){var t=e.amPmAriaLabel,n=e.autoFocus,r=e.className,o=e.disabled,i=e.format,a=e.hourAriaLabel,l=e.hourPlaceholder,s=e.isClockOpen,u=void 0===s?null:s,c=e.locale,d=e.maxDetail,f=void 0===d?"minute":d,p=e.maxTime,h=e.minTime,m=e.minuteAriaLabel,g=e.minutePlaceholder,y=e.name,b=void 0===y?"time":y,v=e.nativeInputAriaLabel,S=e.onChange,E=e.onInvalidChange,w=e.required,O=e.secondAriaLabel,A=e.secondPlaceholder,C=e.value,T=(0,G.useState)(null),D=T[0],x=T[1],P=(0,G.useState)(null),M=P[0],I=P[1],R=(0,G.useState)(null),L=R[0],k=R[1],j=(0,G.useState)(null),_=j[0],F=j[1],N=(0,G.useState)(null),B=N[0],U=N[1],H=(0,G.useRef)(null),V=(0,G.useRef)(null),q=(0,G.useRef)(null),W=(0,G.useRef)(null),z=(0,G.useRef)(null),Q=(0,G.useState)(u),$=Q[0],K=Q[1],Y=(0,G.useRef)();(0,G.useEffect)((function(){K(u)}),[u]),(0,G.useEffect)((function(){var e=C;e?(x(Bd(wc(e))[1]),I(wc(e).toString()),k(Oc(e).toString()),F(Ac(e).toString()),U(e)):(x(null),I(null),k(null),F(null),U(null))}),[C,h,p,f,$]);var J=f,X=function(){var e=pf.indexOf(f),t=ff[e]||function(){var t={hour:"numeric"};return e>=1&&(t.minute="numeric"),e>=2&&(t.second="numeric"),ff[e]=t,t}();return Hd(t)}();var Z=i||function(){var e=new Date(2017,0,1,21,13,14);return X(c,e).replace(bf(c,9),"h").replace(bf(c,21),"H").replace(bf(c,13),"mm").replace(bf(c,14),"ss").replace(new RegExp(zd(c).join("|")),"a")}(),ee=function(){var e=Z.match(/[^0-9a-z]/i);return e?e[0]:null}();function te(){if(S){var e=[H.current,V.current,q.current,W.current,z.current].filter((function(e){return Boolean(e)})),t=e.slice(1),n={};if(e.forEach((function(e){n[e.name]="number"===e.type?"valueAsNumber"in e?e.valueAsNumber:Number(e.value):e.value})),t.every((function(e){return!e.value})))S(null,!1);else{var r=e.every((function(e){return e.value})),o=e.every((function(e){return e.validity.valid}));if(r&&o){var i=Number(n.hour24||n.hour12&&n.amPm&&Nd(n.hour12,n.amPm)||0),a=Number(n.minute||0),l=Number(n.second||0),s=function(e){return"0".concat(e).slice(-2)},u=function(e){return function(){switch(J){case"hour":case"minute":return Bc;case"second":return Uc;default:throw new Error("Invalid valueType")}}()(e)}("".concat(s(i),":").concat(s(a),":").concat(s(l)));S(u,!1)}else E&&E()}}}function ne(e){var t=e.target,n=t.name,r=t.value;switch(n){case"amPm":x(r);break;case"hour12":I(r?Nd(r,D||"am").toString():"");break;case"hour24":I(r);break;case"minute":k(r);break;case"second":F(r)}te()}function re(e){var t=e.target.value;S&&S(t||null,!1)}var oe={className:r,disabled:o,maxTime:p,minTime:h,onChange:ne,onKeyDown:function(e){switch(Y.current=e.key,e.key){case"ArrowLeft":case"ArrowRight":case ee:e.preventDefault(),gf(mf(e.target,"ArrowLeft"===e.key?"previousElementSibling":"nextElementSibling"))}},onKeyUp:function(e){var t=e.key,n=e.target;if(Y.current===t&&!isNaN(Number(t))){var r=n.getAttribute("max");if(r){var o=n.value;if(10*Number(o)>Number(r)||o.length>=r.length){gf(mf(n,"nextElementSibling"))}}}},required:Boolean(w||$)};function ie(e,t){return/h/.test(e)?function(e,t){if(e&&e.length>2)throw new Error("Unsupported token: ".concat(e));var r=!!e&&2===e.length;return G.createElement(Jd,cf({key:"hour12"},oe,{amPm:D,ariaLabel:a,autoFocus:0===t&&n,inputRef:V,placeholder:l,showLeadingZeros:r,value:M}))}(e,t):function(e,t){if(e&&e.length>2)throw new Error("Unsupported token: ".concat(e));var r=!!e&&2===e.length;return G.createElement(ef,cf({key:"hour24"},oe,{ariaLabel:a,autoFocus:0===t&&n,inputRef:q,placeholder:l,showLeadingZeros:r,value:M}))}(e,t)}function ae(e,t){if(e&&e.length>2)throw new Error("Unsupported token: ".concat(e));var r=!!e&&2===e.length;return G.createElement(rf,cf({key:"minute"},oe,{ariaLabel:m,autoFocus:0===t&&n,hour:M,inputRef:W,placeholder:g,showLeadingZeros:r,value:L}))}function le(e,t){if(e&&e.length>2)throw new Error("Unsupported token: ".concat(e));var r=!e||2===e.length;return G.createElement(lf,cf({key:"second"},oe,{ariaLabel:O,autoFocus:0===t&&n,hour:M,inputRef:z,minute:L,placeholder:A,showLeadingZeros:r,value:_}))}function se(e,r){return G.createElement(uf,cf({key:"ampm"},oe,{ariaLabel:t,autoFocus:0===r&&n,inputRef:H,locale:c,onChange:ne,value:D}))}return G.createElement("div",{className:r,onClick:function(e){e.target===e.currentTarget&&gf(e.target.children[1])}},G.createElement(sf,{key:"time",ariaLabel:v,disabled:o,maxTime:p,minTime:h,name:b,onChange:re,required:w,value:B,valueType:J}),function(e,t,n){var r=[],o=new RegExp(Object.keys(t).map((function(e){return"".concat(e,"+")})).join("|"),"g"),i=e.match(o);return e.split(o).reduce((function(e,o,a){var l=o&&G.createElement(Td,{key:"separator_".concat(a)},o),s=df(df([],e,!0),[l],!1),u=i&&i[a];if(u){var c=t[u]||t[Object.keys(t).find((function(e){return u.match(e)}))];if(!c)return s;!n&&r.includes(c)?s.push(u):(s.push(c(u,a)),r.push(c))}return s}),[])}(Z,{h:ie,H:ie,m:ae,s:le,a:se},"undefined"!==typeof i))}var Sf,Ef=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},wf=Ef([],["hour","minute","second"],!0),Of=/^(([0-1])?[0-9]|2[0-3]):[0-5][0-9](:([0-5][0-9]))?$/,Af=function(e,t,n){var r=e[t];return!r||"string"===typeof r&&Of.test(r)?null:new Error("Invalid prop `".concat(t,"` of type `").concat(typeof r,"` supplied to `").concat(n,"`, expected time in HH:mm(:ss) format."))},Cf=(dc.oneOf(wf),dc.oneOfType([dc.func,dc.exact({current:dc.any})]),function(){return Cf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cf.apply(this,arguments)}),Tf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Df="undefined"!==typeof document,xf="react-time-picker",Pf=["mousedown","focusin","touchstart"],Mf={xmlns:"http://www.w3.org/2000/svg",width:19,height:19,viewBox:"0 0 19 19",stroke:"black",strokeWidth:2},If=G.createElement("svg",Cf({},Mf,{className:"".concat(xf,"__clock-button__icon ").concat(xf,"__button__icon"),fill:"none"}),G.createElement("circle",{cx:"9.5",cy:"9.5",r:"7.5"}),G.createElement("path",{d:"M9.5 4.5 v5 h4"})),Rf=G.createElement("svg",Cf({},Mf,{className:"".concat(xf,"__clear-button__icon ").concat(xf,"__button__icon")}),G.createElement("line",{x1:"4",x2:"15",y1:"4",y2:"15"}),G.createElement("line",{x1:"15",x2:"4",y1:"4",y2:"15"})),Lf=function(e){var t=e.amPmAriaLabel,n=e.autoFocus,r=e.className,o=e.clearAriaLabel,i=e.clearIcon,a=void 0===i?Rf:i,l=e.clockAriaLabel,s=e.clockIcon,u=void 0===s?If:s,c=e.closeClock,d=void 0===c||c,f=e["data-testid"],p=e.hourAriaLabel,h=e.hourPlaceholder,m=e.disableClock,g=e.disabled,y=e.format,b=e.id,v=e.isOpen,S=void 0===v?null:v,E=e.locale,w=e.maxTime,O=e.maxDetail,A=void 0===O?"minute":O,C=e.minTime,T=e.minuteAriaLabel,D=e.minutePlaceholder,x=e.name,P=void 0===x?"time":x,M=e.nativeInputAriaLabel,I=e.onClockClose,R=e.onClockOpen,L=e.onChange,k=e.onFocus,j=e.onInvalidChange,_=e.openClockOnFocus,F=void 0===_||_,N=e.required,B=e.value,U=e.secondAriaLabel,H=e.secondPlaceholder,V=e.shouldCloseClock,q=e.shouldOpenClock,W=Tf(e,["amPmAriaLabel","autoFocus","className","clearAriaLabel","clearIcon","clockAriaLabel","clockIcon","closeClock","data-testid","hourAriaLabel","hourPlaceholder","disableClock","disabled","format","id","isOpen","locale","maxTime","maxDetail","minTime","minuteAriaLabel","minutePlaceholder","name","nativeInputAriaLabel","onClockClose","onClockOpen","onChange","onFocus","onInvalidChange","openClockOnFocus","required","value","secondAriaLabel","secondPlaceholder","shouldCloseClock","shouldOpenClock"]),z=(0,G.useState)(S),Q=z[0],$=z[1],K=(0,G.useRef)(null),Y=(0,G.useRef)(null);function J(e){var t=e.reason;q&&!q({reason:t})||($(!0),R&&R())}(0,G.useEffect)((function(){$(S)}),[S]);var X=(0,G.useCallback)((function(e){var t=e.reason;V&&!V({reason:t})||($(!1),I&&I())}),[I,V]);function Z(){Q?X({reason:"buttonClick"}):J({reason:"buttonClick"})}function ee(e,t){void 0===t&&(t=d),t&&X({reason:"select"}),L&&L(e)}var te=(0,G.useCallback)((function(e){"Escape"===e.key&&X({reason:"escape"})}),[X]);function ne(){ee(null)}function re(e){e.stopPropagation()}var oe=(0,G.useCallback)((function(e){var t=K.current,n=Y.current,r="composedPath"in e?e.composedPath()[0]:e.target;!r||!t||t.contains(r)||n&&n.contains(r)||X({reason:"outsideAction"})}),[Y,X,K]),ie=(0,G.useCallback)((function(e){void 0===e&&(e=Q),Pf.forEach((function(t){e?document.addEventListener(t,oe):document.removeEventListener(t,oe)})),e?document.addEventListener("keydown",te):document.removeEventListener("keydown",te)}),[Q,oe,te]);(0,G.useEffect)((function(){return ie(),function(){ie(!1)}}),[ie]);var ae=(0,G.useMemo)((function(){return function(e,t){var n={};return pc.forEach((function(r){var o=e[r];o&&(n[r]=t?function(e){return o(e,t(r))}:o)})),n}(W)}),[W]);return G.createElement("div",Cf({className:mc(xf,"".concat(xf,"--").concat(Q?"open":"closed"),"".concat(xf,"--").concat(g?"disabled":"enabled"),r),"data-testid":f,id:b},ae,{onFocus:function(e){k&&k(e),g||Q||!F||"true"===e.target.dataset.select||J({reason:"focus"})},ref:K}),function(){var e=(Array.isArray(B)?B:[B])[0],r={amPmAriaLabel:t,hourAriaLabel:p,minuteAriaLabel:T,nativeInputAriaLabel:M,secondAriaLabel:U},i={hourPlaceholder:h,minutePlaceholder:D,secondPlaceholder:H};return G.createElement("div",{className:"".concat(xf,"__wrapper")},G.createElement(vf,Cf({},r,i,{autoFocus:n,className:"".concat(xf,"__inputGroup"),disabled:g,format:y,isClockOpen:Q,locale:E,maxDetail:A,maxTime:w,minTime:C,name:P,onChange:ee,onInvalidChange:j,required:N,value:e})),null!==a&&G.createElement("button",{"aria-label":o,className:"".concat(xf,"__clear-button ").concat(xf,"__button"),disabled:g,onClick:ne,onFocus:re,type:"button"},"function"===typeof a?G.createElement(a):a),null!==u&&!m&&G.createElement("button",{"aria-label":l,className:"".concat(xf,"__clock-button ").concat(xf,"__button"),disabled:g,onClick:Z,onFocus:re,type:"button"},"function"===typeof u?G.createElement(u):u))}(),function(){if(null===Q||m)return null;var t=e.clockClassName,n=(e.className,e.onChange,e.portalContainer),r=e.value,o=Tf(e,["clockClassName","className","onChange","portalContainer","value"]),i="".concat(xf,"__clock"),a=mc(i,"".concat(i,"--").concat(Q?"open":"closed")),l=(Array.isArray(r)?r:[r])[0],s=G.createElement(dd,Cf({className:t,value:l},o));return n?(0,cc.createPortal)(G.createElement("div",{ref:Y,className:a},s),n):G.createElement(Cd,null,G.createElement("div",{ref:function(e){e&&!Q&&e.removeAttribute("style")},className:a},s))}())},kf=dc.oneOfType([Af,dc.instanceOf(Date)]),jf=dc.oneOfType([kf,(Sf=kf,dc.arrayOf(Sf))]);Lf.propTypes={amPmAriaLabel:dc.string,autoFocus:dc.bool,className:dc.oneOfType([dc.string,dc.arrayOf(dc.string)]),clearAriaLabel:dc.string,clearIcon:dc.oneOfType([dc.node,dc.func]),clockAriaLabel:dc.string,clockClassName:dc.oneOfType([dc.string,dc.arrayOf(dc.string)]),clockIcon:dc.oneOfType([dc.node,dc.func]),closeClock:dc.bool,"data-testid":dc.string,disableClock:dc.bool,disabled:dc.bool,format:dc.string,hourAriaLabel:dc.string,hourPlaceholder:dc.string,id:dc.string,isOpen:dc.bool,locale:dc.string,maxDetail:dc.oneOf(["hour","minute","second"]),maxTime:Af,minTime:Af,minuteAriaLabel:dc.string,minutePlaceholder:dc.string,name:dc.string,nativeInputAriaLabel:dc.string,onChange:dc.func,onClockClose:dc.func,onClockOpen:dc.func,onFocus:dc.func,openClockOnFocus:dc.bool,required:dc.bool,secondAriaLabel:dc.string,secondPlaceholder:dc.string,value:jf},Df&&(Lf.propTypes.portalContainer=dc.instanceOf(HTMLElement));const _f=Lf;function Ff(e){return Ut()("ConfigurationParameter.Label.".concat(e))}function Nf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Bf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uf="HH:mm:ss";function Hf(e){var t=e.name,n=e.defaultTime,r=e.maxTime,o=e.minTime,i=e.className,a=Ut(),l=oc(),s=l.inEdit,u=l.configurations,c=ic(),d=c.setParameter,f=c.resetParameter,p=(0,G.useMemo)((function(){return Vf(r)}),[r]),h=(0,G.useMemo)((function(){return Vf(o)}),[o]),m=u[t],g=Nf((0,G.useState)(m!==n),2),y=g[0],b=g[1],v=(0,G.useCallback)((function(e){b(e.target.checked),e.target.checked||d(t,n)}),[t,n,b,d]),S=(0,G.useCallback)((function(e){if(null!==e){var n=e?Vf(e):0;d(t,n<=h?o:n>=p?r:e)}else f(t)}),[t,d,f,h,o,p,r]),E=Ff(t);return(0,G.useEffect)((function(){s||b(m!==n)}),[s,m,n,b]),$().createElement("div",{className:"tenant-cfg-param cfg-param-polling".concat(i?" ".concat(i):"")},$().createElement(Ft.Toggle,{id:"cfg-param__toggle-default__".concat(t.replaceAll(".","-")),checked:y,rightLabel:E,disabled:!s,className:"cfg-param-boolean__toggle",onChange:v}),$().createElement("div",{className:"cfg-param-polling__help"},$().createElement(tn.InfoButton,{popoverHeading:a("ConfigurationParameter.Info.Heading.Polling"),fontSize:22},a("ConfigurationParameter.Info.Text.Polling",{format:Uf}))),$().createElement(_f,{value:m,maxDetail:"second",disableClock:!0,format:Uf,maxTime:r,minTime:o,clearIcon:null,onChange:S,disabled:!s||!y,id:ac(t)}),$().createElement(lc,{configParamName:t}))}function Vf(e){var t=e.split(":").map((function(e){return parseInt(e,10)})),n=Nf(t,3),r=n[0],o=n[1];return 1e3*n[2]+60*o*1e3+60*r*60*1e3}function qf(e){var t=e.value,n=e.label,r=e.showCopy,o=e.className,i=e.stack,a=void 0!==i&&i,l=e.children,s=[a?"labeled-slot--stacked":void 0,o].filter((function(e){return!!e})).join(" ");return $().createElement("section",{className:"labeled-slot".concat(s?" "+s:"")},$().createElement("h6",{className:"labeled-slot--label -size-m"},n),$().createElement("div",{className:"labeled-slot--content".concat(r?" show-copy":"")},l||$().createElement("span",null,t),r&&$().createElement(tn.CopyToClipButton,{value:t,className:"labeled-slot--copy"})))}function Wf(){var e=Ut(),t=oc(),n=t.inEdit,r=t.configurations,o=ic().setParameter,i=r[Tu],a=r[Du],l=(0,G.useCallback)((function(){o(Du,function(){var e=new Uint16Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e,(function(e){return("0"+(255&e).toString(16)).slice(-2)})).join("")}())}),[o]);return(0,G.useEffect)((function(){n&&i&&!a&&l()}),[n,a,i,l]),$().createElement("div",{className:"configurations--gw-auth"},$().createElement(sc,{name:Tu,after:$().createElement("div",{className:"cfg-param-layout --reset"},$().createElement("div",{className:"configurations--gw-token"},$().createElement(tn.TextSecret,{timeout:1e4,disabled:!a},a),$().createElement(tn.CopyToClipButton,{value:a,disabled:!a}),n&&$().createElement(Ft.Button,{title:e("ConfigurationParameter.Title.Regenerate.".concat(Du)),className:"-size-s",icon:"rotation",mode:"integrated",onClick:l})),$().createElement(lc,{configParamName:Du})),showAfter:r[Tu]}))}const zf=l.p+"static/DSConfig.415304f0.md",Qf=l.p+"static/RolloutsConfig.ec9450ea.md",Gf=l.p+"static/PollingConfig.1390eb61.md",$f=l.p+"static/ArtifactDeliveryConfig.1ae0b6b2.md",Kf=l.p+"static/DDIApi.aa0f46d6.md",Yf=l.p+"static/AuthenticationConfig.8cfab857.md",Jf=l.p+"static/ManagementApi.65d6989c.md";function Xf(e){return!e.startsWith("error, no translation for ")}l(9249),l(9675);var Zf=["value","onValueChange","min","max","emptyValue","selectOnFocus"];function ep(){return ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(this,arguments)}function tp(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var np=/^-?\d+$/,rp=(0,G.forwardRef)((function(e,t){var n=e.value,r=e.onValueChange,o=e.min,i=void 0===o?Number.MIN_SAFE_INTEGER:o,a=e.max,l=void 0===a?Number.MAX_SAFE_INTEGER:a,s=e.emptyValue,u=void 0===s?0:s,c=e.selectOnFocus,d=tp(e,Zf),f=(0,G.useCallback)((function(e){var t=e.target.value,n=u;if(t){if(!np.test(t))return void e.preventDefault();n=parseInt(e.target.value,10)}r(n,function(e,t,n){return!(e<t||e>n)}(n,i,l)),e.stopPropagation()}),[u,i,l,r]),p=(0,G.useCallback)((function(e){var t=n;if("number"===typeof t){switch(e.key){case"ArrowDown":if(--t<i)return;break;case"ArrowUp":if(++t>l)return;break;default:return}t>l?t=l:t<i&&(t=i),r(t,!0)}}),[n,i,l,r]),h=(0,G.useCallback)((function(e){c&&e.target.select()}),[c]);return $().createElement(Ft.TextField,ep({value:n,onChange:f,onKeyDown:p,onFocus:h},d,{ref:t}))}));var op={toView:function(e){return e},fromView:function(e){return e}};function ip(e){var t=e.name,n=e.min,r=e.max,o=e.emptyValue,i=e.errorMessageTranslationId,a=void 0===i?"ConfigurationParameter.Validation.Range.ErrorMessage":i,l=e.valueConverter,s=void 0===l?op:l,u=Ut(),c=oc(),d=c.inEdit,f=c.configurations,p=c.invalidConfigurations,h=ic().setParameter,m=(0,G.useMemo)((function(){return ac(t)}),[t]),g=(0,G.useCallback)((function(e,o){var i=o?null:u(a,{min:n,max:r});h(t,s.fromView(e),i)}),[u,t,h,a,n,r,s]),y=p[t],b=Ff(t),v=u("ConfigurationParameter.Info.Text.".concat(t),{min:n,max:r}),S=u("ConfigurationParameter.Info.Heading.".concat(t)),E=$().createElement($().Fragment,null,b,Xf(v)&&$().createElement(tn.InfoButton,{fontSize:16,popoverHeading:Xf(S)?S:b},v));return $().createElement("div",{className:"tenant-cfg-param cfg-param-integer cfg-param-layout --notification"},$().createElement(rp,{className:"cfg-param__field",label:E,id:m,onValueChange:g,value:s.toView(f[t]),disabled:!d,min:n,max:r,emptyValue:o,selectOnFocus:!0}),$().createElement(lc,{configParamName:t,className:"cfg-param__reset"}),y&&$().createElement(Ft.Notification,{type:"error",className:"cfg-param__notification"},y))}function ap(){var e=Ut(),t=oc(),n=t.inEdit,r=t.configurations,o=t.invalidConfigurations,i=ic().setParameter,a=(0,G.useMemo)((function(){return e("ConfigurationParameter.Validation.Required.".concat(xu))}),[e]),l=r[xu],s=(0,G.useCallback)((function(e){var t=e.target.value;i(xu,t,t?null:a)}),[i,a]),u=Ff(xu),c=o[xu];return $().createElement(sc,{className:"authentication-header",name:Pu,after:$().createElement("div",{className:"tenant-cfg-param cfg-param-layout --notification --full-width"},$().createElement("div",{className:"authentication-header__authority cfg-param__field"},$().createElement(Ft.TextField,{id:"input-".concat(xu),label:$().createElement($().Fragment,null,u,n&&$().createElement(tn.RequiredIcon,null)),value:r[xu],onChange:s,disabled:!n}),l&&$().createElement(tn.CopyToClipButton,{value:l})),$().createElement(lc,{configParamName:xu,className:"cfg-param__reset"}),c&&$().createElement(Ft.Notification,{type:"error",className:"cfg-param__notification"},c)),showAfter:r[Pu]})}function lp(){var e=Ut(),t=oc(),n=t.inEdit,r=t.configurations,o=ic().setParameter,i=(0,G.useCallback)((function(e){o(Au,e.target.value,null)}),[o]),a=Ff(Au);return $().createElement(sc,{className:"action-cleanup",name:Cu,after:$().createElement($().Fragment,null,$().createElement("div",{className:"tenant-cfg-param cfg-param-layout --reset"},$().createElement(Ft.Dropdown,{id:ac(Au),className:"rollouts-configuration-parameter cfg-param__field",label:a,options:sp,value:r[Au],onChange:i,disabled:!n}),$().createElement(lc,{configParamName:Au})),$().createElement(ip,{name:Ou,min:1,max:1e3,emptyValue:1,errorMessageTranslationId:"ConfigurationParameter.Validation.Range.Days.ErrorMessage",valueConverter:cp}),n&&$().createElement(Ft.Notification,{type:"warning"},e("ConfigurationParameter.Enabled.Warning.".concat(Cu)))),showAfter:r[Cu]})}var sp=[{name:Wu,value:Wu},{name:zu,value:zu},{name:Qu.split(",").join(" + "),value:Qu}],up=864e5,cp={toView:function(e){return Math.round(e/up)},fromView:function(e){return e*up}};function dp(e){var t=e.onRetry,n=Ut();return $().createElement($().Fragment,null,$().createElement("span",null,n("RetryOnError.Message.Start")),$().createElement(Ft.Button,{className:"retry-on-error--button",mode:"integrated",onClick:t},$().createElement("span",null,n("RetryOnError.Message.Retry"))),$().createElement("span",null,n("RetryOnError.Message.End")))}function fp(){var e=Ut(),t=oc(),n=t.inEdit,r=t.configurations,o=t.invalidConfigurations,i=ic().setParameter,a=Fn(Su.distributionSetTypesList(),pi,{limit:500}),l=a.data,s=a.isLoading,u=a.error,c=a.refetch,d=Dn(l).entities,f=(0,G.useMemo)((function(){return d.map((function(e){return{name:e.name,value:e.id}}))}),[d]),p=r[Uu],h=Ff(Uu),m=(0,G.useCallback)((function(e){i(Uu,parseInt(e.target.value,10),null)}),[i]),g=(0,G.useCallback)((function(t,n){i(Uu,t,n?null:e("ConfigurationParameter.Validation.Id.".concat(Uu)))}),[e,i]),y=o[Uu],b=(0,G.useMemo)((function(){return n?y||null:u?$().createElement($().Fragment,null,$().createElement("span",null,u.message,".")," ",$().createElement(dp,{onRetry:c})):null}),[c,u,n,y]);return s?$().createElement(Ft.ProgressIndicator,{type:"indeterminate","data-testid":"tenant-configs-ds-types-loading"}):u?$().createElement("div",{className:"tenant-cfg-param cfg-param-layout --notification"},$().createElement(rp,{label:h,id:ac(Uu),className:"cfg-param__field",onValueChange:g,value:p,min:0,emptyValue:0,selectOnFocus:!0,disabled:!n}),$().createElement(lc,{configParamName:Uu,className:"cfg-param__reset"}),b&&$().createElement(Ft.Notification,{type:"error",className:"cfg-param__notification"},b)):$().createElement("div",{className:"tenant-cfg-param cfg-param-layout --reset"},$().createElement(Ft.Dropdown,{id:ac(Uu),className:"cfg-param__field",label:h,options:f,value:p,onChange:m,disabled:!n}),$().createElement(lc,{configParamName:Uu}))}function pp(){var e=Ut(),t=Nt().state.shell,n=oc(),r=n.inEdit,o=n.configurations,i=t.getDdiProtocol(),a=t.resolveMgmtApiUrl("v1");return $().createElement("div",{className:"rollouts-configurations".concat(r?" --in-edit":"")},$().createElement("div",null,$().createElement(uc,{title:e("ConfigurationsSection.Title.DS"),helpPath:zf},$().createElement(fp,null),$().createElement(sc,{name:Hu})),$().createElement(uc,{title:e("ConfigurationsSection.Title.Rollouts"),helpPath:Qf},$().createElement(sc,{name:ku}),$().createElement(sc,{name:ju,disabled:o[Lu]}),o[Lu]&&$().createElement(sc,{name:Lu,disabled:!0}),$().createElement(sc,{name:Bu}),$().createElement(lp,null)),$().createElement(uc,{title:e("ConfigurationsSection.Title.Polling"),helpPath:Gf},$().createElement(Hf,{name:Fu,defaultTime:Vu,maxTime:"23:59:59",minTime:"00:00:30",className:Fu}),$().createElement(Hf,{name:_u,defaultTime:qu,maxTime:"23:59:59",minTime:"00:05:00",className:_u})),$().createElement(uc,{title:e("ConfigurationsSection.Title.ArtifactDelivery"),helpPath:$f},$().createElement(ip,{name:Iu,min:30,max:365,emptyValue:30,errorMessageTranslationId:"ConfigurationParameter.Validation.Range.Days.ErrorMessage"}))),$().createElement("div",null,$().createElement(uc,{title:e("ConfigurationsSection.Title.DDI"),helpPath:Kf},i&&$().createElement($().Fragment,null,$().createElement(qf,{label:e("ConfigurationParameter.Label.DDI.URL"),value:i.baseUrl,showCopy:!0},$().createElement("i",{className:"rollouts-configurations-url"},i.baseUrl)),$().createElement(qf,{label:e("ConfigurationParameter.Label.DDI.URL.CertAuth"),value:i.certBaseUrl,showCopy:!0,stack:!0},$().createElement("i",{className:"rollouts-configurations-url"},i.certBaseUrl))),$().createElement(uc,{title:e("ConfigurationsSection.Title.DDI.Auth"),helpPath:Yf,subsection:!0},$().createElement(ap,null),$().createElement(sc,{name:Mu}),$().createElement(Wf,null))),$().createElement(uc,{title:e("ConfigurationsSection.Title.Management"),helpPath:Jf},$().createElement(qf,{label:e("ConfigurationParameter.Label.Management.URL"),value:a,showCopy:!0},$().createElement("i",{className:"rollouts-configurations-url"},a)))))}function hp(){var e,t=Ut(),n=Ht(),r=Vt(),o=(0,G.useRef)(null),i=Eu(),a=i.data,l=i.error,s=i.isLoading,u=i.isFetching,c=i.refetch,d=oc(),f=d.inEdit,p=d.effectiveInvalidConfigsCount,h=d.changes,m=ic(),g=m.setInEdit,y=m.initialize,b=m.resetConfigurations,v=(e={onMutate:function(){o.current=n("progress",{message:t("ConfigurationsSaveModal.Label.Loading"),noCancel:!0})},onSuccess:function(){g(!1),r(t("ConfigurationsSaveModal.Label.Success"))},onError:function(){n("error",{message:t("ConfigurationsSaveModal.Label.Error"),noCancel:!0})},onSettled:function(){var e;null===(e=o.current)||void 0===e||e.call(o),o.current=null}},Yn(Su.update(),ci,e)).mutate,S=(0,G.useCallback)((function(){c({throwOnError:!0,cancelRefetch:!1})}),[c]),E=(0,G.useCallback)((function(){g(!0)}),[g]),w=(0,G.useCallback)((function(){g(!1),b()}),[g,b]),O=(0,G.useCallback)((function(){h&&v(h,{onSuccess:S})}),[v,h,S]);return(0,G.useEffect)((function(){a&&y(a)}),[a,y]),(0,ki.unstable_usePrompt)({message:(0,G.useMemo)((function(){return t("Configurations.LeavePage.UnsavedChanges.Confiramation")}),[t]),when:!!h}),l?$().createElement(tn.ErrorState,{error:l}):s?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"tenant-configs-loading"})):$().createElement("div",{className:"rollouts-configurations-blade"},!f&&$().createElement("div",{className:"rollouts-configurations-actions --actions-top"},$().createElement("div",{className:"--content"},$().createElement(Ft.Button,{icon:"refresh",mode:"integrated",onClick:S,title:t("Button.Refresh"),disabled:u,"aria-label":"refresh-configurations"}),$().createElement(Ft.Button,{icon:"edit",mode:"integrated",onClick:E,title:t("Button.Edit"),"aria-label":"edit-configurations"}))),$().createElement(pp,null),f&&$().createElement("div",{className:"rollouts-configurations-actions --actions-bottom"},$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:t("Button.Cancel"),onClick:w,"aria-label":"cancel-edit-configurations"}),$().createElement(Ft.Button,{mode:"primary",label:t("Button.Save"),onClick:O,disabled:!!p||!h,"aria-label":"update-configurations"}))))}function mp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mp(Object(n),!0).forEach((function(t){yp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}hp.displayName="ConfigurationsBlade",hp.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("ConfigurationsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("ConfigurationsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:gu}))))};var bp={component:hp,name:hp.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(hp.Header,null),onClose:function(){}}};function vp(){var e=(0,G.useMemo)((function(){return[gp({},bp)]}),[]);return $().createElement(rc,null,$().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}}))}function Sp(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(Va())},toDetails:function(t){e(Va(t))}}}(e)}),[e])}function Ep(e){var t=e.createdAt,n=e.createdBy,r=e.lastModifiedAt,o=e.lastModifiedBy,i=Ut();return $().createElement($().Fragment,null,t&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.CreatedAt")},(0,tn.parseTimestamp)(t)),n&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.CreatedBy")},va(n)),r&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.LastModifiedAt")},(0,tn.parseTimestamp)(r)),o&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.LastModifiedBy")},va(o)))}function wp(e){return function(e){if(Array.isArray(e))return Op(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Op(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Op(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Op(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ap={all:["distributionSetTypes"],add:function(){return[].concat(wp(Ap.all),["add"])},lists:function(){return[].concat(wp(Ap.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(wp(Ap.lists()),[e])},details:function(){return[].concat(wp(Ap.all),["details"])},dstDetails:function(e){return[].concat(wp(Ap.details()),[e])},update:function(e){return[].concat(wp(Ap.dstDetails(e)),["update"])},delete:function(e){return[].concat(wp(Ap.all),[e,"delete"])},listCompatibleSMTypes:function(e,t){return[].concat(wp(Ap.dstDetails(e)),[t])}};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dp(e,t,n){return Fn(Ap.listCompatibleSMTypes(e,t),"".concat(pi,"/").concat(e,"/").concat(t),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cp(Object(n),!0).forEach((function(t){Tp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({limit:100},n))}const xp=l.p+"static/DistributionSetTypeCompatibleSM.e184c26e.md";function Pp(e){var t,n,r=e.dsTypeId,o=Dp(r,"mandatorymoduletypes"),i=(null===(t=o.data)||void 0===t?void 0:t.pages[0])||[],a=Dp(r,"optionalmoduletypes"),l=(null===(n=a.data)||void 0===n?void 0:n.pages[0])||[];return $().createElement($().Fragment,null,$().createElement(Mp,{data:i,isLoading:o.isLoading,error:o.error,title:"DistributionSetType.Details.MandatorySM.Title"}),$().createElement(Ft.Divider,null),$().createElement(Mp,{data:l,isLoading:a.isLoading,error:a.error,title:"DistributionSetType.Details.OptionalSM.Title"}))}function Mp(e){var t=e.data,n=e.title,r=e.isLoading,o=e.error,i=Ut(),a=[{header:i("Entity.Label.Name"),fieldName:"name",resolveCellTitle:function(e){return e.name}},{header:i("Entity.Label.Description"),fieldName:"description",resolveCellTitle:function(e){return e.description}}];return $().createElement(tn.SectionGroup,{label:"",className:"compatible-sm-types"},$().createElement(tn.LabelledSection,{header:i(n),expandable:!0,expanded:!0,popoverHeading:i(n),help:$().createElement(tn.Documentation,{markdownFilePath:xp})},$().createElement("div",{style:{width:"100%"}},o?$().createElement(tn.ErrorState,{error:o}):$().createElement($().Fragment,null,t.length>0&&$().createElement(tn.Margin,{aligned:["top","bottom"]},$().createElement(Ft.CommandBar,{content:i("Entity.Total",{count:t.length})})),$().createElement("div",{className:"unsetHeight"},$().createElement(Ft.DataList,{hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:i("DistributionSetType.CompatibleSM.EmptyList"),columns:a,items:t},r&&$().createElement(tn.InlineLoadingIndicator,null)))))))}function Ip(e){var t=e.data,n=Ut(),r=t.id,o=t.key,i=t.name,a=t.description,l=t.createdAt,s=t.createdBy,u=t.lastModifiedAt,c=t.lastModifiedBy,d=t.deleted;return $().createElement($().Fragment,null,$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.ID"),value:r.toString()}),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Key"),value:o}),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Name"),value:i}),a&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},a),$().createElement(tn.LabelledSection,{header:n("DistributionSetTypes.Details.Deleted"),value:n(d?"Global.Yes":"Global.No")}),$().createElement(Ep,{createdAt:l,createdBy:s,lastModifiedAt:u,lastModifiedBy:c})),$().createElement(Ft.Divider,null),$().createElement(Pp,{dsTypeId:r}))}var Rp=["showConfirmation"];function Lp(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kp="DistributionSetTypesAddModal",jp="DistributionSetTypesUpdateModal";function _p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Fp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Np(e){var t=e.dsType,n=Ut(),r=function(e){var t=Ut(),n=Sp(),r=ue(),o=sr("".concat(pi,"/").concat(e.id),{headline:t("DistributionSetType.DeleteConfirmation.Header"),message:t("DistributionSetType.DeleteConfirmation.Message"),entityText:e.name,successMessage:t("DistributionSetType.DeleteSuccess.Message")},{mutationKey:[Ap.delete(e.id)],onSuccess:function(){r.resetQueries(Ap.lists())}}),i=o.showConfirmation,a=Lp(o,Rp);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),o=_p(r,2),i=o[0],a=o[1],l=Ht();return $().createElement($().Fragment,null,$().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n("DistributionSetType.Actions.Title")},$().createElement(Ft.MenuItem,{label:n("Button.Edit"),icon:"edit",onClick:function(){return l(jp,{initialEntry:t})},title:n("DistributionSetType.Actions.Edit.Tooltip")}),$().createElement(Ft.MenuItem,{label:n("Button.Delete"),icon:"delete",onClick:i,title:n("DistributionSetType.Actions.Delete.Tooltip"),disabled:a.isLoading})))}const Bp=l.p+"static/DistributionSetTypeDetails.c962e613.md";function Up(){var e=(0,ki.useParams)().id,t=function(e){return Es(Ap.dstDetails(e),"".concat(pi,"/").concat(e),{enabled:"number"===typeof e})}(e?parseInt(e,10):void 0),n=t.data,r=t.isLoading,o=t.error;return o?$().createElement(tn.ErrorState,{error:o}):r?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(Np,{dsType:n}),$().createElement(Ip,{data:n}))}Up.displayName="DistributionSetTypeDetailsBlade",Up.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("DistributionSetTypes.DetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("DistributionSetTypes.DetailsBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:Bp})))};var Hp=function(e){return"name==".concat(e,",key==").concat(e,",description==").concat(e)};function Vp(e,t){var n=wn(e,{search:{convertToQParam:Hp}});return Fn(Ap.list(n),pi,n,t)}var qp=function(e){return[Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]};function Wp(e){return function(e){if(Array.isArray(e))return Gp(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Qp(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qp(e,t){if(e){if("string"===typeof e)return Gp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gp(e,t):void 0}}function Gp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $p="distribution-set-types";function Kp(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.selectedId,i=e.searchKey,a=e.searchColumns,l=e.fetchMoreData,s=e.onRefresh,u=e.onSelect,c=e.onSearchChange,d=e.onSearchKeyChange,f=Ut(),p=Ht(),h=function(){var e=Ut();return(0,G.useMemo)((function(){return[Ea(e("Entity.Label.ID"),"id"),Ea(e("Entity.Label.Name"),"name",{isDefault:!0}),Ea(e("Entity.Label.Description"),"description",{isDefault:!0}),Ea(e("DistributionSetTypes.List.Key"),"key")].concat(Wp(qp(e)),[wa(e("DistributionSetTypes.List.DeletedFlag"),"deleted",e)])}),[e])}(),m=zp((0,G.useState)(h),2),g=m[0],y=m[1],b=(0,G.useMemo)((function(){return t.find((function(e){return e.id===o}))}),[t,o]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,onRefresh:s,refreshDisabled:r,columnSelectorProps:{allColumns:h,onColumnSelectionChange:y,typeName:$p},content:$().createElement(hs,{keyedSearchId:"".concat($p,"-search"),keys:a,searchKey:i,onSearchChange:c,onSearchKeyChange:d}),mainAction:$().createElement(Ft.Button,{title:f("DistributionSetTypes.Add"),icon:"add",mode:"integrated",onClick:function(){var e=p(kp,{onCancel:function(){return e()}})}})}),$().createElement(Ft.DataList,{items:t,columns:g,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:f("DistributionSetTypes.List.Empty"),onScrollToBottom:l,onSelect:function(e){return null===u||void 0===u?void 0:u(e.id)},selected:b},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"distribution-set-types-list-loading"})))}const Yp=l.p+"static/DistributionSetTypesList.8f09d95c.md";function Jp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Xp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Zp={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description","DistributionSetTypes.List.Key":"key"};function eh(){var e=Sp(),t=Jp((0,G.useState)("Entity.Label.Name"),2),n=t[0],r=t[1],o=Jp((0,G.useState)(),2),i=o[0],a=o[1],l=Hi().currentFilter,s=(0,ki.useParams)().id,u=s?parseInt(s,10):void 0,c=Vp({sort:"name:ASC",q:Ms(l,[Zp[n]],i)}),d=c.data,f=c.isLoading,p=c.isFetchingNextPage,h=c.error,m=c.fetchNextPage,g=ue();var y=(0,G.useCallback)((function(e){i!==e&&a(e)}),[i]);if(h)return $().createElement(tn.ErrorState,{error:h});var b=Dn(d),v=b.entities,S=b.totalCount;return $().createElement(Kp,{data:v,totalCount:S,loadingData:f||p,searchKey:n,searchColumns:Object.keys(Zp),fetchMoreData:m,onRefresh:function(){g.resetQueries({queryKey:Ap.lists()}).catch(console.error)},onSearchChange:y,onSearchKeyChange:function(e){return r(e)},onSelect:function(t){e.toDetails(t)},selectedId:u})}function th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?th(Object(n),!0).forEach((function(t){rh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):th(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}eh.displayName="DistributionSetTypesListBlade",eh.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("DistributionSetTypes.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("DistributionSetTypes.ListBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:Yp})))};var oh={component:eh,name:eh.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(eh.Header,null),showCloseButton:!1}},ih={component:Up,name:Up.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(Up.Header,null)}},ah=function(){var e=Sp(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[oh,nh(nh({},ih),{},{defaults:nh(nh({},ih.defaults),{},{onClose:e.toHome})})]:[oh]}),[t,e.toHome]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})},lh=Ei,sh="v1/distributionsettags";function uh(e){return function(e){if(Array.isArray(e))return ch(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return ch(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ch(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ch(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dh={lists:function(e){return[e,"list"]},list:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_n;return[].concat(uh(dh.lists(e)),[t])},add:function(e){return[e,"add"]},assign:function(e){return[e,"assign"]},unassign:function(e){return[e,"unassign"]},delete:function(e,t){return[e,t,"delete"]}};function fh(e,t){return Fn(dh.list(e,t),e,t)}const ph=l.p+"static/DistributionSetTagsList.5ef74b95.md";var hh=["showConfirmation"];function mh(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function gh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return yh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bh(e,t,n){var r={isDefault:!0,isSortable:!0};return[Ea(e("Entity.Label.ID"),"id",{isSortable:!0}),Ea(e("Entity.Label.Name"),"name",r),Ea(e("Entity.Label.Description"),"description",r),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy"),{header:e("Tags.List.Actions"),data:{columnId:"actions",isDefault:!0},onRenderHeader:function(){return null},renderCell:function(e){return $().createElement(vh,{tag:e,tagsEndpoint:t,actions:n})},cellStyle:{padding:0}}]}function vh(e){var t=e.tagsEndpoint,n=e.tag,r=e.actions,o=void 0===r?[]:r;return $().createElement("div",{className:"action-buttons"},o.map((function(e){var t;return $().createElement(Ft.Button,{key:e.icon,mode:"integrated",icon:{iconName:e.icon,title:e.title},onClick:function(){return e.action(n)},disabled:null!==(t=e.disabled)&&void 0!==t&&t})})),$().createElement(Sh,{tag:n,tagsEndpont:t}))}function Sh(e){var t=e.tagsEndpont,n=e.tag,r=Ut(),o=function(e,t){var n=Ut(),r=ue(),o=sr("".concat(e,"/").concat(t.id),{headline:n("Tags.Delete.Confirmation.Header"),message:n("Tags.Delete.Confirmation.Message"),entityText:t.name,successMessage:n("Tags.Delete.Success")},{mutationKey:[dh.delete(e,t.id)],onSuccess:function(){r.resetQueries(dh.lists(e))}});return[o.showConfirmation,mh(o,hh)]}(t,n),i=gh(o,2),a=i[0],l=i[1];return $().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"delete",title:r("Tags.Delete.Tooltip")},onClick:a,disabled:l.isLoading})}function Eh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Ut();return(0,G.useMemo)((function(){return bh(n,e,t)}),[n,e,t])}function wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wh(Object(n),!0).forEach((function(t){Ah(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ah(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ch(e,t){var n=ue(),r=(0,G.useCallback)((function(){n.resetQueries(dh.lists(e))}),[n,e]),o=(0,G.useMemo)((function(){var e=null===t||void 0===t?void 0:t.onSuccess;return Oh(Oh({},t),{},e?{onSuccess:function(){return r(),e.apply(void 0,arguments)}}:{onSuccess:r})}),[t,r]);return zn(dh.add(e),e,o)}function Th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(n),!0).forEach((function(t){xh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Th(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ph={name:"",description:""};function Mh(e){var t,n,r=e.dialogId,o=e.formName,i=e.tagsEndpoint,a=e.title,l=e.onCancel,s=e.onSuccess,u=Ut(),c=Vt(),d=$o({defaultValues:Dh(Dh({},Ph),{},{assignTagToTargets:!1}),mode:"onChange"}),f=d.getValues,p=d.register,h=d.formState.errors,m=d.setFocus;(0,G.useEffect)((function(){m("name")}),[m]);var g=Ch(i,{onSuccess:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){c(u("Tags.Add.Success")),null===s||void 0===s||s()}))}),y=g.mutate,b=g.isLoading,v=g.error;return $().createElement(Ft.Dialog,{id:r,title:null!==a&&void 0!==a?a:u("Tags.Add"),onClose:l,modal:!0,open:!0},$().createElement(Xo,{formName:o,useFormReturn:d,loading:b,error:v,onCancel:l,onSubmit:function(e){y([{name:e.name||"",description:e.description}])},convertError:function(e){return e},createLabel:"Button.Create"},$().createElement(Yo,{register:p,getValues:f,field:"name",label:"Entity.Label.Name",maxSize:128,isRequired:!0,notificationText:null===h||void 0===h||null===(t=h.name)||void 0===t?void 0:t.message}),$().createElement(ei,{i18n:u,register:p,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===h||void 0===h||null===(n=h.description)||void 0===n?void 0:n.message})))}var Ih="DistributionSetTagAddModal";function Rh(e){var t,n=Ut();return $().createElement(Mh,{dialogId:Ih,title:n("DS.Tags.Create"),tagsEndpoint:sh,formName:"".concat(Ih,"-form"),onCancel:e.onClose,onSuccess:null===(t=e.options)||void 0===t?void 0:t.onSuccess})}function Lh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return kh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jh(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.searchColumns,i=e.searchKey,a=e.fetchMoreData,l=e.refreshData,s=e.onSortQueryChange,u=e.onSearchKeyChange,c=e.onSearchChange,d=Ut(),f=Ht(),p=Eh(sh),h=Lh((0,G.useState)(p),2),m=h[0],g=h[1],y=Lh((0,G.useState)(p),2),b=y[0],v=y[1],S=(0,tn.useSortableColumns)(m,g),E=S.sortColumn,w=S.isSortingMultipleColumns,O=S.setIsSortingMultipleColumns,A=S.resetSorting;Er(m,s);var C=(0,G.useMemo)((function(){return{allColumns:m,onColumnSelectionChange:v,typeName:"distribution-set-tags",multiSortProps:{isMultiSort:w,onToggleMultiSort:function(e){O(e),A()}}}}),[m,w,A,O]),T=(0,G.useMemo)((function(){return gs(E)}),[E]),D=(0,G.useCallback)((function(){var e=f(Ih,{onSuccess:function(){return e()}})}),[f]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{onRefresh:l,columnSelectorProps:C,count:n,content:$().createElement(hs,{keyedSearchId:"target-tags-search",keys:o,searchKey:i,onSearchChange:c,onSearchKeyChange:u}),mainAction:$().createElement(Ft.Button,{title:d("DS.Tags.Create"),icon:"add",mode:"integrated",onClick:D})}),$().createElement(Ft.DataList,{items:t,columns:b,emptyStateMessage:d("DS.Tags.Empty"),onScrollToBottom:a,onRenderColumnHeader:T,hideCheckBoxes:!0,enableScrolling:!0},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"distribution-set-tags-loading"})))}function _h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Fh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Nh={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description"};function Bh(){var e,t,n=_h((0,G.useState)("Entity.Label.Name"),2),r=n[0],o=n[1],i=_h((0,G.useState)(),2),a=i[0],l=i[1],s=_h((0,G.useState)(),2),u=s[0],c=s[1],d=Hi().currentFilter,f=fh(sh,{limit:1e3,sort:u,q:Ms(d,[Nh[r]],a)}),p=f.data,h=f.error,m=f.isLoading,g=f.fetchNextPage,y=f.isFetchingNextPage,b=ue(),v=(0,G.useCallback)((function(e){a!==e&&l(e)}),[a]),S=(0,G.useCallback)((function(e){u!==e&&c(e)}),[u]);if(h)return $().createElement(tn.ErrorState,{error:h});var E=null!==(e=null===p||void 0===p?void 0:p.pages[p.pages.length-1].total)&&void 0!==e?e:0,w=null!==(t=null===p||void 0===p?void 0:p.pages.flatMap((function(e){return e.content})))&&void 0!==t?t:[];return $().createElement(jh,{data:w,totalCount:E,loadingData:m||y,searchColumns:Object.keys(Nh),searchKey:r,fetchMoreData:g,refreshData:function(){b.resetQueries({queryKey:dh.lists(sh)})},onSearchKeyChange:function(e){return o(e)},onSearchChange:v,onSortQueryChange:S})}function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(n),!0).forEach((function(t){Vh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bh.displayName="DistributionSetTagsListBlade",Bh.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("DS.Tags.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("DS.Tags.ListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:ph}))))};var qh={component:Bh,name:Bh.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(Bh.Header,null),onClose:function(){}}};var Wh=function(){var e=(0,G.useMemo)((function(){return[Hh({},qh)]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})};function zh(e){var t=(0,e.i18n)("DistributionSets.IsComplete");return $().createElement(Ft.Icon,{role:"img",title:t,iconName:"alert-success",className:"distribution-set-complete-status"})}function Qh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Gh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $h=(0,G.createContext)(void 0);function Kh(){var e=(0,G.useContext)($h);if(!e)throw Error("DistributionSetsPageContext cannot be used outside of DistributionSetsPageContextProvider");return e}function Yh(e){var t=e.children,n=Qh((0,G.useState)(0),2),r=n[0],o=n[1];return $().createElement($h.Provider,{value:{refreshTags:r,setRefreshTags:o}},t)}function Jh(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Xh(e,t){var n=Ut(),r=Bt();return Bn(dh.assign(e),function(){var t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Jh(i,r,o,a,l,"next",e)}function l(e){Jh(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function t(o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.entityIds.length){t.next=2;break}throw new Error("One or more enitites must be provided.");case 2:return t.prev=2,t.next=5,r.put("".concat(e,"/").concat(o.tagId,"/assigned"),o.entityIds);case 5:t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(2),new vn(t.t0,n);case 10:case"end":return t.stop()}}),t,null,[[2,7]])})));return function(e){return t.apply(this,arguments)}}(),t)}function Zh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return em(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return em(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function em(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tm(e){var t=e.onAssign,n=e.assignButtonLabel,r=e.onCancel,o=e.disabled,i=e.suggestions,a=e.assigned,l=e.fieldPlaceholder,s=e.initialValue,u=void 0===s?"":s,c=Ut(),d=Zh((0,G.useState)(u),2),f=d[0],p=d[1];return(0,G.useEffect)((function(){p("")}),[a,p]),$().createElement($().Fragment,null,$().createElement("div",{className:"margin-bottom-1"},null===a||void 0===a?void 0:a.map((function(e,t){return $().createElement(Ft.Chip,{key:t,label:e,selected:!0})}))),$().createElement(tn.SuggestionBox,{suggestions:function(){if(!f||!i.length)return[];var e=i.filter((function(e){return!a.map((function(e){return e.toLowerCase()})).includes(e.toLowerCase())&&e.toLowerCase().indexOf(f.toLowerCase())>-1}));return e.map((function(e){return{value:e,renderItem:function(){return $().createElement(tn.SuggestionBoxButton,{label:e})}}}))}()},$().createElement(Ft.TextField,{id:"tagSelector",name:"tagSelector",placeholder:l&&c(l),onChange:function(e){return p(e.target.value)},value:u,autoFocus:!0,role:"textbox",disabled:o})),$().createElement("div",{className:"shell_button-row shell_button-row--right"},r&&$().createElement(Ft.Button,{mode:"secondary",label:c("Button.Cancel"),onClick:function(){r()}}),$().createElement(Ft.Button,{label:c(n||"Button.Assign"),mode:"primary",onClick:function(){return t(f)},disabled:!(null!==f&&void 0!==f&&f.length)||o,name:"assign-tag"})))}function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(n),!0).forEach((function(t){om(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function om(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function im(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return am(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return am(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lm(e){var t=e.entities,n=e.displayEntity,r=e.tagsEndpoint,o=e.title,i=e.dialogId,a=e.onClose,l=e.onSuccess,s=e.initialValue,u=void 0===s?"":s,c=Ut(),d=Vt(),f=Xh(r),p=f.error,h=f.isLoading,m=f.mutateAsync,g=Ch(r),y=g.error,b=g.isLoading,v=g.mutateAsync,S=fh(r,{limit:1e3}).data,E=(0,G.useMemo)((function(){var e;return null!==(e=null===S||void 0===S?void 0:S.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:[]}),[S]),w=(0,G.useCallback)((function(e){var n=null===E||void 0===E?void 0:E.find((function(t){return t.name.toLowerCase()===e.toLowerCase()})),r=function(e){if("string"===typeof e[0].controllerId)return e.map((function(e){return e.controllerId}));return e.map((function(e){return e.id}))}(t);Promise.resolve(n).then((function(t){return t?[t]:v([{name:e}])})).then((function(e){var t=im(e,1)[0];return m({tagId:t.id,entityIds:r})})).then((function(){a(),d(c("Tags.Assign.Success")),l&&l()})).catch((function(){}))}),[c,d,t,E,v,m,a,l]),O=b||h;return $().createElement(tn.Dialog,{id:i,className:"suggestions-containing-modal",isModal:!0,isOpen:!0,dialogHeader:$().createElement(tn.DialogHeader,{title:c(o),onCloseBtnClick:a})},$().createElement(tn.ErrorState,{error:y?rm(rm({},y),{},{message:"".concat(c("Tags.Error.Creation")," ").concat(y.message)}):p?rm(rm({},p),{},{message:"".concat(c("Tags.Error.Assignment")," ").concat(p.message)}):void 0}),O&&$().createElement(Ft.ProgressIndicator,null),$().createElement(tn.SectionGroup,{label:"",className:"margin-bottom-1"},$().createElement(tn.LabelledSection,{header:c("Tags.SelectedEntities",{count:t.length}),expandable:!0,expanded:t.length<10},$().createElement("ul",{className:"margin-top-1"},t.map((function(e,t){return $().createElement("li",{key:t},n(e))}))))),$().createElement(tm,{suggestions:E.map((function(e){return e.name})),assigned:[],disabled:O,fieldPlaceholder:"Tags.FieldLabel",onAssign:w,onCancel:a,initialValue:u}))}var sm="DistributionSerTagsAssignModal";function um(e){var t,n;return $().createElement(lm,{title:"DistributionSet.List.AssignTags",tagsEndpoint:sh,entities:(null===(t=e.options)||void 0===t?void 0:t.distributionSets)||[],displayEntity:function(e){return e.name},onClose:e.onClose,dialogId:sm,onSuccess:null===(n=e.options)||void 0===n?void 0:n.onSuccess})}function cm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return dm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dm(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fm={name:"Entity.Label.Name",id:"Entity.Label.ID",description:"Entity.Label.Description",version:"Entity.Label.Version",type:"Entity.Label.Type",tag:"Entity.Label.Tag"};function pm(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.searchKey,i=e.searchColumns,a=e.fetchMoreData,l=e.onSearchChange,s=e.onSortQueryChange,u=e.onSearchKeyChange,c=(0,tn.useFocusRef)(),d=Ut(),f=Kh(),p=f.refreshTags,h=f.setRefreshTags,m=Ht(),g=(0,ki.useParams)().id,y=k$(),b=(0,G.useMemo)((function(){return function(e){var t={isDefault:!0,isSortable:!0},n={isSortable:!0};return[Ta(e("DistributionSets.Label.Complete"),"complete",$().createElement(zh,{i18n:e})),Ta(e("DistributionSets.Label.Locked"),"locked",$().createElement(Ft.Icon,{iconName:"lock-closed",title:e("DistributionSets.IconTooltip.Locked")}),!0),Ea(e("Entity.Label.ID"),"id",n),Ea(e("Entity.Label.Name"),"name",t),Ea(e("Entity.Label.Version"),"version",t),Ea(e("Entity.Label.Type"),"type",t),wa(e("DistributionSets.Label.Valid"),"valid",e),Ea(e("Entity.Label.Description"),"description",n),Aa(e("Entity.Label.CreatedAt"),"createdAt",n),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}(d)}),[d]),v=cm((0,G.useState)(b),2),S=v[0],E=v[1],w=cm((0,G.useState)(b),2),O=w[0],A=w[1],C=cm((0,G.useState)([]),2),T=C[0],D=C[1];Er(S,s);var x=(0,tn.useSortableColumns)(S,E),P=x.sortColumn,M=x.isSortingMultipleColumns,I=x.setIsSortingMultipleColumns,R=x.resetSorting,L=(0,G.useMemo)((function(){return gs(P)}),[P]);return $().createElement(tn.FlexibleColumnWrapper,{onKeyUp:function(e){if("Insert"===e.key)var t=m(zi,{onCancel:function(){return t()}})}},$().createElement(Zl,{count:n,content:$().createElement($().Fragment,null,$().createElement(hs,{keyedSearchId:"distributionsets-list-search",keys:i,searchKey:o,onSearchChange:l,onSearchKeyChange:u}),$().createElement(Ft.Button,{title:d("Button.Filter"),icon:"filter",label:d("Button.Filter"),mode:"integrated",onClick:function(){m($i)}}),$().createElement(xs,{labels:fm,multiSelectionFields:{tag:As.AND,type:As.OR}})),actions:$().createElement($().Fragment,null,$().createElement(Ft.Button,{disabled:0===T.length,title:d("DistributionSet.AssignTags"),icon:"label",mode:"integrated",onClick:function(){return m(sm,{distributionSets:T,onSuccess:function(){return h(p+1)}})}}),$().createElement("div",{className:"rollouts-command-bar_separator"})),mainAction:$().createElement($().Fragment,null,$().createElement(Ml,{typeName:"distributionsets",allColumns:S,onColumnSelectionChange:A,multiSortProps:{isMultiSort:M,onToggleMultiSort:function(e){I(e),R()}}}),$().createElement(Ft.Button,{ref:c,title:d("DistributionSet.Add"),icon:"add",mode:"integrated",onClick:function(){var e=m(zi,{onCancel:function(){return e()}})}}))}),$().createElement(Ft.DataList,{className:n===t.length?void 0:"rollouts-data-list_hide-check-all",items:t,columns:O,hideCheckBoxes:!1,checked:T,onChecked:function(e){D(e)},enableScrolling:!0,emptyStateMessage:d("DistributionSets.List.Empty"),onSelect:function(e){y.toDetails(e.id)},selected:t.find((function(e){return g&&e.id===parseInt(g,10)})),onScrollToBottom:function(){return a()},onRenderColumnHeader:L},r&&$().createElement(tn.InlineLoadingIndicator,null)))}function hm(e,t){return Fn(da.list(e),fi,e,t)}const mm=l.p+"static/DistributionSetsList.4d48d121.md";function gm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ym(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ym(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ym(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bm={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description","Entity.Label.Version":"version","Entity.Label.Type":"type","Entity.Label.Tag":"tag"},vm={tag:As.AND,type:As.OR};function Sm(){var e=gm((0,G.useState)(),2),t=e[0],n=e[1],r=gm((0,G.useState)("Entity.Label.Name"),2),o=r[0],i=r[1],a=gm((0,G.useState)(),2),l=a[0],s=a[1],u=hm({sort:l,q:Ms(Hi().currentFilter,[bm[o]],t,vm)}),c=u.data,d=u.isLoading,f=u.error,p=u.fetchNextPage,h=u.isFetchingNextPage,m=ue(),g=Dn(c),y=g.totalCount,b=g.entities;return f?$().createElement(tn.ErrorState,{error:f}):$().createElement(pm,{data:b,totalCount:y||0,loadingData:d||h,fetchMoreData:p,refreshData:function(){m.resetQueries({queryKey:da.lists()})},searchKey:o,searchColumns:Object.keys(bm),onSearchKeyChange:function(e){return i(e)},onSearchChange:function(e){if(t!==e){var r=e&&e.length>0?e:void 0;n(r)}},onSortQueryChange:s})}Sm.displayName="DistributionSetsListBlade",Sm.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("DistributionSetListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("DistributionSetListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:mm}))))};const Em=l.p+"static/DistributionSetDetails.4d1a21d7.md";function wm(e){return Es(da.dsDetails(e),"".concat(fi,"/").concat(e),{enabled:"number"===typeof e})}const Om=JSON.parse('{"ActionsFilterModal.Header":"Select actions filter","ActionsFilterModal.Action.Status":"Action status","ActionsFilterModal.Status.Code":"Status code","ActionsFilterModal.RolloutID":"Rollout ID","ActionsFilterModal.RolloutGroupID":"Rollout group ID","ActionsFilterModal.DistributionSetID":"Distribution set ID","ActionsFilterModal.Active":"Active","ActionsFilterModal.ActionID":"Action ID","ActionsFilterModal.TargetID":"Target ID","ActionsListBlade.Header":"Actions","ActionStatusBlade.Header":"Action states","Actions.List.Empty":"No actions found","Actions.List.DateAndTime":"Date and time","Actions.List.Active":"Active","Actions.List.Status":"Status","Actions.List.ActionID":"Action ID","Actions.List.Target":"Target","Actions.List.Rollout":"Rollout","Actions.List.DistributionSet":"Distribution set","Actions.List.DistributionSet.Name":"Distribution set name","Actions.List.DistributionSet.Version":"Distribution set version","Actions.List.Maintenance":"Maintenance window","Actions.List.Weight":"Weight","Actions.List.AutoRefresh.Enable":"Enable auto-refresh","Actions.List.AutoRefresh.Disable":"Disable auto-refresh","Actions.List.ExternalReference":"External reference","Actions.ReportedStatus.Finished":"Finished","Actions.ReportedStatus.Error":"Error","Actions.ReportedStatus.Warning":"Warning","Actions.ReportedStatus.Running":"Running","Actions.ReportedStatus.Canceled":"Canceled","Actions.ReportedStatus.Canceling":"Canceling","Actions.ReportedStatus.Retrieved":"Retrieved","Actions.ReportedStatus.Download":"Download","Actions.ReportedStatus.Downloaded":"Downloaded","Actions.ReportedStatus.Scheduled":"Scheduled","Actions.ReportedStatus.CancelRejected":"Cancel rejected","Actions.ReportedStatus.WaitForConfirmation":"Awaiting confirmation","Actions.Status.Pending":"Active","Actions.Status.Finished":"Inactive","Actions.Icon.Status.Forced":"Forced","Actions.Icon.Status.Soft":"Soft","Actions.Icon.Status.Download":"Download only","Actions.Icon.Status.TimeForced":"Time forced on ","Actions.Icon.Status.Unknown":"Unknown status","Action.StatusEntries.Name":"Status entries","Action.StatusEntries.Empty":"No status entries found","Action.StatusEntries.StatusCode":"Status code","Actions.StatusEntries.Reported":"Reported","Actions.StatusEntries.Timestamp":"Timestamp","Action.CancelConfirmation.Header":"Cancel action?","Action.ForceQuitConfirmation.Header":"Force quit action?","Action.CancelConfirmation.Message":"Advise the target to cancel the installation.","Action.ForceQuitConfirmation.Message":"Close the action without waiting for a confirmation by the target.","Action.CancelSuccess.Message":"Action successfully canceled","Action.ForceQuitSuccess.Message":"Action force quit successful","Action.CancelForceQuitConfirmation.Target":"Target","Action.CancelForceQuitConfirmation.DistributionSet":"Distribution set","Action.Actions.Title":"Action actions","Action.Actions.Cancel":"Cancel","Action.Actions.ForceQuit":"Force quit","Action.Actions.Cancel.Tooltip":"Cancel action","Action.Actions.ForceQuit.Tooltip":"Force quit action"}');var Am=["ref"];function Cm(){return Cm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(this,arguments)}function Tm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Pm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xm(e){return function(e){if(Array.isArray(e))return Mm(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pm(e,t){if(e){if("string"===typeof e)return Mm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mm(e,t):void 0}}function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Im(e){var t,n,r,o,i,a,l=e.options,s=Ut(),u=Hi(),c=u.setFilters,d=u.currentFilter;if(!l)throw Error("Parameters are required.");var f=(0,G.useMemo)((function(){return[{name:s("Dropdown.PleaseSelect"),value:""}].concat(xm(Object.entries(gl).map((function(e){var t=Dm(e,2),n=t[0],r=t[1];return{name:s(r),value:n}}))))}),[s]),p=[{name:s("Dropdown.PleaseSelect"),value:""},{name:s(rl.pending),value:nl},{name:s(rl.finished),value:tl}],h=$o({defaultValues:d,mode:"onChange"}),m=h.getValues,g=h.register,y=h.formState.errors;var b={value:/^\d*$/,message:s("FormField.ValidationMsg.Numeric")},v=g("detailStatus"),S=v.ref,E=Tm(v,Am);return(0,G.useEffect)((function(){var e;null===(e=document.getElementById("detailedStatus"))||void 0===e||e.focus()}),[]),$().createElement(Ft.Dialog,{dialogId:el,title:s("ActionsFilterModal.Header"),onClose:l.onClose,modal:!0,open:!0},$().createElement(Xo,{useFormReturn:h,onCancel:l.onClose,onSubmit:function(e){null===l||void 0===l||l.onClose(),c(e)},submit:"ctrl+enter",createLabel:"Button.Apply"},$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,Cm({id:"actionDetailedStatus",label:s("ActionsFilterModal.Action.Status"),options:f,ref:S},E))),$().createElement(Yo,{register:g,getValues:m,field:"lastStatusCode",label:"ActionsFilterModal.Status.Code",maxSize:64,notificationText:null===y||void 0===y||null===(t=y.lastStatusCode)||void 0===t?void 0:t.message,validationPattern:b}),$().createElement(Yo,{register:g,getValues:m,field:"rolloutsId",label:"ActionsFilterModal.RolloutID",maxSize:64,notificationText:null===y||void 0===y||null===(n=y.rolloutsId)||void 0===n?void 0:n.message,validationPattern:b}),$().createElement(Yo,{register:g,getValues:m,field:"rolloutsGroupId",label:"ActionsFilterModal.RolloutGroupID",maxSize:64,notificationText:null===y||void 0===y||null===(r=y.rolloutsGroupId)||void 0===r?void 0:r.message,validationPattern:b}),$().createElement(Yo,{register:g,getValues:m,field:"distributionSetId",label:"ActionsFilterModal.DistributionSetID",maxSize:64,notificationText:null===y||void 0===y||null===(o=y.distributionSetId)||void 0===o?void 0:o.message,validationPattern:b}),$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,Cm({id:"actionStatus",label:s("ActionsFilterModal.Active"),options:p},g("status")))),$().createElement(Yo,{register:g,getValues:m,field:"id",label:"ActionsFilterModal.ActionID",maxSize:64,notificationText:null===y||void 0===y||null===(i=y.id)||void 0===i?void 0:i.message,validationPattern:b}),$().createElement(Yo,{register:g,getValues:m,field:"externalRef",label:"Actions.List.ExternalReference",maxSize:512,notificationText:null===y||void 0===y||null===(a=y.externalRef)||void 0===a?void 0:a.message})))}var Rm=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:Om}),t.registerModal(el,n(Im))},Lm=["query","noActionsYet","children"];function km(){return km=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},km.apply(this,arguments)}function jm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _m(e){var t=e.query,n=e.noActionsYet,r=e.children,o=jm(e,Lm),i=Ut();return null!==n&&void 0!==n&&n?$().createElement("span",null,i("ActionsLink.NoActions")):$().createElement("div",{className:"a-link a-link--simple"},$().createElement(ki.Link,km({to:ma()+(null!==t&&void 0!==t?t:"")},o),r||i("ActionsLink.Name")))}function Fm(e){return function(e){if(Array.isArray(e))return Um(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Bm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Bm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bm(e,t){if(e){if("string"===typeof e)return Um(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Um(e,t):void 0}}function Um(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hm(e){var t=e.entityId,n=e.stateConfig,r=e.supportsTargetVisible,o=Ut(),i=Ht(),a=Nm(n.read,2),l=a[0],s=a[1],u=l(t),c=(0,G.useCallback)((function(e){return s(t,e)}),[t,s]),d=function(e,t,n,r){var o=wn(n,{search:{convertToQParam:ur}});return Fn(t(o),e,o,r)}(u,c),f=d.data,p=d.isLoading,h=d.error,m=d.fetchNextPage,g=d.isFetchingNextPage,y=Dn(f),b=y.totalCount,v=y.entities,S=(0,G.useMemo)((function(){var e;return null!==(e=v.map((function(e){return e.key})))&&void 0!==e?e:[]}),[v]),E=(0,G.useMemo)((function(){return{header:"",style:{width:"2.5rem"},fieldName:"targetVisible",renderCell:function(e){return e.targetVisible&&$().createElement(Ft.Icon,{iconName:"watch-on",title:o("Entity.Metadata.VisibleToTarget")})}}}),[o]),w=[].concat(Fm(r?[E]:[]),[{header:o("Entity.Metadata.Label.Key"),fieldName:"key",resolveCellTitle:function(e){return e.key}},{header:o("Entity.Metadata.Label.Value"),fieldName:"value",resolveCellTitle:function(e){return e.value}},{header:o("Entity.Metadata.Actions"),onRenderHeader:function(){return null},renderCell:function(e){return $().createElement(Wm,{entityId:t,stateConfig:n,supportsTargetVisible:r,metadataKeys:S,metadata:e})},cellStyle:{padding:0}}]);return $().createElement("div",{style:{width:"100%"}},$().createElement(tn.Margin,{aligned:["top","bottom"]},$().createElement(Ft.CommandBar,{content:o("Entity.Metadata.Total",{count:b||0}),mainAction:n.create&&$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"add",title:o("Entity.Metadata.CreateTooltip")},onClick:function(){if(n.create)var e=Nm(n.create,2),o=e[0],a=e[1],l={onCancel:function(){return s()},onSuccess:function(){return s()},addConfig:[o(t),a(t),c()],supportsTargetVisible:r,otherKeys:S},s=i(si,l)}})})),!h&&$().createElement("div",{className:"unsetHeight"},$().createElement(Ft.DataList,{hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:o("Entity.Metadata.EmptyList"),onScrollToBottom:m,columns:w,items:v},(p||g)&&$().createElement(tn.InlineLoadingIndicator,null))),h&&$().createElement(tn.ErrorState,{error:h}))}function Vm(e){var t=e.entityId,n=e.deletedMetadata,r=e.deleteConfig,o=Ut(),i=Nm(r,3),a=i[0],l=i[1],s=i[2],u=function(e,t,n,r){var o=Ut(),i=ue(),a=sr(t,{headline:o("Entity.Metadata.Delete.Header"),message:o("Entity.Metadata.Delete.Message",{metadataKey:e}),successMessage:o("Entity.Metadata.Delete.SuccessMessage")},{mutationKey:[n],onSuccess:function(){i.resetQueries(r)}});return[a.showConfirmation,fr(a,dr)]}(n.key,a(t,n.key),l(t,n.key),s),c=Nm(u,2),d=c[0],f=c[1];return $().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"delete",title:o("Entity.Metadata.DeleteTooltip")},onClick:d,disabled:f.isLoading})}function qm(e){var t=e.entityId,n=e.metadataKeys,r=e.updatedMetadata,o=e.updateConfig,i=e.supportsTargetVisible,a=Ut(),l=Ht(),s=(0,G.useCallback)((function(){var e={onCancel:function(){return a()},onSuccess:function(){return a()},entityId:t,supportsTargetVisible:i,updatedMetadata:r,otherKeys:n.filter((function(e){return e!==r.key})),updateConfig:o},a=l(ui,e)}),[t,i,r,o,n,l]);return $().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"edit",title:a("Entity.Metadata.EditTooltip")},onClick:s})}function Wm(e){var t=e.entityId,n=e.stateConfig,r=e.metadataKeys,o=e.metadata,i=e.supportsTargetVisible,a=(0,Nm(n.read,2)[1])(t);return $().createElement("div",{className:"action-buttons"},n.update&&$().createElement(qm,{entityId:t,updatedMetadata:o,supportsTargetVisible:i,metadataKeys:r,updateConfig:[n.update[0],n.update[1],a]}),n.delete&&$().createElement(Vm,{entityId:t,deletedMetadata:o,deleteConfig:[n.delete[0],n.delete[1],a]}))}const zm=l.p+"static/DistributionSetTagsSection.a9306bfe.md";function Qm(e){var t=e.tags,n=e.isBusy,r=e.error,o=e.onUnassign,i=e.unassignedTags,a=Ut(),l=Vt();return(0,G.useEffect)((function(){i>0&&l(a("Tags.Unassign.Success"))}),[l,a,i]),$().createElement("div",{style:{width:"100%"}},$().createElement(tn.ErrorState,{error:r}),n&&$().createElement(Ft.ProgressIndicator,null),$().createElement("div",{className:"tags-container"},t.map((function(e){return $().createElement(Ft.Chip,{selected:!0,label:e.name,title:a("Tags.Unassign"),buttonClose:!0,onClose:function(){return o(e.id)},key:e.id})})),!t.length&&$().createElement(tn.NothingFoundMessage,{message:a("Tags.NoTagsAssigned"),iconName:"label"})))}function Gm(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function $m(e,t){var n=Ut(),r=Bt();return Bn(dh.unassign(e),function(){var t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Gm(i,r,o,a,l,"next",e)}function l(e){Gm(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function t(o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.entityIds.length){t.next=2;break}throw new Error("One or more enitites must be provided.");case 2:return t.prev=2,t.next=5,r.delete("".concat(e,"/").concat(o.tagId,"/assigned"),{data:o.entityIds});case 5:t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(2),new vn(t.t0,n);case 10:case"end":return t.stop()}}),t,null,[[2,7]])})));return function(e){return t.apply(this,arguments)}}(),t)}function Km(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ym(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ym(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ym(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jm(e){var t=e.distributionSet,n=Ut(),r=Km((0,G.useState)(0),2),o=r[0],i=r[1],a=fh(sh,{limit:Xm,q:"distributionSet.id==".concat(t.id),sort:"name:ASC"}),l=a.data,s=a.isLoading,u=a.error,c=a.refetch,d=$m(sh,{onSuccess:function(){i((function(e){return++e})),c()}}),f=d.error,p=d.isLoading,h=d.mutateAsync,m=Kh().refreshTags,g=(0,G.useMemo)((function(){var e;return null!==(e=null===l||void 0===l?void 0:l.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:[]}),[l]);return(0,G.useEffect)((function(){m&&c()}),[c,m]),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:n("DistributionSetDetailsView.Tags.Title"),expandable:!0,expanded:!!m,popoverHeading:n("DistributionSetDetailsView.Tags.Title"),help:$().createElement(tn.Documentation,{markdownFilePath:zm})},$().createElement(Qm,{tags:g,isBusy:s||p,error:u||f,unassignedTags:o,onUnassign:function(e){return h({entityIds:[t.id],tagId:e})}})))}var Xm=1e3;const Zm=l.p+"static/DistributionSetMetadata.acae6711.md",eg=l.p+"static/DistributionSetReleaseNotes.e3f3a193.md";l(2844);var tg=["showConfirmation"];function ng(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function rg(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function og(e,t){var n=Ut(),r=Bt(),o="".concat(fi,"/").concat(e,"/attachments/").concat(t.id);return Bn({mutationKey:da.releaseNotesDownload(e,t.id),mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){rg(i,r,o,a,l,"next",e)}function l(e){rg(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.get(o,{responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},timeout:36e5});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new vn(e.t0,n);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}()})}function ig(){return ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ig.apply(this,arguments)}const ag=["children","options"];var lg,sg;!function(e){e.blockQuote="0",e.breakLine="1",e.breakThematic="2",e.codeBlock="3",e.codeFenced="4",e.codeInline="5",e.footnote="6",e.footnoteReference="7",e.gfmTask="8",e.heading="9",e.headingSetext="10",e.htmlBlock="11",e.htmlComment="12",e.htmlSelfClosing="13",e.image="14",e.link="15",e.linkAngleBraceStyleDetector="16",e.linkBareUrlDetector="17",e.linkMailtoDetector="18",e.newlineCoalescer="19",e.orderedList="20",e.paragraph="21",e.ref="22",e.refImage="23",e.refLink="24",e.table="25",e.tableSeparator="26",e.text="27",e.textBolded="28",e.textEmphasized="29",e.textEscaped="30",e.textMarked="31",e.textStrikethroughed="32",e.unorderedList="33"}(lg||(lg={})),function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(sg||(sg={}));const ug=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{for:"htmlFor"}),cg={amp:"&",apos:"'",gt:">",lt:"<",nbsp:"\xa0",quot:"\u201c"},dg=["style","script"],fg=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,pg=/mailto:/i,hg=/\n{2,}$/,mg=/^(\s*>[\s\S]*?)(?=\n{2,})/,gg=/^ *> ?/gm,yg=/^ {2,}\n/,bg=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,vg=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,Sg=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Eg=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,wg=/^(?:\n *)*\n/,Og=/\r\n?/g,Ag=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Cg=/^\[\^([^\]]+)]/,Tg=/\f/g,Dg=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,xg=/^\s*?\[(x|\s)\]/,Pg=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Mg=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ig=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Rg=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,Lg=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,kg=/^<!--[\s\S]*?(?:-->)/,jg=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,_g=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Fg=/^\{.*\}$/,Ng=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Bg=/^<([^ >]+@[^ >]+)>/,Ug=/^<([^ >]+:\/[^ >]+)>/,Hg=/-([a-z])?/gi,Vg=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,qg=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Wg=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,zg=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Qg=/(\[|\])/g,Gg=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,$g=/\t/g,Kg=/(^ *\||\| *$)/g,Yg=/^ *:-+: *$/,Jg=/^ *:-+ *$/,Xg=/^ *-+: *$/,Zg="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",ey=new RegExp(`^([*_])\\1${Zg}\\1\\1(?!\\1)`),ty=new RegExp(`^([*_])${Zg}\\1(?!\\1|\\w)`),ny=new RegExp(`^==${Zg}==`),ry=new RegExp(`^~~${Zg}~~`),oy=/^\\([^0-9A-Za-z\s])/,iy=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ay=/^\n+/,ly=/^([ \t]*)/,sy=/\\([^\\])/g,uy=/ *\n+$/,cy=/(?:^|\n)( *)$/,dy="(?:\\d+\\.)",fy="(?:[*+-])";function py(e){return"( *)("+(1===e?dy:fy)+") +"}const hy=py(1),my=py(2);function gy(e){return new RegExp("^"+(1===e?hy:my))}const yy=gy(1),by=gy(2);function vy(e){return new RegExp("^"+(1===e?hy:my)+"[^\\n]*(?:\\n(?!\\1"+(1===e?dy:fy)+" )[^\\n]*)*(\\n|$)","gm")}const Sy=vy(1),Ey=vy(2);function wy(e){const t=1===e?dy:fy;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Oy=wy(1),Ay=wy(2);function Cy(e,t){const n=1===t,r=n?Oy:Ay,o=n?Sy:Ey,i=n?yy:by;return{match(e,t,n){const o=cy.exec(n);return o&&(t.list||!t.inline&&!t.simple)?r.exec(e=o[1]+e):null},order:1,parse(e,t,r){const a=n?+e[2]:void 0,l=e[0].replace(hg,"\n").match(o);let s=!1;return{items:l.map((function(e,n){const o=i.exec(e)[0].length,a=new RegExp("^ {1,"+o+"}","gm"),u=e.replace(a,"").replace(i,""),c=n===l.length-1,d=-1!==u.indexOf("\n\n")||c&&s;s=d;const f=r.inline,p=r.list;let h;r.list=!0,d?(r.inline=!1,h=u.replace(uy,"\n\n")):(r.inline=!0,h=u.replace(uy,""));const m=t(h,r);return r.inline=f,r.list=p,m})),ordered:n,start:a}},render:(t,n,r)=>e(t.ordered?"ol":"ul",{key:r.key,start:"20"===t.type?t.start:void 0},t.items.map((function(t,o){return e("li",{key:o},n(t,r))})))}}const Ty=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Dy=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,xy=[mg,vg,Sg,Pg,Ig,Mg,kg,Vg,Sy,Oy,Ey,Ay],Py=[...xy,/^[^\n]+(?: \n|\n{2,})/,Rg,_g];function My(e){return e.replace(/[\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xc6]/g,"a").replace(/[\xe7\xc7]/g,"c").replace(/[\xf0\xd0]/g,"d").replace(/[\xc8\xc9\xca\xcb\xe9\xe8\xea\xeb]/g,"e").replace(/[\xcf\xef\xce\xee\xcd\xed\xcc\xec]/g,"i").replace(/[\xd1\xf1]/g,"n").replace(/[\xf8\xd8\u0153\u0152\xd5\xf5\xd4\xf4\xd3\xf3\xd2\xf2]/g,"o").replace(/[\xdc\xfc\xdb\xfb\xda\xfa\xd9\xf9]/g,"u").replace(/[\u0178\xff\xdd\xfd]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Iy(e){return Xg.test(e)?"right":Yg.test(e)?"center":Jg.test(e)?"left":null}function Ry(e,t,n,r){const o=n.inTable;n.inTable=!0;let i=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(((e,o)=>("|"===o.trim()?e.push(r?{type:"26"}:{type:"27",text:o}):""!==o&&e.push.apply(e,t(o,n)),e)),[]);n.inTable=o;let a=[[]];return i.forEach((function(e,t){"26"===e.type?0!==t&&t!==i.length-1&&a.push([]):("27"!==e.type||null!=i[t+1]&&"26"!==i[t+1].type||(e.text=e.text.trimEnd()),a[a.length-1].push(e))})),a}function Ly(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Kg,"").split("|").map(Iy):[],o=e[3]?function(e,t,n){return e.trim().split("\n").map((function(e){return Ry(e,t,n,!0)}))}(e[3],t,n):[],i=Ry(e[1],t,n,!!o.length);return n.inline=!1,o.length?{align:r,cells:o,header:i,type:"25"}:{children:i,type:"21"}}function ky(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function jy(e){return function(t,n){return n.inline?e.exec(t):null}}function _y(e){return function(t,n){return n.inline||n.simple?e.exec(t):null}}function Fy(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Ny(e){return function(t){return e.exec(t)}}function By(e,t,n){if(t.inline||t.simple)return null;if(n&&!n.endsWith("\n"))return null;let r="";e.split("\n").every((e=>!xy.some((t=>t.test(e)))&&(r+=e+"\n",e.trim())));const o=r.trimEnd();return""==o?null:[r,o]}function Uy(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Hy(e){return e.replace(sy,"$1")}function Vy(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!0,n.simple=!0;const i=e(t,n);return n.inline=r,n.simple=o,i}function qy(e,t,n){const r=n.inline||!1,o=n.simple||!1;n.inline=!1,n.simple=!0;const i=e(t,n);return n.inline=r,n.simple=o,i}function Wy(e,t,n){const r=n.inline||!1;n.inline=!1;const o=e(t,n);return n.inline=r,o}const zy=(e,t,n)=>({children:Vy(t,e[1],n)});function Qy(){return{}}function Gy(){return null}function $y(...e){return e.filter(Boolean).join(" ")}function Ky(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||n}const Yy=e=>{let{children:t="",options:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,ag);return G.cloneElement(function(e="",t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||My,t.namedCodesToUnicode=t.namedCodesToUnicode?ig({},cg,t.namedCodesToUnicode):cg;const n=t.createElement||G.createElement;function r(e,r,...o){const i=Ky(t.overrides,`${e}.props`,{});return n(function(e,t){const n=Ky(t,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ky(t,`${e}.component`,e):e}(e,t.overrides),ig({},r,i,{className:$y(null==r?void 0:r.className,i.className)||void 0}),...o)}function o(e){e=e.replace(Dg,"");let n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===Gg.test(e));const o=c(u(n?e:`${e.trimEnd().replace(ay,"")}\n\n`,{inline:n}));for(;"string"==typeof o[o.length-1]&&!o[o.length-1].trim();)o.pop();if(null===t.wrapper)return o;const i=t.wrapper||(n?"span":"div");let a;if(o.length>1||t.forceWrapper)a=o;else{if(1===o.length)return a=o[0],"string"==typeof a?r("span",{key:"outer"},a):a;a=null}return G.createElement(i,{key:"outer"},a)}function i(e){const t=e.match(fg);return t?t.reduce((function(e,t,n){const r=t.indexOf("=");if(-1!==r){const i=function(e){return-1!==e.indexOf("-")&&null===e.match(jg)&&(e=e.replace(Hg,(function(e,t){return t.toUpperCase()}))),e}(t.slice(0,r)).trim(),a=function(e){const t=e[0];return('"'===t||"'"===t)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(t.slice(r+1).trim()),l=ug[i]||i,s=e[l]=function(e,t){return"style"===e?t.split(/;\s?/).reduce((function(e,t){const n=t.slice(0,t.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,(e=>e[1].toUpperCase()))]=t.slice(n.length+1).trim(),e}),{}):"href"===e||"src"===e?Uy(t):(t.match(Fg)&&(t=t.slice(1,t.length-1)),"true"===t||"false"!==t&&t)}(i,a);"string"==typeof s&&(Rg.test(s)||_g.test(s))&&(e[l]=G.cloneElement(o(s.trim()),{key:n}))}else"style"!==t&&(e[ug[t]||t]=!0);return e}),{}):null}const a=[],l={},s={0:{match:Fy(mg),order:1,parse:(e,t,n)=>({children:t(e[0].replace(gg,""),n)}),render:(e,t,n)=>r("blockquote",{key:n.key},t(e.children,n))},1:{match:Ny(yg),order:1,parse:Qy,render:(e,t,n)=>r("br",{key:n.key})},2:{match:Fy(bg),order:1,parse:Qy,render:(e,t,n)=>r("hr",{key:n.key})},3:{match:Fy(Sg),order:0,parse:e=>({lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(e,t,n)=>r("pre",{key:n.key},r("code",ig({},e.attrs,{className:e.lang?`lang-${e.lang}`:""}),e.text))},4:{match:Fy(vg),order:0,parse:e=>({attrs:i(e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{match:_y(Eg),order:3,parse:e=>({text:e[2]}),render:(e,t,n)=>r("code",{key:n.key},e.text)},6:{match:Fy(Ag),order:0,parse:e=>(a.push({footnote:e[2],identifier:e[1]}),{}),render:Gy},7:{match:jy(Cg),order:1,parse:e=>({target:`#${t.slugify(e[1])}`,text:e[1]}),render:(e,t,n)=>r("a",{key:n.key,href:Uy(e.target)},r("sup",{key:n.key},e.text))},8:{match:jy(xg),order:1,parse:e=>({completed:"x"===e[1].toLowerCase()}),render:(e,t,n)=>r("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})},9:{match:Fy(t.enforceAtxHeadings?Mg:Pg),order:1,parse:(e,n,r)=>({children:Vy(n,e[2],r),id:t.slugify(e[2]),level:e[1].length}),render:(e,t,n)=>r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n))},10:{match:Fy(Ig),order:0,parse:(e,t,n)=>({children:Vy(t,e[1],n),level:"="===e[2]?1:2,type:"9"})},11:{match:Ny(Rg),order:1,parse(e,t,n){const[,r]=e[3].match(ly),o=new RegExp(`^${r}`,"gm"),a=e[3].replace(o,""),l=(s=a,Py.some((e=>e.test(s)))?Wy:Vy);var s;const u=e[1].toLowerCase(),c=-1!==dg.indexOf(u),d={attrs:i(e[2]),noInnerParse:c,tag:(c?u:e[1]).trim()};return n.inAnchor=n.inAnchor||"a"===u,c?d.text=e[3]:d.children=l(t,a,n),n.inAnchor=!1,d},render:(e,t,n)=>r(e.tag,ig({key:n.key},e.attrs),e.text||t(e.children,n))},13:{match:Ny(_g),order:1,parse:e=>({attrs:i(e[2]||""),tag:e[1].trim()}),render:(e,t,n)=>r(e.tag,ig({},e.attrs,{key:n.key}))},12:{match:Ny(kg),order:1,parse:()=>({}),render:Gy},14:{match:_y(Dy),order:1,parse:e=>({alt:e[1],target:Hy(e[2]),title:e[3]}),render:(e,t,n)=>r("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:Uy(e.target)})},15:{match:jy(Ty),order:3,parse:(e,t,n)=>({children:qy(t,e[1],n),target:Hy(e[2]),title:e[3]}),render:(e,t,n)=>r("a",{key:n.key,href:Uy(e.target),title:e.title},t(e.children,n))},16:{match:jy(Ug),order:0,parse:e=>({children:[{text:e[1],type:"27"}],target:e[1],type:"15"})},17:{match:(e,t)=>t.inAnchor?null:jy(Ng)(e,t),order:0,parse:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},18:{match:jy(Bg),order:0,parse(e){let t=e[1],n=e[1];return pg.test(n)||(n="mailto:"+n),{children:[{text:t.replace("mailto:",""),type:"27"}],target:n,type:"15"}}},20:Cy(r,1),33:Cy(r,2),19:{match:Fy(wg),order:3,parse:Qy,render:()=>"\n"},21:{match:By,order:3,parse:zy,render:(e,t,n)=>r("p",{key:n.key},t(e.children,n))},22:{match:jy(qg),order:0,parse:e=>(l[e[1]]={target:e[2],title:e[4]},{}),render:Gy},23:{match:_y(Wg),order:0,parse:e=>({alt:e[1]||void 0,ref:e[2]}),render:(e,t,n)=>l[e.ref]?r("img",{key:n.key,alt:e.alt,src:Uy(l[e.ref].target),title:l[e.ref].title}):null},24:{match:jy(zg),order:0,parse:(e,t,n)=>({children:t(e[1],n),fallbackChildren:t(e[0].replace(Qg,"\\$1"),n),ref:e[2]}),render:(e,t,n)=>l[e.ref]?r("a",{key:n.key,href:Uy(l[e.ref].target),title:l[e.ref].title},t(e.children,n)):r("span",{key:n.key},t(e.fallbackChildren,n))},25:{match:Fy(Vg),order:1,parse:Ly,render(e,t,n){const o=e;return r("table",{key:n.key},r("thead",null,r("tr",null,o.header.map((function(e,i){return r("th",{key:i,style:ky(o,i)},t(e,n))})))),r("tbody",null,o.cells.map((function(e,i){return r("tr",{key:i},e.map((function(e,i){return r("td",{key:i,style:ky(o,i)},t(e,n))})))}))))}},27:{match:Ny(iy),order:4,parse:e=>({text:e[0].replace(Lg,((e,n)=>t.namedCodesToUnicode[n]?t.namedCodesToUnicode[n]:e))}),render:e=>e.text},28:{match:_y(ey),order:2,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>r("strong",{key:n.key},t(e.children,n))},29:{match:_y(ty),order:3,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>r("em",{key:n.key},t(e.children,n))},30:{match:_y(oy),order:1,parse:e=>({text:e[1],type:"27"})},31:{match:_y(ny),order:3,parse:zy,render:(e,t,n)=>r("mark",{key:n.key},t(e.children,n))},32:{match:_y(ry),order:3,parse:zy,render:(e,t,n)=>r("del",{key:n.key},t(e.children,n))}};!0===t.disableParsingRawHTML&&(delete s[11],delete s[13]);const u=function(e){let t=Object.keys(e);function n(r,o){let i=[],a="";for(;r;){let l=0;for(;l<t.length;){const s=t[l],u=e[s],c=u.match(r,o,a);if(c){const e=c[0];r=r.substring(e.length);const t=u.parse(c,n,o);null==t.type&&(t.type=s),i.push(t),a=e;break}l++}}return i}return t.sort((function(t,n){let r=e[t].order,o=e[n].order;return r!==o?r-o:t<n?-1:1})),function(e,t){return n(function(e){return e.replace(Og,"\n").replace(Tg,"").replace($g," ")}(e),t)}}(s),c=(d=function(e,t){return function(n,r,o){const i=e[n.type].render;return t?t((()=>i(n,r,o)),n,r,o):i(n,r,o)}}(s,t.renderRule),function e(t,n={}){if(Array.isArray(t)){const r=n.key,o=[];let i=!1;for(let a=0;a<t.length;a++){n.key=a;const r=e(t[a],n),l="string"==typeof r;l&&i?o[o.length-1]+=r:null!==r&&o.push(r),i=l}return n.key=r,o}return d(t,e,n)});var d;const f=o(e);return a.length?r("div",null,f,r("footer",{key:"footer"},a.map((function(e){return r("div",{id:t.slugify(e.identifier),key:e.identifier},e.identifier,c(u(e.footnote,{inline:!0})))})))):f}(t,n),r)};function Jy(e){var t,n=e.preformatted,r=void 0!==n&&n,o=e.markdown,i=void 0!==o&&o,a=e.value,l=e.children,s=e.canCopy,u=void 0!==s&&s,c=e.label,d=l||a,f=function(){return $().createElement($().Fragment,null,u&&$().createElement("div",{className:"-copy-btn-block"},$().createElement(tn.CopyToClipButton,{value:a})),d)};return $().createElement("div",{className:"-rollouts-preview-block"},c,r&&!i&&$().createElement("pre",{className:"-rollouts-preview-block-content"},f()),i&&$().createElement("div",{className:"-rollouts-preview-block-content"},$().createElement(Yy,{children:null!==(t=null===d||void 0===d?void 0:d.toString())&&void 0!==t?t:"",options:{overrides:{a:{component:tn.ExternalLink}}}})),!r&&!i&&$().createElement("div",{className:"-rollouts-preview-block-content"},f()))}var Xy=l(9502);function Zy(e){var t=e.error;return $().createElement("div",{style:{marginTop:"1rem"},key:"error"},$().createElement(tn.ErrorState,{error:t}))}function eb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nb=10485760,rb=["txt","json","yml","xml","html","md"];function ob(e){var t=e.distributionSetId,n=e.releaseNotes,r=Ut(),o=Ht(),i=(0,G.useMemo)((function(){return-1===n.id.lastIndexOf(".")?"unknown":n.id.substring(n.id.lastIndexOf(".")+1)}),[n.id]),a=og(t,n),l=a.mutate,s=a.isLoading,u=a.data,c=eb((0,G.useState)(!1),2),d=c[0],f=c[1],p=function(e,t){var n=Ut(),r=ue(),o=sr("".concat(fi,"/").concat(e,"/attachments/").concat(t.id),{headline:n("DistributionSetDetailsView.ReleaseNotes.DeleteModal.Header"),message:n("DistributionSetDetailsView.ReleaseNotes.DeleteModal.Message"),entityText:t.id.replace(lb,""),confirmLabel:n("DistributionSetDetailsView.ReleaseNotes.DeleteModal.Delete"),successMessage:n("DistributionSetDetailsView.ReleaseNotes.Deleted")},{mutationKey:[da.releaseNotesDelete(e,t.id)],onSuccess:function(){r.resetQueries(da.releaseNotes(e))}});return[o.showConfirmation,ng(o,tg)]}(t,n),h=eb(p,2),m=h[0],g=h[1],y=(0,tn.useDialog)(),b=y.isDialogOpen,v=y.showDialog,S=y.closeDialog,E=(0,G.useRef)(null);(0,G.useEffect)((function(){(b&&rb.includes(i)||d)&&void 0===u&&!s&&l({onError:function(e){o("confirm",{message:r("DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogMessage",{releaseNotesId:n.id.replace(lb,""),error:$().createElement(Zy,{error:e})}),headline:r("DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogHeadline"),variant:"error",onCancel:null,confirmButtonPrimary:!0,confirmLabel:r("DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogComfirmButton")})}})}),[b,i,d,u,s,l,o,r,n.id]),(0,G.useEffect)((function(){d&&void 0!==u&&((0,Xy.saveAs)(new File([u],n.id.replace(lb,""))),f(!1))}),[d,u,n.id]),(0,G.useEffect)((function(){if(s&&!b){var e=o("progress",{message:r("DistributionSetDetailsView.ReleaseNotes.Download.Progress.DialogMessage"),noCancel:!0});E.current=e}else E.current&&(E.current(),E.current=null)}),[s,b,o,r]);var w=(0,G.useCallback)((function(){return void 0!==u&&rb.includes(i)?u.byteLength>nb?(new TextDecoder).decode(u.slice(0,nb))+"\n...":(new TextDecoder).decode(u):r("DistributionSetDetailsView.ReleaseNotes.Preview.NotAvailable")}),[u,i,r]);return $().createElement($().Fragment,null,$().createElement("div",{className:"action-buttons"},$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"document-search",title:r("DistributionSetDetailsView.ReleaseNotes.Actions.Preview")},onClick:v,disabled:g.isLoading}),$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"download",title:r("DistributionSetDetailsView.ReleaseNotes.Actions.Download")},onClick:function(){return f(!0)},disabled:g.isLoading}),$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"delete",title:r("DistributionSetDetailsView.ReleaseNotes.Actions.Delete")},onClick:m,disabled:g.isLoading})),$().createElement(tn.Dialog,{isOpen:b,onClose:function(e){e.stopPropagation()},onCancel:function(e){e.stopPropagation(),e.preventDefault(),S()},dialogHeader:$().createElement(tn.DialogHeader,{title:r("DistributionSetDetailsView.ReleaseNotes.Preview.Header",{releaseNotesId:n.id.replace(lb,"")}),onCloseBtnClick:S}),dialogFooter:$().createElement(tn.BasicDialogControls,{closeBtnLabel:r("DistributionSetDetailsView.ReleaseNotes.Preview.DialogComfirmButton"),onCloseBtnClick:S})},b&&$().createElement($().Fragment,null,s?$().createElement(tn.InlineLoadingIndicator,null):$().createElement(Jy,{preformatted:!0,markdown:"md"===i},w()))))}function ib(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function ab(e){var t=ue(),n=Ut(),r=Bt(),o="".concat(fi,"/").concat(e,"/attachments");return Bn({mutationKey:da.releaseNotesAdd(e),mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ib(i,r,o,a,l,"next",e)}function l(e){ib(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.post(o,t,{timeout:36e5,headers:{"Content-Type":"multipart/form-data"}});case 3:return i=e.sent,e.abrupt("return",i.data);case 7:throw e.prev=7,e.t0=e.catch(0),new vn(e.t0,n);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),onSuccess:function(){t.resetQueries(da.releaseNotes(e))}})}var lb="__release-notes__";function sb(e){var t=e.distributionSetId,n=Ut(),r=(0,G.useRef)(null),o=(0,G.useRef)(null),i=Ht(),a=Vt(),l=(0,G.useMemo)((function(){return function(e,t){return[{header:e("DistributionSetDetailsView.ReleaseNotes.Filename"),resolveCellTitle:function(e){return e.id.replace(lb,"")},renderCell:function(e){return e.id.replace(lb,"")}},{header:e("DistributionSetDetailsView.ReleaseNotes.Actions"),onRenderHeader:function(){return null},renderCell:function(e){return $().createElement(ob,{distributionSetId:t,releaseNotes:e})},cellStyle:{padding:0}}]}(n,t)}),[n,t]),s=function(e){return Es(da.releaseNotesList(e),"".concat(fi,"/").concat(e,"/attachments"),{enabled:"number"===typeof e})}(t),u=s.data,c=s.isLoading,d=s.error,f=(0,G.useMemo)((function(){return u&&u.map((function(e){return{id:e}}))||[]}),[u]),p=ab(t),h=p.mutate,m=p.isLoading,g=(0,G.useCallback)((function(){var e;null===(e=r.current)||void 0===e||e.click()}),[r]);return(0,G.useEffect)((function(){if(m){var e=i("progress",{label:n("DistributionSetDetailsView.ReleaseNotes.Add.Loading.DialogHeadline"),message:n("DistributionSetDetailsView.ReleaseNotes.Add.Loading.DialogMessage"),noCancel:!0});o.current=e}else o.current&&(o.current(),o.current=null)}),[m,i,n]),$().createElement($().Fragment,null,$().createElement("div",{style:{width:"100%"}},$().createElement(tn.Margin,{aligned:["top","bottom"]},$().createElement(Ft.CommandBar,{content:n("DistributionSetDetailsView.ReleaseNotes.Total",{count:(null===f||void 0===f?void 0:f.length)||0}),mainAction:$().createElement(Ft.Button,{title:n("DistributionSetDetailsView.ReleaseNotes.Add.Tooltip"),icon:"add",mode:"integrated",onClick:g,disabled:m})})),!d&&$().createElement("div",{className:"unsetHeight"},$().createElement(Ft.DataList,{hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:n("DistributionSetDetailsView.ReleaseNotes.Empty"),columns:l,items:null!==f&&void 0!==f?f:[]},c&&$().createElement(tn.InlineLoadingIndicator,null))),d&&$().createElement(tn.ErrorState,{error:d})),$().createElement("input",{type:"file",ref:r,onChange:function(e){var r,o=null===(r=e.target.files)||void 0===r?void 0:r[0];if(o){if(t){var l=new FormData;l.append("file",o,lb+o.name),h(l,{onSuccess:function(){a(n("DistributionSetDetailsView.ReleaseNotes.Add.Success.ToastMesage"))},onError:function(e){i("confirm",{message:n("DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogMessage",{releaseNotesId:o.name,error:$().createElement(Zy,{error:e})}),headline:n("DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogHeadline"),variant:"error",onCancel:null,confirmButtonPrimary:!0,confirmLabel:n("DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogComfirmButton")})}})}e.target.value=""}},style:{display:"none"}}))}function ub(e){var t=e.distributionSet,n=Ut(),r=null!==t&&void 0!==t?t:{},o=r.id,i=r.name,a=r.version,l=r.description,s=r.type,u=r.requiredMigrationStep,c=r.valid,d=r.locked;return $().createElement($().Fragment,null,t&&$().createElement($().Fragment,null,$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},o&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.ID"),value:"".concat(o)},$().createElement("div",{className:"keep-actions-space"},o)),i&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Name"),value:i},$().createElement("div",{className:"keep-actions-space"},i)),a&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Version"),value:a},a),l&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},l),s&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Type")},s),$().createElement(tn.LabelledSection,{header:n("DistributionSets.Label.Valid")},n(c?"Global.Yes":"Global.No")),$().createElement(tn.LabelledSection,{header:n("DistributionSets.Label.Locked")},n(d?"Global.Yes":"Global.No")),$().createElement(tn.LabelledSection,{header:n("DistributionSetDetailsView.ActionHistory.Label")},$().createElement(_m,{query:"?distributionSetId=".concat(o),title:n("DistributionSetDetailsView.ActionHistory.Tooltip",{distributionSet:a?"".concat(i,":").concat(a):i})})),$().createElement(Ep,t),$().createElement(tn.LabelledSection,{header:n("DistributionSetDetailsView.MigrationRequired"),className:"rollouts-distribution-set-details-migration-required-section"},n(u?"DistributionSetDetailsView.Migration.Enabled":"DistributionSetDetailsView.Migration.Disabled")),$().createElement(Ft.Divider,null),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:n("Entity.Label.Metadata"),expandable:!0,expanded:!1,popoverHeading:n("Entity.Label.Metadata"),help:$().createElement(tn.Documentation,{markdownFilePath:Zm})},$().createElement(Hm,{entityId:t.id,stateConfig:cb}))),$().createElement(Ft.Divider,null),$().createElement(Jm,{distributionSet:t}),$().createElement(Ft.Divider,null),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:n("Entity.Label.ReleaseNotes"),expandable:!0,expanded:!1,popoverHeading:n("Entity.Label.ReleaseNotes"),help:$().createElement(tn.Documentation,{markdownFilePath:eg})},$().createElement(sb,{distributionSetId:t.id}))))))}var cb={read:[function(e){return"".concat(fi,"/").concat(e,"/metadata")},da.metadataList],create:[function(e){return"".concat(fi,"/").concat(e,"/metadata")},da.metadataAdd],update:[function(e,t){return"".concat(fi,"/").concat(e,"/metadata/").concat(t)},da.metadataUpdate],delete:[function(e,t){return"".concat(fi,"/").concat(e,"/metadata/").concat(t)},da.metadataDelete]},db=["showConfirmation"];function fb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function pb(){return pb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pb.apply(this,arguments)}var hb={position:"absolute",right:0},mb={position:"bottom-left",triggerOffset:8},gb=function(e){return $().createElement(Ft.ContextMenu,pb({trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"})},e,{style:hb,popover:mb}))};function yb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return bb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vb(e){var t=e.distributionSet,n=e.updateDistributionSet,r=Ut(),o=Ht(),i=k$(),a=Vt(),l=function(e){var t=Ut(),n=k$(),r=ue(),o=sr("".concat(fi,"/").concat(e.id),{headline:t("DistributionSetDeleteModal.Header"),message:t("DistributionSetDeleteModal.Message"),entityText:t("DistributionSetDeleteModal.ListItem",{distributionSet:e.name,version:e.version,type:e.type}),successMessage:t("DistributionSetDeleteModal.SuccessMessage")},{mutationKey:[da.delete(e.id)],onSuccess:function(){r.resetQueries(da.lists())}}),i=o.showConfirmation,a=fb(o,db);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),s=yb(l,2),u=s[0],c=s[1],d={onSuccess:function(){a(r("DistributionSetEditModal.SuccessMessage"))}};return $().createElement(gb,{title:r("DistributionSetDetailsActions.ContextMenu.Title")},$().createElement(Ft.MenuItem,{label:r("Button.Edit"),icon:"edit",onClick:function(){var e=o(Qi,{onCancel:function(){return e()},toUpdate:t})},title:r("DistributionSetDetailsActions.Edit.Tooltip")}),null!==t&&void 0!==t&&t.locked?$().createElement(Ft.MenuItem,{label:r("DistributionSetDetailsActions.Unlock.Button"),icon:"lock-open",onClick:function(){return n({locked:!1},d)},title:r("DistributionSetDetailsActions.Unlock.Tooltip")}):$().createElement(Ft.MenuItem,{label:r("DistributionSetDetailsActions.Lock.Button"),icon:"lock-closed",onClick:function(){return n({locked:!0},d)},title:r("DistributionSetDetailsActions.Lock.Tooltip")}),$().createElement(Ft.MenuItem,{label:r("DistributionSetDetailsActions.Invalidate.Button"),icon:"eraser",onClick:function(){i.toInvalidate(t.id,t.name,t.version)},title:r("DistributionSetDetailsActions.Invalidate.Tooltip"),disabled:!t.valid||!t.complete}),$().createElement(Ft.MenuItem,{label:r("Button.Delete"),icon:"delete",onClick:u,title:r("DistributionSetDetailsActions.Delete.Tooltip"),disabled:c.isLoading}))}function Sb(e){var t=e.error,n=e.isLoading,r=e.isSuccess,o=e.distributionSet,i=Ut(),a=(0,tn.useDialog)(),l=a.isDialogOpen,s=a.closeDialog,u=a.showDialog;return(0,G.useEffect)((function(){n&&u()}),[n,u]),(0,G.useEffect)((function(){r&&s()}),[r,s]),$().createElement(tn.Dialog,{isOpen:l,onCancel:s,onClose:function(e){return e.stopPropagation()},id:"distribution-set_lock-dialog",variant:t?"error":"info",dialogHeader:$().createElement(tn.DialogHeader,{variant:t?"error":"info",title:o.locked?i("DistributionSetDialog.Header.Unlock"):i("DistributionSetDialog.Header.Lock"),onCloseBtnClick:s}),dialogFooter:$().createElement(tn.BasicDialogControls,{closeBtnLabel:i("Button.Close"),onCloseBtnClick:s})},n&&$().createElement(Ft.ActivityIndicator,null),t&&$().createElement(tn.ErrorState,{error:t}))}function Eb(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):void 0,n=wm(t),r=n.data,o=n.isLoading,i=n.error,a=fa(t||0);return i?$().createElement(tn.ErrorState,{error:i}):o?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(Sb,{error:a.error,isLoading:a.isLoading,isSuccess:a.isSuccess,distributionSet:r}),r&&$().createElement(vb,{distributionSet:r,updateDistributionSet:a.mutate}),$().createElement(ub,{distributionSet:r}))}function wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ob(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wb(Object(n),!0).forEach((function(t){Ab(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ab(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cb(e,t){return Fn(da.assignedModules(null!==e&&void 0!==e?e:-1),"".concat(fi,"/").concat(e,"/assignedSM"),{},Ob(Ob({},t),{},{enabled:void 0!==e}))}Eb.displayName="DistributionSetDetailsBlade",Eb.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("DistributionSetDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("DistributionSetDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Em}))))};const Tb=l.p+"static/AssignedSoftwareModulesList.e35546d5.md";function Db(){var e=(0,ki.useNavigate)(),t=(0,ki.useLocation)();return(0,G.useMemo)((function(){return function(e,t){return{toHome:function(){e(Ua()+t.search)},toDetails:function(n){e(Ua(n)+t.search)}}}(e,t)}),[e,t])}l(1437);var xb=["showConfirmation"];function Pb(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Mb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ib(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ib(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ib(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rb(e){var t=e.softwareModule,n=e.distributionSet,r=Ut(),o=function(e,t){var n=Ut(),r=ue(),o=e.name,i=sr("".concat(fi,"/").concat(e.id,"/assignedSM/").concat(t.id),{headline:n("UnassignSoftwareModuleModal.Header"),message:n("UnassignSoftwareModuleModal.Message",{distributionSetName:o}),entityText:"".concat(t.name," ").concat(t.type," ").concat(t.version),successMessage:n("UnassignSoftwareModuleModal.SuccessMessage"),confirmLabel:n("Button.Unassign")},{mutationKey:[da.unassignModules(t.id)],onSuccess:function(){r.resetQueries(da.assignedModules(e.id))}});return[i.showConfirmation,Pb(i,xb)]}(n,t),i=Mb(o,1)[0];return $().createElement($().Fragment,null,n&&$().createElement("div",{className:"action-buttons small"},$().createElement(Ft.Button,{icon:"link-broken",title:r(n.locked?"AssignedSoftwareModules.List.UnassignButtonLabel.Disabled":"AssignedSoftwareModules.List.UnassignButtonLabel"),mode:"integrated",onClick:i,style:{padding:"0"},disabled:n.locked})))}function Lb(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.distributionSet,i=e.fetchMoreData,a=e.onAssign,l=Ut(),s=Db(),u=function(e,t){var n={isDefault:!0};return[Ea(e("Entity.Label.Name"),"name",n),Ea(e("Entity.Label.Version"),"version",n),Ea(e("Entity.Label.Type"),"type",n),{data:{columnId:"actions"},header:"",renderCell:function(e){return t&&$().createElement(Rb,{softwareModule:e,distributionSet:t})},disableOnSelect:!0,style:{width:"3rem"}}]}(l,o);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Ft.CommandBar,{className:"margin-bottom-1",content:$().createElement($().Fragment,null,$().createElement("div",null,l("Entity.List.TotalCount",{count:n}))),mainAction:a&&$().createElement(Ft.Button,{title:l(null!==o&&void 0!==o&&o.locked?"DistributionSets.AssignSoftwareModules.Disabled":"DistributionSets.AssignSoftwareModules"),icon:"link",mode:"integrated",onClick:a,disabled:r||(null===o||void 0===o?void 0:o.locked)})}),$().createElement(Ft.DataList,{items:t,columns:u,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:l("AssignedSoftwareModules.List.Empty"),onScrollToBottom:function(){return i()},onRenderColumnHeader:function(e,t,n){return n(e,t)},onSelect:function(e){return s.toDetails(e.id)}},r&&$().createElement(tn.InlineLoadingIndicator,null)))}function kb(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):void 0,n=wm(t),r=n.data,o=n.isLoading,i=Cb(t),a=i.data,l=i.isLoading,s=i.error,u=i.fetchNextPage,c=i.isFetchingNextPage,d=Dn(a),f=d.totalCount,p=d.entities,h=Ht(),m=(0,G.useCallback)((function(){if(r&&e)var t=function(e){return h(Gi,e)}({distributionSet:r,onCancel:function(){return t()},onSuccess:function(){t()}})}),[r,e,h]);return s?$().createElement(tn.ErrorState,{error:s}):$().createElement($().Fragment,null,t&&$().createElement(Lb,{distributionSet:r,data:p,totalCount:f||0,loadingData:l||c||o,fetchMoreData:u,onAssign:m}))}function jb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jb(Object(n),!0).forEach((function(t){Fb(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kb.displayName="AssignedSoftwareModulesListBlade",kb.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("AssignedSoftwareModulesListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("AssignedSoftwareModulesListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Tb}))))};var Nb={component:Sm,name:Sm.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:800,header:$().createElement(Sm.Header,null),showCloseButton:!1}},Bb={component:Eb,name:Eb.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(Eb.Header,null),onClose:function(){}}},Ub={component:kb,name:kb.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(kb.Header,null),showCloseButton:!1,onClose:null}};var Hb=function(){var e=k$(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[_b(_b({},Nb),{},{defaults:_b(_b({},Nb.defaults),{},{collapsed:!1})}),_b(_b({},Bb),{},{defaults:_b(_b({},Bb.defaults),{},{onClose:function(){return e.toHome()}})}),_b(_b({},Ub),{},{defaults:_b({},Ub.defaults)})]:[_b(_b({},Nb),{},{defaults:_b(_b({},Nb.defaults),{},{collapsed:!1})})]}),[t,e]);return $().createElement(Yh,null,$().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}}))};function Vb(){var e=Ut();return(0,G.useMemo)((function(){return function(e){var t={isDefault:!0,isSortable:!0},n={width:"8rem"};return[Ea(e("Quotas.Header.Name"),"name",t),Ea(e("Quotas.Header.Limit"),"limit",t,n),Ea(e("Quotas.Header.Used"),"used",t,n),Ea(e("Quotas.Header.Left"),"left",t,n),{data:{columnId:"usagePercentage",sortParamName:"usagePercentage",isDefault:!0,isSortable:!0},className:"rollouts_quotas-usage-header",header:e("Quotas.Header.Usage"),fieldName:"usagePercentage",cellClassName:"rollouts_quotas-usage-cell",renderCell:function(e){return $().createElement("div",null,$().createElement("span",{className:"rollouts_quotas-usage-percentage"},e.usagePercentage,"%"),$().createElement(Ft.ProgressIndicator,{type:"determinate",value:e.usagePercentage,title:"".concat(e.usagePercentage,"%")}))}}]}(e)}),[e])}function qb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Wb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zb(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.refreshData,i=e.onSortQueryChange,a=Ut(),l=Vb(),s=qb((0,G.useState)(l),2),u=s[0],c=s[1],d=qb((0,G.useState)(l),2),f=d[0],p=d[1],h=(0,tn.useSortableColumns)(u,c).sortColumn;Er(u,i);var m=(0,G.useMemo)((function(){return gs(h)}),[h]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,onRefresh:function(){return o()},mainAction:$().createElement(Ml,{typeName:"rollout-quotas",allColumns:u,onColumnSelectionChange:p})}),$().createElement(Ft.DataList,{className:"rollouts_quotas-table",items:t,columns:f,enableScrolling:!0,emptyStateMessage:a("Quotas.List.Empty"),onRenderColumnHeader:m,hideCheckBoxes:!0},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"rollout-quotas-loading"})))}function Qb(e){return function(e){if(Array.isArray(e))return Gb(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Gb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gb(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $b={all:["quotasKeys"],lists:function(){return[].concat(Qb($b.all),["list"])},list:function(){return Qb($b.lists())},details:function(){return[].concat(Qb($b.all),["details"])},quotaDetails:function(e){return[].concat(Qb($b.details()),[e])}};l(3459);function Kb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Yb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jb(e){return+(e/Math.pow(1024,2)).toFixed(1)}function Xb(e,t){return+(100*e/t).toFixed(1)}function Zb(e,t,n,r){return e[n]<t[n]?r?-1:1:e[n]>t[n]?r?1:-1:0}const ev=l.p+"static/Quotas.df42a952.md";function tv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return nv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rv(){var e=tv((0,G.useState)(),2),t=e[0],n=e[1],r=Es($b.list(),"v1/system/quota"),o=r.data,i=r.isLoading,a=r.error,l=function(e,t){var n=Ut(),r=(0,G.useMemo)((function(){if(!e)return[];var r=[];if(Object.keys(e).forEach((function(t){var o="ARTIFACT_STORAGE"===t,i=e[t],a=i.limit,l=i.used,s={name:n("Quotas.List.Label.".concat(t)),limit:o?Jb(a):a,used:o?Jb(l):l,left:o?Jb(a-l):a-l,usagePercentage:Xb(l,a)};r.push(s)})),t){var o=Kb(t.split(":"),2),i=o[0],a=o[1];r.sort((function(e,t){return Zb(e,t,i,"ASC"===a)}))}else r.sort((function(e,t){return Zb(e,t,"usagePercentage",!1)}));return r}),[e,t,n]);return r}(o,t),s=ue();return a?$().createElement(tn.ErrorState,{error:a}):$().createElement(zb,{data:l,totalCount:l.length,loadingData:i,refreshData:function(){s.resetQueries({queryKey:$b.lists()})},onSortQueryChange:n})}function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ov(Object(n),!0).forEach((function(t){av(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function av(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}rv.displayName="QuotasBlade",rv.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("QuotasBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("QuotasBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:ev}))))};var lv={component:rv,name:rv.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(rv.Header,null),onClose:function(){}}};function sv(){var e=(0,G.useMemo)((function(){return[iv({},lv)]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})}var uv=/=&/g,cv=/=$/;function dv(e){return e.replace(uv,"&").replace(cv,"")}var fv="fq",pv="insights";function hv(e){return"".concat(fv,"=").concat(encodeURIComponent(e))}function mv(e){return"".concat("c","=").concat(e)}var gv="GroupAddModal",yv="RolloutsListFilterModal",bv=":";function vv(){var e=(0,ki.useNavigate)(),t=(0,ki.useLocation)();return(0,G.useMemo)((function(){return function(e,t){return{toHome:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.search;e(Qa()+n)},toDetails:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.search;e(Qa(n)+r)},toNew:function(t,n){var r;t?r=hv(t):n&&(r=mv(n)),e(Qa("new",r))},withInsights:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=new URLSearchParams(t.search),i=[];n&&i.push(n),"number"===typeof r&&i.push(r+""),o.set(pv,i.join(bv));var a="?"+dv(o.toString());e(t.pathname+a)},closeInsights:function(){var n=new URLSearchParams(t.search);n.delete(pv),e(t.pathname+(n.size>0?"?"+n.toString():""))}}}(e,t)}),[e,t])}l(7486);const Sv=l.p+"static/RolloutsList.29f9f976.md";function Ev(e){return function(e){if(Array.isArray(e))return wv(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return wv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wv(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ov={all:["rollouts"],lists:function(){return[].concat(Ev(Ov.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(Ev(Ov.lists()),[e])},details:function(){return[].concat(Ev(Ov.all),["details"])},rolloutDetails:function(e){return[].concat(Ev(Ov.details()),[e])},deleteRollout:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["delete"])},add:function(){return[].concat(Ev(Ov.all),["add"])},rolloutDeployGroups:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_n;return[].concat(Ev(Ov.rolloutDetails(e)),[null!==t&&void 0!==t?t:-1,"deployGroups",n])},resume:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["resume"])},start:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["start"])},pause:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["pause"])},triggerNextGroup:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["triggerNextGroup"])},approve:function(e){return[].concat(Ev(Ov.rolloutDetails(e)),["approve"])},insights:function(e,t,n,r){return[].concat(Ev(Ov.rolloutDetails(e)),["insights","group:".concat(t||"all",":"),"status:".concat(n||"all"),r])},report:function(e,t,n){return[].concat(Ev(Ov.rolloutDetails(e)),["report","group:".concat(t||"all",":"),"status:".concat(n||"all")])}};function Av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Av(Object(n),!0).forEach((function(t){Tv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Av(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dv=[];function xv(e,t){var n=(0,ki.useParams)().actionOrId,r=void 0===n?"":n,o=ue(),i=(0,G.useCallback)((function(e){var t=parseInt(r,10),n=e.find((function(e){return e.id===t}));if(n){var i=Ov.rolloutDetails(t),a=o.getQueryData(i);a&&a.data&&a.data.lastModifiedAt!==n.lastModifiedAt&&o.resetQueries(i)}}),[r,o]);return Fn(Ov.list(e),gi,Cv(Cv({},e),{},{representation:"full"}),Cv(Cv({},t),{},{onSuccess:function(e){var t;i(null!==(t=null===e||void 0===e?void 0:e.pages.flatMap((function(e){return e.content})))&&void 0!==t?t:Dv)}}))}l(1946);function Pv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pv(Object(n),!0).forEach((function(t){Iv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Iv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lv,t=arguments.length>1?arguments[1]:void 0,n=ue(),r=Ov.rolloutDetails(e),o=(0,G.useCallback)((function(){n.removeQueries({queryKey:r,exact:!0})}),[r,n]);return Mv({clearQuery:o},Es(r,"".concat(gi,"/").concat(e),Mv({enabled:!Number.isNaN(e)&&e>Lv},t)))}var Lv=-1;function kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kv(Object(n),!0).forEach((function(t){_v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fv(e){var t=(0,ki.useParams)().actionOrId,n=parseInt(t,10),r=Rv(n,jv({},e));return(0,G.useMemo)((function(){return jv(jv({},r),{},{rolloutId:Number.isNaN(n)?null:n})}),[r,n])}var Nv,Bv="creating",Uv="waiting_for_approval",Hv="approval_denied",Vv="ready",qv="paused",Wv="starting",zv="running",Qv="finished",Gv="deleting",$v="deleted";l(8113);function Kv(e){return!e||!!gl[e]}function Yv(e,t,n){return e/Jv(t,null!==n&&void 0!==n?n:0)*100}function Jv(e,t){return Math.ceil(Xv(e,t))}function Xv(e,t){return t<1?e:e/t}function Zv(e,t,n){if(t&&n){var r=Xv(t,n),o=Jv(t,n);return e(r===o?"Rollout.Create.Summary.Groups.TargetsPerGroup":"Rollout.Create.Summary.Groups.TargetsPerGroupApprox",{count:o})}}function eS(e,t){var n="console-suite-ui",r=Date.now();return{query:e,name:t,id:-1,createdAt:r,createdBy:n,lastModifiedAt:r,lastModifiedBy:n,autoAssignActionType:void 0,autoAssignDistributionSet:-1,autoAssignWeight:-1,_links:{self:{href:"foo"},DS:{href:"bar"}}}}function tS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return nS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oS=(rS(Nv={},Uv,"Rollout.Status.WaitingForApproval"),rS(Nv,Hv,"Rollout.Status.ApprovalDenied"),rS(Nv,Bv,"Rollout.Status.Creating"),rS(Nv,Vv,"Rollout.Status.Ready"),rS(Nv,qv,"Rollout.Status.Paused"),rS(Nv,Wv,"Rollout.Status.Starting"),rS(Nv,zv,"Rollout.Status.Running"),rS(Nv,Qv,"Rollout.Status.Finished"),rS(Nv,Gv,"Rollout.Status.Deleting"),rS(Nv,$v,"Rollout.Status.Deleted"),Nv);function iS(e){var t;return null!==(t=oS[e])&&void 0!==t?t:""}function aS(e){return e.cancelled+e.error+e.finished}function lS(e){return e.notstarted+e.running+e.scheduled}function sS(e){return lS(e)>0&&e.error>0}function uS(e){return!!e&&e.running+e.cancelled+e.error+e.finished+e.scheduled>0}function cS(e){var t=e.split(bv);if(!t.length)return{group:null,status:null};var n=parseInt(t[0],10),r=t[1];return Number.isNaN(n)&&(n=t.length>1?parseInt(t[1],10):null,r=t[0]),r&&Kv(r=r.toLocaleLowerCase())||(r=null),{group:n,status:r}}var dS={creating:{icon:"components-add",tooltip:iS("creating")},waiting_for_approval:{icon:"checklist",tooltip:iS("waiting_for_approval")},approval_denied:{icon:"denied",tooltip:iS("approval_denied")},ready:{icon:"standby",tooltip:iS("ready")},paused:{icon:"pause",tooltip:iS("paused")},starting:{icon:"start-play-frame",tooltip:iS("starting")},running:{icon:"refresh-checkmark",tooltip:iS("running")},finished:{icon:"alert-success",tooltip:iS("finished")},deleting:{icon:"abort-frame",tooltip:iS("deleting")},deleted:{icon:"close",tooltip:iS("deleted")}};function fS(e){var t=e.status,n=Ut(),r=dS[t],o=r.icon,i=r.tooltip;return $().createElement(Ft.Icon,{role:"img",title:n(i),iconName:o})}var pS=$().createElement(Ft.Icon,{className:"rollout-progress-icon",iconName:"alert-error-filled",role:"img"});function hS(e){var t=e.status,n=e.testID,r=Ut(),o=function(e){var t=lS(e),n=aS(e),r=t+n;return r<1?0:Math.round(100*n/r)}(t),i=sS(t),a=[],l=i?"rollout-progress-error rollout-progress-highlight-error":"rollout-progress-error";a.push({status:"RolloutAction.Status.Finished",count:t.finished}),a.push({status:"RolloutAction.Status.Error",count:t.error}),a.push({status:"RolloutAction.Status.Cancelled",count:t.cancelled}),a.push({status:"RolloutAction.Status.Running",count:t.running}),a.push({status:"RolloutAction.Status.Scheduled",count:t.scheduled}),a.push({status:"RolloutAction.Status.NotStarted",count:t.notstarted});var s=a.map((function(e){var t=r(e.status),n=r("IntegerValue",{val:e.count});return"".concat(t,": ").concat(n)})).join("\n");return $().createElement("div",{title:s,"data-testid":n,className:"rollout-progress"},$().createElement("div",null,$().createElement(Ft.ProgressIndicator,{className:"rollout-progress-bar",type:"determinate",progress:o})),$().createElement("div",{className:"rollout-progress-text"},$().createElement("span",null,"".concat(o,"%")),$().createElement("span",{className:"rollout-progress-space"}),$().createElement("div",{className:l},i?pS:null,$().createElement("span",null,r("Rollout.Progress.ErrorCount",{count:t.error})))))}function mS(e){if(e)return $().createElement(fS,{status:e.status})}function gS(){var e=Ut();return(0,G.useMemo)((function(){return function(e){var t={isDefault:!0};return[Oa(e("Entity.Label.ID"),"id",e,{isSortable:!0},{width:"6em"}),Ea(e("Entity.Label.Name"),"name",{isDefault:!0,isSortable:!0}),Ta(e("Rollout.Label.Dynamic"),"dynamic",$().createElement(Ft.Icon,{role:"img",title:e("Rollout.Label.Dynamic"),iconName:"box-refresh"}),!0),{data:{columnId:"distribution-set",isDefault:!0},header:e("Rollouts.List.DS"),renderCell:function(e){return $().createElement(Ya,{id:e.distributionSetId,name:e._links.distributionset.name})},cellStyle:{overflow:"hidden"},disableOnSelect:!0},Oa(e("Rollouts.List.Weight"),"weight",e,void 0,{width:"6em"}),Oa(e("Rollouts.List.Targets"),"totalTargets",e,t,{width:"6em"}),Oa(e("Rollouts.List.Groups"),"totalGroups",e,void 0,{width:"6em"}),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",t),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy"),Ta(e("Rollout.Label.Status"),"status",mS,!0),{data:{columnId:"progress",isDefault:!0},header:e("Rollout.Label.Progress"),renderCell:function(e){return e.totalTargetsPerStatus&&$().createElement(hS,{status:e.totalTargetsPerStatus})},style:{width:"10em"}},{data:{columnId:"total-errors",isDefault:!1},header:e("Rollouts.List.Errors"),renderCell:function(e){return e.totalTargetsPerStatus.error},style:{width:"6em"}},{data:{columnId:"actions-link",isDefault:!0},header:e("Rollouts.List.Actions"),renderCell:function(t){return $().createElement(_m,{query:"?rolloutsId="+t.id,title:e("ActionsLink.Tooltip"),noActionsYet:!uS(t.totalTargetsPerStatus)})},cellStyle:{overflow:"hidden"},style:{width:"9em"},disableOnSelect:!0}]}(e)}),[e])}function yS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return bS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vS={name:"Entity.Label.Name",id:"Entity.Label.ID",description:"Entity.Label.Description",status:"Rollout.Label.Status",distributionSetId:"RolloutsListFilterModal.DistributionSetIdLabel",distributionSetName:"RolloutsListFilterModal.DistributionSetNameLabel",distributionSetVersion:"RolloutsListFilterModal.DistributionSetVersionLabel",distributionSetType:"RolloutsListFilterModal.DistributionSetTypeLabel"},SS=new Map([[Hv,"Rollout.Status.ApprovalDenied"],[Bv,"Rollout.Status.Creating"],[$v,"Rollout.Status.Deleted"],[Gv,"Rollout.Status.Deleting"],[Qv,"Rollout.Status.Finished"],[qv,"Rollout.Status.Paused"],[Vv,"Rollout.Status.Ready"],[zv,"Rollout.Status.Running"],[Wv,"Rollout.Status.Starting"],[Uv,"Rollout.Status.WaitingForApproval"]]);function ES(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.selected,i=e.autoRefresh,a=e.onSelect,l=e.fetchMoreData,s=e.onRefresh,u=e.onToggleAutoRefresh,c=e.onSortQueryChange,d=(0,tn.useFocusRef)(),f=Ut(),p=Ht(),h=vv(),m=gS(),g=yS((0,G.useState)(m),2),y=g[0],b=g[1],v=yS((0,G.useState)(m),2),S=v[0],E=v[1];Er(y,c);var w=(0,tn.useSortableColumns)(y,b),O=w.sortColumn,A=w.isSortingMultipleColumns,C=w.setIsSortingMultipleColumns,T=w.resetSorting,D=(0,G.useMemo)((function(){return{allColumns:y,onColumnSelectionChange:E,typeName:"rollouts",multiSortProps:{isMultiSort:A,onToggleMultiSort:function(e){C(e),T()}}}}),[y,A,T,C]),x=(0,G.useMemo)((function(){return gs(O)}),[O]),P=(0,G.useMemo)((function(){if(void 0!==o)return t.find((function(e){return e.id===o}))}),[t,o]);return $().createElement(tn.FlexibleColumnWrapper,{onKeyUp:function(e){"Insert"===e.key&&h.toNew()}},$().createElement(Zl,{count:n,columnSelectorProps:D,onRefresh:s,refreshDisabled:r,autoRefresh:i,onToggleAutoRefresh:u,content:$().createElement(xs,{labels:vS,translations:SS}),filterSelector:$().createElement(Ft.Button,{title:f("Button.Filter"),label:f("Button.Filter"),icon:"filter",mode:"integrated",onClick:function(){p(yv)}}),mainAction:$().createElement(Ft.Button,{ref:d,title:f("Rollout.Add"),icon:"add",mode:"integrated",onClick:function(){h.toNew()}})}),$().createElement(Ft.DataList,{items:t,columns:S,hideCheckBoxes:!0,selected:P,onSelect:function(e){return a(e.id)},enableScrolling:!0,emptyStateMessage:f("Rollouts.List.Empty"),onScrollToBottom:l,onRenderColumnHeader:x},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"rollouts-list-loading"})))}function wS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return OS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function AS(){var e,t,n=vv(),r=wS((0,G.useState)(!1),2),o=r[0],i=r[1],a=wS((0,G.useState)(),2),l=a[0],s=a[1],u=Fv(),c=u.rolloutId,d=u.data,f=Hi().currentFilter;Reflect.deleteProperty(f,"insights");var p=ue(),h=xv({sort:l,q:Ms(f)},{refetchInterval:!!o&&Z}),m=h.data,g=h.isLoading,y=h.error,b=h.fetchNextPage,v=h.isFetchingNextPage,S=(0,G.useCallback)((function(){i((function(e){return!e}))}),[]),E=null!==(e=null===m||void 0===m?void 0:m.pages[m.pages.length-1].total)&&void 0!==e?e:0,w=null!==(t=null===m||void 0===m?void 0:m.pages.flatMap((function(e){return e.content})))&&void 0!==t?t:Dv,O=vr(w,d,g);return y?$().createElement(tn.ErrorState,{error:y}):$().createElement(ES,{data:O,totalCount:E,loadingData:g||v,selected:c,onSelect:function(e){return n.toDetails(e)},fetchMoreData:b,onRefresh:function(){p.resetQueries({queryKey:Ov.lists()})},autoRefresh:o,onToggleAutoRefresh:S,onSortQueryChange:s})}AS.displayName="RolloutsListBlade",AS.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("RolloutsListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("RolloutsListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Sv}))))};const CS=l.p+"static/RolloutDetails.6fba84b6.md",TS=l.p+"static/RolloutType.583c374f.md",DS=l.p+"static/RolloutWeight.457d1b39.md";var xS={forced:{icon:"flash",tooltip:"Rollout.UpdateType.Forced"},soft:{icon:"agility",tooltip:"Rollout.UpdateType.Soft"},timeforced:{icon:"calendar-clock",tooltip:"Rollout.UpdateType.TimeForced"},downloadonly:{icon:"storage-local",tooltip:"Rollout.UpdateType.DownloadOnly"}};function PS(e){var t=e.type,n=e.forcedtime,r=e.iconOnly,o=void 0!==r&&r,i=e.labelOnly,a=void 0!==i&&i,l=Ut(),s=xS[t],u=s.icon,c=l(s.tooltip),d=n?"".concat(c," - ").concat((0,tn.parseTimestamp)(n)):c;return $().createElement($().Fragment,null,!a&&$().createElement(Ft.Icon,{role:"img",title:d,iconName:u}),!o&&$().createElement($().Fragment,null,$().createElement("span",{className:"rollout-update-type-icon-label"},d)))}function MS(e){var t=e.entity,n=Ut();return $().createElement(Ft.Notification,{type:"warning"},$().createElement("span",null,n("Entity.SoftDelete.Start",{entity:t})),$().createElement("span",null,"\xa0",$().createElement(tn.ExternalLink,{href:"https://docs.bosch-iot-suite.com/rollouts/Entity-soft-deletion.html"},n("Entity.SoftDelete.LinkLabel"))),$().createElement("span",null,"\xa0",n("Entity.SoftDelete.End")))}var IS=["showConfirmation"];function RS(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function LS(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function kS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kS(Object(n),!0).forEach((function(t){_S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FS(e,t){var n=Ut(),r=Bt();return Bn(jS(jS({},t),{},{mutationKey:Ov.approve(e),mutationFn:function(){var t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){LS(i,r,o,a,l,"next",e)}function l(e){LS(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function t(o){var i,a,l,s,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=o.action,a=void 0===i?"deny":i,l=o.remark,s=void 0===l?"":l,u=new URLSearchParams({remark:s}),t.next=5,r.post("/".concat(gi,"/").concat(e,"/").concat(a).concat(s?"?"+u:""));case 5:t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(0),new vn(t.t0,n);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()}))}function NS(e){var t=e.onClose,n=e.options;if(!n||!n.rolloutId)throw new Error("The ID of the rollout is required");var r=n.rolloutId,o=(0,G.useRef)(null),i=Ut(),a=ue(),l=FS(r,{onSuccess:function(){a.invalidateQueries(Ov.details()),t()},onError:function(){a.invalidateQueries(Ov.details())}}),s=l.mutate,u=l.isLoading,c=l.error;return(0,G.useEffect)((function(){var e;null===(e=o.current)||void 0===e||e.focus()}),[]),$().createElement(Ft.Dialog,{variant:"warning",title:i("Rollout.Approve.ModalTitle"),onClose:t,modal:!0,open:!0},$().createElement(Ft.TextField,{id:"text-field-approval-reason",ref:o,label:i("Rollout.Approve.RemarkFieldLabel")}),c&&$().createElement(tn.ErrorState,{error:c}),u&&$().createElement(Ft.ProgressIndicator,{type:"indeterminate"}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:i("Rollout.Approve.ApproveButtonLabel"),mode:"secondary",onClick:function(){var e;s({action:"approve",remark:null===(e=o.current)||void 0===e?void 0:e.value})},disabled:u}),$().createElement(Ft.Button,{label:i("Rollout.Approve.DenyButtonLabel"),mode:"secondary",onClick:function(){var e;s({action:"deny",remark:null===(e=o.current)||void 0===e?void 0:e.value})},disabled:u}),$().createElement(Ft.Button,{label:i("Button.Cancel"),mode:"primary",onClick:t,disabled:u})))}function BS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return US(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return US(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function US(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HS(e){var t=e.rollout,n=Ut(),r=vv(),o=function(e){var t=Ut(),n=vv(),r=ue(),o=e.totalTargetsPerStatus.scheduled+e.totalTargetsPerStatus.running>0,i=$().createElement($().Fragment,null,o?$().createElement($().Fragment,null,$().createElement("div",null,t("Rollout.DeleteConfirmation.Message.Sentence")),$().createElement("div",null,t("Rollout.DeleteConfirmation.Message.ActionsAffected",{running:e.totalTargetsPerStatus.running,scheduled:e.totalTargetsPerStatus.scheduled}))):$().createElement("div",null,t("Rollout.DeleteConfirmation.Message"))),a=sr("".concat(gi,"/").concat(e.id),{headline:t("Rollout.DeleteConfirmation.Header"),message:i,entityText:e.name,successMessage:t("Rollout.DeleteSuccess.Message")},{mutationKey:[Ov.deleteRollout(e.id)],onSuccess:function(){r.resetQueries(Ov.lists())}}),l=a.showConfirmation,s=RS(a,IS);return[(0,G.useCallback)((function(){l({onSuccess:function(){n.toHome()}})}),[n,l]),s]}(t),i=BS(o,2),a=i[0],l=i[1],s=Ht();return $().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n("Rollout.Actions.Title")},$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Copy")),icon:"copy",onClick:function(){return r.toNew(void 0,t.id)},title:n("Rollout.Actions.Copy.Tooltip")}),$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Delete")),icon:"delete",onClick:function(){return a()},title:n("Rollout.Actions.Delete.Tooltip"),disabled:l.isLoading}),$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Approve")),icon:"welcome",onClick:function(){return s(NS.displayName,{rolloutId:t.id})},title:n("Rollout.Actions.Approve.Tooltip"),disabled:l.isLoading||"waiting_for_approval"!==t.status}))}function VS(e){var t=e.rollout,n=Ut(),r=t.id,o=t.name,i=t.description,a=t.createdAt,l=t.createdBy,s=t.lastModifiedAt,u=t.lastModifiedBy,c=t.totalTargets,d=t.targetFilterQuery,f=t.distributionSetId,p=t.type,h=t.forcetime,m=t.startAt,g=t.deleted,y=t.approveDecidedBy,b=t.approvalRemark,v=t.status,S=t.dynamic,E=t.weight,w=t._links.distributionset,O="",A="";return void 0===m?(O=n("Rollout.StartOptions"),A=n("Rollout.StartType.Manual")):0===m?(O=n("Rollout.StartOptions"),A=n("Rollout.StartType.Auto")):m>0&&(O=n("RolloutDetails.Label.StartAt"),A=String((0,tn.parseTimestamp)(m))),$().createElement($().Fragment,null,g?$().createElement(MS,{entity:n("RolloutDetails.Entity.Name")}):$().createElement(HS,{rollout:t}),$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout",style:{marginBottom:0}},$().createElement(tn.LabelledSection,{header:n("Entity.Label.ID")},r),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Name")},o),i&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},i),$().createElement(Ep,{createdAt:a,createdBy:l,lastModifiedAt:s,lastModifiedBy:u}),$().createElement(tn.LabelledSection,{header:n("RolloutDetails.Label.TotalTargets")},c),$().createElement(tn.LabelledSection,{showCopy:!0,header:n("RolloutDetails.Label.TargetFilterQuery"),value:d},$().createElement(tn.TruncatedText,{title:d},d)),$().createElement(tn.LabelledSection,{header:n("Rollout.Label.Dynamic")},S?$().createElement($().Fragment,null,$().createElement(Ft.Icon,{role:"img",title:n("Rollout.Label.Dynamic"),iconName:"box-refresh"}),$().createElement("span",null," ",n("Global.Yes"))):n("Global.No")),$().createElement(tn.LabelledSection,{header:n("RolloutDetails.Label.DistributionSet")},$().createElement(Ya,{id:f,name:w.name})),$().createElement(tn.LabelledSection,{header:n("RolloutDetails.Label.Weight"),help:$().createElement(tn.Documentation,{markdownFilePath:DS}),popoverHeading:n("Rollout.Create.Section.Weight")},E),$().createElement(tn.LabelledSection,{header:n("RolloutDetails.Label.UpdateType"),help:$().createElement(tn.Documentation,{markdownFilePath:TS}),popoverHeading:n("Doc.Rollout.TypeHeading")},$().createElement(PS,{type:p,forcedtime:h})),$().createElement(tn.LabelledSection,{header:O},A),y&&$().createElement(tn.LabelledSection,{header:n(v!==Hv?"RolloutDetails.Label.ApprovedBy":"RolloutDetails.Label.DeniedBy")},y),y&&$().createElement(tn.LabelledSection,{header:n(v!==Hv?"RolloutDetails.Label.ApprovalRemark":"RolloutDetails.Label.DenialRemark")},b||n("Global.NA"))))}function qS(){var e=Fv(),t=e.data,n=e.isLoading,r=e.error,o=e.clearQuery;return r?$().createElement(tn.ErrorState,{error:r,actions:$().createElement(dp,{onRetry:o})}):n?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"rollout-details-loading"})):$().createElement(VS,{rollout:t})}function WS(){var e=Nt();return{state:e.state.rolloutsWizard,actions:e.actions}}NS.displayName="RolloutApprovalModal",qS.displayName="RolloutDetailsBlade",qS.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("RolloutDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("RolloutDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:CS}))))};const zS=l.p+"static/RolloutCreate.f7f01760.md";function QS(e){return[{id:"Targets",label:e("Rollout.Create.Step.TargetsAndDS")},{id:"Groups",label:e("Rollout.Create.Step.Groups")},{id:"Types",label:e("Rollout.Create.Step.TypeAndOptions")},{id:"Review",label:e("Rollout.Create.Step.Summary")}]}function GS(e){return function(e){if(Array.isArray(e))return $S(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return $S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KS={all:["targets"],lists:function(){return[].concat(GS(KS.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(GS(KS.lists()),[e])},details:function(){return[].concat(GS(KS.all),["details"])},targetDetails:function(e){return[].concat(GS(KS.details()),[e])},assignedDS:function(e){return[].concat(GS(KS.targetDetails(e)),["assignedDS"])},installedDS:function(e){return[].concat(GS(KS.targetDetails(e)),["installedDS"])},attributes:function(e){return[].concat(GS(KS.targetDetails(e)),["attributes"])},pollingOverdueTime:function(){return[].concat(GS(KS.details()),["systemConfigs","pollingOverdueTime"])},deleteTarget:function(e){return[].concat(GS(KS.targetDetails(e)),["delete"])},requestAttributesUpdate:function(e){return[].concat(GS(KS.targetDetails(e)),["requestAttributesUpdate"])},add:function(){return[].concat(GS(KS.all),["add"])},update:function(e){return[].concat(GS(KS.targetDetails(e)),["update"])},metadata:function(e){return[].concat(GS(KS.targetDetails(e)),["metadata"])},metadataList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_n;return[].concat(GS(KS.metadata(e)),[t])},metadataDelete:function(e,t){return[].concat(GS(KS.metadata(e)),["delete",t])},metadataUpdate:function(e,t){return[].concat(GS(KS.metadata(e)),["update",t])},metadataAdd:function(e){return[].concat(GS(KS.metadata(e)),["add"])},createTargetTargetTypes:function(){return[].concat(GS(KS.all),["createTarget","targetTypes"])},tags:function(e){return[].concat(GS(KS.targetDetails(e)),["tags"])}};function YS(e,t){return Fn(KS.list(e),vi,e,t)}const JS=l.p+"static/ActionType.797ddd78.md",XS=l.p+"static/StartType.9b2449c0.md";function ZS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZS(Object(n),!0).forEach((function(t){tE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return rE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var oE="add_rollout-action-type-form",iE="add_rollout-start-type-form";function aE(){var e=Ut(),t=WS(),n=t.state,r=t.actions,o=n.rollout,i=o.startType,a=o.startAt,l=o.type,s=o.forceTime,u=r.updateRolloutWizardData,c=nE((0,G.useState)(s?(0,tn.dateObjToUtc)(s):""),2),d=c[0],f=c[1],p=nE((0,G.useState)(a?(0,tn.dateObjToUtc)(a):""),2),h=p[0],m=p[1],g=(0,tn.useFocusRef)();function y(e){var t=e.target.value,r=Date.now();f((0,tn.dateObjToUtc)(r)),u(eE(eE({},n.rollout),{},{type:t,forceTime:r}))}function b(e){var t=e.target.value,r=Date.now();m((0,tn.dateObjToUtc)(r)),u(eE(eE({},n.rollout),{},{startType:t,startAt:r}))}return(0,G.useEffect)((function(){var e="timeforced"===l&&void 0===s,t="scheduled"===i&&void 0===a;r.setStepCompleted(3,!e&&!t)}),[r,l,s,i,a]),$().createElement($().Fragment,null,$().createElement(tn.LabelledSection,{header:e("Rollout.ActionType"),help:$().createElement(tn.Documentation,{markdownFilePath:JS}),popoverHeading:e("Rollout.ActionType")}),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{ref:g,id:"".concat(oE,"-forced"),name:oE,label:e("Rollout.ActionType.Forced"),value:"forced",checked:"forced"===l,onChange:y})),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(oE,"-soft"),name:oE,label:e("Rollout.ActionType.Soft"),value:"soft",checked:"soft"===l,onChange:y})),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(oE,"-downloadOnly"),name:oE,label:e("Rollout.ActionType.DownloadOnly"),value:"downloadonly",checked:"downloadonly"===l,onChange:y})),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(oE,"-timeForced"),name:oE,label:e("Rollout.ActionType.TimeForced"),value:"timeforced",checked:"timeforced"===l,onChange:y})),"timeforced"===l?$().createElement(tn.DateTimeInput,{currentDate:d,onValidatedChange:function(e,t){f(e),u(eE(eE({},n.rollout),{},{forceTime:null===t||void 0===t?void 0:t.getTime()}))},required:!0}):$().createElement("div",{style:{marginTop:"2rem"}}),$().createElement(tn.LabelledSection,{header:e("Rollout.StartOptions"),help:$().createElement(tn.Documentation,{markdownFilePath:XS}),popoverHeading:e("Rollout.StartOptions")}),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(iE,"-manual"),name:iE,label:e("Rollout.StartType.Manual"),value:"manual",checked:"manual"===i,onChange:b})),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(iE,"-auto"),name:iE,label:e("Rollout.StartType.Auto"),value:"auto",checked:"auto"===i,onChange:b})),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(iE,"-scheduled"),name:iE,label:e("Rollout.StartType.Scheduled"),value:"scheduled",checked:"scheduled"===i,onChange:b})),"scheduled"===i&&$().createElement(tn.DateTimeInput,{currentDate:h,onValidatedChange:function(e,t){m(e),u(eE(eE({},n.rollout),{},{startAt:null===t||void 0===t?void 0:t.getTime()}))},required:!0}))}function lE(e){var t=e.values.filter((function(e){return void 0!==e}));return $().createElement(tn.LabelledSection,{header:e.header},$().createElement("div",null,t.map((function(e,t){return $().createElement("div",{key:t},e)}))))}function sE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cE(e){var t;if(!e.name||!e.targetFilter||!e.distributionSet||void 0===e.matchingTargetCount||e.matchingTargetCount<1&&!e.dynamic||!e.amountGroups&&!e.dynamic)return null;var n="percentage"===e.errorThresholdUnits?e.errorThresholdValue:Yv(e.errorThresholdValue,e.matchingTargetCount,e.amountGroups),r=null;if("auto"===e.startType)r=0;else if("scheduled"===e.startType){var o;r=null!==(o=e.startAt)&&void 0!==o?o:null}var i,a=null;"timeforced"===e.type&&(a=null!==(i=e.forceTime)&&void 0!==i?i:null);var l={};return l=e.dynamic&&e.targetsPerGroup?{dynamicGroupTemplate:{targetCount:e.targetsPerGroup},amountGroups:0}:{amountGroups:e.amountGroups},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sE(Object(n),!0).forEach((function(t){uE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:e.name,description:null!==(t=e.description)&&void 0!==t?t:"",type:e.type,distributionSetId:e.distributionSet.id,targetFilterQuery:e.targetFilter.query,successCondition:{condition:"THRESHOLD",expression:e.successThresholdPercentage.toString()},errorCondition:{condition:"THRESHOLD",expression:String(n)},startAt:r,forcetime:a,dynamic:e.dynamic,confirmationRequired:e.confirmationRequired,weight:e.weight},l)}function dE(){var e,t=Ut(),n=(0,ki.useLocation)(),r=vv(),o=Vt(),i=WS().state.rollout,a=(0,G.useCallback)((function(){o(t("Rollout.Create.SuccessMessage"));var e=new URLSearchParams(n.search);e.delete(fv),e.delete("c"),r.toHome(e.size?"?"+e:"")}),[t,o,r,n]),l=(e=a,zn(Ov.add(),gi,{onSuccess:function(){e()}})),s=l.mutate,u=l.isLoading,c=l.error,d=cE(i);return{create:(0,G.useCallback)((function(){null!==d&&s(d)}),[s,d]),isLoading:u,error:c,rollout:i,postData:d}}function fE(){var e,t,n,r,o,i,a,l,s,u,c=Ut(),d=WS().actions,f=dE(),p=f.create,h=f.rollout,m=f.error,g=f.isLoading,y=f.postData;(0,G.useEffect)((function(){return d.setStepCompleted(4,!0)}),[d]);var b,v=(0,tn.useFocusRef)();switch(h.type){case"forced":b="Rollout.ActionType.Forced";break;case"soft":b="Rollout.ActionType.Soft";break;case"downloadonly":b="Rollout.ActionType.DownloadOnly";break;case"timeforced":b="Rollout.ActionType.TimeForced"}var S=[];switch(h.startType){case"auto":S.push(c("Rollout.StartType.Auto"));break;case"manual":S.push(c("Rollout.StartType.Manual"));break;case"scheduled":S.push(c("Rollout.StartType.Scheduled"));var E=null!==(e=(0,tn.parseTimestamp)(h.startAt))&&void 0!==e?e:void 0;void 0!==E&&S.push(E)}return $().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},$().createElement(tn.LabelledSection,{header:c("Entity.Label.Name"),value:h.name}),$().createElement(tn.LabelledSection,{header:c("Entity.Label.Description"),value:null!==(t=h.description)&&void 0!==t?t:c("Global.NA")}),$().createElement(lE,{header:c("Rollout.Create.Field.TargetFilter"),values:[null!==(n=null===(r=h.targetFilter)||void 0===r?void 0:r.query)&&void 0!==n?n:"",c("Rollout.Create.TargetFilter.TargetCount",{count:h.matchingTargetCount})]}),$().createElement(lE,{header:c("Rollout.Create.Field.DistributionSet"),values:["".concat(null===(o=h.distributionSet)||void 0===o?void 0:o.name,":").concat(null===(i=h.distributionSet)||void 0===i?void 0:i.version),c("Rollout.Create.DistributionSetModuleCount",{count:h.softwareModulesCount})]}),$().createElement(tn.LabelledSection,{header:c("Rollout.Create.Section.Weight"),value:null!==(a=null===(l=h.weight)||void 0===l?void 0:l.toString())&&void 0!==a?a:c("Global.NA")}),$().createElement(lE,{header:c("Rollout.Create.Dynamic"),values:[h.dynamic?c("Global.Yes"):c("Global.No")]}),"dynamic"===h.groupDefinitionMode?$().createElement(lE,{header:c("Rollout.TargetsPerGroup"),values:[null===(s=h.targetsPerGroup)||void 0===s?void 0:s.toString()]}):$().createElement(lE,{header:c("Rollout.Create.Summary.Groups"),values:[c("Rollout.Create.Summary.Groups.GroupCount",{count:h.amountGroups}),Zv(c,h.matchingTargetCount,h.amountGroups)]}),$().createElement(lE,{header:c("Rollout.ActionType"),values:[c(b),"timeforced"===h.type&&null!==(u=(0,tn.parseTimestamp)(h.forceTime))&&void 0!==u?u:void 0]}),$().createElement(lE,{header:c("Rollout.StartOptions"),values:S}),$().createElement(lE,{header:c("Rollout.ConfirmationRequired"),values:[h.confirmationRequired?c("Global.Yes"):c("Global.No")]}),$().createElement(tn.LabelledSection,{header:c("Rollouts.ListGroup.TriggerThreshold"),value:c("Rollout.Create.Summary.Groups.TriggerThresholdPercentage",{value:h.successThresholdPercentage})}),$().createElement(tn.LabelledSection,{header:c("Rollouts.ListGroup.ErrorThreshold"),value:"number"===h.errorThresholdUnits?c("Rollout.Create.Summary.Groups.ErrorThresholdCount",{count:h.errorThresholdValue}):c("Rollout.Create.Summary.Groups.ErrorThresholdPercentage",{value:h.errorThresholdValue})}),!g&&m&&$().createElement(tn.ErrorState,{error:m}),$().createElement(tn.ButtonRow,null,g&&$().createElement(Ft.ProgressIndicator,{id:"add-rollout-progress",type:"indeterminate",progress:0}),$().createElement(Ft.Button,{ref:v,mode:"primary",label:c("Button.Create"),disabled:!y||g,onClick:p})))}const pE=l.p+"static/Assignments.02dba19e.md";function hE(e){return function(e){if(Array.isArray(e))return mE(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return mE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gE={all:["targetfilters"],lists:function(){return[].concat(hE(gE.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(hE(gE.lists()),[e])},details:function(){return[].concat(hE(gE.all),["details"])},targetFilter:function(e){return[].concat(hE(gE.details()),[e])},deleteTargetFilter:function(e){return[].concat(hE(gE.targetFilter(e)),["delete"])},add:function(){return[].concat(hE(gE.all),["add"])},update:function(e){return[].concat(hE(gE.targetFilter(e)),["update"])},autoAssignedDS:function(e){return[].concat(hE(gE.targetFilter(e)),["autoAssignedDS"])},addAutoAssignedDS:function(e){return[].concat(hE(gE.targetFilter(e)),["addAutoAssignedDS"])},deleteAutoAssignedDS:function(e){return[].concat(hE(gE.targetFilter(e)),["deleteAutoAssignedDS"])}};function yE(e,t){return Fn(gE.list(e),wi,e,t)}function bE(e){var t,n,r=e.targetFilter,o=Ut();return r.autoAssignDistributionSet&&(r.confirmationRequired?(t="link-checkmark",n=o("TargetFilterList.AutoAssignConfReqTooltip")):(t="link",n=o("TargetFilterList.AutoAssignTooltip"))),$().createElement(tn.SuggestionBoxButton,{label:r.name,icon:t,title:n||""})}function vE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return SE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function EE(e){var t=e.selected,n=e.onSelect,r=e.predefinedFilter,o=vE((0,G.useState)(""),2),i=o[0],a=o[1],l=vE((0,G.useState)(t),2),s=l[0],u=l[1],c=yE({limit:20,sort:"name:ASC",q:i?En(i,{convertToQParam:function(e){return"name==".concat(e)}}):void 0}),d=c.data,f=c.isLoading,p=c.isFetchingNextPage,h=c.fetchNextPage,m=c.error,g=Dn(d),y=g.totalCount,b=g.entities,v=y;r&&(v++,b.unshift(r));var S=Ut();return m?$().createElement(tn.ErrorState,{error:m}):$().createElement(tn.SuggestionSelect,{label:S("Rollout.Create.TargetFilter"),loadMoreLabel:S("TargetFilterList.LoadMoreFilter"),buttonTitle:S("TargetFilterList.LoadFilterOpenTooltip"),resetTitle:S("TargetFilterList.LoadFilterResetTooltip"),entries:b.map((function(e){return e.name})),onLoadMore:b.length!==v?h:void 0,onTextChange:a,selected:null===s||void 0===s?void 0:s.name,onSelect:function(e){var t=b.find((function(t){return t.name===e}));u(t),n(t)},loading:f||p,renderEntry:function(e){return $().createElement(bE,{targetFilter:b.find((function(t){return t.name===e}))})},autoSelect:!0})}function wE(e){return function(e){if(Array.isArray(e))return CE(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||AE(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||AE(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AE(e,t){if(e){if("string"===typeof e)return CE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CE(e,t):void 0}}function CE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TE(e){var t=e.selected,n=e.onSelect,r=e.query,o=void 0===r?[]:r,i=OE((0,G.useState)(""),2),a=i[0],l=i[1],s=OE((0,G.useState)(!1),2),u=s[0],c=s[1],d=OE((0,G.useState)(t),2),f=d[0],p=d[1],h=hm({limit:20,sort:"name:ASC",q:[].concat(wE(u?[]:o),["complete==true","valid==true",a?"(".concat([En(a,{convertToQParam:function(e){return"name==".concat(e)}}),En(a,{convertToQParam:function(e){return"version==".concat(e)}})].join(","),")"):void 0]).filter((function(e){return void 0!==e})).join(";")},{onError:function(){o.length>0&&c(!0)}}),m=h.data,g=h.isLoading,y=h.isFetchingNextPage,b=h.fetchNextPage,v=h.error,S=Dn(m),E=S.totalCount,w=S.entities,O=Ut(),A=0===w.length&&!g&&o.length>0&&!f&&!a;return v?$().createElement(tn.ErrorState,{error:v}):$().createElement($().Fragment,null,A?$().createElement(Ft.Notification,{type:"warning"},O("CompatibleDistributionSets.NoResults")):$().createElement(tn.SuggestionSelect,{label:O("Entity.Label.DistributionSet"),loadMoreLabel:O("Global.LoadMore"),buttonTitle:O("Dropdown.ViewOptions"),resetTitle:O("Button.Reset"),entries:w.map((function(e){return"".concat(e.name,":").concat(e.version)})),onLoadMore:w.length!==E?b:void 0,onTextChange:l,selected:f&&"".concat(f.name,":").concat(f.version),onSelect:function(e){var t=w.find((function(t){return"".concat(t.name,":").concat(t.version)===e}));p(t),n(t)},loading:g||y,renderEntry:function(e){return $().createElement(tn.SuggestionBoxButton,{label:e})},autoSelect:!0}),o.length>0&&u&&$().createElement(Ft.Notification,{type:"warning"},O("CompatibleDistributionSets.NotAbleToDetect")))}function DE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DE(Object(n),!0).forEach((function(t){PE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function PE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ME(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RE={width:"auto",margin:0};function LE(e,t){return e?"...":t}function kE(e){var t,n,r,o=e.predefinedFilter,i=e.predefinedDS,a=e.rolloutNames,l=Ut(),s=WS(),u=s.state,c=s.actions,d=(0,G.useMemo)((function(){return LE(!1,0!==u.rollout.matchingTargetCount?void 0:l("Rollout.Create.TargetFilter.NoMatch"))}),[l,u.rollout.matchingTargetCount]),f=(0,G.useMemo)((function(){var e=u.rollout.matchingTargetCount;return LE(void 0===e&&void 0!==u.rollout.targetFilter,void 0===e?void 0:l("Rollout.Create.TargetFilter.TargetCount",{count:e}))}),[l,u.rollout.matchingTargetCount,u.rollout.targetFilter]),p=(0,G.useMemo)((function(){var e=u.rollout.softwareModulesCount;return LE(void 0===e&&void 0!==u.rollout.distributionSet,e?l("Rollout.Create.DistributionSetModuleCount",{count:e}):void 0)}),[l,u.rollout.distributionSet,u.rollout.softwareModulesCount]),h=$o({defaultValues:{name:u.rollout.name,description:u.rollout.description},values:{name:null!==(t=u.rollout.name)&&void 0!==t?t:"",description:u.rollout.description},mode:"onChange"}),m=h.register,g=h.getValues,y=h.formState,b=y.isValid,v=y.errors,S=u.rollout.targetFilter||o||void 0,E=ME((0,G.useState)(!1),2),w=E[0],O=E[1];(0,G.useEffect)((function(){!o||u.rollout.targetFilter||w||(c.updateRolloutWizardData({targetFilter:o,matchingTargetCount:void 0}),O(!0))}),[o,c,u.rollout.targetFilter,w]);var A=u.rollout.distributionSet||i||void 0,C=ME((0,G.useState)(!1),2),T=C[0],D=C[1];(0,G.useEffect)((function(){!i||u.rollout.distributionSet||T||(c.updateRolloutWizardData({distributionSet:i,softwareModulesCount:void 0}),D(!0))}),[i,c,u.rollout.distributionSet,T]);var x=u.rollout.weight;return(0,G.useEffect)((function(){var e=b&&void 0!==u.rollout.targetFilter&&void 0!==u.rollout.distributionSet;c.setStepCompleted(1,e)}),[c,b,u.rollout]),$().createElement($().Fragment,null,$().createElement(tn.LabelledSection,{header:l("Rollout.Create.Section.BasicProperties")}),$().createElement(Yo,{autoFocus:!0,register:m,getValues:g,field:"name",label:"Rollout.Create.Section.Name",maxSize:128,notificationText:null===v||void 0===v||null===(n=v.name)||void 0===n?void 0:n.message,isRequired:!0,onChange:function(e){return c.updateRolloutWizardData(xE(xE({},u.rollout),{},{name:e}))},notAllowedDuplicates:a}),$().createElement(Yo,{register:m,getValues:g,field:"description",label:"Rollout.Create.Section.Description",maxSize:512,notificationText:null===v||void 0===v||null===(r=v.description)||void 0===r?void 0:r.message,onChange:function(e){return c.updateRolloutWizardData(xE(xE({},u.rollout),{},{description:e}))}}),$().createElement(tn.LabelledSection,{header:l("Rollout.Create.Section.Assignments"),help:$().createElement(tn.Documentation,{markdownFilePath:pE}),popoverHeading:l("Rollout.Create.Section.Assignments")}),$().createElement(Ft.FormField,{fieldType:"dropdown",notificationType:d?"warning":"neutral",notificationText:d||f},$().createElement(EE,{predefinedFilter:o,selected:S,onSelect:function(e){c.updateRolloutWizardData(xE(xE({},u.rollout),{},{targetFilter:e,matchingTargetCount:void 0}))}})),$().createElement(Ft.FormField,{fieldType:"dropdown",notificationText:p},$().createElement(TE,{selected:A,onSelect:function(e){return c.updateRolloutWizardData(xE(xE({},u.rollout),{},{distributionSet:e,softwareModulesCount:void 0}))}})),$().createElement(tn.LabelledSection,{header:l("Rollout.Create.Section.Weight"),help:$().createElement(tn.Documentation,{markdownFilePath:DS}),popoverHeading:l("Rollout.Create.Section.Weight")}),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"weight",label:l("Rollout.Weight"),style:RE,step:1,min:0,max:1e3,value:x||1e3,onChange:function(e,t){c.updateRolloutWizardData(xE(xE({},u.rollout),{},{weight:t}))}})))}function jE(e,t,n){return void 0===e||isNaN(e)||e<t?t:e>n?n:e}function _E(e){var t=e.unit,n=e.value,r=e.totalTargets,o=e.groups,i=e.onUnitChange,a=e.onValueChange,l=Ut(),s=(0,G.useMemo)((function(){return[{name:"%",value:"percentage"},{name:l("Rollout.ErrorThreshold.Type.Count"),value:"number"}]}),[l]),u=Jv(r,o),c="percentage"===t?100:u;(0,G.useEffect)((function(){n>c&&a(c)}),[n,c,a]);return $().createElement(Ft.FormField,{fieldType:"text"},$().createElement("div",{style:{display:"flex"}},$().createElement(Ft.ValueModificator,{id:"rollout-error-threshold",label:l("Rollout.ErrorThreshold.Name"),style:{width:"auto",margin:0,flexGrow:1},step:1,min:0,max:c,value:n,onChange:function(e,t){return a(jE(t,0,c))}}),$().createElement(Ft.Dropdown,{id:"rollout-error-threshold-unit",options:s,value:null!==t&&void 0!==t?t:"percentage",onChange:function(e){return function(e){var a=n;0!==n&&("number"===t&&"percentage"===e?a=Yv(n,r,o):"percentage"===t&&"number"===e&&(a=u*(n/100))),i(e,Math.round(a))}(e.target.value)},style:{marginLeft:"1rem"}})))}const FE=l.p+"static/Groups.a4163935.md",NE=l.p+"static/ConfirmationRequired.05c44429.md";function BE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BE(Object(n),!0).forEach((function(t){HE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var VE={width:"auto",margin:0};function qE(e){var t,n=e.tenantConfiguration,r=Ut(),o=WS(),i=o.state,a=o.actions,l=i.rollout,s=l.amountGroups,u=l.targetsPerGroup,c=l.successThresholdPercentage,d=l.errorThresholdUnits,f=l.errorThresholdValue,p=l.matchingTargetCount,h=l.groupDefinitionMode,m=l.groups,g=l.confirmationRequired,y=a.updateRolloutWizardData,b=a.setConfirmationFlow;if(void 0===p)throw Error("Target count is required.");var v=Math.min(500,p);(0,G.useEffect)((function(){var e=i.rollout.amountGroups;(void 0===e||e>v)&&y(UE(UE({},i.rollout),{},{amountGroups:Math.ceil(p/500)}))}),[y,i.rollout,v,p]),(0,G.useEffect)((function(){var e=!1;"static"===h?e=(null!==s&&void 0!==s?s:0)>0:"dynamic"===h&&u&&(e=u>=1),a.setStepCompleted(2,e)}),[a,s,h,m,u,y]),(0,G.useEffect)((function(){"static"===h?y({dynamic:!1}):"dynamic"===h&&(u||y({targetsPerGroup:1}),y({dynamic:!0}))}),[h,u,y]),(0,G.useEffect)((function(){p<1&&y({groupDefinitionMode:E})}),[p,y]),(0,G.useEffect)((function(){var e;null===(e=document.querySelector("#rollout-groups-count input"))||void 0===e||e.focus()}),[]),(0,G.useEffect)((function(){n&&void 0===i.confirmationFlowEnabled&&b(n.value)}),[i.confirmationFlowEnabled,b,n]),(0,G.useEffect)((function(){i.confirmationFlowEnabled&&void 0===i.rollout.confirmationRequired&&y(UE(UE({},i.rollout),{},{confirmationRequired:i.confirmationFlowEnabled}))}),[i.confirmationFlowEnabled,i.rollout,y]);var S="static",E="dynamic",w=(HE(t={},S,{label:r("Rollout.GroupDefinition.StaticGroupDefinition")}),HE(t,E,{label:r("Rollout.GroupDefinition.DynamicGroupDefinition")}),t),O=function(){return $().createElement($().Fragment,null,"static"===h?$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"rollout-groups-count",label:r("Rollout.GroupCount"),style:VE,step:1,min:1,max:v,value:s,onChange:function(e,t){y(UE(UE({},i.rollout),{},{amountGroups:jE(t,1,v)}))}})):$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"targets-per-group",label:r("Rollout.TargetsPerGroup"),style:VE,step:1,min:1,value:u||1,onChange:function(e,t){y(UE(UE({},i.rollout),{},{targetsPerGroup:t}))}})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"rollout-threshold-trigger",label:r("Rollout.TriggerThreshold"),style:VE,step:1,min:0,max:100,value:c,onChange:function(e,t){y(UE(UE({},i.rollout),{},{successThresholdPercentage:jE(t,0,100)}))}})),$().createElement(_E,{unit:d,value:f,totalTargets:p,groups:null!==s&&void 0!==s?s:1,onUnitChange:function(e,t){y(UE(UE({},i.rollout),{},{errorThresholdUnits:e,errorThresholdValue:t}))},onValueChange:function(e){y(UE(UE({},i.rollout),{},{errorThresholdValue:e}))}}),p>0&&"dynamic"!==h&&$().createElement(Ft.Notification,{type:"neutral",style:{marginTop:"1rem"}},$().createElement($().Fragment,null,$().createElement("div",null,r("Rollout.TargetsDistributed",{targetsCount:p,groupsCount:s})),(null!==s&&void 0!==s?s:0)>1?$().createElement("div",null,Zv(r,p,s)):null)),$().createElement("div",{style:{marginTop:"2rem"}},$().createElement(tn.LabelledSection,{header:r("Rollout.Create.Summary.Groups.RequestConfirmation"),help:$().createElement(tn.Documentation,{markdownFilePath:NE}),popoverHeading:r("Rollout.Create.Summary.Groups.RequestConfirmation")}),$().createElement(Ft.FormField,{fieldType:"checkbox"},$().createElement(Ft.Checkbox,{id:"rollout-confirmation-required",label:r("Rollout.Create.ConfirmationRequired"),defaultChecked:g,onClick:function(e){return y(UE(UE({},i.rollout),{},{confirmationRequired:e.currentTarget.checked}))},disabled:!i.confirmationFlowEnabled}))))};return $().createElement($().Fragment,null,$().createElement(tn.LabelledSection,{header:r("Rollout.GroupDefinition"),help:$().createElement(tn.Documentation,{markdownFilePath:FE}),popoverHeading:r("Rollout.GroupDefinition")}),$().createElement(tn.Tabs,{tabs:w,initialTabId:p>0?S:E,onChange:function(e){y(UE(UE({},i.rollout),{},{groupDefinitionMode:e}))}},$().createElement(tn.Tab,{key:S,id:S},p>0?$().createElement(O,null):$().createElement(Ft.Notification,{type:"warning",style:{marginTop:"1rem"}},r("Rollout.Create.StaticGroups.Disabled"))),$().createElement(tn.Tab,{key:E,id:E},$().createElement(O,null))))}function WE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WE(Object(n),!0).forEach((function(t){QE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GE(e,t,n){var r=(0,G.useMemo)((function(){return"number"===typeof e?{id:e,lastModifiedAt:void 0}:e||{}}),[e]),o=r.id,i=r.lastModifiedAt,a=ue(),l=Ov.rolloutDeployGroups(null!==o&&void 0!==o?o:-1,null!==i&&void 0!==i?i:-1,t),s=(0,G.useCallback)((function(){a.removeQueries({queryKey:l})}),[a,l]),u=Fn(l,"".concat(gi,"/").concat(o,"/deploygroups"),t,zE({enabled:void 0!==o},n));return zE(zE({},u),{},{removeQuery:s})}const $E=l.p+"static/GroupDefinition.94de8789.md";function KE(e,t,n){return Es(e,"".concat(ci,"/").concat(encodeURIComponent(t)),n)}function YE(e){return function(e){if(Array.isArray(e))return JE(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return JE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var XE={all:["systemConfigs"],multiAssignmentsEnabled:function(){return[].concat(YE(XE.all),["multiAssignmentsEnabled"])},userConfirmationFlowEnabled:function(){return[].concat(YE(XE.all),["userConfirmationFlowEnabled"])}};function ZE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ew(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZE(Object(n),!0).forEach((function(t){tw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nw(){var e,t,n=(0,G.useRef)(),r=WS(),o=r.state,i=r.actions,a=i.updateRolloutWizardData,l=i.setCurrentStep,s=dE().create,u=Ut(),c=new URLSearchParams(window.location.search).get(fv),d=new URLSearchParams(window.location.search).get("c"),f=d?+d:void 0,p=Rv(f),h=p.data,m=p.isLoading,g=null===h||void 0===h?void 0:h.targetFilterQuery,y=wm(null===h||void 0===h?void 0:h.distributionSetId),b=y.data,v=y.isLoading,S=GE({id:f,lastModifiedAt:null===h||void 0===h?void 0:h.lastModifiedAt},void 0,{enabled:!!h}),E=S.data,w=S.isLoading,O=KE(XE.userConfirmationFlowEnabled(),Bu),A=O.data,C=O.error,T=(0,G.useMemo)((function(){var e;return null!==(e=null===E||void 0===E?void 0:E.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:[]}),[E]),D=c||g,x=(0,G.useMemo)((function(){return D?eS(decodeURIComponent(D),u("Rollout.Create.Field.FilterForSelectedTarget")):void 0}),[D,u]),P=function(e,t,n){var r=e({limit:500,sort:t,q:n}),o=r.data,i=r.isLoading,a=r.isFetchingNextPage,l=r.error,s=r.fetchNextPage;return(0,G.useEffect)((function(){var e=Dn(o),t=e.totalCount,n=e.entities;t>n.length&&n.length<1e3&&!l&&!i&&!a&&s()}),[o,i,l,s,a]),(0,G.useMemo)((function(){return{entities:Dn(o).entities,isLoading:i,error:l}}),[o,i,l])}(xv,"name:ASC").entities,M=(0,G.useMemo)((function(){return P.map((function(e){return e.name}))}),[P]),I=YS({q:null===(e=o.rollout.targetFilter)||void 0===e?void 0:e.query},{enabled:!!o.rollout.targetFilter}),R=I.data,L=I.error,k=Cb(null===(t=o.rollout.distributionSet)||void 0===t?void 0:t.id,{enabled:!!o.rollout.distributionSet}),j=k.data,_=k.error;(0,G.useEffect)((function(){if(d&&h&&x&&b){for(var e="".concat(h.name,"-copy"),t=2;M.includes(e);)e="".concat(h.name,"-copy-").concat(t++);var n=function(e,t,n,r,o){var i,a;a=void 0===e.startAt?"manual":0===e.startAt?"auto":"scheduled";var l,s,u,c="static",d=1,f=50,p=50,h=!1;if(e.dynamic){if(t.every((function(e){return e.dynamic}))){var m,g;h=!0,c="dynamic",f=+(null===(m=t[0])||void 0===m?void 0:m.successCondition.expression),p=+(null===(g=t[0])||void 0===g?void 0:g.errorCondition.expression),l=t[0].targetPercentage}}else(function(e){var t=e[0];return e.some((function(e){return e.successCondition.expression!==t.successCondition.expression||e.errorCondition.expression!==t.errorCondition.expression||e.targetFilterQuery!==t.targetFilterQuery}))})(t)||(d=e.totalGroups,f=+(null===(s=t[0])||void 0===s?void 0:s.successCondition.expression),p=+(null===(u=t[0])||void 0===u?void 0:u.errorCondition.expression));var y=t.map((function(e,t){return{name:e.name,description:e.description,errorCondition:e.errorCondition,successCondition:e.successCondition,targetPercentage:e.targetPercentage,targetFilter:eS(decodeURIComponent(e.targetFilterQuery),o),confirmationRequired:e.confirmationRequired}}));return{name:e.name,description:e.description,targetFilter:n,distributionSet:r,type:e.type,amountGroups:d,groups:y,groupDefinitionMode:c,successThresholdPercentage:f,errorThresholdUnits:"percentage",errorThresholdValue:p,forceTime:e.forcetime,confirmationRequired:null===(i=y[0])||void 0===i?void 0:i.confirmationRequired,startType:a,startAt:e.startAt,dynamic:h,targetsPerGroup:l}}(ew(ew({},h),{},{name:e}),T,x,b,u("Rollout.Create.Field.Predefined"));i.updateRolloutWizardData(n)}}),[i,d,x,h,b,T,P,M,u]),(0,G.useEffect)((function(){void 0!==R&&a({matchingTargetCount:Dn(R).totalCount})}),[R,a]),(0,G.useEffect)((function(){void 0!==j&&a({softwareModulesCount:Dn(j).totalCount})}),[j,a]);var F=[$().createElement(kE,{key:0,predefinedFilter:x,predefinedDS:b,rolloutNames:M}),$().createElement(qE,{key:1,tenantConfiguration:A}),$().createElement(aE,{key:2}),$().createElement(fE,{key:3})],N=[L,_,C].filter((function(e){return null!==e})),B=o.steps.completedSteps.includes(o.steps.currentStep),U=o.steps.currentStep===F.length;return d&&(m||v||w)?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement("div",{ref:n,onKeyDown:function(e){(0,tn.dontTabOutOfDialogue)(e,n.current)},onKeyUp:function(e){"Enter"===e.key&&e.ctrlKey&&(U?s():B&&l(o.steps.currentStep+1))}},N.length>0?$().createElement(tn.ErrorState,{error:N[0]}):F[o.steps.currentStep-1])}function rw(e){var t=e.context.actions.renderBlade,n=Ut(),r=(0,ki.useNavigate)(),o=WS(),i=o.state,a=o.actions,l=QS(n);function s(){t(nw.displayName,{active:!0})}return(0,G.useEffect)((function(){return function(){return a.resetRolloutWizard()}}),[a]),$().createElement(tn.Wizard,{labelCancel:n("Button.Cancel"),labelBack:n("Button.Back"),labelNext:n("Button.Next"),currentStep:i.steps.currentStep-1,onCancel:function(){r(-1)},onBack:function(){a.setCurrentStep(i.steps.currentStep-1),s()},onNext:function(){a.setCurrentStep(i.steps.currentStep+1),s()},steps:l,canChangeStep:i.steps.completedSteps.includes(i.steps.currentStep)})}nw.displayName="AddRolloutWizardStepBlade",nw.Header=function(){var e=Ut(),t=WS().state,n=QS(e),r=2===t.steps.currentStep;return $().createElement($().Fragment,null,n[t.steps.currentStep-1].label,r&&$().createElement(tn.InfoButton,{popoverHeading:n[t.steps.currentStep-1].label},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:$E}))))},rw.displayName="AddRolloutWizardBlade",rw.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("Rollout.Add"),$().createElement(tn.InfoButton,{popoverHeading:e("Rollout.Add")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:zS}))))};const ow=l.p+"static/RolloutStatus.18734529.md";function iw(e,t,n){var r=ue(),o="".concat(gi,"/").concat(e,"/").concat(t);return zn(Ov[t](e),o,{onSuccess:function(){null===n||void 0===n||n(),r.refetchQueries(Ov.rolloutDetails(e))}})}function aw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return lw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sw(e){var t=e.rollout,n=Ut(),r=t.status,o=t.id,i=t.totalTargetsPerStatus,a="ready"===r||"paused"===r,l="running"===r,s="running"===r&&i.scheduled>0,u=iw(o,"start"),c=iw(o,"pause"),d=iw(o,"resume"),f=function(e){var t=Ut(),n=gr(),r=Vt(),o=iw(e,"triggerNextGroup",(function(){return r(t("RolloutControls.Next.SuccessMessage"))}));return(0,G.useCallback)((function(){n("confirm",(function(e){o.mutate({},{onError:e})}),{variant:"warning",headline:t("RolloutControls.Next.Confirm.Header"),message:t("RolloutControls.Next.Confirm.Message")})}),[t,n,o])}(o),p=aw((0,G.useState)(),2),h=p[0],m=p[1];return(0,G.useEffect)((function(){u.error&&m(u.error)}),[u]),(0,G.useEffect)((function(){d.error&&m(d.error)}),[d]),(0,G.useEffect)((function(){c.error&&m(c.error)}),[c]),$().createElement("div",{className:"rollout-controls"},$().createElement("div",{className:"buttons-container"},$().createElement(Ft.Button,{mode:"integrated",onClick:function(){m(void 0),"paused"===r&&d.mutate({}),"ready"===r&&u.mutate({})},icon:"play",title:n("ready"===r?"RolloutControls.Start":"RolloutControls.Resume"),disabled:!a}),$().createElement(Ft.Button,{mode:"integrated",onClick:function(){m(void 0),c.mutate({})},icon:"pause",title:n("RolloutControls.Pause"),disabled:!l}),$().createElement(Ft.Button,{mode:"integrated",onClick:function(){m(void 0),f()},icon:"skip-forward-frame",title:n("RolloutControls.Next"),disabled:!s})),h&&$().createElement(tn.ErrorState,{error:h}))}function uw(e){var t=e.rollout,n=Ut(),r=Ht(),o=t.status,i="waiting_for_approval"===o,a=n(iS(o));return $().createElement($().Fragment,null,!i&&a,i&&$().createElement(Ft.Link,{level:"simple",icon:{iconName:"alert-warning"},iconPosition:"right",onClick:function(){return r(NS.displayName,{rolloutId:t.id})}},a))}function cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cw(Object(n),!0).forEach((function(t){fw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pw(e,t,n,r){var o=ue(),i=(0,G.useMemo)((function(){return"number"===typeof e?{id:e,targetsPerStatus:void 0}:e||{}}),[e]),a=i.id,l=i.targetsPerStatus,s="".concat("v1/insights","/rollout/").concat(a);n&&n>-1&&(s+="/".concat(n)),t&&(s+="?status=".concat(t.toUpperCase()));var u=Ov.insights(a||-1,n,t,l);return dw({clearQuery:(0,G.useCallback)((function(){o.removeQueries({queryKey:u,exact:!0})}),[u,o])},Es(u,s,dw({enabled:"number"===typeof a},r)))}var hw=["allowFiltering"];function mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mw(Object(n),!0).forEach((function(t){yw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return vw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sw(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ew(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allowFiltering,n=void 0===t||t,r=Sw(e,hw),o=(0,ki.useSearchParams)(),i=bw(o,1),a=i[0],l=a.get(pv),s=(0,G.useMemo)((function(){return n?cS(null!==l&&void 0!==l?l:""):{group:null,status:null}}),[n,l]),u=s.group,c=s.status,d=Fv(),f=d.rolloutId,p=d.data,h=pw({id:f,targetsPerStatus:null===p||void 0===p?void 0:p.totalTargetsPerStatus},c,u,gw({enabled:!!p},r));return gw(gw({},h),{},{rolloutId:null!==f&&void 0!==f?f:null,reportedStatus:c,groupId:u})}function ww(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ow(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ow(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ow(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aw(e){var t=e.highlightErrors,n=Ut(),r=vv(),o=Ew({allowFiltering:!1}),i=o.data,a=o.isLoading,l=o.isFetching,s=o.error,u=o.clearQuery,c=(0,G.useMemo)((function(){return i?i.groupInsights.reduce((function(e,t){return Object.entries(t.targetsPerStatusAndCode).reduce((function(e,t){var n=ww(t,2),r=n[0],o=n[1],i=Object.values(o).reduce((function(e,t){return e+t}),0);return e[r]?e[r]+=i:e[r]=i,e}),e)}),{}):{}}),[i]);return $().createElement("div",null,s&&$().createElement(tn.ErrorState,{error:s,actions:$().createElement(dp,{onRetry:u})}),(a||l)&&$().createElement(tn.InlineLoadingIndicator,null),i&&$().createElement("div",{className:"rollout-status__progress__statuses"},Tw.map((function(e){var o,i=ww(e,2),a=i[0],l=i[1];return $().createElement("div",{key:a},$().createElement(Ft.Link,{onClick:function(){return r.withInsights(a)}},"".concat(n(l),": "),null!==(o=c[a])&&void 0!==o?o:0,t&&"error"===a&&$().createElement(Ft.Icon,{className:"rollout-progress-icon",iconName:"alert-error-filled",role:"img"})))}))),$().createElement("div",null,$().createElement(Ft.Link,{onClick:function(){return r.withInsights()}},n("Rollout.Status.ViewInsights"))))}var Cw=Object.entries(gl),Tw=Cw.slice(0,6).map((function(e,t){return[e,Cw[6+t]]})).flatMap((function(e){return e}));function Dw(e){var t=e.rollout,n=Ut(),r=t.lastModifiedAt,o=t.totalTargetsPerStatus,i=t.deleted,a=aS(o),l=sS(o);return $().createElement("div",{className:"rollout-status-view"},i&&$().createElement(MS,{entity:n("RolloutDetails.Entity.Name")}),$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout",style:{marginBottom:0}},$().createElement("div",{className:"rollout-status__content"},$().createElement("div",null,$().createElement(tn.LabelledSection,{header:n("Entity.Label.LastModifiedAt")},(0,tn.parseTimestamp)(r)),$().createElement(lE,{header:n("Rollout.Label.Status"),values:[$().createElement(uw,{key:"status-1",rollout:t}),n("Rollout.TargetsDone",{done:a,total:t.totalTargets}),t.totalTargetsPerStatus.notstarted>0?n("Rollout.NotStartedTargets.Label",{notStarted:t.totalTargetsPerStatus.notstarted}):void 0,$().createElement(_m,{key:0,query:"?rolloutsId=".concat(t.id),title:n("Rollout.ActionHistory.Tooltip",{controllerId:t.id}),noActionsYet:!uS(t.totalTargetsPerStatus)})]})),$().createElement("div",null,$().createElement(tn.LabelledSection,{header:n("Rollout.Label.Progress")},$().createElement(Aw,{highlightErrors:l}))))),!i&&$().createElement("div",{className:"rollout-status__controls"},$().createElement(sw,{rollout:t})))}function xw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(n),!0).forEach((function(t){Mw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iw(e,t){var n=Fv(),r=n.rolloutId,o=n.data,i=n.refetch,a=GE({id:r,lastModifiedAt:null===o||void 0===o?void 0:o.lastModifiedAt},Pw(Pw({},Rw),e),Pw({enabled:!!o},t)),l=a.removeQuery,s=(0,G.useCallback)((function(){i(),l()}),[i,l]);return Pw(Pw({},a),{},{rolloutId:r,rollout:null!==o&&void 0!==o?o:null,refresh:s})}var Rw={representation:"full",sort:"id:ASC"},Lw={creating:{icon:"components-add",tooltip:"Rollout.Status.Creating"},ready:{icon:"standby",tooltip:"Rollout.Status.Ready"},scheduled:{icon:"clock",tooltip:"RolloutGroup.Status.Scheduled"},finished:{icon:"alert-success",tooltip:"Rollout.Status.Finished"},error:{icon:"alert-error",tooltip:"RolloutGroup.Status.Error"},running:{icon:"refresh-checkmark",tooltip:"Rollout.Status.Running"}};function kw(e){var t=e.status,n=Ut(),r=Lw[t],o=r.icon,i=r.tooltip;return $().createElement(Ft.Icon,{role:"img",title:n(i),iconName:o})}function jw(e){if(e)return $().createElement(kw,{status:e.status})}function _w(e){return"".concat(e,"%")}function Fw(e,t){var n=Ut();return(0,G.useMemo)((function(){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={isDefault:!0};return[Ea(e("Entity.Label.Name"),"name",r),Oa(e("Rollouts.List.Targets"),"totalTargets",e,r,{width:"6em"}),{data:{columnId:"errorCondition",isDefault:!0},header:e("Rollouts.ListGroup.ErrorThreshold"),resolveCellTitle:function(e){var t;return _w(null===(t=e.errorCondition)||void 0===t?void 0:t.expression)},renderCell:function(e){var t;return _w(null===(t=e.errorCondition)||void 0===t?void 0:t.expression)},style:{width:"6em"}},{data:{columnId:"successCondition",isDefault:!0},header:e("Rollouts.ListGroup.TriggerThreshold"),resolveCellTitle:function(e){var t;return _w(null===(t=e.successCondition)||void 0===t?void 0:t.expression)},renderCell:function(e){var t;return _w(null===(t=e.successCondition)||void 0===t?void 0:t.expression)},style:{width:"6em"}},Ta(e("Rollout.Label.Status"),"status",jw,!0),{data:{columnId:"progress",isDefault:!0},header:e("Rollout.Label.Progress"),renderCell:function(e){return e.totalTargetsPerStatus&&$().createElement(hS,{status:e.totalTargetsPerStatus})},style:{width:"10em"}},{data:{columnId:"actions-link",isDefault:!0},header:e("Rollouts.List.Actions"),renderCell:function(t){return $().createElement(_m,{query:"?rolloutsGroupId="+t.id,title:e("ActionsLink.Tooltip"),noActionsYet:!uS(t.totalTargetsPerStatus)})},cellStyle:{overflow:"hidden"},style:{width:"9em"},disableOnSelect:!0},Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy"),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Ea(e("Rollouts.ListGroup.TargetFilterQuery"),"targetFilterQuery",void 0,void 0,t),{data:{columnId:"targetPercentage",isDefault:!1},header:e("Rollouts.ListGroup.TargetPercentage"),renderCell:function(e){return n?$().createElement($().Fragment,null,"i18n('Global.NA')"):$().createElement($().Fragment,null,e.targetPercentage)}}]}(n,e,t)}),[n,e,t])}function Nw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Bw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uw(e){var t,n,r=e.autoRefresh,o=e.onToggleAutoRefresh,i=Ut(),a=Iw(void 0,{refetchInterval:!!r&&Z}),l=a.data,s=a.isLoading,u=a.isFetchingNextPage,c=a.error,d=a.rollout,f=a.fetchNextPage,p=a.removeQuery,h=a.refresh,m=Fw(null===d||void 0===d?void 0:d.targetFilterQuery,null!==(t=null===d||void 0===d?void 0:d.dynamic)&&void 0!==t&&t),g=Nw((0,G.useState)(m),2),y=g[0],b=g[1],v=(0,G.useMemo)((function(){return{allColumns:m,onColumnSelectionChange:function(e){b(e)},typeName:Vw}}),[m]),S=(0,G.useMemo)((function(){var e;return null!==(e=null===l||void 0===l?void 0:l.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:Hw}),[l]);if(c)return $().createElement(tn.ErrorState,{error:c,actions:$().createElement(dp,{onRetry:p})});var E=null!==(n=null===l||void 0===l?void 0:l.pages[(null===l||void 0===l?void 0:l.pages.length)-1].total)&&void 0!==n?n:0,w=s||u,O="finished"===(null===d||void 0===d?void 0:d.status)||w;return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:E,columnSelectorProps:v,onRefresh:h,refreshDisabled:O,autoRefresh:r,onToggleAutoRefresh:o}),$().createElement(Ft.DataList,{items:S,columns:y,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:i("Rollouts.List.Empty"),onScrollToBottom:f},w&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"rollout-groups-loading"})))}var Hw=[],Vw="groupsrollout";function qw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Ww(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ww(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ww(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zw(){var e=Ut(),t=qw(cs(),2),n=t[0],r=t[1],o=Fv({refetchInterval:!!n&&Z});return o.error?$().createElement(tn.ErrorState,{error:o.error,actions:$().createElement(dp,{onRetry:o.clearQuery})}):o.isLoading?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"rollout-status-loading"})):$().createElement($().Fragment,null,$().createElement("h3",null,e("RolloutStatusView.Header.Status")),$().createElement(Dw,{rollout:o.data}),$().createElement(Ft.Divider,null),$().createElement("h3",null,e("RolloutStatusView.Header.Groups")),$().createElement(Uw,{autoRefresh:n,onToggleAutoRefresh:r}))}zw.displayName="RolloutStatusBlade",zw.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("RolloutStatusBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("RolloutStatusBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:ow}))))};const Qw=l.p+"static/RolloutInsights.c3d9074e.md";var Gw=["#440c41","#9e2896","#00a4fd","#003e64","#147671","#0a4f4b"],$w=["#d50005","#ed0007","#ff2124","#ff5152","#ff6e6f","#ff8787","#ff9d9d","#ffb2b2"],Kw=$w[3],Yw=["#007a42","#00884a","#219557","#37a264","#4ab073","#5ebd82","#72ca92","#86d7a2"],Jw=Yw[3],Xw=["#006ead","#007bc0","#0088d4","#0096e8","#00a4fd","#56b0ff","#7ebdff","#9dc9ff"],Zw=Xw[3],eO=["#ad8c00","#bd9900","#cda600","#deb300","#eec100","#ffcf00","#ffdf95","#ffefd1"],tO=["#b12ea9","#c535bc","#d543cb","#e552da","#e472db","#e48cdd","#e5a2df","#e8b6e3"],nO=tO[0],rO=["#147671","#18837e","#2e908b","#419e98","#54aba5","#66b8b2","#79c5c0","#8dd2cd"],oO=["#656a6f","#71767c","#7d8389","#8a9097","#979ea4","#a4abb3","#b2b9c0","#c1c7cc","#d0d4d8"],iO=oO[3],aO="#eff1f2",lO={borderColor:"#ffffff",borderWidth:1,backgroundColor:Gw},sO={backgroundColor:"#ffffff",bodyColor:"#000000",cornerRadius:0,displayColors:!1,borderColor:"#cccccc",borderWidth:1},uO={anchor:"center",align:"center",color:"transparent",font:{size:12,family:"boschsans"},labels:{title:{},value:{color:"white"}},textAlign:"center"},cO={padding:{left:70,right:70}};function dO(e){var t=e.values,n=e.legends,r=e.colors,o=void 0===r?Gw:r,i=e.action,a=e.hidden,l=void 0===a?[]:a,s=e.labels,u=void 0===s?{show:"Show",hide:"Hide"}:s;return $().createElement("div",{className:"charts-legends-container"},n.map((function(e,n){var r=$().createElement($().Fragment,null,$().createElement("div",{className:"charts-legends-color-square",style:{background:o[n]}}),$().createElement("label",null,e,$().createElement("strong",null," ",t&&t[n])));return $().createElement("div",{key:e,className:null!==l&&void 0!==l&&l.includes(n)?"hidden-status":""},$().createElement("label",null,i?$().createElement(Ft.Link,{onClick:function(){return i(n)},title:null!==l&&void 0!==l&&l.includes(n)?u.show:u.hide},r):$().createElement($().Fragment,null,r)))})))}function fO(e){return e+.5|0}const pO=(e,t,n)=>Math.max(Math.min(e,n),t);function hO(e){return pO(fO(2.55*e),0,255)}function mO(e){return pO(fO(255*e),0,255)}function gO(e){return pO(fO(e/2.55)/100,0,1)}function yO(e){return pO(fO(100*e),0,100)}const bO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},vO=[..."0123456789ABCDEF"],SO=e=>vO[15&e],EO=e=>vO[(240&e)>>4]+vO[15&e],wO=e=>(240&e)>>4===(15&e);function OO(e){var t=(e=>wO(e.r)&&wO(e.g)&&wO(e.b)&&wO(e.a))(e)?SO:EO;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const AO=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function CO(e,t,n){const r=t*Math.min(n,1-n),o=(t,o=(t+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function TO(e,t,n){const r=(r,o=(r+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function DO(e,t,n){const r=CO(e,1,.5);let o;for(t+n>1&&(o=1/(t+n),t*=o,n*=o),o=0;o<3;o++)r[o]*=1-t-n,r[o]+=t;return r}function xO(e){const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r),a=(o+i)/2;let l,s,u;return o!==i&&(u=o-i,s=a>.5?u/(2-o-i):u/(o+i),l=function(e,t,n,r,o){return e===o?(t-n)/r+(t<n?6:0):t===o?(n-e)/r+2:(e-t)/r+4}(t,n,r,u,o),l=60*l+.5),[0|l,s||0,a]}function PO(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(mO)}function MO(e,t,n){return PO(CO,e,t,n)}function IO(e){return(e%360+360)%360}function RO(e){const t=AO.exec(e);let n,r=255;if(!t)return;t[5]!==n&&(r=t[6]?hO(+t[5]):mO(+t[5]));const o=IO(+t[2]),i=+t[3]/100,a=+t[4]/100;return n="hwb"===t[1]?function(e,t,n){return PO(DO,e,t,n)}(o,i,a):"hsv"===t[1]?function(e,t,n){return PO(TO,e,t,n)}(o,i,a):MO(o,i,a),{r:n[0],g:n[1],b:n[2],a:r}}const LO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},kO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let jO;function _O(e){jO||(jO=function(){const e={},t=Object.keys(kO),n=Object.keys(LO);let r,o,i,a,l;for(r=0;r<t.length;r++){for(a=l=t[r],o=0;o<n.length;o++)i=n[o],l=l.replace(i,LO[i]);i=parseInt(kO[a],16),e[l]=[i>>16&255,i>>8&255,255&i]}return e}(),jO.transparent=[0,0,0,0]);const t=jO[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const FO=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const NO=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,BO=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function UO(e,t,n){if(e){let r=xO(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=MO(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function HO(e,t){return e?Object.assign(t||{},e):e}function VO(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=mO(e[3]))):(t=HO(e,{r:0,g:0,b:0,a:1})).a=mO(t.a),t}function qO(e){return"r"===e.charAt(0)?function(e){const t=FO.exec(e);let n,r,o,i=255;if(t){if(t[7]!==n){const e=+t[7];i=t[8]?hO(e):pO(255*e,0,255)}return n=+t[1],r=+t[3],o=+t[5],n=255&(t[2]?hO(n):pO(n,0,255)),r=255&(t[4]?hO(r):pO(r,0,255)),o=255&(t[6]?hO(o):pO(o,0,255)),{r:n,g:r,b:o,a:i}}}(e):RO(e)}class WO{constructor(e){if(e instanceof WO)return e;const t=typeof e;let n;"object"===t?n=VO(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*bO[e[1]],g:255&17*bO[e[2]],b:255&17*bO[e[3]],a:5===n?17*bO[e[4]]:255}:7!==n&&9!==n||(t={r:bO[e[1]]<<4|bO[e[2]],g:bO[e[3]]<<4|bO[e[4]],b:bO[e[5]]<<4|bO[e[6]],a:9===n?bO[e[7]]<<4|bO[e[8]]:255})),t}(e)||_O(e)||qO(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=HO(this._rgb);return e&&(e.a=gO(e.a)),e}set rgb(e){this._rgb=VO(e)}rgbString(){return this._valid?function(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${gO(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?OO(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=xO(e),n=t[0],r=yO(t[1]),o=yO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${o}%, ${gO(e.a)})`:`hsl(${n}, ${r}%, ${o}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let o;const i=t===o?.5:t,a=2*i-1,l=n.a-r.a,s=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-s,n.r=255&s*n.r+o*r.r+.5,n.g=255&s*n.g+o*r.g+.5,n.b=255&s*n.b+o*r.b+.5,n.a=i*n.a+(1-i)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=BO(gO(e.r)),o=BO(gO(e.g)),i=BO(gO(e.b));return{r:mO(NO(r+n*(BO(gO(t.r))-r))),g:mO(NO(o+n*(BO(gO(t.g))-o))),b:mO(NO(i+n*(BO(gO(t.b))-i))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new WO(this.rgb)}alpha(e){return this._rgb.a=mO(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=fO(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return UO(this._rgb,2,e),this}darken(e){return UO(this._rgb,2,-e),this}saturate(e){return UO(this._rgb,1,e),this}desaturate(e){return UO(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=xO(e);n[0]=IO(n[0]+t),n=MO(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function zO(){}const QO=(()=>{let e=0;return()=>e++})();function GO(e){return null===e||void 0===e}function $O(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function KO(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function YO(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function JO(e,t){return YO(e)?e:t}function XO(e,t){return"undefined"===typeof e?t:e}const ZO=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function eA(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function tA(e,t,n,r){let o,i,a;if($O(e))if(i=e.length,r)for(o=i-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<i;o++)t.call(n,e[o],o);else if(KO(e))for(a=Object.keys(e),i=a.length,o=0;o<i;o++)t.call(n,e[a[o]],a[o])}function nA(e,t){let n,r,o,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(o=e[n],i=t[n],o.datasetIndex!==i.datasetIndex||o.index!==i.index)return!1;return!0}function rA(e){if($O(e))return e.map(rA);if(KO(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let o=0;for(;o<r;++o)t[n[o]]=rA(e[n[o]]);return t}return e}function oA(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function iA(e,t,n,r){if(!oA(e))return;const o=t[e],i=n[e];KO(o)&&KO(i)?aA(o,i,r):t[e]=rA(i)}function aA(e,t,n){const r=$O(t)?t:[t],o=r.length;if(!KO(e))return e;const i=(n=n||{}).merger||iA;let a;for(let l=0;l<o;++l){if(a=r[l],!KO(a))continue;const t=Object.keys(a);for(let r=0,o=t.length;r<o;++r)i(t[r],e,a,n)}return e}function lA(e,t){return aA(e,t,{merger:sA})}function sA(e,t,n){if(!oA(e))return;const r=t[e],o=n[e];KO(r)&&KO(o)?lA(r,o):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=rA(o))}const uA={"":e=>e,x:e=>e.x,y:e=>e.y};function cA(e,t){const n=uA[t]||(uA[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const o of t)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function dA(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fA=e=>"undefined"!==typeof e,pA=e=>"function"===typeof e,hA=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const mA=Math.PI,gA=2*mA,yA=gA+mA,bA=Number.POSITIVE_INFINITY,vA=mA/180,SA=mA/2,EA=mA/4,wA=2*mA/3,OA=Math.log10,AA=Math.sign;function CA(e,t,n){return Math.abs(e-t)<n}function TA(e){const t=Math.round(e);e=CA(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(OA(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function DA(e){return!isNaN(parseFloat(e))&&isFinite(e)}function xA(e,t,n){let r,o,i;for(r=0,o=e.length;r<o;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function PA(e){return e*(mA/180)}function MA(e){return e*(180/mA)}function IA(e){if(!YO(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function RA(e,t){const n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*mA&&(i+=gA),{angle:i,distance:o}}function LA(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function kA(e,t){return(e-t+yA)%gA-mA}function jA(e){return(e%gA+gA)%gA}function _A(e,t,n,r){const o=jA(e),i=jA(t),a=jA(n),l=jA(i-o),s=jA(a-o),u=jA(o-i),c=jA(o-a);return o===i||o===a||r&&i===a||l>s&&u<c}function FA(e,t,n){return Math.max(t,Math.min(n,e))}function NA(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function BA(e,t,n){n=n||(n=>e[n]<t);let r,o=e.length-1,i=0;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const UA=(e,t,n,r)=>BA(e,n,r?r=>{const o=e[r][t];return o<n||o===n&&e[r+1][t]===n}:r=>e[r][t]<n),HA=(e,t,n)=>BA(e,n,(r=>e[r][t]>=n));const VA=["push","pop","shift","splice","unshift"];function qA(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(VA.forEach((t=>{delete e[t]})),delete e._chartjs)}const WA="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function zA(e,t){let n=[],r=!1;return function(...o){n=o,r||(r=!0,WA.call(window,(()=>{r=!1,e.apply(t,n)})))}}const QA=e=>"start"===e?"left":"end"===e?"right":"center",GA=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function $A(e,t,n){const r=t.length;let o=0,i=r;if(e._sorted){const{iScale:a,_parsed:l}=e,s=a.axis,{min:u,max:c,minDefined:d,maxDefined:f}=a.getUserBounds();d&&(o=FA(Math.min(UA(l,s,u).lo,n?r:UA(t,s,a.getPixelForValue(u)).lo),0,r-1)),i=f?FA(Math.max(UA(l,a.axis,c,!0).hi+1,n?0:UA(t,s,a.getPixelForValue(c),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function KA(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,o={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=o,!0;const i=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}const YA=e=>0===e||1===e,JA=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*gA/n),XA=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*gA/n)+1,ZA={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*SA),easeOutSine:e=>Math.sin(e*SA),easeInOutSine:e=>-.5*(Math.cos(mA*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>YA(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>YA(e)?e:JA(e,.075,.3),easeOutElastic:e=>YA(e)?e:XA(e,.075,.3),easeInOutElastic(e){const t=.1125;return YA(e)?e:e<.5?.5*JA(2*e,t,.45):.5+.5*XA(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-ZA.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*ZA.easeInBounce(2*e):.5*ZA.easeOutBounce(2*e-1)+.5};function eC(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function tC(e){return eC(e)?e:new WO(e)}function nC(e){return eC(e)?e:new WO(e).saturate(.5).darken(.1).hexString()}const rC=["x","y","borderWidth","radius","tension"],oC=["color","borderColor","backgroundColor"];const iC=new Map;function aC(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=iC.get(n);return r||(r=new Intl.NumberFormat(e,t),iC.set(n,r)),r}(t,n).format(e)}const lC={values:e=>$O(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let o,i=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(o="scientific"),i=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const a=OA(Math.abs(i)),l=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),s={notation:o,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(s,this.options.ticks.format),aC(e,r,s)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(OA(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?lC.numeric.call(this,e,t,n):""}};var sC={formatters:lC};const uC=Object.create(null),cC=Object.create(null);function dC(e,t){if(!t)return e;const n=t.split(".");for(let r=0,o=n.length;r<o;++r){const t=n[r];e=e[t]||(e[t]=Object.create(null))}return e}function fC(e,t,n){return"string"===typeof t?aA(dC(e,t),n):aA(dC(e,""),t)}class pC{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>nC(t.backgroundColor),this.hoverBorderColor=(e,t)=>nC(t.borderColor),this.hoverColor=(e,t)=>nC(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return fC(this,e,t)}get(e){return dC(this,e)}describe(e,t){return fC(cC,e,t)}override(e,t){return fC(uC,e,t)}route(e,t,n,r){const o=dC(this,e),i=dC(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[a],t=i[r];return KO(e)?Object.assign({},t,e):XO(e,t)},set(e){this[a]=e}}})}apply(e){e.forEach((e=>e(this)))}}var hC=new pC({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:oC},numbers:{type:"number",properties:rC}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:sC.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function mC(e,t,n,r,o){let i=t[o];return i||(i=t[o]=e.measureText(o).width,n.push(o)),i>r&&(r=i),r}function gC(e,t,n){const r=e.currentDevicePixelRatio,o=0!==n?Math.max(n/2,.5):0;return Math.round((t-o)*r)/r+o}function yC(e,t){(t||e)&&((t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function bC(e,t,n,r){vC(e,t,n,r,null)}function vC(e,t,n,r,o){let i,a,l,s,u,c,d,f;const p=t.pointStyle,h=t.rotation,m=t.radius;let g=(h||0)*vA;if(p&&"object"===typeof p&&(i=p.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:o?e.ellipse(n,r,o/2,m,0,0,gA):e.arc(n,r,m,0,gA),e.closePath();break;case"triangle":c=o?o/2:m,e.moveTo(n+Math.sin(g)*c,r-Math.cos(g)*m),g+=wA,e.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*m),g+=wA,e.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*m),e.closePath();break;case"rectRounded":u=.516*m,s=m-u,a=Math.cos(g+EA)*s,d=Math.cos(g+EA)*(o?o/2-u:s),l=Math.sin(g+EA)*s,f=Math.sin(g+EA)*(o?o/2-u:s),e.arc(n-d,r-l,u,g-mA,g-SA),e.arc(n+f,r-a,u,g-SA,g),e.arc(n+d,r+l,u,g,g+SA),e.arc(n-f,r+a,u,g+SA,g+mA),e.closePath();break;case"rect":if(!h){s=Math.SQRT1_2*m,c=o?o/2:s,e.rect(n-c,r-s,2*c,2*s);break}g+=EA;case"rectRot":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,l=Math.sin(g)*m,f=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-l),e.lineTo(n+f,r-a),e.lineTo(n+d,r+l),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=EA;case"cross":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,l=Math.sin(g)*m,f=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-l),e.lineTo(n+d,r+l),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,l=Math.sin(g)*m,f=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-l),e.lineTo(n+d,r+l),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=EA,d=Math.cos(g)*(o?o/2:m),a=Math.cos(g)*m,l=Math.sin(g)*m,f=Math.sin(g)*(o?o/2:m),e.moveTo(n-d,r-l),e.lineTo(n+d,r+l),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=o?o/2:Math.cos(g)*m,l=Math.sin(g)*m,e.moveTo(n-a,r-l),e.lineTo(n+a,r+l);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(o?o/2:m),r+Math.sin(g)*m);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function SC(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function EC(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function wC(e){e.restore()}function OC(e,t,n,r,o){if(!t)return e.lineTo(n.x,n.y);if("middle"===o){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else"after"===o!==!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function AC(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function CC(e,t,n,r,o){if(o.strikethrough||o.underline){const i=e.measureText(r),a=t-i.actualBoundingBoxLeft,l=t+i.actualBoundingBoxRight,s=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=o.strikethrough?(s+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=o.decorationWidth||2,e.moveTo(a,c),e.lineTo(l,c),e.stroke()}}function TC(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function DC(e,t,n,r,o,i={}){const a=$O(t)?t:[t],l=i.strokeWidth>0&&""!==i.strokeColor;let s,u;for(e.save(),e.font=o.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),GO(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,i),s=0;s<a.length;++s)u=a[s],i.backdrop&&TC(e,i.backdrop),l&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),GO(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),CC(e,n,r,u,i),r+=Number(o.lineHeight);e.restore()}function xC(e,t){const{x:n,y:r,w:o,h:i,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*mA,mA,!0),e.lineTo(n,r+i-a.bottomLeft),e.arc(n+a.bottomLeft,r+i-a.bottomLeft,a.bottomLeft,mA,SA,!0),e.lineTo(n+o-a.bottomRight,r+i),e.arc(n+o-a.bottomRight,r+i-a.bottomRight,a.bottomRight,SA,0,!0),e.lineTo(n+o,r+a.topRight),e.arc(n+o-a.topRight,r+a.topRight,a.topRight,0,-SA,!0),e.lineTo(n+a.topLeft,r)}const PC=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,MC=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function IC(e,t){const n=(""+e).match(PC);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}const RC=e=>+e||0;function LC(e,t){const n={},r=KO(t),o=r?Object.keys(t):t,i=KO(e)?r?n=>XO(e[n],e[t[n]]):t=>e[t]:()=>e;for(const a of o)n[a]=RC(i(a));return n}function kC(e){return LC(e,{top:"y",right:"x",bottom:"y",left:"x"})}function jC(e){return LC(e,["topLeft","topRight","bottomLeft","bottomRight"])}function _C(e){const t=kC(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function FC(e,t){e=e||{},t=t||hC.font;let n=XO(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=XO(e.style,t.style);r&&!(""+r).match(MC)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const o={family:XO(e.family,t.family),lineHeight:IC(XO(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:XO(e.weight,t.weight),string:""};return o.string=function(e){return!e||GO(e.size)||GO(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(o),o}function NC(e,t,n,r){let o,i,a,l=!0;for(o=0,i=e.length;o<i;++o)if(a=e[o],void 0!==a&&(void 0!==t&&"function"===typeof a&&(a=a(t),l=!1),void 0!==n&&$O(a)&&(a=a[n%a.length],l=!1),void 0!==a))return r&&!l&&(r.cacheable=!1),a}function BC(e,t){return Object.assign(Object.create(e),t)}function UC(e,t=[""],n,r,o=(()=>e[0])){const i=n||e;"undefined"===typeof r&&(r=JC("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:o,override:n=>UC([n,...e],t,i,r)};return new Proxy(a,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>zC(n,r,(()=>function(e,t,n,r){let o;for(const i of t)if(o=JC(qC(i,e),n),"undefined"!==typeof o)return WC(e,o)?KC(n,r,e,o):o}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>XC(e).includes(t),ownKeys:e=>XC(e),set(e,t,n){const r=e._storage||(e._storage=o());return e[t]=r[t]=n,delete e._keys,!0}})}function HC(e,t,n,r){const o={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:VC(e,r),setContext:t=>HC(e,t,n,r),override:o=>HC(e.override(o),t,n,r)};return new Proxy(o,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>zC(e,t,(()=>function(e,t,n){const{_proxy:r,_context:o,_subProxy:i,_descriptors:a}=e;let l=r[t];pA(l)&&a.isScriptable(t)&&(l=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let s=t(i,a||r);l.delete(e),WC(e,s)&&(s=KC(o._scopes,o,e,s));return s}(t,l,e,n));$O(l)&&l.length&&(l=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_descriptors:l}=n;if("undefined"!==typeof i.index&&r(e))return t[i.index%t.length];if(KO(t[0])){const n=t,r=o._scopes.filter((e=>e!==n));t=[];for(const s of n){const n=KC(r,o,e,s);t.push(HC(n,i,a&&a[e],l))}}return t}(t,l,e,a.isIndexable));WC(t,l)&&(l=HC(l,o,i&&i[t],a));return l}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function VC(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:o=t.allKeys}=e;return{allKeys:o,scriptable:n,indexable:r,isScriptable:pA(n)?n:()=>n,isIndexable:pA(r)?r:()=>r}}const qC=(e,t)=>e?e+dA(t):t,WC=(e,t)=>KO(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function zC(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const r=n();return e[t]=r,r}function QC(e,t,n){return pA(e)?e(t,n):e}const GC=(e,t)=>!0===e?t:"string"===typeof e?cA(t,e):void 0;function $C(e,t,n,r,o){for(const i of t){const t=GC(n,i);if(t){e.add(t);const i=QC(t._fallback,n,o);if("undefined"!==typeof i&&i!==n&&i!==r)return i}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function KC(e,t,n,r){const o=t._rootScopes,i=QC(t._fallback,n,r),a=[...e,...o],l=new Set;l.add(r);let s=YC(l,a,n,i||n,r);return null!==s&&(("undefined"===typeof i||i===n||(s=YC(l,a,i,s,r),null!==s))&&UC(Array.from(l),[""],o,i,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const o=r[t];if($O(o)&&KO(n))return n;return o||{}}(t,n,r))))}function YC(e,t,n,r,o){for(;n;)n=$C(e,t,n,r,o);return n}function JC(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function XC(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}const ZC=Number.EPSILON||1e-14,eT=(e,t)=>t<e.length&&!e[t].skip&&e[t],tT=e=>"x"===e?"y":"x";function nT(e,t,n,r){const o=e.skip?t:e,i=t,a=n.skip?t:n,l=LA(i,o),s=LA(a,i);let u=l/(l+s),c=s/(l+s);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;return{previous:{x:i.x-d*(a.x-o.x),y:i.y-d*(a.y-o.y)},next:{x:i.x+f*(a.x-o.x),y:i.y+f*(a.y-o.y)}}}function rT(e,t="x"){const n=tT(t),r=e.length,o=Array(r).fill(0),i=Array(r);let a,l,s,u=eT(e,0);for(a=0;a<r;++a)if(l=s,s=u,u=eT(e,a+1),s){if(u){const e=u[t]-s[t];o[a]=0!==e?(u[n]-s[n])/e:0}i[a]=l?u?AA(o[a-1])!==AA(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(e,t,n){const r=e.length;let o,i,a,l,s,u=eT(e,0);for(let c=0;c<r-1;++c)s=u,u=eT(e,c+1),s&&u&&(CA(t[c],0,ZC)?n[c]=n[c+1]=0:(o=n[c]/t[c],i=n[c+1]/t[c],l=Math.pow(o,2)+Math.pow(i,2),l<=9||(a=3/Math.sqrt(l),n[c]=o*a*t[c],n[c+1]=i*a*t[c])))}(e,o,i),function(e,t,n="x"){const r=tT(n),o=e.length;let i,a,l,s=eT(e,0);for(let u=0;u<o;++u){if(a=l,l=s,s=eT(e,u+1),!l)continue;const o=l[n],c=l[r];a&&(i=(o-a[n])/3,l[`cp1${n}`]=o-i,l[`cp1${r}`]=c-i*t[u]),s&&(i=(s[n]-o)/3,l[`cp2${n}`]=o+i,l[`cp2${r}`]=c+i*t[u])}}(e,i,t)}function oT(e,t,n){return Math.max(Math.min(e,n),t)}function iT(e,t,n,r,o){let i,a,l,s;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)rT(e,o);else{let n=r?e[e.length-1]:e[0];for(i=0,a=e.length;i<a;++i)l=e[i],s=nT(n,l,e[Math.min(i+1,a-(r?0:1))%a],t.tension),l.cp1x=s.previous.x,l.cp1y=s.previous.y,l.cp2x=s.next.x,l.cp2y=s.next.y,n=l}t.capBezierPoints&&function(e,t){let n,r,o,i,a,l=SC(e[0],t);for(n=0,r=e.length;n<r;++n)a=i,i=l,l=n<r-1&&SC(e[n+1],t),i&&(o=e[n],a&&(o.cp1x=oT(o.cp1x,t.left,t.right),o.cp1y=oT(o.cp1y,t.top,t.bottom)),l&&(o.cp2x=oT(o.cp2x,t.left,t.right),o.cp2y=oT(o.cp2y,t.top,t.bottom)))}(e,n)}function aT(){return"undefined"!==typeof window&&"undefined"!==typeof document}function lT(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function sT(e,t,n){let r;return"string"===typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}const uT=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);const cT=["top","right","bottom","left"];function dT(e,t,n){const r={};n=n?"-"+n:"";for(let o=0;o<4;o++){const i=cT[o];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function fT(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,o=uT(n),i="border-box"===o.boxSizing,a=dT(o,"padding"),l=dT(o,"border","width"),{x:s,y:u,box:c}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:o,offsetY:i}=r;let a,l,s=!1;if(((e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot))(o,i,e.target))a=o,l=i;else{const e=t.getBoundingClientRect();a=r.clientX-e.left,l=r.clientY-e.top,s=!0}return{x:a,y:l,box:s}}(e,n),d=a.left+(c&&l.left),f=a.top+(c&&l.top);let{width:p,height:h}=t;return i&&(p-=a.width+l.width,h-=a.height+l.height),{x:Math.round((s-d)/p*n.width/r),y:Math.round((u-f)/h*n.height/r)}}const pT=e=>Math.round(10*e)/10;function hT(e,t,n,r){const o=uT(e),i=dT(o,"margin"),a=sT(o.maxWidth,e,"clientWidth")||bA,l=sT(o.maxHeight,e,"clientHeight")||bA,s=function(e,t,n){let r,o;if(void 0===t||void 0===n){const i=e&&lT(e);if(i){const e=i.getBoundingClientRect(),a=uT(i),l=dT(a,"border","width"),s=dT(a,"padding");t=e.width-s.width-l.width,n=e.height-s.height-l.height,r=sT(a.maxWidth,i,"clientWidth"),o=sT(a.maxHeight,i,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||bA,maxHeight:o||bA}}(e,t,n);let{width:u,height:c}=s;if("content-box"===o.boxSizing){const e=dT(o,"border","width"),t=dT(o,"padding");u-=t.width+e.width,c-=t.height+e.height}u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=pT(Math.min(u,a,s.maxWidth)),c=pT(Math.min(c,l,s.maxHeight)),u&&!c&&(c=pT(u/2));return(void 0!==t||void 0!==n)&&r&&s.height&&c>s.height&&(c=s.height,u=pT(Math.floor(c*r))),{width:u,height:c}}function mT(e,t,n){const r=t||1,o=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(e.currentDevicePixelRatio=r,a.height=o,a.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0)}const gT=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};aT()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function yT(e,t){const n=function(e,t){return uT(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function bT(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function vT(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function ST(e,t,n,r){const o={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},a=bT(e,o,n),l=bT(o,i,n),s=bT(i,t,n),u=bT(a,l,n),c=bT(l,s,n);return bT(u,c,n)}function ET(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function wT(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function OT(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function AT(e){return"angle"===e?{between:_A,compare:kA,normalize:jA}:{between:NA,compare:(e,t)=>e-t,normalize:e=>e}}function CT({start:e,end:t,count:n,loop:r,style:o}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:o}}function TT(e,t,n){if(!n)return[e];const{property:r,start:o,end:i}=n,a=t.length,{compare:l,between:s,normalize:u}=AT(r),{start:c,end:d,loop:f,style:p}=function(e,t,n){const{property:r,start:o,end:i}=n,{between:a,normalize:l}=AT(r),s=t.length;let u,c,{start:d,end:f,loop:p}=e;if(p){for(d+=s,f+=s,u=0,c=s;u<c&&a(l(t[d%s][r]),o,i);++u)d--,f--;d%=s,f%=s}return f<d&&(f+=s),{start:d,end:f,loop:p,style:e.style}}(e,t,n),h=[];let m,g,y,b=!1,v=null;const S=()=>b||s(o,y,m)&&0!==l(o,y),E=()=>!b||0===l(i,m)||s(i,y,m);for(let w=c,O=c;w<=d;++w)g=t[w%a],g.skip||(m=u(g[r]),m!==y&&(b=s(m,o,i),null===v&&S()&&(v=0===l(m,o)?w:O),null!==v&&E()&&(h.push(CT({start:v,end:w,loop:f,count:a,style:p})),v=null),O=w,y=m));return null!==v&&h.push(CT({start:v,end:d,loop:f,count:a,style:p})),h}function DT(e,t){const n=[],r=e.segments;for(let o=0;o<r.length;o++){const i=TT(r[o],e.points,t);i.length&&n.push(...i)}return n}function xT(e,t,n,r){return r&&r.setContext&&n?function(e,t,n,r){const o=e._chart.getContext(),i=PT(e.options),{_datasetIndex:a,options:{spanGaps:l}}=e,s=n.length,u=[];let c=i,d=t[0].start,f=d;function p(e,t,r,o){const i=l?-1:1;if(e!==t){for(e+=s;n[e%s].skip;)e-=i;for(;n[t%s].skip;)t+=i;e%s!==t%s&&(u.push({start:e%s,end:t%s,loop:r,style:o}),c=o,d=t%s)}}for(const h of t){d=l?d:h.start;let e,t=n[d%s];for(f=d+1;f<=h.end;f++){const i=n[f%s];e=PT(r.setContext(BC(o,{type:"segment",p0:t,p1:i,p0DataIndex:(f-1)%s,p1DataIndex:f%s,datasetIndex:a}))),MT(e,c)&&p(d,f-1,h.loop,c),t=i,c=e}d<f-1&&p(d,f-1,h.loop,c)}return u}(e,t,n,r):t}function PT(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function MT(e,t){if(!t)return!1;const n=[],r=function(e,t){return eC(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}class IT{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){const o=t.listeners[r],i=t.duration;o.forEach((r=>r({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=WA.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(e=Date.now()){let t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,l=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(e),l=!0):(o[a]=o[o.length-1],o.pop());l&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var RT=new IT;const LT="transparent",kT={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=tC(e||LT),o=r.valid&&tC(t||LT);return o&&o.valid?o.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class jT{constructor(e,t,n,r){const o=t[n];r=NC([e.to,r,o,e.from]);const i=NC([e.from,o,r]);this._active=!0,this._fn=e.fn||kT[e.type||typeof i],this._easing=ZA[e.easing]||ZA.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=NC([e.to,t,r,e.from]),this._from=NC([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||t<n),!this._active)return this._target[r]=a,void this._notify(!0);t<0?this._target[r]=o:(l=t/n%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(o,a,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}}class _T{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!KO(e))return;const t=Object.keys(hC.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((r=>{const o=e[r];if(!KO(o))return;const i={};for(const e of t)i[e]=o[e];($O(o.properties)&&o.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let o=0;o<r.length;o++){const t=e[r[o]];t&&t.active()&&n.push(t.wait())}return Promise.all(n)}(e.options.$animations,n).then((()=>{e.options=n}),(()=>{})),o}_createAnimations(e,t){const n=this._properties,r=[],o=e.$animations||(e.$animations={}),i=Object.keys(t),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const s=i[l];if("$"===s.charAt(0))continue;if("options"===s){r.push(...this._animateOptions(e,t));continue}const u=t[s];let c=o[s];const d=n.get(s);if(c){if(d&&c.active()){c.update(d,u,a);continue}c.cancel()}d&&d.duration?(o[s]=c=new jT(d,e,s,u),r.push(c)):e[s]=u}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(RT.add(this._chart,n),!0):void 0}}function FT(e,t){const n=e&&e.options||{},r=n.reverse,o=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:o,end:r?o:i}}function NT(e,t){const n=[],r=e._getSortedDatasetMetas(t);let o,i;for(o=0,i=r.length;o<i;++o)n.push(r[o].index);return n}function BT(e,t,n,r={}){const o=e.keys,i="single"===r.mode;let a,l,s,u;if(null===t)return;let c=!1;for(a=0,l=o.length;a<l;++a){if(s=+o[a],s===n){if(c=!0,r.all)continue;break}u=e.values[s],YO(u)&&(i||0===t||AA(t)===AA(u))&&(t+=u)}return c||r.all?t:0}function UT(e,t){const n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function HT(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function VT(e,t,n,r){for(const o of t.getMatchingVisibleMetas(r).reverse()){const t=e[o.index];if(n&&t>0||!n&&t<0)return o.index}return null}function qT(e,t){const{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:l}=r,s=i.axis,u=a.axis,c=function(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}(i,a,r),d=t.length;let f;for(let p=0;p<d;++p){const e=t[p],{[s]:n,[u]:i}=e;f=(e._stacks||(e._stacks={}))[u]=HT(o,c,n),f[l]=i,f._top=VT(f,a,!0,r.type),f._bottom=VT(f,a,!1,r.type);(f._visualValues||(f._visualValues={}))[l]=i}}function WT(e,t){const n=e.scales;return Object.keys(n).filter((e=>n[e].axis===t)).shift()}function zT(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const QT=e=>"reset"===e||"none"===e,GT=(e,t)=>t?e:Object.assign({},e);class $T{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=UT(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&zT(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=t.xAxisID=XO(n.xAxisID,WT(e,"x")),i=t.yAxisID=XO(n.yAxisID,WT(e,"y")),a=t.rAxisID=XO(n.rAxisID,WT(e,"r")),l=t.indexAxis,s=t.iAxisID=r(l,o,i,a),u=t.vAxisID=r(l,i,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(s),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&qA(this._data,this),e._stacked&&zT(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(KO(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:n,vScale:r}=t,o="x"===n.axis?"x":"y",i="x"===r.axis?"x":"y",a=Object.keys(e),l=new Array(a.length);let s,u,c;for(s=0,u=a.length;s<u;++s)c=a[s],l[s]={[o]:c,[i]:e[c]};return l}(t,e)}else if(n!==t){if(n){qA(n,this);const e=this._cachedMeta;zT(e),e._parsed=[]}t&&Object.isExtensible(t)&&(o=this,(r=t)._chartjs?r._chartjs.listeners.push(o):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),VA.forEach((e=>{const t="_onData"+dA(e),n=r[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return r._chartjs.listeners.forEach((n=>{"function"===typeof n[t]&&n[t](...e)})),o}})})))),this._syncList=[],this._data=t}var r,o}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=t._stacked;t._stacked=UT(t.vScale,t),t.stack!==n.stack&&(r=!0,zT(t),t.stack=n.stack),this._resyncElements(e),(r||o!==t._stacked)&&(qT(this,t._parsed),t._stacked=UT(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let l,s,u,c=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,u=r;else{u=$O(r[e])?this.parseArrayData(n,r,e,t):KO(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const o=()=>null===s[a]||d&&s[a]<d[a];for(l=0;l<t;++l)n._parsed[l+e]=s=u[l],c&&(o()&&(c=!1),d=s);n._sorted=c}i&&qT(this,u)}parsePrimitiveData(e,t,n,r){const{iScale:o,vScale:i}=e,a=o.axis,l=i.axis,s=o.getLabels(),u=o===i,c=new Array(r);let d,f,p;for(d=0,f=r;d<f;++d)p=d+n,c[d]={[a]:u||o.parse(s[p],p),[l]:i.parse(t[p],p)};return c}parseArrayData(e,t,n,r){const{xScale:o,yScale:i}=e,a=new Array(r);let l,s,u,c;for(l=0,s=r;l<s;++l)u=l+n,c=t[u],a[l]={x:o.parse(c[0],u),y:i.parse(c[1],u)};return a}parseObjectData(e,t,n,r){const{xScale:o,yScale:i}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,s=new Array(r);let u,c,d,f;for(u=0,c=r;u<c;++u)d=u+n,f=t[d],s[u]={x:o.parse(cA(f,a),d),y:i.parse(cA(f,l),d)};return s}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const r=this.chart,o=this._cachedMeta,i=t[e.axis];return BT({keys:NT(r,!0),values:t._stacks[e.axis]._visualValues},i,o.index,{mode:n})}updateRangeFromParsed(e,t,n,r){const o=n[t.axis];let i=null===o?NaN:o;const a=r&&n._stacks[t.axis];r&&a&&(r.values=a,i=BT(r,o,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const n=this._cachedMeta,r=n._parsed,o=n._sorted&&e===n.iScale,i=r.length,a=this._getOtherScale(e),l=((e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:NT(n,!0),values:null})(t,n,this.chart),s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:c}=function(e){const{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,f;function p(){f=r[d];const t=f[a.axis];return!YO(f[e.axis])||u>t||c<t}for(d=0;d<i&&(p()||(this.updateRangeFromParsed(s,e,f,l),!o));++d);if(o)for(d=i-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(s,e,f,l);break}return s}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=t.length;r<o;++r)i=t[r][e.axis],YO(i)&&n.push(i);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,r=t.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,n,r,o;return KO(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o,disabled:!1===e}}(XO(this.options.clip,function(e,t,n){if(!1===n)return!1;const r=FT(e,n),o=FT(t,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,r=n.data||[],o=t.chartArea,i=[],a=this._drawStart||0,l=this._drawCount||r.length-a,s=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(e,o,a,l),u=a;u<a+l;++u){const t=r[u];t.hidden||(t.active&&s?i.push(t):t.draw(e,o))}for(u=0;u<i.length;++u)i[u].draw(e,o)}getStyle(e,t){const n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const r=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];o=t.$context||(t.$context=function(e,t,n){return BC(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),o.parsed=this.getParsed(e),o.raw=r.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=function(e,t){return BC(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",n){const r="active"===t,o=this._cachedDataOpts,i=e+"-"+t,a=o[i],l=this.enableOptionSharing&&fA(n);if(a)return GT(a,l);const s=this.chart.config,u=s.datasetElementScopeKeys(this._type,e),c=r?[`${e}Hover`,"hover",e,""]:[e,""],d=s.getOptionScopes(this.getDataset(),u),f=Object.keys(hC.elements[e]),p=s.resolveNamedOptions(d,f,(()=>this.getContext(n,r,t)),c);return p.$shared&&(p.$shared=l,o[i]=Object.freeze(GT(p,l))),p}_resolveAnimations(e,t,n){const r=this.chart,o=this._cachedDataOpts,i=`animation-${t}`,a=o[i];if(a)return a;let l;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,t),i=r.getOptionScopes(this.getDataset(),o);l=r.createResolver(i,this.getContext(e,n,t))}const s=new _T(r,l&&l.animations);return l&&l._cacheable&&(o[i]=Object.freeze(s)),s}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||QT(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(t,o)||o!==r;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:i}}updateElement(e,t,n,r){QT(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!QT(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const o=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[a,l,s]of this._syncList)this[a](l,s);this._syncList=[];const r=n.length,o=t.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,e):o<r&&this._removeElements(o,r-o)}_insertElements(e,t,n=!0){const r=this._cachedMeta,o=r.data,i=e+t;let a;const l=e=>{for(e.length+=t,a=e.length-1;a>=i;a--)e[a]=e[a-t]};for(l(o),a=e;a<i;++a)o[a]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(e,t),n&&this.updateElements(o,e,t,"reset")}updateElements(e,t,n,r){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const r=n._parsed.splice(e,t);n._stacked&&zT(n,r)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,r]=e;this[t](n,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class KT extends $T{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,i,a=e=>+n[e];if(KO(n[e])){const{key:e="value"}=this._parsing;a=t=>+cA(n[t],e)}for(o=e,i=e+t;o<i;++o)r._parsed[o]=a(o)}}_getRotation(){return PA(this.options.rotation-90)}_getCircumference(){return PA(this.options.circumference)}_getRotationExtents(){let e=gA,t=-gA;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const r=this.chart.getDatasetMeta(n).controller,o=r._getRotation(),i=r._getCircumference();e=Math.min(e,o),t=Math.max(t,o+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:n}=t,r=this._cachedMeta,o=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-i)/2,0),l=Math.min((s=this.options.cutout,u=a,"string"===typeof s&&s.endsWith("%")?parseFloat(s)/100:+s/u),1);var s,u;const c=this._getRingWeight(this.index),{circumference:d,rotation:f}=this._getRotationExtents(),{ratioX:p,ratioY:h,offsetX:m,offsetY:g}=function(e,t,n){let r=1,o=1,i=0,a=0;if(t<gA){const l=e,s=l+t,u=Math.cos(l),c=Math.sin(l),d=Math.cos(s),f=Math.sin(s),p=(e,t,r)=>_A(e,l,s,!0)?1:Math.max(t,t*n,r,r*n),h=(e,t,r)=>_A(e,l,s,!0)?-1:Math.min(t,t*n,r,r*n),m=p(0,u,d),g=p(SA,c,f),y=h(mA,u,d),b=h(mA+SA,c,f);r=(m-y)/2,o=(g-b)/2,i=-(m+y)/2,a=-(g+b)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(f,d,l),y=(n.width-i)/p,b=(n.height-i)/h,v=Math.max(Math.min(y,b)/2,0),S=ZO(this.options.radius,v),E=(S-Math.max(S*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*S,this.offsetY=g*S,r.total=this.calculateTotal(),this.outerRadius=S-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*c,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*o/gA)}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,l=i.options.animation,s=(a.left+a.right)/2,u=(a.top+a.bottom)/2,c=o&&l.animateScale,d=c?0:this.innerRadius,f=c?0:this.outerRadius,{sharedOptions:p,includeOptions:h}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,o);for(m=t;m<t+n;++m){const t=this._circumference(m,o),n=e[m],i={x:s+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:f,innerRadius:d};h&&(i.options=p||this.resolveDataElementOptions(m,n.active?"active":r)),g+=t,this.updateElement(n,m,i,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let n,r=0;for(n=0;n<t.length;n++){const o=e._parsed[n];null===o||isNaN(o)||!this.chart.getDataVisibility(n)||t[n].hidden||(r+=Math.abs(o))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?gA*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=aC(t._parsed[e],n.options.locale);return{label:r[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,o,i,a,l;if(!e)for(r=0,o=n.data.datasets.length;r<o;++r)if(n.isDatasetVisible(r)){i=n.getDatasetMeta(r),e=i.data,a=i.controller;break}if(!e)return 0;for(r=0,o=e.length;r<o;++r)l=a.resolveDataElementOptions(r),"inner"!==l.borderAlign&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,r=e.length;n<r;++n){const e=this.resolveDataElementOptions(n);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(XO(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class YT extends $T{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=t,i=this.chart._animationsDisabled;let{start:a,count:l}=$A(t,r,i);this._drawStart=a,this._drawCount=l,KA(t)&&(a=0,l=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0),s.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:s},e),this.updateElements(r,a,l,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:l,_dataset:s}=this._cachedMeta,{sharedOptions:u,includeOptions:c}=this._getSharedOptions(t,r),d=i.axis,f=a.axis,{spanGaps:p,segment:h}=this.options,m=DA(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,y=t+n,b=e.length;let v=t>0&&this.getParsed(t-1);for(let S=0;S<b;++S){const n=e[S],p=g?n:{};if(S<t||S>=y){p.skip=!0;continue}const b=this.getParsed(S),E=GO(b[f]),w=p[d]=i.getPixelForValue(b[d],S),O=p[f]=o||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,b,l):b[f],S);p.skip=isNaN(w)||isNaN(O)||E,p.stop=S>0&&Math.abs(b[d]-v[d])>m,h&&(p.parsed=b,p.raw=s.data[S]),c&&(p.options=u||this.resolveDataElementOptions(S,n.active?"active":r)),g||this.updateElement(n,S,p,r),v=b}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class JT extends KT{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function XT(e,t,n,r){const{controller:o,data:i,_sorted:a}=e,l=o._cachedMeta.iScale;if(l&&t===l.axis&&"r"!==t&&a&&i.length){const e=l._reversePixels?HA:UA;if(!r)return e(i,t,n);if(o._sharedOptions){const r=i[0],o="function"===typeof r.getRange&&r.getRange(t);if(o){const r=e(i,t,n-o),a=e(i,t,n+o);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:i.length-1}}function ZT(e,t,n,r,o){const i=e.getSortedVisibleDatasetMetas(),a=n[t];for(let l=0,s=i.length;l<s;++l){const{index:e,data:n}=i[l],{lo:s,hi:u}=XT(i[l],t,a,o);for(let t=s;t<=u;++t){const o=n[t];o.skip||r(o,e,t)}}}function eD(e,t,n,r,o){const i=[];if(!o&&!e.isPointInArea(t))return i;return ZT(e,n,t,(function(n,a,l){(o||SC(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&i.push({element:n,datasetIndex:a,index:l})}),!0),i}function tD(e,t,n,r,o,i){let a=[];const l=function(e){const t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){const o=t?Math.abs(e.x-r.x):0,i=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(i,2))}}(n);let s=Number.POSITIVE_INFINITY;return ZT(e,n,t,(function(n,u,c){const d=n.inRange(t.x,t.y,o);if(r&&!d)return;const f=n.getCenterPoint(o);if(!(!!i||e.isPointInArea(f))&&!d)return;const p=l(t,f);p<s?(a=[{element:n,datasetIndex:u,index:c}],s=p):p===s&&a.push({element:n,datasetIndex:u,index:c})})),a}function nD(e,t,n,r,o,i){return i||e.isPointInArea(t)?"r"!==n||r?tD(e,t,n,r,o,i):function(e,t,n,r){let o=[];return ZT(e,n,t,(function(e,n,i){const{startAngle:a,endAngle:l}=e.getProps(["startAngle","endAngle"],r),{angle:s}=RA(e,{x:t.x,y:t.y});_A(s,a,l)&&o.push({element:e,datasetIndex:n,index:i})})),o}(e,t,n,o):[]}function rD(e,t,n,r,o){const i=[],a="x"===n?"inXRange":"inYRange";let l=!1;return ZT(e,n,t,((e,r,s)=>{e[a]&&e[a](t[n],o)&&(i.push({element:e,datasetIndex:r,index:s}),l=l||e.inRange(t.x,t.y,o))})),r&&!l?[]:i}var oD={evaluateInteractionItems:ZT,modes:{index(e,t,n,r){const o=fT(t,e),i=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?eD(e,o,i,r,a):nD(e,o,i,!1,r,a),s=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=l[0].index,n=e.data[t];n&&!n.skip&&s.push({element:n,datasetIndex:e.index,index:t})})),s):[]},dataset(e,t,n,r){const o=fT(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?eD(e,o,i,r,a):nD(e,o,i,!1,r,a);if(l.length>0){const t=l[0].datasetIndex,n=e.getDatasetMeta(t).data;l=[];for(let e=0;e<n.length;++e)l.push({element:n[e],datasetIndex:t,index:e})}return l},point:(e,t,n,r)=>eD(e,fT(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const o=fT(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;return nD(e,o,i,n.intersect,r,a)},x:(e,t,n,r)=>rD(e,fT(t,e),"x",n.intersect,r),y:(e,t,n,r)=>rD(e,fT(t,e),"y",n.intersect,r)}};const iD=["left","top","right","bottom"];function aD(e,t){return e.filter((e=>e.pos===t))}function lD(e,t){return e.filter((e=>-1===iD.indexOf(e.pos)&&e.box.axis===t))}function sD(e,t){return e.sort(((e,n)=>{const r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function uD(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:o}=n;if(!e||!iD.includes(r))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t;let i,a,l;for(i=0,a=e.length;i<a;++i){l=e[i];const{fullSize:a}=l.box,s=n[l.stack],u=s&&l.stackWeight/s.weight;l.horizontal?(l.width=u?u*r:a&&t.availableWidth,l.height=o):(l.width=r,l.height=u?u*o:a&&t.availableHeight)}return n}function cD(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function dD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function fD(e,t,n,r){const{pos:o,box:i}=n,a=e.maxPadding;if(!KO(o)){n.size&&(e[o]-=n.size);const t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?i.height:i.width),n.size=t.size/t.count,e[o]+=n.size}i.getPadding&&dD(a,i.getPadding());const l=Math.max(0,t.outerWidth-cD(a,e,"left","right")),s=Math.max(0,t.outerHeight-cD(a,e,"top","bottom")),u=l!==e.w,c=s!==e.h;return e.w=l,e.h=s,n.horizontal?{same:u,other:c}:{same:c,other:u}}function pD(e,t){const n=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function hD(e,t,n,r){const o=[];let i,a,l,s,u,c;for(i=0,a=e.length,u=0;i<a;++i){l=e[i],s=l.box,s.update(l.width||t.w,l.height||t.h,pD(l.horizontal,t));const{same:a,other:d}=fD(t,n,l,r);u|=a&&o.length,c=c||d,s.fullSize||o.push(l)}return u&&hD(o,t,n,r)||c}function mD(e,t,n,r,o){e.top=n,e.left=t,e.right=t+r,e.bottom=n+o,e.width=r,e.height=o}function gD(e,t,n,r){const o=n.padding;let{x:i,y:a}=t;for(const l of e){const e=l.box,s=r[l.stack]||{count:1,placed:0,weight:1},u=l.stackWeight/s.weight||1;if(l.horizontal){const r=t.w*u,i=s.size||e.height;fA(s.start)&&(a=s.start),e.fullSize?mD(e,o.left,a,n.outerWidth-o.right-o.left,i):mD(e,t.left+s.placed,a,r,i),s.start=a,s.placed+=r,a=e.bottom}else{const r=t.h*u,a=s.size||e.width;fA(s.start)&&(i=s.start),e.fullSize?mD(e,i,o.top,a,n.outerHeight-o.bottom-o.top):mD(e,i,t.top+s.placed,a,r),s.start=i,s.placed+=r,i=e.right}}t.x=i,t.y=a}var yD={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const o=_C(e.options.layout.padding),i=Math.max(t-o.width,0),a=Math.max(n-o.height,0),l=function(e){const t=function(e){const t=[];let n,r,o,i,a,l;for(n=0,r=(e||[]).length;n<r;++n)o=e[n],({position:i,options:{stack:a,stackWeight:l=1}}=o),t.push({index:n,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:a&&i+a,stackWeight:l});return t}(e),n=sD(t.filter((e=>e.box.fullSize)),!0),r=sD(aD(t,"left"),!0),o=sD(aD(t,"right")),i=sD(aD(t,"top"),!0),a=sD(aD(t,"bottom")),l=lD(t,"x"),s=lD(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(s).concat(a).concat(l),chartArea:aD(t,"chartArea"),vertical:r.concat(o).concat(s),horizontal:i.concat(a).concat(l)}}(e.boxes),s=l.vertical,u=l.horizontal;tA(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const c=s.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/c,hBoxMaxHeight:a/2}),f=Object.assign({},o);dD(f,_C(r));const p=Object.assign({maxPadding:f,w:i,h:a,x:o.left,y:o.top},o),h=uD(s.concat(u),d);hD(l.fullSize,p,d,h),hD(s,p,d,h),hD(u,p,d,h)&&hD(s,p,d,h),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(p),gD(l.leftAndTop,p,d,h),p.x+=p.w,p.y+=p.h,gD(l.rightAndBottom,p,d,h),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},tA(l.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class bD{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class vD extends bD{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const SD={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ED=e=>null===e||""===e;const wD=!!gT&&{passive:!0};function OD(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,wD)}function AD(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function CD(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||AD(n.addedNodes,r),t=t&&!AD(n.removedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function TD(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||AD(n.removedNodes,r),t=t&&!AD(n.addedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const DD=new Map;let xD=0;function PD(){const e=window.devicePixelRatio;e!==xD&&(xD=e,DD.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function MD(e,t,n){const r=e.canvas,o=r&&lT(r);if(!o)return;const i=zA(((e,t)=>{const r=o.clientWidth;n(e,t),r<o.clientWidth&&n()}),window),a=new ResizeObserver((e=>{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return a.observe(o),function(e,t){DD.size||window.addEventListener("resize",PD),DD.set(e,t)}(e,i),a}function ID(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){DD.delete(e),DD.size||window.removeEventListener("resize",PD)}(e)}function RD(e,t,n){const r=e.canvas,o=zA((t=>{null!==e.ctx&&n(function(e,t){const n=SD[e.type]||e.type,{x:r,y:o}=fT(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==o?o:null}}(t,e))}),e);return function(e,t,n){e&&e.addEventListener(t,n,wD)}(r,t,o),o}class LD extends bD{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e.$chartjs={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ED(o)){const t=yT(e,"width");void 0!==t&&(e.width=t)}if(ED(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=yT(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t.$chartjs)return!1;const n=t.$chartjs.initial;["height","width"].forEach((e=>{const r=n[e];GO(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t.$chartjs,!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),o={attach:CD,detach:TD,resize:MD}[t]||RD;r[t]=o(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:ID,detach:ID,resize:ID}[t]||OD)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return hT(e,t,n,r)}isAttached(e){const t=e&&lT(e);return!(!t||!t.isConnected)}}class kD{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return DA(this.x)&&DA(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function jD(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}(t):[],a=i.length,l=i[0],s=i[a-1],u=[];if(a>o)return function(e,t,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}(t,u,i,a/o),u;const c=function(e,t,n){const r=function(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}(e),o=t.length/n;if(!r)return Math.max(o,1);const i=function(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(0|n)&&t.push(n),t.sort(((e,t)=>e-t)).pop(),t}(r);for(let a=0,l=i.length-1;a<l;a++){const e=i[a];if(e>o)return e}return Math.max(o,1)}(i,t,o);if(a>0){let e,n;const r=a>1?Math.round((s-l)/(a-1)):null;for(_D(t,u,c,GO(r)?0:l-r,l),e=0,n=a-1;e<n;e++)_D(t,u,c,i[e],i[e+1]);return _D(t,u,c,s,GO(r)?t.length:s+r),u}return _D(t,u,c),u}function _D(e,t,n,r,o){const i=XO(r,0),a=Math.min(XO(o,e.length),e.length);let l,s,u,c=0;for(n=Math.ceil(n),o&&(l=o-r,n=l/Math.floor(l/n)),u=i;u<0;)c++,u=Math.round(i+c*n);for(s=Math.max(i,0);s<a;s++)s===u&&(t.push(e[s]),c++,u=Math.round(i+c*n))}const FD=(e,t,n)=>"top"===t||"left"===t?e[t]+n:e[t]-n,ND=(e,t)=>Math.min(t||e,e);function BD(e,t){const n=[],r=e.length/t,o=e.length;let i=0;for(;i<o;i+=r)n.push(e[Math.floor(i)]);return n}function UD(e,t,n){const r=e.ticks.length,o=Math.min(t,r-1),i=e._startPixel,a=e._endPixel,l=1e-6;let s,u=e.getPixelForTick(o);if(!(n&&(s=1===r?Math.max(u-i,a-u):0===t?(e.getPixelForTick(1)-u)/2:(u-e.getPixelForTick(o-1))/2,u+=o<t?s:-s,u<i-l||u>a+l)))return u}function HD(e){return e.drawTicks?e.tickLength:0}function VD(e,t){if(!e.display)return 0;const n=FC(e.font,t),r=_C(e.padding);return($O(e.text)?e.text.length:1)*n.lineHeight+r.height}function qD(e,t,n){let r=QA(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class WD extends kD{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=JO(e,Number.POSITIVE_INFINITY),t=JO(t,Number.NEGATIVE_INFINITY),n=JO(n,Number.POSITIVE_INFINITY),r=JO(r,Number.NEGATIVE_INFINITY),{min:JO(e,n),max:JO(t,r),minDefined:YO(e),maxDefined:YO(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,s=a.length;l<s;++l)t=a[l].controller.getMinMax(this,e),o||(n=Math.min(n,t.min)),i||(r=Math.max(r,t.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:JO(n,JO(r,n)),max:JO(r,JO(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){eA(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:o}=e,i=ZO(t,(o-r)/2),a=(e,t)=>n&&0===e?0:e+t;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?BD(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(this.ticks=jD(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){eA(this.options.afterUpdate,[this])}beforeSetDimensions(){eA(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){eA(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),eA(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){eA(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=eA(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){eA(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){eA(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=ND(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation;let i,a,l,s=r;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const u=this._getLabelSizes(),c=u.widest.width,d=u.highest.height,f=FA(this.chart.width-c,0,this.maxWidth);i=e.offset?this.maxWidth/n:f/(n-1),c+6>i&&(i=f/(n-(e.offset?.5:1)),a=this.maxHeight-HD(e.grid)-t.padding-VD(e.title,this.chart.options.font),l=Math.sqrt(c*c+d*d),s=MA(Math.min(Math.asin(FA((u.highest.height+6)/i,-1,1)),Math.asin(FA(a/l,-1,1))-Math.asin(FA(d/l,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){eA(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){eA(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=VD(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=HD(o)+i):(e.height=this.maxHeight,e.width=HD(o)+i),n.display&&this.ticks.length){const{first:t,last:r,widest:o,highest:i}=this._getLabelSizes(),l=2*n.padding,s=PA(this.labelRotation),u=Math.cos(s),c=Math.sin(s);if(a){const t=n.mirror?0:c*o.width+u*i.height;e.height=Math.min(this.maxHeight,e.height+t+l)}else{const t=n.mirror?0:u*o.width+c*i.height;e.width=Math.min(this.maxWidth,e.width+t+l)}this._calculatePadding(t,r,c,u)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,l=0!==this.labelRotation,s="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;l?s?(c=r*e.width,d=n*t.height):(c=n*e.height,d=r*t.width):"start"===o?d=t.width:"end"===o?c=e.width:"inner"!==o&&(c=e.width/2,d=t.width/2),this.paddingLeft=Math.max((c-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-u+i)*this.width/(this.width-u),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){eA(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)GO(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=BD(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:r,_longestTextCache:o}=this,i=[],a=[],l=Math.floor(t/ND(t,n));let s,u,c,d,f,p,h,m,g,y,b,v=0,S=0;for(s=0;s<t;s+=l){if(d=e[s].label,f=this._resolveTickFontOptions(s),r.font=p=f.string,h=o[p]=o[p]||{data:{},gc:[]},m=f.lineHeight,g=y=0,GO(d)||$O(d)){if($O(d))for(u=0,c=d.length;u<c;++u)b=d[u],GO(b)||$O(b)||(g=mC(r,h.data,h.gc,g,b),y+=m)}else g=mC(r,h.data,h.gc,g,d),y=m;i.push(g),a.push(y),v=Math.max(g,v),S=Math.max(y,S)}!function(e,t){tA(e,(e=>{const n=e.gc,r=n.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[n[o]];n.splice(0,r)}}))}(o,t);const E=i.indexOf(v),w=a.indexOf(S),O=e=>({width:i[e]||0,height:a[e]||0});return{first:O(0),last:O(t-1),widest:O(E),highest:O(w),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return FA(this._alignToPixels?gC(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=function(e,t,n){return BC(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=BC(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=PA(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),i=e.autoSkipPadding||0,a=o?o.widest.width+i:0,l=o?o.highest.height+i:0;return this.isHorizontal()?l*n>a*r?a/n:l/r:l*r<a*n?l/n:a/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,l=o.offset,s=this.isHorizontal(),u=this.ticks.length+(l?1:0),c=HD(o),d=[],f=a.setContext(this.getContext()),p=f.display?f.width:0,h=p/2,m=function(e){return gC(n,e,p)};let g,y,b,v,S,E,w,O,A,C,T,D;if("top"===i)g=m(this.bottom),E=this.bottom-c,O=g-h,C=m(e.top)+h,D=e.bottom;else if("bottom"===i)g=m(this.top),C=e.top,D=m(e.bottom)-h,E=g+h,O=this.top+c;else if("left"===i)g=m(this.right),S=this.right-c,w=g-h,A=m(e.left)+h,T=e.right;else if("right"===i)g=m(this.left),A=e.left,T=m(e.right)-h,S=g+h,w=this.left+c;else if("x"===t){if("center"===i)g=m((e.top+e.bottom)/2+.5);else if(KO(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}C=e.top,D=e.bottom,E=g+h,O=E+c}else if("y"===t){if("center"===i)g=m((e.left+e.right)/2);else if(KO(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}S=g-h,w=S-c,A=e.left,T=e.right}const x=XO(r.ticks.maxTicksLimit,u),P=Math.max(1,Math.ceil(u/x));for(y=0;y<u;y+=P){const e=this.getContext(y),t=o.setContext(e),r=a.setContext(e),i=t.lineWidth,u=t.color,c=r.dash||[],f=r.dashOffset,p=t.tickWidth,h=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=UD(this,y,l),void 0!==b&&(v=gC(n,b,i),s?S=w=A=T=v:E=O=C=D=v,d.push({tx1:S,ty1:E,tx2:w,ty2:O,x1:A,y1:C,x2:T,y2:D,width:i,color:u,borderDash:c,borderDashOffset:f,tickWidth:p,tickColor:h,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=u,this._borderValue=g,d}_computeLabelItems(e){const t=this.axis,n=this.options,{position:r,ticks:o}=n,i=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:s,padding:u,mirror:c}=o,d=HD(n.grid),f=d+u,p=c?-u:f,h=-PA(this.labelRotation),m=[];let g,y,b,v,S,E,w,O,A,C,T,D,x="middle";if("top"===r)E=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===r)E=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,S=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(d);w=e.textAlign,S=e.x}else if("x"===t){if("center"===r)E=(e.top+e.bottom)/2+f;else if(KO(r)){const e=Object.keys(r)[0],t=r[e];E=this.chart.scales[e].getPixelForValue(t)+f}w=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)S=(e.left+e.right)/2-f;else if(KO(r)){const e=Object.keys(r)[0],t=r[e];S=this.chart.scales[e].getPixelForValue(t)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===t&&("start"===l?x="top":"end"===l&&(x="bottom"));const P=this._getLabelSizes();for(g=0,y=a.length;g<y;++g){b=a[g],v=b.label;const e=o.setContext(this.getContext(g));O=this.getPixelForTick(g)+o.labelOffset,A=this._resolveTickFontOptions(g),C=A.lineHeight,T=$O(v)?v.length:1;const t=T/2,n=e.color,l=e.textStrokeColor,u=e.textStrokeWidth;let d,f=w;if(i?(S=O,"inner"===w&&(f=g===y-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),D="top"===r?"near"===s||0!==h?-T*C+C/2:"center"===s?-P.highest.height/2-t*C+C:-P.highest.height+C/2:"near"===s||0!==h?C/2:"center"===s?P.highest.height/2-t*C:P.highest.height-T*C,c&&(D*=-1),0===h||e.showLabelBackdrop||(S+=C/2*Math.sin(h))):(E=O,D=(1-T)*C/2),e.showLabelBackdrop){const t=_C(e.backdropPadding),n=P.heights[g],r=P.widths[g];let o=D-t.top,i=0-t.left;switch(x){case"middle":o-=n/2;break;case"bottom":o-=n}switch(w){case"center":i-=r/2;break;case"right":i-=r;break;case"inner":g===y-1?i-=r:g>0&&(i-=r/2)}d={left:i,top:o,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:v,font:A,textOffset:D,options:{rotation:h,color:n,strokeColor:l,strokeWidth:u,textAlign:f,textBaseline:x,translation:[S,E],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-PA(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=e+o,a=this._getLabelSizes().widest.width;let l,s;return"left"===t?r?(s=this.right+o,"near"===n?l="left":"center"===n?(l="center",s+=a/2):(l="right",s+=a)):(s=this.right-i,"near"===n?l="right":"center"===n?(l="center",s-=a/2):(l="left",s=this.left)):"right"===t?r?(s=this.left+o,"near"===n?l="right":"center"===n?(l="center",s-=a/2):(l="left",s-=a)):(s=this.left+i,"near"===n?l="left":"center"===n?(l="center",s+=a/2):(l="right",s=this.right)):l="right",{textAlign:l,x:s}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,i;const a=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(o=0,i=r.length;o<i;++o){const e=r[o];t.drawOnChartArea&&a({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&a({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),i=n.display?o.width:0;if(!i)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let s,u,c,d;this.isHorizontal()?(s=gC(e,this.left,i)-i/2,u=gC(e,this.right,a)+a/2,c=d=l):(c=gC(e,this.top,i)-i/2,d=gC(e,this.bottom,a)+a/2,s=u=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(s,c),t.lineTo(u,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,n=this._computeLabelArea();n&&EC(t,n);const r=this.getLabelItems(e);for(const o of r){const e=o.options,n=o.font;DC(t,o.label,0,o.textOffset,n,e)}n&&wC(t)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;const o=FC(n.font),i=_C(n.padding),a=n.align;let l=o.lineHeight/2;"bottom"===t||"center"===t||KO(t)?(l+=i.bottom,$O(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=i.top;const{titleX:s,titleY:u,maxWidth:c,rotation:d}=function(e,t,n,r){const{top:o,left:i,bottom:a,right:l,chart:s}=e,{chartArea:u,scales:c}=s;let d,f,p,h=0;const m=a-o,g=l-i;if(e.isHorizontal()){if(f=GA(r,i,l),KO(n)){const e=Object.keys(n)[0],r=n[e];p=c[e].getPixelForValue(r)+m-t}else p="center"===n?(u.bottom+u.top)/2+m-t:FD(e,n,t);d=l-i}else{if(KO(n)){const e=Object.keys(n)[0],r=n[e];f=c[e].getPixelForValue(r)-g+t}else f="center"===n?(u.left+u.right)/2-g+t:FD(e,n,t);p=GA(r,a,o),h="left"===n?-SA:SA}return{titleX:f,titleY:p,maxWidth:d,rotation:h}}(this,l,t,a);DC(e,n.text,0,0,o,{color:n.color,maxWidth:c,rotation:d,textAlign:qD(a,t,r),textBaseline:"middle",translation:[s,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=XO(e.grid&&e.grid.z,-1),r=XO(e.border&&e.border.z,0);return this._isVisible()&&this.draw===WD.prototype.draw?[{z:n,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let o,i;for(o=0,i=t.length;o<i;++o){const i=t[o];i[n]!==this.id||e&&i.type!==e||r.push(i)}return r}_resolveTickFontOptions(e){return FC(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class zD{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;(function(e){return"id"in e&&"defaults"in e})(t)&&(n=this.register(t));const r=this.items,o=e.id,i=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,function(e,t,n){const r=aA(Object.create(null),[n?hC.get(n):{},hC.get(t),e.defaults]);hC.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((n=>{const r=n.split("."),o=r.pop(),i=[e].concat(r).join("."),a=t[n].split("."),l=a.pop(),s=a.join(".");hC.route(i,o,s,l)}))}(t,e.defaultRoutes);e.descriptors&&hC.describe(t,e.descriptors)}(e,i,n),this.override&&hC.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in hC[r]&&(delete hC[r][n],this.override&&delete uC[n])}}class QD{constructor(){this.controllers=new zD($T,"datasets",!0),this.elements=new zD(kD,"elements"),this.plugins=new zD(Object,"plugins"),this.scales=new zD(WD,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach((t=>{const r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):tA(t,(t=>{const r=n||this._getRegistryForType(t);this._exec(e,r,t)}))}))}_exec(e,t,n){const r=dA(e);eA(n["before"+r],[],n),t[e](n),eA(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}var GD=new QD;class $D{constructor(){this._init=[]}notify(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=r?this._descriptors(e).filter(r):this._descriptors(e),i=this._notify(o,e,t,n);return"afterDestroy"===t&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,n,r){r=r||{};for(const o of e){const e=o.plugin;if(!1===eA(e[n],[t,r,o.options],e)&&r.cancelable)return!1}return!0}invalidate(){GO(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,r=XO(n.options&&n.options.plugins,{}),o=function(e){const t={},n=[],r=Object.keys(GD.plugins.items);for(let i=0;i<r.length;i++)n.push(GD.getPlugin(r[i]));const o=e.plugins||[];for(let i=0;i<o.length;i++){const e=o[i];-1===n.indexOf(e)&&(n.push(e),t[e.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,{plugins:t,localIds:n},r,o){const i=[],a=e.getContext();for(const l of t){const t=l.id,s=KD(r[t],o);null!==s&&i.push({plugin:l,options:YD(e.config,{plugin:l,local:n[t]},s,a)})}return i}(e,o,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,r=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}function KD(e,t){return t||!1!==e?!0===e?{}:e:null}function YD(e,{plugin:t,local:n},r,o){const i=e.pluginScopeKeys(t),a=e.getOptionScopes(r,i);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function JD(e,t){const n=hC.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function XD(e){if("x"===e||"y"===e||"r"===e)return e}function ZD(e,...t){if(XD(e))return e;for(const r of t){const t=r.axis||("top"===(n=r.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||e.length>1&&XD(e[0].toLowerCase());if(t)return t}var n;throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ex(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function tx(e,t){const n=uC[e.type]||{scales:{}},r=t.scales||{},o=JD(e.type,t),i=Object.create(null);return Object.keys(r).forEach((t=>{const a=r[t];if(!KO(a))return console.error(`Invalid scale configuration for scale: ${t}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const l=ZD(t,a,function(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter((t=>t.xAxisID===e||t.yAxisID===e));if(n.length)return ex(e,"x",n[0])||ex(e,"y",n[0])}return{}}(t,e),hC.scales[a.type]),s=function(e,t){return e===t?"_index_":"_value_"}(l,o),u=n.scales||{};i[t]=lA(Object.create(null),[{axis:l},a,u[l],u[s]])})),e.data.datasets.forEach((n=>{const o=n.type||e.type,a=n.indexAxis||JD(o,t),l=(uC[o]||{}).scales||{};Object.keys(l).forEach((e=>{const t=function(e,t){let n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,a),o=n[t+"AxisID"]||t;i[o]=i[o]||Object.create(null),lA(i[o],[{axis:t},r[o],l[e]])}))})),Object.keys(i).forEach((e=>{const t=i[e];lA(t,[hC.scales[t.type],hC.scale])})),i}function nx(e){const t=e.options||(e.options={});t.plugins=XO(t.plugins,{}),t.scales=tx(e,t)}function rx(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const ox=new Map,ix=new Set;function ax(e,t){let n=ox.get(e);return n||(n=t(),ox.set(e,n),ix.add(n)),n}const lx=(e,t,n)=>{const r=cA(t,n);void 0!==r&&e.add(r)};class sx{constructor(e){this._config=function(e){return(e=e||{}).data=rx(e.data),nx(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=rx(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),nx(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ax(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return ax(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return ax(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return ax(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const n=this._scopeCache;let r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){const{options:r,type:o}=this,i=this._cachedScopes(e,n),a=i.get(t);if(a)return a;const l=new Set;t.forEach((t=>{e&&(l.add(e),t.forEach((t=>lx(l,e,t)))),t.forEach((e=>lx(l,r,e))),t.forEach((e=>lx(l,uC[o]||{},e))),t.forEach((e=>lx(l,hC,e))),t.forEach((e=>lx(l,cC,e)))}));const s=Array.from(l);return 0===s.length&&s.push(Object.create(null)),ix.has(t)&&i.set(t,s),s}chartOptionScopes(){const{options:e,type:t}=this;return[e,uC[t]||{},hC.datasets[t]||{},{type:t},hC,cC]}resolveNamedOptions(e,t,n,r=[""]){const o={$shared:!0},{resolver:i,subPrefixes:a}=ux(this._resolverCache,e,r);let l=i;if(function(e,t){const{isScriptable:n,isIndexable:r}=VC(e);for(const o of t){const t=n(o),i=r(o),a=(i||t)&&e[o];if(t&&(pA(a)||cx(a))||i&&$O(a))return!0}return!1}(i,t)){o.$shared=!1;l=HC(i,n=pA(n)?n():n,this.createResolver(e,n,a))}for(const s of t)o[s]=l[s];return o}createResolver(e,t,n=[""],r){const{resolver:o}=ux(this._resolverCache,e,n);return KO(t)?HC(o,t,void 0,r):o}}function ux(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const o=n.join();let i=r.get(o);if(!i){i={resolver:UC(t,n),subPrefixes:n.filter((e=>!e.toLowerCase().includes("hover")))},r.set(o,i)}return i}const cx=e=>KO(e)&&Object.getOwnPropertyNames(e).some((t=>pA(e[t])));const dx=["top","bottom","left","right","chartArea"];function fx(e,t){return"top"===e||"bottom"===e||-1===dx.indexOf(e)&&"x"===t}function px(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function hx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),eA(n&&n.onComplete,[e],t)}function mx(e){const t=e.chart,n=t.options.animation;eA(n&&n.onProgress,[e],t)}function gx(e){return aT()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const yx={},bx=e=>{const t=gx(e);return Object.values(yx).filter((e=>e.canvas===t)).pop()};function vx(e,t,n){const r=Object.keys(e);for(const o of r){const r=+o;if(r>=t){const i=e[o];delete e[o],(n>0||r>t)&&(e[r+n]=i)}}}function Sx(e,t,n){return e.options.clip?e[n]:t[n]}class Ex{static defaults=hC;static instances=yx;static overrides=uC;static registry=GD;static version="4.4.7";static getChart=bx;static register(...e){GD.add(...e),wx()}static unregister(...e){GD.remove(...e),wx()}constructor(e,t){const n=this.config=new sx(t),r=gx(e),o=bx(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(e){return!aT()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?vD:LD}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,i.aspectRatio),l=a&&a.canvas,s=l&&l.height,u=l&&l.width;this.id=QO(),this.ctx=a,this.canvas=l,this.width=u,this.height=s,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $D,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}((e=>this.update(e)),i.resizeDelay||0),this._dataChanges=[],yx[this.id]=this,a&&l?(RT.listen(this,"complete",hx),RT.listen(this,"progress",mx),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return GO(e)?t&&o?o:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return GD}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():mT(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yC(this.canvas,this.ctx),this}stop(){return RT.stop(this),this}resize(e,t){RT.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,mT(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),eA(n.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){tA(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce(((e,t)=>(e[t]=!1,e)),{});let o=[];t&&(o=o.concat(Object.keys(t).map((e=>{const n=t[e],r=ZD(e,n),o="r"===r,i="x"===r;return{options:n,dposition:o?"chartArea":i?"bottom":"left",dtype:o?"radialLinear":i?"category":"linear"}})))),tA(o,(t=>{const o=t.options,i=o.id,a=ZD(i,o),l=XO(o.type,t.dtype);void 0!==o.position&&fx(o.position,a)===fx(t.dposition)||(o.position=t.dposition),r[i]=!0;let s=null;if(i in n&&n[i].type===l)s=n[i];else{s=new(GD.getScale(l))({id:i,type:l,ctx:this.ctx,chart:this}),n[s.id]=s}s.init(o,e)})),tA(r,((e,t)=>{e||delete n[t]})),tA(n,(e=>{yD.configure(this,e,e.options),yD.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort(((e,t)=>e.index-t.index)),n>t){for(let e=t;e<n;++e)this._destroyDatasetMeta(e);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(px("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,n)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){const r=t[n];let o=this.getDatasetMeta(n);const i=r.type||this.config.type;if(o.type&&o.type!==i&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=i,o.indexAxis=r.indexAxis||JD(i,this.options),o.order=r.order||0,o.index=n,o.label=""+r.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const t=GD.getController(i),{datasetElementType:r,dataElementType:a}=hC.datasets[i];Object.assign(t,{dataElementType:GD.getElement(a),datasetElementType:r&&GD.getElement(r)}),o.controller=new t(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){tA(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let s=0,u=this.data.datasets.length;s<u;s++){const{controller:e}=this.getDatasetMeta(s),t=!r&&-1===o.indexOf(e);e.buildOrUpdateElements(t),i=Math.max(+e.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||tA(o,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(px("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){tA(this.scales,(e=>{yD.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);hA(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:o}of t){vx(e,r,"_removeElements"===n?-o:o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),r=n(0);for(let o=1;o<t;o++)if(!hA(r,n(o)))return;return Array.from(r).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;yD.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],tA(this.boxes,(e=>{n&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,pA(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(RT.has(this)?this.attached&&!RT.running(this)&&RT.start(this):(this.draw(),hx({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let r,o;for(r=0,o=t.length;r<o;++r){const o=t[r];e&&!o.visible||n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,r=!n.disabled,o=function(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Sx(n,t,"left"),right:Sx(n,t,"right"),top:Sx(r,t,"top"),bottom:Sx(r,t,"bottom")}:t}(e,this.chartArea),i={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&EC(t,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?this.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?this.height:o.bottom+n.bottom}),e.controller.draw(),r&&wC(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return SC(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){const o=oD.modes[t];return"function"===typeof o?o(this,e,n,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let r=n.filter((e=>e&&e._dataset===t)).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=BC(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);fA(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update((t=>t.datasetIndex===e?r:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),RT.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),yC(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete yx[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};tA(this.options.events,(e=>n(e,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},o=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const a=()=>{r("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():i()}unbindEvents(){tA(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},tA(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const r=n?"set":"remove";let o,i,a,l;for("dataset"===t&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){i=e[a];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map((({datasetIndex:e,index:t})=>{const n=this.getDatasetMeta(e);if(!n)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:n.data[t],index:t}}));!nA(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return 1===this._plugins._cache.filter((t=>t.plugin.id===e)).length}_updateHoverStyles(e,t,n){const r=this.options.hover,o=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),i=o(t,e),a=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:r=[],options:o}=this,i=t,a=this._getActiveElements(e,r,n,i),l=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),s=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,l);n&&(this._lastEvent=null,eA(o.onHover,[e,a,this],this),l&&eA(o.onClick,[e,a,this],this));const u=!nA(a,r);return(u||t)&&(this._active=a,this._updateHoverStyles(a,r,t)),this._lastEvent=s,u}_getActiveElements(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}}function wx(){return tA(Ex.instances,(e=>e._plugins.invalidate()))}function Ox(e,t,n,r){const o=LC(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const i=(n-t)/2,a=Math.min(i,r*t/2),l=e=>{const t=(n-Math.min(i,e))*r/2;return FA(e,0,Math.min(i,t))};return{outerStart:l(o.outerStart),outerEnd:l(o.outerEnd),innerStart:FA(o.innerStart,0,a),innerEnd:FA(o.innerEnd,0,a)}}function Ax(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Cx(e,t,n,r,o,i){const{x:a,y:l,startAngle:s,pixelMargin:u,innerRadius:c}=t,d=Math.max(t.outerRadius+r+n-u,0),f=c>0?c+r+n+u:0;let p=0;const h=o-s;if(r){const e=((c>0?c-r:0)+(d>0?d-r:0))/2;p=(h-(0!==e?h*e/(e+r):h))/2}const m=(h-Math.max(.001,h*d-n/mA)/d)/2,g=s+m+p,y=o-m-p,{outerStart:b,outerEnd:v,innerStart:S,innerEnd:E}=Ox(t,f,d,y-g),w=d-b,O=d-v,A=g+b/w,C=y-v/O,T=f+S,D=f+E,x=g+S/T,P=y-E/D;if(e.beginPath(),i){const t=(A+C)/2;if(e.arc(a,l,d,A,t),e.arc(a,l,d,t,C),v>0){const t=Ax(O,C,a,l);e.arc(t.x,t.y,v,C,y+SA)}const n=Ax(D,y,a,l);if(e.lineTo(n.x,n.y),E>0){const t=Ax(D,P,a,l);e.arc(t.x,t.y,E,y+SA,P+Math.PI)}const r=(y-E/f+(g+S/f))/2;if(e.arc(a,l,f,y-E/f,r,!0),e.arc(a,l,f,r,g+S/f,!0),S>0){const t=Ax(T,x,a,l);e.arc(t.x,t.y,S,x+Math.PI,g-SA)}const o=Ax(w,g,a,l);if(e.lineTo(o.x,o.y),b>0){const t=Ax(w,A,a,l);e.arc(t.x,t.y,b,g-SA,A)}}else{e.moveTo(a,l);const t=Math.cos(A)*d+a,n=Math.sin(A)*d+l;e.lineTo(t,n);const r=Math.cos(C)*d+a,o=Math.sin(C)*d+l;e.lineTo(r,o)}e.closePath()}function Tx(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:l,options:s}=t,{borderWidth:u,borderJoinStyle:c,borderDash:d,borderDashOffset:f}=s,p="inner"===s.borderAlign;if(!u)return;e.setLineDash(d||[]),e.lineDashOffset=f,p?(e.lineWidth=2*u,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel");let h=t.endAngle;if(i){Cx(e,t,n,r,h,o);for(let t=0;t<i;++t)e.stroke();isNaN(l)||(h=a+(l%gA||gA))}p&&function(e,t,n){const{startAngle:r,pixelMargin:o,x:i,y:a,outerRadius:l,innerRadius:s}=t;let u=o/l;e.beginPath(),e.arc(i,a,l,r-u,n+u),s>o?(u=o/s,e.arc(i,a,s,n+u,r-u,!0)):e.arc(i,a,o,n+SA,r-SA),e.closePath(),e.clip()}(e,t,h),i||(Cx(e,t,n,r,h,o),e.stroke())}class Dx extends kD{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:o,distance:i}=RA(r,{x:e,y:t}),{startAngle:a,endAngle:l,innerRadius:s,outerRadius:u,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,f=XO(c,l-a),p=_A(o,a,l)&&a!==l,h=f>=gA||p,m=NA(i,s+d,u+d);return h&&m}getCenterPoint(e){const{x:t,y:n,startAngle:r,endAngle:o,innerRadius:i,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:s}=this.options,u=(r+o)/2,c=(i+a+s+l)/2;return{x:t+Math.cos(u)*c,y:n+Math.sin(u)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>gA?Math.floor(n/gA):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);const l=r*(1-Math.sin(Math.min(mA,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,o){const{fullCircles:i,startAngle:a,circumference:l}=t;let s=t.endAngle;if(i){Cx(e,t,n,r,s,o);for(let t=0;t<i;++t)e.fill();isNaN(l)||(s=a+(l%gA||gA))}Cx(e,t,n,r,s,o),e.fill()}(e,this,l,o,i),Tx(e,this,l,o,i),e.restore()}}function xx(e,t,n=t){e.lineCap=XO(n.borderCapStyle,t.borderCapStyle),e.setLineDash(XO(n.borderDash,t.borderDash)),e.lineDashOffset=XO(n.borderDashOffset,t.borderDashOffset),e.lineJoin=XO(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=XO(n.borderWidth,t.borderWidth),e.strokeStyle=XO(n.borderColor,t.borderColor)}function Px(e,t,n){e.lineTo(n.x,n.y)}function Mx(e,t,n={}){const r=e.length,{start:o=0,end:i=r-1}=n,{start:a,end:l}=t,s=Math.max(o,a),u=Math.min(i,l),c=o<a&&i<a||o>l&&i>l;return{count:r,start:s,loop:t.loop,ilen:u<s&&!c?r+u-s:u-s}}function Ix(e,t,n,r){const{points:o,options:i}=t,{count:a,start:l,loop:s,ilen:u}=Mx(o,n,r),c=function(e){return e.stepped?OC:e.tension||"monotone"===e.cubicInterpolationMode?AC:Px}(i);let d,f,p,{move:h=!0,reverse:m}=r||{};for(d=0;d<=u;++d)f=o[(l+(m?u-d:d))%a],f.skip||(h?(e.moveTo(f.x,f.y),h=!1):c(e,p,f,m,i.stepped),p=f);return s&&(f=o[(l+(m?u:0))%a],c(e,p,f,m,i.stepped)),!!s}function Rx(e,t,n,r){const o=t.points,{count:i,start:a,ilen:l}=Mx(o,n,r),{move:s=!0,reverse:u}=r||{};let c,d,f,p,h,m,g=0,y=0;const b=e=>(a+(u?l-e:e))%i,v=()=>{p!==h&&(e.lineTo(g,h),e.lineTo(g,p),e.lineTo(g,m))};for(s&&(d=o[b(0)],e.moveTo(d.x,d.y)),c=0;c<=l;++c){if(d=o[b(c)],d.skip)continue;const t=d.x,n=d.y,r=0|t;r===f?(n<p?p=n:n>h&&(h=n),g=(y*g+t)/++y):(v(),e.lineTo(t,n),f=r,y=0,p=h=n),m=n}v()}function Lx(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!n?Rx:Ix}const kx="function"===typeof Path2D;function jx(e,t,n,r){kx&&!t.options.segment?function(e,t,n,r){let o=t._path;o||(o=t._path=new Path2D,t.path(o,n,r)&&o.closePath()),xx(e,t.options),e.stroke(o)}(e,t,n,r):function(e,t,n,r){const{segments:o,options:i}=t,a=Lx(t);for(const l of o)xx(e,i,l.style),e.beginPath(),a(e,t,l,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}(e,t,n,r)}class _x extends kD{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;iT(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const n=e.points,r=e.options.spanGaps,o=n.length;if(!o)return[];const i=!!e._loop,{start:a,end:l}=function(e,t,n,r){let o=0,i=t-1;if(n&&!r)for(;o<t&&!e[o].skip;)o++;for(;o<t&&e[o].skip;)o++;for(o%=t,n&&(i+=o);i>o&&e[i%t].skip;)i--;return i%=t,{start:o,end:i}}(n,o,i,r);return xT(e,!0===r?[{start:a,end:l,loop:i}]:function(e,t,n,r){const o=e.length,i=[];let a,l=t,s=e[t];for(a=t+1;a<=n;++a){const n=e[a%o];n.skip||n.stop?s.skip||(r=!1,i.push({start:t%o,end:(a-1)%o,loop:r}),t=l=n.stop?a:null):(l=a,s.skip&&(t=a)),s=n}return null!==l&&i.push({start:t%o,end:l%o,loop:r}),i}(n,a,l<a?l+o:l,!!e._fullLoop&&0===a&&l===o-1),n,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){const n=this.options,r=e[t],o=this.points,i=DT(this,{property:t,start:r,end:r});if(!i.length)return;const a=[],l=function(e){return e.stepped?vT:e.tension||"monotone"===e.cubicInterpolationMode?ST:bT}(n);let s,u;for(s=0,u=i.length;s<u;++s){const{start:u,end:c}=i[s],d=o[u],f=o[c];if(d===f){a.push(d);continue}const p=l(d,f,Math.abs((r-d[t])/(f[t]-d[t])),n.stepped);p[t]=e[t],a.push(p)}return 1===a.length?a[0]:a}pathSegment(e,t,n){return Lx(this)(e,this,t,n)}path(e,t,n){const r=this.segments,o=Lx(this);let i=this._loop;t=t||0,n=n||this.points.length-t;for(const a of r)i&=o(e,this,a,{start:t,end:t+n-1});return!!i}draw(e,t,n,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),jx(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Fx(e,t,n,r){const o=e.options,{[n]:i}=e.getProps([n],r);return Math.abs(t-i)<o.radius+o.hitRadius}class Nx extends kD{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.options,{x:o,y:i}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(t-i,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,t){return Fx(this,e,"x",t)}inYRange(e,t){return Fx(this,e,"y",t)}getCenterPoint(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const n=this.options;this.skip||n.radius<.1||!SC(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,bC(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function Bx(e,t){const{x:n,y:r,base:o,width:i,height:a}=e.getProps(["x","y","base","width","height"],t);let l,s,u,c,d;return e.horizontal?(d=a/2,l=Math.min(n,o),s=Math.max(n,o),u=r-d,c=r+d):(d=i/2,l=n-d,s=n+d,u=Math.min(r,o),c=Math.max(r,o)),{left:l,top:u,right:s,bottom:c}}function Ux(e,t,n,r){return e?0:FA(t,n,r)}function Hx(e){const t=Bx(e),n=t.right-t.left,r=t.bottom-t.top,o=function(e,t,n){const r=e.options.borderWidth,o=e.borderSkipped,i=kC(r);return{t:Ux(o.top,i.top,0,n),r:Ux(o.right,i.right,0,t),b:Ux(o.bottom,i.bottom,0,n),l:Ux(o.left,i.left,0,t)}}(e,n/2,r/2),i=function(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),o=e.options.borderRadius,i=jC(o),a=Math.min(t,n),l=e.borderSkipped,s=r||KO(o);return{topLeft:Ux(!s||l.top||l.left,i.topLeft,0,a),topRight:Ux(!s||l.top||l.right,i.topRight,0,a),bottomLeft:Ux(!s||l.bottom||l.left,i.bottomLeft,0,a),bottomRight:Ux(!s||l.bottom||l.right,i.bottomRight,0,a)}}(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,i.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(o.b,o.r))}}}}function Vx(e,t,n,r){const o=null===t,i=null===n,a=e&&!(o&&i)&&Bx(e,r);return a&&(o||NA(t,a.left,a.right))&&(i||NA(n,a.top,a.bottom))}function qx(e,t){e.rect(t.x,t.y,t.w,t.h)}function Wx(e,t,n={}){const r=e.x!==n.x?-t:0,o=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-o;return{x:e.x+r,y:e.y+o,w:e.w+i,h:e.h+a,radius:e.radius}}class zx extends kD{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:i}=Hx(this),a=(l=i.radius).topLeft||l.topRight||l.bottomLeft||l.bottomRight?xC:qx;var l;e.save(),i.w===o.w&&i.h===o.h||(e.beginPath(),a(e,Wx(i,t,o)),e.clip(),a(e,Wx(o,-t,i)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,Wx(o,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,n){return Vx(this,e,t,n)}inXRange(e,t){return Vx(this,e,null,t)}inYRange(e,t){return Vx(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+r)/2:t,y:o?n:(n+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}function Qx(e,t,n,r){if(r)return;let o=t[e],i=n[e];return"angle"===e&&(o=jA(o),i=jA(i)),{property:e,start:o,end:i}}function Gx(e,t,n){for(;t>e;t--){const e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function $x(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Kx(e,t){let n=[],r=!1;return $O(e)?(r=!0,n=e):n=function(e,t){const{x:n=null,y:r=null}=e||{},o=t.points,i=[];return t.segments.forEach((({start:e,end:t})=>{t=Gx(e,t,o);const a=o[e],l=o[t];null!==r?(i.push({x:a.x,y:r}),i.push({x:l.x,y:r})):null!==n&&(i.push({x:n,y:a.y}),i.push({x:n,y:l.y}))})),i}(e,t),n.length?new _x({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Yx(e){return e&&!1!==e.fill}function Jx(e,t,n){let r=e[t].fill;const o=[t];let i;if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!YO(r))return r;if(i=e[r],!i)return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function Xx(e,t,n){const r=function(e){const t=e.options,n=t.fill;let r=XO(n&&n.target,n);void 0===r&&(r=!!t.backgroundColor);if(!1===r||null===r)return!1;if(!0===r)return"origin";return r}(e);if(KO(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return YO(o)&&Math.floor(o)===o?function(e,t,n,r){"-"!==e&&"+"!==e||(n=t+n);if(n===t||n<0||n>=r)return!1;return n}(r[0],t,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Zx(e,t,n){const r=[];for(let o=0;o<n.length;o++){const i=n[o],{first:a,last:l,point:s}=eP(i,t,"x");if(!(!s||a&&l))if(a)r.unshift(s);else if(e.push(s),!l)break}e.push(...r)}function eP(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const o=r[n],i=e.segments,a=e.points;let l=!1,s=!1;for(let u=0;u<i.length;u++){const e=i[u],t=a[e.start][n],r=a[e.end][n];if(NA(o,t,r)){l=o===t,s=o===r;break}}return{first:l,last:s,point:r}}class tP{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,n){const{x:r,y:o,radius:i}=this;return t=t||{start:0,end:gA},e.arc(r,o,i,t.end,t.start,!0),!n.bounds}interpolate(e){const{x:t,y:n,radius:r}=this,o=e.angle;return{x:t+Math.cos(o)*r,y:n+Math.sin(o)*r,angle:o}}}function nP(e){const{chart:t,fill:n,line:r}=e;if(YO(n))return function(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}(t,n);if("stack"===n)return function(e){const{scale:t,index:n,line:r}=e,o=[],i=r.segments,a=r.points,l=function(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let o=0;o<r.length;o++){const e=r[o];if(e.index===t)break;e.hidden||n.unshift(e.dataset)}return n}(t,n);l.push(Kx({x:null,y:t.bottom},r));for(let s=0;s<i.length;s++){const e=i[s];for(let t=e.start;t<=e.end;t++)Zx(o,a[t],l)}return new _x({points:o,options:{}})}(e);if("shape"===n)return!0;const o=function(e){if((e.scale||{}).getPointPositionForValue)return function(e){const{scale:t,fill:n}=e,r=t.options,o=t.getLabels().length,i=r.reverse?t.max:t.min,a=function(e,t,n){let r;return r="start"===e?n:"end"===e?t.options.reverse?t.min:t.max:KO(e)?e.value:t.getBaseValue(),r}(n,t,i),l=[];if(r.grid.circular){const e=t.getPointPositionForValue(0,i);return new tP({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(a)})}for(let s=0;s<o;++s)l.push(t.getPointPositionForValue(s,a));return l}(e);return function(e){const{scale:t={},fill:n}=e,r=function(e,t){let n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:KO(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(n,t);if(YO(r)){const e=t.isHorizontal();return{x:e?r:null,y:e?null:r}}return null}(e)}(e);return o instanceof tP?o:Kx(o,r)}function rP(e,t,n){const r=nP(t),{line:o,scale:i,axis:a}=t,l=o.options,s=l.fill,u=l.backgroundColor,{above:c=u,below:d=u}=s||{};r&&o.points.length&&(EC(e,n),function(e,t){const{line:n,target:r,above:o,below:i,area:a,scale:l}=t,s=n._loop?"angle":t.axis;e.save(),"x"===s&&i!==o&&(oP(e,r,a.top),iP(e,{line:n,target:r,color:o,scale:l,property:s}),e.restore(),e.save(),oP(e,r,a.bottom));iP(e,{line:n,target:r,color:i,scale:l,property:s}),e.restore()}(e,{line:o,target:r,above:c,below:d,area:n,scale:i,axis:a}),wC(e))}function oP(e,t,n){const{segments:r,points:o}=t;let i=!0,a=!1;e.beginPath();for(const l of r){const{start:r,end:s}=l,u=o[r],c=o[Gx(r,s,o)];i?(e.moveTo(u.x,u.y),i=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),a=!!t.pathSegment(e,l,{move:a}),a?e.closePath():e.lineTo(c.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function iP(e,t){const{line:n,target:r,property:o,color:i,scale:a}=t,l=function(e,t,n){const r=e.segments,o=e.points,i=t.points,a=[];for(const l of r){let{start:e,end:r}=l;r=Gx(e,r,o);const s=Qx(n,o[e],o[r],l.loop);if(!t.segments){a.push({source:l,target:s,start:o[e],end:o[r]});continue}const u=DT(t,s);for(const t of u){const e=Qx(n,i[t.start],i[t.end],t.loop),r=TT(l,o,e);for(const o of r)a.push({source:o,target:t,start:{[n]:$x(s,e,"start",Math.max)},end:{[n]:$x(s,e,"end",Math.min)}})}}return a}(n,r,o);for(const{source:s,target:u,start:c,end:d}of l){const{style:{backgroundColor:t=i}={}}=s,l=!0!==r;e.save(),e.fillStyle=t,aP(e,a,l&&Qx(o,c,d)),e.beginPath();const f=!!n.pathSegment(e,s);let p;if(l){f?e.closePath():lP(e,r,d,o);const t=!!r.pathSegment(e,u,{move:f,reverse:!0});p=f&&t,p||lP(e,r,c,o)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function aP(e,t,n){const{top:r,bottom:o}=t.chart.chartArea,{property:i,start:a,end:l}=n||{};"x"===i&&(e.beginPath(),e.rect(a,r,l-a,o-r),e.clip())}function lP(e,t,n,r){const o=t.interpolate(n,r);o&&e.lineTo(o.x,o.y)}var sP={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,o=[];let i,a,l,s;for(a=0;a<r;++a)i=e.getDatasetMeta(a),l=i.dataset,s=null,l&&l.options&&l instanceof _x&&(s={visible:e.isDatasetVisible(a),index:a,fill:Xx(l,a,r),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:l}),i.$filler=s,o.push(s);for(a=0;a<r;++a)s=o[a],s&&!1!==s.fill&&(s.fill=Jx(o,a,n.propagate))},beforeDraw(e,t,n){const r="beforeDraw"===n.drawTime,o=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let a=o.length-1;a>=0;--a){const t=o[a].$filler;t&&(t.line.updateControlPoints(i,t.axis),r&&t.fill&&rP(e.ctx,t,i))}},beforeDatasetsDraw(e,t,n){if("beforeDatasetsDraw"!==n.drawTime)return;const r=e.getSortedVisibleDatasetMetas();for(let o=r.length-1;o>=0;--o){const t=r[o].$filler;Yx(t)&&rP(e.ctx,t,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;Yx(r)&&"beforeDatasetDraw"===n.drawTime&&rP(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const uP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}};class cP extends kD{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=eA(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,n)=>e.sort(t,n,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const n=e.labels,r=FC(n.font),o=r.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=uP(n,o);let s,u;t.font=r.string,this.isHorizontal()?(s=this.maxWidth,u=this._fitRows(i,o,a,l)+10):(u=this.maxHeight,s=this._fitCols(i,r,a,l)+10),this.width=Math.min(s,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){const{ctx:o,maxWidth:i,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],s=this.lineWidths=[0],u=r+a;let c=e;o.textAlign="left",o.textBaseline="middle";let d=-1,f=-u;return this.legendItems.forEach(((e,p)=>{const h=n+t/2+o.measureText(e.text).width;(0===p||s[s.length-1]+h+2*a>i)&&(c+=u,s[s.length-(p>0?0:1)]=0,f+=u,d++),l[p]={left:0,top:f,row:d,width:h,height:r},s[s.length-1]+=h+a})),c}_fitCols(e,t,n,r){const{ctx:o,maxHeight:i,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],s=this.columnSizes=[],u=i-e;let c=a,d=0,f=0,p=0,h=0;return this.legendItems.forEach(((e,i)=>{const{itemWidth:m,itemHeight:g}=function(e,t,n,r,o){const i=function(e,t,n,r){let o=e.text;o&&"string"!==typeof o&&(o=o.reduce(((e,t)=>e.length>t.length?e:t)));return t+n.size/2+r.measureText(o).width}(r,e,t,n),a=function(e,t,n){let r=e;"string"!==typeof t.text&&(r=dP(t,n));return r}(o,r,t.lineHeight);return{itemWidth:i,itemHeight:a}}(n,t,o,e,r);i>0&&f+g+2*a>u&&(c+=d+a,s.push({width:d,height:f}),p+=d+a,h++,d=f=0),l[i]={left:p,top:f,col:h,width:m,height:g},d=Math.max(d,m),f+=g+a})),c+=d,s.push({width:d,height:f}),c}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:o}}=this,i=ET(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=GA(n,this.left+r,this.right-this.lineWidths[o]);for(const l of t)o!==l.row&&(o=l.row,a=GA(n,this.left+r,this.right-this.lineWidths[o])),l.top+=this.top+e+r,l.left=i.leftForLtr(i.x(a),l.width),a+=l.width+r}else{let o=0,a=GA(n,this.top+e+r,this.bottom-this.columnSizes[o].height);for(const l of t)l.col!==o&&(o=l.col,a=GA(n,this.top+e+r,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+r,l.left=i.leftForLtr(i.x(l.left),l.width),a+=l.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;EC(e,this),this._draw(),wC(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:o,labels:i}=e,a=hC.color,l=ET(e.rtl,this.left,this.width),s=FC(i.font),{padding:u}=i,c=s.size,d=c/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=s.string;const{boxWidth:p,boxHeight:h,itemHeight:m}=uP(i,c),g=this.isHorizontal(),y=this._computeTitleHeight();f=g?{x:GA(o,this.left+u,this.right-n[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:GA(o,this.top+y+u,this.bottom-t[0].height),line:0},wT(this.ctx,e.textDirection);const b=m+u;this.legendItems.forEach(((v,S)=>{r.strokeStyle=v.fontColor,r.fillStyle=v.fontColor;const E=r.measureText(v.text).width,w=l.textAlign(v.textAlign||(v.textAlign=i.textAlign)),O=p+d+E;let A=f.x,C=f.y;l.setWidth(this.width),g?S>0&&A+O+u>this.right&&(C=f.y+=b,f.line++,A=f.x=GA(o,this.left+u,this.right-n[f.line])):S>0&&C+b>this.bottom&&(A=f.x=A+t[f.line].width+u,f.line++,C=f.y=GA(o,this.top+y+u,this.bottom-t[f.line].height));if(function(e,t,n){if(isNaN(p)||p<=0||isNaN(h)||h<0)return;r.save();const o=XO(n.lineWidth,1);if(r.fillStyle=XO(n.fillStyle,a),r.lineCap=XO(n.lineCap,"butt"),r.lineDashOffset=XO(n.lineDashOffset,0),r.lineJoin=XO(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=XO(n.strokeStyle,a),r.setLineDash(XO(n.lineDash,[])),i.usePointStyle){const a={radius:h*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},s=l.xPlus(e,p/2);vC(r,a,s,t+d,i.pointStyleWidth&&p)}else{const i=t+Math.max((c-h)/2,0),a=l.leftForLtr(e,p),s=jC(n.borderRadius);r.beginPath(),Object.values(s).some((e=>0!==e))?xC(r,{x:a,y:i,w:p,h:h,radius:s}):r.rect(a,i,p,h),r.fill(),0!==o&&r.stroke()}r.restore()}(l.x(A),C,v),A=((e,t,n,r)=>e===(r?"left":"right")?n:"center"===e?(t+n)/2:t)(w,A+p+d,g?A+O:this.right,e.rtl),function(e,t,n){DC(r,n.text,e,t+m/2,s,{strikethrough:n.hidden,textAlign:l.textAlign(n.textAlign)})}(l.x(A),C,v),g)f.x+=O+u;else if("string"!==typeof v.text){const e=s.lineHeight;f.y+=dP(v,e)+u}else f.y+=b})),OT(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=FC(t.font),r=_C(t.padding);if(!t.display)return;const o=ET(e.rtl,this.left,this.width),i=this.ctx,a=t.position,l=n.size/2,s=r.top+l;let u,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+s,c=GA(e.align,c,this.right-d);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);u=s+GA(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const f=GA(a,c,c+d);i.textAlign=o.textAlign(QA(a)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=n.string,DC(i,t.text,f,u,n)}_computeTitleHeight(){const e=this.options.title,t=FC(e.font),n=_C(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,o;if(NA(e,this.left,this.right)&&NA(t,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(r=o[n],NA(e,r.left,r.left+r.width)&&NA(t,r.top,r.top+r.height))return this.legendItems[n];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,o=((e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index)(r,n);r&&!o&&eA(t.onLeave,[e,r,this],this),this._hoveredItem=n,n&&!o&&eA(t.onHover,[e,n,this],this)}else n&&eA(t.onClick,[e,n,this],this)}}function dP(e,t){return t*(e.text?e.text.length:0)}var fP={id:"legend",_element:cP,start(e,t,n){const r=e.legend=new cP({ctx:e.ctx,options:n,chart:e});yD.configure(e,r,n),yD.addBox(e,r)},stop(e){yD.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;yD.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:a,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const s=e.controller.getStyle(n?0:void 0),u=_C(s.borderWidth);return{text:t[e.index].label,fillStyle:s.backgroundColor,fontColor:i,hidden:!e.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:s.borderColor,pointStyle:r||s.pointStyle,rotation:s.rotation,textAlign:o||s.textAlign,borderRadius:a&&(l||s.borderRadius),datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class pP extends kD{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const r=$O(n.text)?n.text.length:1;this._padding=_C(n.padding);const o=r*FC(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:n,bottom:r,right:o,options:i}=this,a=i.align;let l,s,u,c=0;return this.isHorizontal()?(s=GA(a,n,o),u=t+e,l=o-n):("left"===i.position?(s=n+e,u=GA(a,r,t),c=-.5*mA):(s=o-e,u=GA(a,t,r),c=.5*mA),l=r-t),{titleX:s,titleY:u,maxWidth:l,rotation:c}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=FC(t.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:i,maxWidth:a,rotation:l}=this._drawArgs(r);DC(e,t.text,0,0,n,{color:t.color,maxWidth:a,rotation:l,textAlign:QA(t.align),textBaseline:"middle",translation:[o,i]})}}var hP={id:"title",_element:pP,start(e,t,n){!function(e,t){const n=new pP({ctx:e.ctx,options:t,chart:e});yD.configure(e,n,t),yD.addBox(e,n),e.titleBlock=n}(e,n)},stop(e){const t=e.titleBlock;yD.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;yD.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const mP={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){const n=e[t].element;if(n&&n.hasValue()){const e=n.tooltipPosition();r.add(e.x),o+=e.y,++i}}if(0===i||0===r.size)return!1;const a=[...r].reduce(((e,t)=>e+t))/r.size;return{x:a,y:o/i}},nearest(e,t){if(!e.length)return!1;let n,r,o,i=t.x,a=t.y,l=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){const r=e[n].element;if(r&&r.hasValue()){const e=LA(t,r.getCenterPoint());e<l&&(l=e,o=r)}}if(o){const e=o.tooltipPosition();i=e.x,a=e.y}return{x:i,y:a}}};function gP(e,t){return t&&($O(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function yP(e){return("string"===typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function bP(e,t){const{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:a,value:l}=i.getLabelAndValue(o);return{chart:e,label:a,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:l,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function vP(e,t){const n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:a,boxHeight:l}=t,s=FC(t.bodyFont),u=FC(t.titleFont),c=FC(t.footerFont),d=i.length,f=o.length,p=r.length,h=_C(t.padding);let m=h.height,g=0,y=r.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){m+=p*(t.displayColors?Math.max(l,s.lineHeight):s.lineHeight)+(y-p)*s.lineHeight+(y-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const v=function(e){g=Math.max(g,n.measureText(e).width+b)};return n.save(),n.font=u.string,tA(e.title,v),n.font=s.string,tA(e.beforeBody.concat(e.afterBody),v),b=t.displayColors?a+2+t.boxPadding:0,tA(r,(e=>{tA(e.before,v),tA(e.lines,v),tA(e.after,v)})),b=0,n.font=c.string,tA(e.footer,v),n.restore(),g+=h.width,{width:g,height:m}}function SP(e,t,n,r){const{x:o,width:i}=n,{width:a,chartArea:{left:l,right:s}}=e;let u="center";return"center"===r?u=o<=(l+s)/2?"left":"right":o<=i/2?u="left":o>=a-i/2&&(u="right"),function(e,t,n,r){const{x:o,width:i}=r,a=n.caretSize+n.caretPadding;return"left"===e&&o+i+a>t.width||"right"===e&&o-i-a<0||void 0}(u,e,t,n)&&(u="center"),u}function EP(e,t,n){const r=n.yAlign||t.yAlign||function(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||SP(e,t,n,r),yAlign:r}}function wP(e,t,n,r){const{caretSize:o,caretPadding:i,cornerRadius:a}=e,{xAlign:l,yAlign:s}=n,u=o+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:p}=jC(a);let h=function(e,t){let{x:n,width:r}=e;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,l);const m=function(e,t,n){let{y:r,height:o}=e;return"top"===t?r+=n:r-="bottom"===t?o+n:o/2,r}(t,s,u);return"center"===s?"left"===l?h+=u:"right"===l&&(h-=u):"left"===l?h-=Math.max(c,f)+o:"right"===l&&(h+=Math.max(d,p)+o),{x:FA(h,0,r.width-t.width),y:FA(m,0,r.height-t.height)}}function OP(e,t,n){const r=_C(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function AP(e){return gP([],yP(e))}function CP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const TP={beforeTitle:zO,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:zO,beforeBody:zO,beforeLabel:zO,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return GO(n)||(t+=n),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:zO,afterBody:zO,beforeFooter:zO,footer:zO,afterFooter:zO};function DP(e,t,n,r){const o=e[t].call(n,r);return"undefined"===typeof o?TP[t].call(n,r):o}class xP extends kD{static positioners=mP;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,o=new _T(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,n=this._tooltipItems,BC(e,{tooltip:t,tooltipItems:n,type:"tooltip"})));var e,t,n}getTitle(e,t){const{callbacks:n}=t,r=DP(n,"beforeTitle",this,e),o=DP(n,"title",this,e),i=DP(n,"afterTitle",this,e);let a=[];return a=gP(a,yP(r)),a=gP(a,yP(o)),a=gP(a,yP(i)),a}getBeforeBody(e,t){return AP(DP(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,r=[];return tA(e,(e=>{const t={before:[],lines:[],after:[]},o=CP(n,e);gP(t.before,yP(DP(o,"beforeLabel",this,e))),gP(t.lines,DP(o,"label",this,e)),gP(t.after,yP(DP(o,"afterLabel",this,e))),r.push(t)})),r}getAfterBody(e,t){return AP(DP(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,r=DP(n,"beforeFooter",this,e),o=DP(n,"footer",this,e),i=DP(n,"afterFooter",this,e);let a=[];return a=gP(a,yP(r)),a=gP(a,yP(o)),a=gP(a,yP(i)),a}_createItems(e){const t=this._active,n=this.chart.data,r=[],o=[],i=[];let a,l,s=[];for(a=0,l=t.length;a<l;++a)s.push(bP(this.chart,t[a]));return e.filter&&(s=s.filter(((t,r,o)=>e.filter(t,r,o,n)))),e.itemSort&&(s=s.sort(((t,r)=>e.itemSort(t,r,n)))),tA(s,(t=>{const n=CP(e.callbacks,t);r.push(DP(n,"labelColor",this,t)),o.push(DP(n,"labelPointStyle",this,t)),i.push(DP(n,"labelTextColor",this,t))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=i,this.dataPoints=s,s}update(e,t){const n=this.options.setContext(this.getContext()),r=this._active;let o,i=[];if(r.length){const e=mP[n.position].call(this,r,this._eventPosition);i=this._createItems(n),this.title=this.getTitle(i,n),this.beforeBody=this.getBeforeBody(i,n),this.body=this.getBody(i,n),this.afterBody=this.getAfterBody(i,n),this.footer=this.getFooter(i,n);const t=this._size=vP(this,n),a=Object.assign({},e,t),l=EP(this.chart,n,a),s=wP(n,a,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,o={opacity:1,x:s.x,y:s.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=i,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){const o=this.getCaretPosition(e,n,r);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){const{xAlign:r,yAlign:o}=this,{caretSize:i,cornerRadius:a}=n,{topLeft:l,topRight:s,bottomLeft:u,bottomRight:c}=jC(a),{x:d,y:f}=e,{width:p,height:h}=t;let m,g,y,b,v,S;return"center"===o?(v=f+h/2,"left"===r?(m=d,g=m-i,b=v+i,S=v-i):(m=d+p,g=m+i,b=v-i,S=v+i),y=m):(g="left"===r?d+Math.max(l,u)+i:"right"===r?d+p-Math.max(s,c)-i:this.caretX,"top"===o?(b=f,v=b-i,m=g-i,y=g+i):(b=f+h,v=b+i,m=g+i,y=g-i),S=b),{x1:m,x2:g,x3:y,y1:b,y2:v,y3:S}}drawTitle(e,t,n){const r=this.title,o=r.length;let i,a,l;if(o){const s=ET(n.rtl,this.x,this.width);for(e.x=OP(this,n.titleAlign,n),t.textAlign=s.textAlign(n.titleAlign),t.textBaseline="middle",i=FC(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=i.string,l=0;l<o;++l)t.fillText(r[l],s.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+a,l+1===o&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,t,n,r,o){const i=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:s}=o,u=FC(o.bodyFont),c=OP(this,"left",o),d=r.x(c),f=l<u.lineHeight?(u.lineHeight-l)/2:0,p=t.y+f;if(o.usePointStyle){const t={radius:Math.min(s,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},n=r.leftForLtr(d,s)+s/2,u=p+l/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,bC(e,t,n,u),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,bC(e,t,n,u)}else{e.lineWidth=KO(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const t=r.leftForLtr(d,s),n=r.leftForLtr(r.xPlus(d,1),s-2),a=jC(i.borderRadius);Object.values(a).some((e=>0!==e))?(e.beginPath(),e.fillStyle=o.multiKeyBackground,xC(e,{x:t,y:p,w:s,h:l,radius:a}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),xC(e,{x:n,y:p+1,w:s-2,h:l-2,radius:a}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(t,p,s,l),e.strokeRect(t,p,s,l),e.fillStyle=i.backgroundColor,e.fillRect(n,p+1,s-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:r}=this,{bodySpacing:o,bodyAlign:i,displayColors:a,boxHeight:l,boxWidth:s,boxPadding:u}=n,c=FC(n.bodyFont);let d=c.lineHeight,f=0;const p=ET(n.rtl,this.x,this.width),h=function(n){t.fillText(n,p.x(e.x+f),e.y+d/2),e.y+=d+o},m=p.textAlign(i);let g,y,b,v,S,E,w;for(t.textAlign=i,t.textBaseline="middle",t.font=c.string,e.x=OP(this,m,n),t.fillStyle=n.bodyColor,tA(this.beforeBody,h),f=a&&"right"!==m?"center"===i?s/2+u:s+2+u:0,v=0,E=r.length;v<E;++v){for(g=r[v],y=this.labelTextColors[v],t.fillStyle=y,tA(g.before,h),b=g.lines,a&&b.length&&(this._drawColorBox(t,e,v,p,n),d=Math.max(c.lineHeight,l)),S=0,w=b.length;S<w;++S)h(b[S]),d=c.lineHeight;tA(g.after,h)}f=0,d=c.lineHeight,tA(this.afterBody,h),e.y-=o}drawFooter(e,t,n){const r=this.footer,o=r.length;let i,a;if(o){const l=ET(n.rtl,this.x,this.width);for(e.x=OP(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=l.textAlign(n.footerAlign),t.textBaseline="middle",i=FC(n.footerFont),t.fillStyle=n.footerColor,t.font=i.string,a=0;a<o;++a)t.fillText(r[a],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+n.footerSpacing}}drawBackground(e,t,n,r){const{xAlign:o,yAlign:i}=this,{x:a,y:l}=e,{width:s,height:u}=n,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:p}=jC(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(a+c,l),"top"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+s-d,l),t.quadraticCurveTo(a+s,l,a+s,l+d),"center"===i&&"right"===o&&this.drawCaret(e,t,n,r),t.lineTo(a+s,l+u-p),t.quadraticCurveTo(a+s,l+u,a+s-p,l+u),"bottom"===i&&this.drawCaret(e,t,n,r),t.lineTo(a+f,l+u),t.quadraticCurveTo(a,l+u,a,l+u-f),"center"===i&&"left"===o&&this.drawCaret(e,t,n,r),t.lineTo(a,l+c),t.quadraticCurveTo(a,l,a+c,l),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,r=n&&n.x,o=n&&n.y;if(r||o){const n=mP[e.position].call(this,this._active,this._eventPosition);if(!n)return;const i=this._size=vP(this,e),a=Object.assign({},n,this._size),l=EP(t,e,a),s=wP(e,a,l,t);r._to===s.x&&o._to===s.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=i.width,this.height=i.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,s))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const i=_C(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,r,t),wT(e,t.textDirection),o.y+=i.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),OT(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,r=e.map((({datasetIndex:e,index:t})=>{const n=this.chart.getDatasetMeta(e);if(!n)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:n.data[t],index:t}})),o=!nA(n,r),i=this._positionChanged(r,t);(o||i)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],i=this._getActiveElements(e,o,t,n),a=this._positionChanged(i,e),l=t||!nA(i,o)||a;return l&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),l}_getActiveElements(e,t,n,r){const o=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter((e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)));const i=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:n,caretY:r,options:o}=this,i=mP[o.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}var PP={id:"tooltip",_element:xP,positioners:mP,afterInit(e,t,n){n&&(e.tooltip=new xP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:TP},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function MP(e,t,n,r){const o=e.indexOf(t);if(-1===o)return((e,t,n,r)=>("string"===typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n))(e,t,n,r);return o!==e.lastIndexOf(t)?n:o}function IP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class RP extends WD{static id="category";static defaults={ticks:{callback:IP}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:n,label:r}of t)e[n]===r&&e.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(GO(e))return null;const n=this.getLabels();return((e,t)=>null===e?null:FA(Math.round(e),0,t))(t=isFinite(t)&&n[t]===e?t:MP(n,e,XO(t,e),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(n=0),t||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,r=[];let o=this.getLabels();o=0===e&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let i=e;i<=t;i++)r.push({value:i});return r}getLabelForValue(e){return IP.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function LP(e,t){const n=[],{bounds:r,step:o,min:i,max:a,precision:l,count:s,maxTicks:u,maxDigits:c,includeBounds:d}=e,f=o||1,p=u-1,{min:h,max:m}=t,g=!GO(i),y=!GO(a),b=!GO(s),v=(m-h)/(c+1);let S,E,w,O,A=TA((m-h)/p/f)*f;if(A<1e-14&&!g&&!y)return[{value:h},{value:m}];O=Math.ceil(m/A)-Math.floor(h/A),O>p&&(A=TA(O*A/p/f)*f),GO(l)||(S=Math.pow(10,l),A=Math.ceil(A*S)/S),"ticks"===r?(E=Math.floor(h/A)*A,w=Math.ceil(m/A)*A):(E=h,w=m),g&&y&&o&&function(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}((a-i)/o,A/1e3)?(O=Math.round(Math.min((a-i)/A,u)),A=(a-i)/O,E=i,w=a):b?(E=g?i:E,w=y?a:w,O=s-1,A=(w-E)/O):(O=(w-E)/A,O=CA(O,Math.round(O),A/1e3)?Math.round(O):Math.ceil(O));const C=Math.max(IA(A),IA(E));S=Math.pow(10,GO(l)?C:l),E=Math.round(E*S)/S,w=Math.round(w*S)/S;let T=0;for(g&&(d&&E!==i?(n.push({value:i}),E<i&&T++,CA(Math.round((E+T*A)*S)/S,i,kP(i,v,e))&&T++):E<i&&T++);T<O;++T){const e=Math.round((E+T*A)*S)/S;if(y&&e>a)break;n.push({value:e})}return y&&d&&w!==a?n.length&&CA(n[n.length-1].value,a,kP(a,v,e))?n[n.length-1].value=a:n.push({value:a}):y&&w!==a||n.push({value:w}),n}function kP(e,t,{horizontal:n,minRotation:r}){const o=PA(r),i=(n?Math.sin(o):Math.cos(o))||.001,a=.75*t*(""+e).length;return Math.min(t/i,a)}class jP extends WD{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return GO(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const i=e=>r=t?r:e,a=e=>o=n?o:e;if(e){const e=AA(r),t=AA(o);e<0&&t<0?a(0):e>0&&t>0&&i(0)}if(r===o){let t=0===o?1:Math.abs(.05*o);a(o+t),e||i(r-t)}this.min=r,this.max=o}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:n,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=LP({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&xA(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return aC(e,this.chart.options.locale,this.options.ticks.format)}}class _P extends jP{static id="linear";static defaults={ticks:{callback:sC.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=YO(e)?e:0,this.max=YO(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=PA(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}class FP extends WD{static id="logarithmic";static defaults={ticks:{callback:sC.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=jP.prototype.parse.apply(this,[e,t]);if(0!==n)return YO(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=YO(e)?Math.max(0,e):null,this.max=YO(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!YO(this._userMin)&&(this.min=e===changeExponent(this.min,0)?changeExponent(this.min,-1):changeExponent(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const o=t=>e?n:t,i=e=>t?r:e;n===r&&(n<=0?(o(1),i(10)):(o(changeExponent(n,-1)),i(changeExponent(r,1)))),n<=0&&o(changeExponent(r,-1)),r<=0&&i(changeExponent(n,1)),this.min=n,this.max=r}buildTicks(){const e=this.options,t=generateTicks({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&xA(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":aC(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=OA(e),this._valueRange=OA(this.max)-OA(e)}getPixelForValue(e){return void 0!==e&&0!==e||this.min,null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(OA(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}class NP extends jP{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:sC.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=_C(getTickBackdropHeight(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=YO(e)&&!isNaN(e)?e:0,this.max=YO(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/getTickBackdropHeight(this.options))}generateTickLabels(e){jP.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map(((e,t)=>{const n=eA(this.options.pointLabels.callback,[e,t],this);return n||0===n?n:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?fitWithPointLabels(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){return jA(e*(gA/(this._pointLabels.length||1))+PA(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(GO(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(GO(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return function(e,t,n){return BC(e,{label:n,index:t,type:"pointLabel"})}(this.getContext(),e,n)}}getPointPosition(e,t,n=0){const r=this.getIndexAngle(e)-SA+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),pathRadiusLine(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,i=this._pointLabels.length;let a,l,s;if(t.pointLabels.display&&function(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let o=t-1;o>=0;o--){const t=e._pointLabelItems[o];if(!t.visible)continue;const i=r.setContext(e.getPointLabelContext(o));drawPointLabelBox(n,i,t);const a=FC(i.font),{x:l,y:s,textAlign:u}=t;DC(n,e._pointLabels[o],l,s+a.lineHeight/2,a,{color:i.color,textAlign:u,textBaseline:"middle"})}}(this,i),r.display&&this.ticks.forEach(((e,t)=>{if(0!==t||0===t&&this.min<0){this.getDistanceFromCenterForValue(e.value);const n=this.getContext(t),a=r.setContext(n),s=o.setContext(n);!function(e,t,n,r,o){const i=e.ctx,a=t.circular,{color:l,lineWidth:s}=t;!a&&!r||!l||!s||n<0||(i.save(),i.strokeStyle=l,i.lineWidth=s,i.setLineDash(o.dash||[]),i.lineDashOffset=o.dashOffset,i.beginPath(),pathRadiusLine(e,n,a,r),i.closePath(),i.stroke(),i.restore())}(this,a,l,i,s)}})),n.display){for(e.save(),i-1;a>=0;a--){const r=n.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:i}=r;i&&o&&(e.lineWidth=i,e.strokeStyle=o,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(s.x,s.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let o,i;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((r,a)=>{if(0===a&&this.min>=0&&!t.reverse)return;const l=n.setContext(this.getContext(a)),s=FC(l.font);if(this.getDistanceFromCenterForValue(this.ticks[a].value),l.showLabelBackdrop){e.font=s.string,e.measureText(r.label).width,e.fillStyle=l.backdropColor;const t=_C(l.backdropPadding);e.fillRect(-i/2-t.left,-o-s.size/2-t.top,i+t.width,s.size+t.height)}DC(e,r.label,0,-o,s,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})})),e.restore()}drawTitle(){}}const BP="label";function UP(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function HP(e,t){e.labels=t}function VP(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:BP;const r=[];e.datasets=t.map((t=>{const o=e.datasets.find((e=>e[n]===t[n]));return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):{...t}}))}function qP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BP;const n={labels:[],datasets:[]};return HP(n,e.labels),VP(n,e.datasets,t),n}function WP(e,t){const{height:n=150,width:r=300,redraw:o=!1,datasetIdKey:i,type:a,data:l,options:s,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,p=(0,G.useRef)(null),h=(0,G.useRef)(null),m=()=>{p.current&&(h.current=new Ex(p.current,{type:a,data:qP(l,i),options:s&&{...s},plugins:u}),UP(t,h.current))},g=()=>{UP(t,null),h.current&&(h.current.destroy(),h.current=null)};return(0,G.useEffect)((()=>{!o&&h.current&&s&&function(e,t){const n=e.options;n&&t&&Object.assign(n,t)}(h.current,s)}),[o,s]),(0,G.useEffect)((()=>{!o&&h.current&&HP(h.current.config.data,l.labels)}),[o,l.labels]),(0,G.useEffect)((()=>{!o&&h.current&&l.datasets&&VP(h.current.config.data,l.datasets,i)}),[o,l.datasets]),(0,G.useEffect)((()=>{h.current&&(o?(g(),setTimeout(m)):h.current.update(d))}),[o,s,l.labels,l.datasets,d]),(0,G.useEffect)((()=>{h.current&&(g(),setTimeout(m))}),[a]),(0,G.useEffect)((()=>(m(),()=>g())),[]),G.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},c)}const zP=(0,G.forwardRef)(WP);function QP(e,t){return Ex.register(t),(0,G.forwardRef)(((t,n)=>G.createElement(zP,{...t,ref:n,type:e})))}const GP=QP("line",YT),$P=QP("pie",JT);var KP=function(){if("undefined"!==typeof window){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),YP=function(e){var t,n=[];for(e=[].concat(e);e.length;)"string"===typeof(t=e.pop())?n.unshift.apply(n,t.split("\n")):Array.isArray(t)?e.push.apply(e,t):GO(e)||n.unshift(""+t);return n},JP=function(e,t,n){var r,o=[].concat(t),i=o.length,a=e.font,l=0;for(e.font=n.string,r=0;r<i;++r)l=Math.max(e.measureText(o[r]).width,l);return e.font=a,{height:i*n.lineHeight,width:l}},XP=function(e,t,n){return Math.max(e,Math.min(t,n))},ZP=function(e,t){var n,r,o,i,a=e.slice(),l=[];for(n=0,o=t.length;n<o;++n)i=t[n],-1===(r=a.indexOf(i))?l.push([i,1]):a.splice(r,1);for(n=0,o=a.length;n<o;++n)l.push([a[n],-1]);return l},eM=function(e){return Math.round(e*KP)/KP};function tM(e,t){var n=t.x,r=t.y;if(null===n)return{x:0,y:-1};if(null===r)return{x:1,y:0};var o=e.x-n,i=e.y-r,a=Math.sqrt(o*o+i*i);return{x:a?o/a:0,y:a?i/a:-1}}function nM(e,t,n){var r=0;return e<n.left?r|=1:e>n.right&&(r|=2),t<n.top?r|=8:t>n.bottom&&(r|=4),r}function rM(e,t){var n,r,o=t.anchor,i=e;return t.clamp&&(i=function(e,t){for(var n,r,o,i=e.x0,a=e.y0,l=e.x1,s=e.y1,u=nM(i,a,t),c=nM(l,s,t);u|c&&!(u&c);)8&(n=u||c)?(r=i+(l-i)*(t.top-a)/(s-a),o=t.top):4&n?(r=i+(l-i)*(t.bottom-a)/(s-a),o=t.bottom):2&n?(o=a+(s-a)*(t.right-i)/(l-i),r=t.right):1&n&&(o=a+(s-a)*(t.left-i)/(l-i),r=t.left),n===u?u=nM(i=r,a=o,t):c=nM(l=r,s=o,t);return{x0:i,x1:l,y0:a,y1:s}}(i,t.area)),"start"===o?(n=i.x0,r=i.y0):"end"===o?(n=i.x1,r=i.y1):(n=(i.x0+i.x1)/2,r=(i.y0+i.y1)/2),function(e,t,n,r,o){switch(o){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:o*=Math.PI/180,n=Math.cos(o),r=Math.sin(o)}return{x:e,y:t,vx:n,vy:r}}(n,r,e.vx,e.vy,t.align)}var oM=function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),o=Math.sin(n),i=e.innerRadius,a=e.outerRadius;return rM({x0:e.x+r*i,y0:e.y+o*i,x1:e.x+r*a,y1:e.y+o*a,vx:r,vy:o},t)},iM=function(e,t){var n=tM(e,t.origin),r=n.x*e.options.radius,o=n.y*e.options.radius;return rM({x0:e.x-r,y0:e.y-o,x1:e.x+r,y1:e.y+o,vx:n.x,vy:n.y},t)},aM=function(e,t){var n=tM(e,t.origin),r=e.x,o=e.y,i=0,a=0;return e.horizontal?(r=Math.min(e.x,e.base),i=Math.abs(e.base-e.x)):(o=Math.min(e.y,e.base),a=Math.abs(e.base-e.y)),rM({x0:r,y0:o+a,x1:r+i,y1:o,vx:n.x,vy:n.y},t)},lM=function(e,t){var n=tM(e,t.origin);return rM({x0:e.x,y0:e.y,x1:e.x,y1:e.y,vx:n.x,vy:n.y},t)},sM=eM;function uM(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(void 0!==n.xCenter&&void 0!==n.yCenter)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function cM(e,t,n){var r=n.backgroundColor,o=n.borderColor,i=n.borderWidth;(r||o&&i)&&(e.beginPath(),function(e,t,n,r,o,i){var a=Math.PI/2;if(i){var l=Math.min(i,o/2,r/2),s=t+l,u=n+l,c=t+r-l,d=n+o-l;e.moveTo(t,u),s<c&&u<d?(e.arc(s,u,l,-Math.PI,-a),e.arc(c,u,l,-a,0),e.arc(c,d,l,0,a),e.arc(s,d,l,a,Math.PI)):s<c?(e.moveTo(s,n),e.arc(c,u,l,-a,a),e.arc(s,u,l,a,Math.PI+a)):u<d?(e.arc(s,u,l,-Math.PI,0),e.arc(s,d,l,0,Math.PI)):e.arc(s,u,l,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,o)}(e,sM(t.x)+i/2,sM(t.y)+i/2,sM(t.w)-i,sM(t.h)-i,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),o&&i&&(e.strokeStyle=o,e.lineWidth=i,e.lineJoin="miter",e.stroke()))}function dM(e,t,n){var r=e.shadowBlur,o=n.stroked,i=sM(n.x),a=sM(n.y),l=sM(n.w);o&&e.strokeText(t,i,a,l),n.filled&&(r&&o&&(e.shadowBlur=0),e.fillText(t,i,a,l),r&&o&&(e.shadowBlur=r))}var fM=function(e,t,n,r){var o=this;o._config=e,o._index=r,o._model=null,o._rects=null,o._ctx=t,o._el=n};aA(fM.prototype,{_modelize:function(e,t,n,r){var o,i=this,a=i._index,l=FC(NC([n.font,{}],r,a)),s=NC([n.color,hC.color],r,a);return{align:NC([n.align,"center"],r,a),anchor:NC([n.anchor,"center"],r,a),area:r.chart.chartArea,backgroundColor:NC([n.backgroundColor,null],r,a),borderColor:NC([n.borderColor,null],r,a),borderRadius:NC([n.borderRadius,0],r,a),borderWidth:NC([n.borderWidth,0],r,a),clamp:NC([n.clamp,!1],r,a),clip:NC([n.clip,!1],r,a),color:s,display:e,font:l,lines:t,offset:NC([n.offset,0],r,a),opacity:NC([n.opacity,1],r,a),origin:uM(i._el,r),padding:_C(NC([n.padding,0],r,a)),positioner:(o=i._el,o instanceof Dx?oM:o instanceof Nx?iM:o instanceof zx?aM:lM),rotation:NC([n.rotation,0],r,a)*(Math.PI/180),size:JP(i._ctx,t,l),textAlign:NC([n.textAlign,"start"],r,a),textShadowBlur:NC([n.textShadowBlur,0],r,a),textShadowColor:NC([n.textShadowColor,s],r,a),textStrokeColor:NC([n.textStrokeColor,s],r,a),textStrokeWidth:NC([n.textStrokeWidth,0],r,a)}},update:function(e){var t,n,r,o=this,i=null,a=null,l=o._index,s=o._config,u=NC([s.display,!0],e,l);u&&(t=e.dataset.data[l],(r=GO(n=XO(eA(s.formatter,[t,e]),t))?[]:YP(n)).length&&(a=function(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,o=e.size.width,i=-o/2,a=-r/2;return{frame:{x:i-n.left-t,y:a-n.top-t,w:o+n.width+2*t,h:r+n.height+2*t},text:{x:i,y:a,w:o,h:r}}}(i=o._modelize(u,r,s,e)))),o._model=i,o._rects=a},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n,r=e.ctx,o=this._model,i=this._rects;this.visible()&&(r.save(),o.clip&&(n=o.area,r.beginPath(),r.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),r.clip()),r.globalAlpha=XP(0,o.opacity,1),r.translate(sM(t.x),sM(t.y)),r.rotate(o.rotation),cM(r,i.frame,o),function(e,t,n,r){var o,i=r.textAlign,a=r.color,l=!!a,s=r.font,u=t.length,c=r.textStrokeColor,d=r.textStrokeWidth,f=c&&d;if(u&&(l||f))for(n=function(e,t,n){var r=n.lineHeight,o=e.w,i=e.x;return"center"===t?i+=o/2:"end"!==t&&"right"!==t||(i+=o),{h:r,w:o,x:i,y:e.y+r/2}}(n,i,s),e.font=s.string,e.textAlign=i,e.textBaseline="middle",e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,l&&(e.fillStyle=a),f&&(e.lineJoin="round",e.lineWidth=d,e.strokeStyle=c),o=0,u=t.length;o<u;++o)dM(e,t[o],{stroked:f,filled:l,w:n.w,x:n.x,y:n.y+n.h*o})}(r,o.lines,i.text,o),r.restore())}});var pM=Number.MIN_SAFE_INTEGER||-9007199254740991,hM=Number.MAX_SAFE_INTEGER||9007199254740991;function mM(e,t,n){var r=Math.cos(n),o=Math.sin(n),i=t.x,a=t.y;return{x:i+r*(e.x-i)-o*(e.y-a),y:a+o*(e.x-i)+r*(e.y-a)}}function gM(e,t){var n,r,o,i,a,l=hM,s=pM,u=t.origin;for(n=0;n<e.length;++n)o=(r=e[n]).x-u.x,i=r.y-u.y,a=t.vx*o+t.vy*i,l=Math.min(l,a),s=Math.max(s,a);return{min:l,max:s}}function yM(e,t){var n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/o,vy:(t.y-e.y)/o,origin:e,ln:o}}var bM=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};function vM(e,t,n){var r=t.positioner(e,t),o=r.vx,i=r.vy;if(!o&&!i)return{x:r.x,y:r.y};var a=n.w,l=n.h,s=t.rotation,u=Math.abs(a/2*Math.cos(s))+Math.abs(l/2*Math.sin(s)),c=Math.abs(a/2*Math.sin(s))+Math.abs(l/2*Math.cos(s)),d=1/Math.max(Math.abs(o),Math.abs(i));return u*=o*d,c*=i*d,u+=t.offset*o,c+=t.offset*i,{x:r.x+u,y:r.y+c}}aA(bM.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=t._rect;return!((e=mM(e,t.center(),-t._rotation)).x<n.x-1||e.y<n.y-1||e.x>n.x+n.w+2||e.y>n.y+n.h+2)},intersects:function(e){var t,n,r,o=this._points(),i=e._points(),a=[yM(o[0],o[1]),yM(o[0],o[3])];for(this._rotation!==e._rotation&&a.push(yM(i[0],i[1]),yM(i[0],i[3])),t=0;t<a.length;++t)if(n=gM(o,a[t]),r=gM(i,a[t]),n.max<r.min||r.max<n.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[mM({x:t.x,y:t.y},r,n),mM({x:t.x+t.w,y:t.y},r,n),mM({x:t.x+t.w,y:t.y+t.h},r,n),mM({x:t.x,y:t.y+t.h},r,n)]}});var SM={prepare:function(e){var t,n,r,o,i,a=[];for(t=0,r=e.length;t<r;++t)for(n=0,o=e[t].length;n<o;++n)i=e[t][n],a.push(i),i.$layout={_box:new bM,_hidable:!1,_visible:!0,_set:t,_idx:n};return a.sort((function(e,t){var n=e.$layout,r=t.$layout;return n._idx===r._idx?r._set-n._set:r._idx-n._idx})),this.update(a),a},update:function(e){var t,n,r,o,i,a=!1;for(t=0,n=e.length;t<n;++t)o=(r=e[t]).model(),(i=r.$layout)._hidable=o&&"auto"===o.display,i._visible=r.visible(),a|=i._hidable;a&&function(e){var t,n,r,o,i,a,l;for(t=0,n=e.length;t<n;++t)(o=(r=e[t]).$layout)._visible&&(l=new Proxy(r._el,{get:(e,t)=>e.getProps([t],!0)[t]}),i=r.geometry(),a=vM(l,r.model(),i),o._box.update(a,i,r.rotation()));(function(e,t){var n,r,o,i;for(n=e.length-1;n>=0;--n)for(o=e[n].$layout,r=n-1;r>=0&&o._visible;--r)(i=e[r].$layout)._visible&&o._box.intersects(i._box)&&t(o,i)})(e,(function(e,t){var n=e._hidable,r=t._hidable;n&&r||r?t._visible=!1:n&&(e._visible=!1)}))}(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if((r=e[n].$layout)&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,o,i,a,l;for(n=0,r=t.length;n<r;++n)(i=(o=t[n]).$layout)._visible&&(a=o.geometry(),l=vM(o._el,o.model(),a),i._box.update(l,a,o.rotation()),o.draw(e,l))}},EM={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:function(e){if(GO(e))return null;var t,n,r,o=e;if(KO(e))if(GO(e.label))if(GO(e.r))for(o="",r=0,n=(t=Object.keys(e)).length;r<n;++r)o+=(0!==r?", ":"")+t[r]+": "+e[t[r]];else o=e.r;else o=e.label;return""+o},labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},wM="$default";function OM(e,t,n){if(t){var r,o=n.$context,i=n.$groups;t[i._set]&&(r=t[i._set][i._key])&&!0===eA(r,[o])&&(e.$datalabels._dirty=!0,n.update(o))}}function AM(e,t){var n,r,o=e.$datalabels,i=o._listeners;if(i.enter||i.leave){if("mousemove"===t.type)r=SM.lookup(o._labels,t);else if("mouseout"!==t.type)return;n=o._hovered,o._hovered=r,function(e,t,n,r){var o,i;(n||r)&&(n?r?n!==r&&(i=o=!0):i=!0:o=!0,i&&OM(e,t.leave,n),o&&OM(e,t.enter,r))}(e,i,n,r)}}var CM={id:"datalabels",defaults:EM,beforeInit:function(e){e.$datalabels={_actives:[]}},beforeUpdate:function(e){var t=e.$datalabels;t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r,o,i,a,l,s,u,c,d=t.index,f=e.$datalabels,p=f._datasets[d]=[],h=e.isDatasetVisible(d),m=e.data.datasets[d],g=function(e,t){var n,r,o,i=e.datalabels,a=[];return!1===i?null:(!0===i&&(i={}),t=aA({},[t,i]),r=t.labels||{},o=Object.keys(r),delete t.labels,o.length?o.forEach((function(e){r[e]&&a.push(aA({},[t,r[e],{_key:e}]))})):a.push(t),n=a.reduce((function(e,t){return tA(t.listeners||{},(function(n,r){e[r]=e[r]||{},e[r][t._key||wM]=n})),delete t.listeners,e}),{}),{labels:a,listeners:n})}(m,n),y=t.meta.data||[],b=e.ctx;for(b.save(),r=0,i=y.length;r<i;++r)if((u=y[r]).$datalabels=[],h&&u&&e.getDataVisibility(r)&&!u.skip)for(o=0,a=g.labels.length;o<a;++o)s=(l=g.labels[o])._key,(c=new fM(l,b,u,r)).$groups={_set:d,_key:s||wM},c.$context={active:!1,chart:e,dataIndex:r,dataset:m,datasetIndex:d},c.update(c.$context),u.$datalabels.push(c),p.push(c);b.restore(),aA(f._listeners,g.listeners,{merger:function(e,n,r){n[e]=n[e]||{},n[e][t.index]=r[e],f._listened=!0}})},afterUpdate:function(e,t){e.$datalabels._labels=SM.prepare(e.$datalabels._datasets,t)},afterDatasetsDraw:function(e){SM.draw(e,e.$datalabels._labels)},beforeEvent:function(e,t){if(e.$datalabels._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":AM(e,n);break;case"click":!function(e,t){var n=e.$datalabels,r=n._listeners.click,o=r&&SM.lookup(n._labels,t);o&&OM(e,r,o)}(e,n)}}},afterEvent:function(e){var t,n,r,o,i,a,l,s=e.$datalabels,u=s._actives,c=s._actives=e.getActiveElements(),d=ZP(u,c);for(t=0,n=d.length;t<n;++t)if((i=d[t])[1])for(r=0,o=(l=i[0].element.$datalabels||[]).length;r<o;++r)(a=l[r]).$context.active=1===i[1],a.update(a.$context);(s._dirty||d.length)&&(SM.update(s._labels),e.render()),delete s._dirty}};const TM=CM;var DM=["data","captions","tooltips","formatter","tooltipFormatter","options"];function xM(){return xM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xM.apply(this,arguments)}function PM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PM(Object(n),!0).forEach((function(t){IM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function IM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RM(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function LM(e){var t=e.data,n=e.captions,r=void 0!==n&&n,o=e.tooltips,i=void 0===o||o,a=e.formatter,l=void 0===a?function(e){return e}:a,s=e.tooltipFormatter,u=void 0===s?function(e){return e.value}:s,c=e.options,d=void 0===c?{}:c,f=RM(e,DM),p=t.datasets.every((function(e){return e.data.every((function(e){return 0===e}))})),h={data:{datasets:t.datasets.map((function(e){return MM(MM({},lO),e)}))},options:MM({layout:cO,plugins:{tooltip:MM(MM({},sO),{},{enabled:i,callbacks:{label:u}}),datalabels:MM(MM({},uO),{},{display:r,formatter:l})}},d),plugins:[TM]},m={data:{datasets:[{label:"empty",data:[100],labels:["No data"],backgroundColor:["#ffffff"],borderColor:"#dddddd",borderWidth:2}]},options:MM({layout:cO,plugins:{datalabels:{display:!1},tooltip:{enabled:!1}}},d)},g=p?m:h;return $().createElement("div",xM({className:"charts-pie-container"},f),$().createElement($P,xM({plugins:[TM]},g)))}function kM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _M(e,t,n,r){var o="".concat("v1/report","/rollout/").concat(e);return null!==n&&(o+="/".concat(n)),t&&(o+="?status=".concat(t.toUpperCase())),Es(Ov.report(e,n,t),o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kM(Object(n),!0).forEach((function(t){jM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enabled:"number"===typeof e&&(null!==t||null!==n)},r))}function FM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return NM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NM(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BM(e){var t=e.rolloutId,n=e.groupId,r=e.data,o=Ut(),i=FM((0,G.useState)(null),2),a=i[0],l=i[1],s=FM((0,G.useState)(!1),2),u=s[0],c=s[1],d=_M(t,(null===a||void 0===a?void 0:a.parent)||null,n),f=d.data,p=d.refetch,h=d.isFetching,m=d.isLoading,g=d.error,y=d.remove,b=(0,G.useCallback)((function(e){if(a){var n=a.index===UM,r=function(e,t){var n=[];return e.forEach((function(e){Object.keys(e.targetsPerStatus).forEach((function(r){Object.keys(e.targetsPerStatus[r]).forEach((function(o){t&&o!==t||e.targetsPerStatus[r][o].forEach((function(e){n.push([e,r,o])}))}))}))})),n.sort((function(e,t){var n=tS(e,1)[0],r=tS(t,1)[0];return n>r?1:n<r?-1:0})).reduce((function(e,t){return"".concat(e).concat(t.join(","),"\n")}),'"controller id",status,"status code"\n').trim()}(function(e){return"number"===typeof e.groupId}(e)?[e]:e.groupReports,n?null:a.code);!function(e,t){var n=new Blob([t],{type:"text/csv;charset=utf-8;"});(0,Xy.saveAs)(n,"".concat(e,".csv"))}("rollout-".concat(t,"-").concat(a.parent).concat(n?"":"-".concat(a.code)),r),l(null),y()}}),[t,a,y]);(0,G.useEffect)((function(){a&&p()}),[a,p]),(0,G.useEffect)((function(){f&&!m&&!h&&a&&b(f)}),[f,b,a,m,h]),(0,G.useEffect)((function(){g&&c(!0)}),[g]);var v=(0,G.useMemo)((function(){var e=0;return Object.keys(r).map((function(t){var n={count:r[t].data.length,name:o(gl[t]),startIndex:e,defaultCollapsed:!0,hideCount:!0};return e+=n.count,n}))}),[o,r]),S=(0,G.useMemo)((function(){return Object.keys(r).flatMap((function(e){var t=r[e];return t.data.map((function(n,r){var i=t.labels[r];return!r&&t.data.length>1&&(i=o("Global.Label.All")),{index:r,status:"",code:t.labels[r],cellContent:i,targets:n,download:"",parent:e}}))}))}),[o,r]);return $().createElement($().Fragment,null,$().createElement(tn.Dialog,{onClose:function(e){return e.stopPropagation()},isOpen:u,dialogHeader:$().createElement(tn.DialogHeader,{variant:"error",title:o("Rollout.Insights.Table.Download.Error"),onCloseBtnClick:function(){return c(!1)}})},$().createElement(Ft.Notification,{type:"error"},$().createElement("span",null,null===g||void 0===g?void 0:g.message))),$().createElement("div",{className:"rollout-insights-table"},$().createElement(Ft.DataList,{columns:[{fieldName:"status",header:o("Rollout.Insights.Table.Status")},{fieldName:"code",header:o("Rollout.Insights.Table.Code"),renderCell:function(e){return e.cellContent}},{fieldName:"targets",header:o("Rollout.Insights.Table.Targets")},{fieldName:"download",header:"",cellStyle:{textAlign:"right"},renderCell:function(e){return $().createElement(Ft.Button,{title:o("Rollout.Insights.Table.Download"),icon:"download",mode:"integrated",onClick:function(){l(e)},disabled:h})}}],groups:v,items:S,hideCheckBoxes:!0})))}Ex.defaults.borderColor="#36A2EB",Ex.register(Dx,zx,RP,_P,Nx,_x,hP,PP,fP,sP);var UM=0;function HM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||qM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VM(e){return function(e){if(Array.isArray(e))return WM(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qM(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qM(e,t){if(e){if("string"===typeof e)return WM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?WM(e,t):void 0}}function WM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zM="",QM="";function GM(e){var t=e.selectedStatus,n=e.selectedGroupId,r=e.groups,o=e.onFilterChange,i=Ut(),a=(0,G.useMemo)((function(){return[{value:zM,name:i("Global.Label.All")}].concat(VM(Object.entries(gl).map((function(e){var t=HM(e,2),n=t[0],r=t[1];return{value:n,name:i(r)}}))))}),[i]),l=(0,G.useMemo)((function(){return[{value:QM,name:i("Global.Label.All")}].concat(VM(r.map((function(e){return{value:e.id,name:e.name}}))))}),[i,r]),s=(0,G.useCallback)((function(e){o({status:Kv(e.target.value)?e.target.value:null,groupId:n})}),[o,n]),u=(0,G.useCallback)((function(e){var n=e.target.value;o({groupId:n?parseInt(n,10):null,status:t})}),[o,t]);return $().createElement($().Fragment,null,$().createElement("div",{className:"rollout-insights__filter"},$().createElement(Ft.Dropdown,{id:"rolloutInsightsChartStatusFilter",label:i("Global.Label.Status"),options:a,value:null!==t&&void 0!==t?t:zM,onChange:s}),$().createElement(Ft.Dropdown,{id:"rolloutInsightsDeploymentGroup",label:i("Rollout.Insights.Group.Label"),options:l,value:null!==n&&void 0!==n?n:QM,onChange:u})))}function $M(e){return function(e){if(Array.isArray(e))return JM(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||YM(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||YM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YM(e,t){if(e){if("string"===typeof e)return JM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JM(e,t):void 0}}function JM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function XM(e){var t=e.rolloutId,n=e.status,r=e.groupId,o=e.deploymentGroups,i=e.insights,a=e.onFilterChange,l=Ut(),s=KM((0,G.useState)([]),2),u=s[0],c=s[1],d=(0,G.useCallback)((function(e){c((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat($M(t),[e])}))}),[c]),f=(0,G.useMemo)((function(){return tI(l,r?i.targetsPerStatusAndCode:i.groupInsights.reduce((function(e,t){return Object.keys(t.targetsPerStatusAndCode).forEach((function(n){e[n]||(e[n]={}),Object.entries(t.targetsPerStatusAndCode[n]).forEach((function(t){var r=tS(t,2),o=r[0],i=r[1];e[n][o]||(e[n][o]=0),e[n][o]+=i}))})),e}),{}),u)}),[l,r,i,u]),p=f.legends,h=f.chartDatasets,m=f.tableDatasets;return $().createElement($().Fragment,null,$().createElement(GM,{selectedStatus:n,selectedGroupId:r,groups:o,onFilterChange:a}),p.labels.length>0&&$().createElement("div",{className:"rollout-pie-chart"},$().createElement(dO,{values:p.data,legends:p.labels,colors:p.backgroundColor,action:d,hidden:u,labels:{show:l("Rollout.Insights.Pie.Legends.Show"),hide:l("Rollout.Insights.Pie.Legends.Hide")}}),u.length===p.labels.length&&$().createElement("div",null,$().createElement("label",null,l("Rollout.Insights.Pie.Legends.AllDataHidden"))),$().createElement(LM,{data:h,tooltipFormatter:function(e){var t=eI(e.dataset.data);return[e.dataset.labels[e.dataIndex],"(".concat(Math.round(t[e.dataIndex]),"%)")]},formatter:function(e,t){var n=0===t.datasetIndex?5:15,r=eI(t.dataset.data);return r[t.dataIndex]>n?[t.dataset.labels[t.dataIndex],"(".concat(Math.round(r[t.dataIndex]),"%)")]:""},captions:!0})),$().createElement(BM,{rolloutId:t,groupId:r,data:m}))}var ZM={finished:Yw,running:Xw,canceled:oO,canceling:oO,cancel_rejected:["#340731","#440c41","#551151","#671761"],scheduled:tO,error:$w,warning:eO,download:rO,downloaded:rO,wait_for_confirmation:["#410000","#540001","#680001","#7d0002"]},eI=function(e){var t=e.reduce((function(e,t){return e+t}),0);return e.map((function(e){return 0===t?0:e/t*100}))},tI=function(e,t,n){var r={data:[],backgroundColor:[],labels:[]},o={data:[],backgroundColor:[],labels:[]},i={data:[],backgroundColor:[],labels:[]},a={},l=Object.keys(t).reduce((function(e,n){return e[n.toLowerCase()]=t[n],e}),{});return Object.keys(l).forEach((function(t,s){var u,c=0,d=l[t];a[t]={data:[],labels:[]};var f,p=a[t];(Object.keys(d).forEach((function(e,r){var i;n.includes(s)||(o.data.push(d[e]),null===(i=o.backgroundColor)||void 0===i||i.push(ZM[t][r]),o.labels.push("".concat(e,": ").concat(d[e])));c+=d[e],p.data.push(d[e]),p.labels.push(e)})),p.data.length>1&&(p.data.unshift(c),p.labels.unshift(e(gl[t]))),n.includes(s))||(r.data.push(c),null===(f=r.backgroundColor)||void 0===f||f.push(ZM[t][3]),r.labels.push("".concat(e(gl[t]),": ").concat(c)));i.data.push(c),null===(u=i.backgroundColor)||void 0===u||u.push(ZM[t][3]),i.labels.push(e(gl[t]))})),{chartDatasets:{datasets:[o,r]},legends:i,tableDatasets:a}};function nI(){var e=vv(),t=Iw().data,n=(0,G.useMemo)((function(){var e;return null!==(e=null===t||void 0===t?void 0:t.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:rI}),[t]),r=Ew(),o=r.data,i=r.error,a=r.isLoading,l=r.rolloutId,s=r.reportedStatus,u=r.groupId;return i?$().createElement(tn.ErrorState,{error:i}):a?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"rollout-insights-loading"})):$().createElement(XM,{rolloutId:l,status:s,groupId:u,deploymentGroups:n,insights:o,onFilterChange:function(t){e.withInsights(t.status,t.groupId)}})}nI.displayName="RolloutInsightsBlade",nI.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("RolloutInsightsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("RolloutInsightsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Qw}))))};var rI=[];function oI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oI(Object(n),!0).forEach((function(t){aI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return sI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sI(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uI={component:AS,name:AS.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:900,header:$().createElement(AS.Header,null),showCloseButton:!1,collapsed:!1}},cI={component:qS,name:qS.displayName,open:!0,defaults:{fluid:!1,active:!0,initialWidth:350,header:$().createElement(qS.Header,null),collapsed:!1}},dI={component:zw,name:zw.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:800,header:$().createElement(zw.Header,null),collapsed:!1}},fI={component:nI,name:nI.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:600,header:$().createElement(nI.Header,null),collapsed:!1}},pI=Object.freeze({component:rw,name:rw.displayName,open:!0,defaults:Object.freeze({active:!1,initialWidth:400,header:$().createElement(rw.Header,null),showMinButton:!1,showMaxButton:!1,onClose:function(){}})}),hI=Object.freeze({component:nw,name:nw.displayName,open:!0,defaults:Object.freeze({fluid:!0,active:!0,initialWidth:600,header:$().createElement(nw.Header,null),showMinButton:!1,showMaxButton:!1,showCloseButton:!1})});var mI=function(){var e=(0,ki.useParams)().actionOrId,t=lI((0,ki.useSearchParams)(),1)[0],n=vv(),r=(0,G.useMemo)((function(){return iI(iI({},uI),{},{defaults:iI({},uI.defaults)})}),[]),o=(0,G.useMemo)((function(){var o=[iI(iI({},r),{},{defaults:iI({},r.defaults)}),iI(iI({},cI),{},{defaults:iI(iI({},cI.defaults),{},{onClose:function(){return n.toHome()}})}),iI(iI({},dI),{},{defaults:iI(iI({},dI.defaults),{},{onClose:function(){return n.toHome()}})})];return"new"===e?[iI(iI({},pI),{},{defaults:iI(iI({},pI.defaults),{},{onClose:function(){return n.toHome()}})}),hI]:e?t.has(pv)?[].concat(o,[iI(iI({},fI),{},{defaults:iI(iI({},fI.defaults),{},{onClose:function(){n.closeInsights()}})})]):o:[r]}),[t,n,e,r]);return $().createElement(Ft.Blades,{registrations:o,settings:{resizable:!0}})},gI="SoftwareModuleTypeAddModal",yI="SoftwareModuleTypeUpdateModal";function bI(e){return function(e){if(Array.isArray(e))return EI(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||SI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SI(e,t){if(e){if("string"===typeof e)return EI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?EI(e,t):void 0}}function EI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wI="software-module-types";function OI(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.searchColumns,i=e.searchKey,a=e.selectedId,l=e.fetchMoreData,s=e.onSearchChange,u=e.onSearchKeyChange,c=e.onRefresh,d=e.onSelect,f=Ut(),p=Ht(),h=function(){var e=Ut();return(0,G.useMemo)((function(){return[Ea(e("Entity.Label.ID"),"id"),Ea(e("Entity.Label.Name"),"name",{isDefault:!0}),Ea(e("Entity.Label.Description"),"description",{isDefault:!0}),Ea(e("SoftwareModuleTypes.List.Key"),"key")].concat(bI(qp(e)),[wa(e("SoftwareModuleTypes.List.DeletedFlag"),"deleted",e)])}),[e])}(),m=vI((0,G.useState)(h),2),g=m[0],y=m[1],b=(0,G.useCallback)((function(){var e=p(gI,{onCancel:function(){return e()}})}),[p]),v=(0,G.useMemo)((function(){return t.find((function(e){return e.id===a}))}),[t,a]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,onRefresh:c,refreshDisabled:r,columnSelectorProps:{allColumns:h,onColumnSelectionChange:y,typeName:wI},content:$().createElement(hs,{keyedSearchId:"".concat(wI,"-search"),keys:o,searchKey:i,onSearchChange:s,onSearchKeyChange:u}),mainAction:$().createElement(Ft.Button,{title:f("SoftwareModuleTypes.Add"),icon:"add",mode:"integrated",onClick:b})}),$().createElement(Ft.DataList,{items:t,columns:g,selected:v,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:f("SoftwareModuleTypes.List.Empty"),onScrollToBottom:l,onSelect:function(e){return null===d||void 0===d?void 0:d(e.id)}},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"software-module-types-list-loading"})))}function AI(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(Ha())},toDetails:function(t){e(Ha(t))}}}(e)}),[e])}const CI=l.p+"static/SoftwareModuleTypesList.bd53e9e6.md";function TI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return DI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DI(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xI={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description","SoftwareModuleTypes.List.Key":"key"};function PI(){var e=AI(),t=(0,ki.useParams)().id,n=t?parseInt(t,10):void 0,r=TI((0,G.useState)("Entity.Label.Name"),2),o=r[0],i=r[1],a=TI((0,G.useState)(),2),l=a[0],s=a[1],u=Mi({sort:"name:ASC",q:Ms(Hi().currentFilter,[xI[o]],l)}),c=u.data,d=u.isLoading,f=u.isFetchingNextPage,p=u.error,h=u.fetchNextPage,m=ue(),g=(0,G.useCallback)((function(e){l!==e&&s(e)}),[l]);if(p)return $().createElement(tn.ErrorState,{error:p});var y=Dn(c),b=y.entities,v=y.totalCount;return $().createElement(OI,{data:b,totalCount:v,loadingData:d||f,selectedId:n,searchColumns:Object.keys(xI),searchKey:o,fetchMoreData:h,onRefresh:function(){m.resetQueries({queryKey:xi.lists()}).catch(console.error)},onSearchKeyChange:function(e){return i(e)},onSearchChange:g,onSelect:function(t){e.toDetails(t)}})}function MI(e){var t=e.data,n=Ut(),r=t.id,o=t.key,i=t.name,a=t.description,l=t.maxAssignments,s=t.createdAt,u=t.createdBy,c=t.lastModifiedAt,d=t.lastModifiedBy;return $().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.ID"),value:r.toString()}),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Key"),value:o}),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Name"),value:i}),a&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},a),$().createElement(tn.LabelledSection,{header:n("SoftwareModuleTypes.Label.AssignmentType"),value:n(1===l?"SoftwareModuleTypes.Label.Firmware":"SoftwareModuleTypes.Label.Software")}),$().createElement(Ep,{createdAt:s,createdBy:u,lastModifiedAt:c,lastModifiedBy:d}))}PI.displayName="SoftwareModuleTypesListBlade",PI.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("SoftwareModuleTypes.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("SoftwareModuleTypes.ListBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:CI})))};var II=["showConfirmation"];function RI(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function LI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return kI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kI(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jI(e){var t=e.smType,n=Ut(),r=function(e){var t=Ut(),n=AI(),r=ue(),o=sr("".concat(bi,"/").concat(e.id),{headline:t("SoftwareModuleType.DeleteConfirmation.Header"),message:t("SoftwareModuleType.DeleteConfirmation.Message"),entityText:e.name,successMessage:t("SoftwareModuleType.DeleteSuccess.Message")},{mutationKey:[xi.delete(e.id)],onSuccess:function(){r.resetQueries(xi.lists())}}),i=o.showConfirmation,a=RI(o,II);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),o=LI(r,2),i=o[0],a=o[1],l=Ht();return $().createElement($().Fragment,null,$().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n("SoftwareModuleType.Actions.Title")},$().createElement(Ft.MenuItem,{label:n("Button.Edit"),icon:"edit",onClick:function(){return l(yI,{initialEntry:t})},title:n("SoftwareModuleType.Actions.Edit.Tooltip")}),$().createElement(Ft.MenuItem,{label:n("Button.Delete"),icon:"delete",onClick:i,title:n("SoftwareModuleType.Actions.Delete.Tooltip"),disabled:a.isLoading})))}const _I=l.p+"static/SoftwareModuleTypesDetails.5acd0183.md";function FI(){var e=(0,ki.useParams)().id,t=function(e){return Es(xi.smtDetails(e),"".concat(bi,"/").concat(e),{enabled:"number"===typeof e})}(e?parseInt(e,10):void 0),n=t.data,r=t.isLoading,o=t.error;return o?$().createElement(tn.ErrorState,{error:o}):r?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(jI,{smType:n}),$().createElement(MI,{data:n}))}function NI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function BI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NI(Object(n),!0).forEach((function(t){UI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}FI.displayName="SoftwareModuleTypesDetailsBlade",FI.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("SoftwareModuleTypes.DetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("SoftwareModuleTypes.DetailsBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:_I})))};var HI={component:PI,name:PI.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(PI.Header,null),showCloseButton:!1}},VI={component:FI,name:FI.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(FI.Header,null)}};var qI=function(){var e=AI(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[HI,BI(BI({},VI),{},{defaults:BI(BI({},VI.defaults),{},{onClose:e.toHome})})]:[HI]}),[t,e.toHome]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};function WI(e){var t=(0,e.i18n)("SoftwareModules.List.IsEncrypted");return $().createElement(Ft.Icon,{role:"img",title:t,iconName:"lock-closed",className:"encryption-status-active"})}function zI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return QI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QI(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GI(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.searchKey,i=e.searchColumns,a=e.fetchMoreData,l=e.refreshData,s=e.onSearchChange,u=e.onSearchKeyChange,c=e.onSortQueryChange,d=(0,tn.useFocusRef)(),f=Ut(),p=Ht(),h=(0,ki.useParams)().id,m=Db(),g=(0,G.useMemo)((function(){return function(e){var t={isDefault:!0,isSortable:!0},n={isSortable:!0};return[Ta(e("SoftwareModules.List.Encrypted"),"encrypted",$().createElement(WI,{i18n:e}),!1),Ta(e("SoftwareModules.Label.Locked"),"locked",$().createElement(Ft.Icon,{iconName:"lock-closed",title:e("SoftwareModules.IconTooltip.Locked")}),!0),Ea(e("Entity.Label.ID"),"id",n),Ea(e("Entity.Label.Name"),"name",t),Ea(e("Entity.Label.Version"),"version",t),Ea(e("Entity.Label.Type"),"type",t),Ea(e("SoftwareModules.List.Vendor"),"vendor"),Ea(e("Entity.Label.Description"),"description",n),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}(f)}),[f]),y=zI((0,G.useState)(g),2),b=y[0],v=y[1],S=zI((0,G.useState)(g),2),E=S[0],w=S[1];Er(b,c);var O=(0,tn.useSortableColumns)(b,v),A=O.sortColumn,C=O.isSortingMultipleColumns,T=O.setIsSortingMultipleColumns,D=O.resetSorting,x=(0,G.useMemo)((function(){return gs(A)}),[A]);var P=(0,G.useCallback)((function(){var e=p(Lt,{onCancel:function(){return e()},onSuccess:function(t){e(),l(),m.toDetails(t.id)}})}),[l,m,p]);return $().createElement(tn.FlexibleColumnWrapper,{onKeyUp:function(e){"Insert"===e.key&&P()}},$().createElement(Zl,{count:n,onRefresh:function(){return l()},refreshDisabled:r,content:$().createElement($().Fragment,null,$().createElement(hs,{keyedSearchId:"softwaremodule-list-search",keys:i,searchKey:o,onSearchChange:s,onSearchKeyChange:u}),$().createElement(Ft.Button,{title:f("Button.Filter"),icon:"filter",label:f("Button.Filter"),mode:"integrated",onClick:function(){var e=p(jt,{onClose:function(){return e()}})}}),$().createElement(xs,{labels:{type:"Entity.Label.Type"},multiSelectionFields:{type:As.OR}})),mainAction:$().createElement($().Fragment,null,$().createElement(Ml,{typeName:"softwaremodules",allColumns:b,onColumnSelectionChange:w,multiSortProps:{isMultiSort:C,onToggleMultiSort:function(e){T(e),D()}}}),$().createElement(Ft.Button,{ref:d,title:f("SoftwareModules.Add"),icon:"add",mode:"integrated",onClick:function(){P()}}))}),$().createElement(Ft.DataList,{items:t,columns:E,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:f("SoftwareModules.List.Empty"),onSelect:function(e){m.toDetails(e.id)},selected:t.find((function(e){return h&&e.id===parseInt(h,10)})),onScrollToBottom:function(){return a()},onRenderColumnHeader:x},r&&$().createElement(tn.InlineLoadingIndicator,null)))}const $I=l.p+"static/SoftwareModulesList.2a012726.md";function KI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JI(e,t){return Fn(Ci.list(e),yi,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KI(Object(n),!0).forEach((function(t){YI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),t)}function XI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ZI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZI(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eR={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Version":"version","Entity.Label.Description":"description","Entity.Label.Type":"type"};function tR(){var e=XI((0,G.useState)(),2),t=e[0],n=e[1],r=XI((0,G.useState)(),2),o=r[0],i=r[1],a=XI((0,G.useState)("Entity.Label.Name"),2),l=a[0],s=a[1],u=JI({sort:t,q:Ms(Hi().currentFilter,[eR[l]],o,{type:As.OR})}),c=u.data,d=u.isLoading,f=u.error,p=u.fetchNextPage,h=u.isFetchingNextPage,m=ue();if(f)return $().createElement(tn.ErrorState,{error:f});var g=Dn(c),y=g.totalCount,b=g.entities;return $().createElement(GI,{data:b,totalCount:y||0,loadingData:d||h,searchKey:l,searchColumns:Object.keys(eR),fetchMoreData:p,refreshData:function(){m.resetQueries({queryKey:Ci.lists()})},onSearchChange:function(e){if(o!==e){var t=e&&e.length>0?e:void 0;i(t)}},onSearchKeyChange:function(e){return s(e)},onSortQueryChange:n})}function nR(e){var t=e.softwareModuleId,n=Ut(),r=hm({q:"module.id==".concat(t)}),o=r.data,i=r.isLoading,a=r.error,l=r.fetchNextPage,s=r.isFetchingNextPage,u=Dn(o),c=u.totalCount,d=u.entities,f=(0,G.useMemo)((function(){return[{header:n("Entity.Label.Name"),fieldName:"name",cellStyle:{overflow:"hidden"},renderCell:function(e){return $().createElement(Ya,{id:e.id,name:e.name})},resolveCellTitle:function(e){return e.name}},{header:n("Entity.Label.Version"),fieldName:"version"},{header:n("Entity.Label.Type"),fieldName:"type"}]}),[n]);return $().createElement("div",{style:{width:"100%"}},a?$().createElement(tn.ErrorState,{error:a}):$().createElement($().Fragment,null,c>0&&$().createElement(tn.Margin,{aligned:["top","bottom"]},$().createElement(Ft.CommandBar,{content:n("Entity.Total",{count:c})})),$().createElement("div",{className:"unsetHeight"},$().createElement(Ft.DataList,{items:d,columns:f,emptyStateMessage:n("SoftwareModuleDetailsView.DistributionSets.Empty"),onScrollToBottom:l,enableScrolling:!0,hideCheckBoxes:!0},(i||s)&&$().createElement(tn.InlineLoadingIndicator,null)))))}tR.displayName="SoftwareModulesListBlade",tR.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("SoftwareModuleListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("SoftwareModuleListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:$I}))))};const rR=l.p+"static/SoftwareModuleMetaData.2a871a0d.md",oR=l.p+"static/SoftwareModuleAssignedDS.de023af5.md";function iR(e){var t=e.softwareModule,n=Ut(),r=null!==t&&void 0!==t?t:{},o=r.id,i=r.name,a=r.version,l=r.type,s=r.vendor,u=r.description,c=r.encrypted,d=r.locked;return $().createElement($().Fragment,null,t&&$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},o&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.ID"),value:"".concat(o)},$().createElement("div",{className:"keep-actions-space"},o)),i&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Name"),value:i},$().createElement("div",{className:"keep-actions-space"},i)),a&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Version"),value:a},a),l&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Type")},l),s&&$().createElement(tn.LabelledSection,{header:n("SoftwareModuleDetailsView.Vendor")},s),$().createElement(tn.LabelledSection,{header:n("SoftwareModules.Label.Locked")},n(d?"Global.Yes":"Global.No")),u&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},u),$().createElement(Ep,r),$().createElement(tn.LabelledSection,{header:n("SoftwareModuleDetailsView.Encryption")},n(c?"SoftwareModuleDetailsView.Encryption.Enabled":"SoftwareModuleDetailsView.Encryption.Disabled")),$().createElement(Ft.Divider,null),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:n("SoftwareModuleDetailsView.DistributionSets"),popoverHeading:n("SoftwareModuleDetailsView.DistributionSets"),help:$().createElement(tn.Documentation,{markdownFilePath:oR}),expandable:!0},$().createElement(nR,{softwareModuleId:t.id}))),$().createElement(Ft.Divider,null),$().createElement(tn.LabelledSection,{header:n("Entity.Label.Metadata"),expandable:!0,expanded:!1,popoverHeading:n("Entity.Label.Metadata"),help:$().createElement(tn.Documentation,{markdownFilePath:rR})},$().createElement(Hm,{entityId:t.id,supportsTargetVisible:!0,stateConfig:aR}))))}var aR={read:[function(e){return"".concat(yi,"/").concat(e,"/metadata")},Ci.metadataList],create:[function(e){return"".concat(yi,"/").concat(e,"/metadata")},Ci.metadataAdd],update:[function(e,t){return"".concat(yi,"/").concat(e,"/metadata/").concat(t)},Ci.metadataUpdate],delete:[function(e,t){return"".concat(yi,"/").concat(e,"/metadata/").concat(t)},Ci.metadataDelete]},lR=["showConfirmation"];function sR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function uR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return cR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cR(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dR(e){var t=e.softwareModule,n=e.updateSoftwareModule,r=Ut(),o=Ht(),i=Vt(),a=function(e){var t=Ut(),n=Db(),r=ue(),o=sr("".concat(yi,"/").concat(e.id),{headline:t("SoftwareModuleDeleteModal.Header"),message:t("SoftwareModuleDeleteModal.Message"),entityText:t("SoftwareModuleDeleteModal.ListItem",{softwareModule:e.name,version:e.version,type:e.type}),successMessage:t("SoftwareModuleDeleteModal.SuccessMessage")},{mutationKey:[Ci.delete(e.id)],onSuccess:function(){r.resetQueries(Ci.lists())}}),i=o.showConfirmation,a=sR(o,lR);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),l=uR(a,2),s=l[0],u=l[1],c={onSuccess:function(){i(r("SoftwareModuleEditModal.SuccessMessage"))}};return $().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:r("SoftwareModuleDetailsActions.ContextMenu.Title")},$().createElement(Ft.MenuItem,{label:r("Button.Edit"),icon:"edit",onClick:function(){var e=o(kt,{onCancel:function(){return e()},onSuccess:function(){return e()},toUpdate:t})},title:r("SoftwareModules.Edit")}),t.locked?$().createElement(Ft.MenuItem,{label:r("SoftwareModuleDetailsActions.Unlock.Label"),icon:"lock-open",onClick:function(){return n({locked:!1},c)},title:r("SoftwareModuleDetailsActions.Unlock.Tooltip"),disabled:u.isLoading}):$().createElement(Ft.MenuItem,{label:r("SoftwareModuleDetailsActions.Lock.Label"),icon:"lock-closed",onClick:function(){return n({locked:!0},c)},title:r("SoftwareModuleDetailsActions.Lock.Tooltip"),disabled:u.isLoading}),$().createElement(Ft.MenuItem,{label:r("Button.Delete"),icon:"delete",onClick:s,title:r("SoftwareModuleDetailsActions.Delete.Tooltip"),disabled:u.isLoading}))}function fR(e){var t=e.error,n=e.isLoading,r=e.isSuccess,o=e.softwareModule,i=Ut(),a=(0,tn.useDialog)(),l=a.isDialogOpen,s=a.closeDialog,u=a.showDialog;return(0,G.useEffect)((function(){n&&u()}),[n,u]),(0,G.useEffect)((function(){r&&s()}),[r,s]),$().createElement(tn.Dialog,{isOpen:l,onCancel:s,onClose:function(e){return e.stopPropagation()},id:"software-module_lock-dialog",variant:t?"error":"info",dialogHeader:$().createElement(tn.DialogHeader,{variant:t?"error":"info",title:o.locked?i("SoftwareModuleDialog.Header.Unlock"):i("SoftwareModuleDialog.Header.Lock"),onCloseBtnClick:s}),dialogFooter:$().createElement(tn.BasicDialogControls,{closeBtnLabel:i("Button.Close"),onCloseBtnClick:s})},n&&$().createElement(Ft.ActivityIndicator,null),t&&$().createElement(tn.ErrorState,{error:t}))}const pR=l.p+"static/SoftwareModuleDetails.d0535014.md";function hR(e){return Es(Ci.softwareModulesDetails(e),"".concat(yi,"/").concat(e),{enabled:"number"===typeof e})}function mR(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):-1,n=hR(t),r=n.data,o=n.isLoading,i=n.error,a=Ri(t);return i?$().createElement(tn.ErrorState,{error:i}):o?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(fR,{isLoading:a.isLoading,isSuccess:a.isSuccess,softwareModule:r}),$().createElement(dR,{softwareModule:r,updateSoftwareModule:a.mutate}),$().createElement(iR,{softwareModule:r}))}mR.displayName="SoftwareModuleDetailsBlade",mR.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("SoftwareModuleDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("SoftwareModuleDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:pR}))))};const gR=l.p+"static/SoftwareModuleArtifacts.c1718654.md";var yR={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},bR={display:"flex",alignItems:"center",justifyContent:"center"},vR=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function SR(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("number"!==typeof e)return"0 ".concat(vR[0]);var n=Math.floor(Math.log(e)/Math.log(1e3));return(e/Math.pow(1e3,n)).toFixed(t)+" "+vR[n]}(e.bytes,e.fractionDigits);return t?$().createElement("div",{style:yR,"aria-label":t},t):null}function ER(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ER(Object(n),!0).forEach((function(t){OR(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ER(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AR(e){var t=e.text;return t?$().createElement("div",{style:bR},$().createElement("div",{style:wR({flex:1},yR)},t),$().createElement(tn.CopyToClipButton,{value:t})):null}var CR=["showConfirmation"];function TR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function DR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return xR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xR(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PR(e){var t=e.artifact,n=e.isLocked,r=Ut(),o=(0,ki.useParams)().id,i=o?parseInt(o,10):void 0,a=function(e,t){var n=Ut(),r=Ht(),o=Bt(),i=Nt().state.shell;return function a(){var l=r("progress",{message:n("SoftwareModule.Artifacts.Download.Progress.DialogMessage"),noCancel:!0}),s=i.resolveMgmtApiUrl(yi,e+"","artifacts",t.id+"","download");o.get("".concat(s),{responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},timeout:36e5}).then((function(e){(0,Xy.saveAs)(new File([e.data],t.providedFilename))})).catch((function(e){var o=new vn(e,n),i=r("confirm",{variant:"error",headline:n("SoftwareModule.Artifacts.Download.Error.DialogHeadline"),message:n("SoftwareModule.Artifacts.Download.Error.DialogMessage",{artifactName:t.providedFilename,error:$().createElement(Zy,{error:o})}),confirmLabel:n("Button.Retry"),confirmButtonPrimary:!1,onConfirm:function(){i(),a()},onClose:function(){return i()}})})).finally((function(){l()}))}}(i,t),l=function(e,t){var n=Ut(),r=ue(),o=sr("".concat(yi,"/").concat(e,"/artifacts/").concat(t.id),{headline:n("SoftwareModule.Artifacts.DeleteModal.Header"),message:n("SoftwareModule.Artifacts.DeleteModal.Message"),entityText:t.providedFilename,confirmLabel:n("SoftwareModule.Artifacts.DeleteModal.Delete"),successMessage:n("SoftwareModule.Artifacts.Deleted")},{mutationKey:[Ci.artifactsDelete(e)],onSuccess:function(){r.resetQueries(Ci.artifacts(e))}});return[o.showConfirmation,TR(o,CR)]}(i,t),s=DR(l,2),u=s[0],c=s[1];return $().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"options",style:{padding:"0"}}}),title:r("SoftwareModule.Artifacts.Actions"),popover:{position:"bottom-right",triggerOffset:8},style:{display:"inline"}},$().createElement(tn.ContextActionMenuItem,{title:r("SoftwareModule.Artifacts.Actions.Delete"),icon:"delete",onClick:u,disabled:c.isLoading||n}),$().createElement(tn.ContextActionMenuItem,{title:r("SoftwareModule.Artifacts.Actions.Download"),icon:"download",onClick:function(){i&&a()}}))}function MR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return IR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IR(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RR(e){var t=e.data,n=e.loadingData,r=e.addingArtifact,o=e.isLocked,i=void 0===o||o,a=e.onAdd,l=Ut(),s=(0,G.useMemo)((function(){return function(e,t){return[{data:{columnId:"filename",isDefault:!0},header:e("SoftwareModule.Artifacts.Filename"),resolveCellTitle:function(e){return e.providedFilename},fieldName:"providedFilename"},{data:{columnId:"size",isDefault:!0},header:e("SoftwareModule.Artifacts.Size"),resolveCellTitle:function(e){return e.size.toString()},renderCell:function(e){return $().createElement(SR,{bytes:e.size})},fieldName:"size"},{data:{columnId:"uploadedAt"},header:e("SoftwareModule.Artifacts.UploadedAt"),renderCell:function(e){return(0,tn.parseTimeWithReadable)(e.lastModifiedAt)},resolveCellTitle:function(e){return(0,tn.parseTimeWithReadable)(e.lastModifiedAt)}},{data:{columnId:"uploadedBy"},header:e("SoftwareModule.Artifacts.UploadedBy"),resolveCellTitle:function(e){return va(e.lastModifiedBy)},renderCell:function(e){return va(e.lastModifiedBy)}},{data:{columnId:"md5"},header:e("SoftwareModule.Artifacts.Hashes.Md5"),resolveCellTitle:function(e){return e.hashes.md5},renderCell:function(e){return $().createElement(AR,{text:e.hashes.md5})}},{data:{columnId:"sha1"},header:e("SoftwareModule.Artifacts.Hashes.Sha1"),resolveCellTitle:function(e){return e.hashes.sha1},renderCell:function(e){return $().createElement(AR,{text:e.hashes.sha1})}},{data:{columnId:"sha256"},header:e("SoftwareModule.Artifacts.Hashes.Sha256"),resolveCellTitle:function(e){return e.hashes.sha256},renderCell:function(e){return $().createElement(AR,{text:e.hashes.sha256})}},{data:{columnId:"actions",isDefault:!0},style:{width:"4rem"},header:e("SoftwareModule.Artifacts.Actions"),onRenderHeader:function(){return null},renderCell:function(e){return $().createElement(PR,{artifact:e,isLocked:t})}}]}(l,i)}),[l,i]),u=MR((0,G.useState)(s),1)[0],c=(0,tn.useGroupedColumns)({columns:s,textGroupTitle:l("ColumnSelector.TextColumns"),iconGroupTitle:l("ColumnSelector.IconColumns")}),d=(0,tn.useColumnSelection)(s,Rt,"rollouts:softwaremodule-artifacts-columns"),f=d.selectedColumnIds,p=d.setSelectedColumnIds,h=(0,G.useMemo)((function(){return u.filter((function(e){return f.includes(e.data.columnId)}))}),[u,f]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Ft.CommandBar,{mainAction:$().createElement($().Fragment,null,$().createElement(tn.ColumnSelector,{columnGroups:c,selectedIds:f,onChange:p,searchPlaceholder:l("ColumnSelector.SearchPlaceholder"),resetButtonTitle:l("ColumnSelector.ResetButtonTitle"),settingsTooltip:l("ColumnSelector.SettingsTooltip")}),$().createElement(Ft.Button,{title:l(i?"SoftwareModule.Artifacts.Add.Tooltip.Locked":"SoftwareModule.Artifacts.Add.Tooltip"),icon:"add",mode:"integrated",onClick:a,disabled:r||i}))}),$().createElement(Ft.DataList,{style:{marginTop:r?"0.5rem":"1rem"},items:t,columns:h,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:l("SoftwareModule.Artifacts.Empty")},n&&$().createElement(tn.InlineLoadingIndicator,null)))}function LR(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function kR(e){var t=ue(),n=Ut(),r=Bt(),o="".concat(yi,"/").concat(e,"/artifacts");return Bn({mutationKey:Ci.artifactsAdd(e),mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){LR(i,r,o,a,l,"next",e)}function l(e){LR(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.post(o,t,{timeout:36e5,headers:{"Content-Type":"multipart/form-data"}});case 3:return i=e.sent,e.abrupt("return",i.data);case 7:throw e.prev=7,e.t0=e.catch(0),new vn(e.t0,n);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),onSuccess:function(){t.resetQueries(Ci.artifacts(e))}})}function jR(){var e,t=(0,ki.useParams)().id,n=t?parseInt(t,10):-1,r=(0,G.useRef)(null),o=(0,G.useRef)(null),i=Ut(),a=Ht(),l=Vt(),s=(e=n,Es(Ci.artifactsList(e),"".concat(yi,"/").concat(e,"/artifacts"),{enabled:"number"===typeof e})),u=s.data,c=s.isLoading,d=s.error,f=kR(n),p=f.mutate,h=f.isLoading,m=(0,G.useCallback)((function(){var e;null===(e=r.current)||void 0===e||e.click()}),[r]),g=hR(n).data;return(0,G.useEffect)((function(){if(h){var e=a("progress",{label:i("SoftwareModule.Artifacts.Add.Loading.DialogHeadline"),message:i("SoftwareModule.Artifacts.Add.Loading.DialogMessage"),noCancel:!0});o.current=e}else o.current&&(o.current(),o.current=null)}),[h,a,i]),d?$().createElement(tn.ErrorState,{error:d}):g?$().createElement($().Fragment,null,$().createElement(RR,{data:null!==u&&void 0!==u?u:[],loadingData:c,addingArtifact:h,onAdd:m,isLocked:g.locked}),$().createElement("input",{type:"file",ref:r,onChange:function(e){var t,r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){if(!isNaN(n)&&-1!==n){var o=new FormData;o.append("file",r),p(o,{onSuccess:function(){l(i("SoftwareModule.Artifacts.Add.Success.ToastMesage"))},onError:function(e){a("confirm",{message:i("SoftwareModule.Artifacts.Add.Error.DialogMessage",{artifactName:r.name,error:$().createElement(Zy,{error:e})}),headline:i("SoftwareModule.Artifacts.Add.Error.DialogHeadline"),variant:"error",onCancel:null,confirmButtonPrimary:!0,confirmLabel:i("SoftwareModule.Artifacts.Add.Error.DialogComfirmButton")})}})}e.target.value=""}},style:{display:"none"}})):$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null))}function _R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_R(Object(n),!0).forEach((function(t){NR(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jR.displayName="SoftwareModuleArtifactsBlade",jR.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("SoftwareModuleArtifactsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("SoftwareModuleArtifactsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:gR}))))};var BR={component:tR,name:tR.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:800,header:$().createElement(tR.Header,null),showCloseButton:!1}},UR={component:mR,name:mR.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(mR.Header,null),onClose:function(){}}},HR={component:jR,name:jR.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:300,header:$().createElement(jR.Header,null),showCloseButton:!1,onClose:null}};var VR=function(){var e=Db(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[FR(FR({},BR),{},{defaults:FR(FR({},BR.defaults),{},{collapsed:!1})}),FR(FR({},UR),{},{defaults:FR(FR({},UR.defaults),{},{onClose:function(){return e.toHome()}})}),FR(FR({},HR),{},{defaults:FR({},HR.defaults)})]:[FR(FR({},BR),{},{defaults:FR(FR({},BR.defaults),{},{collapsed:!1})})]}),[t,e]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};l(2533);function qR(e){return[Ta(e("TargetFilters.List.Label.AutoAssignment"),"name",(function(t){return function(e,t){return null!==t&&void 0!==t&&t.autoAssignDistributionSet?$().createElement(Ft.Icon,{iconName:null!==t&&void 0!==t&&t.confirmationRequired?"link-checkmark":"link",title:e("TargetFilters.List.AutoAssignment.Confirmation.".concat(null!==t&&void 0!==t&&t.confirmationRequired?"Required":"NotRequired"))}):$().createElement($().Fragment,null)}(e,t)}),!0),Ea(e("Entity.Label.ID"),"id",void 0,{width:"6em"}),Ea(e("Entity.Label.Name"),"name",{isDefault:!0,isSortable:!0}),Ea(e("Entity.Label.Query"),"query",{isDefault:!0}),Ta(e("TargetFilters.List.Label.AutoAssignActionType"),"autoAssignActionType",(function(e){return null!==e.autoAssignActionType&&$().createElement(Pa,{forceType:e.autoAssignActionType})}),!0),{data:{columnId:"autoAssignDistributionSet"},header:e("TargetFilters.List.Label.AutoAssignDistributionSet"),fieldName:"autoAssignDistributionSet",renderCell:function(e){var t=function(e){if(!e.autoAssignDistributionSet)return{};var t=new URL(e._links.DS.href).searchParams.get("q"),n=null===t||void 0===t?void 0:t.split(";").map((function(e){return e.split("==")}));return n?Object.fromEntries(n):{}}(e);return e.autoAssignDistributionSet?$().createElement(Ya,{id:e.autoAssignDistributionSet,name:t.name||"",version:t.version}):void 0}},Ea(e("TargetFilters.List.Label.Weight"),"autoAssignWeight",void 0,{width:"130px"}),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}function WR(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(za())},toDetails:function(t){e(za(t))}}}(e)}),[e])}function zR(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(qa())},toDetails:function(t){e(qa(t))}}}(e)}),[e])}function QR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return GR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GR(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $R(e){var t=e.data,n=e.fetchMoreData,r=e.selected,o=e.totalCount,i=e.loadingData,a=e.searchColumns,l=e.searchKey,s=e.onSearchKeyChange,u=e.onSearchChange,c=e.onSortQueryChange,d=e.onRefresh,f=Ut(),p=WR(),h=zR();var m=function(){var e=Ut();return(0,G.useMemo)((function(){return qR(e)}),[e])}(),g=QR((0,G.useState)(m),2),y=g[0],b=g[1],v=QR((0,G.useState)(m),2),S=v[0],E=v[1];Er(y,c);var w=(0,G.useMemo)((function(){return t.find((function(e){return e.id===r}))}),[t,r]),O=(0,tn.useSortableColumns)(y,b),A=O.sortColumn,C=O.isSortingMultipleColumns,T=O.setIsSortingMultipleColumns,D=O.resetSorting,x=(0,G.useMemo)((function(){return gs(A)}),[A]),P=(0,G.useCallback)((function(){h.toHome()}),[h]);return $().createElement(tn.FlexibleColumnWrapper,{className:"target-filters-table"},$().createElement(Zl,{count:o,content:$().createElement(hs,{keyedSearchId:"target-filters-list-search",keys:a,searchKey:l,onSearchChange:u,onSearchKeyChange:s}),mainAction:$().createElement($().Fragment,null,$().createElement(Ml,{typeName:"target-filters",allColumns:y,onColumnSelectionChange:E,multiSortProps:{isMultiSort:C,onToggleMultiSort:function(e){T(e),D()}}}),$().createElement(Ft.Button,{title:f("TargetFilters.List.Add"),icon:"add",mode:"integrated",onClick:P})),actions:$().createElement($().Fragment,null,$().createElement(es,{onRefresh:d,refreshDisabled:i}))}),$().createElement(Ft.DataList,{items:t,columns:S,enableScrolling:!0,emptyStateMessage:f("TargetFilters.List.Empty"),onSelect:function(e){p.toDetails(e.id)},selected:w,onScrollToBottom:function(){return n()},onRenderColumnHeader:x,hideCheckBoxes:!0},i&&$().createElement(tn.InlineLoadingIndicator,null)))}const KR=l.p+"static/TargetFiltersList.329b2b55.md";function YR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ZR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZR(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eL={"Entity.Label.ID":"id","Entity.Label.Name":"name"};function tL(){var e,t,n=XR((0,G.useState)("Entity.Label.Name"),2),r=n[0],o=n[1],i=XR((0,G.useState)(""),2),a=i[0],l=i[1],s=XR((0,G.useState)(),2),u=s[0],c=s[1],d=yE(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YR(Object(n),!0).forEach((function(t){JR(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({sort:u,representation:"full"},null!==a&&void 0!==a&&a.length?{q:In(a,[eL[r]])}:{})),f=d.data,p=d.isLoading,h=d.isFetchingNextPage,m=d.error,g=d.fetchNextPage,y=ue();if(m)return $().createElement(tn.ErrorState,{error:m});var b=null!==(e=null===f||void 0===f?void 0:f.pages[f.pages.length-1].total)&&void 0!==e?e:0,v=null!==(t=null===f||void 0===f?void 0:f.pages.flatMap((function(e){return e.content})))&&void 0!==t?t:[];return $().createElement($R,{data:v,totalCount:b,loadingData:p||h,searchKey:r,searchColumns:Object.keys(eL),fetchMoreData:g,onRefresh:function(){y.resetQueries({queryKey:gE.all})},onSearchKeyChange:function(e){return o(e)},onSearchChange:function(e){if(a!==e){var t=e&&e.length>0?e:void 0;l(t||"")}},onSortQueryChange:c})}tL.displayName="TargetFiltersListBlade",tL.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetFilters.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetFilters.ListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:KR}))))};const nL=l.p+"static/TargetFilterDetails.50875e42.md";var rL=["showConfirmation"];function oL(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iL=["showConfirmation"];function aL(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lL="AutoAssignmentModal",sL="TargetFilterUpdateModal";const uL=l.p+"static/AutoAssignDS.f7f76cfd.md";function cL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return dL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dL(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fL(e){var t=Ut(),n=e.targetFilter,r=n,o=r.id,i=r.name,a=r.query;return $().createElement($().Fragment,null,n&&$().createElement($().Fragment,null,$().createElement(hL,e),$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},o&&$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Entity.Label.ID"),value:"".concat(o)},$().createElement("div",{className:"keep-actions-space"},o)),i&&$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Entity.Label.Name"),value:i},$().createElement("div",{className:"keep-actions-space"},i)),a&&$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Entity.Label.Query"),value:a},a),$().createElement(Ep,n)),$().createElement(pL,e)))}function pL(e){var t,n=e.targetFilter,r=e.autoAssignQuery,o=e.multiAssignmentQuery,i=Ut(),a=null===o||void 0===o||null===(t=o.data)||void 0===t?void 0:t.value,l=null===o||void 0===o?void 0:o.error,s=n,u=s.autoAssignWeight,c=s.autoAssignActionType,d=s.confirmationRequired,f=null===r||void 0===r?void 0:r.data,p=null===r||void 0===r?void 0:r.error,h=null===r||void 0===r?void 0:r.isLoading,m=p||l;return $().createElement($().Fragment,null,$().createElement(Ft.Divider,null),$().createElement(tn.SectionGroup,{label:i("TargetFilter.Details.AutoAssignTitle"),className:"basic-details-layout",style:{width:"100%"},help:$().createElement(tn.Documentation,{markdownFilePath:uL})},m&&$().createElement(tn.ErrorState,{error:m}),h&&$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{size:"small"})),f&&!m&&$().createElement($().Fragment,null,(null===f||void 0===f?void 0:f.name)&&$().createElement(tn.LabelledSection,{header:i("TargetFilter.Details.DistributionSet")},$().createElement(Ya,{id:f.id,name:f.name,version:f.version})),c&&$().createElement(tn.LabelledSection,{header:i("TargetFilter.Details.AutoAssign.ActionType")},$().createElement(Pa,{forceType:c})),a&&$().createElement(tn.LabelledSection,{header:i("TargetFilter.Detail.AutoAssign.Weigth"),value:(null===u||void 0===u?void 0:u.toString())||i("TargetFilter.Detail.AutoAssign.Weigth.NotConfigured")}),$().createElement(tn.LabelledSection,{header:i("TargetFilter.Detail.AutoAssign.ConfirmationRequired"),value:i(d?"TargetFilter.Detail.AutoAssign.ConfirmationRequired.Enabled":"TargetFilter.Detail.AutoAssign.ConfirmationRequired.Disabled")})),!f&&!h&&!m&&$().createElement(tn.NothingFoundMessage,{message:i("TargetFilter.Details.NoAutoAssignment"),iconName:"link-broken"})))}function hL(e){var t=e.targetFilter,n=e.autoAssignQuery,r=Ut(),o=Ht(),i=t,a=i.id,l=i.name,s=i.autoAssignDistributionSet,u=i.autoAssignActionType,c=i.autoAssignWeight,d=i.confirmationRequired,f=null===n||void 0===n?void 0:n.data,p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Ut(),r=ue(),o="".concat(null===t||void 0===t?void 0:t.name,":").concat(null===t||void 0===t?void 0:t.version),i=sr("".concat(wi,"/").concat(e.id,"/autoAssignDS"),{headline:n("TargetFilter.DeleteAutoAssignment.Header"),message:n("TargetFilter.DeleteAutoAssignment.Message",{name:o}),entityText:e.name,confirmLabel:n("Button.Delete"),successMessage:n("TargetFilter.DeleteAutoAssignmentSuccess.Message")},{mutationKey:[gE.deleteAutoAssignedDS(e.id)],onSuccess:function(){r.resetQueries(gE.lists()),r.resetQueries(gE.targetFilter(e.id)),r.resetQueries(gE.addAutoAssignedDS(e.id))}}),a=i.showConfirmation,l=oL(i,rL);return[(0,G.useCallback)((function(){a()}),[a]),l]}(t,f),h=cL(p,2),m=h[0],g=h[1],y=function(e){var t=Ut(),n=WR(),r=ue(),o=sr("".concat(wi,"/").concat(e.id),{headline:t("TargetFilter.DeleteModal.Header"),message:t("TargetFilter.DeleteModal.Message"),entityText:e.name,successMessage:t("TargetFilter.DeleteModal.SuccessMessage")},{mutationKey:[gE.deleteTargetFilter(e.id)],onSuccess:function(){r.resetQueries(gE.lists())}}),i=o.showConfirmation,a=aL(o,iL);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),b=cL(y,2),v=b[0],S=b[1];function E(){o(lL,{targetFilterId:a,targetFilterName:l,autoAssignDistributionSet:s,autoAssignActionType:u,autoAssignWeight:c,confirmationRequired:d})}return $().createElement(gb,{title:r("TargetFilter.DetailsActions.ContextMenu.Title")},$().createElement(Ft.MenuItem,{label:r("TargetFilter.DetailsActions.Edit"),icon:"edit",title:r("TargetFilter.Edit.Tooltip"),onClick:function(){var e=o(sL,{onSuccess:function(){return e()},onCancel:function(){return e()},toUpdate:t})}}),$().createElement(Ft.MenuItem,{label:r("TargetFilter.DetailsActions.Delete"),onClick:v,icon:"delete",disabled:S.isLoading,title:r("TargetFilter.Delete.Tooltip")}),$().createElement(Ft.Divider,null),$().createElement(Ft.MenuItem,{label:r("TargetFilter.DetailsActions.Assign"),onClick:E,icon:"link",disabled:!!f,title:r("TargetFIlter.Assign.Tooltip")}),$().createElement(Ft.MenuItem,{label:r("TargetFilter.DetailsActions.EditAssign"),onClick:E,icon:"link-edit",disabled:!f,title:r("TargetFIlter.EditAssignment.Tooltip")}),$().createElement(Ft.MenuItem,{label:r("TargetFilter.DeleteAssignment"),onClick:m,icon:"link-broken",disabled:!f||g.isLoading,title:r("TargetFilter.DeleteAssignment.Tooltip")}))}function mL(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):void 0,n=function(e){return Es(gE.targetFilter(e),"".concat(wi,"/").concat(e),{enabled:"number"===typeof e})}(t),r=n.data,o=n.isLoading,i=n.error,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Es(gE.autoAssignedDS(e),"".concat(wi,"/").concat(e,"/autoAssignDS"),{enabled:"number"===typeof e&&t})}(t,!!r),l=KE(XE.multiAssignmentsEnabled(),Lu,{enabled:!!r});return i?$().createElement(tn.ErrorState,{error:i}):o?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement(fL,{targetFilter:r,autoAssignQuery:a,multiAssignmentQuery:l})}function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gL(Object(n),!0).forEach((function(t){bL(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bL(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mL.displayName="TargetFilterDetailsBlade",mL.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetFilterDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetFilterDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:nL}))))};var vL={component:tL,name:tL.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(tL.Header,null),showCloseButton:!1}},SL={component:mL,name:mL.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(mL.Header,null),onClose:function(){}}};function EL(){var e=WR(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[yL(yL({},vL),{},{defaults:yL(yL({},vL.defaults),{},{collapsed:!1})}),yL(yL({},SL),{},{defaults:yL(yL({},SL.defaults),{},{onClose:function(){return e.toHome()}})})]:[yL(yL({},vL),{},{defaults:yL(yL({},vL.defaults),{},{collapsed:!1})})]}),[t,e]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})}var wL=l(9630),OL=l(5710),AL=l.n(OL),CL=l(6605),TL="TargetFilterAddModal",DL="RolloutCreateWarning",xL="TargetAddModal",PL="TargetUpdateModal",ML="name",IL="description",RL="createdat",LL="lastmodifiedat",kL="controllerid",jL="tag",_L="lastcontrollerrequestat",FL="assignedds.name",NL="installedds.name",BL="attribute.",UL="metadata.",HL=[ML,IL,RL,LL,kL,"updatestatus","ipaddress",jL,_L,FL,"assignedds.version",NL,"installedds.version","targettype.key","targettype.name"];function VL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return qL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qL(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WL(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.searchKey,i=e.searchColumns,a=e.refreshData,l=e.fetchMoreData,s=e.onSearchChange,u=e.onSearchKeyChange,c=e.onSortQueryChange,d=e.onAddTag,f=e.onAssignTag,p=Ut(),h=vv(),m=(0,G.useMemo)((function(){return[{icon:"generic-device-connected",title:p("Tags.Tag.Action.Assign.Tooltip"),action:function(e){f(e)}},{icon:"box-delivery",title:p("Tags.Tag.Action.CreateRollout.Tooltip"),action:function(e){h.toNew(function(e){return(0,CL.emit)(AL().comparison(jL,wL.EQ,e))}(e.name))}}]}),[p,h,f]),g=Eh(lh,m),y=VL((0,G.useState)(g),2),b=y[0],v=y[1],S=VL((0,G.useState)(g),2),E=S[0],w=S[1];Er(b,c);var O=(0,tn.useSortableColumns)(b,v),A=O.sortColumn,C=O.isSortingMultipleColumns,T=O.setIsSortingMultipleColumns,D=O.resetSorting,x=(0,G.useMemo)((function(){return{allColumns:b,onColumnSelectionChange:w,typeName:"target-tags",multiSortProps:{isMultiSort:C,onToggleMultiSort:function(e){T(e),D()}}}}),[b,C,D,T]),P=(0,G.useMemo)((function(){return gs(A)}),[A]);return $().createElement($().Fragment,null,$().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,columnSelectorProps:x,onRefresh:a,content:$().createElement(hs,{keyedSearchId:"target-tags-search",keys:i,searchKey:o,onSearchChange:s,onSearchKeyChange:u}),mainAction:$().createElement(Ft.Button,{title:p("TargetTags.Create"),icon:"add",mode:"integrated",onClick:function(){return d()}})}),$().createElement(Ft.DataList,{items:t,columns:E,enableScrolling:!0,emptyStateMessage:p("Tags.Empty"),onScrollToBottom:l,onRenderColumnHeader:P,hideCheckBoxes:!0},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"target-tags-loading"}))))}const zL=l.p+"static/TargetTagsList.b23b0e45.md";var QL=["label","id","notificationText","notificationType"];function GL(){return GL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GL.apply(this,arguments)}function $L(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var KL=(0,G.forwardRef)((function(e,t){var n=e.label,r=e.id,o=e.notificationText,i=e.notificationType,a=void 0===i?"error":i,l=$L(e,QL),s=(0,G.useId)();return $().createElement(Ft.FormField,{fieldType:"text",notificationType:a,notificationText:o},$().createElement(Ft.TextField,GL({ref:t,id:null!==r&&void 0!==r?r:s,label:n},l)))})),YL=["label","id","notificationText","notificationType"];function JL(){return JL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JL.apply(this,arguments)}function XL(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ZL=(0,G.forwardRef)((function(e,t){var n=e.label,r=e.id,o=e.notificationText,i=e.notificationType,a=void 0===i?"error":i,l=XL(e,YL),s=(0,G.useId)();return $().createElement(Ft.FormField,{fieldType:"textarea",notificationType:a,notificationText:o},$().createElement(Ft.TextArea,JL({ref:t,id:null!==r&&void 0!==r?r:s,label:n},l)))})),ek=l(2069),tk=l.n(ek);function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nk(Object(n),!0).forEach((function(t){ok(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ok(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ik(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ak(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ak(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ak(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lk(){var e=ik((0,G.useState)(!1),2),t=e[0],n=e[1],r=ik((0,G.useState)(null),2),o=r[0],i=r[1],a=ik((0,G.useState)(),2),l=a[0],s=a[1],u=ik((0,G.useState)(),2),c=u[0],d=u[1],f=(0,G.useRef)(!1),p=(0,G.useRef)(-1),h=(0,G.useCallback)((function(e){var t,r=[],o=[];tk().parse(e,{worker:!1,header:!1,delimitersToGuess:sk,beforeFirstChunk:function(e){n(!0);var t=function(e){var t;if(0===e.length)return{firstChunk:e,isOneLiner:!0,controllerIdIndex:-1};var n=e.indexOf("\n");if(-1===n||n===e.length-1)return{firstChunk:e,controllerIdIndex:-1,isOneLiner:!0};var r=e.slice(0,n),o=sk.some((function(e){return r.includes(e)}));if(!o)return{firstChunk:e,controllerIdIndex:0,isOneLiner:!1};var i,a=tk().parse(r,{header:!0,delimitersToGuess:sk});if(a.errors&&a.errors.length>0){var l,s=a.errors.map((function(e){return rk(rk({},e),{},{message:"There was an error parsing the header!;".concat(e.message)})}));console.warn(s.map((function(e){return e.message})).join(";")),null!==(l=a.meta.fields)&&void 0!==l&&l.length||(i=s)}var u=null===(t=a.meta.fields)||void 0===t?void 0:t.findIndex((function(e){return e.trim().match(uk)}));if(void 0===u||-1===u)return{firstChunk:e,controllerIdIndex:-1,isOneLiner:!1,parseErrors:i};return{firstChunk:e.slice(n+1),controllerIdIndex:u,isOneLiner:!1,parseErrors:i}}(e),r=t.firstChunk,o=t.controllerIdIndex,i=t.isOneLiner;return p.current=o,f.current=i,r},error:function(e){n(!1),i(null),s(void 0),d(void 0),f.current=!1,p.current=-1,s(e)},chunk:function(e,n){if(0===e.data.length)return t=new Error("Chunk is empty! Aborting parsing."),void n.abort();if(e.errors.length>0&&(r=f.current||1!==e.data[0].length||-1!==p.current&&0!==p.current?r.concat(e.errors):r.concat(e.errors.filter((function(e){return"UndetectableDelimiter"!==e.code&&"Delimiter"!==e.type})))),f.current)1===e.data.length&&Array.isArray(e.data[0])&&e.data[0].length>0&&(o=o.concat(e.data[0].reduce((function(e,t){return(null===t||void 0===t?void 0:t.trim())&&(e[e.length]=t),e}),[])));else{var i=-1===p.current?0:p.current;o=o.concat(e.data.reduce((function(e,t){var n,r=null===(n=t[i])||void 0===n?void 0:n.trim();return r&&(e[e.length]=r),e}),[]))}},complete:function(){n(!1),s(void 0),d(void 0),t?s(t):(r.length&&(f.current||-1!==p.current||(r=r.filter((function(e){return"UndetectableDelimiter"!==e.code}))),d(r)),i(o))}})}),[]);return{isParsing:t,data:t?[]:o,parseErrors:c,readError:l,parse:h}}var sk=[",","\t","|",";",tk().RECORD_SEP,tk().UNIT_SEP," "];tk().LocalChunkSize=1048576;var uk=/controller *id/i;function ck(e){var t=e.list,n=e.headSize,r=void 0===n?dk:n,o=e.tailSize,i=void 0===o?fk:o,a=e.moreItemsMessageTemplate,l=void 0===a?pk:a,s=Ut(),u=(0,G.useMemo)((function(){return t.slice(0,r)}),[t,r]),c=(0,G.useMemo)((function(){return t.slice(t.length-i)}),[t,i]);return t.length<=r+i?$().createElement("ol",{className:"preview-list"},t.map((function(e,t){return $().createElement("li",{key:e+t},e)}))):$().createElement("dl",{className:"preview-list --partial"},u.map((function(e,t){return $().createElement(G.Fragment,{key:e+t},$().createElement("dt",null,t+1,"."),$().createElement("dd",null,e))})),$().createElement("dt",null,"..."),$().createElement("dd",null,s(l,{count:t.length-(r+i)})),c.map((function(e,n){return $().createElement(G.Fragment,{key:e+n},$().createElement("dt",null,n+t.length-i+1,"."),$().createElement("dd",null,e))})))}var dk=3,fk=dk,pk="ListPreview.MoreItems.Count.Message";function hk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return mk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gk(e){var t=e.onData,n=e.onIsLoading,r=Ut(),o=(0,G.useRef)(null),i=hk((0,G.useState)(),2),a=i[0],l=i[1],s=lk(),u=s.isParsing,c=s.data,d=s.readError,f=s.parseErrors,p=s.parse,h=(0,G.useMemo)((function(){return a&&!u&&!c}),[a,u,c]),m=(0,G.useCallback)((function(){var e;null===(e=o.current)||void 0===e||e.click()}),[o]),g=(0,G.useCallback)((function(e){var t,n=null===(t=e.target.files)||void 0===t?void 0:t[0];n?(l(n),p(n),e.target.value=""):l(void 0)}),[p]);return(0,G.useEffect)((function(){n(u)}),[n,u]),(0,G.useEffect)((function(){null!==a&&void 0!==a&&a.name?u||t({fileName:a.name,targets:null!==c&&void 0!==c?c:[]}):t(null)}),[t,c,u,a]),$().createElement("div",{className:"csv-reader"},$().createElement("div",{className:"csv-reader__open-picker ".concat(u?"--parsing":"")},$().createElement(Ft.Button,{className:"csv-reader__open-picker__btn",title:r("Button.ImportFromCsv"),icon:"upload",label:$().createElement(yk,{fileName:null===a||void 0===a?void 0:a.name,itemsCount:a?null===c||void 0===c?void 0:c.length:void 0}),onClick:m,disabled:u}),u&&$().createElement(Ft.ActivityIndicator,{size:"small"})),$().createElement("input",{className:"csv-reader__file-input",type:"file",ref:o,onChange:g,disabled:u}),h&&$().createElement(Ft.Notification,{type:"warning"},r("CSVReader.NoContent.Warning.Message")),d&&$().createElement(Ft.Notification,{type:"error"},r("CSVReader.ReadError.Message",{file:a.name})),!(null===f||void 0===f||!f.length)&&$().createElement(Ft.Notification,{type:"warning"},r("CSVReader.ParseErrorSummary.Message"),$().createElement("ul",null,f.map((function(e,t){return $().createElement("li",{key:t},e.message)})))),!(null===c||void 0===c||!c.length)&&$().createElement(tn.LabelledSection,{className:"controllerids-preview",header:r("CSVPreview.PreviewSection.Header"),expandable:!0,expanded:!1},$().createElement(ck,{list:null!==c&&void 0!==c?c:[],moreItemsMessageTemplate:"CSVPreview.MoreItems.Count.Message"})))}function yk(e){var t=e.fileName,n=e.itemsCount,r=Ut();return t?$().createElement($().Fragment,null,$().createElement("span",{className:"file-picker__btn-label__file-name"},t),void 0!==n&&$().createElement("span",{className:"file-picker__btn-label__targets-count"},r("CSVReader.Button.TargetsCount.Label",{count:n}))):$().createElement("span",null,r("Button.ImportFromCsv"))}function bk(){return bk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bk.apply(this,arguments)}function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ek(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ok(e){var t,n,r=e.isOpen,o=e.onClose,i=Ut(),a=(0,G.useRef)(null),l=Vt(),s=Ek((0,G.useState)(!1),2),u=s[0],c=s[1],d=Ek((0,G.useState)(!1),2),f=d[0],p=d[1],h=Ek((0,G.useState)(null),2),m=h[0],g=h[1],y=$o({defaultValues:Ak,mode:"onChange"}),b=y.register,v=y.reset,S=y.formState,E=S.errors,w=void 0===E?{}:E,O=S.isDirty,A=S.isValid,C=y.getValues,T=Ch(lh),D=T.mutate,x=T.isLoading,P=T.error,M=(0,G.useMemo)((function(){return x||f}),[x,f]),I=(0,G.useMemo)((function(){return!O||!A||M}),[O,A,M]),R=(0,G.useCallback)((function(){D([C()],{onSuccess:function(e){var t=Ek(e,1)[0];l(i("Tags.Add.Success")),o(u?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vk(Object(n),!0).forEach((function(t){Sk(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({tag:t},m):void 0)}})}),[D,C,l,i,u,m,o]);return(0,G.useEffect)((function(){r||v(Ak)}),[r,v]),$().createElement(tn.Dialog,{"aria-label":"add target tag",ref:a,isOpen:r,onClose:function(e){e.stopPropagation()},onCancel:function(e){e.target===a.current?(e.stopPropagation(),e.preventDefault(),o()):e.stopPropagation()},dialogHeader:$().createElement(tn.DialogHeader,{title:i("TargetTags.Create"),onCloseBtnClick:function(){return o()}}),dialogFooter:$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:i("Button.Create"),acceptBtnDisabled:I,onAcceptBtnClick:R,rejectBtnLabel:i("Button.Cancel"),onRejectBtnClick:function(){o()}})},$().createElement("form",{name:"createTargetTag"},$().createElement(KL,bk({label:i("Entity.Label.Name"),notificationType:"error",notificationText:null===(t=w.name)||void 0===t?void 0:t.message,autoFocus:!0,id:"addTargetTagName"},b("name",{disabled:M,required:i("FormField.ValidationMsg.Required"),maxLength:{value:128,message:i("FormField.ValidationMsg.MaxLength",{length:128})}}))),$().createElement(ZL,bk({label:i("Entity.Label.Description"),id:"addTargetTagDescription",notificationType:"error",notificationText:null===(n=w.description)||void 0===n?void 0:n.message},b("description",{disabled:M,maxLength:{value:512,message:i("FormField.ValidationMsg.MaxLength",{length:512})}}))),$().createElement(Ft.FormField,{fieldType:"checkbox"},$().createElement(Ft.Checkbox,{id:"assignTagToTargets",checked:u,onChange:function(e){c(e.target.checked)}},$().createElement("span",null,i("Entity.Metadata.AssignTagToTargets"))))),u&&$().createElement(gk,{onData:g,onIsLoading:p}),M&&$().createElement(Ft.ProgressIndicator,{id:"addTargetTagBusyIndicator",type:"indeterminate",value:0}),P&&$().createElement(tn.ErrorState,{error:P}))}var Ak={name:"",description:""};l(4461);function Ck(e,t){return function(){return e.apply(t,arguments)}}const{toString:Tk}=Object.prototype,{getPrototypeOf:Dk}=Object,xk=(Pk=Object.create(null),e=>{const t=Tk.call(e);return Pk[t]||(Pk[t]=t.slice(8,-1).toLowerCase())});var Pk;const Mk=e=>(e=e.toLowerCase(),t=>xk(t)===e),Ik=e=>t=>typeof t===e,{isArray:Rk}=Array,Lk=Ik("undefined");const kk=Mk("ArrayBuffer");const jk=Ik("string"),_k=Ik("function"),Fk=Ik("number"),Nk=e=>null!==e&&"object"===typeof e,Bk=e=>{if("object"!==xk(e))return!1;const t=Dk(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Uk=Mk("Date"),Hk=Mk("File"),Vk=Mk("Blob"),qk=Mk("FileList"),Wk=Mk("URLSearchParams"),[zk,Qk,Gk,$k]=["ReadableStream","Request","Response","Headers"].map(Mk);function Kk(e,t,{allOwnKeys:n=!1}={}){if(null===e||"undefined"===typeof e)return;let r,o;if("object"!==typeof e&&(e=[e]),Rk(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Yk(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Jk="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Xk=e=>!Lk(e)&&e!==Jk;const Zk=(ej="undefined"!==typeof Uint8Array&&Dk(Uint8Array),e=>ej&&e instanceof ej);var ej;const tj=Mk("HTMLFormElement"),nj=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rj=Mk("RegExp"),oj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Kk(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)};const ij=Mk("AsyncFunction"),aj=((e,t)=>{return e?setImmediate:t?(n=`axios@${Math.random()}`,r=[],Jk.addEventListener("message",(({source:e,data:t})=>{e===Jk&&t===n&&r.length&&r.shift()()}),!1),e=>{r.push(e),Jk.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,_k(Jk.postMessage)),lj="undefined"!==typeof queueMicrotask?queueMicrotask.bind(Jk):"undefined"!==typeof process&&process.nextTick||aj,sj={isArray:Rk,isArrayBuffer:kk,isBuffer:function(e){return null!==e&&!Lk(e)&&null!==e.constructor&&!Lk(e.constructor)&&_k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||_k(e.append)&&("formdata"===(t=xk(e))||"object"===t&&_k(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&kk(e.buffer),t},isString:jk,isNumber:Fk,isBoolean:e=>!0===e||!1===e,isObject:Nk,isPlainObject:Bk,isReadableStream:zk,isRequest:Qk,isResponse:Gk,isHeaders:$k,isUndefined:Lk,isDate:Uk,isFile:Hk,isBlob:Vk,isRegExp:rj,isFunction:_k,isStream:e=>Nk(e)&&_k(e.pipe),isURLSearchParams:Wk,isTypedArray:Zk,isFileList:qk,forEach:Kk,merge:function e(){const{caseless:t}=Xk(this)&&this||{},n={},r=(r,o)=>{const i=t&&Yk(n,o)||o;Bk(n[i])&&Bk(r)?n[i]=e(n[i],r):Bk(r)?n[i]=e({},r):Rk(r)?n[i]=r.slice():n[i]=r};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Kk(arguments[o],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Kk(t,((t,r)=>{n&&_k(t)?e[r]=Ck(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&Dk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:xk,kindOfTest:Mk,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Rk(e))return e;let t=e.length;if(!Fk(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:tj,hasOwnProperty:nj,hasOwnProp:nj,reduceDescriptors:oj,freezeMethods:e=>{oj(e,((t,n)=>{if(_k(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];_k(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Rk(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Yk,global:Jk,isContextDefined:Xk,isSpecCompliantForm:function(e){return!!(e&&_k(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Nk(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=Rk(e)?[]:{};return Kk(e,((e,t)=>{const i=n(e,r+1);!Lk(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ij,isThenable:e=>e&&(Nk(e)||_k(e))&&_k(e.then)&&_k(e.catch),setImmediate:aj,asap:lj};function uj(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}sj.inherits(uj,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:sj.toJSONObject(this.config),code:this.code,status:this.status}}});const cj=uj.prototype,dj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{dj[e]={value:e}})),Object.defineProperties(uj,dj),Object.defineProperty(cj,"isAxiosError",{value:!0}),uj.from=(e,t,n,r,o,i)=>{const a=Object.create(cj);return sj.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),uj.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const fj=uj;function pj(e){return sj.isPlainObject(e)||sj.isArray(e)}function hj(e){return sj.endsWith(e,"[]")?e.slice(0,-2):e}function mj(e,t,n){return e?e.concat(t).map((function(e,t){return e=hj(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const gj=sj.toFlatObject(sj,{},null,(function(e){return/^is[A-Z]/.test(e)}));const yj=function(e,t,n){if(!sj.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=sj.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!sj.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||"undefined"!==typeof Blob&&Blob)&&sj.isSpecCompliantForm(t);if(!sj.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(sj.isDate(e))return e.toISOString();if(!l&&sj.isBlob(e))throw new fj("Blob is not supported. Use a Buffer instead.");return sj.isArrayBuffer(e)||sj.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let l=e;if(e&&!o&&"object"===typeof e)if(sj.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(sj.isArray(e)&&function(e){return sj.isArray(e)&&!e.some(pj)}(e)||(sj.isFileList(e)||sj.endsWith(n,"[]"))&&(l=sj.toArray(e)))return n=hj(n),l.forEach((function(e,r){!sj.isUndefined(e)&&null!==e&&t.append(!0===a?mj([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!pj(e)||(t.append(mj(o,n,i),s(e)),!1)}const c=[],d=Object.assign(gj,{defaultVisitor:u,convertValue:s,isVisitable:pj});if(!sj.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!sj.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),sj.forEach(n,(function(n,i){!0===(!(sj.isUndefined(n)||null===n)&&o.call(t,n,sj.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),c.pop()}}(e),t};function bj(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function vj(e,t){this._pairs=[],e&&yj(e,this,t)}const Sj=vj.prototype;Sj.append=function(e,t){this._pairs.push([e,t])},Sj.toString=function(e){const t=e?function(t){return e.call(this,t,bj)}:bj;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ej=vj;function wj(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Oj(e,t,n){if(!t)return e;const r=n&&n.encode||wj;sj.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):sj.isURLSearchParams(t)?t.toString():new Ej(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Aj=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){sj.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Cj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tj={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Ej,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Dj="undefined"!==typeof window&&"undefined"!==typeof document,xj="object"===typeof navigator&&navigator||void 0,Pj=Dj&&(!xj||["ReactNative","NativeScript","NS"].indexOf(xj.product)<0),Mj="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,Ij=Dj&&window.location.href||"http://localhost",Rj={...e,...Tj};const Lj=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),l=o>=e.length;if(i=!i&&sj.isArray(r)?r.length:i,l)return sj.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&sj.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&sj.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(sj.isFormData(e)&&sj.isFunction(e.entries)){const n={};return sj.forEachEntry(e,((e,r)=>{t(function(e){return sj.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const kj={transitional:Cj,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=sj.isObject(e);o&&sj.isHTMLForm(e)&&(e=new FormData(e));if(sj.isFormData(e))return r?JSON.stringify(Lj(e)):e;if(sj.isArrayBuffer(e)||sj.isBuffer(e)||sj.isStream(e)||sj.isFile(e)||sj.isBlob(e)||sj.isReadableStream(e))return e;if(sj.isArrayBufferView(e))return e.buffer;if(sj.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return yj(e,new Rj.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Rj.isNode&&sj.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=sj.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return yj(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(sj.isString(e))try{return(t||JSON.parse)(e),sj.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||kj.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(sj.isResponse(e)||sj.isReadableStream(e))return e;if(e&&sj.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw fj.from(o,fj.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rj.classes.FormData,Blob:Rj.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};sj.forEach(["delete","get","head","post","put","patch"],(e=>{kj.headers[e]={}}));const jj=kj,_j=sj.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fj=Symbol("internals");function Nj(e){return e&&String(e).trim().toLowerCase()}function Bj(e){return!1===e||null==e?e:sj.isArray(e)?e.map(Bj):String(e)}function Uj(e,t,n,r,o){return sj.isFunction(r)?r.call(this,t,n):(o&&(t=n),sj.isString(t)?sj.isString(r)?-1!==t.indexOf(r):sj.isRegExp(r)?r.test(t):void 0:void 0)}class Hj{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Nj(t);if(!o)throw new Error("header name must be a non-empty string");const i=sj.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Bj(e))}const i=(e,t)=>sj.forEach(e,((e,n)=>o(e,n,t)));if(sj.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(sj.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&_j[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(sj.isHeaders(e))for(const[a,l]of e.entries())o(l,a,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Nj(e)){const n=sj.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(sj.isFunction(t))return t.call(this,e,n);if(sj.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Nj(e)){const n=sj.findKey(this,e);return!(!n||void 0===this[n]||t&&!Uj(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Nj(e)){const o=sj.findKey(n,e);!o||t&&!Uj(0,n[o],o,t)||(delete n[o],r=!0)}}return sj.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Uj(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return sj.forEach(this,((r,o)=>{const i=sj.findKey(n,o);if(i)return t[i]=Bj(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Bj(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return sj.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&sj.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Fj]=this[Fj]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Nj(e);t[r]||(!function(e,t){const n=sj.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return sj.isArray(e)?e.forEach(r):r(e),this}}Hj.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),sj.reduceDescriptors(Hj.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),sj.freezeMethods(Hj);const Vj=Hj;function qj(e,t){const n=this||jj,r=t||n,o=Vj.from(r.headers);let i=r.data;return sj.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Wj(e){return!(!e||!e.__CANCEL__)}function zj(e,t,n){fj.call(this,null==e?"canceled":e,fj.ERR_CANCELED,t,n),this.name="CanceledError"}sj.inherits(zj,fj,{__CANCEL__:!0});const Qj=zj;function Gj(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new fj("Request failed with status code "+n.status,[fj.ERR_BAD_REQUEST,fj.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const $j=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(l){const s=Date.now(),u=r[a];o||(o=s),n[i]=l,r[i]=s;let c=a,d=0;for(;c!==i;)d+=n[c++],c%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const f=u&&s-u;return f?Math.round(1e3*d/f):void 0}};const Kj=function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),l=t-o;l>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-l)))},()=>n&&a(n)]},Yj=(e,t,n=3)=>{let r=0;const o=$j(50,250);return Kj((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,l=i-r,s=o(l);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Jj=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Xj=e=>(...t)=>sj.asap((()=>e(...t))),Zj=Rj.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Rj.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Rj.origin),Rj.navigator&&/(msie|trident)/i.test(Rj.navigator.userAgent)):()=>!0,e_=Rj.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];sj.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),sj.isString(r)&&a.push("path="+r),sj.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function t_(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const n_=e=>e instanceof Vj?{...e}:e;function r_(e,t){t=t||{};const n={};function r(e,t,n,r){return sj.isPlainObject(e)&&sj.isPlainObject(t)?sj.merge.call({caseless:r},e,t):sj.isPlainObject(t)?sj.merge({},t):sj.isArray(t)?t.slice():t}function o(e,t,n,o){return sj.isUndefined(t)?sj.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!sj.isUndefined(t))return r(void 0,t)}function a(e,t){return sj.isUndefined(t)?sj.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(e,t,n)=>o(n_(e),n_(t),0,!0)};return sj.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);sj.isUndefined(a)&&i!==l||(n[r]=a)})),n}const o_=e=>{const t=r_({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:l,auth:s}=t;if(t.headers=l=Vj.from(l),t.url=Oj(t_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),sj.isFormData(r))if(Rj.hasStandardBrowserEnv||Rj.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(Rj.hasStandardBrowserEnv&&(o&&sj.isFunction(o)&&(o=o(t)),o||!1!==o&&Zj(t.url))){const e=i&&a&&e_.read(a);e&&l.set(i,e)}return t},i_="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=o_(e);let o=r.data;const i=Vj.from(r.headers).normalize();let a,l,s,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Vj.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Gj((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new fj("Request aborted",fj.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new fj("Network Error",fj.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Cj;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new fj(t,o.clarifyTimeoutError?fj.ETIMEDOUT:fj.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&sj.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),sj.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([s,c]=Yj(p,!0),m.addEventListener("progress",s)),f&&m.upload&&([l,u]=Yj(f),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Qj(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Rj.protocols.indexOf(y)?n(new fj("Unsupported protocol "+y+":",fj.ERR_BAD_REQUEST,e)):m.send(o||null)}))},a_=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof fj?t:new Qj(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new fj(`timeout ${t} of ms exceeded`,fj.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:l}=r;return l.unsubscribe=()=>sj.asap(a),l}},l_=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},s_=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},u_=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of s_(e))yield*l_(n,t)}(e,t);let i,a=0,l=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return l(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw l(t),t}},cancel:e=>(l(e),o.return())},{highWaterMark:2})},c_="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,d_=c_&&"function"===typeof ReadableStream,f_=c_&&("function"===typeof TextEncoder?(p_=new TextEncoder,e=>p_.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var p_;const h_=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},m_=d_&&h_((()=>{let e=!1;const t=new Request(Rj.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),g_=d_&&h_((()=>sj.isReadableStream(new Response("").body))),y_={stream:g_&&(e=>e.body)};var b_;c_&&(b_=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!y_[e]&&(y_[e]=sj.isFunction(b_[e])?t=>t[e]():(t,n)=>{throw new fj(`Response type '${e}' is not supported`,fj.ERR_NOT_SUPPORT,n)})})));const v_=async(e,t)=>{const n=sj.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(sj.isBlob(e))return e.size;if(sj.isSpecCompliantForm(e)){const t=new Request(Rj.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return sj.isArrayBufferView(e)||sj.isArrayBuffer(e)?e.byteLength:(sj.isURLSearchParams(e)&&(e+=""),sj.isString(e)?(await f_(e)).byteLength:void 0)})(t):n},S_=c_&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=o_(e);u=u?(u+"").toLowerCase():"text";let p,h=a_([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(s&&m_&&"get"!==n&&"head"!==n&&0!==(g=await v_(c,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(sj.isFormData(r)&&(e=n.headers.get("content-type"))&&c.setContentType(e),n.body){const[e,t]=Jj(g,Yj(Xj(s)));r=u_(n.body,65536,e,t)}}sj.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(p);const a=g_&&("stream"===u||"response"===u);if(g_&&(l||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=sj.toFiniteNumber(i.headers.get("content-length")),[n,r]=l&&Jj(t,Yj(Xj(l),!0))||[];i=new Response(u_(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}u=u||"text";let y=await y_[sj.findKey(y_,u)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{Gj(t,n,{data:y,headers:Vj.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(y){if(m&&m(),y&&"TypeError"===y.name&&/fetch/i.test(y.message))throw Object.assign(new fj("Network Error",fj.ERR_NETWORK,e,p),{cause:y.cause||y});throw fj.from(y,y&&y.code,e,p)}}),E_={http:null,xhr:i_,fetch:S_};sj.forEach(E_,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const w_=e=>`- ${e}`,O_=e=>sj.isFunction(e)||null===e||!1===e,A_=e=>{e=sj.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!O_(n)&&(r=E_[(t=String(n)).toLowerCase()],void 0===r))throw new fj(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(w_).join("\n"):" "+w_(e[0]):"as no adapter specified";throw new fj("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function C_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qj(null,e)}function T_(e){C_(e),e.headers=Vj.from(e.headers),e.data=qj.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return A_(e.adapter||jj.adapter)(e).then((function(t){return C_(e),t.data=qj.call(e,e.transformResponse,t),t.headers=Vj.from(t.headers),t}),(function(t){return Wj(t)||(C_(e),t&&t.response&&(t.response.data=qj.call(e,e.transformResponse,t.response),t.response.headers=Vj.from(t.response.headers))),Promise.reject(t)}))}const D_="1.8.4",x_={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{x_[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const P_={};x_.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new fj(r(o," has been removed"+(t?" in "+t:"")),fj.ERR_DEPRECATED);return t&&!P_[o]&&(P_[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},x_.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const M_={assertOptions:function(e,t,n){if("object"!==typeof e)throw new fj("options must be an object",fj.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new fj("option "+i+" must be "+n,fj.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new fj("Unknown option "+i,fj.ERR_BAD_OPTION)}},validators:x_},I_=M_.validators;class R_{constructor(e){this.defaults=e,this.interceptors={request:new Aj,response:new Aj}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=r_(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&M_.assertOptions(n,{silentJSONParsing:I_.transitional(I_.boolean),forcedJSONParsing:I_.transitional(I_.boolean),clarifyTimeoutError:I_.transitional(I_.boolean)},!1),null!=r&&(sj.isFunction(r)?t.paramsSerializer={serialize:r}:M_.assertOptions(r,{encode:I_.function,serialize:I_.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),M_.assertOptions(t,{baseUrl:I_.spelling("baseURL"),withXsrfToken:I_.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&sj.merge(o.common,o[t.method]);o&&sj.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Vj.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let u;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let c,d=0;if(!l){const e=[T_.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let f=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{u=T_.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,c=s.length;d<c;)u=u.then(s[d++],s[d++]);return u}getUri(e){return Oj(t_((e=r_(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}sj.forEach(["delete","get","head","options"],(function(e){R_.prototype[e]=function(t,n){return this.request(r_(n||{},{method:e,url:t,data:(n||{}).data}))}})),sj.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(r_(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}R_.prototype[e]=t(),R_.prototype[e+"Form"]=t(!0)}));const L_=R_;class k_{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Qj(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new k_((function(t){e=t}));return{token:t,cancel:e}}}const j_=k_;const __={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(__).forEach((([e,t])=>{__[t]=e}));const F_=__;const N_=function e(t){const n=new L_(t),r=Ck(L_.prototype.request,n);return sj.extend(r,L_.prototype,n,{allOwnKeys:!0}),sj.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(r_(t,n))},r}(jj);N_.Axios=L_,N_.CanceledError=Qj,N_.CancelToken=j_,N_.isCancel=Wj,N_.VERSION=D_,N_.toFormData=yj,N_.AxiosError=fj,N_.Cancel=N_.CanceledError,N_.all=function(e){return Promise.all(e)},N_.spread=function(e){return function(t){return e.apply(null,t)}},N_.isAxiosError=function(e){return sj.isObject(e)&&!0===e.isAxiosError},N_.mergeConfig=r_,N_.AxiosHeaders=Vj,N_.formToJSON=e=>Lj(sj.isHTMLForm(e)?new FormData(e):e),N_.getAdapter=A_,N_.HttpStatusCode=F_,N_.default=N_;const B_=N_,{Axios:U_,AxiosError:H_,CanceledError:V_,isCancel:q_,CancelToken:W_,VERSION:z_,all:Q_,Cancel:G_,isAxiosError:$_,spread:K_,toFormData:Y_,AxiosHeaders:J_,HttpStatusCode:X_,formToJSON:Z_,getAdapter:eF,mergeConfig:tF}=B_;function nF(e){return function(e){if(Array.isArray(e))return rF(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return rF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rF(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var oF={all:["targettags"],multiAssign:function(){return[].concat(nF(oF.all),["multiassign"])}};function iF(e){return iF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iF(e)}var aF=["batchSize","notFoundPolicy"];function lF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sF(e,t){return sF=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sF(e,t)}function uF(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fF(e);if(t){var o=fF(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return cF(this,n)}}function cF(e,t){if(t&&("object"===iF(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return dF(e)}function dF(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fF(e){return fF=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fF(e)}function pF(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function hF(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pF(i,r,o,a,l,"next",e)}function l(e){pF(i,r,o,a,l,"throw",e)}a(void 0)}))}}function mF(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gF=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sF(e,t)}(i,e);var t,n,r,o=uF(i);function i(e,t,n){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var a,l,s,u=t.flatMap((function(e){var t,n,r;return null!==(t=null===(n=e.response)||void 0===n||null===(r=n.data.info)||void 0===r?void 0:r.entityId)&&void 0!==t?t:[]}));return r=o.call(this,t,e("Tags.Tag.Assign.PartialFail.Message",{tag:n.name,id:n.id,count:u.length}),404),a=dF(r),s=void 0,(l="failedAssignments")in a?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,r.failedAssignments=u,r}return t=i,n&&lF(t.prototype,n),r&&lF(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(Sn),yF=5e3;function bF(e,t){for(var n=0,r=[];n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}var vF="Unexpected error occured on reporting tagging progress.";function SF(e,t){return"".concat(Ei,"/").concat(e,"/assigned").concat(t?"?onNotFoundPolicy=".concat(t):"")}function EF(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e.apply(void 0,n)}catch(o){console.error(vF,o)}}function wF(e){var t=e.progress,n=void 0===t?OF:t,r=Ut(),o=(0,G.useMemo)((function(){return n.total?Math.round(n.processed/n.total*100):0}),[n]);return $().createElement("div",{className:"assign-tag-progress"},$().createElement(Ft.ProgressIndicator,{type:"determinate",value:o,max:"100",className:"assign-tag-progress__bar"}),$().createElement("p",{className:"assign-tag-progress__text"},$().createElement("span",null,r("Tags.Tag.Assign.Progress.Label",{percent:o,processed:n.processed,total:n.total}))))}var OF={inprogress:0,pending:0,processed:0,errored:0,total:0};function AF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return CF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CF(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TF(e){var t,n=e.isOpen,r=e.instruction,o=e.onClose,i=Ut(),a=(0,G.useRef)(null),l=AF((0,G.useState)(!1),2),s=l[0],u=l[1],c=AF((0,G.useState)(null),2),d=c[0],f=c[1],p=AF((0,G.useState)(),2),h=p[0],m=p[1],g=(0,G.useMemo)((function(){var e;return null!==r&&void 0!==r&&r.targets.length?null===r||void 0===r?void 0:r.targets:null!==(e=null===d||void 0===d?void 0:d.targets)&&void 0!==e?e:null}),[r,d]),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.batchSize,n=void 0===t?yF:t,r=e.notFoundPolicy,o=void 0===r?"ON_WHAT_FOUND_AND_FAIL":r,i=mF(e,aF),a=Ut(),l=Bt();return Bn([oF.multiAssign()],function(){var e=hF(regeneratorRuntime.mark((function e(t){var r,i,s,u,c,d,f,p,h,m,g,y,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.tag,i=t.targets,s=t.onProgress,u=SF(r.id,o),c=0,d=0,f=[],p=bF(i,n).reverse();case 6:if(!p.length){e.next=22;break}return h=p.pop(),m=l.put(u,h),EF(s,{processed:c,errored:d,total:i.length,inprogress:h.length,pending:p.reduce((function(e,t){return e+t.length}),0)}),e.prev=10,e.next=13,m;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(10),(g=e.t0.response)&&g.status===X_.NotFound&&(b=null===(y=g.data.info)||void 0===y?void 0:y.entityId,f.push(e.t0),"string"===typeof b?++d:Array.isArray(b)&&(d+=b.length));case 19:c+=h.length,e.next=6;break;case 22:if(EF(s,{processed:c,errored:d,inprogress:0,pending:0,total:i.length}),!f.length){e.next=25;break}throw new gF(a,f,r);case 25:case"end":return e.stop()}}),e,null,[[10,15]])})));return function(t){return e.apply(this,arguments)}}(),i)}(),b=y.isIdle,v=y.isLoading,S=y.isSuccess,E=y.error,w=y.mutate,O=y.reset,A=(0,G.useMemo)((function(){return S||!!E}),[S,E]),C=(0,G.useCallback)((function(){w({tag:r.tag,targets:g,onProgress:m})}),[w,r,g]),T=$().createElement(tn.DialogHeader,{title:i("Tags.Tag.Assign.Dialog.Title"),onCloseBtnClick:function(){return o()},closeBtnDisabled:s||v}),D=b||v?$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:i("Button.Assign"),rejectBtnLabel:i("Button.Cancel"),acceptBtnDisabled:s||v||!(null!==g&&void 0!==g&&g.length),rejectBtnDisabled:s||v,onAcceptBtnClick:function(){C()},onRejectBtnClick:function(){return o()}}):$().createElement(tn.BasicDialogControls,{closeBtnLabel:i("Button.OK"),onCloseBtnClick:function(){return o()}});return(0,G.useEffect)((function(){n||(m(void 0),O())}),[n,O]),(0,G.useEffect)((function(){var e;n&&null!==r&&void 0!==r&&null!==(e=r.targets)&&void 0!==e&&e.length&&b&&C()}),[C,n,r,b]),$().createElement(tn.Dialog,{ref:a,isOpen:n,dialogHeader:T,dialogFooter:D,onClose:function(e){return e.stopPropagation()},onCancel:function(e){e.target===a.current?(e.preventDefault(),e.stopPropagation(),o()):e.stopPropagation()}},!(null!==r&&void 0!==r&&null!==(t=r.targets)&&void 0!==t&&t.length)&&(b||v)&&$().createElement(gk,{onData:f,onIsLoading:u}),E&&$().createElement(Ft.Notification,{type:"error"},$().createElement("span",null,E.message),$().createElement(tn.CopyToClipButton,{value:E.failedAssignments.join(","),title:i("Tags.Tag.Assign.Result.CopyList.Title")})),S&&$().createElement(Ft.Notification,{type:"success"},$().createElement("span",null,i("Tags.Tag.Assign.Success.Message",{tag:null===r||void 0===r?void 0:r.tag.name,id:null===r||void 0===r?void 0:r.tag.id,count:null===g||void 0===g?void 0:g.length}))),(v||A)&&$().createElement(wF,{progress:h}))}function DF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return xF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xF(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PF={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description"};function MF(){var e,t,n=(0,tn.useDialog)(),r=n.isDialogOpen,o=n.showDialog,i=n.closeDialog,a=(0,tn.useDialog)(),l=a.isDialogOpen,s=a.showDialog,u=a.closeDialog,c=DF((0,G.useState)(null),2),d=c[0],f=c[1],p=DF((0,G.useState)("Entity.Label.Name"),2),h=p[0],m=p[1],g=DF((0,G.useState)(),2),y=g[0],b=g[1],v=DF((0,G.useState)(),2),S=v[0],E=v[1],w=Hi().currentFilter,O=fh(lh,{limit:1e3,sort:S,q:Ms(w,[PF[h]],y)}),A=O.data,C=O.error,T=O.isLoading,D=O.fetchNextPage,x=O.isFetchingNextPage,P=ue(),M=(0,G.useCallback)((function(e){S!==e&&E(e)}),[S]),I=(0,G.useCallback)((function(e){y!==e&&b(e)}),[y]);if(C)return $().createElement(tn.ErrorState,{error:C});var R=null!==(e=null===A||void 0===A?void 0:A.pages[A.pages.length-1].total)&&void 0!==e?e:0,L=null!==(t=null===A||void 0===A?void 0:A.pages.flatMap((function(e){return e.content})))&&void 0!==t?t:[];return $().createElement($().Fragment,null,$().createElement(WL,{data:L,totalCount:R,loadingData:T||x,searchKey:h,searchColumns:Object.keys(PF),refreshData:function(){P.resetQueries({queryKey:dh.lists(lh)})},fetchMoreData:D,onSearchChange:I,onSearchKeyChange:function(e){return m(e)},onSortQueryChange:M,onAddTag:function(){o()},onAssignTag:function(e){f({tag:e,fileName:null,targets:[]}),s()}}),$().createElement(Ok,{isOpen:r,onClose:function(e){i(),null!==e&&void 0!==e&&e.targets.length?(f(e),s()):f(null)}}),$().createElement(TF,{isOpen:l,instruction:d,onClose:function(){f(null),u()}}))}function IF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IF(Object(n),!0).forEach((function(t){LF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IF(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}MF.displayName="TargetTagsBlade",MF.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetTagsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetTagsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:zL}))))};var kF={component:MF,name:MF.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(MF.Header,null),onClose:function(){}}};var jF=function(){var e=(0,G.useMemo)((function(){return[RF({},kF)]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})},_F=["title","children","onRefresh","onDownload"];function FF(){return FF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FF.apply(this,arguments)}function NF(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function BF(e){var t=e.title,n=e.children,r=e.onRefresh,o=e.onDownload,i=NF(e,_F),a=Ut();return $().createElement("div",FF({className:"charts-box"},i),$().createElement("div",{className:"charts-box-toolbar"},o&&$().createElement(Ft.Button,{title:a("Button.Download"),icon:"download",mode:"integrated",onClick:o,className:"download"}),r&&$().createElement(Ft.Button,{title:a("Button.Refresh"),icon:"refresh",mode:"integrated",onClick:r,className:"refresh"})),$().createElement("h3",null,t),$().createElement("div",{className:"charts-box-content"},n))}function UF(e){return function(e){if(Array.isArray(e))return HF(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return HF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HF(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var VF={all:["targetsInsights"],status:function(){return[].concat(UF(VF.all),["status"])},countPerMonth:function(e,t){return[].concat(UF(VF.all),["countPerMonth",e,t])}};function qF(e){return function(e){if(Array.isArray(e))return QF(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||zF(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||zF(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zF(e,t){if(e){if("string"===typeof e)return QF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QF(e,t):void 0}}function QF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var GF={IN_SYNC:Jw,REGISTERED:Zw,ERROR:Kw,PENDING:nO,UNKNOWN:iO};function $F(){var e=Ut(),t=WF((0,G.useState)([]),2),n=t[0],r=t[1],o=(0,G.useCallback)((function(e){r((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(qF(t),[e])}))}),[r]),i=function(e,t){return!n.includes(t)},a=Es(VF.status(),"".concat(vi,"/insights/status"),{select:function(e){return e.data}}),l=a.data,s=a.isLoading,u=a.isRefetching,c=a.refetch,d=a.error,f=l?Object.keys(l.state).filter(i):[];return $().createElement(BF,{title:e("TargetInsights.Status.Title"),onRefresh:c,onDownload:l&&function(){return function(){var e=[];l&&Object.keys(l.state).forEach((function(t){e.push("".concat(t,",").concat(l.state[t]))}));var t=new Blob([e.join("\n")],{type:"text/csv;charset=utf-8;"});(0,Xy.saveAs)(t,"overall-targets-statuses.csv")}()}},(s||u)&&$().createElement(Ft.ActivityIndicator,{"data-testid":"stats-target-status-loading"}),d&&$().createElement(tn.ErrorState,{error:d}),l&&!s&&!u&&$().createElement($().Fragment,null,$().createElement(dO,{values:Object.values(l.state),legends:Object.keys(l.state).map((function(t){return e("TargetInsights.Status.".concat(t))})),colors:Object.values(GF),action:o,hidden:n}),$().createElement(LM,{captions:!0,formatter:function(t,n){var r=n.dataset.data[n.dataIndex],o=r/n.dataset.data.reduce((function(e,t){return e+t}),0)*100;if(o<10)return"";var i=o.toFixed(0),a="".concat(r," (").concat(i," %)");return[e("TargetInsights.Status.".concat(f[n.dataIndex])),a]},tooltipFormatter:function(t){var n=e("TargetInsights.Targets.Total",{count:t.dataset.data[t.dataIndex]});return[e("TargetInsights.Status.".concat(f[t.dataIndex])),n]},data:{datasets:[{data:Object.values(l.state).filter(i),backgroundColor:Object.values(GF).filter(i)}]}})))}var KF=["data","options","tooltipFormatter"];function YF(){return YF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YF.apply(this,arguments)}function JF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JF(Object(n),!0).forEach((function(t){ZF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JF(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eN(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tN(e){var t=e.data,n=e.options,r=e.tooltipFormatter,o=void 0===r?function(e){return e.value}:r,i=eN(e,KF),a=t.datasets[0].data.length<25,l={maintainAspectRatio:!1,borderWidth:a?2:1,pointRadius:a?3:2,borderColor:Xw[2],backgroundColor:Xw[2],responsive:!0,interaction:{mode:"index",intersect:!1},stacked:!1,plugins:{tooltip:XF(XF({},sO),{},{enabled:!0,callbacks:{label:o}}),title:{display:!1},legend:{display:!1}},scales:{y:{grid:{color:aO,borderColor:aO},type:"linear",display:!0,position:"left",ticks:{stepSize:1},border:{color:aO}},x:{grid:{color:aO},border:{color:aO},ticks:{autoSkip:!1}}}};return $().createElement("div",YF({className:"charts-line-container"},i),$().createElement(GP,{options:n||l,data:t}))}function nN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return rN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rN(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oN(e,t){return{labels:e.map((function(t,n){var r=e.length-1;if(e.length>12){var o=e.length<61&&t.slice(-2)===e[r-6].slice(-2);return 0===n||t.slice(-2)===e[r].slice(-2)||o?(0,tn.formatDateToMonthYear)(t):""}return(0,tn.formatDateToMonthYear)(t)})),datasets:[{data:e.map((function(e){var n=t.countPerMonth.find((function(t){return t.month===e}));return n?n.count:0}))}]}}function iN(){var e,t,n=Ut(),r=nN((0,G.useState)(3),2),o=r[0],i=r[1],a=(e=(0,tn.getDateWithMonthSubstract)(o),t=(0,tn.getDateWithMonthSubstract)(0),Es(VF.countPerMonth(e,t),"".concat(vi,"/insights/count?startMonth=").concat(e,"&endMonth=").concat(t),{select:function(e){return e.data}})),l=a.refetch,s=a.isRefetching,u=a.isLoading,c=a.error,d=a.data,f=[{name:n("TargetInsights.Targets.Months",{count:3}),value:3,key:"3 months"},{name:n("TargetInsights.Targets.Months",{count:6}),value:6,key:"6 months"},{name:n("TargetInsights.Targets.Years",{count:1}),value:12,key:"12 months"},{name:n("TargetInsights.Targets.Years",{count:2}),value:24,key:"24 months"},{name:n("TargetInsights.Targets.Years",{count:3}),value:36,key:"36 months"},{name:n("TargetInsights.Targets.Years",{count:5}),value:60,key:"60 months"},{name:n("TargetInsights.Targets.Years.All"),value:240,key:"240 months"}],p=o<=60?(0,tn.getMonthsStartingFrom)((0,tn.getDateWithMonthSubstract)(o),"YYYY-MM"):function(){var e=[],t=(0,tn.getMonthsStartingFrom)((0,tn.getDateWithMonthSubstract)(o),"YYYY-MM"),n=null===d||void 0===d?void 0:d.countPerMonth[0].month;return t.forEach((function(r,o){r===n&&0===e.length&&(e=t.slice(o))})),e}();return $().createElement(BF,{title:n("TargetInsights.TargetsCount.Title"),onRefresh:l,onDownload:d&&function(){return function(){var e=[];d&&d.countPerMonth.forEach((function(t){var n=t.month;e.push("".concat(n,",").concat(t.count))}));var t=new Blob([e.join("\n")],{type:"text/csv;charset=utf-8;"}),n=o/12,r=o<12?"".concat(o,"-months"):"".concat(n,"-years");240===o&&(r="all-time"),(0,Xy.saveAs)(t,"targets-per-month-".concat(r,".csv"))}()}},$().createElement("div",null,$().createElement(Ft.Dropdown,{id:"target-insights-stats-by-month",options:f,value:o,onChange:function(e){i(parseInt(e.target.value))}})),(u||s)&&$().createElement(Ft.ActivityIndicator,{"data-testid":"stats-targets-count-loading"}),c&&$().createElement(tn.ErrorState,{error:c}),d&&!u&&!s&&$().createElement(tN,{tooltipFormatter:function(e){var t=n("TargetInsights.Targets.Total",{count:e.dataset.data[e.dataIndex]});return[(0,tn.formatDateToMonthYear)(p[e.dataIndex]),t]},data:oN(p,d)}))}function aN(){var e=(0,G.useRef)(null);return $().createElement("div",{className:"stats-background"},$().createElement("div",{ref:e,className:"charts-boxes-container"},$().createElement($F,null),$().createElement(iN,null)))}Ex.register(Dx,zx,RP,_P,Nx,_x,hP,PP,fP,sP);const lN=l.p+"static/TargetInsights.6f62fcb9.md";function sN(){return $().createElement(aN,null)}sN.displayName="TaretsInsightsBlade",sN.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetsInsightsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetsInsightsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:lN}))))};var uN={component:sN,name:sN.displayName,open:!0,defaults:{fluid:!0,active:!0,header:$().createElement(sN.Header,null),showCloseButton:!1}};var cN=function(){return $().createElement(Ft.Blades,{registrations:[uN],settings:{resizable:!0}})};function dN(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(Wa())},toDetails:function(t){e(Wa(t))}}}(e)}),[e])}const fN=l.p+"static/TargetTypesList.9c6731ab.md";function pN(){var e=Ut();return(0,G.useMemo)((function(){return function(e){var t={isDefault:!0,isSortable:!0},n={isSortable:!0};return[Ea(e("Entity.Label.ID"),"id",n),Ea(e("Entity.Label.Name"),"name",t),Ea(e("Entity.Label.Key"),"key",n),Ea(e("Entity.Label.Description"),"description",t),Aa(e("Entity.Label.CreatedAt"),"createdAt"),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt"),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}(e)}),[e])}var hN="TargetTypeAddModal",mN="TargetTypeUpdateModal";function gN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return yN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yN(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bN(e){var t=e.data,n=e.searchKey,r=e.searchColumns,o=e.fetchMoreData,i=e.onSearchChange,a=e.onSearchKeyChange,l=e.selected,s=e.totalCount,u=e.loadingData,c=e.onSelect,d=e.onRefresh,f=e.onSortQueryChange,p=Ut(),h=Ht(),m=pN(),g=gN((0,G.useState)(m),2),y=g[0],b=g[1],v=gN((0,G.useState)(m),2),S=v[0],E=v[1];Er(S,f);var w=(0,tn.useSortableColumns)(y,b),O=w.sortColumn,A=w.isSortingMultipleColumns,C=w.setIsSortingMultipleColumns,T=w.resetSorting,D=(0,G.useMemo)((function(){return{allColumns:y,onColumnSelectionChange:E,typeName:"target-types",multiSortProps:{isMultiSort:A,onToggleMultiSort:function(e){C(e),T()}}}}),[y,A,T,C]),x=(0,G.useMemo)((function(){return t.find((function(e){return e.id===l}))}),[t,l]),P=(0,G.useMemo)((function(){return gs(O)}),[O]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:s,columnSelectorProps:D,actions:$().createElement($().Fragment,null,$().createElement(es,{onRefresh:d,refreshDisabled:u})),content:$().createElement(hs,{keyedSearchId:"target-types-search",keys:r,searchKey:n,onSearchChange:i,onSearchKeyChange:a}),mainAction:$().createElement(Ft.Button,{title:p("TargetType.AddModal.Button"),icon:"add",mode:"integrated",onClick:function(){return h(hN)}})}),$().createElement(Ft.DataList,{items:t,columns:S,selected:x,onSelect:function(e){return c&&c(e.id)},enableScrolling:!0,emptyStateMessage:p("TargetTypes.List.Empty"),onScrollToBottom:o,onRenderColumnHeader:P,hideCheckBoxes:!0},u&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"target-types-loading"})))}function vN(e){return function(e){if(Array.isArray(e))return SN(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return SN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SN(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var EN={all:["targetTypes"],lists:function(){return[].concat(vN(EN.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(vN(EN.lists()),[e])},details:function(){return[].concat(vN(EN.all),["details"])},ttDetails:function(e){return[].concat(vN(EN.details()),[e])},hasAssignedTargets:function(e){return[].concat(vN(EN.all),[e,"hasAssignedTargets"])},deleteTT:function(e){return[].concat(vN(EN.all),[e,"delete"])},add:function(){return[].concat(vN(EN.all),["add"])},update:function(e){return[].concat(vN(EN.ttDetails(e)),["update"])},addCompatibleDSTypes:function(e){return[].concat(vN(EN.ttDetails(e)),["addCompatibleDSTypes"])},listCompatibleDSTypes:function(e){return[].concat(vN(EN.ttDetails(e)),["listCompatibleDSTypes"])}};function wN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ON(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wN(Object(n),!0).forEach((function(t){AN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CN(e,t){return Fn(EN.list(e),Si,ON({},e),ON({},t))}function TN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return DN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DN(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xN={"Entity.Label.ID":"id","Entity.Label.Name":"name","Entity.Label.Description":"description","Entity.Label.Key":"key"};function PN(){var e=TN((0,G.useState)(),2),t=e[0],n=e[1],r=TN((0,G.useState)("Entity.Label.Name"),2),o=r[0],i=r[1],a=TN((0,G.useState)(),2),l=a[0],s=a[1],u=Hi().currentFilter,c=CN({sort:t,q:Ms(u,[xN[o]],l)}),d=c.data,f=c.isLoading,p=c.isFetchingNextPage,h=c.error,m=c.fetchNextPage,g=dN(),y=(0,ki.useParams)().id,b=(0,G.useCallback)((function(e){l!==e&&s(e)}),[l]),v=(0,G.useCallback)((function(e){t!==e&&n(e)}),[t]),S=ue();if(h)return $().createElement(tn.ErrorState,{error:h});var E=Dn(d),w=E.entities,O=E.totalCount,A=y?parseInt(y):void 0;return $().createElement(bN,{data:w,totalCount:O,loadingData:f||p,selected:A,searchKey:o,searchColumns:Object.keys(xN),onSelect:function(e){g.toDetails(e)},fetchMoreData:m,onRefresh:function(){S.resetQueries({queryKey:EN.all}).catch(console.error)},onSearchKeyChange:function(e){return i(e)},onSearchChange:b,onSortQueryChange:v})}PN.displayName="TargetTypesListBlade",PN.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetTypes.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetTypes.ListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:fN}))))};const MN=l.p+"static/TargetTypesDetails.7919120c.md";function IN(e){var t=e.data,n=Ut(),r=t.id,o=t.name,i=t.key,a=t.description,l=t.createdAt,s=t.createdBy,u=t.lastModifiedAt,c=t.lastModifiedBy;return $().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout"},r&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.ID"),value:r.toString()}),o&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Name"),value:o}),i&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Key"),value:i}),a&&$().createElement(tn.LabelledSection,{header:n("Entity.Label.Description")},a),$().createElement(Ep,{createdAt:l,createdBy:s,lastModifiedAt:u,lastModifiedBy:c}))}var RN=["showConfirmation"];function LN(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function kN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return jN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jN(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _N(e){var t=e.targetType,n=Ut(),r=function(e){var t=Fn(EN.hasAssignedTargets(e),vi,{q:"targettype.name==".concat(Mn(e)),limit:1}),n=t.data,r=t.isLoading,o=t.error;return(0,G.useMemo)((function(){var e;return o?null:!r&&!(null===(e=n.pages[0])||void 0===e||!e.total)}),[n,o,r])}(t.name),o=function(e){var t=Ut(),n=dN(),r=ue(),o=sr("".concat(Si,"/").concat(e.id),{headline:t("TargetType.DeleteConfirmation.Header"),message:t("TargetType.DeleteConfirmation.Message"),entityText:e.name,successMessage:t("TargetType.DeleteSuccess.Message")},{mutationKey:[EN.deleteTT(e.id)],onSuccess:function(){r.resetQueries(EN.lists())}}),i=o.showConfirmation,a=LN(o,RN);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),i=kN(o,2),a=i[0],l=i[1],s=r||l.isLoading,u=Ht();return $().createElement($().Fragment,null,$().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n(s?"TargetType.Actions.DeleteDisabled.Tooltip":"TargetType.Actions.Title")},$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Edit")),icon:"edit",onClick:function(){return u(mN,{initialEntry:t})},title:n("TargetType.Actions.Edit.Tooltip")}),$().createElement(Ft.MenuItem,{label:n("Button.Delete"),icon:"delete",onClick:a,title:n("TargetType.Actions.Delete.Tooltip"),disabled:s})))}function FN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BN(e,t){return Fn(EN.listCompatibleDSTypes(e),"".concat(Si,"/").concat(e,"/compatibledistributionsettypes"),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FN(Object(n),!0).forEach((function(t){NN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))}const UN=l.p+"static/CompatibleDistributionSetTypes.bb6864e2.md";function HN(e){var t=e.targetTypeId,n=Ut(),r=BN(t),o=r.data,i=r.error,a=r.isLoading,l=(null===o||void 0===o?void 0:o.pages[0])||[],s=[{header:n("Entity.Label.Name"),fieldName:"name",resolveCellTitle:function(e){return e.name}},{header:n("Entity.Label.Description"),fieldName:"description",resolveCellTitle:function(e){return e.description}}];return $().createElement(tn.SectionGroup,{label:"",className:"compatible-ds-types"},$().createElement(tn.LabelledSection,{header:n("TargetType.Details.CompatibleDS.Title"),expandable:!0,expanded:!0,popoverHeading:n("TargetType.Details.CompatibleDS.Title"),help:$().createElement(tn.Documentation,{markdownFilePath:UN})},$().createElement("div",{style:{width:"100%"}},i?$().createElement(tn.ErrorState,{error:i}):$().createElement($().Fragment,null,l.length>0&&$().createElement(tn.Margin,{aligned:["top","bottom"]},$().createElement(Ft.CommandBar,{content:n("Entity.Total",{count:l.length})})),$().createElement(Ft.DataList,{hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:n("TargetType.CompatibleDS.EmptyList"),columns:s,items:l},a&&$().createElement(tn.InlineLoadingIndicator,null))))))}function VN(){var e=(0,ki.useParams)().id,t=function(e){return Es(EN.ttDetails(e),"".concat(Si,"/").concat(e),{enabled:"number"===typeof e})}(e?parseInt(e):void 0),n=t.data,r=t.isLoading,o=t.error;return o?$().createElement(tn.ErrorState,{error:o}):r?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(_N,{targetType:n}),$().createElement(IN,{data:n}),$().createElement(Ft.Divider,null),$().createElement(HN,{targetTypeId:(null===n||void 0===n?void 0:n.id)||0}))}function qN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qN(Object(n),!0).forEach((function(t){zN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}VN.displayName="TargetTypesDetailsBlade",VN.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetTypes.DetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetTypes.DetailsBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:MN})))};var QN={component:PN,name:PN.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(PN.Header,null),showCloseButton:!1}},GN={component:VN,name:VN.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(VN.Header,null)}};var $N=function(){var e=dN(),t=(0,ki.useParams)().id,n=(0,G.useMemo)((function(){return t?[QN,WN(WN({},GN),{},{defaults:WN(WN({},GN.defaults),{},{onClose:e.toHome})})]:[QN]}),[t,e]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};const KN=l.p+"static/TargetsList.9accd757.md";var YN,JN,XN={intime:{icon:"clock",tooltip:"TargetDetails.PollStatus.Icon.InTimeTooltip"},overdue:{icon:"alert-warning",tooltip:"TargetDetails.PollStatus.Icon.OverdueTooltip"}};function ZN(e){var t=e.overdue,n=e.processTooltip,r=Ut();return $().createElement(tn.MappedIcon,{value:t?"overdue":"intime",infos:XN,processTooltip:null!==n&&void 0!==n?n:r})}function eB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return tB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nB(e){var t=e.overdue,n=e.lastRequestAt,r=e.pollingOverdueTime,o=e.compactForm,i=Ut(),a=eB((0,G.useMemo)((function(){if(!t||!r)return"";var e=n+function(e){if(!e||"string"!==typeof e.value)return 0;var t=Date.parse("1970-01-01T".concat(e.value,".000Z"));if(Number.isNaN(t))return 0;return t}(r),o=(0,tn.parseTimestamp)(e)||"",a=(0,tn.formatToRelativeTime)(-(Date.now()-e));return[i("TargetDetails.PollStatus.OverdueTime",{timeAgo:a}),i("TargetDetails.PollStatus.OverdueSince",{date:o}),o]}),[i,t,n,r]),3),l=a[0],s=a[1],u=a[2];return o?$().createElement(ZN,{overdue:t,processTooltip:t&&s?function(){return s}:void 0}):$().createElement($().Fragment,null,$().createElement(ZN,{overdue:t}),t&&$().createElement("span",{title:u},l))}function rB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Error="error",e.InSync="in_sync",e.Pending="pending",e.Registered="registered",e.Unknown="unknown"}(YN||(YN={}));var oB=(rB(JN={},YN.Error,{icon:"problem-frame",tooltip:"Target.UpdateStatus.ErrorTooltip",color:"var(--bosch-red-50)"}),rB(JN,YN.InSync,{icon:"checkmark-frame",tooltip:"Target.UpdateStatus.InSyncTooltip",color:"var(--bosch-green-50)"}),rB(JN,YN.Pending,{icon:"circle-half",tooltip:"Target.UpdateStatus.PendingTooltip",color:"var(--bosch-yellow-85)"}),rB(JN,YN.Registered,{icon:"recording",tooltip:"Target.UpdateStatus.RegisteredTooltip"}),rB(JN,YN.Unknown,{icon:"question-frame",tooltip:"Target.UpdateStatus.UnknownTooltip"}),JN);function iB(e){var t=e.updateStatus,n=Ut();return $().createElement(tn.MappedIcon,{value:t,infos:oB,processTooltip:n})}function aB(){return aB=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aB.apply(this,arguments)}function lB(e){if(e)return $().createElement(iB,{updateStatus:e.updateStatus})}function sB(e,t){var n={isDefault:!0,isSortable:!0},r={isSortable:!0};return[Ta(e("Targets.List.UpdateStatus"),"updateStatus",lB,!0),Ta(e("Targets.List.PollStatus"),"pollStatus",(function(e){return function(e,t){if(null!==e&&void 0!==e&&e.pollStatus){var n=e.pollStatus;return $().createElement(nB,aB({},n,{pollingOverdueTime:t,compactForm:!0}))}}(e,t)})),Ea(e("Entity.Label.Name"),"name",n),Ea(e("Entity.Label.Description"),"description",n),{data:{columnId:"targetTypeName",isSortable:!0,sortParamName:"targetType"},header:e("Entity.Label.Type"),resolveCellTitle:function(e){var t;return null!==(t=e.targetTypeName)&&void 0!==t?t:""},fieldName:"targetTypeName"},Aa(e("Entity.Label.CreatedAt"),"createdAt",r),Ca(e("Entity.Label.CreatedBy"),"createdBy"),Aa(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",r),Ca(e("Entity.Label.LastModifiedBy"),"lastModifiedBy"),Ea(e("Targets.List.ControllerId"),"controllerId",r),Aa(e("Targets.List.LastPoll"),"lastControllerRequestAt",r)]}var uB="TargetTagsAssignModal";function cB(e){var t,n;return $().createElement(lm,{title:"Targets.List.AssignTags",tagsEndpoint:lh,entities:(null===(t=e.options)||void 0===t?void 0:t.selectedItems)||[],displayEntity:function(e){return e.name},onClose:e.onClose,dialogId:uB,onSuccess:null===(n=e.options)||void 0===n?void 0:n.onSuccess})}function dB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return fB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pB=(0,G.createContext)(void 0);function hB(){var e=(0,G.useContext)(pB);if(!e)throw Error("TargetsPageContext cannot be used outside of TargetsPageContextProvider");return e}function mB(e){var t=e.children,n=dB((0,G.useState)(0),2),r=n[0],o=n[1];return $().createElement(pB.Provider,{value:{refreshTags:r,setRefreshTags:o}},t)}var gB=l(4641);function yB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yB(Object(n),!0).forEach((function(t){vB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return EB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wB=(0,G.createContext)({generalFilterFields:[],updateQuery:function(){}});function OB(){var e=(0,G.useContext)(wB);if(!e)throw Error("TargetsFilterCtx cannot be used outside of TargetsFilterContextProvider");return e}function AB(e){var t=e.children,n=Ut(),r=(0,G.useRef)(DB(n)),o=SB((0,ki.useSearchParams)(),1)[0].get("fq"),i=SB((0,G.useReducer)(TB,{}),2),a=i[0],l=i[1],s=(0,G.useCallback)((function(e,t){l({type:"update",query:e,hint:null!==t&&void 0!==t?t:r.current})}),[l]),u=(0,G.useMemo)((function(){return HL.map((function(e){return{name:e,label:n("TargetFilter.Field.Label.".concat(e))}}))}),[n]);(0,G.useEffect)((function(){r.current=DB(n)}),[n]),(0,G.useEffect)((function(){o&&s(o,r.current)}),[o,s]);var c=bB(bB({},a),{},{generalFilterFields:u,updateQuery:s});return $().createElement(wB.Provider,{value:c},t)}var CB={};function TB(e,t){if("update"!==t.type)return e;if(!t.query)return CB;if(e.query===t.query)return t.hint&&(!e.hint||e.hint.specificity<=t.hint.specificity)?bB(bB({},e),{},{hint:t.hint}):e;var n=function(e){if(!e)return[];try{return[(0,gB.parse)(e)]}catch(t){return[void 0,t.message]}}(t.query),r=SB(n,2),o=r[0],i=r[1];return{query:t.query,isValid:!!o,hint:t.hint,queryExpression:o,parseErrorMessage:i}}function DB(e){return{text:e("TargetFilter.QueryHint.StandaloneQuery"),specificity:0}}l(7466);function xB(e){var t=e.value,n=e.fields,r=e.onValueChange,o=e.onReset,i=e.fieldsId,a=e.searchTextId,l=Ut(),s=(0,G.useId)(),u=(0,G.useId)(),c=(0,G.useMemo)((function(){return n.map((function(e){return{value:e.name,name:e.label}}))}),[n]),d=(0,G.useMemo)((function(){return l("FieldFilter.Placeholder")}),[l]);return $().createElement($().Fragment,null,$().createElement(Ft.Dropdown,{id:null!==i&&void 0!==i?i:s,style:{minWidth:"7rem"},title:l("FieldFilter.Dropdown.Title"),options:c,value:t.field,onChange:function(e){r({field:e.target.value,searchText:t.searchText})}}),$().createElement(Ft.SearchForm,{onReset:o,className:"rollouts-search-form".concat(t.searchText?"":" hide-reset-button"),searchField:{style:{minWidth:"17rem"},type:"search",id:null!==a&&void 0!==a?a:u,placeholder:d,title:t.searchText||d,value:t.searchText,onChange:function(e){r({field:t.field,searchText:e.target.value})}}}))}function PB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return MB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var IB=[kL,ML,IL,NL,FL,jL];function RB(){var e,t=OB(),n=t.query,r=t.updateQuery,o=t.queryExpression,i=t.generalFilterFields,a=(0,G.useMemo)((function(){return i.filter((function(e){return IB.includes(e.name)}))}),[i]),l=PB((0,G.useState)(a[0].name),2),s=l[0],u=l[1],c=(0,G.useCallback)((function(e){u(e.field),e.searchText?r((0,CL.emit)(AL().eq(e.field,"*".concat(e.searchText,"*")))):r("")}),[u,r]),d={field:s,searchText:""};return o&&function(e){if("COMPARISON"===e.type&&"=="===e.operator&&IB.find((function(t){return t===e.left.selector}))){var t=e.right.value;return"string"===typeof t&&t.trim().length>2&&t.trim().startsWith("*")&&t.trim().endsWith("*")}return!1}(o)&&(d={field:(e=o).left.selector,searchText:e.right.value.substring(1,e.right.value.length-1)}),(0,G.useEffect)((function(){u(d.field)}),[u,d.field]),(0,G.useEffect)((function(){}),[n,r,o]),$().createElement(xB,{value:d,fields:a,onValueChange:function(e){c(e)},onReset:function(){r("")}})}function LB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return kB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jB(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.selected,i=e.pollingOverdueTime,a=e.onSelect,l=e.fetchMoreData,s=e.onRefresh,u=e.autoRefresh,c=e.onToggleAutoRefresh,d=e.onSortQueryChange,f=e.showAppliedFilter,p=Ut(),h=OB(),m=h.query,g=h.hint,y=hB(),b=y.refreshTags,v=y.setRefreshTags,S=vv(),E=k$(),w=function(e){var t=Ut();return(0,G.useMemo)((function(){return sB(t,e)}),[t,e])}(i),O=LB((0,G.useState)(w),2),A=O[0],C=O[1],T=LB((0,G.useState)(w),2),D=T[0],x=T[1];Er(A,d);var P=(0,tn.useSortableColumns)(A,C),M=P.sortColumn,I=P.isSortingMultipleColumns,R=P.setIsSortingMultipleColumns,L=P.resetSorting,k=(0,G.useMemo)((function(){return{allColumns:A,onColumnSelectionChange:x,typeName:"targets",multiSortProps:{isMultiSort:I,onToggleMultiSort:function(e){R(e),L()}}}}),[A,I,L,R]),j=Ht(),_=LB((0,G.useState)([]),2),F=_[0],N=_[1],B=(0,G.useMemo)((function(){return t.find((function(e){return e.controllerId===o}))}),[t,o]),U=(0,G.useCallback)((function(){if(F.length){var e=function(e){return"controllerid=in=(".concat(e.map((function(e){return Mn(e.controllerId)})).join(","),")")}(F);e.length>1024?j(DL):S.toNew(e)}}),[S,F,j]),H=(0,G.useCallback)((function(){F.length&&E.toAssignTargets(F)}),[E,F]),V=(0,G.useMemo)((function(){return gs(M)}),[M]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,columnSelectorProps:k,actions:$().createElement($().Fragment,null,$().createElement(Ft.Button,{title:p("Targets.List.AssignTags"),icon:"label",mode:"integrated",disabled:!F.length,onClick:function(){return j(uB,{selectedItems:F,onSuccess:function(){return v(b+1)}})}}),$().createElement(Ft.Button,{title:p("Targets.List.AssignDistribution"),icon:"link",mode:"integrated",onClick:H,disabled:!F.length}),$().createElement(Ft.Button,{title:p("Targets.List.CreateRollout"),icon:"box-delivery",mode:"integrated",onClick:U,disabled:!F.length}),$().createElement(es,{onRefresh:s,refreshDisabled:r,autoRefresh:u,onToggleAutoRefresh:c})),content:$().createElement($().Fragment,null,$().createElement(RB,null),f&&g?$().createElement(Ft.Chip,{label:g.text,selected:!0,title:m}):null),mainAction:$().createElement(Ft.Button,{title:p("Target.AddModal.Button"),icon:"add",mode:"integrated",onClick:function(){return j(xL)}})}),$().createElement(Ft.DataList,{className:n===t.length?void 0:"rollouts-data-list_hide-check-all",items:t,columns:D,selected:B,onSelect:function(e){return a&&a(e.controllerId)},enableScrolling:!0,emptyStateMessage:p("Targets.List.Empty"),onScrollToBottom:l,onRenderColumnHeader:V,checked:F,onChecked:N},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"targets-list-loading"})))}function _B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return FB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FB(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NB=[];function BB(){var e,t,n,r=OB().query,o=_B(us(r,600),2),i=o[0],a=o[1],l=(0,ki.useParams)().controllerId;l=null===(e=l)||void 0===e?void 0:e.trim();var s=zR(),u=_B(cs(),2),c=u[0],d=u[1],f=_B((0,G.useState)(),2),p=f[0],h=f[1],m=KE(KS.pollingOverdueTime(),"pollingOverdueTime"),g=YS({sort:p,q:i},{refetchInterval:!!c&&Z}),y=g.data,b=g.isLoading,v=g.isFetchingNextPage,S=g.error,E=g.fetchNextPage,w=ue(),O=(0,G.useCallback)((function(){w.resetQueries(KS.pollingOverdueTime(),{exact:!0})}),[w]);if((0,G.useEffect)((function(){a(r),r||a.flush()}),[r,a]),S)return $().createElement(tn.ErrorState,{error:S});var A=null!==(t=null===y||void 0===y?void 0:y.pages[y.pages.length-1].total)&&void 0!==t?t:0,C=null!==(n=null===y||void 0===y?void 0:y.pages.flatMap((function(e){return e.content})))&&void 0!==n?n:NB;return m.isLoading?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"targets-poll-overdue-loading"})):$().createElement($().Fragment,null,m.error&&$().createElement("div",{className:"margin-bottom-1"},$().createElement(tn.ErrorState,{error:m.error,actions:$().createElement(dp,{onRetry:O})})),$().createElement(jB,{data:C,totalCount:A,loadingData:b||v,selected:l,pollingOverdueTime:m.data,onSelect:function(e){return s.toDetails(e)},fetchMoreData:E,onRefresh:function(){w.resetQueries({queryKey:KS.lists()})},autoRefresh:c,onToggleAutoRefresh:d,onSortQueryChange:h,showAppliedFilter:!!i}))}BB.displayName="TargetsListBlade",BB.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetsListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetsListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:KN}))))};const UB=l.p+"static/TargetFilter.98e02879.md";function HB(e){var t=ue();return Yn(gE.update(e),"".concat(wi,"/").concat(e),{onSuccess:function(n){t.setQueryData(gE.targetFilter(e),{data:n}),t.resetQueries(gE.lists())}})}var VB=["showConfirmation"];function qB(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}l(3408);function WB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WB(Object(n),!0).forEach((function(t){QB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WB(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GB(e){if("comparison"===e.type)return AL().comparison(e.selector,e.operator,e.value);if("logic"===e.type)return AL().logic(e.nodes.map((function(e){return GB(e)})),e.operator);throw new Error('Invalid query node type "'.concat(e.type,'"'))}function $B(e){if(e.length)return(0,CL.emit)(AL().logic(e.map((function(e){return GB(e)})),wL.AND_VERBOSE))}function KB(e,t){var n=e.left.selector,r=n.startsWith(BL)?"attributes":n.startsWith(UL)?"metadata":"general";return{id:t,type:"comparison",selector:n,operator:e.operator,value:e.right.value,fieldInfo:{name:n,group:r},query:(0,CL.emit)(e)}}function YB(e,t){var n,r=zB(zB({},e),t);return r.query=null!==(n=$B([r]))&&void 0!==n?n:"",r}function JB(e){switch(e){case RL:case LL:case _L:return!0;default:return!1}}function XB(e){switch(e){case wL.IN:case wL.OUT:return!0;default:return!1}}function ZB(e){return e===wL.AND||e===wL.AND_VERBOSE}function eU(e){return function(e){if(Array.isArray(e))return aU(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||iU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tU(Object(n),!0).forEach((function(t){rU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||iU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iU(e,t){if(e){if("string"===typeof e)return aU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aU(e,t):void 0}}function aU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lU=(0,G.createContext)({nodes:[],query:"",createNodeId:function(){return Date.now().toString()},pushNodes:function(){},updateNode:function(){},removeNode:function(){},clear:function(){}});function sU(){var e=(0,G.useContext)(lU);if(!e)throw Error("ExpressionBuilderContext cannot be used outside of ExpressionBuilderContextProvider");return e}var uU={nodes:[],query:""};function cU(e){var t=e.children,n=oU((0,G.useReducer)(dU,uU),2),r=n[0],o=n[1],i=(0,G.useRef)(0),a=(0,G.useCallback)((function(){return++i.current+""}),[]),l=(0,G.useCallback)((function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o({type:"push",nodes:t})}),[o]),s=(0,G.useCallback)((function(e){o({type:"update",node:e})}),[o]),u=(0,G.useCallback)((function(e){o({type:"remove",id:e})}),[o]),c=(0,G.useCallback)((function(){o({type:"clear"})}),[o]);(0,G.useEffect)((function(){return function(){c()}}),[c]);var d=nU(nU({},r),{},{createNodeId:a,pushNodes:l,updateNode:s,removeNode:u,clear:c});return $().createElement(lU.Provider,{value:d},t)}function dU(e,t){if("clear"===t.type)return uU;var n=e.nodes;if("push"===t.type)n=[].concat(eU(n),eU(t.nodes));else if("remove"===t.type){var r=n.findIndex((function(e){return e.id===t.id}));if(r<0)return e;(n=n.slice(0)).splice(r,1)}else{if("update"!==t.type)return e;var o=n.findIndex((function(e){return e.id===t.node.id}));if(o<0)return e;(n=n.slice(0)).splice(o,1,t.node)}return{nodes:n,query:$B(n)}}function fU(e){var t=e.background,n=e.highlight,r=e.children,o=e.className,i=e.disabled,a=e.onRemove,l=e.onUpdate,s=Ut(),u=!(!a&&!l),c=(0,G.useMemo)((function(){var e=["expression-tile"];return t&&e.push("-".concat(t)),n&&e.push("-".concat(n)),o&&e.push(o),u&&e.push("-with-actions"),e.join(" ")}),[t,n,o,u]);return $().createElement("div",{className:c},$().createElement("div",{className:"expression-tile__content"}," ",r),a&&$().createElement(Ft.Button,{className:"expression-tile__action expression-tile__action-remove",action:"close","aria-label":"close card",mode:"integrated",icon:mU,onClick:a,title:s("TargetFilterBuilder.ExpressionTile.Remove.Tooltip"),disabled:i}),l&&$().createElement(Ft.Button,{className:"expression-tile__action expression-tile__action-edit",action:"edit","aria-label":"edit card",mode:"integrated",icon:hU,onClick:l,title:s("TargetFilterBuilder.ExpressionTile.Update.Tooltip"),disabled:i}))}var pU,hU={iconName:"edit",isUiIcon:!0},mU={iconName:"close-small",isUiIcon:!0};function gU(e){var t=e.node,n=e.onUpdate,r=e.onRemove,o=yU;return $().createElement(fU,{background:"secondary",onRemove:function(){return r(t)},onUpdate:function(){return n(t)}},$().createElement(o,{node:t}))}function yU(e){var t,n=e.node;return"comparison"===n.type&&JB(n.selector)&&!Array.isArray(n.value)&&n.value?$().createElement($().Fragment,null,$().createElement("span",null,n.selector),$().createElement("span",null,n.operator),$().createElement("span",{title:null!==(t=(0,tn.parseTimestamp)(parseInt(n.value,10)))&&void 0!==t?t:""},n.value)):$().createElement($().Fragment,null,n.query)}function bU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vU(e){var t=e.operator;return $().createElement(fU,{background:"secondary",className:"expression__logic-operator"},SU[t])}var SU=(bU(pU={},wL.AND_VERBOSE,"&"),bU(pU,wL.AND,"&"),bU(pU,wL.OR_VERBOSE,"||"),bU(pU,wL.OR,"||"),pU);function EU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EU(Object(n),!0).forEach((function(t){OU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AU(e){var t=e.nodes,n=e.onAddNode,r=e.onRemoveNode,o=e.onUpdateNode,i=Ut(),a=sU().createNodeId,l=(0,G.useCallback)((function(){var e;n((e=a(),wU(wU({},TU),{},{id:e})))}),[n,a]);return $().createElement("div",{className:"expression-cards-list"},t.map((function(e,n){return $().createElement(G.Fragment,{key:e.id},$().createElement(gU,{node:e,onRemove:r,onUpdate:o}),n<t.length-1&&$().createElement(vU,{operator:wL.AND_VERBOSE}))})),$().createElement(fU,{className:"expression__add-btn",background:"secondary"},$().createElement(Ft.Button,{action:"add","aria-label":"add card",mode:"integrated",icon:CU,onClick:l,title:i("TargetFilterBuilder.ExpressionList.Add.Tooltip"),children:!t.length&&i("TargetFilterBuilder.ExpressionList.Message.Empty")})))}var CU={iconName:"add-frame",isUiIcon:!0},TU={id:"",type:"comparison",fieldInfo:{name:ML,group:"general"},selector:ML,operator:wL.EQ,value:"",query:""};TU.query=$B([TU]);var DU=["value","onValueChange","className"];function xU(){return xU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xU.apply(this,arguments)}function PU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||IU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MU(e){return function(e){if(Array.isArray(e))return RU(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||IU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IU(e,t){if(e){if("string"===typeof e)return RU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RU(e,t):void 0}}function RU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function kU(e){var t=e.value,n=e.onValueChange,r=e.className,o=LU(e,DU),i=(0,G.useId)(),a=(0,G.useId)(),l=Ut(),s=(0,G.useMemo)((function(){var e=HL.map((function(e){return{name:e,value:e}}));return[].concat(MU(e),[{name:BL,value:BL},{name:UL,value:UL}])}),[]),u=PU((0,G.useState)((function(){return t?BU(t)[0]:jU})),2),c=u[0],d=u[1],f=PU((0,G.useState)((function(){return t?BU(t)[1]:_U})),2),p=f[0],h=f[1],m=PU((0,G.useState)(FU),2),g=m[0],y=m[1],b=(0,G.useCallback)((function(e){var t=e.target.value,r=t!==BL&&t!==UL||!!p;n({value:e.target.value,isValid:r})}),[n,p]),v=(0,G.useCallback)((function(e){var t=e.target.value;n({value:"".concat(c).concat(t),isValid:!!t})}),[n,c]),S=(0,G.useMemo)((function(){return r?"".concat(NU," ").concat(r):NU}),[r]);return(0,G.useEffect)((function(){if(!t)return d(jU),h(_U),void y(FU);var e=PU(BU(t),2),n=e[0],r=e[1];d(n),h(r),y(l(n===BL?"TargetFilterBuilder.FieldSelector.Attribute.Label":"TargetFilterBuilder.FieldSelector.Metadata.Label"))}),[l,t,d,h]),$().createElement("div",xU({className:S},o),$().createElement(Ft.Dropdown,{id:i,options:s,value:c,onChange:b,label:l("TargetFilterBuilder.FieldSelector.Label")}),null!==p&&$().createElement(Ft.TextField,{id:a,value:p,onChange:v,title:p,label:g}))}var jU=HL[0],_U=null,FU=void 0,NU="comparison-selector__input";function BU(e){return e.startsWith(BL)?[BL,e.substring(BL.length)]:e.startsWith(UL)?[UL,e.substring(UL.length)]:[e,null]}var UU=["value","operators","onValueChange","className"];function HU(){return HU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HU.apply(this,arguments)}function VU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qU(e){var t=e.value,n=e.operators,r=e.onValueChange,o=e.className,i=VU(e,UU),a=Ut(),l=(0,G.useId)(),s=(0,G.useMemo)((function(){return o?"".concat(WU," ").concat(o):WU}),[o]),u=(0,G.useMemo)((function(){return n?n.reduce((function(e,t){return e[t]=zU[t],e}),{}):zU}),[n]);return $().createElement(Ft.Dropdown,HU({id:l,className:s,title:a("TargetFilter.Comparison.Operator.Label.".concat(t)),label:a("TargetFilter.Comparison.Operator.Label"),options:u,value:t,onChange:function(e){r(e.target.value)}},i))}var WU="comparison-operator__input",zU=wL.CanonicalComparisonOperators.map((function(e){return{name:e,value:e}}));function QU(e){var t=e.value,n=e.onChange,r=(0,G.useId)(),o=Ut(),i=Array.isArray(t),a=i?t.join("\n"):t;return $().createElement(Ft.TextArea,{id:r,className:"comparison-generic-value",required:!0,value:a,onChange:function(e){return function(e){n(i?{value:e.split("\n"),isValid:!0}:{value:e,isValid:!0})}(e.target.value)},label:o("TargetFilterBuilder.ValueInput.Label"),rows:2})}l(1160),l(6993);var GU=["value","label","onChange"];function $U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return KU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KU(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YU(){return YU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YU.apply(this,arguments)}function JU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function XU(e){var t=e.value,n=e.label,r=e.onChange,o=JU(e,GU),i=Ut(),a=(0,G.useCallback)((function(e){null===r||void 0===r||r(nH.get(parseInt(e.target.value,10)))}),[r]);return(0,G.useEffect)((function(){"number"!==typeof t&&(null===r||void 0===r||r(nH.get(ZU)))}),[t,r]),$().createElement(Ft.Dropdown,YU({label:null!==n&&void 0!==n?n:i("TimeZone.Offset.Label"),options:tH,value:null!==t&&void 0!==t?t:ZU,onChange:a},o))}var ZU=-1*(new Date).getTimezoneOffset();var eH=/([+-])(\d+)(?::(\d+))?/,tH=function(){var e=new Set;return Intl.supportedValuesOf("timeZone").forEach((function(t){var n,r=null===(n=Intl.DateTimeFormat("ia",{timeZoneName:"short",timeZone:t}).formatToParts().find((function(e){return"timeZoneName"===e.type})))||void 0===n?void 0:n.value;r&&r.startsWith("GMT")&&e.add(r)})),Array.from(e).map((function(e){var t=e.match(eH),n=$U(null!==t&&void 0!==t?t:[],4),r=n[1],o=void 0===r?"+":r,i=n[2],a=void 0===i?"0":i,l=n[3],s=void 0===l?"0":l,u="-"===o?-1:1;return{value:(60*parseInt(a,10)+parseInt(s,10))*u,name:"".concat(o).concat(a.padStart(2,"0"),":").concat(s.padStart(2,"0"))}})).sort((function(e,t){return e.value-t.value}))}(),nH=tH.reduce((function(e,t){return e.set(t.value,{minutes:t.value,text:t.name}),e}),new Map);function rH(e){var t=e.value,n=e.onChange,r=Ut(),o=(0,G.useId)();function i(e){var t,r,o,i=new Date("".concat(e).concat(null!==(t=null===(o=ZU,r=nH.get(o))||void 0===r?void 0:r.text)&&void 0!==t?t:"")).getTime();n({value:i+"",isValid:!0})}var a,l=(0,G.useMemo)((function(){return t?parseInt(t,10):Date.now()}),[t]);return(0,G.useEffect)((function(){t||n({value:l+"",isValid:!0})}),[t,l,n]),$().createElement("div",{className:"comparison-datetime-value"},$().createElement("div",{className:" labeled-input"},$().createElement("label",{className:"labeled-input__label"},r("TargetFilterBuilder.ValueInput.Label")),$().createElement("input",{id:o,className:"labeled-input__input",type:"datetime-local",value:(a=l,new Date(a+60*ZU*1e3).toISOString().substring(0,23)),onChange:function(e){i(e.target.value)}})))}function oH(e){return function(e){if(Array.isArray(e))return lH(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||aH(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||aH(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aH(e,t){if(e){if("string"===typeof e)return lH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lH(e,t):void 0}}function lH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sH(e){var t=e.expression,n=e.onChange,r=iH((0,G.useState)([]),2),o=r[0],i=r[1],a=iH((0,G.useState)(),2),l=a[0],s=a[1],u=(0,G.useCallback)((function(e,t){var n=function(e,t,n){var r=e.indexOf(t);if(!n&&r<0)return[].concat(oH(e),[t]);if(n&&r>-1){var o=e.slice(0);return o.splice(r,1),o}return e}(o,e,t);return i(n),n}),[o,i]),c=function(e){var r=u(cH,e.isValid);n({expression:YB(t,{value:e.value}),isValid:!r.length})};(0,G.useEffect)((function(){t.query}),[t,l,s]);var d=JB(t.selector)&&"string"===typeof t.value?$().createElement(rH,{value:t.value,onChange:c}):$().createElement(QU,{value:t.value,onChange:c});return $().createElement("div",{className:"rsql-comparison"},$().createElement(kU,{value:t.selector,onValueChange:function(e){var r;n({expression:YB(t,{selector:e.value,fieldInfo:{name:e.value,group:(r=e.value,r.startsWith(BL)?"attributes":r.startsWith(UL)?"metadata":"general")},value:dH(e.value,t.selector,t.operator,t.value)}),isValid:!u(uH,e.isValid).length})}}),$().createElement(qU,{value:t.operator,onValueChange:function(e){var r=t.value;"string"!==typeof r||e!==wL.IN&&e!==wL.OUT||(r=r.split("\n")),Array.isArray(r)&&e!==wL.IN&&e!==wL.OUT&&(r=r.join("\n")),n({expression:YB(t,{operator:e,value:fH(e,t.operator,t.selector,r)}),isValid:!o.length})}}),d)}var uH="selector",cH="value";function dH(e,t,n,r){return JB(e)?XB(n)?"":"".concat(Date.now()):JB(t)?"":r}function fH(e,t,n,r){if(JB(n))if(XB(e)){if(!XB(t))return[r]}else if(XB(t))return Array.isArray(r)&&r[0]?r[0]:"".concat(Date.now());return r}function pH(e){var t=e.expression,n=e.onChange;return function(e){return"comparison"===e.type}(t)?$().createElement(sH,{expression:t,onChange:n}):null}function hH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return mH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gH(e){var t=e.isOpen,n=e.query,r=e.onClose,o=(0,G.useId)(),i=Ut(),a=hH((0,G.useState)("list"),2),l=a[0],s=a[1],u=hH((0,G.useState)(!1),2),c=u[0],d=u[1],f=hH((0,G.useState)(null),2),p=f[0],h=f[1],m=hH((0,G.useState)(!0),2),g=m[0],y=m[1],b=sU(),v=b.nodes,S=b.query,E=b.createNodeId,w=b.removeNode,O=b.updateNode,A=b.pushNodes,C=b.clear,T=(0,G.useMemo)((function(){var e="TargetFilterBuilder.Dialog.List.Title",t="TargetFilterBuilder.Dialog.List.AcceptBtn.Label";return"add"===l?(e="TargetFilterBuilder.Dialog.Add.Title",t="TargetFilterBuilder.Dialog.Add.AcceptBtn.Label"):"update"===l?(e="TargetFilterBuilder.Dialog.Update.Title",t="TargetFilterBuilder.Dialog.Update.AcceptBtn.Label"):c&&(t="TargetFilterBuilder.Dialog.Update.AcceptBtn.Label"),{title:i(e),acceptLabel:i(t),rejectLabel:i("Button.Cancel")}}),[i,l,c]),D=(0,G.useMemo)((function(){return"list"!==l&&p?p.query:S}),[l,S,p]),x=(0,G.useMemo)((function(){return"list"===l?v.length<1:!g}),[v,l,g]),P=(0,G.useCallback)((function(e){s("add"),h(e)}),[s,h]),M=(0,G.useCallback)((function(e){s("update"),h(e)}),[s,h]),I=(0,G.useCallback)((function(e){w(e.id)}),[w]),R=(0,G.useCallback)((function(e){h(e.expression),y(e.isValid)}),[h,y]),L=(0,G.useCallback)((function(){"list"!==l?p&&("add"===l?A(p):"update"===l&&O(p),s("list")):r(S)}),[l,s,r,S,p,A,O]),k=(0,G.useCallback)((function(){"list"!==l?(s("list"),h(null)):r()}),[l,s,r]);return(0,G.useEffect)((function(){if(t){var e=[];(function(e,t,n){if(!e)return!1;var r=[(0,gB.parse)(e)];for(;r.length;){var o=r.pop();if((0,wL.isComparisonNode)(o))t.push(KB(o,n()));else{if(!(0,wL.isLogicNode)(o))return!1;if(!ZB(o.operator))return!1;r.push(o.right,o.left)}}return!0})(n,e,E)&&e.length&&(A.apply(void 0,e),d(!0))}else d(!1)}),[t,n,E,A,d]),(0,G.useEffect)((function(){t||C()}),[t,C]),$().createElement(tn.Dialog,{isOpen:t,onClose:function(e){e.stopPropagation()},onCancel:function(e){e.stopPropagation(),e.preventDefault(),k()},dialogHeader:$().createElement(tn.DialogHeader,{title:T.title,onCloseBtnClick:function(){return r()}}),dialogFooter:$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:T.acceptLabel,acceptBtnDisabled:x,onAcceptBtnClick:L,rejectBtnLabel:T.rejectLabel,onRejectBtnClick:k}),className:"expression-builder -".concat(l)},t&&$().createElement($().Fragment,null,$().createElement("div",{className:"query-preview"},$().createElement(Ft.TextArea,{id:o,required:!0,label:i("TargetFilterBuilder.Dialog.QueryPreview.Label"),defaultValue:D,readOnly:!0,rows:2})),$().createElement("div",{className:"expression-builder__container"},"list"===l&&$().createElement(AU,{nodes:v,onAddNode:P,onRemoveNode:I,onUpdateNode:M}),"list"!==l&&p&&$().createElement(pH,{expression:p,onChange:R}))))}function yH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return bH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vH(){var e=Ut(),t=Ht(),n=function(){var e=Ht(),t=(0,G.useRef)();return(0,G.useCallback)((function(n,r,o){t.current=function(t){return e(TL,t)}({onCancel:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.call(t)},query:n,existingNames:r,onSuccess:o})}),[e])}(),r=OB(),o=r.query,i=r.updateQuery,a=yH((0,G.useState)(null),2),l=a[0],s=a[1],u=function(e){var t,n=Ut(),r=ue(),o=OB().updateQuery,i=sr("".concat(wi,"/").concat(null===e||void 0===e?void 0:e.id),{headline:n("TargetFilter.DeleteConfirmation.Header"),message:n("TargetFilter.DeleteConfirmation.Message"),entityText:null===e||void 0===e?void 0:e.name,successMessage:n("TargetFilter.DeleteSuccess.Message")},{mutationKey:[gE.deleteTargetFilter(null!==(t=null===e||void 0===e?void 0:e.id)&&void 0!==t?t:0)],onSuccess:function(){r.resetQueries(gE.lists()),o("")}}),a=i.showConfirmation,l=qB(i,VB);return[(0,G.useCallback)((function(){e&&a()}),[e,a]),l]}(l),c=yH(u,2),d=c[0],f=c[1],p=yH((0,G.useState)(""),2),h=p[0],m=p[1],g=(0,tn.useDialog)(),y=g.isDialogOpen,b=g.showDialog,v=g.closeDialog,S=yE({limit:20,sort:"name:ASC",q:h?En(h,{convertToQParam:function(e){return"name==".concat(e)}}):void 0}),E=S.data,w=S.isLoading,O=S.isFetchingNextPage,A=S.error,C=S.fetchNextPage,T=Dn(E),D=T.totalCount,x=T.entities,P=(0,G.useMemo)((function(){return x.find((function(e){return e.id===(null===l||void 0===l?void 0:l.id)}))}),[x,l]),M=(0,G.useMemo)((function(){return l?l.query!==o:!!o}),[o,l]),I=function(e,t,n){var r=Ut(),o=Ht(),i=Vt(),a=HB(t),l=a.mutate,s=a.error,u=a.isSuccess,c=(0,G.useCallback)((function(){var t=o("confirm",{variant:null!==s&&void 0!==s&&s.message?"error":"",error:s,headline:r("TargetFilterUpdateModal.Header"),message:r("TargetFilterUpdateModal.Message",{filter:e.name}),confirmLabel:null!==s&&void 0!==s&&s.message?r("Button.Retry"):r("Button.Update"),onConfirm:function(){t(),l(e,{onSuccess:n})},onCancel:function(){t()}})}),[r,o,l,s,e,n]);return(0,G.useEffect)((function(){u&&i(r("TargetFilterUpdateModal.SuccessMessage"))}),[i,u,r]),(0,G.useEffect)((function(){s&&c()}),[s,c]),c}({name:null===P||void 0===P?void 0:P.name,query:o},(null===P||void 0===P?void 0:P.id)||0,(function(){var t;i(o,SH(e,null!==(t=null===P||void 0===P?void 0:P.name)&&void 0!==t?t:""))})),R=(0,G.useCallback)((function(e){v(),e&&i(e)}),[v,i]);return A?$().createElement(tn.ErrorState,{error:A}):$().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:null,actions:$().createElement($().Fragment,null,$().createElement(Ft.Button,{title:e("Button.Save"),icon:"save",mode:"integrated",onClick:function(){var t;o&&(P?I():n(o,null!==(t=null===x||void 0===x?void 0:x.map((function(e){return e.name})))&&void 0!==t?t:[],(function(t){s(t),i(t.query,SH(e,t.name))})))},disabled:!M}),$().createElement(Ft.Button,{title:e("Button.Delete"),icon:"delete",mode:"integrated",onClick:function(){return l&&d()},disabled:!P||f.isLoading})),content:$().createElement(tn.SuggestionSelect,{label:e("TargetFilterList.LoadFilter"),loadMoreLabel:e("TargetFilterList.LoadMoreFilter"),buttonTitle:e("TargetFilterList.LoadFilterOpenTooltip"),resetTitle:e("TargetFilterList.LoadFilterResetTooltip"),entries:x.map((function(e){return e.name})),onLoadMore:x.length!==D?C:void 0,onTextChange:m,selected:null===l||void 0===l?void 0:l.name,onSelect:function(n){if(!n)return s(null),void i(void 0);var r=x.find((function(e){return e.name===n}));if(r){if(!o||l&&l.query===o)return s(r),void i(null===r||void 0===r?void 0:r.query,SH(e,r.name));var a=t("confirm",{variant:"warning",headline:e("TargetFilterChangeModal.Header"),message:e("TargetFilterChangeModal.Message"),confirmLabel:e("Button.Discard"),onConfirm:function(){s(r),i(null===r||void 0===r?void 0:r.query,SH(e,null===r||void 0===r?void 0:r.name)),a()},onCancel:function(){return a()}})}else console.warn("Available target filters out-of-sync with presented options")},loading:w||O,renderEntry:function(e){return $().createElement(bE,{targetFilter:x.find((function(t){return t.name===e}))})}})}),$().createElement("div",{className:"query-input__wrapper"},$().createElement(Ft.TextArea,{id:"console-target-filters-query-input",className:"query-input__query",required:!0,label:e("Entity.Label.Query"),value:null!==o&&void 0!==o?o:"",onChange:function(e){return i(e.target.value)},"aria-label":"query input"}),$().createElement("div",{className:"query-input__actions"},$().createElement(Ft.Button,{className:"query-input__action-edit","aria-label":"edit query",mode:"integrated",icon:"edit",onClick:function(){b()},title:e("Button.Edit")}),$().createElement(Ft.Button,{className:"query-input__action-clear","aria-label":"clear query",mode:"integrated",icon:"delete",onClick:function(){i(void 0)},title:e("Button.Clear")}))),$().createElement(cU,null,$().createElement(gH,{isOpen:y,query:o,onClose:R})))}function SH(e,t){return{text:e("TargetFilter.QueryHint.TargetFilterQuery",{name:t}),specificity:1}}function EH(){return $().createElement(vH,null)}EH.displayName="TargetFilterBlade",EH.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetFilterBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetFilterBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:UB}))))};const wH=l.p+"static/TargetDetails.1ba02776.md";function OH(){return OH=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OH.apply(this,arguments)}function AH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return CH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TH(e){var t=e.target,n=e.assignedDS,r=e.installedDS,o=e.pollingOverdueTime,i=Ut(),a=AH((0,G.useState)(!1),2),l=a[0],s=a[1],u=t.controllerId,c=t.name,d=t.description,f=t.targetTypeName,p=t.address,h=t.securityToken,m=t.updateStatus,g=t.pollStatus,y=t.lastControllerRequestAt,b=t.createdAt,v=t.createdBy,S=t.lastModifiedAt,E=t.lastModifiedBy;return $().createElement($().Fragment,null,$().createElement(tn.SectionGroup,{label:"",className:"basic-details-layout",style:{marginBottom:0}},$().createElement(tn.LabelledSection,{showCopy:!0,header:i("TargetDetails.Label.ControllerId"),value:u},$().createElement("div",{className:"keep-actions-space"},u)),c&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.Name")},c),d&&$().createElement(tn.LabelledSection,{header:i("Entity.Label.Description")},d),f&&$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.TargetType")},f),p&&$().createElement(tn.LabelledSection,{showCopy:!0,header:i("TargetDetails.Label.Address"),value:p},p),n&&$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.AssignedDistributionSet")},$().createElement(Ya,{id:n.id,name:n.name,version:n.version})),$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.ActionHistory")},$().createElement(_m,{query:"?target.controllerId=".concat(u),title:i("TargetDetails.ActionHistory.Tooltip",{controllerId:u})})),r&&$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.InstalledDistributionSet")},$().createElement(Ya,{id:r.id,name:r.name,version:r.version})),h&&$().createElement(tn.LabelledSection,{showCopy:l,header:i("TargetDetails.Label.SecurityToken"),value:l?h:""},$().createElement(tn.TextSecret,{onChange:s,showLabel:i("TextSecret.Button.Show.Label")},h)),$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.UpdateStatus")},$().createElement(iB,{updateStatus:m})),g&&$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.PollStatus")},$().createElement(nB,OH({},g,{pollingOverdueTime:o}))),y&&$().createElement(tn.LabelledSection,{header:i("TargetDetails.Label.LastPoll")},(0,tn.parseTimestamp)(y)),$().createElement(Ep,{createdAt:b,createdBy:v,lastModifiedAt:S,lastModifiedBy:E})))}var DH=["showConfirmation"];function xH(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function PH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return MH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function IH(e){var t=e.target,n=Ut(),r=function(e){var t=Ut(),n=zR(),r=ue(),o=sr("".concat(vi,"/").concat(encodeURIComponent(e.controllerId)),{headline:t("Target.DeleteConfirmation.Header"),message:t("Target.DeleteConfirmation.Message"),entityText:e.name,successMessage:t("Target.DeleteSuccess.Message")},{mutationKey:[KS.deleteTarget(e.controllerId)],onSuccess:function(){r.resetQueries(KS.lists())}}),i=o.showConfirmation,a=xH(o,DH);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(t),o=PH(r,2),i=o[0],a=o[1],l=Ht();return $().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",mode:"integrated"}),style:{position:"absolute",right:0},popover:{position:"bottom-left",triggerOffset:8},title:n("TargetDetails.Actions.Title")},$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Edit")),icon:"edit",onClick:function(){return l(PL,{initialEntry:t})},title:n("TargetDetails.Actions.Edit.Tooltip")}),$().createElement(Ft.MenuItem,{label:$().createElement($().Fragment,null,n("Button.Delete")),icon:"delete",onClick:i,title:n("TargetDetails.Actions.Delete.Tooltip"),disabled:a.isLoading}))}const RH=l.p+"static/TargetAttributes.ff0bff7a.md";var LH=["pollStatus","_links"];function kH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kH(Object(n),!0).forEach((function(t){_H(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FH(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function NH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return BH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function UH(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function HH(e){var t,n=Ut(),r=Bt(),o=ue(),i=null!==(t=null===e||void 0===e?void 0:e.controllerId)&&void 0!==t?t:"",a=Bn({mutationKey:KS.requestAttributesUpdate(i),mutationFn:function(){var t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){UH(i,r,o,a,l,"next",e)}function l(e){UH(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.put(Tn(null===e||void 0===e?void 0:e._links.self),{requestAttributes:!0});case 3:return o=t.sent,t.abrupt("return",o);case 7:throw t.prev=7,t.t0=t.catch(0),new vn(t.t0,n);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}()}),l=a.mutate,s=a.isLoading,u=a.error,c=(0,G.useCallback)((function(){l(void 0,{onSuccess:function(e){o.setQueryData(KS.targetDetails(i),e),o.setQueriesData({queryKey:KS.lists()},(function(t){if(t){var n=function(e,t){var n=0,r=0;for(;n<e.pageParams.length;){if(r=e.pages[n].content.findIndex((function(e){return t(e)})),r>-1)return[n,r];n++}return[-1,-1]}(t,(function(t){return t.controllerId===e.data.controllerId})),r=NH(n,2),o=r[0],i=r[1];if(!(o<0)){var a=e.data,l=(a.pollStatus,a._links);return function(e,t,n,r){var o=Object.assign({},e.pages[t]);o.content=o.content.slice(0),o.content.splice(n,1,r);var i=Object.assign({},e);return i.pages=i.pages.slice(0),i.pages.splice(t,1,o),i}(t,o,i,jH(jH({},FH(a,LH)),{},{_links:{self:jH({},l.self)}}))}}}))}})}),[o,i,l]);return{requestUpdate:c,requestUpdatePending:s,requestUpdateError:u}}function VH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return qH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WH(e){var t=e.target,n=VH((0,G.useState)(),2),r=n[0],o=n[1],i=Ut(),a=ue(),l=function(e){var t;return Es(KS.attributes(null!==(t=null===e||void 0===e?void 0:e.controllerId)&&void 0!==t?t:""),Tn(null===e||void 0===e?void 0:e._links.attributes),{enabled:!!e,select:function(e){return e.data||null}})}(t),s=HH(t),u=s.requestUpdate,c=s.requestUpdatePending,d=s.requestUpdateError,f=(0,G.useMemo)((function(){return function(e){return[Ea(e("TargetDetails.Attributes.NameLabel"),"name",{isDefault:!0,isSortable:!0,isSorted:!0}),{data:{columnId:"value",sortParamName:"value",isDefault:!0,isSortable:!0},header:e("TargetDetails.Attributes.ValueLabel"),fieldName:"value",renderCell:function(e){return $().createElement("div",{className:"copy-to-clipboard_cell"},$().createElement("div",{className:"copy-to-clipboard_cell__text"},e.value),$().createElement("div",{className:"copy-to-clipboard_cell__button"},$().createElement(tn.CopyToClipButton,{value:e.value})))}}]}(i)}),[i]),p=VH((0,G.useState)(f),2),h=p[0],m=p[1],g=(0,tn.useSortableColumns)(h,m).sortColumn;Er(h,o);var y=(0,G.useMemo)((function(){return gs(g)}),[g]),b=(0,G.useCallback)((function(){a.resetQueries(KS.attributes(t.controllerId),{exact:!0})}),[a,t]),v=(0,G.useMemo)((function(){var e,t=Object.keys(null!==(e=l.data)&&void 0!==e?e:{}).map((function(e){return{name:e,value:l.data[e]}}));return r?t.sort((function(e,t){var n=VH(r.split(":"),2),o=n[0],i=n[1],a=e[o].toUpperCase(),l=t[o].toUpperCase();return a===l?0:a<l?"ASC"===i?-1:1:"ASC"===i?1:-1})):t}),[l.data,r]);return l.error?$().createElement(tn.ErrorState,{error:l.error,actions:$().createElement(dp,{onRetry:b})}):$().createElement($().Fragment,null,$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:i("TargetDetails.Attributes.Title"),expandable:!0,expanded:!1,popoverHeading:i("TargetDetails.Attributes.Title"),help:$().createElement(tn.Documentation,{markdownFilePath:RH})},$().createElement("div",{style:{width:"100%",display:"flex",flexDirection:"column"}},d&&$().createElement(tn.ErrorState,{error:d}),t.requestAttributes&&$().createElement("div",{className:"a-notification -neutral",role:"alert","aria-labelledby":"notification-label-id-pending-attrs-update"},$().createElement(Ft.Icon,{role:"img",title:i("TargetDetails.Attributes.UpdateRequestTooltip"),iconName:"settings-arrows"}),$().createElement("div",{id:"notification-label-id-pending-attrs-update",className:"a-notification__content"},$().createElement("span",null,i("TargetDetails.Attributes.UpdateRequestMessage")))),$().createElement(Zl,{count:v.length,mainAction:$().createElement(Ft.Button,{mode:"integrated",icon:{iconName:"settings-arrows",title:i("TargetDetails.Attributes.RequestUpdateTooltip")},disabled:t.requestAttributes||c,onClick:u,"aria-label":"request-attributes-update"})}),$().createElement(Ft.DataList,{hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:i("TargetDetails.Attributes.Empty"),columns:h,items:v,onRenderColumnHeader:y}),l.isLoading&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"target-attributes-loading"})))))}const zH=l.p+"static/TargetMetadata.6690c8f7.md";function QH(e){var t=e.target,n=Ut();return $().createElement($().Fragment,null,$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:n("TargetDetails.Metadata.Title"),expandable:!0,expanded:!1,popoverHeading:n("TargetDetails.Metadata.Title"),help:$().createElement(tn.Documentation,{markdownFilePath:zH})},$().createElement("div",{style:{width:"100%"}},$().createElement(Hm,{entityId:t.controllerId,stateConfig:GH})))))}var GH={read:[function(e){return"".concat(vi,"/").concat(e,"/metadata")},KS.metadataList],create:[function(e){return"".concat(vi,"/").concat(e,"/metadata")},KS.metadataAdd],update:[function(e,t){return"".concat(vi,"/").concat(e,"/metadata/").concat(t)},KS.metadataUpdate],delete:[function(e,t){return"".concat(vi,"/").concat(e,"/metadata/").concat(t)},KS.metadataDelete]};const $H=l.p+"static/TargetTags.406d1dcc.md";function KH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return YH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YH(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JH(e){var t,n=e.target,r=Ut(),o=KH((0,G.useState)(0),2),i=o[0],a=o[1],l=(t=n.controllerId,Es(KS.tags(null!==t&&void 0!==t?t:""),"".concat(vi,"/").concat(encodeURIComponent(t),"/tags"),{select:function(e){return e.data||[]}})),s=l.data,u=void 0===s?[]:s,c=l.isLoading,d=l.error,f=l.refetch,p=$m(lh,{onSuccess:function(){a((function(e){return++e})),f()}}),h=p.error,m=p.isLoading,g=p.mutateAsync,y=hB().refreshTags;return(0,G.useEffect)((function(){y&&f()}),[f,y]),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:r("TargetDetails.TargetTags.Title"),expandable:!0,expanded:!!y,popoverHeading:r("TargetDetails.TargetTags.Title"),help:$().createElement(tn.Documentation,{markdownFilePath:$H})},$().createElement(Qm,{tags:u,isBusy:c||m,error:d||h,unassignedTags:i,onUnassign:function(e){g({entityIds:[n.controllerId],tagId:e})}})))}function XH(){var e,t=(0,ki.useParams)().controllerId,n=function(e){return Es(KS.targetDetails(null!==e&&void 0!==e?e:""),"".concat(vi,"/").concat(encodeURIComponent(e||"")),{enabled:!!e})}(t=null===(e=t)||void 0===e?void 0:e.trim()),r=function(e){var t;return Es(KS.assignedDS(null!==(t=null===e||void 0===e?void 0:e.controllerId)&&void 0!==t?t:""),Tn(null===e||void 0===e?void 0:e._links.assignedDS),{enabled:!!e})}(n.data),o=function(e){var t;return Es(KS.installedDS(null!==(t=null===e||void 0===e?void 0:e.controllerId)&&void 0!==t?t:""),Tn(null===e||void 0===e?void 0:e._links.installedDS),{enabled:!!e})}(n.data),i=KE(KS.pollingOverdueTime(),"pollingOverdueTime",{enabled:!!n.data}),a=ue(),l=(0,G.useCallback)((function(){a.resetQueries(KS.targetDetails(t),{exact:!0})}),[a,t]),s=(0,G.useCallback)((function(){a.resetQueries(KS.assignedDS(t),{exact:!0})}),[a,t]),u=(0,G.useCallback)((function(){a.resetQueries(KS.installedDS(t),{exact:!0})}),[a,t]),c=(0,G.useCallback)((function(){a.resetQueries(KS.pollingOverdueTime(),{exact:!0})}),[a]);return n.error?$().createElement(tn.ErrorState,{error:n.error,actions:$().createElement(dp,{onRetry:l})}):n.isLoading||r.isLoading||o.isLoading?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"target-details-loading"})):$().createElement($().Fragment,null,r.error&&$().createElement(tn.ErrorState,{error:r.error,actions:$().createElement(dp,{onRetry:s})}),o.error&&$().createElement(tn.ErrorState,{error:o.error,actions:$().createElement(dp,{onRetry:u})}),i.error&&$().createElement(tn.ErrorState,{error:i.error,actions:$().createElement(dp,{onRetry:c})}),$().createElement(IH,{target:n.data}),$().createElement(TH,{target:n.data,assignedDS:r.data,installedDS:o.data,pollingOverdueTime:i.data}),$().createElement(Ft.Divider,null),$().createElement(WH,{target:n.data}),$().createElement(Ft.Divider,null),$().createElement(QH,{target:n.data}),$().createElement(Ft.Divider,null),$().createElement(JH,{target:n.data}))}function ZH(e){return function(e){if(Array.isArray(e))return eV(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return eV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eV(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tV(Object(n),!0).forEach((function(t){rV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}XH.displayName="TargetDetailsBlade",XH.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("TargetDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("TargetDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:wH}))))};var oV={component:EH,name:EH.displayName,open:!0,defaults:{header:$().createElement(EH.Header,null),showCloseButton:!1,initialWidth:500}},iV={component:BB,name:BB.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(BB.Header,null),showCloseButton:!1}},aV={component:XH,name:XH.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(XH.Header,null),onClose:function(){}}};var lV=function(){var e=zR(),t=(0,ki.useParams)().controllerId,n=(0,G.useMemo)((function(){return[nV(nV({},oV),{},{defaults:nV({},oV.defaults)}),nV(nV({},iV),{},{defaults:nV(nV({},iV.defaults),{},{collapsed:!1})})]}),[]),r=(0,G.useMemo)((function(){return t?[].concat(ZH(n),[nV(nV({},aV),{},{defaults:nV(nV({},aV.defaults),{},{onClose:function(){return e.toHome()}})})]):n}),[e,t,n]);return $().createElement(mB,null,$().createElement(AB,null,$().createElement(Ft.Blades,{registrations:r,settings:{resizable:!0}})))};const sV=l.p+"static/usersHelp.540bef79.md";var uV,cV,dV,fV,pV="UserAddModal",hV={system:{icon:"gears-interlocked-arrow",tooltip:"Users.Type.System"},openID:{icon:"address-control-system",tooltip:"Users.Type.OpenID"}};function mV(){var e=Ut();return(0,G.useMemo)((function(){return function(e){var t={isDefault:!0};return[Ta(e("Entity.Label.Type"),"type",(function(t){if(null!==t&&void 0!==t&&t.displayType)return $().createElement(tn.MappedIcon,{value:t.displayType,infos:hV,processTooltip:e})})),Ea(e("Entity.Label.ID"),"id",void 0,{width:"6em"}),Ea(e("Entity.Label.Name"),"name",t),Ta(e("TenantAdmin"),"admin",$().createElement(Ft.Icon,{iconName:"user-tie",title:e("TenantAdmin")}),!0),Ea(e("Entity.Label.Target"),"target",t),Ea(e("Entity.Label.Repository"),"repository",t),Ea(e("Entity.Label.Rollout"),"rollout",t),Ea(e("Entity.Label.Misc"),"misc",t)]}(e)}),[e])}function gV(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(Ga())},toDetails:function(t){e(Ga(t))}}}(e)}),[e])}!function(e){e.PASSWORD_USER="PASSWORD_USER",e.OIDC_USER="OIDC_USER",e.OIDC_CLIENT="OIDC_CLIENT"}(uV||(uV={})),function(e){e.system="system",e.openID="openID"}(cV||(cV={})),function(e){e.CREATE_TARGET="CREATE_TARGET",e.READ_TARGET="READ_TARGET",e.UPDATE_TARGET="UPDATE_TARGET",e.DELETE_TARGET="DELETE_TARGET",e.CREATE_ROLLOUT="CREATE_ROLLOUT",e.READ_ROLLOUT="READ_ROLLOUT",e.APPROVE_ROLLOUT="APPROVE_ROLLOUT",e.HANDLE_ROLLOUT="HANDLE_ROLLOUT",e.UPDATE_ROLLOUT="UPDATE_ROLLOUT",e.DELETE_ROLLOUT="DELETE_ROLLOUT",e.CREATE_REPOSITORY="CREATE_REPOSITORY",e.READ_REPOSITORY="READ_REPOSITORY",e.UPDATE_REPOSITORY="UPDATE_REPOSITORY",e.DELETE_REPOSITORY="DELETE_REPOSITORY",e.ROLE_MANAGEMENT="ROLE_MANAGEMENT",e.USER_MANAGEMENT="USER_MANAGEMENT",e.TENANT_CONFIGURATION="TENANT_CONFIGURATION",e.READ_TARGET_SECURITY_TOKEN="READ_TARGET_SECURITY_TOKEN",e.DOWNLOAD_REPOSITORY_ARTIFACT="DOWNLOAD_REPOSITORY_ARTIFACT",e.ROLE_TENANT_ADMIN="ROLE_TENANT_ADMIN",e.READ_TENANT_CONFIGURATION="READ_TENANT_CONFIGURATION",e.READ_GATEWAY_SECURITY_TOKEN="READ_GATEWAY_SECURITY_TOKEN"}(dV||(dV={})),function(e){e.targetTypeScopes="targetTypeScopes"}(fV||(fV={}));var yV="Entity.Permissions.All",bV={"Entity.Permissions.Update":[dV.UPDATE_REPOSITORY,dV.UPDATE_ROLLOUT,dV.UPDATE_TARGET],"Entity.Permissions.Create":[dV.CREATE_REPOSITORY,dV.CREATE_ROLLOUT,dV.CREATE_TARGET],"Entity.Permissions.Delete":[dV.DELETE_REPOSITORY,dV.DELETE_ROLLOUT,dV.DELETE_TARGET],"Entity.Permissions.Read":[dV.READ_REPOSITORY,dV.READ_ROLLOUT,dV.READ_TARGET],"Entity.Permissions.Approve":[dV.APPROVE_ROLLOUT],"Entity.Permissions.Handle":[dV.HANDLE_ROLLOUT],"Entity.Permissions.UserManagement":[dV.USER_MANAGEMENT],"Entity.Permissions.RoleManagement":[dV.ROLE_MANAGEMENT],"Entity.Permissions.DownloadRepositoryArtifact":[dV.DOWNLOAD_REPOSITORY_ARTIFACT],"Entity.Permissions.ReadTargetSecurityToken":[dV.READ_TARGET_SECURITY_TOKEN],"Entity.Permissions.ReadGatewaySecurityToken":[dV.READ_GATEWAY_SECURITY_TOKEN],"Entity.Permissions.TenantConfiguration":[dV.TENANT_CONFIGURATION],"Entity.Permissions.ReadTenantConfiguration":[dV.READ_TENANT_CONFIGURATION]},vV={TARGET:[dV.CREATE_TARGET,dV.READ_TARGET,dV.UPDATE_TARGET,dV.DELETE_TARGET],REPOSITORY:[dV.CREATE_REPOSITORY,dV.READ_REPOSITORY,dV.UPDATE_REPOSITORY,dV.DELETE_REPOSITORY],ROLLOUT:[dV.CREATE_ROLLOUT,dV.READ_ROLLOUT,dV.UPDATE_ROLLOUT,dV.DELETE_ROLLOUT,dV.APPROVE_ROLLOUT,dV.HANDLE_ROLLOUT],MISC:[dV.USER_MANAGEMENT,dV.ROLE_MANAGEMENT,dV.DOWNLOAD_REPOSITORY_ARTIFACT,dV.TENANT_CONFIGURATION,dV.READ_TENANT_CONFIGURATION,dV.READ_TARGET_SECURITY_TOKEN,dV.READ_GATEWAY_SECURITY_TOKEN]};function SV(e){return e.charAt(0).toUpperCase()+e.slice(1)}function EV(e){var t=[],n=e.permissions,r=e.permissionGroups,o=e.groupKey;if(n.includes(dV.ROLE_TENANT_ADMIN))return["Entity.Permissions.Admin"];var i=r[o];return i.forEach((function(e){n.includes(e)&&t.push(e)})),0===t.length?["Entity.Permissions.None"]:t.length===i.length?[yV]:t}var wV=function(e){for(var t=0,n=Object.keys(bV);t<n.length;t++){var r=n[t];if(bV[r].includes(e))return r}return e},OV=function(e,t){return Object.keys(t).map((function(n){return{title:"Entity.Label.".concat(SV(n.toLowerCase())),group:n,perms:e.length?EV({permissions:e,permissionGroups:t,groupKey:n}):[]}}))};function AV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AV(Object(n),!0).forEach((function(t){TV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DV=function(e){var t=Ut();return null===e||void 0===e?void 0:e.map((function(e){var n=e.permissions,r={target:EV({permissions:n,permissionGroups:vV,groupKey:"TARGET"}),repository:EV({permissions:n,permissionGroups:vV,groupKey:"REPOSITORY"}),rollout:EV({permissions:n,permissionGroups:vV,groupKey:"ROLLOUT"}),misc:EV({permissions:n,permissionGroups:vV,groupKey:"MISC"})},o={};return Object.keys(r).forEach((function(e){o[e]=function(e){return e.map((function(e){return t(wV(e))})).join(", ")}(r[e])||""})),CV(CV({},e),{},{displayType:e.type===uV.PASSWORD_USER?cV.system:cV.openID,admin:n.includes(dV.ROLE_TENANT_ADMIN)},o)}))};function xV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return PV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PV(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MV(e){var t=e.data,n=e.fetchMoreData,r=e.selected,o=e.totalCount,i=e.loadingData,a=e.searchKey,l=e.searchColumns,s=e.onSearchChange,u=e.onSearchKeyChange,c=e.onRefresh,d=Ut(),f=Ht(),p=gV();var h=mV(),m=xV((0,G.useState)(h),2),g=m[0],y=m[1],b=(0,G.useMemo)((function(){return{allColumns:h,onColumnSelectionChange:y,typeName:"users"}}),[h]),v=DV(t),S=(0,G.useMemo)((function(){return v.find((function(e){return e.id===r}))}),[v,r]),E=(0,G.useCallback)((function(){var e=f(pV,{onCancel:function(){return e()}})}),[f]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:o,content:$().createElement(hs,{keyedSearchId:"users-search",keys:l,searchKey:a,onSearchChange:s,onSearchKeyChange:u}),columnSelectorProps:b,actions:$().createElement(es,{onRefresh:c,refreshDisabled:i}),mainAction:$().createElement(Ft.Button,{title:d("Users.Create"),icon:"add",mode:"integrated",onClick:function(){E()}})}),$().createElement(Ft.DataList,{items:v,columns:g,selected:S,onSelect:function(e){p.toDetails(e.id)},enableScrolling:!0,emptyStateMessage:d("Users.List.Empty"),onScrollToBottom:n,hideCheckBoxes:!0},i&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"users-loading"})))}function IV(e){return function(e){if(Array.isArray(e))return RV(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return RV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RV(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function RV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var LV={all:["users"],lists:function(){return[].concat(IV(LV.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(IV(LV.lists()),[e])},details:function(){return[].concat(IV(LV.all),["details"])},userDetails:function(e){return[].concat(IV(LV.details()),[e])},add:function(){return[].concat(IV(LV.all),["add"])},permissions:function(e){return[].concat(IV(LV.userDetails(e)),["permissions"])},grantPermissions:function(e){return[].concat(IV(LV.userDetails(e)),["permissions"])},deleteUser:function(e){return[].concat(IV(LV.userDetails(e)),["delete"])},update:function(e){return[].concat(IV(LV.userDetails(e)),["update"])},changePassword:function(e){return[].concat(IV(LV.userDetails(e)),["changePassword"])}};function kV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _V(e,t){return Fn(LV.list(e),mi,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kV(Object(n),!0).forEach((function(t){jV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({representation:"full"},e),t)}function FV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return NV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NV(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var BV={"Entity.Label.ID":"id","Entity.Label.Name":"name"};function UV(){var e=FV((0,G.useState)(),2),t=e[0],n=e[1],r=FV((0,G.useState)("Entity.Label.Name"),2),o=r[0],i=r[1],a=_V({sort:"name:ASC",q:Ms(Hi().currentFilter,[BV[o]],t)}),l=a.data,s=a.isLoading,u=a.isFetchingNextPage,c=a.error,d=a.fetchNextPage,f=(0,ki.useParams)().id,p=ue(),h=(0,G.useCallback)((function(e){t!==e&&n(e)}),[t]);if(c)return $().createElement(tn.ErrorState,{error:c});var m=Dn(l),g=m.entities,y=m.totalCount,b=f?parseInt(f):void 0;return $().createElement(MV,{data:g,totalCount:y,loadingData:s||u,selected:b,searchKey:o,searchColumns:Object.keys(BV),fetchMoreData:d,onRefresh:function(){p.resetQueries({queryKey:LV.all}).catch(console.error)},onSearchChange:h,onSearchKeyChange:function(e){return i(e)}})}UV.displayName="UsersListBlade",UV.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("Users.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("Users.ListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:sV}))))};const HV=l.p+"static/userDetailsHelp.a8330273.md";var VV,qV=["showConfirmation"];function WV(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function zV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||GV(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QV(e){return function(e){if(Array.isArray(e))return $V(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||GV(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GV(e,t){if(e){if("string"===typeof e)return $V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$V(e,t):void 0}}function $V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KV(e){var t=e.permissions,n=e.scopedPermissions,r=e.permissionsGroups,o=e.editMode,i=void 0!==o&&o,a=e.columnsMap,l=e.onCheck,s=void 0===l?function(){}:l,u=e.entityId,c=e.adminPermission,d=Ut(),f=a||OV([],r),p=u||"",h=(0,G.useMemo)((function(){var e=[];return Object.keys(r).forEach((function(t){return e=[].concat(QV(e),QV(r[t]))})),e}),[r]),m=(0,G.useCallback)((function(){return!h.filter((function(e){return!t.includes(e)})).length}),[t,h]),g=zV((0,G.useState)(m()),2),y=g[0],b=g[1],v=zV((0,G.useState)(t.includes(dV.ROLE_TENANT_ADMIN)),2),S=v[0],E=v[1];return(0,G.useEffect)((function(){b(m())}),[b,m]),$().createElement(tn.SectionGroup,{label:d("Entity.Label.Permissions"),className:"permissionsGroup"},c&&(S||i&&!S)&&$().createElement("div",{className:"adminPermission"},$().createElement("span",{title:c},$().createElement(Ft.Toggle,{id:"".concat(p,"-tenant-admin-toggle"),rightLabel:d("TenantAdmin"),checked:S,onChange:function(){s([c],!S),E(!S)},disabled:!i}))),!S&&$().createElement($().Fragment,null,$().createElement(Ft.Checkbox,{label:d("Entity.Label.AllPermissions"),id:"".concat(p,"all-permissions"),checked:y,onChange:function(){s&&s(h,!y)},disabled:!i}),$().createElement("div",{className:"permissionsWrapper head"},f.map((function(e,t){return $().createElement(YV,{key:t,permissionsGroups:r,column:e,editMode:i,onCheck:s,prefix:p})}))),$().createElement("div",{className:"permissionsWrapper"},f.map((function(e,o){return $().createElement(JV,{key:o,permissionsGroups:r,permissionKey:e.group,permissions:t,scopedPermissions:n,editMode:i,onCheck:s,prefix:p})})))))}function YV(e){var t=Ut(),n=e.column,r=e.editMode,o=e.permissionsGroups,i=e.onCheck,a=n.perms,l=n.title,s=n.group,u=a.includes(yV);return $().createElement("div",null,$().createElement("strong",{className:"columnTitle"},t(l)),$().createElement(Ft.Checkbox,{label:SV(t(yV)),id:"".concat(e.prefix).concat(s),checked:u,value:s,disabled:!r,onChange:function(){return i(o[s],!u)}}))}function JV(e){var t,n=Ut();return $().createElement("div",null,null===(t=e.permissionsGroups[e.permissionKey])||void 0===t?void 0:t.map((function(t,r){var o,i=e.permissions.includes(t),a=null===(o=e.scopedPermissions)||void 0===o?void 0:o.includes(t);return $().createElement("div",{key:r,className:"permissionCheckbox"},$().createElement("span",{title:t},$().createElement(Ft.Checkbox,{label:SV(n(wV(t))),id:"".concat(e.prefix).concat(t),checked:i,value:t,disabled:!e.editMode,onChange:function(){return e.onCheck([t],!i)}})),a&&$().createElement(Ft.Icon,{"data-testid":"".concat(t,"-scope-hint"),role:"img",title:n("Role.Permissions.ScopesAvailable"),iconName:"filter-success"}))})))}function XV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZV(){return ZV=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZV.apply(this,arguments)}function eq(e){var t,n,r=e.isOpen,o=e.initialEntry,i=e.onClose,a=Ut(),l=Vt(),s=(0,G.useId)(),u=(0,G.useId)(),c=(0,G.useId)(),d=function(e){var t=ue();return Yn(LV.changePassword(e),"".concat(mi,"/").concat(encodeURIComponent(e),"/changePassword"),{onSuccess:function(){t.resetQueries(LV.details())}})}(o.id),f=d.mutate,p=d.isLoading,h=d.error,m=$o({defaultValues:rq,mode:"onChange"}),g=m.getValues,y=m.register,b=m.formState,v=m.setFocus,S=(0,G.useMemo)((function(){return{deps:[nq],disabled:p,required:!0,maxLength:256,validate:function(e,t){if(e!==t[nq])return a("User.ChangePassword.ErrorMessage.Mismatch")}}}),[a,p]),E=(0,G.useMemo)((function(){return{deps:[tq],disabled:p,required:!0,maxLength:256,validate:function(e,t){if(e!==t[tq])return a("User.ChangePassword.ErrorMessage.Mismatch")}}}),[a,p]);(0,G.useEffect)((function(){v("newPassword")}),[v]);var w=$().createElement(tn.DialogHeader,{title:a("User.ChangePassword.Heading"),onCloseBtnClick:function(){return i()}}),O=$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:a("Button.OK"),rejectBtnLabel:a("Button.Cancel"),onAcceptBtnClick:function(){f({newPassword:g().newPassword},{onSuccess:function(){l(a("User.ChangePassword.Success")),i()}})},acceptBtnDisabled:!b.isValid||p,onRejectBtnClick:i});return $().createElement(tn.Dialog,{isOpen:r,dialogHeader:w,dialogFooter:O,onClose:function(e){return e.stopPropagation()},onCancel:function(e){e.preventDefault(),e.stopPropagation(),i()}},$().createElement("form",null,$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.TextField,{id:s,readOnly:!0,defaultValue:o.name,label:a("Users.Label.User")})),$().createElement(Ft.FormField,{fieldType:"password",notificationType:"error",notificationText:null===(t=b.errors[tq])||void 0===t?void 0:t.message},$().createElement(Ft.TextField,ZV({id:u,type:"password",label:a("User.ChangePassword.Label.NewPassword")},y(tq,S)))),$().createElement(Ft.FormField,{fieldType:"password",notificationType:"error",notificationText:null===(n=b.errors[nq])||void 0===n?void 0:n.message},$().createElement(Ft.TextField,ZV({id:c,type:"password",label:a("User.ChangePassword.Label.ConfirmPassword")},y(nq,E)))),p&&$().createElement(Ft.ProgressIndicator,{id:"loading-indicator",type:"indeterminate",value:0}),h&&$().createElement(tn.ErrorState,{error:h})))}var tq="newPassword",nq="newPasswordConfirm",rq=(XV(VV={},tq,""),XV(VV,nq,""),VV);function oq(e){return function(e){if(Array.isArray(e))return lq(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||aq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||aq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aq(e,t){if(e){if("string"===typeof e)return lq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lq(e,t):void 0}}function lq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sq(e){var t=Ut(),n=e.user,r=e.permissions,o=function(e,t){var n=ue(),r=iq((0,G.useState)(t),2),o=r[0],i=r[1],a=iq((0,G.useState)(!1),2),l=a[0],s=a[1],u=function(e){var t=ue();return Yn(LV.update(e),"".concat(mi,"/").concat(e,"/permissions"),{onSuccess:function(){t.resetQueries(LV.lists()),t.resetQueries(LV.details())}})}(e),c=function(e,t){i(t?[].concat(oq(o),oq(e)).filter((function(e,t,n){return n.indexOf(e)===t})):o.filter((function(t){return!e.includes(t)})))},d=function(){u.mutate(o.map((function(e){return{permission:e}})))},f=function(){return t.length===o.length&&o.filter((function(e){return t.includes(e)})).length===t.length},p=u.isLoading,h=u.isLoading||f();return{switchToEditMode:function(){return s(!0)},editMode:l,updatePermissions:c,newPermissions:o,isUpdating:p,isDisabled:h,error:u.error,onCancel:function(){return n.resetQueries(LV.userDetails(e))},onSave:function(){return d()}}}((null===n||void 0===n?void 0:n.id)||0,r),i=o.isUpdating,a=o.updatePermissions,l=o.newPermissions,s=o.switchToEditMode,u=o.editMode,c=o.onSave,d=o.onCancel,f=o.isDisabled,p=o.error,h=(0,G.useCallback)((function(e){return OV(e,vV)}),[]),m=iq((0,G.useState)(h(r)),2),g=m[0],y=m[1],b=function(e){var t=Ut(),n=gV(),r=ue(),o=sr("".concat(mi,"/").concat(e.id),{headline:t("User.DeleteModal.Header"),message:t("User.DeleteModal.Message"),entityText:e.name,successMessage:t("User.DeleteModal.SuccessMessage")},{mutationKey:[LV.deleteUser(e.id)],onSuccess:function(){r.resetQueries(LV.lists())}}),i=o.showConfirmation,a=WV(o,qV);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(n),v=iq(b,2),S=v[0],E=v[1],w=n.type===uV.PASSWORD_USER?cV.system:cV.openID,O=(0,tn.useDialog)(),A=O.isDialogOpen,C=O.showDialog,T=O.closeDialog;return(0,G.useEffect)((function(){var e=h(l);y(e)}),[l,h,y]),i?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"user-permissions-loading"})):$().createElement($().Fragment,null,$().createElement(gb,{title:t("User.DetailsActions.ContextMenu.Title")},$().createElement(Ft.MenuItem,{label:t("User.DetailsActions.Edit"),icon:"edit",title:t("User.Edit.Tooltip"),onClick:s,disabled:u}),$().createElement(Ft.MenuItem,{label:t("User.DetailsActions.ChangePassword"),icon:"keys",title:t("User.ChangePassword.Tooltip"),onClick:C,disabled:n.type!==uV.PASSWORD_USER}),$().createElement(Ft.MenuItem,{label:t("User.DetailsActions.Delete"),onClick:S,icon:"delete",disabled:E.isLoading,title:t("User.Delete.Tooltip")})),$().createElement(tn.SectionGroup,{label:""},n.id&&$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Entity.Label.ID"),value:"".concat(n.id)},$().createElement("div",{className:"keep-actions-space"},n.id)),n.name&&n.id&&$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Users.Label.User"),value:n.name},$().createElement("div",{className:"keep-actions-space"},$().createElement(tn.MappedIcon,{value:w,infos:hV,processTooltip:t}),$().createElement("span",{style:{marginLeft:"1rem"}},n.name))),$().createElement(KV,{permissionsGroups:vV,columnsMap:g,permissions:l,onCheck:a,editMode:u,entityId:n.id,adminPermission:dV.ROLE_TENANT_ADMIN})),p&&$().createElement(tn.ErrorState,{error:p}),u&&$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:t("Button.Cancel"),onClick:d}),$().createElement(Ft.Button,{mode:"primary",label:t(p?"Button.Retry":"Button.Save"),onClick:c,disabled:f})),$().createElement(eq,{isOpen:A,initialEntry:n,onClose:T}))}function uq(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):void 0,n=function(e){return Es(LV.userDetails(null!==e&&void 0!==e?e:0),"".concat(mi,"/").concat(e),{enabled:!!e})}(t),r=n.data,o=n.isLoading,i=n.error,a=function(e){return Es(LV.permissions(null!==e&&void 0!==e?e:0),"".concat(mi,"/").concat(e,"/permissions"),{enabled:!!e})}(t),l=a.data,s=a.isLoading,u=a.error;return i||u?$().createElement(tn.ErrorState,{error:i||u}):o||s?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):r&&l?$().createElement(sq,{user:r,permissions:l}):$().createElement($().Fragment,null)}function cq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cq(Object(n),!0).forEach((function(t){fq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}uq.displayName="UserDetailsBlade",uq.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("UserDetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("UserDetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:HV}))))};var pq={component:UV,name:UV.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:1200,header:$().createElement(UV.Header,null),showCloseButton:!1}},hq={component:uq,name:uq.displayName,open:!0,defaults:{fluid:!1,active:!0,initialWidth:700,header:$().createElement(uq.Header,null)}};var mq=function(){var e=(0,ki.useParams)().id,t=gV(),n=(0,G.useMemo)((function(){var n=[pq];return e&&n.push(dq(dq({},hq),{},{defaults:dq(dq({},hq.defaults),{},{onClose:t.toHome})})),n}),[e,t.toHome]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};function gq(){var e=Ut();return(0,G.useMemo)((function(){return function(e){var t={isDefault:!0};return[Ea(e("Entity.Label.ID"),"id",void 0,{width:"6em"}),Ea(e("Entity.Label.Name"),"name",t),Ta(e("TenantAdmin"),"admin",$().createElement(Ft.Icon,{iconName:"user-tie",title:e("TenantAdmin")}),!0),Ea(e("Entity.Label.Target"),"target",t),Ea(e("Entity.Label.Repository"),"repository",t),Ea(e("Entity.Label.Rollout"),"rollout",t),Ea(e("Entity.Label.Misc"),"misc",t)]}(e)}),[e])}function yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yq(Object(n),!0).forEach((function(t){vq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sq=function(e){var t=Ut();return null===e||void 0===e?void 0:e.map((function(e){var n=e.permissions.map((function(e){return e.permission})),r={target:EV({permissions:n,permissionGroups:vV,groupKey:"TARGET"}),repository:EV({permissions:n,permissionGroups:vV,groupKey:"REPOSITORY"}),rollout:EV({permissions:n,permissionGroups:vV,groupKey:"ROLLOUT"}),misc:EV({permissions:n,permissionGroups:vV,groupKey:"MISC"})},o={};return Object.keys(r).forEach((function(e){o[e]=function(e){return e.map((function(e){return t(wV(e))})).join(", ")}(r[e])||""})),bq(bq(bq({},e),o),{},{admin:n.includes(dV.ROLE_TENANT_ADMIN)})}))};function Eq(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e($a())},toDetails:function(t){e($a(t))}}}(e)}),[e])}var wq="AddRoleModal";function Oq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Aq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aq(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Aq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cq(e){var t=e.data,n=e.totalCount,r=e.loadingData,o=e.selectedRoleId,i=e.searchKey,a=e.searchColumns,l=e.fetchMoreData,s=e.onRefresh,u=e.onSearchChange,c=e.onSearchKeyChange,d=Ut(),f=Eq(),p=Ht(),h=gq(),m=Oq((0,G.useState)(h),2),g=m[0],y=m[1],b=(0,G.useMemo)((function(){return{allColumns:h,onColumnSelectionChange:y,typeName:"roles"}}),[h]),v=Sq(t),S=(0,G.useMemo)((function(){return v.find((function(e){return e.id===o}))}),[v,o]),E=(0,G.useCallback)((function(e){f.toDetails(e.id)}),[f]),w=(0,G.useCallback)((function(){var e=p(wq,{onCancel:function(){return e()}})}),[p]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:n,columnSelectorProps:b,actions:$().createElement(es,{onRefresh:s,refreshDisabled:r}),content:$().createElement(hs,{keyedSearchId:"roles-search",keys:a,searchKey:i,onSearchChange:u,onSearchKeyChange:c}),mainAction:$().createElement(Ft.Button,{title:d("Roles.Add"),icon:"add",mode:"integrated",onClick:function(){w()}})}),$().createElement(Ft.DataList,{items:v,columns:g,selected:S,emptyStateMessage:d("Roles.List.Empty"),onScrollToBottom:l,onSelect:E,enableScrolling:!0,hideCheckBoxes:!0},r&&$().createElement(tn.InlineLoadingIndicator,{"data-testid":"roles-loading"})))}function Tq(e){return function(e){if(Array.isArray(e))return Dq(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Dq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dq(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xq={all:["roles"],lists:function(){return[].concat(Tq(xq.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat(Tq(xq.lists()),[e])},details:function(){return[].concat(Tq(xq.all),["details"])},roleDetails:function(e){return[].concat(Tq(xq.details()),[e])},add:function(){return[].concat(Tq(xq.all),["add"])},delete:function(e){return[].concat(Tq(xq.roleDetails(e)),["delete"])},update:function(e){return[].concat(Tq(xq.roleDetails(e)),["update"])}};function Pq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iq(e,t){return Fn(xq.list(e),hi,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pq(Object(n),!0).forEach((function(t){Mq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({representation:"full"},e),t)}const Rq=l.p+"static/rolesHelp.0f6e1c40.md";function Lq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return kq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kq(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jq={"Entity.Label.ID":"id","Entity.Label.Name":"name"};function _q(){var e=(0,ki.useParams)().id,t=e?parseInt(e):void 0,n=Lq((0,G.useState)(),2),r=n[0],o=n[1],i=Lq((0,G.useState)("Entity.Label.Name"),2),a=i[0],l=i[1],s=Iq({sort:"name:ASC",q:Ms(Hi().currentFilter,[jq[a]],r)}),u=s.data,c=s.isLoading,d=s.isFetchingNextPage,f=s.error,p=s.fetchNextPage,h=Dn(u),m=h.entities,g=h.totalCount,y=ue(),b=(0,G.useCallback)((function(e){r!==e&&o(e)}),[r]);return f?$().createElement(tn.ErrorState,{error:f}):$().createElement(Cq,{data:m,totalCount:g,loadingData:c||d,selectedRoleId:t,searchKey:a,searchColumns:Object.keys(jq),fetchMoreData:p,onRefresh:function(){y.resetQueries({queryKey:xq.lists()})},onSearchChange:b,onSearchKeyChange:function(e){return l(e)}})}function Fq(e){return Es(xq.roleDetails(null!==e&&void 0!==e?e:0),"".concat(hi,"/").concat(e),{enabled:!!e})}_q.displayName="RolesListBlade",_q.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("Roles.ListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("Roles.ListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Rq}))))};const Nq=l.p+"static/rolesDetailsHelp.2aacf014.md";var Bq=["showConfirmation"];function Uq(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Hq(e,t){var n=ue();return Yn(xq.update(e),"".concat(hi,"/").concat(e,"/permissions"),{onSuccess:function(){n.resetQueries(xq.lists()),n.resetQueries(xq.details()),null===t||void 0===t||t()}})}function Vq(e){return function(e){if(Array.isArray(e))return zq(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Wq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wq(e,t){if(e){if("string"===typeof e)return zq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zq(e,t):void 0}}function zq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qq(e){var t=Ut(),n=e.role,r=n.permissions.filter((function(e){return e.targetTypeScopes})).map((function(e){return e.permission})),o=(0,G.useCallback)((function(e){return OV(e,vV)}),[]),i=qq((0,G.useState)(o(n.permissions.map((function(e){return e.permission})))),2),a=i[0],l=i[1],s=function(e){var t=Ut(),n=Eq(),r=ue(),o=sr("".concat(hi,"/").concat(e.id),{headline:t("Role.DeleteModal.Header"),message:t("Role.DeleteModal.Message"),entityText:e.name,successMessage:t("Role.DeleteModal.SuccessMessage")},{mutationKey:[xq.delete(e.id)],onSuccess:function(){r.resetQueries(xq.lists())}}),i=o.showConfirmation,a=Uq(o,Bq);return[(0,G.useCallback)((function(){i({onSuccess:function(){n.toHome()}})}),[n,i]),a]}(n),u=qq(s,2),c=u[0],d=u[1],f=function(e){var t=Ut(),n=ue(),r=Vt(),o=e.permissions.map((function(e){return e.permission})),i=qq((0,G.useState)(o),2),a=i[0],l=i[1],s=qq((0,G.useState)(!1),2),u=s[0],c=s[1],d=Hq(e.id,(function(){return r(t("PermissionsScopes.Modify.Success"))})),f=function(e,t){l(t?[].concat(Vq(a),Vq(e)).filter((function(e,t,n){return n.indexOf(e)===t})):a.filter((function(t){return!e.includes(t)})))},p=function(){return o.length===a.length&&a.filter((function(e){return o.includes(e)})).length===o.length},h=d.isLoading,m=d.isLoading||p(),g=function(){var t=e.permissions.filter((function(e){return a.includes(e.permission)})),n=a.map((function(e){return{permission:e}})).filter((function(e){return!t.find((function(t){return t.permission===e.permission}))}));d.mutate([].concat(Vq(n),Vq(t)))};return{switchToEditMode:function(){return c(!0)},editMode:u,updatePermissions:f,newPermissions:a,isUpdating:h,isDisabled:m,error:d.error,onCancel:function(){return n.resetQueries(xq.roleDetails(e.id))},onSave:function(){return g()}}}(n),p=f.isUpdating,h=f.updatePermissions,m=f.newPermissions,g=f.switchToEditMode,y=f.editMode,b=f.onSave,v=f.onCancel,S=f.isDisabled,E=f.error;return(0,G.useEffect)((function(){var e=o(m);l(e)}),[m,o,l]),p?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"user-permissions-loading"})):$().createElement($().Fragment,null,$().createElement(gb,{title:t("Role.DetailsActions.ContextMenu.Title")},$().createElement(Ft.MenuItem,{label:t("Role.DetailsActions.Edit"),icon:"edit",title:t("Role.Edit.Tooltip"),onClick:g,disabled:y}),$().createElement(Ft.MenuItem,{label:t("Role.DetailsActions.Delete"),onClick:c,icon:"delete",disabled:d.isLoading,title:t("Role.Delete.Tooltip")})),$().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Entity.Label.ID"),value:"".concat(n.id)},$().createElement("div",{className:"keep-actions-space"},n.id)),$().createElement(tn.LabelledSection,{showCopy:!0,header:t("Roles.Label.Role"),value:n.name},n.name),$().createElement(KV,{permissionsGroups:vV,columnsMap:a,permissions:m,scopedPermissions:r,entityId:n.id,onCheck:h,editMode:y,adminPermission:dV.ROLE_TENANT_ADMIN}),E&&$().createElement(tn.ErrorState,{error:E}),y&&$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:t("Button.Cancel"),onClick:v}),$().createElement(Ft.Button,{mode:"primary",label:t(E?"Button.Retry":"Button.Save"),onClick:b,disabled:S}))))}function Gq(){var e=(0,ki.useParams)().id,t=Fq(e?parseInt(e,10):void 0),n=t.data,r=t.isLoading,o=t.error;return o?$().createElement(tn.ErrorState,{error:o}):r?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):n?$().createElement(Qq,{role:n}):$().createElement($().Fragment,null)}Gq.displayName="RolesDetailsBlade",Gq.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("Roles.DetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("Roles.DetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Nq}))))};var $q=(0,G.forwardRef)((function(e,t){var n=e.id,r=e.isOpen,o=e.onInvoke,i=e.onDismiss,a=e.isPending,l=void 0!==a&&a,s=e.error,u=e.title,c=e.invokeBtnLabel,d=e.canInvoke,f=void 0===d||d,p=e.dismissBtnLabel,h=e.canDismiss,m=void 0===h||h,g=e.primaryBtn,y=void 0===g?"invoke":g,b=e.children,v=(0,G.useId)(),S=Ut(),E=(0,G.useMemo)((function(){return null!==n&&void 0!==n?n:v}),[n,v]),w=m&&!l,O=f&&!l,A=(0,G.useMemo)((function(){switch(y){case"invoke":default:return"accept";case"dismiss":return"reject"}}),[y]);return $().createElement(tn.Dialog,{ref:t,isOpen:r,onCancel:function(e){e.stopPropagation(),w?e.preventDefault():i()},id:E,dialogHeader:$().createElement(tn.DialogHeader,{title:null!==u&&void 0!==u?u:S("InvokeActionDialog.Title"),onCloseBtnClick:function(){i()},closeBtnDisabled:!w,variant:s?"error":"warning"}),onClose:function(e){e.stopPropagation()}},b,l&&$().createElement(Ft.ProgressIndicator,{"data-testid":"".concat(E,"__progress")}),s&&$().createElement(tn.ErrorState,{error:s}),$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:null!==c&&void 0!==c?c:S("Button.Invoke"),acceptBtnDisabled:!O,onAcceptBtnClick:function(){o()},rejectBtnLabel:null!==p&&void 0!==p?p:S("Button.Dismiss"),rejectBtnDisabled:!w,onRejectBtnClick:function(){i()},primaryBtn:A}))})),Kq=(0,G.forwardRef)((function(e,t){var n=e.isOpen,r=e.onReject,o=e.onAccept,i=e.onClose,a=e.children,l=e.actionDisabled,s=e.actionError,u=Ut();return $().createElement(tn.Dialog,{ref:t,isOpen:n,onCancel:r,id:"add_permissions_dialog",dialogHeader:$().createElement(tn.DialogHeader,{title:u("PermissionsScopes.SetPermission"),onCloseBtnClick:i||r}),onClose:function(){return i&&i()},className:"suggestions-containing-modal"},a,s&&$().createElement(tn.ErrorState,{error:s}),$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:u("PermissionsScopes.SetPermission"),acceptBtnDisabled:l,onAcceptBtnClick:function(){return o()},rejectBtnLabel:u("Button.Cancel"),onRejectBtnClick:r}))}));function Yq(e){return function(e){if(Array.isArray(e))return Zq(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||Xq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xq(e,t){if(e){if("string"===typeof e)return Zq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zq(e,t):void 0}}function Zq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eW(Object(n),!0).forEach((function(t){nW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rW(e){var t=e.permissions,n=e.permissionsGroups,r=e.targetTypes,o=e.mutation,i=Ut(),a=(0,tn.useDialog)(),l=a.isDialogOpen,s=a.closeDialog,u=a.showDialog,c=(0,tn.useDialog)(),d=c.isDialogOpen,f=c.closeDialog,p=c.showDialog,h=(0,G.useCallback)((function(){o.reset(),w(!1),C({})}),[o]),m=function(){var e=[];return Object.keys(n).forEach((function(o){n[o].forEach((function(n){var a=t.find((function(e){return e.permission===n}));if(a){var l={scopeType:"-",scopeValue:"-",scopesNames:[]};if(a.targetTypeScopes&&a.targetTypeScopes[0]>0){var s=a.targetTypeScopes.map((function(e){var t;return(null===(t=r.find((function(t){return t.id===e})))||void 0===t?void 0:t.name)||[]}));l={scopeType:i("Entity.Permissions.Scope.TargetType"),scopeValue:s.join(", "),scopesNames:s}}e.push(tW({id:n,categoryValue:o,category:i("Entity.Label.".concat(SV(o.toLowerCase()))),permission:SV(i(wV(n)))},l))}}))})),e}(),g=(0,G.useMemo)((function(){return[Ea(i("Entity.Label.ID"),"id"),Ea(i("Entity.Permissions.Category"),"category",{isDefault:!0}),Ea(i("Entity.Permissions.Permission"),"permission",{isDefault:!0}),Ea(i("Entity.Permissions.ScopeType"),"scopeType"),Ea(i("Entity.Permissions.ScopeValue"),"scopeValue",{isDefault:!0}),{data:{columnId:"actions-column",isDefault:!0},header:"",onRenderHeader:function(){return null},style:{width:"8em"},renderCell:function(e){return $().createElement($().Fragment,null,$().createElement(Ft.Button,{title:i("PermissionsScopes.EditScopes"),icon:"edit",mode:"integrated",onClick:function(){h(),w(!0),C({category:e.categoryValue,permission:e.id,scopes:e.scopesNames}),u()}}),$().createElement(Ft.Button,{title:i("PermissionsScopes.Delete"),icon:"delete",mode:"integrated",onClick:function(){h(),C({permission:e.id,category:e.category}),p()}}))}}]}),[i,u,p,h]),y=Jq((0,G.useState)(g),2),b=y[0],v=y[1],S=Jq((0,G.useState)(!1),2),E=S[0],w=S[1],O=Jq((0,G.useState)({}),2),A=O[0],C=O[1],T=Object.keys(n).map((function(e){return{name:i("Entity.Label.".concat(SV(e.toLowerCase()))),value:e}}));T.unshift({name:"",value:""});var D=function(e){var r,o=t.map((function(e){return e.permission})),a=E?n[e]:(null===(r=n[e])||void 0===r?void 0:r.filter((function(e){return!o.includes(e)})))||[],l=(null===a||void 0===a?void 0:a.map((function(e){return{name:SV(i(wV(e))),value:e}})))||[];return[{name:"",value:""}].concat(Yq(l))};return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:m.length,refreshDisabled:!0,columnSelectorProps:{allColumns:g,onColumnSelectionChange:v,typeName:"permissions-scopes-list"},mainAction:$().createElement(Ft.Button,{title:i("PermissionsScopes.AddScopes"),icon:"add",mode:"integrated",onClick:function(){h(),u()}})}),$().createElement(Ft.DataList,{items:m,columns:b,hideCheckBoxes:!0,enableScrolling:!0}),$().createElement(Kq,{isOpen:l,pendingAction:o.isLoading,actionError:o.error,onReject:function(){h(),s()},onAccept:function(){return o.mutate(function(){var e=t.filter((function(e){return e.permission!==A.permission})),n=r.filter((function(e){var t;return null===(t=A.scopes)||void 0===t?void 0:t.includes(e.name)})),o={permission:A.permission,targetTypeScopes:n.map((function(e){return e.id}))};return[].concat(Yq(e),[o])}())},actionDisabled:!A.category||!A.permission},$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,{id:"set_category",label:i("PermissionsScopes.Label.Category"),options:T,onChange:function(e){C({category:e.target.value,permission:void 0,scopes:[]})},value:A.category,disabled:E})),$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,{id:"set_permission",label:i("PermissionsScopes.Label.Permission"),options:D(A.category||""),onChange:function(e){C(tW(tW({},A),{},{permission:e.target.value,scopes:[]}))},disabled:!A.category||1===D(A.category).length||E,value:A.permission})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(tn.MultiDropdown,{labels:{fieldName:i("PermissionsScopes.Label.targetTypeScopes")},options:r.map((function(e){return e.name})),selected:A.scopes||[],key:"set_target_types",onChange:function(e){return C(tW(tW({},A),{},{scopes:e.map((function(e){return e.value}))}))},displayChips:!0,maxHeight:10,disabled:!A.permission})),A.category&&1===D(A.category).length&&$().createElement(Ft.Notification,{type:"neutral"},i("PermissionsScopes.Notification.AllSet"))),$().createElement($q,{id:"permission-delete-dialog",title:i("PermissionsScopes.Delete"),dismissBtnLabel:i("Button.Cancel"),invokeBtnLabel:i("PermissionsScopes.Delete"),isOpen:d,onDismiss:function(){h(),f()},onInvoke:function(){return o.mutate(t.filter((function(e){return e.permission!==A.permission})),{onSuccess:function(){f()}})},isPending:o.isLoading,error:o.error,primaryBtn:"dismiss"},$().createElement("div",null,A.permission),$().createElement("span",null,A.category,", "),i(wV(A.permission))))}const oW=l.p+"static/rolesPermissionsScopeHelp.97f8b84d.md";function iW(){var e=(0,ki.useParams)().id,t=e?parseInt(e,10):void 0,n=Vt(),r=Ut(),o=Fq(t),i=o.data,a=o.isLoading,l=o.error,s=Hq(t||0,(function(){return n(r("PermissionsScopes.Modify.Success"))})),u=CN(),c=u.data,d=u.isLoading,f=u.error,p=Dn(c).entities;return l||f?$().createElement(tn.ErrorState,{error:l||f}):a||d?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement(rW,{permissionsGroups:vV,permissions:i.permissions,targetTypes:p,mutation:s})}function aW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aW(Object(n),!0).forEach((function(t){sW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}iW.displayName="RolesPermissionsScopeBlade",iW.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("Roles.PermissionsScopeBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("Roles.PermissionsScopeBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:oW}))))};var uW={component:_q,name:_q.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:1200,header:$().createElement(_q.Header,null),showCloseButton:!1}},cW={component:Gq,name:Gq.displayName,open:!0,defaults:{fluid:!1,active:!0,initialWidth:700,header:$().createElement(Gq.Header,null)}},dW={component:iW,name:iW.displayName,open:!0,defaults:{fluid:!1,active:!1,initialWidth:900,collapsed:!0,header:$().createElement(iW.Header,null),onClose:null,showCloseButton:!1}};var fW=function(){var e=(0,ki.useParams)().id,t=Eq(),n=(0,G.useMemo)((function(){return e?[uW,lW(lW({},cW),{},{defaults:lW(lW({},cW.defaults),{},{onClose:t.toHome})}),dW]:[uW]}),[e,t.toHome]);return $().createElement(Ft.Blades,{registrations:n,settings:{resizable:!0}})};const pW=l.p+"static/ConfigureTenant.bbcb6d84.md";function hW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return mW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gW(){var e,t=Ut(),n=Nt().state.shell,r=hW((0,ki.useSearchParams)(),1)[0],o=hW((0,G.useState)(null!==(e=n.getTenantId())&&void 0!==e?e:""),2),i=o[0],a=o[1],s=(0,G.useCallback)((function(){var e,t=r.get("redirect"),n=new URL(t&&!t.includes(i$)?t:"/");n.searchParams.set("tenant",i.trim()),e=n.toString(),l.g.location.assign(e)}),[r,i]);return $().createElement($().Fragment,null,$().createElement(Ft.FormField,{fieldType:"text",className:"configure-tenant__tenant"},$().createElement(Ft.TextField,{id:"configure-tenant__tenant",label:$().createElement($().Fragment,null,t("ConfigureTenant.Label.Tenant"),$().createElement(tn.RequiredIcon,null)),value:i,onChange:function(e){return a(e.target.value)},autoFocus:!0})),$().createElement("div",{className:"configure-tenant__controls"},$().createElement(Ft.Button,{onClick:s,label:t("Button.OK"),disabled:!i})))}function yW(){var e=Ut();return $().createElement($().Fragment,null,e("ConfigureTenantBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("ConfigureTenantBlade.Header")},$().createElement(tn.Documentation,{markdownFilePath:pW})))}gW.displayName="RolloutsConfigureTenantBlade",yW.displayName="ConfigureTenantBladeHeader";var bW={component:gW,name:gW.displayName,open:!0,defaults:{active:!0,header:$().createElement(yW,null),showMinButton:!1,showMaxButton:!1,showCloseButton:!1}};function vW(){var e=(0,G.useMemo)((function(){return[bW]}),[]);return $().createElement(Ft.Blades,{registrations:e})}const SW=l.p+"static/DistributionSetInvalidate.ba0ab159.md";function EW(e){var t=e.filters,n=e.children,r=Ut(),o=new URLSearchParams(t);return $().createElement("div",{className:"a-link a-link--simple"},$().createElement(ki.Link,{to:Qa(void 0,o.toString()),title:r("RolloutsLink.Tooltip")},n))}function wW(e){var t=e.dsId,n=e.statParam,r=e.value,o=Ut()("total"!==n?"InvalidateDistributionSet.Label.Statistics.Rollouts.".concat(n):"InvalidateDistributionSet.Stats.Title.Rollouts"),i={distributionSetId:t+""};return"total"!==n&&(i.status=n.toLowerCase()),$().createElement($().Fragment,null,$().createElement("span",null,o),r?$().createElement(EW,{filters:i},r):$().createElement("span",null,r))}function OW(e){var t=e.dsId,n=e.statParam,r=e.value,o=Ut()("total"!==n?"InvalidateDistributionSet.Label.Statistics.Actions.".concat(n):"InvalidateDistributionSet.Stats.Title.Actions"),i=new URLSearchParams({distributionSetId:t+""});return"total"!==n&&i.set("actionDetailedStatus",n.toLowerCase()),$().createElement($().Fragment,null,$().createElement("span",null,o),r?$().createElement(_m,{query:"?".concat(i.toString())},r):$().createElement("span",null,r))}function AW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return CW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TW(e){var t=e.header,n=e.expandable,r=e.expandedDefault,o=e.className,i=e.children,a=AW((0,G.useState)(null!==r&&void 0!==r&&r),2),l=a[0],s=a[1],u=(0,G.useCallback)((function(e){s((function(e){return!e}))}),[s]),c=(0,G.useMemo)((function(){var e=[n?"--expandable":void 0,n&&l?"--expanded":void 0,o].filter((function(e){return e}));return e.length?" ".concat(e.join(" ")):""}),[n,l,o]);return $().createElement("section",{className:"ds-statistics-section".concat(c)},$().createElement("h3",{className:"ds-statistics-section__header"},n&&$().createElement("button",{className:"ds-statistics-section__expander",onClick:u},$().createElement(Ft.Icon,{iconName:l?"up":"down"})),t),$().createElement("div",{className:"ds-statistics-section__content"},(!n||l)&&i))}function DW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return xW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PW="invalidate-ds__cancelation-action-type",MW="none",IW="soft",RW="force";function LW(e){var t=e.id,n=e.name,r=e.version,o=e.statistics,i=(0,ki.useNavigate)(),a=Ut(),l=Ht(),s=DW((0,G.useState)({value:!1,overriden:null}),2),u=s[0],c=s[1],d=DW((0,G.useState)(MW),2),f=d[0],p=d[1],h=(0,G.useCallback)((function(e){var t=e.target.value;p(t),c((function(e){return t===MW?{value:e.overriden,overriden:null}:null===e.overriden?{value:!0,overriden:e.value}:e}))}),[c,p]),m=kW(o.rollouts),g=kW(o.actions);return $().createElement("div",{className:"invalidate-ds"},$().createElement("div",{className:"invalidate-ds__statistics"},$().createElement("div",{className:"margin-bottom-1"},$().createElement(Ya,{id:t,name:n,version:r})),$().createElement(TW,{className:"invalidate-ds__statistics__rollouts",header:$().createElement("div",{className:"ds-statistics --full-width statistics__header"},$().createElement(wW,{dsId:t,statParam:"total",value:o.rollouts.total})),expandable:!!o.rollouts.total,expandedDefault:!!o.rollouts.total},!!m.length&&$().createElement("div",{className:"ds-statistics --full-width statistics__parameters margin-bottom-1"},m.map((function(e){var n=DW(e,2),r=n[0],o=n[1];return $().createElement(wW,{key:"ds-statistics__rollouts__".concat(r),dsId:t,statParam:r,value:o})})))),$().createElement(Ft.Divider,null),$().createElement(TW,{className:"invalidate-ds__statistics__actions",header:$().createElement("div",{className:"ds-statistics --full-width statistics__header"},$().createElement(OW,{dsId:t,statParam:"total",value:o.actions.total})),expandable:!!o.actions.total,expandedDefault:!!o.actions.total},!!g.length&&$().createElement("div",{className:"ds-statistics --full-width statistics__parameters"},g.map((function(e){var n=DW(e,2),r=n[0],o=n[1];return $().createElement(OW,{key:"ds-statistics__actions__".concat(r),dsId:t,statParam:r,value:o})})))),$().createElement(Ft.Divider,null),$().createElement(TW,{header:$().createElement("div",{className:"ds-statistics --full-width statistics__header"},$().createElement("span",null,a("InvalidateDistributionSet.Stats.Title.AutoAssignments")),$().createElement("span",null,o.totalAutoAssignments))})),$().createElement("div",{className:"invalidate-ds__configuration"},$().createElement(Ft.Notification,{type:"warning"},$().createElement("p",null,a("DistributionSet.Invalidate.Warning.Intro")),$().createElement("ul",null,$().createElement("li",null,a("DistributionSet.Invalidate.Warning.Rollouts")),$().createElement("li",null,a("DistributionSet.Invalidate.Warning.Actions")),$().createElement("li",null,a("DistributionSet.Invalidate.Warning.Assignments"))),a("DistributionSet.Invalidate.Warning.End")),$().createElement("div",{className:"settings"},$().createElement(Ft.Checkbox,{id:"invalidate-ds__stop-rollouts",checked:u.value,disabled:null!==u.overriden,label:a("InvalidateDistributionSet.Configuration.StopRollouts"),onChange:function(e){c({value:e.target.checked,overriden:null})}}),$().createElement(tn.SectionGroup,{label:a("InvalidateDistributionSet.Configuration.CancelationType.Title")},$().createElement(Ft.RadioButton,{id:"invalidate-ds__cancel-type__none",label:a("InvalidateDistributionSet.Configuration.CancelationType.None"),name:PW,value:MW,checked:f===MW,onChange:h}),$().createElement(Ft.RadioButton,{id:"invalidate-ds__cancel-type__soft",label:a("InvalidateDistributionSet.Configuration.CancelationType.Soft"),name:PW,value:IW,checked:f===IW,onChange:h}),$().createElement(Ft.RadioButton,{id:"invalidate-ds__cancel-type__force",label:a("InvalidateDistributionSet.Configuration.CancelationType.Force"),name:PW,value:RW,checked:f===RW,onChange:h}))),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",onClick:function(){i(-1)},label:a("Button.Back")}),$().createElement(Ft.Button,{mode:"primary",label:a("InvalidateDistributionSet.Button.Invalidate"),onClick:function(){var e=l(Ki,{onCancel:function(){return e()},distributionSet:{id:t,name:n,version:r},actionCancelationType:f,cancelRollouts:u.value})}}))))}function kW(e){return Object.keys(e).filter((function(e){return"total"!==e})).sort().map((function(t){return[t,e[t]]}))}function jW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return _W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _W(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FW(){var e,t,n=(0,ki.useParams)().id,r=void 0===n?"-1":n,o=(0,G.useMemo)((function(){return parseInt(r,10)}),[r]),i=jW((0,ki.useSearchParams)(),1)[0],a=function(e){return Es(da.statistics(e),"".concat(fi,"/").concat(e,"/statistics"))}(o),l=a.data,s=a.error,u=a.isLoading;return s?$().createElement(tn.ErrorState,{error:s}):u?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"invalidate-ds-loading"})):$().createElement(LW,{statistics:l,id:o,name:null!==(e=i.get("dsName"))&&void 0!==e?e:"",version:null!==(t=i.get("dsVersion"))&&void 0!==t?t:""})}FW.displayName="InvalidateDistributionSetBlade",FW.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("InvalidateDistributionSetBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("InvalidateDistributionSetBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:SW}))))};var NW={component:FW,name:FW.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(FW.Header,null),showCloseButton:!1}};function BW(){var e=(0,G.useMemo)((function(){return[NW]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})}const UW=l.p+"static/AssignDistributionConfirmationRequired.271f262a.md",HW=l.p+"static/AssignTargets.d43580aa.md";function VW(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function qW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zW(e,t,n){var r=Ut(),o=Bt();return Bn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qW(Object(n),!0).forEach((function(t){WW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({mutationKey:da.assignTargets(e,t),mutationFn:function(){var n=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){VW(i,r,o,a,l,"next",e)}function l(e){VW(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function n(i){var a,l,s,u;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.type,l=i.maintenanceWindow,s=i.forcetime,u=i.confirmationRequired,n.prev=1,n.next=4,o.post("".concat(fi,"/").concat(e,"/assignedTargets"),t.map((function(e){return{id:e,type:a,maintenanceWindow:l,forcetime:s,confirmationRequired:u}})));case 4:n.next=9;break;case 6:throw n.prev=6,n.t0=n.catch(1),new vn(n.t0,r);case 9:case"end":return n.stop()}}),n,null,[[1,6]])})));return function(e){return n.apply(this,arguments)}}()},n))}var QW=l(4032),GW=l(3802);function $W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return KW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YW(e){var t=e.id,n=e.className,r=e.label,o=e.tooltip,i=e.initialValue,a=void 0===i?"":i,l=e.onChange,s=e.placeholder,u=(0,G.useId)(),c=t||u,d=$W((0,G.useState)(a),2),f=d[0],p=d[1],h=(0,G.useRef)(l),m=(0,G.useMemo)((function(){return function(e,t){var n=GW.FIELD_INFO.day_of_week;GW.FIELD_INFO.day_of_week=XW;var r=e.split(/\s+/).map((function(e){return e.trim()})).filter((function(e){return e}));if(r.length>0&&r.length<6)return[null,"Invalid cron expression [".concat(e,"]. Expected [6 to 7] fields but found [").concat(r.length,"] fields.")];try{return[(0,QW.Q)(e,t),null]}catch(o){return[null,o.message]}finally{GW.FIELD_INFO.day_of_week=n}}(null!==f&&void 0!==f?f:"",{hasSeconds:!0})}),[f]),g=$W(m,2)[1],y=(0,G.useMemo)((function(){return g?"error":"neutral"}),[g]),b=(0,G.useMemo)((function(){if(g)return g}),[g]);return(0,G.useEffect)((function(){h.current=l}),[l]),(0,G.useEffect)((function(){var e;null===(e=h.current)||void 0===e||e.call(h,{pattern:f,valid:!g,errorMessage:null!==g&&void 0!==g?g:void 0})}),[f,g]),$().createElement(Ft.FormField,{fieldType:"text",notificationType:y,notificationText:b,className:n},$().createElement("div",{className:"a-text-field a-text-field--search"},r&&$().createElement("label",{htmlFor:c},r),$().createElement("input",{type:"text",id:c,value:f,onChange:function(e){return p(e.target.value)},onBlur:function(e){return p(e.target.value)},title:o,placeholder:s})))}var JW,XW={min:1,max:7,alias:{sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7}};function ZW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ez(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tz(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=iz(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function nz(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function rz(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){nz(i,r,o,a,l,"next",e)}function l(e){nz(i,r,o,a,l,"throw",e)}a(void 0)}))}}function oz(e){return function(e){if(Array.isArray(e))return az(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||iz(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iz(e,t){if(e){if("string"===typeof e)return az(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?az(e,t):void 0}}function az(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lz(e,t){var n=Bt(),r=oz(new Set(e)).filter((function(e){return void 0!==e})),o=Ut(),i=function(){var e=rz(regeneratorRuntime.mark((function e(){var t,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],!(r&&r.length>0)){e.next=25;break}o=tz(r),e.prev=3,o.s();case 5:if((i=o.n()).done){e.next=16;break}return a=i.value,e.prev=7,e.delegateYield(regeneratorRuntime.mark((function e(){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.get("".concat(Si,"/").concat(a,"/compatibledistributionsettypes"));case 2:r=e.sent,t.length>0?(o=t.filter((function(e){return r.data.some((function(t){return e.id===t.id}))})),t=oz(o)):t=[].concat(oz(t),oz(r.data));case 4:case"end":return e.stop()}}),e)}))(),"t0",9);case 9:e.next=14;break;case 11:throw e.prev=11,e.t1=e.catch(7),e.t1;case 14:e.next=5;break;case 16:e.next=21;break;case 18:e.prev=18,e.t2=e.catch(3),o.e(e.t2);case 21:return e.prev=21,o.f(),e.finish(21);case 24:case 25:return e.abrupt("return",t);case 26:case"end":return e.stop()}}),e,null,[[3,18,21,24],[7,11]])})));return function(){return e.apply(this,arguments)}}();return ys(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZW(Object(n),!0).forEach((function(t){ez(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({queryFn:function(){var e=rz(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i();case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new vn(e.t0,o);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),queryKey:da.compatibleTypes()},t))}function sz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uz(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return cz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cz(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dz(){var e,t,n,r,o=Ut(),i=Ht(),a=Vt(),l=(0,ki.useNavigate)(),s=null===(e=(0,ki.useLocation)().state)||void 0===e||null===(t=e.assignTargets)||void 0===t?void 0:t.map((function(e){return e.controllerId})),u=null===(n=(0,ki.useLocation)().state)||void 0===n||null===(r=n.assignTargets)||void 0===r?void 0:r.map((function(e){return e.targetType})).filter((function(e){return void 0!==e})),c=(0,G.useMemo)((function(){return new Date(Date.now())}),[]),d=uz((0,G.useState)(),2),f=d[0],p=d[1],h=uz((0,G.useState)(Ji),2),m=h[0],g=h[1],y=uz((0,G.useState)(mz(c)),2),b=y[0],v=y[1],S=(0,G.useMemo)((function(){return mz(c)}),[c]),E=uz((0,G.useState)(),2),w=E[0],O=E[1],A=uz((0,G.useState)(!1),2),C=A[0],T=A[1],D=uz((0,G.useState)(null),2),x=D[0],P=D[1],M=uz((0,G.useState)(vz),2),I=M[0],R=M[1],L=uz((0,G.useState)(),2),k=L[0],j=L[1],_=uz((0,G.useState)(),2),F=_[0],N=_[1],B=(0,G.useRef)(null),U=uz((0,G.useState)([]),2),H=U[0],V=U[1],q=lz(u,{enabled:u.length>0,onSuccess:function(e){var t=e.map((function(e){return"type==".concat(e.key)}))||[];t.length>0&&V(["(".concat(t.join(" or "),")")])}}),W=q.isLoading,z=q.data,Q=u.length>0&&!(null!==z&&void 0!==z&&z.length)&&!W,K=(!W&&u.length>0||!u.length)&&!Q,Y=zW((null===f||void 0===f?void 0:f.id)||-1,null!==s&&void 0!==s?s:[],{onMutate:function(){B.current=i("progress",{message:o("AssignTargetsBlade.AssignOperation.Loading"),noCancel:!0})},onError:function(e){i("error",{message:e.message,noCancel:!0})},onSuccess:function(){a(o("AssignTargetsBlade.AssignOperation.Success")),l(-1)},onSettled:function(){var e;null===(e=B.current)||void 0===e||e.call(B),B.current=null}}).mutate,J=KE(XE.userConfirmationFlowEnabled(),Bu),X=J.data,Z=J.isError;(0,G.useEffect)((function(){void 0===F&&(X&&N(X.value),Z&&N(!1))}),[X,Z,F]);var ee=(0,G.useCallback)((function(){var e={type:m,confirmationRequired:F};m===Xi&&(e.forcetime=new Date("".concat(b).concat((null===w||void 0===w?void 0:w.text)||"")).getTime()),C&&(e.maintenanceWindow={schedule:null===x||void 0===x?void 0:x.pattern,timezone:null===k||void 0===k?void 0:k.text,duration:I}),Y(e)}),[Y,F,m,b,w,C,x,k,I]);return s?$().createElement("div",{className:"ds-assign-targets"},$().createElement("div",{className:"ds-assign-targets__fixed-width"},W&&u.length>0&&$().createElement(Ft.ProgressIndicator,null),K&&$().createElement(TE,{selected:f,onSelect:function(e){return p(e)},query:H}),Q&&$().createElement(Ft.Notification,{type:"warning"},o("CompatibleDistributionSets.NoIntersection"))),fz.map((function(e){return $().createElement(Ft.RadioButton,{key:e,id:"deployment-action__".concat(e),className:"assignemnt-type--".concat(e),label:$().createElement("span",{className:"label-with-icon"},$().createElement(tn.MappedIcon,{value:e,infos:hz}),$().createElement("span",null,o("AssignTargetsBlade.AssignemntType.".concat(e)))),name:pz,value:e,checked:m===e,onChange:function(e){return g(e.target.value)}})})),m===Xi&&$().createElement("div",{className:"deployment-type__force-time__config"},$().createElement("div",{className:"labeledInput"},$().createElement("label",null,o("AssignTargetsBlade.AssignemntType.ScheduleTime")),$().createElement("input",{id:"deployment-type__force-time",type:"datetime-local",value:b,min:S,onChange:function(e){v(e.target.value)}})),$().createElement("div",{className:"labeledInput"},$().createElement(XU,{value:null===w||void 0===w?void 0:w.minutes,onChange:function(e){O(e)},className:"time-zone"}))),$().createElement(Ft.Checkbox,{id:"assignment__maintenance-window",checked:C,label:o("AssignTargetsBlade.Label.MaintenanceWindow"),onChange:function(e){T(e.target.checked)}}),C&&$().createElement("div",{className:"assignment__maintenance-window__config"},$().createElement("div",{className:"labeledInput"},$().createElement("label",{htmlFor:"maintenance-window__schedule"},o("AssignTargetsBlade.Label.MaintenanceWindow.Schedule")),$().createElement(YW,{id:"maintenance-window__schedule",placeholder:Sz,initialValue:null===x||void 0===x?void 0:x.pattern,onChange:function(e){return P(e)}})),$().createElement("div",{className:"labeledInput"},$().createElement("label",{htmlFor:"maintenance-window__timezone"},o("TimeZone.Offset.Label")),$().createElement(XU,{id:"maintenance-window__timezone",label:"",value:null===k||void 0===k?void 0:k.minutes,onChange:j,className:"time-zone"})),$().createElement("div",{className:"labeledInput",style:{marginTop:"1rem"}},$().createElement("label",{htmlFor:"maintenance-window__duration"},o("AssignTargetsBlade.Label.MaintenanceWindow.Duration")),$().createElement(_f,{id:"maintenance-window__duration",value:I,disableClock:!0,clearIcon:null,maxDetail:"second",format:gz,minTime:yz,maxTime:bz,onChange:function(e){return R(null!==e&&void 0!==e?e:vz)}}))),$().createElement(Ft.Checkbox,{id:"assignment__requires-confirmation",checked:null!==F&&void 0!==F&&F,disabled:!1===(null===X||void 0===X?void 0:X.value),label:$().createElement($().Fragment,null,o("AssignTargetsBlade.Label.RequiresConfirmation"),$().createElement(tn.InfoButton,{popoverHeading:o("TenantConfiguration.Heading.Help.UserConsentFlow")},$().createElement(tn.Documentation,{markdownFilePath:UW})),Z&&$().createElement(Ft.Icon,{iconName:"alert-warning",title:o("AssignTargetsBlade.Label.RequiresConfirmation.Warning")})),onChange:function(e){N(e.target.checked)}}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",onClick:function(){l(-1)},label:o("Button.Back")}),$().createElement(Ft.Button,{mode:"primary",disabled:!f||C&&!(null!==x&&void 0!==x&&x.valid),label:o("AssignTargetsBlade.Button.Label.Assign"),onClick:ee}))):$().createElement(Ft.Notification,{type:"error"},$().createElement("span",null,o("AssignTargetsBlade.Message.Error.NoSelectedTargets.Start")),$().createElement(ki.Link,{to:zG},o("AssignTargetsBlade.Message.Error.NoSelectedTargets.LinkText")),$().createElement("span",null,o("AssignTargetsBlade.Message.Error.NoSelectedTargets.End")))}var fz=[Ji,Yi,Zi,Xi],pz="assign-targets__type",hz=(sz(JW={},Ji,{icon:"flash",tooltip:""}),sz(JW,Yi,{icon:"agility",tooltip:""}),sz(JW,Zi,{icon:"download",tooltip:""}),sz(JW,Xi,{icon:"calendar-clock",tooltip:""}),JW);function mz(e){var t=e.getTimezoneOffset();return new Date(e.getTime()-60*t*1e3).toISOString().substring(0,16)}var gz="HH:mm:ss",yz="00:00:00",bz="23:59:59",vz=yz,Sz="0 0 3 ? * 6";dz.displayName="AssignTargetsBlade",dz.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("AssignTargetsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("AssignTargetsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:HW}))))};var Ez={component:dz,name:dz.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(dz.Header,null),showCloseButton:!1}};function wz(){var e=(0,G.useMemo)((function(){return[Ez]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})}const Oz=l.p+"static/ConfigurationsAMQPGeneral.f5312852.md",Az=l.p+"static/ConfigurationsDMF.59dcce52.md",Cz=l.p+"static/ConfigurationsSIE.bc33d8b0.md";function Tz(e){return function(e){if(Array.isArray(e))return Dz(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Dz(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dz(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xz={all:["configurations-amqp"],amqp:function(){return[].concat(Tz(xz.all),["amqp-enabled"])},enableAMQP:function(){return[].concat(Tz(xz.all),["enable-amqp"])},disableAMQP:function(){return[].concat(Tz(xz.all),["disable-amqp"])},setConfig:function(){return[].concat(Tz(xz.all),["set-config"])}};const Pz=l.p+"static/ConfigurationsAMQP.edccdfa8.md";function Mz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Iz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mz(Object(n),!0).forEach((function(t){Rz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}l(8698);function Lz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lz(Object(n),!0).forEach((function(t){jz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _z(e){var t=e.info,n=e.noSensitiveData,r=Ut(),o=(0,tn.useDialog)(),i=o.isDialogOpen,a=o.closeDialog,l=o.showDialog,s=(0,G.useMemo)((function(){return t?JSON.stringify(t,void 0,2):""}),[t]);return(0,G.useEffect)((function(){t&&l()}),[t,l]),$().createElement(tn.Dialog,{isOpen:i,onCancel:a,id:"amqp-configs__amqp-info",variant:"warning",dialogHeader:$().createElement(tn.DialogHeader,{variant:"warning",title:r("ConfigurationsAMQPBlade.AMQPInfo.Title"),onCloseBtnClick:a}),dialogFooter:$().createElement(tn.BasicDialogControls,{closeBtnLabel:r("Button.Close"),onCloseBtnClick:a})},!n&&$().createElement(Ft.Notification,{type:"warning"},$().createElement("p",null,r("ConfigurationsAMQPBlade.AMQPInfo.Warning.Instruction")),$().createElement("p",null,r("ConfigurationsAMQPBlade.AMQPInfo.Warning.Reason"))),$().createElement("div",{className:"amqp-info"},$().createElement(tn.CopyToClipButton,{value:s}),$().createElement("pre",{className:"m-dialog-native__code"},s)))}var Fz=(0,G.forwardRef)((function(e,t){var n=e.isOpen,r=e.title,o=e.pendingAction,i=e.actionError,a=e.onAccept,l=e.onReject,s=e.children,u=Ut(),c=(0,G.useCallback)((function(e){o?e.preventDefault():l()}),[o,l]);return $().createElement(tn.Dialog,{isOpen:n,ref:t,variant:"warning",onCancel:c,dialogHeader:$().createElement(tn.DialogHeader,{variant:"warning",title:r,closeBtnDisabled:o,onCloseBtnClick:l}),dialogFooter:$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:u(i?"Button.Retry":"Button.Yes"),acceptBtnDisabled:o,onAcceptBtnClick:a,rejectBtnLabel:u(i?"Button.Cancel":"Button.No"),rejectBtnDisabled:o,onRejectBtnClick:l})},s)}));function Nz(e){var t,n=e.amqpEnabled,r=Ut(),o=Vt(),i=(0,tn.useDialog)(),a=i.isDialogOpen,l=i.showDialog,s=i.closeDialog,u=(0,G.useCallback)((function(e){s(),o(r(e?"ConfigurationsAMQPBlade.Toast.Success.Enable.AMQP":"ConfigurationsAMQPBlade.Toast.Success.Disable.AMQP"))}),[r,o,s]),c=function(e){var t=ue();return zn(xz.enableAMQP(),di,Iz(Iz({},e),{},{onSuccess:function(){var n;t.setQueryData(xz.amqp(),{data:!0});for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===e||void 0===e||null===(n=e.onSuccess)||void 0===n?void 0:n.call.apply(n,[e].concat(o))}}))}({onSuccess:u}),d=c.data,f=c.error,p=c.isLoading,h=c.mutate,m=function(e){var t=ue();return nr(di,kz(kz({mutationKey:xz.disableAMQP()},e),{},{onSuccess:function(){var n;t.setQueryData(xz.amqp(),{data:!1}),t.setQueryData(Su.parameters(),(function(e){if(null!==e&&void 0!==e&&e.data){var t=JSON.parse(JSON.stringify(e));return t.data[Ru].value=!1,t.data[Nu].value=!1,t}}));for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===e||void 0===e||null===(n=e.onSuccess)||void 0===n?void 0:n.call.apply(n,[e].concat(o))}}))}({onSuccess:u}),g=m.error,y=m.isLoading,b=m.mutate,v=(0,G.useCallback)((function(e){e.stopPropagation(),l()}),[l]),S=(0,G.useCallback)((function(){n?b():h()}),[n,h,b]),E=p||y,w=(0,G.useMemo)((function(){return r(n?"ConfigurationsAMQPBlade.Title.Confirmation.Disable.AMQP":"ConfigurationsAMQPBlade.Title.Confirmation.Enable.AMQP")}),[r,n]),O=f||g,A=r("ConfigurationsAMQPBlade.Section.Title.AMQP");return $().createElement($().Fragment,null,$().createElement("h3",{className:"section-header -size-xl"},A,$().createElement(tn.InfoButton,{popoverHeading:A},$().createElement(tn.Documentation,{markdownFilePath:Pz}))),$().createElement(Ft.Toggle,{id:"amqp-enabled-toggle",checked:n,rightLabel:r((t=n,t?"ToggleButton.Label.Enabled":"ToggleButton.Label.Disabled")),onChange:v,"aria-label":"amqp-enabled-toggle","aria-describedby":void 0}),$().createElement(_z,{info:d}),$().createElement(Fz,{isOpen:a,title:w,pendingAction:E,actionError:O,onAccept:S,onReject:s},$().createElement("span",null,r(n?"ConfigurationsAMQPBlade.Message.Confirmation.Disable.AMQP":"ConfigurationsAMQPBlade.Message.Confirmation.Enable.AMQP"),(f||g)&&$().createElement(tn.ErrorState,{error:f||g}),E&&$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"set-amqp-enabled-loading"})))))}function Bz(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function Uz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uz(Object(n),!0).forEach((function(t){Vz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qz(e,t){var n=Ut(),r=Bt(),o=e===Ru?"dmf":"sie",i="".concat(di,"/").concat(o),a=ue();return Bn(Hz(Hz({},t),{},{mutationKey:xz.setConfig(),mutationFn:function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bz(i,r,o,a,l,"next",e)}function l(e){Bz(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=5;break}return e.next=4,r.post(i,{});case 4:return e.abrupt("return");case 5:return e.next=7,r.delete(i);case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(0),new vn(e.t0,n);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),onSuccess:function(n,r,o){var i;return a.setQueryData(Su.parameters(),(function(t){if(null!==t&&void 0!==t&&t.data){var n=JSON.parse(JSON.stringify(t));return n.data[e].value=r,n}})),null===t||void 0===t||null===(i=t.onSuccess)||void 0===i?void 0:i.call(t,n,r,o)}}))}function Wz(e){var t=e.amqpConfig,n=e.enabled,r=e.disabled,o=e.helpPath,i=Ut(),a=Vt(),l=(0,tn.useDialog)(),s=l.isDialogOpen,u=l.closeDialog,c=l.showDialog,d=qz(t),f=d.error,p=d.isLoading,h=d.mutate,m=(0,G.useCallback)((function(e){e.stopPropagation(),c()}),[c]),g=(0,G.useMemo)((function(){return i("ConfigurationsAMQPBlade.ShortName.".concat(t))}),[i,t]),y=(0,G.useMemo)((function(){return i("ConfigurationsAMQPBlade.FullName.".concat(t))}),[i,t]),b=(0,G.useCallback)((function(){h(!n,{onSuccess:function(e,t){u(),a(i(t?"ConfigurationsAMQPBlade.Toast.Success.Enable.AMQPConfig":"ConfigurationsAMQPBlade.Toast.Success.Disable.AMQPConfig",{name:g}))}})}),[i,a,n,h,g,u]),v=i("ConfigurationsAMQPBlade.Section.Title.".concat(t)),S=(0,G.useMemo)((function(){return i(n?"ConfigurationsAMQPBlade.Title.Confirmation.Disable.AMQPConfig":"ConfigurationsAMQPBlade.Title.Confirmation.Enable.AMQPConfig",{name:y})}),[i,n,y]),E=(0,G.useMemo)((function(){return i(n?"ConfigurationsAMQPBlade.Message.Confirmation.Disable.AMQPConfig":"ConfigurationsAMQPBlade.Message.Confirmation.Enable.AMQPConfig",{name:y})}),[i,n,y]),w=t.replace(".","-"),O="".concat(w,"-toggle");return $().createElement($().Fragment,null,$().createElement("h4",{className:"section-header -size-l"},v,$().createElement(tn.InfoButton,{popoverHeading:v},$().createElement(tn.Documentation,{markdownFilePath:o}))),$().createElement(Ft.Toggle,{id:O,checked:n,rightLabel:i(zz(n)),disabled:r,onChange:m,"aria-label":O,"aria-describedby":void 0}),$().createElement(Fz,{isOpen:s,title:S,pendingAction:p,actionError:f,onAccept:b,onReject:u},$().createElement("span",null,E,f&&$().createElement(tn.ErrorState,{error:f}),p&&$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"set-".concat(w,"-loading")})))))}function zz(e){return e?"ToggleButton.Label.Enabled":"ToggleButton.Label.Disabled"}function Qz(){var e=function(e){return Es(xz.amqp(),di,e)}(),t=e.data,n=e.error,r=e.isLoading,o=Eu({enabled:!r&&!n}),i=o.data,a=o.error,l=o.isLoading,s=(0,G.useMemo)((function(){return null===i||void 0===i?void 0:i[Ru].value}),[i]),u=(0,G.useMemo)((function(){return null===i||void 0===i?void 0:i[Nu].value}),[i]);return n||a?$().createElement(tn.ErrorState,{error:n||a}):r||l?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"amqp-configs-loading"})):$().createElement("div",{className:"amqp-blade__content"},$().createElement(Nz,{amqpEnabled:t}),$().createElement("div",{className:"amqp__configs"},$().createElement(Wz,{amqpConfig:Ru,enabled:null!==s&&void 0!==s&&s,disabled:!t,helpPath:Az}),$().createElement(Wz,{amqpConfig:Nu,enabled:null!==u&&void 0!==u&&u,disabled:!t,helpPath:Cz})))}function Gz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gz(Object(n),!0).forEach((function(t){Kz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Qz.displayName="AMQPConfigurationsBlade",Qz.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("ConfigurationsAMQPBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("ConfigurationsAMQPBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:Oz}))))};var Yz={component:Qz,name:Qz.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(Qz.Header,null),onClose:function(){}}};function Jz(){var e=(0,G.useMemo)((function(){return[$z({},Yz)]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})}var Xz="id",Zz="action",eQ="details",tQ="edit",nQ="new",rQ="/access-control/oauth2-clients",oQ=("".concat(rQ,"/:").concat(Zz,"?/:").concat(Xz,"?"),"accessToken");function iQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?e===nQ?"".concat(rQ,"/").concat(nQ):t?"".concat(rQ,"/").concat(e,"/").concat(t).concat(n):rQ:rQ}function aQ(){var e=(0,ki.useLocation)(),t=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e,t){return{toHome:function(){t(iQ())},toNew:function(){t(iQ(nQ))},toDetails:function(n){t(iQ(eQ,n,!1===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?e.search:""))},toDetailsWithUse:function(e){t(iQ(eQ,e,"?".concat(oQ)))},toEdit:function(e){t(iQ(tQ,e))}}}(e,t)}),[e,t])}const lQ=l.p+"static/OAuth2ClientDetails.e2ed9c88.md",sQ=l.p+"static/OAuth2ClientDetailsUpdate.28bce178.md";function uQ(e){return function(e){if(Array.isArray(e))return cQ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return cQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dQ(e){return[{header:e("OAuth2Client.DetailsView.ClientScopesSection.ScopeHeading"),style:{width:"auto"},fieldName:"scope",resolveCellTitle:function(e){return e.scope}}]}function fQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n?e.reduce((function(e,n,r){var o;return"".concat(e).concat(n).concat(null!==(o=t[r])&&void 0!==o?o:"")}),""):$().createElement($().Fragment,null,e.map((function(e,n){return $().createElement("span",{key:n},e,t[n]&&$().createElement("b",null,t[n]))})))}function pQ(e,t){return $().useMemo((function(){return function(e,t){var n,r,o,i=null!==(n=null===e||void 0===e?void 0:e.split(" "))&&void 0!==n?n:[],a=null!==(r=null===t||void 0===t||null===(o=t.split)||void 0===o?void 0:o.call(t," "))&&void 0!==r?r:[],l=[].concat(uQ(i),uQ(a));return{serviceScopes:uQ(new Set(l)).sort().map((function(e){return{scope:e}}))}}(e,t)}),[e,t])}function hQ(e){return(0,G.useMemo)((function(){return function(e){return[{header:e("OAuth2Client.ListView.NameColumn"),fieldName:"name",resolveCellTitle:function(e){return e.name},data:{searchPredicate:function(e,t){return mQ(e.name,t)}}},{header:e("OAuth2Client.ListView.ClientIdColumn"),fieldName:"clientId",resolveCellTitle:function(e){return e.clientId},data:{searchPredicate:function(e,t){return mQ(e.clientId,t)}}},{header:e("OAuth2Client.ListView.LastModifiedColumn"),resolveCellTitle:function(e){return e.lastModifiedTimestamp&&(0,tn.parseTime)(e.lastModifiedTimestamp)},renderCell:function(t){return null!==t.lastModifiedTimestamp?(0,tn.parseTime)(t.lastModifiedTimestamp):e("NA")}}]}(e)}),[e])}function mQ(e,t){return!(null===e||void 0===e||!e.toUpperCase().includes(null===t||void 0===t?void 0:t.toUpperCase()))}function gQ(){return Nt().actions}function yQ(){return Nt().state}function bQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return vQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function SQ(e){var t=e.name,n=e.clientId,r=e.secret,o=e.lastModifiedTimestamp,i=Ut(),a=bQ((0,G.useState)(!1),2),l=a[0],s=a[1];return $().createElement(tn.SectionGroup,{label:""},$().createElement(tn.LabelledSection,{header:i("OAuth2Client.DetailsView.PropertiesSection.Name")},$().createElement("div",{className:"keep-actions-space",title:t},t)),$().createElement(tn.LabelledSection,{header:i("OAuth2Client.DetailsView.PropertiesSection.Secret"),value:r,showCopy:l},$().createElement(tn.TextSecret,{onChange:s,timeout:5e3,showLabel:i("TextSecret.Button.Show.Label")},r)),$().createElement(tn.LabelledSection,{header:i("OAuth2Client.DetailsView.PropertiesSection.Id"),value:n,showCopy:!0}),$().createElement(tn.LabelledSection,{header:i("OAuth2Client.DetailsView.PropertiesSection.LastModified")},null!==o?(0,tn.parseTimestamp)(o):i("Global.NA")))}function EQ(e){var t=e.tokenScopesString,n=e.clientScopesString,r=Ut(),o=pQ(n,t).serviceScopes,i=(0,G.useMemo)((function(){return dQ(r)}),[r]);return $().createElement($().Fragment,null,o.length>0?$().createElement(tn.SectionGroup,{label:""},$().createElement(Ft.DataList,{columns:i,items:o,hideCheckBoxes:!0})):null)}function wQ(e){var t=e.client,n=(e.tokenScopesString,e.onDelete),r=e.onEdit,o=e.onUse,i=Ut(),a=function(e,t){var n=Nt(),r=Ut();return(0,G.useCallback)((function(){if(t.name)var o=n.state.shell.showModal("delete",{headline:r("OAuth2Client.DeleteConfirmation.Header"),message:r("OAuth2Client.DeleteConfirmation.Message"),deleteItems:[t.name],onConfirm:function(){o(),e(t.clientId)}})}),[n,r,t,e])}(n,t);return $().createElement($().Fragment,null,$().createElement(Ft.ContextMenu,{trigger:$().createElement(Ft.Button,{icon:"wrench",type:"button",mode:"integrated",title:i("OAuth2Client.DetailsView.Action.OpenContextMenu")}),style:{position:"absolute",right:0},popover:{position:"bottom-right",triggerOffset:8}},$().createElement(Ft.MenuItem,{title:i("OAuth2Client.DetailsView.Action.Edit"),label:$().createElement($().Fragment,null,i("OAuth2Client.DetailsView.Action.Edit")),icon:"edit",onClick:function(){return r(t.clientId)}}),$().createElement(Ft.MenuItem,{title:i("OAuth2Client.DetailsView.Action.AccessToken"),label:$().createElement($().Fragment,null,i("OAuth2Client.DetailsView.Action.AccessToken")),icon:"play",onClick:function(){return o(t.clientId)}}),$().createElement(Ft.MenuItem,{title:i("OAuth2Client.DetailsView.Action.Delete"),label:$().createElement($().Fragment,null,i("OAuth2Client.DetailsView.Action.Delete")),icon:"delete",onClick:a})),$().createElement(SQ,t),$().createElement(Ft.Divider,null),$().createElement(EQ,{tokenScopesString:void 0,clientScopesString:null===t||void 0===t?void 0:t.scopes}))}var OQ=["serviceScopes"];function AQ(){return AQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AQ.apply(this,arguments)}function CQ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function TQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TQ(Object(n),!0).forEach((function(t){xQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||IQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MQ(e){return function(e){if(Array.isArray(e))return RQ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||IQ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IQ(e,t){if(e){if("string"===typeof e)return RQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RQ(e,t):void 0}}function RQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LQ(e){var t=e.client,n=e.tokenScopesString,r=e.onCancel,o=e.onSave,i=e.disabled,a=Ut(),l=pQ(null===t||void 0===t?void 0:t.scopes,n).serviceScopes,s=pQ(null===t||void 0===t?void 0:t.scopes).serviceScopes,u=(0,G.useMemo)((function(){return dQ(a)}),[a]),c=PQ((0,G.useState)({name:(null===t||void 0===t?void 0:t.name)||"",serviceScopes:l.filter((function(e){return s.some((function(t){return t.scope===e.scope}))}))}),2),d=c[0],f=c[1],p=PQ((0,G.useState)(!0),2),h=p[0],m=p[1],g=PQ((0,G.useState)(),2),y=g[0],b=g[1],v=PQ((0,G.useState)(!1),2),S=v[0],E=v[1];return(0,G.useEffect)((function(){t||(m(!0),f({name:"",serviceScopes:[]}))}),[t]),(0,G.useEffect)((function(){if(!h){var e=[function(){var e;return 0===(null===(e=d.name)||void 0===e?void 0:e.length)?{name:{notificationType:"error",notificationText:a("OAuth2Client.DetailsView.Form.Validation.NameMinLength")}}:{name:{}}},function(){return 0===MQ(d.serviceScopes).length?{serviceScopes:{notificationType:"error",notificationText:a("OAuth2Client.DetailsView.Form.Validation.AtLeastOneScope")}}:{serviceScopes:{}}}].reduce((function(e,t){return DQ(DQ({},e),t())}),{});b(e)}}),[t,d,h,a]),(0,G.useEffect)((function(){if(y){var e=Object.keys(y).map((function(e){return y[e]})).every((function(e){return!e.notificationType||"neutral"===e.notificationType||"success"===e.notificationType}));E(e)}}),[y]),$().createElement("form",{onChange:function(){return m(!1)},name:"Add client"},$().createElement(Ft.FormField,AQ({fieldType:"text"},null===y||void 0===y?void 0:y.name),$().createElement(Ft.TextField,{id:"oauth2-client-name-field",autoFocus:!0,type:"text",title:a("OAuth2Client.DetailsView.PropertiesSection.Name"),value:d.name,label:a("OAuth2Client.DetailsView.PropertiesSection.Name"),onChange:function(e){var t=e.target.value;f((function(e){return DQ(DQ({},e),{},{name:t})}))}})),$().createElement(Ft.FormField,AQ({fieldType:"checkbox"},null===y||void 0===y?void 0:y.serviceScopes),$().createElement(Ft.DataList,{checked:d.serviceScopes,columns:u,items:l,onChecked:function(e){f((function(t){return DQ(DQ({},t),{},{serviceScopes:e})}))},emptyStateMessage:a("OAuth2Client.DetailsView.ClientScopesSection.EmptyMessage")})),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:a("Global.CancelButton"),type:"button",mode:"secondary",onClick:function(){"function"===typeof r&&r()}}),$().createElement(Ft.Button,{type:"button",label:a("Global.SaveButton"),onClick:function(){if("function"===typeof o){var e=d.serviceScopes,t=CQ(d,OQ);o(DQ(DQ({},t),{},{scopes:(n=e,MQ(n.map((function(e){return e.scope})).filter((function(e){return!!e}))))}))}var n},disabled:!0===i||!S})))}function kQ(){var e=aQ(),t=Nt().state.shell,n=(0,ki.useParams)(),r=n.action,o=n.id,i=yQ().details,a=i.errorMessage,l=i.loading,s=i.entity,u=i.updateSuccess,c=i.updating,d=gQ(),f=d.deleteClient,p=d.getClient,h=d.createClient,m=d.updateClient,g=d.resetDetails,y=(0,G.useMemo)((function(){return a?{message:a}:null}),[a]),b=(0,G.useMemo)((function(){return r===nQ}),[r]),v=b||r===tQ,S=(0,G.useCallback)((function(t){e.toEdit(t)}),[e]),E=(0,G.useCallback)((function(e){f(e)}),[f]),w=(0,G.useCallback)((function(){g(),s?e.toDetails(s.clientId):e.toHome()}),[s,e,g]),O=(0,G.useCallback)((function(t){e.toDetailsWithUse(t)}),[e]),A=(0,G.useCallback)((function(e){b?h(e):s&&m(s.clientId,e)}),[b,s,h,m]);return(0,G.useEffect)((function(){u?w():b||o===(null===s||void 0===s?void 0:s.clientId)||o&&p(o)}),[u,o,p,w,s,b]),y?$().createElement(tn.ErrorState,{error:y}):b||!l&&(s||y)?$().createElement($().Fragment,null,v&&b&&$().createElement(LQ,{client:null,tokenScopesString:t.getScope(),onCancel:w,onSave:A,disabled:c}),v&&!b&&s&&$().createElement(LQ,{client:s,tokenScopesString:t.getScope(),onCancel:w,onSave:A,disabled:c}),!v&&!y&&s&&$().createElement(wQ,{client:s,tokenScopesString:t.getScope(),onEdit:S,onDelete:E,onUse:O})):$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null))}kQ.displayName="OAuth2ClientDetailsBlade",kQ.Header=function(){var e=Ut(),t=(0,ki.useParams)().action,n=t===nQ||t===tQ;return $().createElement($().Fragment,null,e("OAuth2Client.DetailsBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("OAuth2Client.DetailsBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:n?sQ:lQ}))))};const jQ=l.p+"static/OAuth2ClientList.9841c0cf.md";function _Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return FQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NQ=[];function BQ(e){var t=e.data,n=e.loadingData,r=e.errorMessage,o=e.onRefresh,i=e.onAdd,a=e.selectedClientId,l=void 0===a?null:a,s=e.setSelectedClientId,u=Ut(),c=hQ(u),d=_Q((0,G.useState)(""),2),f=d[0],p=d[1],h=(0,G.useMemo)((function(){return t.length?t.filter((function(e){return c.some((function(t){var n,r;return null===(n=t.data)||void 0===n||null===(r=n.searchPredicate)||void 0===r?void 0:r.call(n,e,f||"")}))})).sort(UQ):NQ}),[t,c,f]),m=(0,G.useMemo)((function(){return t.length?u("OAuth2Client.ListView.NoMatchingClients"):u("OAuth2Client.ListView.NoClients")}),[t,u]),g=(0,G.useCallback)((function(e){e.clientId&&(null===s||void 0===s||s(e.clientId))}),[s]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement(Zl,{count:t.length,actions:$().createElement(es,{onRefresh:o,refreshDisabled:n}),content:$().createElement(ps,{searchId:"oauth2clients-list-search",onSearchChange:p}),mainAction:$().createElement(Ft.Button,{icon:"add",mode:"integrated",onClick:i,title:u("OAuth2Client.ListView.Button.Add")})}),r&&$().createElement(tn.ErrorState,{error:{message:r}}),$().createElement(Ft.DataList,{items:h,columns:c,hideCheckBoxes:!0,enableScrolling:!0,emptyStateMessage:m,selected:h.find((function(e){return e.clientId===l})),onSelect:g},n&&$().createElement(Ft.OverlayActivityIndicator,null)))}function UQ(e,t){return(0,tn.sortCaseInsensitive)(e.name||"",t.name||"")}function HQ(){var e=yQ(),t=e.clients,n=e.details,r=t.list,o=t.errorMessage,i=t.loading,a=t.updateSuccess,l=gQ(),s=l.fetchClients,u=l.resetState,c=aQ(),d=(0,ki.useParams)().id,f=(0,G.useCallback)((function(){u(),s()}),[s,u]);return(0,G.useEffect)((function(){f()}),[f]),(0,G.useEffect)((function(){(n.updateSuccess||a)&&s()}),[n.updateSuccess,a,s]),$().createElement(BQ,{data:r,loadingData:i,errorMessage:o,onRefresh:f,onAdd:function(){return c.toNew()},selectedClientId:d,setSelectedClientId:function(e){return c.toDetails(e)}})}HQ.displayName="OAuth2ClientListBlade",HQ.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("OAuth2ClientListBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("OAuth2ClientListBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:jQ}))))};const VQ=l.p+"static/OAuth2ClientUsage.4826fd74.md";function qQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return WQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zQ(e){var t=e.expiresIn,n=e.accessToken,r=e.onRefresh,o=Ut(),i=qQ((0,G.useState)(t),2),a=i[0],l=i[1];(0,G.useEffect)((function(){l(t)}),[t]),(0,G.useEffect)((function(){var e=setInterval((function(){l((function(t){var n=t+-60;return n>0?n:(clearInterval(e),0)}))}),6e4);return function(){clearInterval(e)}}),[t]),(0,G.useEffect)((function(){a<=0&&r()}),[a,r]);var s=Math.round(a/60);return $().createElement($().Fragment,null,$().createElement("p",null,o("OAuth2Client.TestAccessToken.Explanation",{expiresIn:s})),$().createElement(Jy,{canCopy:!0,value:n},$().createElement(tn.TruncatedText,{position:"right"},n)))}function QQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return GQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $Q="NO_TAB";function KQ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$Q,t=(0,G.useState)(e),n=QQ(t,2),r=n[0],o=n[1],i=(0,G.useCallback)((function(e){o((function(t){return t!==e?e:$Q}))}),[]);return[r,i]}function YQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return XQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XQ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ZQ="http",eG="curl",tG="jquery",nG="xhr",rG="fetch";function oG(e){var t=e.oAuth2Client,n=e.token,r=Ut(),o=Nt().state.shell.getOauthTokenEndpoint(),i=JQ(KQ(eG),2),a=i[0],l=i[1],s=(0,G.useMemo)((function(){var e;return YQ(e={},eG,{label:r("OAuth2Client.Example.CURL")}),YQ(e,rG,{label:r("OAuth2Client.Example.JS.Fetch")}),YQ(e,nG,{label:r("OAuth2Client.Example.JS.XHR")}),YQ(e,ZQ,{label:r("OAuth2Client.Example.Https")}),YQ(e,tG,{label:r("OAuth2Client.Example.JQuery")}),e}),[r]);return $().createElement($().Fragment,null,$().createElement("p",null,r("OAuth2Client.Example.FetchExample.Description")),$().createElement(tn.Tabs,{tabs:s,tabId:a,onChange:l},$().createElement(tn.Tab,{key:ZQ,id:ZQ},$().createElement(Jy,{preformatted:!0,label:r("OAuth2Client.Example.FetchExample.RequestLabel"),canCopy:!0,value:uG(t,o,!0).toString()},uG(t,o)),$().createElement(Jy,{preformatted:!0,label:r("OAuth2Client.Example.FetchExample.ResponseLabel"),canCopy:!0,value:cG(n)},cG(n))),$().createElement(tn.Tab,{key:eG,id:eG},$().createElement(Jy,{preformatted:!0,canCopy:!0,value:iG(t,o,!0).toString()},iG(t,o))),$().createElement(tn.Tab,{key:tG,id:tG},$().createElement(Jy,{preformatted:!0,canCopy:!0,value:aG(t,o,!0).toString()},aG(t,o))),$().createElement(tn.Tab,{key:nG,id:nG},$().createElement(Jy,{preformatted:!0,canCopy:!0,value:lG(t,o,!0).toString()},lG(t,o))),$().createElement(tn.Tab,{key:rG,id:rG},$().createElement(Jy,{preformatted:!0,canCopy:!0,value:sG(t,o,!0).toString()},sG(t,o)))))}function iG(e,t){var n=e.clientId,r=e.secret,o=e.scopes,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=["curl --location \\\n --request POST '","' \\\n --header 'Content-Type: application/x-www-form-urlencoded' \\\n --data-urlencode 'grant_type=client_credentials' \\\n --data-urlencode 'client_id=","' \\\n --data-urlencode 'client_secret=","' \\\n --data-urlencode 'scope=","'"],l=[t,n,r,null!==o&&void 0!==o?o:""];return fQ(a,l,i)}var aG=function(e,t){var n=e.clientId,r=e.secret,o=e.scopes,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=['var settings = {\n "url": "','",\n "method": "POST",\n "headers": {\n "Authorization": "Bearer ",\n "Content-Type": "application/x-www-form-urlencoded"\n },\n "data": {\n "grant_type": "client_credentials",\n "client_id": "','",\n "client_secret": "','",\n "scope": "','"\n }\n};\n$.ajax(settings).done(function (response) {\n console.log(response);\n});'],l=[t,n,r,null!==o&&void 0!==o?o:""];return fQ(a,l,i)};function lG(e,t){var n=e.clientId,r=e.secret,o=e.scopes,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=['var data = "grant_type=client_credentials" +\n "&client_id=','" +\n "&client_secret=','" +\n "&scope=','";\n\nvar xhr = new XMLHttpRequest();\n\nxhr.addEventListener("readystatechange", function() {\n if(this.readyState === 4) {\n console.log(this.responseText);\n }\n});\n\nxhr.open("POST", "','");\nxhr.setRequestHeader("Authorization", "Bearer ");\nxhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");\n\nxhr.send(data);'],l=[n,r,null!==o&&void 0!==o?o:"",t];return fQ(a,l,i)}function sG(e,t){var n=e.clientId,r=e.secret,o=e.scopes,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=["fetch('","', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n body: new URLSearchParams([\n ['grant_type', 'client_credentials'],\n ['client_id', '","'],\n ['client_secret', '","'],\n [\n 'scope',\n '","',\n ],\n ]),\n}).then(async res => {\n if (res.ok) {\n console.log(await res.json());\n }\n});"],l=[t,n,r,null!==o&&void 0!==o?o:""];return fQ(a,l,i)}function uG(e,t,n){var r=e.clientId,o=e.scopes,i=e.secret,a=new URL(t);return fQ(["POST "," HTTP/1.1\nHost: ","\nAccept: application/json\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=client_credentials\n&client_id=","\n&client_secret=","\n&scope="],[a.pathname,a.origin,r,i,null!==o&&void 0!==o?o:""],n)}function cG(e){return"HTTP/1.1 200 OK\nContent-Type: application/json\n\n".concat(JSON.stringify(e,null,2))}function dG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return pG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pG(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hG="curl",mG="spring";function gG(e){var t=e.oAuth2Client,n=e.token,r=Ut(),o=Nt().state.shell,i=o.getOauthTokenEndpoint(),a=o.resolveMgmtApiUrl(vi),l=fG(KQ(hG),2),s=l[0],u=l[1],c=(0,G.useMemo)((function(){var e;return dG(e={},hG,{label:r("OAuth2Client.Example.CURL")}),dG(e,mG,{label:r("OAuth2Client.Example.Spring")}),e}),[r]);return $().createElement($().Fragment,null,$().createElement("p",null,r("OAuth2Client.Example.AccessExample.Description")),$().createElement(tn.Tabs,{tabs:c,tabId:s,onChange:u},$().createElement(tn.Tab,{key:hG,id:hG},$().createElement(Jy,{canCopy:!0,value:yG(n.access_token,a)},yG(n.access_token,a))),$().createElement(tn.Tab,{key:mG,id:mG},$().createElement("p",null,r("OAuth2Client.Example.AccessExample.SpringDescription")),$().createElement("p",null,r("OAuth2Client.Example.AccessExample.SpringDependency")),$().createElement(Jy,{preformatted:!0,canCopy:!0,value:bG},bG),$().createElement("p",null,r("OAuth2Client.Example.AccessExample.SpringProperties")),$().createElement(Jy,{preformatted:!0,canCopy:!0,value:vG(t,i,!0).toString()},vG(t,i)),$().createElement("p",null,r("OAuth2Client.Example.AccessExample.SpringConfig")),$().createElement(Jy,{preformatted:!0,canCopy:!0,value:SG},SG),$().createElement("p",null,r("OAuth2Client.Example.AccessExample.SpringRest")),$().createElement(Jy,{preformatted:!0,canCopy:!0,value:EG},EG))))}function yG(e,t){return'curl -i -H "accept: application/json" -H "Authorization: Bearer '.concat(e,'" ')+'"'.concat(t,'"')}var bG="\n<dependency>\n\t<groupId>org.springframework.security.oauth.boot</groupId>\n\t<artifactId>spring-security-oauth2-autoconfigure</artifactId>\n\t<version>2.0.0.RELEASE</version>\n</dependency>";function vG(e,t){var n=e.clientId,r=e.name,o=e.secret,i=e.scopes,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=["bosch-iot-rollouts-auth.oauth2.client.id=","\nbosch-iot-rollouts-auth.oauth2.client.grantType=client_credentials\nbosch-iot-rollouts-auth.oauth2.client.clientAuthenticationScheme=form\nbosch-iot-rollouts-auth.oauth2.client.clientId=","\nbosch-iot-rollouts-auth.oauth2.client.clientSecret=","\nbosch-iot-rollouts-auth.oauth2.client.accessTokenUri=","\nbosch-iot-rollouts-auth.oauth2.client.scope="],s=[r,n,o,t,null!==i&&void 0!==i?i:""];return fQ(l,s,a)}var SG='@Bean\n@ConfigurationProperties("bosch-iot-rollouts-auth.oauth2.client")\nprotected ClientCredentialsResourceDetails oAuthDetails() {\n\treturn new ClientCredentialsResourceDetails();\n}\n\n@Bean\nprotected RestTemplate restTemplate() {\n\tOAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(oAuthDetails());\n\t// Potential customization of RestTemplate here, such as proxy configuration;\n\treturn oAuth2RestTemplate;\n}',EG='restTemplate()\n .getForEntity(rolloutsEndpoint\n + "/rest/'.concat(vi,'", String.class);');function wG(){var e=Ut(),t=yQ(),n=t.details.entity,r=t.accessToken,o=r.error,i=r.pending,a=r.token,l=gQ().fetchAccessToken;return(0,G.useEffect)((function(){n&&l(n)}),[l,n]),$().createElement($().Fragment,null,!a&&!o&&!i&&!n&&$().createElement(tn.EmptyState,{message:e("OAuth2Client.AccessTokenBlade.MissingClient")}),o&&$().createElement(tn.ErrorState,{error:{message:o}}),i&&$().createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"}},$().createElement(Ft.ActivityIndicator,null)),a&&n&&$().createElement("div",{className:"a-text"},$().createElement("p",null,e("OAuth2Client.AccessTokenBlade.IntroText",{clientId:n.name})),$().createElement(tn.SectionGroup,{label:e("OAuth2Client.AccessTokenBlade.AccessToken.Header"),popoverHeading:e("OAuth2Client.AccessTokenBlade.AccessToken.Header")},$().createElement(zQ,{accessToken:a.access_token,expiresIn:a.expires_in,onRefresh:function(){return l(n)}})),$().createElement(tn.SectionGroup,{label:e("OAuth2Client.AccessTokenBlade.FetchExample.Header"),popoverHeading:e("OAuth2Client.AccessTokenBlade.FetchExample.Header")},$().createElement(oG,{oAuth2Client:n,token:a})),$().createElement(tn.SectionGroup,{label:e("OAuth2Client.AccessTokenBlade.AccessAPIExample.Header"),popoverHeading:e("OAuth2Client.AccessTokenBlade.AccessAPIExample.Header")},$().createElement(gG,{oAuth2Client:n,token:a}))))}function OG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OG(Object(n),!0).forEach((function(t){CG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wG.displayName="OAuth2ClientUseBlade",wG.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("OAuth2Client.AccessTokenBlade.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("OAuth2Client.AccessTokenBlade.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:VQ}))))};var TG={component:HQ,name:HQ.displayName,open:!0,defaults:{showCloseButton:!1,fluid:!0,initialWidth:825,header:$().createElement(HQ.Header,null)}},DG={component:kQ,name:kQ.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:550,onClose:function(){},header:$().createElement(kQ.Header,null)}},xG={component:wG,name:wG.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:550,onClose:function(){},header:$().createElement(wG.Header,null)}};var PG=(0,tn.withContentBodyTemplate)((function(){var e=(0,ki.useLocation)(),t=(0,ki.useParams)(),n=aQ(),r=t.id,o=t.action,i=null!==new URLSearchParams(e.search).get(oQ),a=(0,G.useMemo)((function(){if(!o)return[AG(AG({},TG),{},{defaults:AG(AG({},TG.defaults),{},{collapsed:!1})})];DG.defaults.onClose=function(){return n.toHome()};var e=[AG(AG({},TG),{},{defaults:AG(AG({},TG.defaults),{},{collapsed:o===nQ||o===tQ})}),DG];return i&&(xG.defaults.onClose=function(){r&&n.toDetails(r,!0)},e.push(Object.assign({},xG))),e}),[r,o,i,n]);return $().createElement(Ft.Blades,{registrations:a,settings:{resizable:!0}})}));const MG=l.p+"static/WhoAmI.39862ed3.md";var IG=["whoami","details"];function RG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kG(e){return Es(IG,"".concat(mi,"/whoami"),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RG(Object(n),!0).forEach((function(t){LG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({staleTime:1/0,cacheTime:1/0},e))}function jG(){var e=Ut(),t=Nt(),n=(0,G.useMemo)((function(){return t.state.shell.getUser()}),[t.state.shell]),r=(0,G.useMemo)((function(){return t.state.shell.getCurrentToken()}),[t.state.shell]),o=(0,G.useMemo)((function(){switch(n.idp){case"ciam":return e("WhoAmI.Idp.SKID");case"bosch-idp-azure":return e("WhoAmI.Idp.BoschAD");default:return n.idp}}),[e,n.idp]),i=(0,G.useMemo)((function(){var t=(0,tn.getTokenExpirationTime)(r.access_token,r.expires_in),n=t.lifeTime,o=t.expTime,i=[];return n&&i.push(n),o&&i.push(e("WhoAmI.OAuth2.AccessToken.Expiry.Text",{expDate:o})),i.join(", ")}),[e,r.access_token,r.expires_in]);return $().createElement($().Fragment,null,$().createElement(tn.LabelledSection,{header:e("WhoAmI.Idp.Label")},$().createElement("span",null,o)),$().createElement(tn.LabelledSection,{header:e("WhoAmI.Idp.UserId.Label"),showCopy:!0,value:n.idpUserId},$().createElement("span",null,n.idpUserId)),$().createElement(tn.LabelledSection,{header:e("WhoAmI.OAuth2.Token.Label"),showCopy:!0,value:r.access_token},$().createElement("span",null,r.access_token)),$().createElement(tn.LabelledSection,{header:e("WhoAmI.OAuth2.AccessToken.Expiry.Label")},$().createElement("span",null,i)),$().createElement(tn.LabelledSection,{header:e("WhoAmI.OAuth2.RefrershToken.Label"),showCopy:!0,value:r.refresh_token},$().createElement("span",null,r.refresh_token)))}function _G(e){var t=e.items,n=e.dataColumnHeader,r=e.emptyMessage,o=e.className,i=(e.compareItems,(0,G.useMemo)((function(){return t.map((function(e){return{data:e}})).sort((function(e,t){return e.data>t.data?1:e.data<t.data?-1:0}))}),[t])),a=(0,G.useMemo)((function(){return[Ea(n,"data",{isDefault:!0},{width:"90%"}),Sa("","data",{isDefault:!1},(function(){return""}),(function(e){return $().createElement(tn.CopyToClipButton,{value:e.data+""})}),{width:"10%"})]}),[n]);return $().createElement(Ft.DataList,{items:i,columns:a,className:o,enableScrolling:!0,hideCheckBoxes:!0,emptyStateMessage:r})}function FG(){var e=Ut(),t=kG(),n=t.data,r=t.isLoading,o=t.error,i=Nt().state.shell.getTechnicalUserFlow,a=(0,G.useMemo)((function(){var e=["whoami-layout"];return null!==n&&void 0!==n&&n.roles||e.push("--no-roles"),e.join(" ")}),[n]),l=i();return o?$().createElement(tn.ErrorState,{error:o}):r?$().createElement(tn.InlineLoadingIndicator,{"data-testid":"whoami-loading"}):$().createElement("div",{className:a},$().createElement("div",{className:"whoami__general"},$().createElement(tn.LabelledSection,{header:e(l?"WhoAmI.Username.Label":"WhoAmI.Email.Label")},$().createElement("span",null,n.name)),!l&&$().createElement(jG,null)),n.roles&&$().createElement(_G,{items:n.roles,dataColumnHeader:e("WhoAmI.Roles.List.RoleColumn.Header"),emptyMessage:e("WhoAmI.Roles.List.EmptyMsg"),className:"whoami__roles"}),$().createElement(_G,{items:n.permissions,dataColumnHeader:e("WhoAmI.Permissions.List.PermissionColumn.Header"),emptyMessage:e("WhoAmI.Permissions.List.EmptyMsg"),className:"whoami__permissions"}))}FG.displayName="WhoAmIBlade",FG.Header=function(){var e=Ut();return $().createElement($().Fragment,null,e("WhoAmI.Header"),$().createElement(tn.InfoButton,{popoverHeading:e("WhoAmI.Header")},$().createElement("div",null,$().createElement(tn.Documentation,{markdownFilePath:MG}))))};var NG={component:FG,name:FG.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:$().createElement(FG.Header,null),showCloseButton:!1}};function BG(){var e=(0,G.useMemo)((function(){return[NG]}),[]);return $().createElement(Ft.Blades,{registrations:e,settings:{resizable:!0}})}var UG="/software-modules",HG="".concat(UG,"/types"),VG="/distribution-sets",qG="".concat(VG,"/tags"),WG="".concat(VG,"/types"),zG="/targets",QG="".concat(zG,"/tags"),GG="".concat(zG,"/types"),$G="".concat(zG,"/insights"),KG="/actions",YG="/target-filters",JG="/rollouts",XG="/configurations",ZG="".concat(XG,"/amqp"),e$="/quotas",t$="/access-control",n$="".concat(t$,"/users"),r$="".concat(t$,"/roles"),o$="".concat(t$,"/oauth2-clients"),i$="/configure-tenant",a$="/whoami",l$=":id?",s$="types/:id?",u$=":id?",c$="tags/:id?",d$="types/:id?",f$=":controllerId?",p$="tags/:id?",h$="types/:id?",m$="users/:id?",g$="roles/:id?",y$="oauth2-clients/:action?/:id?",b$="amqp?",v$="".concat(UG,"/").concat(l$),S$="".concat(UG,"/").concat(s$),E$="".concat(VG,"/").concat(u$),w$="".concat(VG,"/:id/invalidate"),O$="".concat(VG,"/assign/targets"),A$=("".concat(VG,"/").concat(c$),"".concat(VG,"/").concat(d$)),C$="".concat(zG,"/").concat(f$),T$=("".concat(zG,"/").concat(p$),"".concat(zG,"/").concat(h$)),D$="".concat(KG,"/:id?"),x$="".concat(YG,"/:id?"),P$="".concat(JG,"/:actionOrId?"),M$=("".concat(XG,"/").concat(b$),"".concat(t$,"/").concat(m$)),I$="".concat(t$,"/").concat(g$);"".concat(t$,"/").concat(y$);function R$(e,t){var n=function(e){return t(function(e){return function(t){return $().createElement(mu,null,$().createElement(e,t))}}(e))},r=function(e){return function(t){return e.getTenantId()?null:(0,ki.redirect)("".concat(i$,"?redirect=").concat(encodeURIComponent(t.request.url)),{})}}(e),o=Ia("UIFeature.Name.SM",{list:UG,types:HG}),i=Ia("UIFeature.Name.DS",{list:VG,tags:qG,types:WG}),a=Ia("UIFeature.Name.Targets",{list:zG,tags:QG,types:GG,insight:$G}),l=Ra("UIFeature.Name.AccessControl",[{icon:"people",label:"RolloutsNavigation.Label.Users",pathname:n$},{icon:"checklist",label:"RolloutsNavigation.Label.Roles",pathname:r$},{icon:"settings-lock",label:"RolloutsNavigation.Label.OAuth2",pathname:o$,disabled:!L$(e)}]),s=Ra("UIFeature.Name.Configuration",[{icon:"settings",label:"RolloutsNavigation.Label.Configs.General",pathname:XG},{icon:"gears",label:"RolloutsNavigation.Label.Configs.AMQP",pathname:ZG}]);return[{path:i$,Component:n(vW)},{path:D$,Component:n(cu),loader:r},{path:x$,Component:n(EL),loader:r},{path:P$,Component:n(mI),loader:r},{path:UG,element:$().createElement(ki.Outlet),children:[{path:l$,Component:n(VR)},{path:s$,Component:n(qI)}],handle:o,loader:r},{path:VG,children:[{path:u$,Component:n(Hb)},{path:c$,Component:n(Wh)},{path:d$,Component:n(ah)}],handle:i,loader:r},{path:w$,Component:n(BW),loader:r},{path:O$,Component:n(wz),loader:r},{path:zG,element:$().createElement(ki.Outlet),children:[{path:f$,Component:n(lV)},{path:p$,Component:n(jF)},{path:h$,Component:n($N)},{path:$G,Component:n(cN)}],handle:a,loader:r},{path:XG,element:$().createElement(ki.Outlet),children:[{path:"",Component:n(vp)},{path:b$,Component:n(Jz)}],handle:s,loader:r},{path:"/quotas",Component:n(sv),loader:r},{path:t$,element:$().createElement(ki.Outlet),children:[{path:t$,Component:n(mq)},{path:m$,Component:n(mq)},{path:g$,Component:n(fW)},{path:y$,Component:n(PG)}],handle:l,loader:r},{path:a$,Component:n(BG),loader:r}]}function L$(e){var t,n=e.getTenantId(),r=null===(t=e.getScope())||void 0===t?void 0:t.split(" ");return!!r&&r.includes("tenant.".concat(n,"/ROLE_TENANT_ADMIN"))}function k$(){var e=(0,ki.useNavigate)();return(0,G.useMemo)((function(){return function(e){return{toHome:function(){e(Ba())},toDetails:function(t){e(Ba(t))},toInvalidate:function(t,n,r){e(Ba(t,{invalidate:{name:n,version:r}}))},toAssignTargets:function(t){e(O$,{state:{assignTargets:t}})}}}(e)}),[e])}function j$(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=Ht(),i=k$(),a=(0,G.useRef)(null),l=function(){var e=ue();return zn(da.add(),fi,{onSuccess:function(){e.resetQueries(da.lists())}})}(),s=l.mutate,u=l.isLoading,c=l.error,d=Vp(),f=d.data,p=d.isLoading,h=d.error,m=Dn(f).entities,g=(0,G.useCallback)((function(){return o("progress",{message:n("DistributionSetCreateModal.TypesLoading"),noCancel:!0})}),[o,n]),y=(0,G.useCallback)((function(){o("error",{message:n("DistributionSetCreateModal.TypesLoadingError"),onClose:t.onCancel,noCancel:!0})}),[o,n,t.onCancel]);return(0,G.useEffect)((function(){p?a.current=g():a.current&&(a.current(),a.current=null)}),[p,g,n]),(0,G.useEffect)((function(){h&&y()}),[h,y]),$().createElement(Ft.Dialog,{dialogId:zi,title:n("DistributionSet.Add"),onClose:t.onCancel,modal:!0,open:!0},$().createElement(sa,{onCancel:t.onCancel,onSubmit:function(e){return s([e],{onSuccess:function(e){r(n("DistributionSetCreateModal.SuccessMessage")),t.onCancel(),i.toDetails(e[0].id)}})},loading:u,error:c,distributionSetTypes:m}))}function _$(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(e,t){var n=Ut(),r=Bt();return Bn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F$(Object(n),!0).forEach((function(t){N$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({mutationKey:da.invalidate(e),mutationFn:function(){var t=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_$(i,r,o,a,l,"next",e)}function l(e){_$(i,r,o,a,l,"throw",e)}a(void 0)}))}}(regeneratorRuntime.mark((function t(o){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.post("".concat(fi,"/").concat(e,"/invalidate"),o);case 3:t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(0),new vn(t.t0,n);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()},t))}function U$(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=k$(),i=t.distributionSet.id,a=B$(i,{onSuccess:function(){r(n("DistributionSet.Invalidate.SuccessMessage")),o.toDetails(i),t.onCancel()}}),l=a.mutate,s=a.error,u=a.isLoading,c={actionCancelationType:t.actionCancelationType,cancelRollouts:t.cancelRollouts},d=t.cancelRollouts?n("Global.Yes"):n("Global.No"),f="".concat(t.distributionSet.name,":").concat(t.distributionSet.version);return $().createElement(Ft.Dialog,{dialogId:Ki,title:n("DistributionSet.Invalidate.Heading"),onClose:function(){return!u&&t.onCancel()},modal:!0,open:!0,variant:"warning"},$().createElement("p",null,n("DistributionSet.Invalidate.Heading"),$().createElement("strong",null," ",f)),$().createElement("p",null,n("InvalidateDistributionSet.Configuration.StopRollouts"),":",$().createElement("strong",null," ",d)),$().createElement("p",null,n("InvalidateDistributionSet.Configuration.CancelationType.Title"),$().createElement("strong",null," ",t.actionCancelationType)),$().createElement(tn.ErrorState,{error:s}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{title:n("InvalidateDistributionSet.Button.Invalidate"),label:n("InvalidateDistributionSet.Button.Invalidate"),mode:"secondary",onClick:function(){return l(c)},disabled:u}),$().createElement(Ft.Button,{title:n("Button.Cancel"),label:n("Button.Cancel"),mode:"primary",onClick:function(){return t.onCancel()},disabled:u})))}function H$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return V$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V$(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$(e){var t,n,r,o,i,a,l=e.onClose,s=Ut(),u=Hi(),c=u.setFilters,d=u.currentFilter,f=H$(us(void 0,500),2),p=f[0],h=f[1],m=$o({mode:"onChange",defaultValues:d}),g=m.register,y=m.getValues,b=m.formState.errors,v=m.control,S=Vp({limit:100,sort:"name:ASC"}),E=S.data,w=S.error,O=S.isLoading,A=Dn(E).entities,C=fh(sh,{limit:50,sort:"name:ASC",q:p?En(p,{convertToQParam:function(e){return"name==".concat(e)}}):void 0}),T=Dn(C.data),D=T.entities,x=T.totalCount,P=D.map((function(e){return e.name})),M=ue();var I=w||C.error;return $().createElement(Ft.Dialog,{dialogId:$i,className:"suggestions-containing-modal",title:s("DistributionSetsFilterModal.Header"),onClose:l,modal:!0,open:!0},I&&$().createElement(tn.ErrorState,{error:I,actions:$().createElement(dp,{onRetry:function(){return M.resetQueries(Ap.lists())}})}),$().createElement(Xo,{useFormReturn:m,onCancel:l,onSubmit:function(e){l(),c(e)},submit:"ctrl+enter",createLabel:"Button.Apply"},$().createElement(Yo,{register:g,getValues:y,field:"id",label:"Entity.Label.ID",maxSize:64,notificationText:null===(t=b.id)||void 0===t?void 0:t.message}),$().createElement(Yo,{register:g,getValues:y,field:"name",label:"Entity.Label.Name",maxSize:64,notificationText:null===(n=b.name)||void 0===n?void 0:n.message}),$().createElement(Yo,{register:g,getValues:y,field:"version",label:"Entity.Label.Version",maxSize:64,notificationText:null===(r=b.version)||void 0===r?void 0:r.message}),$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(o=b.type)||void 0===o?void 0:o.message},$().createElement(co,{control:v,name:"type",render:function(e){var t=e.field,n=t.onChange,r=t.value;return $().createElement(tn.MultiDropdown,{labels:{fieldName:s("DistributionSetsFilterModal.Labels.Types")},options:A.map((function(e){return{value:e.key,displayValue:e.name}})),selected:(null===r||void 0===r?void 0:r.split(","))||[],onChange:function(e){n(e.map((function(e){return e.value})).join(","))},displayChips:!0,loading:O})}})),$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(i=b.tag)||void 0===i?void 0:i.message},$().createElement(co,{control:v,name:"tag",render:function(e){var t,n=e.field,r=n.onChange,o=n.value;return $().createElement(tn.MultiDropdown,{labels:{fieldName:s("DistributionSetsFilterModal.Labels.Tags")},options:P,selected:null!==(t=null===o||void 0===o?void 0:o.split(",").filter(Boolean))&&void 0!==t?t:[],onChange:function(e){r(e.map((function(e){return e.value})).join(","))},paginationOptions:{total:x,onLoadMore:function(){return C.fetchNextPage()},onSearch:function(e){return h(e)}},loading:C.isLoading||C.isFetchingNextPage,displayChips:!0})}})),$().createElement(Yo,{register:g,getValues:y,field:"description",label:"Entity.Label.Description",maxSize:64,notificationText:null===(a=b.description)||void 0===a?void 0:a.message})))}const W$=JSON.parse('{"DistributionSetDetailsBlade.Header":"Distribution set","DistributionSetDetailsView.MigrationRequired":"Migration step required","DistributionSetDetailsView.Migration.Enabled":"Enabled","DistributionSetDetailsView.Migration.Disabled":"Disabled","DistributionSetDetailsView.ActionHistory.Label":"Action history","DistributionSetDetailsView.ActionHistory.Tooltip":"View action history for {distributionSet}","DistributionSetDetailsView.Tags.Title":"Tags","DistributionSetDetailsView.ReleaseNotes.Filename":"File name","DistributionSetDetailsView.ReleaseNotes.Actions":"Actions","DistributionSetDetailsView.ReleaseNotes.Actions.Delete":"Delete","DistributionSetDetailsView.ReleaseNotes.Actions.Download":"Download","DistributionSetDetailsView.ReleaseNotes.Actions.Preview":"Preview","DistributionSetDetailsView.ReleaseNotes.Download.Progress.DialogMessage":"Downloading release notes...","DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogHeadline":"Error downloading release notes","DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogMessage":"There was an error downloading release notes \'<b>\'{releaseNotesId}\'</b>\': \'<error>\'{error}\'</error>\'","DistributionSetDetailsView.ReleaseNotes.Download.Error.DialogComfirmButton":"OK","DistributionSetDetailsView.ReleaseNotes.Empty":"No release notes","DistributionSetDetailsView.ReleaseNotes.Add.Tooltip":"Add release notes","DistributionSetDetailsView.ReleaseNotes.Add.Success.ToastMesage":"Release notes added successfully","DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogMessage":"There was an error during uploading release notes \'<b>\'{releaseNotesId}\'</b>\': \'<error>\'{error}\'</error>\'","DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogHeadline":"Release notes upload error","DistributionSetDetailsView.ReleaseNotes.Add.Error.DialogComfirmButton":"OK","DistributionSetDetailsView.ReleaseNotes.Add.Loading.DialogHeadline":"Add release notes","DistributionSetDetailsView.ReleaseNotes.Add.Loading.DialogMessage":"Adding release notes..","DistributionSetDetailsView.ReleaseNotes.Deleted":"Release notes successfully deleted","DistributionSetDetailsView.ReleaseNotes.DeleteModal.Header":"Delete release notes?","DistributionSetDetailsView.ReleaseNotes.DeleteModal.Message":"This action will delete the release notes below","DistributionSetDetailsView.ReleaseNotes.DeleteModal.Delete":"Delete","DistributionSetDetailsView.ReleaseNotes.Total":"{count} {count, plural, =1 {entry} other {entries}}","DistributionSetDetailsView.ReleaseNotes.Preview.Header":"Preview of {releaseNotesId}","DistributionSetDetailsView.ReleaseNotes.Preview.DialogComfirmButton":"OK","DistributionSetDetailsView.ReleaseNotes.Preview.NotAvailable":"No Release Notes Preview available","DistributionSetListBlade.Header":"Distribution sets","DistributionSet.Add":"Add distribution set","DistributionSet.Edit":"Edit distribution set","DistributionSet.AssignTags":"Assign tag to selected distribution sets","DistributionSets.List.Empty":"No distribution sets found","DistributionSets.Label.Complete":"Complete","DistributionSets.Label.Valid":"Valid","DistributionSets.IsComplete":"complete","DistributionSets.Label.Locked":"Locked","DistributionSets.IconTooltip.Locked":"Locked","DistributionSets.IconTooltip.Unlocked":"Unlocked","DistributionSetDetailsActions.ContextMenu.Title":"Distribution set actions","DistributionSetDetailsActions.Delete.Tooltip":"Delete distribution set","DistributionSetDetailsActions.Edit.Tooltip":"Edit distribution set","DistributionSetDetailsActions.Invalidate.Button":"Invalidate","DistributionSetDetailsActions.Invalidate.Tooltip":"Invalidate distribution set","DistributionSetDetailsActions.Lock.Button":"Lock","DistributionSetDetailsActions.Lock.Tooltip":"Lock distribution set","DistributionSetDetailsActions.Unlock.Button":"Unlock","DistributionSetDetailsActions.Unlock.Tooltip":"Unlock distribution set","DistributionSetDialog.Header.Lock":"Lock distribution set","DistributionSetDialog.Header.Unlock":"Lock distribution set","DistributionSetDeleteModal.Header":"Delete distribution set?","DistributionSetDeleteModal.Message":"This action will delete the distribution set below","DistributionSetDeleteModal.SuccessMessage":"Distribution set successfully deleted","DistributionSetDeleteModal.Error.Header":"The operation ended with an error","DistributionSetDeleteModal.Error.Close":"Close","DistributionSetDeleteModal.ListItem":"{distributionSet} (version: {version}, type: {type})","DistributionSetCreateModal.SuccessMessage":"Distribution set successfully created","DistributionSetCreateModal.TypesLoading":"Loading distribution set types","DistributionSetCreateModal.TypesLoadingError":"Unable to load distribution set types","DistributionSetEditModal.SuccessMessage":"Distribution successfully updated","UnassignSoftwareModuleModal.Header":"Unassign software module?","UnassignSoftwareModuleModal.Message":"This action will unassign software module(s) from \\"{distributionSetName}\\"","UnassignSoftwareModuleModal.SuccessMessage":"Software module successfully unassigned","UnassignSoftwareModuleModal.Error.Header":"The operation ended with an error","UnassignSoftwareModuleModal.Error.Close":"Close","DistributionSet.Input.AlreadyExists":"A distribution set with the given type, name and version already exists","DistributionSet.Input.MigrationStepIsRequired":"Migration step is required","AssignedSoftwareModulesListBlade.Header":"Assigned software modules","AssignedSoftwareModules.List.Empty":"No software modules are assigned to this distribution set","DistributionSets.AssignSoftwareModules":"Assign software modules","DistributionSets.AssignSoftwareModules.Disabled":"Modules cannot be assigned to locked distribution set","DistributionSets.AssignSoftwareModulesModalTitle":"Assign software modules to \\"{distributionSetName}\\"","DistributionSets.AssignOSWarning":"Only one OS can be assigned to a distribution set. The previous assignment will be removed.","DistributionSets.SoftwareModulesAssigned":"Software modules successfully assigned","DistributionSets.EmptyAssignableModules":"No assignable software modules found","AssignedSoftwareModules.List.UnassignButtonLabel":"Unassign software module","AssignedSoftwareModules.List.UnassignButtonLabel.Disabled":"Modules cannot be unassigned from locked distribution set","DistributionSet.List.AssignTags":"Assign tag to distribution sets","InvalidateDistributionSetBlade.Header":"Invalidate distribution set","InvalidateDistributionSet.Stats.Title.Rollouts":"Rollouts","InvalidateDistributionSet.Stats.Title.Actions":"Actions","InvalidateDistributionSet.Stats.Title.AutoAssignments":"Auto assignments","InvalidateDistributionSet.Configuration.StopRollouts":"Stop rollouts","InvalidateDistributionSet.Configuration.CancelationType.Title":"Action type of cancelation:","InvalidateDistributionSet.Configuration.CancelationType.None":"None","InvalidateDistributionSet.Configuration.CancelationType.Soft":"Soft","InvalidateDistributionSet.Configuration.CancelationType.Force":"Force","InvalidateDistributionSet.Button.Invalidate":"Invalidate","InvalidateDistributionSet.Label.Statistics.Rollouts.CREATING":"Creating","InvalidateDistributionSet.Label.Statistics.Rollouts.READY":"Ready","InvalidateDistributionSet.Label.Statistics.Rollouts.PAUSED":"Paused","InvalidateDistributionSet.Label.Statistics.Rollouts.STARTING":"Starting","InvalidateDistributionSet.Label.Statistics.Rollouts.STOPPED":"Stopped","InvalidateDistributionSet.Label.Statistics.Rollouts.RUNNING":"Running","InvalidateDistributionSet.Label.Statistics.Rollouts.FINISHED":"Finished","InvalidateDistributionSet.Label.Statistics.Rollouts.ERROR_CREATING":"Error creating","InvalidateDistributionSet.Label.Statistics.Rollouts.ERROR_STARTING":"Error starting","InvalidateDistributionSet.Label.Statistics.Rollouts.DELETING":"Deleting","InvalidateDistributionSet.Label.Statistics.Rollouts.DELETED":"Deleted","InvalidateDistributionSet.Label.Statistics.Rollouts.WAITING_FOR_APPROVAL":"Waiting for approval","InvalidateDistributionSet.Label.Statistics.Rollouts.APPROVAL_DENIED":"Approval denied","InvalidateDistributionSet.Label.Statistics.Rollouts.STOPPING":"Stopping","InvalidateDistributionSet.Label.Statistics.Actions.FINISHED":"Finished","InvalidateDistributionSet.Label.Statistics.Actions.ERROR":"Error","InvalidateDistributionSet.Label.Statistics.Actions.WARNING":"Warning","InvalidateDistributionSet.Label.Statistics.Actions.RUNNING":"Running","InvalidateDistributionSet.Label.Statistics.Actions.CANCELED":"Canceled","InvalidateDistributionSet.Label.Statistics.Actions.CANCELING":"Canceling","InvalidateDistributionSet.Label.Statistics.Actions.RETRIEVED":"Retrieved","InvalidateDistributionSet.Label.Statistics.Actions.DOWNLOAD":"Download","InvalidateDistributionSet.Label.Statistics.Actions.SCHEDULED":"Scheduled","InvalidateDistributionSet.Label.Statistics.Actions.CANCEL_REJECTED":"Cancel rejected","InvalidateDistributionSet.Label.Statistics.Actions.DOWNLOADED":"Downloaded","InvalidateDistributionSet.Label.Statistics.Actions.WAIT_FOR_CONFIRMATION":"Wait for confirmation","DistributionSet.Invalidate.Heading":"Invalidate distribution set","DistributionSet.Invalidate.SuccessMessage":"Distribution set has been invalidated","DistributionSet.Invalidate.Warning.Intro":"By invalidating this distribution set it can no longer be used in any rollout and auto assignment","DistributionSet.Invalidate.Warning.Rollouts":"all active rollouts of this distribution set can be stopped","DistributionSet.Invalidate.Warning.Actions":"all existing update actions of this distribution set can be canceled","DistributionSet.Invalidate.Warning.Assignments":"all active auto assignments of this distribution set will be canceled","DistributionSet.Invalidate.Warning.End":"If no cancelation type is selected, mass-cancel of actions will not be possible at a later point in time. The invalidation cannot be undone. Instead, a new version of the distribution set needs to be created. Affected entities can be seen in the left section.","AssignTargetsBlade.Header":"Assign targets","AssignTargetsBlade.AssignemntType.forced":"Forced","AssignTargetsBlade.AssignemntType.soft":"Soft","AssignTargetsBlade.AssignemntType.downloadonly":"Download only","AssignTargetsBlade.AssignemntType.timeforced":"Time forced","AssignTargetsBlade.AssignemntType.ScheduleTime":"Schedule time","AssignTargetsBlade.Label.MaintenanceWindow":"Use maintenance window","AssignTargetsBlade.Label.MaintenanceWindow.Schedule":"Schedule","AssignTargetsBlade.Label.MaintenanceWindow.Duration":"Duration","AssignTargetsBlade.Label.RequiresConfirmation":"Requires confirmation for actions","AssignTargetsBlade.Label.RequiresConfirmation.Warning":"Available only if confirmation for actions is enabled in rollouts configuration","AssignTargetsBlade.Button.Label.Assign":"Assign","AssignTargetsBlade.Message.Error.NoSelectedTargets.Start":"No selected targets for assignment. To assign targets to a distribution set first select them from ","AssignTargetsBlade.Message.Error.NoSelectedTargets.LinkText":"here","AssignTargetsBlade.Message.Error.NoSelectedTargets.End":".","AssignTargetsBlade.AssignOperation.Loading":"Assigning targets to distribution set...","AssignTargetsBlade.AssignOperation.Success":"Successfully assigned targets to distribution set","DistributionSetsFilterModal.Header":"Select distribution sets filter","DistributionSetsFilterModal.Labels.Types":"Types (or)","DistributionSetsFilterModal.Labels.Tags":"Tags (and)","CompatibleDistributionSets.NoIntersection":"No distribution set is compatible to all of the selected targets","CompatibleDistributionSets.NoResults":"No distribution set is compatible to selected targets","CompatibleDistributionSets.NotAbleToDetect":"Not able to detect compatible distribution sets. Full list is loaded."}');function z$(e){return function(e){if(Array.isArray(e))return $$(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||G$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||G$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G$(e,t){if(e){if("string"===typeof e)return $$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$$(e,t):void 0}}function $$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K$="softwaremodule-list-search";function Y$(e){var t=e.allModules,n=e.assignedModules,r=e.loadingData,o=e.assigning,i=e.assignError,a=e.onAssign,l=e.onCancel,s=e.onSearchChange,u=Ut(),c=(0,G.useMemo)((function(){return function(e){return[Ea(e("Entity.Label.Name"),"name"),Ea(e("Entity.Label.Version"),"version"),Ea(e("Entity.Label.Type"),"type")]}(u)}),[u]),d=Q$((0,G.useState)([]),2),f=d[0],p=d[1],h=Q$((0,G.useState)(0),2),m=h[0],g=h[1],y=(0,G.useMemo)((function(){return z$(t).sort((function(e,t){return+n.includes(t)-+n.includes(e)}))}),[t,n]),b=(0,G.useMemo)((function(){return n.some((function(e){return"os"===e.type}))?0!==m:m>1}),[n,m]);(0,G.useEffect)((function(){var e;document.querySelectorAll('tr.disabled input[type="checkbox"]').forEach((function(e){return e.setAttribute("disabled","")})),null===(e=document.getElementById(K$))||void 0===e||e.focus()}),[t,n]);var v=(0,G.useCallback)((function(e,t){var n;e.target.checked?"os"===t.type?(n=[].concat(z$(f.filter((function(e){return"os"!==e.type}))),[t]),g((function(e){return e+1}))):n=[].concat(z$(f),[t]):n=f.filter((function(e){return e!==t})),p(n)}),[f,p]);return $().createElement(tn.FlexibleColumnWrapper,null,$().createElement("div",{onKeyUp:function(e){"Enter"===e.key&&e.ctrlKey&&(null===a||void 0===a||a(f))}},$().createElement(Ft.CommandBar,{className:"margin-bottom-1",content:$().createElement($().Fragment,null,$().createElement("div",null,u("Entity.List.TotalCount",{count:t.length})),$().createElement(ps,{searchId:K$,columnNames:["Entity.Label.Name","Entity.Label.Version","Entity.Label.Type"],onSearchChange:s}))}),$().createElement(Ft.DataList,{className:"rollouts-data-list_hide-check-all",items:y,columns:c,checked:[].concat(z$(f),z$(n)),disabled:n,emptyStateMessage:u("DistributionSets.EmptyAssignableModules"),onRenderColumnHeader:function(e,t,n){return n(e,t)},onItemChecked:v},r&&$().createElement(tn.InlineLoadingIndicator,null)),b&&$().createElement(tn.Margin,{aligned:"top"},$().createElement(Ft.Notification,{type:"warning"},u("DistributionSets.AssignOSWarning"))),o&&$().createElement(Ft.ProgressIndicator,{type:"indeterminate"}),i&&$().createElement(tn.Margin,{aligned:"top"},$().createElement(tn.ErrorState,{error:i})),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:u("Button.Cancel"),onClick:l,mode:"secondary"}),$().createElement(Ft.Button,{label:u("Button.Assign"),onClick:function(){return null===a||void 0===a?void 0:a(f)},disabled:0===f.length||o}))))}function J$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return X$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X$(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Z$(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=t.distributionSet.id,r=Ut(),o=Vt(),i=Cb(n),a=i.data,l=i.isLoading,s=i.error,u=Dn(a).entities,c=function(e){var t=ue();return zn(da.assignModules(e),"".concat(fi,"/").concat(e,"/assignedSM"),{onSuccess:function(){t.resetQueries(da.assignedModules(e)),t.resetQueries(da.dsDetails(e))}})}(n),d=c.mutate,f=c.isLoading,p=c.error,h=J$((0,G.useState)(""),2),m=h[0],g=h[1],y=JI({limit:500,sort:"type:DESC,name:ASC",q:"name==*".concat(m,"* OR version==*").concat(m,"*")}),b=Dn(y.data).entities,v=y.error||s,S=(0,G.useMemo)((function(){switch(t.distributionSet.type){case"os":return b.filter((function(e){return"os"===e.type}));case"app":return b.filter((function(e){return"application"===e.type}));default:return b}}),[b,t.distributionSet.type]),E=(0,G.useMemo)((function(){return S.filter((function(e){return u.find((function(t){return t.id===e.id}))}))}),[S,u]);return $().createElement(Ft.Dialog,{dialogId:Gi,className:"ds-assign-software-modules-modal",title:r("DistributionSets.AssignSoftwareModulesModalTitle",{distributionSetName:t.distributionSet.name}),onClose:t.onCancel,modal:!0,open:!0},v?$().createElement(tn.ErrorState,{error:v}):$().createElement(Y$,{allModules:S,assignedModules:E,loadingData:y.isLoading||l,assigning:f,assignError:p,onCancel:t.onCancel,onAssign:function(e){d(e.map((function(e){return{id:e.id}})),{onSuccess:function(){t.onSuccess(),o(r("DistributionSets.SoftwareModulesAssigned"))}})},onSearchChange:function(e){if(m!==e){var t=e&&e.length>0?e:void 0;g(t||"")}}}))}var eK=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:W$}),t.registerModal(Qi,n(pa)),t.registerModal(zi,n(j$)),t.registerModal(Gi,n(Z$)),t.registerModal(sm,n(um)),t.registerModal(Ki,n(U$)),t.registerModal($i,n(q$))};const tK=JSON.parse('{"TargetsListBlade.Header":"Targets","TargetDetailsBlade.Header":"Target","Targets.List.ControllerId":"Controller ID","Targets.List.Empty":"No targets found","Targets.List.LastPoll":"Last poll","Targets.List.UpdateStatus":"Update status","Targets.List.PollStatus":"Poll status","Targets.List.IsFiltered":"by RSQL filter","Targets.List.IsFilteredBy":"by RSQL filter \\"{name}\\"","Targets.List.AssignDistribution":"Assign selected targets to distribution","Targets.List.CreateRollout":"Create rollout for selected targets","Targets.List.CreateRollout.WarningTitle":"Too many targets selected","Targets.List.CreateRollout.WarningExplanation":"Manual assignment is intended for cases with limited number of targets.","Targets.List.CreateRollout.WarningSuggestion":"Instead, use a target filter to define a greater number of targets that should be part of the rollout.","Targets.List.AssignTags":"Assign tags to selected targets","Target.UpdateStatus.ErrorTooltip":"Error","Target.UpdateStatus.InSyncTooltip":"In sync","Target.UpdateStatus.PendingTooltip":"Pending","Target.UpdateStatus.RegisteredTooltip":"Registered","Target.UpdateStatus.UnknownTooltip":"Unknown","Target.DeleteConfirmation.Header":"Delete target?","Target.DeleteConfirmation.Message":"This action will delete the target below","Target.DeleteSuccess.Message":"Target successfully deleted","Target.AddModal.Button":"Create target","Target.AddModal.Heading":"Create a target","Target.AddModal.TargetExistsError":"A target with the given controller id already exists","Target.AddModal.Success":"Target successfully created","Target.EditModal.Heading":"Edit a target","Target.EditModal.Success":"Target successfully updated","Target.Types.Loading":"Loading target types...","Target.Types.LoadingError":"Unable to load target types","Target.Types.EmptyType":"None","Target.Types.EditModal.Heading":"Edit a target type","Target.Types.EditModal.Success":"Target type successfully updated","TargetDetails.Label.ControllerId":"Controller Id","TargetDetails.Label.TargetType":"Target type","TargetDetails.Label.Address":"Address","TargetDetails.Label.SecurityToken":"Security token","TargetDetails.Label.ActionHistory":"Action history","TargetDetails.Label.AssignedDistributionSet":"Assigned distribution set","TargetDetails.Label.InstalledDistributionSet":"Installed distribution set","TargetDetails.Label.UpdateStatus":"Update status","TargetDetails.Label.PollStatus":"Poll status","TargetDetails.Label.LastPoll":"Last poll","TargetDetails.PollStatus.Icon.InTimeTooltip":"In-time","TargetDetails.PollStatus.Icon.OverdueTooltip":"Overdue","TargetDetails.PollStatus.OverdueTime":"Overdue {timeAgo}","TargetDetails.PollStatus.OverdueSince":"Overdue since {date}","TargetDetails.ActionHistory.Tooltip":"View action history for controller {controllerId}","TargetDetails.Attributes.Title":"Attributes","TargetDetails.Actions.Title":"Target actions","TargetDetails.Actions.Delete.Tooltip":"Delete target","TargetDetails.Actions.Edit.Tooltip":"Edit target","TargetDetails.Attributes.RequestUpdateTooltip":"Request attributes update","TargetDetails.Attributes.NameLabel":"Name","TargetDetails.Attributes.ValueLabel":"Value","TargetDetails.Attributes.Empty":"No attributes found","TargetDetails.Attributes.UpdateRequestMessage":"Update pending","TargetDetails.Attributes.UpdateRequestTooltip":"Attributes update requested","TargetDetails.TargetTags.Title":"Tags","TargetDetails.TargetTags.Unassign":"Unassign tag","TargetDetails.TargetTags.Unassign.Success":"Tag has been unassigned","TargetDetails.Metadata.Title":"Metadata","TargetFilterBlade.Header":"Target filter","TargetFilterList.LoadFilter":"Load filter","TargetFilterList.LoadMoreFilter":"Load more ...","TargetFilterList.LoadFilterOpenTooltip":"Select target filter","TargetFilterList.LoadFilterResetTooltip":"Reset","TargetFilterList.FilterChanged":"Filter changed","TargetFilterList.AutoAssignTooltip":"Auto assign","TargetFilterList.AutoAssignConfReqTooltip":"Auto assign requiring confirmation","TargetFilterAddModal.Header":"Save target filter","TargetFilterAddModal.SuccessMessage":"Target filter successfully saved","TargetFilterAddModal.ExistingNameError":"Target name already exists","TargetFilterUpdateModal.Header":"Save target filter","TargetFilterUpdateModal.Message":"Are you sure you want to update the filter \\"{filter}\\"?","TargetFilterUpdateModal.SuccessMessage":"Target filter successfully updated","TargetFilterChangeModal.Header":"Change target filter?","TargetFilterChangeModal.Message":"Your changes to the current filter will be discarded.","TargetFilter.DeleteConfirmation.Header":"Delete target filter?","TargetFilter.DeleteConfirmation.Message":"This action will delete the target filter below:","TargetFilter.DeleteSuccess.Message":"Target filter successfully deleted","TargetFilter.QueryHint.StandaloneQuery":"by RSQL filter","TargetFilter.QueryHint.TargetFilterQuery":"by target filter \\"{name}\\"","TargetFilter.Field.Label.name":"Name","TargetFilter.Field.Label.description":"Description","TargetFilter.Field.Label.createdat":"Created at","TargetFilter.Field.Label.lastmodifiedat":"Last modified at","TargetFilter.Field.Label.controllerid":"Controller Id","TargetFilter.Field.Label.updatestatus":"Update status","TargetFilter.Field.Label.ipaddress":"IP address","TargetFilter.Field.Label.tag":"Tag","TargetFilter.Field.Label.lastcontrollerrequestat":"Last controller request at","TargetFilter.Field.Label.assignedds.name":"Assigned distribution name","TargetFilter.Field.Label.assignedds.version":"Assigned distribution version","TargetFilter.Field.Label.installedds.name":"Installed distribution name","TargetFilter.Field.Label.installedds.version":"Installed distribution version","TargetFilter.Field.Label.targettype.key":"Target type","TargetFilter.Field.Label.targettype.name":"Target type name","TargetFilter.Field.Label.attribute.*":"Attribute","TargetFilter.Field.Label.metadata.*":"Metadata","TargetFilter.Comparison.Operator.Label.==":"Equals","TargetFilter.Comparison.Operator.Label.!=":"Not equals","TargetFilter.Comparison.Operator.Label.<=":"Less than or equals","TargetFilter.Comparison.Operator.Label.>=":"Greater than or equals","TargetFilter.Comparison.Operator.Label.<":"Less than","TargetFilter.Comparison.Operator.Label.>":"Greater than","TargetFilter.Comparison.Operator.Label.=le=":"Less than or equals","TargetFilter.Comparison.Operator.Label.=ge=":"Greater than or equals","TargetFilter.Comparison.Operator.Label.=lt=":"Less than","TargetFilter.Comparison.Operator.Label.=gt=":"Greater than","TargetFilter.Comparison.Operator.Label.=in=":"In","TargetFilter.Comparison.Operator.Label.=out=":"Out","TargetFilter.Comparison.Operator.Label":"Operator","TargetFilterBuilder.Dialog.List.Title":"RSQL query","TargetFilterBuilder.Dialog.Update.Title":"Update expression","TargetFilterBuilder.Dialog.Add.Title":"Add expression","TargetFilterBuilder.Dialog.List.AcceptBtn.Label":"Create","TargetFilterBuilder.Dialog.Update.AcceptBtn.Label":"Update","TargetFilterBuilder.Dialog.Add.AcceptBtn.Label":"Add","TargetFilterBuilder.Dialog.QueryPreview.Label":"Query preview","TargetFilterBuilder.ExpressionList.Message.Empty":"Add expression","TargetFilterBuilder.ExpressionList.Add.Tooltip":"Add expression","TargetFilterBuilder.ExpressionTile.Remove.Tooltip":"Remove expression","TargetFilterBuilder.ExpressionTile.Update.Tooltip":"Update expression","TargetFilterBuilder.FieldSelector.Attribute.Label":"Key","TargetFilterBuilder.FieldSelector.Metadata.Label":"Key","TargetFilterBuilder.FieldSelector.Label":"Selector","TargetFilterBuilder.ValueInput.Label":"Value"}');function nK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return rK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rK(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oK(e){var t=e.options,n=(0,tn.useFocusRef)();if(!t)throw Error("Parameters are required.");var r=t.query,o=t.onSuccess,i=t.onCancel,a=Ut(),l=Vt(),s=nK((0,G.useState)(""),2),u=s[0],c=s[1],d=t.existingNames.includes(u)&&{message:a("TargetFilterAddModal.ExistingNameError")},f=function(){var e=ue();return zn(gE.add(),wi,{onSuccess:function(){e.resetQueries(gE.lists())}})}(),p=f.mutate,h=f.error;function m(){p({name:u,query:r},{onSuccess:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){l(a("TargetFilterAddModal.SuccessMessage")),o(e),i()}))})}return $().createElement(Ft.Dialog,{dialogId:TL,title:a("TargetFilterAddModal.Header"),onClose:i,modal:!0,open:!0},$().createElement("div",{onKeyUp:function(e){"Enter"===e.key&&e.ctrlKey&&m()}},$().createElement(Ft.TextField,{ref:n,id:"console-target-filters-name-input",required:!0,label:a("Entity.Label.Name"),value:u,onChange:function(e){return c(e.target.value)},autoFocus:!0}),$().createElement(tn.ErrorState,{error:d||h}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:a("Button.Cancel"),onClick:i}),$().createElement(Ft.Button,{mode:"primary",label:a("Button.Save"),disabled:!u||!!d,onClick:m}))))}function iK(e){var t=Ut(),n=(0,tn.useFocusRef)();return $().createElement(Ft.Dialog,{variant:"warning",dialogId:DL,title:t("Targets.List.CreateRollout.WarningTitle"),modal:!0,open:!0,confirmButton:$().createElement(Ft.Button,{mode:"primary",label:t("Button.OK"),onClick:function(){e.onClose()},ref:n})},$().createElement("p",null,t("Targets.List.CreateRollout.WarningExplanation")),$().createElement("p",null,t("Targets.List.CreateRollout.WarningSuggestion")))}var aK=[];function lK(e){var t=(0,G.useRef)(null),n=Ut(),r=Ht(),o=Fn(KS.createTargetTargetTypes(),Si,{sort:"name:ASC"}),i=o.data,a=o.isLoading,l=o.error,s=(0,G.useMemo)((function(){var e;return null!==(e=null===i||void 0===i?void 0:i.pages.flatMap((function(e){return e.content})))&&void 0!==e?e:aK}),[i]);return(0,G.useEffect)((function(){a?t.current=r("progress",{message:n("Target.Types.Loading"),noCancel:!0}):t.current&&(t.current(),t.current=null)}),[a,n,r]),(0,G.useEffect)((function(){l&&r("error",{message:n("Target.Types.LoadingError"),onClose:e,noCancel:!0})}),[l,r,n,e]),s}function sK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sK(Object(n),!0).forEach((function(t){cK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dK={controllerId:"",targetType:void 0,name:"",description:""};function fK(e){var t,n,r,o=e.onCancel,i=e.onSubmit,a=e.loading,l=e.error,s=e.targetTypes,u=void 0===s?[]:s,c=e.initialEntry,d=e.formName,f=Ut(),p=(0,G.useMemo)((function(){var e=[];return e.push({name:f("Target.Types.EmptyType"),value:-1}),u.forEach((function(t){return e.push({name:t.name,value:t.id})})),e}),[u,f]),h=$o({defaultValues:null!==c&&void 0!==c?c:dK,mode:"onChange"}),m=h.control,g=h.getValues,y=h.register,b=h.formState.errors,v=h.setFocus;(0,G.useEffect)((function(){v(c?"name":"controllerId")}),[v,c]);var S=(0,G.useCallback)((function(e){return 409!==e.code?e:uK(uK({},e),{},{message:f("Target.AddModal.TargetExistsError")})}),[f]);return $().createElement(Xo,{formName:d,useFormReturn:h,loading:a,error:l,onCancel:o,onSubmit:i,convertError:S,isUpdate:!!c,createLabel:"Button.Create"},$().createElement(Yo,{register:y,getValues:g,field:"controllerId",label:"TargetDetails.Label.ControllerId",maxSize:256,notificationText:null===b||void 0===b||null===(t=b.controllerId)||void 0===t?void 0:t.message,validationPattern:{value:/^[^\s]*$/,message:f("FormField.ValidationMsg.NoWhiteSpace")},isRequired:!0,isDisabled:!!c}),$().createElement(Yo,{register:y,getValues:g,field:"name",label:"Entity.Label.Name",maxSize:128,notificationText:null===b||void 0===b||null===(n=b.name)||void 0===n?void 0:n.message}),$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(co,{name:"targetType",control:m,render:function(e){var t=e.field,n=t.value,r=t.onChange;return $().createElement(Ft.Dropdown,{id:"targetType",label:f("Entity.Label.Type"),options:p,value:n,onChange:r})}})),$().createElement(ei,{i18n:f,register:y,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===b||void 0===b||null===(r=b.description)||void 0===r?void 0:r.message}))}function pK(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=zR(),a=lK(n),l=function(){var e=ue();return zn(KS.add(),vi,{onSuccess:function(){e.resetQueries(KS.lists())}})}(),s=l.mutate,u=l.isLoading,c=l.error;return $().createElement(Ft.Dialog,{dialogId:xL,title:r("Target.AddModal.Heading"),onClose:n,modal:!0,open:!0},$().createElement(fK,{formName:"AddTargetForm",onCancel:n,onSubmit:function(e){return s([e],{onSuccess:function(e){o(r("Target.AddModal.Success")),n();var t=null===e||void 0===e?void 0:e[0];null!==t&&void 0!==t&&t.controllerId&&i.toDetails(t.controllerId)}})},loading:u,error:c,targetTypes:a}))}function hK(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=lK(n),a=function(e){var t=ue();return Yn(KS.update(e),"".concat(vi,"/").concat(encodeURIComponent(e)),{onSuccess:function(){t.resetQueries(KS.lists()),t.resetQueries(KS.details())}})}(t.initialEntry.controllerId),l=a.mutate,s=a.isLoading,u=a.error;return $().createElement(Ft.Dialog,{dialogId:PL,title:r("Target.EditModal.Heading"),onClose:n,modal:!0,open:!0},$().createElement(fK,{formName:"EditTargetForm",onCancel:n,onSubmit:function(e){var t=e.name,i=e.description,a=e.targetType,s=e.controllerId;l({name:t,description:i,targetType:a,controllerId:s},{onSuccess:function(){o(r("Target.EditModal.Success")),n()}})},loading:s,error:u,initialEntry:t.initialEntry,targetTypes:i}))}var mK=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:tK}),t.registerModal(TL,n(oK)),t.registerModal(DL,n(iK)),t.registerModal(xL,n(pK)),t.registerModal(PL,n(hK)),t.registerModal(uB,n(cB))};const gK=JSON.parse('{"TargetTypes.UIFeature.Name":"Target types","TargetTypes.UIFeature.Description":"Manage your target types that are used to restrict the compatibility between targets and distribution sets.","TargetTypes.ListBlade.Header":"Target types","TargetTypes.List.Empty":"No target types found","TargetTypes.DetailsBlade.Header":"Target type","TargetType.Actions.Title":"Target types actions","TargetType.Actions.Delete.Tooltip":"Delete target type","TargetType.Actions.DeleteDisabled.Tooltip":"Delete disabled because type is being used","TargetType.DeleteConfirmation.Header":"Delete target type?","TargetType.DeleteConfirmation.Message":"This action will delete the target type below","TargetType.DeleteSuccess.Message":"Target type successfully deleted","TargetType.AddModal.Heading":"Create target type","TargetType.AddModal.CompatibleDistributionSets":"Compatible distribution set types","TargetType.AddModal.Success":"Target type successfully created","TargetType.CompatibleDS.Success":"Compatible distribution set types assigned","TargetType.CompatibleDS.Error.Title":"Compatible distribution set types not assigned","TargetType.CompatibleDS.Error.Message":"Target type created but compatible distribution set types not assigned.","TargetType.AddModal.Button":"Create target type","TargetType.Details.CompatibleDS.Title":"Compatible distribution set types","TargetType.CompatibleDS.EmptyList":"No compatible distribution sets"}');var yK={name:"",description:"",distributionSetTypes:""};function bK(e){var t,n,r,o=e.onCancel,i=e.onSubmit,a=e.loading,l=e.error,s=e.distributionSetTypes,u=void 0===s?[]:s,c=e.initialEntry,d=e.formName,f=Ut(),p=(0,G.useMemo)((function(){return u.map((function(e){return e.name}))}),[u]),h=$o({defaultValues:null!==c&&void 0!==c?c:yK,mode:"onChange"}),m=h.control,g=h.getValues,y=h.register,b=h.formState.errors,v=h.setFocus,S=(0,G.useRef)(null);return(0,G.useEffect)((function(){v("name")}),[v]),$().createElement(Xo,{formName:d,useFormReturn:h,loading:a,error:l,onCancel:o,onSubmit:i,convertError:function(e){return e},isUpdate:!!c,createLabel:"Button.Create"},$().createElement(Yo,{register:y,getValues:g,field:"name",label:"Entity.Label.Name",maxSize:128,isRequired:!0,notificationText:null===b||void 0===b||null===(t=b.name)||void 0===t?void 0:t.message}),$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(n=b.distributionSetTypes)||void 0===n?void 0:n.message},$().createElement(co,{control:m,name:"distributionSetTypes",render:function(e){var t,n=e.field,r=n.onChange,o=n.value;return $().createElement(tn.MultiDropdown,{ref:S,labels:{fieldName:f("TargetType.AddModal.CompatibleDistributionSets")},options:p,selected:null!==(t=null===o||void 0===o?void 0:o.split(",").filter(Boolean))&&void 0!==t?t:[],onChange:function(e){r(e.map((function(e){return e.value})).join(","))},displayChips:!0})}})),$().createElement(ei,{i18n:f,register:y,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===b||void 0===b||null===(r=b.description)||void 0===r?void 0:r.message}))}function vK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return SK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SK(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function EK(e){var t,n=e.options,r=e.onClose;if(!n)throw Error("Parameters are required.");var o=Ut(),i=Ht(),a=Vt(),l=dN(),s=vK((0,G.useState)(""),2),u=s[0],c=s[1],d=Dn(Vp({sort:"name:ASC"}).data).entities,f=function(){var e=ue();return zn(EN.add(),Si,{onSuccess:function(){e.resetQueries(EN.lists())}})}(),p=f.mutate,h=f.isLoading,m=f.error,g=f.data,y=function(e){var t=ue();return zn(EN.addCompatibleDSTypes(e),"".concat(Si,"/").concat(e,"/compatibledistributionsettypes"),{onSuccess:function(){t.resetQueries(EN.ttDetails(e))}})}((null===g||void 0===g||null===(t=g[0])||void 0===t?void 0:t.id)||0),b=y.mutate,v=y.isLoading,S=y.isSuccess;(0,G.useEffect)((function(){if(g&&u.length>0&&!v&&!S){var e=(null===d||void 0===d?void 0:d.filter((function(e){return u.split(",").includes(e.name)})).map((function(e){return{id:e.id}})))||[];b(e,{onSuccess:function(){a(o("TargetType.CompatibleDS.Success")),r()},onError:function(e){r(),i("delete",{headline:o("TargetType.CompatibleDS.Error.Title"),message:o("TargetType.CompatibleDS.Error.Message"),error:e,variant:"warning",onCancel:null,confirmButtonPrimary:!0,confirmLabel:o("Button.OK")})}}),c("")}}),[u,b,d,c,o,r,a,i,v,S,g]);return $().createElement(Ft.Dialog,{dialogId:hN,title:o("TargetType.AddModal.Heading"),onClose:r,modal:!0,open:!0,className:"suggestions-containing-modal"},$().createElement(bK,{formName:"AddTargetTypeForm",onCancel:r,onSubmit:function(e){return function(e){e.distributionSetTypes&&c(e.distributionSetTypes),p([e],{onSuccess:function(t){a(o("TargetType.AddModal.Success")),!e.distributionSetTypes&&r(),l.toDetails(null===t||void 0===t?void 0:t[0].id)}})}(e)},loading:h||v,error:m,distributionSetTypes:d}))}var wK={name:"",description:""};function OK(e){var t,n,r=e.onCancel,o=e.onSubmit,i=e.loading,a=e.error,l=e.initialEntry,s=e.formName,u=Ut(),c=$o({defaultValues:null!==l&&void 0!==l?l:wK,mode:"onChange"}),d=c.getValues,f=c.register,p=c.formState.errors,h=c.setFocus;return(0,G.useEffect)((function(){h("name")}),[h]),$().createElement(Xo,{formName:s,useFormReturn:c,loading:i,error:a,onCancel:r,onSubmit:o,convertError:function(e){return e},isUpdate:!!l,createLabel:"Button.Edit"},$().createElement(Yo,{register:f,getValues:d,field:"name",label:"Entity.Label.Name",maxSize:128,isRequired:!0,notificationText:null===p||void 0===p||null===(t=p.name)||void 0===t?void 0:t.message}),$().createElement(ei,{i18n:u,register:f,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===p||void 0===p||null===(n=p.description)||void 0===n?void 0:n.message}))}function AK(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=function(e){var t=ue();return Yn(EN.update(e),"".concat(Si,"/").concat(encodeURIComponent(e)),{onSuccess:function(){t.resetQueries(EN.lists()),t.resetQueries(EN.details())}})}(t.initialEntry.id),a=i.mutate,l=i.isLoading,s=i.error;return $().createElement(Ft.Dialog,{dialogId:mN,title:r("Target.Types.EditModal.Heading"),onClose:n,modal:!0,open:!0},$().createElement(OK,{formName:"EditTargetTypeForm",onCancel:n,onSubmit:function(e){var t=e.name,i=e.description;a({name:t,description:i},{onSuccess:function(){o(r("Target.Types.EditModal.Success")),n()}})},loading:l,error:s,initialEntry:t.initialEntry}))}var CK=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:gK}),t.registerModal(hN,n(EK)),t.registerModal(mN,n(AK))};const TK=JSON.parse('{"TargetsInsightsBlade.Header":"Insights","TargetInsights.Status.UNKNOWN":"Unknown","TargetInsights.Status.IN_SYNC":"In sync","TargetInsights.Status.ERROR":"Error","TargetInsights.Status.REGISTERED":"Registered","TargetInsights.Status.PENDING":"Pending","TargetInsights.Status.Title":"Overall target statuses","TargetInsights.TargetsCount.Title":"Total targets per month","TargetInsights.Targets.Total":"{count} {count, plural, =1 {target} other {targets}}","TargetInsights.Targets.Years":"{count} {count, plural, =1 {year} other {years}}","TargetInsights.Targets.Months":"{count} {count, plural, =1 {month} other {months}}","TargetInsights.Targets.Years.All":"All"}');var DK=function(e){var t=e.shell;e.connect;t.registerTranslation({en:TK})};const xK=JSON.parse('{"RolloutsListBlade.Header":"Rollouts","RolloutDetailsBlade.Header":"Rollout","RolloutStatusBlade.Header":"Status","RolloutInsightsBlade.Header":"Insights","RolloutStatusView.Header.Status":"Rollout","RolloutStatusView.Header.Groups":"Groups","Doc.Rollout.TypeHeading":"Rollout type","Rollout.Add":"Create rollout","Rollout.Label.Status":"Status","Rollout.Label.Progress":"Progress","Rollout.Label.Dynamic":"Dynamic","Rollouts.List.Empty":"No rollouts found","Rollouts.List.Id":"Id","Rollouts.List.DS":"Distribution set","Rollouts.List.Weight":"Weight","Rollouts.List.Targets":"Targets","Rollouts.List.Groups":"Groups","Rollouts.List.Errors":"Errors","Rollouts.List.Actions":"Actions","Rollout.Actions.Title":"Rollout actions","Rollout.Actions.Delete.Tooltip":"Delete rollout","Rollout.Actions.Copy.Tooltip":"Copy rollout","Rollout.Actions.Approve.Tooltip":"Approve or deny rollout","Rollout.DeleteConfirmation.Header":"Delete rollout?","Rollout.DeleteConfirmation.Message":"This action will delete the rollout below","Rollout.DeleteConfirmation.Message.Sentence":"This action will delete the rollout below.","Rollout.DeleteConfirmation.Message.ActionsAffected":"There are \'<b>\'{running, number} running\'</b>\' {running, plural, =1 {update} other {updates}} that will continue and \'<b>\'{scheduled, number} scheduled\'</b>\' {scheduled, plural, =1 {update} other {updates}} that will be terminated.","Rollout.DeleteSuccess.Message":"Rollout successfully deleted","RolloutDetails.Entity.Name":"rollout","RolloutDetails.Label.TotalTargets":"Total targets","RolloutDetails.Label.TargetFilterQuery":"Target filter query","RolloutDetails.Label.DistributionSet":"Distribution set","RolloutDetails.Label.Weight":"Weight","RolloutDetails.Label.UpdateType":"Update type","RolloutDetails.Label.StartAt":"Start at","RolloutDetails.Label.ApprovedBy":"Approved by","RolloutDetails.Label.DeniedBy":"Denied by","RolloutDetails.Label.ApprovalRemark":"Approved with remark","RolloutDetails.Label.DenialRemark":"Denied with remark","Rollout.Status.Creating":"Creating","Rollout.Status.WaitingForApproval":"Waiting for approval","Rollout.Status.ApprovalDenied":"Approval denied","Rollout.Status.Ready":"Ready","Rollout.Status.Starting":"Starting","Rollout.Status.Running":"Running","Rollout.Status.Paused":"Paused","Rollout.Status.Finished":"Finished","Rollout.Status.Deleting":"Deleting","Rollout.Status.Deleted":"Deleted","Rollout.Status.ViewInsights":"View insights","RolloutGroup.Status.Scheduled":"Scheduled","RolloutGroup.Status.Error":"Error","Rollouts.ListGroup.ErrorThreshold":"Error threshold","Rollouts.ListGroup.TriggerThreshold":"Trigger threshold","Rollouts.ListGroup.TargetFilterQuery":"Target filter query","Rollouts.ListGroup.TargetPercentage":"Target percentage","Rollout.UpdateType.Forced":"Forced","Rollout.UpdateType.Soft":"Soft","Rollout.UpdateType.TimeForced":"Time forced","Rollout.UpdateType.DownloadOnly":"Download only","RolloutAction.Status.Finished":"Finished","RolloutAction.Status.Error":"Error","RolloutAction.Status.Cancelled":"Cancelled","RolloutAction.Status.Running":"Running","RolloutAction.Status.NotStarted":"Not started","RolloutAction.Status.Scheduled":"Scheduled","Rollout.Progress.ErrorCount":"{count, number}\xa0{count, plural, =1 {error} other {errors}}","Rollout.ActionType":"Action type","Rollout.ActionType.Forced":"Forced","Rollout.ActionType.Soft":"Soft","Rollout.ActionType.DownloadOnly":"Download only","Rollout.ActionType.TimeForced":"Time forced","Rollout.Approve.ModalTitle":"Approve or Deny rollout?","Rollout.Approve.RemarkFieldLabel":"Remark (optional)","Rollout.Approve.ApproveButtonLabel":"Approve","Rollout.Approve.DenyButtonLabel":"Deny","Rollout.StartOptions":"Start option","Rollout.StartType.Manual":"Manual","Rollout.StartType.Auto":"Auto","Rollout.StartType.Scheduled":"Scheduled","Rollout.Create.Summary.Groups":"Rollout groups","Rollout.Create.Summary.Groups.GroupCount":"{count, number}\xa0{count, plural, =1 {group} other {groups}}","Rollout.Create.Summary.Groups.TargetsPerGroup":"{count, number}\xa0{count, plural, =1 {target} other {targets}} per group","Rollout.Create.Summary.Groups.TargetsPerGroupApprox":"Approx. {count, number}\xa0{count, plural, =1 {target} other {targets}} per group","Rollout.Create.Summary.Groups.ConfirmationRequired":"Confirmation required","Rollout.Create.Summary.Groups.ConfirmationNotRequired":"Confirmation not required","Rollout.Create.Summary.Groups.RequestConfirmation":"Actions confirmation","Rollout.Create.Summary.Groups.ErrorThresholdPercentage":"{value}%","Rollout.Create.Summary.Groups.ErrorThresholdCount":"{count} targets","Rollout.Create.Summary.Groups.TriggerThresholdPercentage":"{value}%","Rollout.Create.Section.BasicProperties":"Basic properties","Rollout.Create.Section.Name":"Rollout name","Rollout.Create.Section.Description":"Rollout description","Rollout.Create.Section.Assignments":"Assignments","Rollout.Create.Section.Weight":"Weight","Rollout.Create.Field.TargetFilter":"Target filter","Rollout.Create.Field.DistributionSet":"Distribution set","Rollout.Create.Field.FilterForSelectedTarget":"Filter for selected targets","Rollout.Create.TargetFilter":"Target filter","Rollout.Create.Field.Copy.TargetFilter":"Copied rollout target filter","Rollout.Create.Field.Copy.DistributionSet":"Copied rollout distribution set","Rollout.Create.Field.Predefined":"Predefined","Rollout.Create.ConfirmationRequired":"Requires confirmation for actions","Rollout.Create.Dynamic":"Dynamic","Rollout.Create.Dynamic.Tooltip":"Dynamic targets match","Rollout.Create.TargetFilter.TargetCount":"{count, number}\xa0{count, plural, =1 {target} other {targets}}","Rollout.Create.TargetFilter.NoMatch":"Filter does not match any target. Only Dynamic Rollout creation is available","Rollout.Create.StaticGroups.Disabled":"No matching targets found. Static groups definition is disabled","Rollout.Create.DistributionSetModuleCount":"{count, number}\xa0{count, plural, =1 {software module} other {software modules}}","Rollout.Create.Step.TargetsAndDS":"Targets and distribution set","Rollout.Create.Step.Groups":"Group definition","Rollout.Create.Step.TypeAndOptions":"Action type and start option","Rollout.Create.Step.Summary":"Summary","Rollout.GroupDefinition":"Groups and triggers","Rollout.GroupDefinition.NumberOfGroups":"Number of groups","Rollout.GroupDefinition.AdvancedGroupDefinition":"Advanced group definition","Rollout.GroupDefinition.DynamicGroupDefinition":"Dynamic groups","Rollout.GroupDefinition.StaticGroupDefinition":"Static groups","Rollout.GroupDefinition.AdvancedGroupDefinition.NoGroups":"No groups","Rollout.GroupDefinition.AdvancedGroupDefinition.Add":"Add group","Rollout.GroupDefinition.AdvancedGroupDefinition.Name":"Name","Rollout.GroupDefinition.AdvancedGroupDefinition.Description":"Description","Rollout.GroupDefinition.AdvancedGroupDefinition.TargetFilterEmptyOption":"No additional filter","Rollout.GroupDefinition.AdvancedGroupDefinition.TargetFilterQuery":"Filter","Rollout.GroupDefinition.AdvancedGroupDefinition.TargetPercentage":"Target %","Rollout.GroupDefinition.AdvancedGroupDefinition.TargetPercentage.Modal":"Target percentage","Rollout.GroupDefinition.AdvancedGroupDefinition.TriggerThreshold":"Trigger threshold","Rollout.GroupDefinition.AdvancedGroupDefinition.ErrorThreshold":"Error threshold","Rollout.GroupDefinition.AdvancedGroupDefinition.ErrorThreshold.Percent":"Error threshold (in %)","Rollout.GroupDefinition.AdvancedGroupDefinition.ConfirmationRequired":"Confirmation required","Rollout.GroupDefinition.AdvancedGroupDefinition.Edit":"Edit","Rollout.GroupDefinition.AdvancedGroupDefinition.Delete":"Delete","Rollout.GroupDefinition.AdvancedGroupDefinition.Up":"Move one up","Rollout.GroupDefinition.AdvancedGroupDefinition.Down":"Move one down","Rollout.GroupDefinition.AdvancedGroupDefinition.TargetsCoverageUnclear":"Please distribute all rollout targets in groups","Rollout.GroupCount":"Number of groups","Rollout.TargetsPerGroup":"Targets per group","Rollout.Weight":"Weight","Rollout.TriggerThreshold":"Trigger threshold (in %)","Rollout.ErrorThreshold.Name":"Error threshold","Rollout.ErrorThreshold.Type.Count":"Count","Rollout.ConfirmationRequired":"Confirmation required","Rollout.TargetsDistributed":"{targetsCount} {targetsCount, plural, =1 {target is} other {targets are}} {groupsCount, plural, =1 {in} other {distributed equally into}} {groupsCount} {groupsCount, plural, =1 {single group} other {groups}}","Rollout.Create.SuccessMessage":"Rollout successfully created","Rollout.TargetsDone":"{done, number} of {total, number} {total, plural, =1 {target} other {targets}} done","Rollout.NotStartedTargets.Label":"{notStarted, number} {notStarted, plural, =1 {target} other {targets}} not started","Rollout.ActionHistory.Tooltip":"View action history for rollout {controllerId}","RolloutControls.Start":"Start","RolloutControls.Pause":"Pause","RolloutControls.Resume":"Resume","RolloutControls.Next":"Trigger next group","RolloutControls.Next.Confirm.Header":"Trigger next group?","RolloutControls.Next.Confirm.Message":"Start the next rollout group although the trigger threshold has not been reached yet","RolloutControls.Next.SuccessMessage":"Next group successfully triggered","RolloutsListFilterModal.Header":"Select rollouts filter","RolloutsListFilterModal.NameLabel":"Name","RolloutsListFilterModal.DescriptionLabel":"Description","RolloutsListFilterModal.StatusLabel":"Status","RolloutsListFilterModal.DistributionSetIdLabel":"Distribution set Id","RolloutsListFilterModal.DistributionSetNameLabel":"Distribution set name","RolloutsListFilterModal.DistributionSetVersionLabel":"Distribution set version","RolloutsListFilterModal.DistributionSetTypeLabel":"Distribution set type","Rollout.Insights.Group.Label":"Group","Rollout.Insights.Table.Status":"Status","Rollout.Insights.Table.Targets":"Targets","Rollout.Insights.Table.Code":"Code","Rollout.Insights.Table.Download":"Download CSV","Rollout.Insights.Table.Download.Error":"Download failed","Rollout.Insights.Pie.Legends.AllDataHidden":"All data is hidden. Click on the legends above to unhide selected statuses.","Rollout.Insights.Pie.Legends.Show":"Show data","Rollout.Insights.Pie.Legends.Hide":"Hide data"}');function PK(){return PK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PK.apply(this,arguments)}function MK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RK={width:"auto",margin:0};function LK(e){var t,n,r=e.onCancel,o=e.onSubmit,i=e.otherGroupNames,a=e.initialEntry,l=Ut(),s=WS().state,u={name:"",description:"",targetPercentage:100,successCondition:{condition:"THRESHOLD",expression:"50"},errorCondition:{condition:"THRESHOLD",expression:"50"},confirmationRequired:s.confirmationFlowEnabled},c=$o({defaultValues:null!==a&&void 0!==a?a:u,mode:"onChange"}),d=c.control,f=c.register,p=c.formState.errors,h=c.getValues,m=c.setFocus,g=uo({name:"targetPercentage",control:d}).field,y=uo({name:"successCondition.expression",control:d}).field,b=uo({name:"errorCondition.expression",control:d}).field,v=uo({name:"targetFilter",control:d}).field;return(0,G.useEffect)((function(){m("name")}),[m]),$().createElement(Xo,{useFormReturn:c,onCancel:r,onSubmit:function(e){o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MK(Object(n),!0).forEach((function(t){IK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))},isUpdate:void 0!==a},$().createElement(Yo,{register:f,getValues:h,field:"name",label:"Rollout.GroupDefinition.AdvancedGroupDefinition.Name",maxSize:64,notificationText:null===p||void 0===p||null===(t=p.name)||void 0===t?void 0:t.message,isRequired:!0,notAllowedDuplicates:i}),$().createElement(ei,{i18n:l,register:f,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===p||void 0===p||null===(n=p.description)||void 0===n?void 0:n.message}),$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(EE,{predefinedFilter:null===a||void 0===a?void 0:a.targetFilter,selected:v.value,onSelect:function(e){v.onChange({target:{value:e}})}})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"group-target-percentage",label:l("Rollout.GroupDefinition.AdvancedGroupDefinition.TargetPercentage.Modal"),style:RK,step:1,min:0,max:100,value:g.value,onChange:function(e,t){g.onChange({target:{value:jE(t,0,100)}})}})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"group-trigger-threshold",label:l("Rollout.TriggerThreshold"),style:RK,step:1,min:1,max:100,value:parseInt(y.value),onChange:function(e,t){y.onChange({target:{value:jE(t,1,100)}})}})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.ValueModificator,{id:"group-error-threshold",label:l("Rollout.GroupDefinition.AdvancedGroupDefinition.ErrorThreshold.Percent"),style:RK,step:1,min:0,max:100,value:parseInt(b.value),onChange:function(e,t){b.onChange({target:{value:jE(t,0,100)}})}})),$().createElement(Ft.FormField,{fieldType:"checkbox"},$().createElement(Ft.Checkbox,PK({id:"confirmationRequired",label:l("Rollout.ConfirmationRequired"),disabled:!s.confirmationFlowEnabled},f("confirmationRequired")))))}function kK(e){return function(e){if(Array.isArray(e))return jK(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return jK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jK(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_K(Object(n),!0).forEach((function(t){NK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BK(e){var t=e.onClose,n=e.options;if(!n)throw Error("Parameters are required.");var r=Ut();return $().createElement(Ft.Dialog,{dialogId:gv,title:r("Rollout.GroupDefinition.AdvancedGroupDefinition.Add"),onClose:t,modal:!0,open:!0},$().createElement(LK,{onCancel:t,onSubmit:function(e){var t,r,o,i,a;n.initialEntry?(o=n.currentGroups,i=null!==(r=n.initialEntry.name)&&void 0!==r?r:"",a=e,t=o.map((function(e){return e.name===i?FK(FK({},e),a):e}))):t=[].concat(kK(n.currentGroups),[e]);n.onChange(t)},otherGroupNames:n.currentGroups.map((function(e){var t;return null!==(t=e.name)&&void 0!==t?t:""})).filter((function(e){var t;return e!==(null===(t=n.initialEntry)||void 0===t?void 0:t.name)})),initialEntry:n.initialEntry}))}var UK=["distributionSetType"],HK=["distributionSetTypeEntry"];function VK(){return VK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VK.apply(this,arguments)}function qK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qK(Object(n),!0).forEach((function(t){zK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QK(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function GK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return $K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $K(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KK(e){var t,n,r,o,i,a=e.onClose,l=Ut(),s=(0,G.useId)(),u=Hi(),c=u.setFilters,d=u.currentFilter,f=$o({mode:"onChange",defaultValues:d}),p=f.register,h=f.getValues,m=f.formState.errors,g=f.control,y=f.reset,b=(0,G.useRef)(!1),v=GK((0,G.useState)(),2),S=v[0],E=v[1],w=Vp({q:S?En(S,{convertToQParam:function(e){return"name==".concat(e)}}):void 0},{onSuccess:function(e){var t=d.distributionSetType,n=QK(d,UK);if(!b.current&&t){var r=Dn(e).entities,o=parseInt(t,10),i=r.find((function(e){return e.id===o}));i&&y(WK(WK({},n),{},{distributionSetTypeEntry:YK(i)})),b.current=!0}}}),O=w.data,A=w.error,C=w.fetchNextPage,T=w.isLoading,D=w.isFetchingNextPage,x=Dn(O),P=x.totalCount,M=x.entities,I=M.map(YK),R=ue();return $().createElement(Ft.Dialog,{dialogId:yv,className:"suggestions-containing-modal",title:l("RolloutsListFilterModal.Header"),onClose:a,modal:!0,open:!0},A&&$().createElement(tn.ErrorState,{error:A,actions:$().createElement(dp,{onRetry:function(){return R.resetQueries(Ap.lists())}})}),$().createElement(Xo,{useFormReturn:f,onCancel:a,onSubmit:function(e){a();var t=e.distributionSetTypeEntry,n=QK(e,HK);c(WK(WK({},n),{},{distributionSetType:t&&t.entry.id+""}))},submit:"ctrl+enter",createLabel:"Button.Apply"},$().createElement(Yo,{register:p,getValues:h,field:"name",label:"RolloutsListFilterModal.NameLabel",maxSize:64,notificationText:null===(t=m.name)||void 0===t?void 0:t.message}),$().createElement(Yo,{register:p,getValues:h,field:"description",label:"RolloutsListFilterModal.DescriptionLabel",maxSize:64,notificationText:null===(n=m.description)||void 0===n?void 0:n.message}),$().createElement(Ft.FormField,{fieldType:"dropdown"},$().createElement(Ft.Dropdown,VK({id:"".concat(s,"-status"),label:l("RolloutsListFilterModal.StatusLabel"),options:JK(l)},p("status")))),$().createElement(Yo,{register:p,getValues:h,field:"distributionSetId",label:"RolloutsListFilterModal.DistributionSetIdLabel",maxSize:64,notificationText:null===(r=m.distributionSetId)||void 0===r?void 0:r.message}),$().createElement(Yo,{register:p,getValues:h,field:"distributionSetName",label:"RolloutsListFilterModal.DistributionSetNameLabel",maxSize:64,notificationText:null===(o=m.distributionSetName)||void 0===o?void 0:o.message}),$().createElement(Yo,{register:p,getValues:h,field:"distributionSetVersion",label:"RolloutsListFilterModal.DistributionSetVersionLabel",maxSize:64,notificationText:null===(i=m.distributionSetVersion)||void 0===i?void 0:i.message}),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(co,{name:"distributionSetTypeEntry",control:g,render:function(e){var t=e.field,n=t.value,r=t.onChange;return $().createElement(tn.SuggestionSelect,{label:l("RolloutsListFilterModal.DistributionSetTypeLabel"),buttonTitle:l("RolloutsListFilterModal.DistributionSetType.OpenTooltip"),loadMoreLabel:l("Global.LoadMore"),entries:I,onLoadMore:M.length!==P?C:void 0,onTextChange:E,selected:n,onSelect:r,loading:T||D,renderEntry:function(e){return $().createElement(tn.SuggestionBoxButton,{label:e.value})}})}}))))}function YK(e){return{value:e.name,entry:e}}function JK(e){return[{name:e("Dropdown.PleaseSelect"),value:""},{name:e(iS(Bv)),value:Bv},{name:e(iS(Uv)),value:Uv},{name:e(iS(Hv)),value:Hv},{name:e(iS(Vv)),value:Vv},{name:e(iS(qv)),value:qv},{name:e(iS(Wv)),value:Wv},{name:e(iS(zv)),value:zv},{name:e(iS(Qv)),value:Qv},{name:e(iS(Gv)),value:Gv},{name:e(iS($v)),value:$v}]}var XK=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:xK}),t.registerModal(gv,n(BK)),t.registerModal(NS.displayName,n(NS)),t.registerModal(yv,n(KK))};const ZK=JSON.parse('{"Tags.Add":"Create tag","Tags.Add.Success":"Tag successfully created","Tags.Assign":"Assign tag","Tags.Unassign":"Unassign tag","Tags.Assign.Success":"Tag successfully assigned","Tags.Unassign.Success":"Tag successfully unassigned","Tags.AddAndAssign":"Add and assign tag","Tags.FieldLabel":"Find existing or create a new tag","Tags.Error.Creation":"New tag was not created.","Tags.Error.Assignment":"Tag was not assigned.","Tags.SelectedEntities":"Selected ({count})","Tags.NoTagsAssigned":"No tags are assigned","Tags.Delete.Tooltip":"Delete tag","Tags.Delete.Confirmation.Header":"Delete tag?","Tags.Delete.Confirmation.Message":"This action will delete the tag below. Upon deletion, all of its assignments will be removed.","Tags.Delete.Success":"Tag successfully deleted","Tags.List.Actions":"Actions"}');var eY=function(e){e.shell.registerTranslation({en:ZK})};const tY=JSON.parse('{"Tags.UIFeature.Name":"Target tags","Tags.UIFeature.Description":"Manage your target tags to describe, identify and filter targets.","Tags.Tag.Action.Assign.Tooltip":"Assign to targets","Tags.Tag.Action.CreateRollout.Tooltip":"Create rollout","Tags.Tag.Assign.Dialog.Title":"Assign tag to targets","Tags.Tag.Assign.Progress.Label":"{percent}% ({processed} of {total})","Tags.Tag.Assign.Success.Message":"Assigned \\"{tag}\\" ({id}) to {count} {count, plural, =1 {target} other {targets}}","Tags.Tag.Assign.PartialFail.Message":"Failed to assign \\"{tag}\\" ({id}) to {count} {count, plural, =1 {target} other {targets}}","Tags.Tag.Assign.Result.CopyList.Title":"Copy list","TargetTagsBlade.Header":"Target tags","Tags.Empty":"No target tags found","TargetTags.Create":"Create target tag","CSVReader.Button.TargetsCount.Label":"{count} {count, plural, =1 {target} other {targets}}","CSVReader.NoContent.Warning.Message":"No controller ids found. Please check the file.","CSVReader.ReadError.Message":"An error occured reading file \\"{file}\\". Please check the file.","CSVReader.ParseErrorSummary.Message":"Some issues occured during parsing. Please check the resulting list.","CSVPreview.PreviewSection.Header":"Preview","CSVPreview.MoreItems.Count.Message":"{count} {count, plural, =1 {target} other {targets}} not shown","ListPreview.MoreItems.Count.Message":"{count} {count, plural, =1 {item} other {items}} not shown"}');var nY=function(e){e.shell.registerTranslation({en:tY})};function rY(){return rY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rY.apply(this,arguments)}function oY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oY(Object(n),!0).forEach((function(t){aY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lY={key:"",value:""};function sY(e){var t,n,r=e.onCancel,o=e.onSubmit,i=e.supportsTargetVisible,a=e.otherKeys,l=e.initialEntry,s=e.loading,u=e.error,c=Ut(),d=$o({defaultValues:null!==l&&void 0!==l?l:iY(iY({},lY),{},{targetVisible:!i&&void 0}),mode:"onChange"}),f=d.register,p=d.formState.errors,h=d.getValues,m=d.setFocus;return(0,G.useEffect)((function(){m(void 0===l?"key":"value")}),[m,l]),$().createElement(Xo,{useFormReturn:d,loading:s,error:u,onCancel:r,onSubmit:o,isUpdate:void 0!==l},$().createElement(Yo,{register:f,getValues:h,field:"key",label:"Entity.Metadata.Label.Key",maxSize:128,notificationText:null===p||void 0===p||null===(t=p.key)||void 0===t?void 0:t.message,isRequired:!0,isDisabled:void 0!==l,notAllowedDuplicates:a}),$().createElement(Yo,{register:f,getValues:h,field:"value",label:"Entity.Metadata.Label.Value",maxSize:4e3,notificationText:null===p||void 0===p||null===(n=p.value)||void 0===n?void 0:n.message}),i?$().createElement(Ft.FormField,{fieldType:"checkbox"},$().createElement(Ft.Checkbox,rY({id:"targetVisible",label:c("Entity.Metadata.VisibleToTarget")},f("targetVisible")))):$().createElement($().Fragment,null))}function uY(e){return function(e){if(Array.isArray(e))return cY(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return cY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cY(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dY(e){var t,n=e.options;if(!n)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=cr.apply(void 0,uY(n.addConfig)),a=i.mutate,l=i.isLoading,s=i.error;return $().createElement(Ft.Dialog,{dialogId:si,title:r("Entity.Metadata.AddMetadata"),onClose:n.onCancel,modal:!0,open:!0},$().createElement(sY,{supportsTargetVisible:n.supportsTargetVisible,onCancel:n.onCancel,onSubmit:function(e){a([{key:e.key,value:e.value,targetVisible:n.supportsTargetVisible?e.targetVisible:void 0}],{onSuccess:function(){n.onSuccess(),o(r("Entity.Metadata.CreateSuccess"))}})},otherKeys:null!==(t=n.otherKeys)&&void 0!==t?t:[],loading:l,error:s}))}function fY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return pY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pY(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hY(e){var t,n=e.options;if(!n)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=fY(n.updateConfig,3),a=i[0],l=i[1],s=i[2],u=function(e,t,n){var r=ue();return Yn(t,e,{onSuccess:function(){r.resetQueries(n)}})}(a(n.entityId,n.updatedMetadata.key),l(n.entityId,n.updatedMetadata.key),s),c=u.mutate,d=u.isLoading,f=u.error;return $().createElement(Ft.Dialog,{dialogId:ui,title:r("Entity.Metadata.UpdateMetadata"),onClose:n.onCancel,modal:!0,open:!0},$().createElement(sY,{supportsTargetVisible:n.supportsTargetVisible,onCancel:n.onCancel,onSubmit:function(e){c({key:e.key,value:e.value,targetVisible:n.supportsTargetVisible?e.targetVisible:void 0},{onSuccess:function(){n.onSuccess(),o(r("Entity.Metadata.UpdateSuccess"))}})},otherKeys:null!==(t=n.otherKeys)&&void 0!==t?t:[],initialEntry:n.updatedMetadata,loading:d,error:f}))}const mY=JSON.parse('{"TargetFilters.ListBlade.Header":"Target filters","TargetFilters.List.Label.AutoAssignment":"Auto assignment","TargetFilters.List.Label.AutoAssignActionType":"Action type","TargetFilters.List.Label.AutoAssignDistributionSet":"Distribution set","TargetFilters.List.Label.Weight":"Weight","TargetFilters.List.AutoAssignment.None":"none","TargetFilters.List.AutoAssignment.Confirmation.Required":"Auto assignment with confirmation required","TargetFilters.List.AutoAssignment.Confirmation.NotRequired":"Auto assignment","TargetFilters.List.AutoAssignment.Confirmation.Unknown":"Unknown","TargetFilters.List.Add":"Create target filter","TargetFilterDetailsBlade.Header":"Target filter","TargetFilter.Details.AutoAssignTitle":"Auto assignment","TargetFilter.Details.DistributionSet":"Distribution set","TargetFilter.Details.NoAutoAssignment":"There is no auto assignment","TargetFilter.Details.AutoAssign.ActionType":"Action type","TargetFilter.Detail.AutoAssign.Weigth":"Weight","TargetFilter.Detail.AutoAssign.Weigth.NotConfigured":"Not configured","TargetFilter.Detail.AutoAssign.ConfirmationRequired":"Confirmation required","TargetFilter.Detail.AutoAssign.ConfirmationRequired.Enabled":"Enabled","TargetFilter.Detail.AutoAssign.ConfirmationRequired.Disabled":"Disabled","TargetFilter.DetailsActions.ContextMenu.Title":"Target filter actions","TargetFilter.DetailsActions.Edit":"Edit filter","TargetFilter.DetailsActions.Delete":"Delete filter","TargetFilter.DetailsActions.Assign":"Assign distribution","TargetFilter.DetailsActions.EditAssign":"Edit assignment","TargetFilter.Edit.Tooltip":"Edit target filter","TargetFilter.Delete.Tooltip":"Delete target filter","TargetFIlter.EditAssignment.Tooltip":"Edit assigned distribution set","TargetFIlter.Assign.Tooltip":"Assign distribution set","TargetFilter.DeleteAutoAssignment.Header":"Delete auto assignment?","TargetFilter.DeleteAutoAssignment.Message":"Delete auto assignment of distribution set \\"{name}\\" from:","TargetFilter.DeleteAutoAssignmentSuccess.Message":"Distribution set successfully unassigned","TargetFilter.DeleteModal.Header":"Delete target filter?","TargetFilter.DeleteModal.Message":"This action will delete the target filter below","TargetFilter.DeleteModal.SuccessMessage":"Target filter successfully deleted","TargetFilter.UpdateModal.Header":"Edit target filter","TargetFilter.UpdateModal.SuccessMessage":"Target filter successfully updated","TargetFilter.UpdateModal.AlreadyExistingFilterName":"Target filter name already exists","TargetFilter.AutoAssignModal.Title.Create":"Auto assign distribution set to \\"{name}\\"","TargetFilter.AutoAssignModal.Title.Edit":"Edit auto assignment of \\"{name}\\"","TargetFilter.AutoAssignModal.Success":"Successfully assigned distribution set to \\"{name}\\"","TargetFilter.AutoAssignModal.OptionForced":"Forced","TargetFilter.AutoAssignModal.OptionSoft":"Soft","TargetFilter.AutoAssignModal.OptionDownloadOnly":"Download only","TargetFilter.AutoAssignModal.DistributionSet":"Distribution set","TargetFilter.AutoAssignModal.DistributionSet.OpenTooltip":"Open distribution set selection","TargetFilter.AutoAssignModal.DistributionSet.LoadMore":"Load more","TargetFilter.AutoAssignModal.DistributionSet.RequiredErrorMessage":"Select a distribution set","TargetFilter.AutoAssignModal.Weight.RequiredErrorMessage":"Enter a weight number","TargetFilter.AutoAssignModal.Weight":"Weight","TargetFilter.AutoAssignModal.Weight.MinErrorMessage":"Enter a higher number","TargetFilter.AutoAssignModal.Weight.MaxErrorMessage":"Enter a lower number than 1000","TargetFilter.AutoAssignModal.ConfirmationRequired":"Requires confirmation for actions","TargetFilter.DeleteAssignment":"Delete assignment","TargetFilter.DeleteAssignment.Tooltip":"Unassign distribution set","TargetFilters.List.Empty":"No target filters found"}');const gY=l.p+"static/AutoAssignmentModalConfirmationRequired.4d60b722.md";function yY(){return yY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yY.apply(this,arguments)}function bY(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function vY(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){bY(i,r,o,a,l,"next",e)}function l(e){bY(i,r,o,a,l,"throw",e)}a(void 0)}))}}function SY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function EY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SY(Object(n),!0).forEach((function(t){wY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return AY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AY(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CY(e){var t,n,r,o,i,a,l=e.options,s=e.onClose,u=l,c=u.targetFilterId,d=u.targetFilterName,f=u.autoAssignDistributionSet,p=u.autoAssignActionType,h=u.autoAssignWeight,m=u.confirmationRequired,g=(0,G.useId)(),y=Ut(),b=KE(XE.multiAssignmentsEnabled(),Lu),v=null===(t=b.data)||void 0===t?void 0:t.value,S=KE(XE.userConfirmationFlowEnabled(),Bu),E=null===(n=S.data)||void 0===n?void 0:n.value,w=$o({defaultValues:DY(p,h,m),mode:"onChange"}),O=w.register,A=w.control,C=w.trigger,T=w.getValues,D=w.reset,x=w.getFieldState,P=w.formState,M=P.errors,I=P.isValid,R=P.isDirty,L=(0,G.useRef)(!1),k=OY((0,G.useState)(),2),j=k[0],_=k[1],F=hm({q:(i=j,["complete==true",i?En(i,{convertToQParam:function(e){return"name==".concat(e)}}):void 0].filter((function(e){return void 0!==e})).join(";"))},{onSuccess:function(e){if(f&&!L.current){var t=Dn(e).entities.find((function(e){return e.id===f}));t&&D(EY(EY({},DY(p,h,m)),{},{selectedDsOption:TY(t)})),L.current=!0}}}),N=Dn(F.data),B=N.totalCount,U=N.entities,H=U.map(TY),V=Vt(),q=function(e){var t=ue();return zn(gE.addAutoAssignedDS(e),"".concat(wi,"/").concat(e,"/autoAssignDS"),{onSuccess:function(){t.resetQueries(gE.lists()),t.resetQueries(gE.details())}})}(c),W=q.mutate,z=q.error;function Q(){return K.apply(this,arguments)}function K(){return(K=vY(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!e.sent){e.next=8;break}t=T(),n={id:t.selectedDsOption.entry.id,type:t.type},v&&(n.weight=t.weight),E&&(n.confirmationRequired=t.confirmationRequired),W(n,{onSuccess:function(){s(),V(y("TargetFilter.AutoAssignModal.Success",{name:d}))}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}b.error?a={error:b.error,key:XE.multiAssignmentsEnabled()}:S.error?a={error:S.error,key:XE.userConfirmationFlowEnabled()}:F.error&&(a={error:F.error,key:da.lists()});var Y=ue(),J=x("selectedDsOption"),X=y(f?"TargetFilter.AutoAssignModal.Title.Edit":"TargetFilter.AutoAssignModal.Title.Create",{name:d});return $().createElement(Ft.Dialog,{dialogId:g,className:"suggestions-containing-modal",title:X,onClose:s,modal:!0,open:!0},a&&$().createElement(tn.ErrorState,{error:a.error,actions:$().createElement(dp,{onRetry:function(){var e;return Y.resetQueries(null===(e=a)||void 0===e?void 0:e.key)}})}),$().createElement("form",{onKeyUp:function(){var e=vY(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.ctrlKey||"Enter"!==t.key){e.next=3;break}return e.next=3,Q();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,yY({id:"".concat(g,"_option_forced")},O("type"),{label:$().createElement($().Fragment,null,$().createElement(Pa,{forceType:ya.Forced}),y("TargetFilter.AutoAssignModal.OptionForced")),value:"forced"}))),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,yY({id:"".concat(g,"_option_soft")},O("type"),{label:$().createElement($().Fragment,null,$().createElement(Pa,{forceType:ya.Soft}),y("TargetFilter.AutoAssignModal.OptionSoft")),value:"soft"}))),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,yY({id:"".concat(g,"_option_downloadonly")},O("type"),{label:$().createElement($().Fragment,null,$().createElement(Pa,{forceType:ya.DownloadOnly}),y("TargetFilter.AutoAssignModal.OptionDownloadOnly")),value:"downloadonly"}))),$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(r=J.error)||void 0===r?void 0:r.message},$().createElement(co,{name:"selectedDsOption",control:A,rules:{required:y("TargetFilter.AutoAssignModal.DistributionSet.RequiredErrorMessage")},render:function(e){var t=e.field,n=t.value,r=t.onChange;return $().createElement(tn.SuggestionSelect,{label:y("TargetFilter.AutoAssignModal.DistributionSet"),entries:H,onLoadMore:U.length!==B?F.fetchNextPage:void 0,onTextChange:_,selected:n,onSelect:function(e){r(e)},loading:F.isLoading||F.isFetchingNextPage,buttonTitle:y("TargetFilter.AutoAssignModal.DistributionSet.OpenTooltip"),loadMoreLabel:y("TargetFilter.AutoAssignModal.DistributionSet.LoadMore")})}})),v&&$().createElement(Ft.FormField,{fieldType:"text",notificationType:"error",notificationText:null===(o=M.weight)||void 0===o?void 0:o.message},$().createElement(co,{name:"weight",control:A,rules:{required:y("TargetFilter.AutoAssignModal.Weight.RequiredErrorMessage"),min:{value:0,message:y("TargetFilter.AutoAssignModal.Weight.MinErrorMessage")},max:{value:1e3,message:y("TargetFilter.AutoAssignModal.Weight.MaxErrorMessage")}},render:function(e){var t=e.field,n=t.onChange,r=t.value;return $().createElement(Ft.ValueModificator,{className:"value-modificator-fix",label:y("TargetFilter.AutoAssignModal.Weight"),onChange:function(e,t){return n(t)},value:r,min:0,max:1e3,step:1})}})),$().createElement(Ft.FormField,{fieldType:"checkbox"},$().createElement(Ft.Checkbox,yY({id:"".concat(g,"_confirmationRequired"),label:$().createElement($().Fragment,null,y("TargetFilter.AutoAssignModal.ConfirmationRequired"),$().createElement(tn.InfoButton,{popoverHeading:y("TenantConfiguration.Heading.Help.UserConsentFlow")},$().createElement(tn.Documentation,{markdownFilePath:gY})))},O("confirmationRequired",{disabled:!E})))),z&&$().createElement(tn.ErrorState,{error:z}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:y("Button.Cancel"),onClick:s,mode:"secondary"}),$().createElement(Ft.Button,{label:y("Button.OK"),onClick:Q,disabled:b.isLoading||S.isLoading||F.isLoading||F.isFetchingNextPage||!I||!R}))))}function TY(e){return{value:e.name+":"+e.version,entry:e}}function DY(e,t,n){return{type:null!==e&&void 0!==e?e:"forced",selectedDsOption:void 0,weight:null!==t&&void 0!==t?t:1e3,confirmationRequired:null!==n&&void 0!==n&&n}}function xY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return PY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PY(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MY(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=(0,tn.useFocusRef)(),i=t.toUpdate,a=t.onSuccess,l=t.onCancel,s=xY((0,G.useState)(i.name),2),u=s[0],c=s[1],d=xY((0,G.useState)(i.query),2),f=d[0],p=d[1],h=yE({representation:"full"}),m=h.data,g=h.isLoading,y=h.error,b=Dn(m).entities.map((function(e){return e.name})),v=u!==i.name&&b.includes(u)&&{message:n("TargetFilter.UpdateModal.AlreadyExistingFilterName")},S=u===i.name&&f===i.query,E=!u||!f||S||!!v,w=HB(i.id),O=w.mutate,A=w.error;function C(){O({name:u,query:f},{onSuccess:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){r(n("TargetFilter.UpdateModal.SuccessMessage")),a()}))})}return $().createElement(Ft.Dialog,{dialogId:sL,title:n("TargetFilter.UpdateModal.Header"),onClose:l,modal:!0,open:!0},$().createElement("div",{onKeyUp:function(e){!E&&"Enter"===e.key&&e.ctrlKey&&C()}},g?$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,null)):$().createElement($().Fragment,null,$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.TextField,{ref:o,id:"console-edit-target-filter-name-input",required:!0,label:n("Entity.Label.Name"),value:u,onChange:function(e){return c(e.target.value)},autoFocus:!0})),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(Ft.TextField,{id:"console-edit-target-filter-query-input",required:!0,label:n("Entity.Label.Query"),value:f,onChange:function(e){return p(e.target.value)}})),$().createElement(tn.ErrorState,{error:y||v||A}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:n("Button.Cancel"),onClick:l}),$().createElement(Ft.Button,{mode:"primary",label:n("Button.Save"),disabled:E,onClick:C})))))}var IY=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:mY}),t.registerModal(lL,n(CY)),t.registerModal(sL,n(MY))};function RY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RY(Object(n),!0).forEach((function(t){kY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return _Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _Y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var FY={key:"",name:"",description:"",mandatorymodules:"",optionalmodules:""};function NY(e){var t,n,r,o=e.initialEntry,i=e.mandatorySM,a=e.optionalSM,l=e.loading,s=e.error,u=e.softwareModuleTypes,c=void 0===u?[]:u,d=e.formName,f=e.onCancel,p=e.onSubmit,h=Ut(),m=(0,G.useMemo)((function(){return c.map((function(e){return e.name}))||[]}),[c]),g=$o({defaultValues:null!==o&&void 0!==o?o:FY,mode:"onChange"}),y=jY((0,G.useState)(i||[]),2),b=y[0],v=y[1],S=jY((0,G.useState)(a||[]),2),E=S[0],w=S[1],O=g.formState.errors,A=g.getValues,C=g.register,T=g.setFocus;return(0,G.useEffect)((function(){T("key")}),[T]),$().createElement(Xo,{createLabel:"Button.Create",isUpdate:!!o,loading:l,error:s,formName:d,useFormReturn:g,onCancel:f,onSubmit:function(){p(LY(LY({},A()),{},{mandatorymodules:c.filter((function(e){return null===b||void 0===b?void 0:b.includes(e.name)})),optionalmodules:c.filter((function(e){return null===E||void 0===E?void 0:E.includes(e.name)}))}))}},$().createElement(Yo,{label:"DistributionSetTypes.Key",field:"key",maxSize:128,notificationText:null===O||void 0===O||null===(t=O.key)||void 0===t?void 0:t.message,isRequired:!0,register:C,getValues:A}),$().createElement(Yo,{label:"Entity.Label.Name",field:"name",maxSize:128,notificationText:null===O||void 0===O||null===(n=O.name)||void 0===n?void 0:n.message,isRequired:!0,register:C,getValues:A}),$().createElement(Ft.FormField,{fieldType:"text"},$().createElement(tn.MultiDropdown,{labels:{fieldName:h("DistributionSetTypes.CreateModal.MandatorySoftwareModuleTypes")},options:m,selected:b,key:E.join(),onChange:function(e){v(e.map((function(e){return e.value}))),w(E.filter((function(t){return!e.map((function(e){return e.value})).includes(t)})))},displayChips:!0})),$().createElement(Ft.FormField,{fieldType:"text",style:{zIndex:10}},$().createElement(tn.MultiDropdown,{labels:{fieldName:h("DistributionSetTypes.CreateModal.OptionalSoftwareModuleTypes")},options:m,selected:E,key:b.join(),onChange:function(e){w(e.map((function(e){return e.value}))),v(b.filter((function(t){return!e.map((function(e){return e.value})).includes(t)})))},displayChips:!0})),$().createElement(ei,{label:"Entity.Label.Description",field:"description",maxSize:512,notificationText:null===O||void 0===O||null===(r=O.description)||void 0===r?void 0:r.message,i18n:h,register:C}))}function BY(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=Ut(),r=Vt(),o=Ht(),i=(0,G.useRef)(null),a=function(){var e=ue();return zn(Ap.add(),pi,{onSuccess:function(){e.resetQueries(Ap.lists())}})}(),l=a.mutate,s=a.isLoading,u=a.error,c=Mi(),d=c.data,f=c.isLoading,p=c.error,h=Dn(d).entities,m=(0,G.useCallback)((function(){return o("progress",{message:n("DistributionSetTypes.CreateModal.LoadingTypes"),noCancel:!0})}),[o,n]),g=(0,G.useCallback)((function(){o("error",{message:n("DistributionSetTypes.CreateModal.TypesLoadingError"),onClose:t.onCancel,noCancel:!0})}),[o,n,t.onCancel]);return(0,G.useEffect)((function(){f?i.current=m():i.current&&(i.current(),i.current=null)}),[f,m,n]),(0,G.useEffect)((function(){p&&g()}),[p,g]),$().createElement(Ft.Dialog,{dialogId:kp,title:n("DistributionSetTypes.Add"),onClose:t.onCancel,modal:!0,open:!0},$().createElement(NY,{formName:"AddDistributionSetTypeForm",onCancel:e.onClose,onSubmit:function(t){l([t],{onSuccess:function(){r(n("DistributionSetTypes.CreateModal.SuccessMessage")),e.onClose()}})},loading:s,error:u,softwareModuleTypes:h}))}var UY={description:""};function HY(e){var t,n=e.onCancel,r=e.onSubmit,o=e.loading,i=e.error,a=e.initialEntry,l=e.formName,s=Ut(),u=$o({defaultValues:null!==a&&void 0!==a?a:UY,mode:"onChange"}),c=u.register,d=u.formState.errors,f=u.setFocus;return(0,G.useEffect)((function(){f("name")}),[f]),$().createElement(Xo,{formName:l,useFormReturn:u,loading:o,error:i,onCancel:n,onSubmit:r,convertError:function(e){return e},isUpdate:!!a,createLabel:"Button.Edit"},$().createElement(tn.LabelledSection,{header:s("Entity.Label.Name")},null===a||void 0===a?void 0:a.name),$().createElement(ei,{i18n:s,register:c,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===d||void 0===d||null===(t=d.description)||void 0===t?void 0:t.message}))}function VY(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=function(e){var t=ue();return Yn(Ap.update(e),"".concat(pi,"/").concat(encodeURIComponent(e)),{onSuccess:function(){t.resetQueries(Ap.lists()),t.resetQueries(Ap.details())}})}(t.initialEntry.id),a=i.mutate,l=i.isLoading,s=i.error;return $().createElement(Ft.Dialog,{dialogId:jp,title:r("DistributionSetType.EditModal.Heading"),onClose:n,modal:!0,open:!0},$().createElement(HY,{formName:"EditDistributionSetTypeForm",onCancel:n,onSubmit:function(e){var t=e.description;a({description:t},{onSuccess:function(){o(r("DistributionSetType.EditModal.Success")),n()}})},loading:l,error:s,initialEntry:t.initialEntry}))}const qY=JSON.parse('{"DistributionSetTypes.UIFeature.Name":"Distribution set types","DistributionSetTypes.UIFeature.Description":"Manage your distribution set types that are used to define a package structure that is supported by certain devices","DistributionSetTypes.ListBlade.Header":"Distribution set types","DistributionSetTypes.List.Empty":"No distribution set types found","DistributionSetTypes.List.Key":"Key","DistributionSetTypes.List.DeletedFlag":"Deleted","DistributionSetTypes.Add":"Add distribution set type","DistributionSetTypes.Key":"Key","DistributionSetTypes.CreateModal.SuccessMessage":"Distribution set type successfully created","DistributionSetTypes.CreateModal.LoadingTypes":"Loading software module types...","DistributionSetTypes.CreateModal.TypesLoadingError":"Unable to load software module types","DistributionSetTypes.CreateModal.SoftwareModuleTypes":"Software module types","DistributionSetTypes.CreateModal.MandatorySoftwareModuleTypes":"Mandatory software module types","DistributionSetTypes.CreateModal.OptionalSoftwareModuleTypes":"Optional software module types","DistributionSetTypes.DetailsBlade.Header":"Distribution set type","DistributionSetTypes.Details.Deleted":"Deleted","DistributionSetType.DeleteConfirmation.Header":"Delete distribution set type?","DistributionSetType.DeleteConfirmation.Message":"This action will delete the distribution set type below","DistributionSetType.DeleteSuccess.Message":"Distribution set type successfully deleted","DistributionSetType.Actions.Title":"Distribution set type actions","DistributionSetType.Actions.Delete.Tooltip":"Delete distribution set type","DistributionSetType.Actions.Edit.Tooltip":"Edit a distribution set type","DistributionSetType.Details.MandatorySM.Title":"Mandatory software module types","DistributionSetType.Details.OptionalSM.Title":"Optional software module types","DistributionSetType.CompatibleSM.EmptyList":"No software modules types","DistributionSetType.EditModal.Heading":"Edit a distribution set type","DistributionSetType.EditModal.Success":"Distribution set type successfully updated"}');var WY=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:qY}),t.registerModal(kp,n(BY)),t.registerModal(jp,n(VY))};const zY=JSON.parse('{"DS.Tags.UIFeature.Name":"Distribution set tags","DS.Tags.ListBlade.Header":"Distribution set tags","DS.Tags.Empty":"No distribution set tags found","DS.Tags.Create":"Create distribution set tag"}');var QY=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:zY}),t.registerModal(Ih,n(Rh))};const GY=JSON.parse('{"SoftwareModuleTypes.UIFeature.Name":"Software module types","SoftwareModuleTypes.UIFeature.Description":"Manage your software module types.","SoftwareModuleTypes.ListBlade.Header":"Software module types","SoftwareModuleTypes.DetailsBlade.Header":"Software module type","SoftwareModuleTypes.List.Empty":"No software module types found","SoftwareModuleTypes.List.Key":"Key","SoftwareModuleTypes.List.DeletedFlag":"Deleted","SoftwareModuleTypes.Label.AssignmentType":"Assignment type","SoftwareModuleTypes.Label.Firmware":"Firmware (FW)","SoftwareModuleTypes.Label.Software":"Software (SW)","SoftwareModuleTypes.Add":"Add software module type","SoftwareModuleTypes.Add.Success":"Software module type successfully added","SoftwareModuleTypes.EditModal.Heading":"Edit a software module type","SoftwareModuleTypes.EditModal.Success":"Software module type successfully updated","SoftwareModuleType.DeleteConfirmation.Header":"Delete software module type?","SoftwareModuleType.DeleteConfirmation.Message":"This action will delete the software module type below","SoftwareModuleType.DeleteSuccess.Message":"Software module type successfully deleted","SoftwareModuleType.Actions.Delete.Tooltip":"Delete software module type","SoftwareModuleType.Actions.Title":"Software module type actions","SoftwareModuleType.Actions.Edit.Tooltip":"Edit a software module type"}');function $Y(){return $Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$Y.apply(this,arguments)}var KY={name:"",description:"",key:"",maxAssignments:1..toString()};function YY(e){var t,n,r,o=e.onCancel,i=e.onSubmit,a=e.loading,l=e.error,s=e.formName,u=Ut(),c=$o({defaultValues:KY,mode:"onChange"}),d=c.getValues,f=c.register,p=c.setFocus,h=c.formState.errors;return(0,G.useEffect)((function(){p("key")}),[p]),$().createElement(Xo,{formName:s,useFormReturn:c,loading:a,error:l,onCancel:o,onSubmit:i,submit:"ctrl+enter"},$().createElement(Yo,{register:f,getValues:d,field:"key",label:"Entity.Label.Key",maxSize:64,notificationText:null===h||void 0===h||null===(t=h.key)||void 0===t?void 0:t.message,autoFocus:!0,isRequired:!0}),$().createElement(Yo,{register:f,getValues:d,field:"name",label:"Entity.Label.Name",maxSize:128,notificationText:null===h||void 0===h||null===(n=h.name)||void 0===n?void 0:n.message,isRequired:!0}),$().createElement(ei,{i18n:u,register:f,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===h||void 0===h||null===(r=h.description)||void 0===r?void 0:r.message}),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,$Y({id:"firmware-radio",label:u("SoftwareModuleTypes.Label.Firmware"),value:1},f("maxAssignments")))),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,$Y({id:"software-radio",label:u("SoftwareModuleTypes.Label.Software"),value:2147483647},f("maxAssignments")))))}function JY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JY(Object(n),!0).forEach((function(t){ZY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eJ(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=AI(),a=function(){var e=ue();return zn(xi.add(),bi,{onSuccess:function(){e.resetQueries(xi.lists())}})}(),l=a.mutate,s=a.isLoading,u=a.error,c=(0,G.useCallback)((function(e){var t=XY(XY({},e),{},{maxAssignments:+e.maxAssignments});l([t],{onSuccess:function(e){var t=e[0];n(),o(r("SoftwareModuleTypes.Add.Success")),i.toDetails(t.id)}})}),[i,r,l,o,n]);return $().createElement(Ft.Dialog,{dialogId:gI,title:r("SoftwareModuleTypes.Add"),onClose:n,modal:!0,open:!0},$().createElement(YY,{formName:"AddSoftwareModuleTypeForm",onCancel:n,onSubmit:c,loading:s,error:u}))}var tJ={description:""};function nJ(e){var t,n=e.onCancel,r=e.onSubmit,o=e.loading,i=e.error,a=e.initialEntry,l=e.formName,s=Ut(),u=$o({defaultValues:null!==a&&void 0!==a?a:tJ,mode:"onChange"}),c=u.register,d=u.formState.errors,f=u.setFocus;return(0,G.useEffect)((function(){f("name")}),[f]),$().createElement(Xo,{formName:l,useFormReturn:u,loading:o,error:i,onCancel:n,onSubmit:r,convertError:function(e){return e},isUpdate:!!a,createLabel:"Button.Edit"},$().createElement(tn.LabelledSection,{header:s("Entity.Label.Name")},null===a||void 0===a?void 0:a.name),$().createElement(ei,{i18n:s,register:c,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:null===d||void 0===d||null===(t=d.description)||void 0===t?void 0:t.message}))}function rJ(e){var t=e.options,n=e.onClose;if(!t)throw Error("Parameters are required.");var r=Ut(),o=Vt(),i=function(e){var t=ue();return Yn(xi.update(e),"".concat(bi,"/").concat(encodeURIComponent(e)),{onSuccess:function(){t.resetQueries(xi.lists()),t.resetQueries(xi.details())}})}(t.initialEntry.id),a=i.mutate,l=i.isLoading,s=i.error;return $().createElement(Ft.Dialog,{dialogId:yI,title:r("SoftwareModuleTypes.EditModal.Heading"),onClose:n,modal:!0,open:!0},$().createElement(nJ,{formName:"EditSoftwareModuleTypeForm",onCancel:n,onSubmit:function(e){var t=e.description;a({description:t},{onSuccess:function(){o(r("SoftwareModuleTypes.EditModal.Success")),n()}})},loading:l,error:s,initialEntry:t.initialEntry}))}var oJ=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:GY}),t.registerModal(gI,n(eJ)),t.registerModal(yI,n(rJ))},iJ="rollouts-software-modules",aJ="rollouts-distribution-sets",lJ="rollouts-targets",sJ="rollouts-actions",uJ="rollouts-target-filters",cJ="rollouts-rollouts",dJ="rollouts-configurations",fJ="rollouts-quotas",pJ="access-control";function hJ(e){return[{id:iJ,name:e.translate("UIFeature.Name.SM"),description:e.translate("UIFeature.Description.SM"),icon:"rolloutsSoftwareModule",link:UG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Data-Model-Definitions.html#src-1680491207_DataModelDefinitions-Softwaremodeldefinition",api:"https://docs.bosch-iot-suite.com/rollouts/Software-modules---HTTP-API.html"},{id:aJ,name:e.translate("UIFeature.Name.DS"),description:e.translate("UIFeature.Description.DS"),icon:"rolloutsDistributionSet",link:VG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Data-Model-Definitions.html#src-1680491207_DataModelDefinitions-DistributionSetsasuniversalpackages",api:"https://docs.bosch-iot-suite.com/rollouts/Distributionsets---HTTP-API.html"},{id:lJ,name:e.translate("UIFeature.Name.Targets"),description:e.translate("UIFeature.Description.Targets"),icon:"rolloutsTargets",link:zG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Data-Model-Definitions.html#src-1680491207_DataModelDefinitions-Provisioningtargetdefinition",api:"https://docs.bosch-iot-suite.com/rollouts/Targets---HTTP-API.html"},{id:sJ,name:e.translate("UIFeature.Name.Actions"),description:e.translate("UIFeature.Description.Actions"),icon:"survey-checkmark",link:KG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Action-state-machine.html",api:"https://docs.bosch-iot-suite.com/rollouts/Actions---HTTP-API.html"},{id:uJ,name:e.translate("UIFeature.Name.TargetFilters"),description:e.translate("UIFeature.Description.TargetFilters"),icon:"rolloutsTargetFilters",link:YG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Data-Model-Definitions.html#src-1680491207_DataModelDefinitions-Provisioningtargetdefinition",api:"https://docs.bosch-iot-suite.com/rollouts/Target-filter-queries---HTTP-API.html"},{id:cJ,name:e.translate("UIFeature.Name.Rollouts"),description:e.translate("UIFeature.Description.Rollouts"),icon:"rolloutsRollouts",link:JG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/Rollout-state-machines.html",api:"https://docs.bosch-iot-suite.com/rollouts/Rollouts---HTTP-API.html"},{id:dJ,name:e.translate("UIFeature.Name.Configuration"),description:e.translate("UIFeature.Description.Configuration"),icon:"settings",link:XG,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/System-configuration-view.html",api:"https://docs.bosch-iot-suite.com/rollouts/Tenant---system-configuration---HTTP-API.html"},{id:fJ,name:e.translate("UIFeature.Name.Quotas"),description:e.translate("UIFeature.Description.Quotas"),icon:"chart-bar",link:e$,bigPictureBox:"rollouts",doc:"https://docs.bosch-iot-suite.com/rollouts/System-configuration-view.html",api:"https://docs.bosch-iot-suite.com/rollouts/Tenant---system-configuration---HTTP-API.html"},{id:pJ,name:e.translate("UIFeature.Name.AccessControl"),description:e.translate("UIFeature.Description.AccessControl"),icon:"keys-user-access",link:t$,bigPictureBox:"rollouts"}]}function mJ(e){return function(e){if(Array.isArray(e))return gJ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return gJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const yJ=JSON.parse('{"QuotasBlade.Header":"Quotas","Quotas.Header.Name":"Name","Quotas.Header.Limit":"Limit","Quotas.Header.Used":"Used","Quotas.Header.Left":"Left","Quotas.Header.Usage":"Usage","Quotas.List.Empty":"No quotas found","Quotas.List.Label.ARTIFACT_STORAGE":"Artifact storage (in megabytes)","Quotas.List.Label.DISTRIBUTION_SET":"Distribution set","Quotas.List.Label.DISTRIBUTION_SET_TAG":"Distribution set tag","Quotas.List.Label.DISTRIBUTION_SET_TYPE":"Distribution set type","Quotas.List.Label.LOCAL_USER":"Local user","Quotas.List.Label.ROLLOUT":"Rollout","Quotas.List.Label.SOFTWARE_MODULE":"Software module","Quotas.List.Label.SOFTWARE_MODULE_TYPE":"Software module type","Quotas.List.Label.TARGET":"Target","Quotas.List.Label.TARGET_FILTER_QUERY":"Target filter","Quotas.List.Label.TARGET_TAG":"Target tag","Quotas.List.Label.TARGET_TYPE":"Target type","Quotas.List.Label.USER_ROLE":"Role","Quotas.List.Label.ROLE":"Role","Quotas.List.Label.USER":"User"}');var bJ=function(e){var t=e.shell;e.connect;t.registerTranslation({en:yJ})};const vJ=JSON.parse('{"ConfigurationsBlade.Header":"Configuration","Configurations.LeavePage.UnsavedChanges.Confiramation":"You have unsaved changes that will be lost, continue?","ConfigurationsSection.Title.DS":"Distribution configuration","ConfigurationsSection.Title.Rollouts":"Rollouts configuration","ConfigurationsSection.Title.Polling":"Polling configuration","ConfigurationsSection.Title.ArtifactDelivery":"Artifact delivery configuration","ConfigurationsSection.Title.DDI":"Direct device integration (DDI) API","ConfigurationsSection.Title.DDI.Auth":"Authentication configuration","ConfigurationsSection.Title.DMF":"Device management federation (DMF) API","ConfigurationsSection.Title.Management":"Management API","ConfigurationsSection.Title.SIE":"Service integration event (SIE) API","ConfigurationsSection.Tooltip.Reset":"Reset configuration","ConfigurationParameter.Label.rollout.approval.enabled":"Approve rollout before it can be started","ConfigurationParameter.Label.repository.actions.autoclose.enabled":"Auto-close running actions when a new distribution set is assigned","ConfigurationParameter.Label.multi.assignments.enabled":"Allow parallel execution of multiple distribution set assignments and rollouts","ConfigurationParameter.Label.user.confirmation.flow.enabled":"Request confirmation for actions before proceeding with download/install process","ConfigurationParameter.Label.action.cleanup.enabled":"Automatically delete terminated actions","ConfigurationParameter.Label.action.cleanup.actionStatus":"Delete actions with status","ConfigurationParameter.Label.action.cleanup.actionExpiry":"Delete after (in days)","ConfigurationParameter.Label.authentication.header.enabled":"Allow targets to authenticate via a certificate authenticated by a reverse proxy","ConfigurationParameter.Label.authentication.header.authority":"SSL issuer hash","ConfigurationParameter.Label.authentication.targettoken.enabled":"Allow targets to authenticate directly with their target security token","ConfigurationParameter.Label.authentication.gatewaytoken.enabled":"Allow a gateway to authenticate and manage multiple targets through a gateway security token","ConfigurationParameter.Label.dmf.enabled":"Enabled","ConfigurationParameter.Label.sie.enabled":"Enabled","ConfigurationParameter.Label.default.ds.type":"Default distribution set type","ConfigurationParameter.Label.implicit.lock.enabled":"Implicit lock","ConfigurationParameter.Label.pollingTime":"Polling interval","ConfigurationParameter.Label.pollingOverdueTime":"Overdue after","ConfigurationParameter.Label.cdn.validity.days":"Validity period of URLs (in days)","ConfigurationParameter.Label.DDI.URL":"URL","ConfigurationParameter.Label.DDI.URL.CertAuth":"URL for client certificate authentication","ConfigurationParameter.Label.Management.URL":"URL","ConfigurationParameter.Title.Regenerate.authentication.gatewaytoken.key":"Regenerate key","ConfigurationParameter.Info.Heading.cdn.validity.days":"CDN validity period","ConfigurationParameter.Info.Text.cdn.validity.days":"The provided CDN validity period must be between {min} and {max} days.","ConfigurationParameter.Info.Text.action.cleanup.actionExpiry":"Retention period can be between {min} and {max} days.","ConfigurationParameter.Info.Heading.Polling":"Polling value format","ConfigurationParameter.Info.Text.Polling":"Polling period value is in the format \\"{format}\\".","ConfigurationParameter.Validation.Id.default.ds.type":"Id must be a positive integer.","ConfigurationParameter.Validation.Required.authentication.header.authority":"SSL issuer hash can\'t be empty","ConfigurationParameter.Validation.Range.ErrorMessage":"Value must be between {min} and {max}.","ConfigurationParameter.Validation.Range.Days.ErrorMessage":"Value must be between {min} and {max} days.","ConfigurationParameter.Enabled.Warning.multi.assignments.enabled":"Once this assignment behavior is active, it cannot be deactivated.","ConfigurationParameter.Enabled.Warning.action.cleanup.enabled":"The actions are deleted from the repository and cannot be restored.","ConfigurationsSaveModal.Label.Loading":"Saving changes...","ConfigurationsSaveModal.Label.Error":"Unable to save changes","ConfigurationsSaveModal.Label.Success":"Changes successfully saved"}');var SJ=function(e){e.shell.registerTranslation({en:vJ})};const EJ=JSON.parse('{"Users.ListBlade.Header":"Users","UserDetailsBlade.Header":"User","UserGrantPermissionsBlade.Header":"Set permissions","Users.List.Empty":"No users found","Users.Type.OpenID":"Open ID","Users.Type.System":"System","Users.Label.User":"User","Users.Label.Permissions":"Permissions","Users.Label.EmailOrClientId":"Email or client ID","Users.Label.Name":"Name","Users.Label.Secret":"Secret","Users.Label.New.Password":"New Password","Users.Label.Confirm.New.Password":"Confirm New Password","Users.Create":"Create user","Users.Create.Modal.Success":"User successfully created","User.GrantPermissions.Success":"Permissions are set","Users.Permissions.UPDATE":"update","Users.Permissions.CREATE":"create","Users.Permissions.DELETE":"delete","Users.Permissions.READ":"read","Users.Permissions.APPROVE":"approve","Users.Permissions.HANDLE":"stop/pause","Users.Permissions.USE_PRIVATE":"use","Users.Permissions.READ_CA":"read CA","Users.Permissions.USER_MANAGEMENT":"users","Users.Permissions.DOWNLOAD_REPOSITORY_ARTIFACT":"download","Users.Permissions.READ_TARGET_SECURITY_TOKEN":"read target security token","Users.Permissions.READ_TENANT_CONFIGURATION":"read tenant configuration","Users.Permissions.READ_GATEWAY_SECURITY_TOKEN":"read gateaway security token","Users.Permissions.TENANT_CONFIGURATION":"update configuration","Users.Permissions.NONE":"none","Users.Permissions.ALL":"all","User.Detail.AllPermissions":"All permissions","User.DetailsActions.ContextMenu.Title":"User actions","User.DetailsActions.Edit":"Edit","User.DetailsActions.ChangePassword":"Change password","User.Edit.Tooltip":"Edit user permissions","User.UpdatePermissions.Success":"Permissions successfully updated","User.UpdatePermissions.Remove.Error":"Following permissions failed to be removed:","User.DeleteModal.Header":"Delete user","User.DeleteModal.Message":"This action will delete the user below","User.DeleteModal.SuccessMessage":"User successfully deleted","User.DetailsActions.Delete":"Delete","User.Delete.Tooltip":"Delete user","User.ChangePassword.Heading":"Change password","User.ChangePassword.Success":"Successfully changed password","User.ChangePassword.Tooltip":"Change technical user password","User.ChangePassword.ErrorMessage.Mismatch":"Passwords do not match","User.ChangePassword.Label.NewPassword":"New password","User.ChangePassword.Label.ConfirmPassword":"Confirm password"}');function wJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AJ(e,t){var n=ue();return zn(LV.grantPermissions(e),"".concat(mi,"/").concat(e,"/permissions"),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wJ(Object(n),!0).forEach((function(t){OJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({onSuccess:function(){n.resetQueries(LV.lists()),n.resetQueries(LV.userDetails(e))}},t))}function CJ(e){return function(e){if(Array.isArray(e))return xJ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||DJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DJ(e,t){if(e){if("string"===typeof e)return xJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xJ(e,t):void 0}}function xJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var PJ="add_user-type-form";function MJ(e){var t,n=e.options;if(!n)throw Error("Parameters are required.");var r=n.onCancel,o=Ut(),i=gV(),a=Vt(),l=TJ((0,G.useState)(cV.openID),2),s=l[0],u=l[1],c=TJ((0,G.useState)(""),2),d=c[0],f=c[1],p=TJ((0,G.useState)(""),2),h=p[0],m=p[1],g=TJ((0,G.useState)(""),2),y=g[0],b=g[1],v=TJ((0,G.useState)([]),2),S=v[0],E=v[1],w=TJ((0,G.useState)(OV([],vV)),2),O=w[0],A=w[1],C=function(){var e=ue();return zn(LV.add(),mi,{onSuccess:function(){e.resetQueries(LV.lists())}})}(),T=C.data,D=C.isLoading,x=C.error,P=C.mutate,M=AJ(null!==(t=null===T||void 0===T?void 0:T[0].id)&&void 0!==t?t:0,{onSuccess:function(){_&&(a(o("User.GrantPermissions.Success")),i.toDetails(_),r())}}),I=M.isLoading,R=M.error,L=M.mutate,k=o(x||R?"Button.Retry":"Button.Create"),j=D||I,_=T&&T[0].id,F=s===cV.openID,N=s===cV.system,B=(0,G.useMemo)((function(){return!(S.length&&!j)||(F?!y:!d||!h)}),[d,y,j,h,F,S.length]),U=(0,G.useCallback)((function(e){var t=e.target.value;u(t)}),[u]),H=(0,G.useCallback)((function(){P([F?{name:y}:{name:d,password:h}])}),[P,y,d,h,F]);return(0,G.useEffect)((function(){A(OV(S,vV))}),[S,A]),(0,G.useEffect)((function(){_&&L(S)}),[_,S,L]),$().createElement(Ft.Dialog,{dialogId:pV,className:"add-user-dialog",title:o("Users.Create"),onClose:r,modal:!0,open:!0},(x||R)&&$().createElement("div",{className:"margin-bottom-1"},$().createElement(tn.ErrorState,{error:x||R})),j&&$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"user-permissions-loading"})),$().createElement("div",{className:"user-type-section"},$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(PJ,"-openId"),name:PJ,label:$().createElement($().Fragment,null,$().createElement(tn.MappedIcon,{value:cV.openID,infos:hV,processTooltip:o}),o("Users.Type.OpenID")),value:cV.openID,checked:F,onChange:U})),$().createElement(Ft.TextField,{id:"user-email","data-testid":"user-email",label:$().createElement($().Fragment,null,o("Users.Label.EmailOrClientId"),F&&$().createElement(tn.RequiredIcon,null)),value:y,onChange:function(e){return b(e.target.value)},disabled:!F}),$().createElement(Ft.FormField,{fieldType:"radio"},$().createElement(Ft.RadioButton,{id:"".concat(PJ,"-system"),name:PJ,label:$().createElement($().Fragment,null,$().createElement(tn.MappedIcon,{value:cV.system,infos:hV,processTooltip:o}),o("Users.Type.System")),value:cV.system,checked:N,onChange:U})),$().createElement("div",{className:"system-type-inputs"},$().createElement(Ft.TextField,{id:"user-name","data-testid":"user-name",label:$().createElement($().Fragment,null,o("Users.Label.Name"),N&&$().createElement(tn.RequiredIcon,null)),value:d,onChange:function(e){return f(e.target.value)},disabled:!N}),$().createElement(Ft.TextField,{id:"user-secret","data-testid":"user-secret",type:"password",label:$().createElement($().Fragment,null,o("Users.Label.Secret"),N&&$().createElement(tn.RequiredIcon,null)),value:h,onChange:function(e){return m(e.target.value)},disabled:!N}))),$().createElement(KV,{permissions:S,permissionsGroups:vV,onCheck:function(e,t){E(t?[].concat(CJ(S),CJ(e)).filter((function(e,t,n){return n.indexOf(e)===t})):S.filter((function(t){return!e.includes(t)})))},editMode:!0,columnsMap:O,entityId:null,adminPermission:dV.ROLE_TENANT_ADMIN}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{mode:"secondary",label:o("Button.Cancel"),onClick:r}),$().createElement(Ft.Button,{mode:"primary",label:k,onClick:H,disabled:B})))}var IJ=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:EJ}),t.registerModal(pV,n(MJ))};const RJ=JSON.parse('{"TenantNavigationItem.SelectTenant":"Select tenant","TenantDetails.Title":"Tenant details","TenantDetails.SwitchTenant":"Switch tenant","TenantDetails.ServiceInstanceId":"Service instance ID","TenantDetails.ServicePlan":"Service plan","TenantDetails.TenantID":"Tenant ID"}');var LJ=function(e){e.shell.registerTranslation({en:RJ})};const kJ=JSON.parse('{"ConfigureTenantBlade.Header":"Enter tenant","ConfigureTenant.Label.Tenant":"Tenant"}');var jJ=function(e){var t=e.shell;e.connect;t.registerTranslation({en:kJ})};const _J=JSON.parse('{"Roles.ListBlade.Header":"Roles","Roles.DetailsBlade.Header":"Role","Roles.List.Empty":"No roles found","Roles.Label.Role":"Role","Roles.Label.Permissions":"Permissions","Roles.Label.AllPermissions":"All permissions","Roles.Add":"Add new role","Roles.AddRole.Title":"Set permissions","Roles.AddRole.Name":"Role","Roles.AddRole.Success":"Role successfully added","Role.DeleteModal.Header":"Delete role","Role.DeleteModal.Message":"This action will delete the role below","Role.DeleteModal.SuccessMessage":"Role successfully deleted","Role.DetailsActions.Delete":"Delete","Role.DetailsActions.Edit":"Edit","Role.Delete.Tooltip":"Delete role","Role.Edit.Tooltip":"Edit role","Role.DetailsActions.ContextMenu.Title":"Role actions","Role.Permissions.ScopesAvailable":"Scopes available","Roles.PermissionsScopeBlade.Header":"Permissions scope"}');function FJ(e){return function(e){if(Array.isArray(e))return UJ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||BJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||BJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BJ(e,t){if(e){if("string"===typeof e)return UJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UJ(e,t):void 0}}function UJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HJ(e){var t=e.options;if(!t)throw Error("Parameters are required.");var n=t.onCancel,r=Ut(),o=Eq(),i=Vt(),a=NJ((0,G.useState)(""),2),l=a[0],s=a[1],u=NJ((0,G.useState)([]),2),c=u[0],d=u[1],f=NJ((0,G.useState)(OV([],vV)),2),p=f[0],h=f[1],m=function(){var e=ue();return zn(xq.add(),hi,{onSuccess:function(){e.resetQueries(xq.lists())}})}(),g=m.data,y=m.isLoading,b=m.error,v=m.isSuccess,S=m.mutate,E=r(b?"Button.Retry":"Button.Set"),w=g&&g[0].id;return(0,G.useEffect)((function(){h(OV(c,vV))}),[c,h]),(0,G.useEffect)((function(){v&&w&&(i(r("Roles.AddRole.Success")),o.toDetails(w),n())}),[w,o,v,i,n,r]),$().createElement(Ft.Dialog,{dialogId:wq,className:"add-user-dialog",title:r("Roles.AddRole.Title"),onClose:n,modal:!0,open:!0},$().createElement("div",{className:"margin-bottom-1"},b&&$().createElement(tn.ErrorState,{error:b})),y&&$().createElement(tn.CenteredBox,null,$().createElement(Ft.ActivityIndicator,{"data-testid":"role-permissions-loading"})),$().createElement(Ft.TextField,{label:r("Roles.AddRole.Name"),id:"role-name",value:l,onChange:function(e){return s(e.target.value)},className:"margin-bottom-1"}),$().createElement(KV,{permissions:c,permissionsGroups:vV,entityId:null,editMode:!0,columnsMap:p,onCheck:function(e,t){d(t?[].concat(FJ(c),FJ(e)).filter((function(e,t,n){return n.indexOf(e)===t})):c.filter((function(t){return!e.includes(t)})))},adminPermission:dV.ROLE_TENANT_ADMIN}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:n}),$().createElement(Ft.Button,{label:E,mode:"primary",onClick:function(){S([{name:l,permissions:c.map((function(e){return{permission:e}}))}])},disabled:!l||!c.length||y})))}var VJ=function(e){var t=e.shell,n=e.connect;t.registerTranslation({en:_J}),t.registerModal(wq,n(HJ))};const qJ=JSON.parse('{"ConfigurationsAMQPBlade.Header":"AMQP configuration","ConfigurationsAMQPBlade.Section.Title.AMQP":"Advanced message queuing protocol (AMQP)","ConfigurationsAMQPBlade.Section.Title.dmf.enabled":"Device management federation (DMF) API","ConfigurationsAMQPBlade.Section.Title.sie.enabled":"Service integration event (SIE) API","ConfigurationsAMQPBlade.ShortName.dmf.enabled":"DMF","ConfigurationsAMQPBlade.ShortName.sie.enabled":"SIE","ConfigurationsAMQPBlade.FullName.dmf.enabled":"device management federation (DMF)","ConfigurationsAMQPBlade.FullName.sie.enabled":"dervice integration event (SIE)","ConfigurationsAMQPBlade.Title.Confirmation.Enable.AMQP":"Enable advanced message queuing protocol (AMQP)?","ConfigurationsAMQPBlade.Title.Confirmation.Disable.AMQP":"Disable advanced message queuing protocol (AMQP)?","ConfigurationsAMQPBlade.Message.Confirmation.Enable.AMQP":"Enabling AMQP will setup a new configuration. Do you want to proceed?","ConfigurationsAMQPBlade.Message.Confirmation.Disable.AMQP":"Disabling AMQP will delete your current configuration (usernames, passwords, etc.). DMF and SIE will also be disabled in the process. Do you want to proceed?","ConfigurationsAMQPBlade.Toast.Success.Enable.AMQP":"AMQP enabled.","ConfigurationsAMQPBlade.Toast.Success.Disable.AMQP":"AMQP disabled.","ConfigurationsAMQPBlade.Title.Confirmation.Enable.AMQPConfig":"Enable {name}?","ConfigurationsAMQPBlade.Title.Confirmation.Disable.AMQPConfig":"Disable {name}?","ConfigurationsAMQPBlade.Message.Confirmation.Enable.AMQPConfig":"Do you want to enable {name}?","ConfigurationsAMQPBlade.Message.Confirmation.Disable.AMQPConfig":"Do you want to disable {name}?","ConfigurationsAMQPBlade.Toast.Success.Enable.AMQPConfig":"{name} enabled.","ConfigurationsAMQPBlade.Toast.Success.Disable.AMQPConfig":"{name} disabled.","ConfigurationsAMQPBlade.AMQPInfo.Title":"AMQP configuration","ConfigurationsAMQPBlade.AMQPInfo.Warning.Instruction":"This is your AMQP configuration, please save it for later use!","ConfigurationsAMQPBlade.AMQPInfo.Warning.Reason":"Since it contains sensitive data you will not be able to get it again later!"}');var WJ=function(e){e.shell.registerTranslation({en:qJ})};function zJ(e){var t=e.tenant,n=Ut();return $().createElement($().Fragment,null,t&&$().createElement(tn.SectionGroup,{label:"",className:"tenant-details-section"},$().createElement(tn.LabelledSection,{showCopy:!0,header:n("TenantDetails.TenantID"),value:t.tenant}),t.instanceName&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("Entity.Label.Name"),value:t.instanceName}),t.serviceInstance&&$().createElement(tn.LabelledSection,{showCopy:!0,header:n("TenantDetails.ServiceInstanceId"),value:t.serviceInstance}),t.servicePlan&&$().createElement(tn.LabelledSection,{header:n("TenantDetails.ServicePlan"),value:t.servicePlan})))}function QJ(e){var t=e.tenants,n=e.selectedTenant,r=e.onTenantClick;return $().createElement("div",{className:"switch-tenant-list margin-bottom-1"},null===t||void 0===t?void 0:t.map((function(e){return $().createElement("div",{key:e.tenant,className:(null===n||void 0===n?void 0:n.tenant)===e.tenant?"tenant selected":"tenant"},$().createElement(Ft.Button,{label:e.instanceName||e.tenant,mode:"integrated",onClick:function(){return r(e)}}))})))}var GJ=(0,G.forwardRef)((function(e,t){var n=e.isOpen,r=e.onReject,o=e.switchTenant,i=e.children,a=Nt(),l=Ut();return $().createElement(tn.Dialog,{isOpen:n,onCancel:r,id:"switch_tenant_dialog",ref:t,dialogHeader:$().createElement(tn.DialogHeader,{title:l("TenantDetails.SwitchTenant"),onCloseBtnClick:r})},i,$().createElement(tn.ConfirmationDialogControls,{acceptBtnLabel:l("TenantDetails.SwitchTenant"),acceptBtnDisabled:!o,onAcceptBtnClick:function(){o&&a.state.shell.switchTenant(o.tenant)},rejectBtnLabel:l("Button.Cancel"),onRejectBtnClick:r}))}));function $J(e){return function(e){if(Array.isArray(e))return KJ(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return KJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var YJ={all:["tenants"],lists:function(){return[].concat($J(YJ.all),["list"])},list:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_n;return[].concat($J(YJ.lists()),[e])}};function JJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZJ(e,t){return Fn(YJ.list(e),"v1/users/tenants",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JJ(Object(n),!0).forEach((function(t){XJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),t)}l(7320);function eX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){l=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return tX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tX(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nX=function(){var e=function(){var e=eX((0,tn.useDialogControls)(),3);return{visible:e[0],hide:e[1],toggle:e[2]}}(),t=Nt().state.shell,n=Ut(),r=t.getTenantId(),o=t.getTechnicalUserFlow(),i=(0,tn.useDialog)(),a=i.isDialogOpen,l=i.closeDialog,s=i.showDialog,u=ZJ(),c=u.data,d=u.isLoading,f=u.error,p=null===c||void 0===c?void 0:c.pages[0],h=null===p||void 0===p?void 0:p.find((function(e){return e.tenant===r})),m=n("TenantNavigationItem.SelectTenant");h&&(m=h.instanceName||h.tenant),o&&(m=r||"");var g=n(r?"TenantDetails.Title":"TenantNavigationItem.SelectTenant"),y=eX((0,G.useState)(),2),b=y[0],v=y[1];return(0,G.useEffect)((function(){v(h)}),[h]),$().createElement($().Fragment,null,$().createElement(GJ,{isOpen:a,pendingAction:d,actionError:f,onReject:l,switchTenant:b},$().createElement(QJ,{tenants:p,selectedTenant:b,onTenantClick:v}),b&&$().createElement(zJ,{tenant:b})),$().createElement("div",{className:r?"":"select-tenant"},$().createElement(tn.HeaderNavigationItem,{label:g,className:"data-test-subscription-information-link",icon:$().createElement($().Fragment,null,$().createElement(Ft.Icon,{iconName:r?"folder-open":"alert-warning",title:g}),$().createElement("span",null,m)),visible:e.visible,hide:e.hide,toggle:function(){r?e.toggle():s()}},$().createElement("h2",{className:"shell-user-details-view-header -size-xl"},n("TenantDetails.Title")),!o&&h&&$().createElement($().Fragment,null,$().createElement(zJ,{tenant:h}),$().createElement(tn.ButtonRow,null,$().createElement(Ft.Button,{label:n("TenantDetails.SwitchTenant"),mode:"secondary",onClick:function(){return s()}}))),o&&r&&$().createElement(zJ,{tenant:{tenant:r}}))))};const rX=JSON.parse('{"WhoAmI.Header":"WhoAmI","WhoAmI.Email.Label":"Email","WhoAmI.Username.Label":"Username","WhoAmI.Idp.Label":"IdP","WhoAmI.Idp.SKID":"Bosch ID","WhoAmI.Idp.BoschAD":"Bosch AD","WhoAmI.Idp.UserId.Label":"IdP user Id","WhoAmI.OAuth2.Token.Label":"OAuth2 token","WhoAmI.OAuth2.AccessToken.Expiry.Label":"Token expiry","WhoAmI.OAuth2.AccessToken.Expiry.Text":"expires at {expDate} (automatic renewal)","WhoAmI.OAuth2.RefrershToken.Label":"Refresh token","WhoAmI.Roles.List.RoleColumn.Header":"Role","WhoAmI.Roles.List.EmptyMsg":"No roles are assigned","WhoAmI.Permissions.List.PermissionColumn.Header":"Permission","WhoAmI.Permissions.List.EmptyMsg":"No permissions are assigned"}');function oX(e){var t=e.params,n=t.title,r=t.label,o=t.onNavigate;return $().createElement(ki.Link,{to:a$,title:n,onClick:o},r)}var iX=function(e){var t=e.shell;t.registerTranslation({en:rX}),t.registerExtension("user",oX)};function aX(e){var t;t=new Q(X),fe=t;var n=function(e){return[re(e),{state:Object.freeze(Dt),actions:{setCurrentStep:function(e,t){e(xt({type:"set-current-step",stepId:t}))},setStepCompleted:function(e,t,n){e(xt({type:"set-step-completed",stepId:t,isCompleted:n}))},setConfirmationFlow:function(e,t){e(xt({type:"set-confirmation-flow",confirmationFlowEnabled:t}))},updateRolloutWizardData:function(e,t){e(xt({type:"update-rollouts-wizard-data",rollout:t}))},resetRolloutWizard:function(e){e(xt({type:"reset-rollouts-wizard"}))}}},Et(e)].reduce((function(e,t){return{state:Mt(Mt({},e.state),t.state),actions:Mt(Mt({},e.actions),t.actions)}}))}(e),r=e.createState(n),o=function(e){return(n=r,function(e){return n((function(t){var n=t.state,r=t.actions,o=ie(t,oe),i=(0,G.useMemo)((function(){return{state:n,actions:r}}),[n,r]);return $().createElement(K.Provider,{value:i},$().createElement(e,o))}))})((t=e,function(e){if(!fe)throw new Error("Query client not set.");return $().createElement(ce,{client:fe},$().createElement(de,{initialIsOpen:!1}),$().createElement(t,e))}));var t,n};e.registerTranslation({en:Wi}),e.registerModal(si,o(dY)),e.registerModal(ui,o(hY)),function(e,t){e.registerFeaturesProvider("rollouts",hJ),e.registerPagesV2.apply(e,mJ(R$(e,t)))}(e,o),function(e,t,n){n.map((function(n){return n({shell:e,connect:t})}))}(e,o,[Rm,IY,XK,qi,oJ,eK,QY,WY,mK,nY,CK,DK,eY,SJ,bJ,IJ,LJ,jJ,VJ,WJ,me,iX]),e.registerMenu(o(nX),{type:"user"})}})(),s})()));