locust 2.32.4.dev4__py3-none-any.whl → 2.32.4.dev11__py3-none-any.whl

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.
locust/_version.py CHANGED
@@ -14,7 +14,7 @@ __version_tuple__: VERSION_TUPLE
14
14
  version_tuple: VERSION_TUPLE
15
15
 
16
16
 
17
- __version__ = "2.32.4.dev4"
17
+ __version__ = "2.32.4.dev11"
18
18
  version = __version__
19
- __version_tuple__ = (2, 32, 4, "dev4")
19
+ __version_tuple__ = (2, 32, 4, "dev11")
20
20
  version_tuple = __version_tuple__
locust/web.py CHANGED
@@ -57,6 +57,7 @@ DEFAULT_CACHE_TIME = 2.0
57
57
  class InputField(TypedDict, total=False):
58
58
  label: str
59
59
  name: str
60
+ type: str | None
60
61
  default_value: bool | None
61
62
  choices: list[str] | None
62
63
  is_secret: bool | None
@@ -152,7 +152,7 @@ ${j.current.stack}
152
152
  `});++n<e.length;)n&&r.push({type:"text",value:`
153
153
  `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
154
154
  `}),r}function BE(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function FE(e,t){const r=bhe(e,t),n=r.one(e,void 0),i=che(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
155
- `},i),a}function Ahe(e,t){return e&&"run"in e?async function(r,n){const i=FE(r,t);await e.run(i,n)}:function(r){return FE(r,t||e)}}function $E(e){if(e)throw e}var Dy=Object.prototype.hasOwnProperty,pH=Object.prototype.toString,VE=Object.defineProperty,GE=Object.getOwnPropertyDescriptor,HE=function(t){return typeof Array.isArray=="function"?Array.isArray(t):pH.call(t)==="[object Array]"},WE=function(t){if(!t||pH.call(t)!=="[object Object]")return!1;var r=Dy.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Dy.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Dy.call(t,i)},jE=function(t,r){VE&&r.name==="__proto__"?VE(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},UE=function(t,r){if(r==="__proto__")if(Dy.call(t,r)){if(GE)return GE(t,r).value}else return;return t[r]},Mhe=function e(){var t,r,n,i,a,o,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(r in t)n=UE(s,r),i=UE(t,r),s!==i&&(c&&i&&(WE(i)||(a=HE(i)))?(a?(a=!1,o=n&&HE(n)?n:[]):o=n&&WE(n)?n:{},jE(s,{name:r,newValue:e(c,o,i)})):typeof i<"u"&&jE(s,{name:r,newValue:i}));return s};const Vb=z1(Mhe);function jT(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function khe(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...u){const c=e[++a];let f=-1;if(l){o(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?Ihe(c,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ihe(e,t){let r;return n;function n(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(s&&r)throw c;return i(c)}s||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const Ma={basename:Phe,dirname:Dhe,extname:Rhe,join:Lhe,sep:"/"};function Phe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ag(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Dhe(e){if(ag(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Rhe(e){ag(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function Lhe(...e){let t=-1,r;for(;++t<e.length;)ag(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Ehe(r)}function Ehe(e){ag(e);const t=e.codePointAt(0)===47;let r=Ohe(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Ohe(e,t){let r="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function ag(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Nhe={cwd:zhe};function zhe(){return"/"}function UT(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bhe(e){if(typeof e=="string")e=new URL(e);else if(!UT(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Fhe(e)}function Fhe(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Gb=["history","path","basename","stem","extname","dirname"];class vH{constructor(t){let r;t?UT(t)?r={path:t}:typeof t=="string"||$he(t)?r={value:t}:r=t:r={},this.cwd=Nhe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Gb.length;){const a=Gb[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Gb.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Ma.basename(this.path):void 0}set basename(t){Wb(t,"basename"),Hb(t,"basename"),this.path=Ma.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ma.dirname(this.path):void 0}set dirname(t){YE(this.basename,"dirname"),this.path=Ma.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ma.extname(this.path):void 0}set extname(t){if(Hb(t,"extname"),YE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ma.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){UT(t)&&(t=Bhe(t)),Wb(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ma.basename(this.path,this.extname):void 0}set stem(t){Wb(t,"stem"),Hb(t,"stem"),this.path=Ma.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new yn(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hb(e,t){if(e&&e.includes(Ma.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ma.sep+"`")}function Wb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function YE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $he(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Vhe=function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,n);const o=Object.getOwnPropertyNames(i);for(const s of o){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(a,s,l)}return a},Ghe={}.hasOwnProperty;class jk extends Vhe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=khe()}copy(){const t=new jk;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Vb(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Yb("data",this.frozen),this.namespace[t]=r,this):Ghe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Yb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=lm(t),n=this.parser||this.Parser;return jb("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),jb("process",this.parser||this.Parser),Ub("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=lm(t),l=n.parse(s);n.run(l,s,function(c,f,d){if(c||!f||!d)return u(c);const h=f,p=n.stringify(h,d);jhe(p)?d.value=p:d.result=p,u(c,d)});function u(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),jb("processSync",this.parser||this.Parser),Ub("processSync",this.compiler||this.Compiler),this.process(t,i),qE("processSync","process",r),n;function i(a,o){r=!0,$E(a),n=o}}run(t,r,n){XE(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=lm(r);i.run(t,l,u);function u(c,f,d){const h=f||t;c?s(c):o?o(h):n(void 0,h,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),qE("runSync","run",n),i;function a(o,s){$E(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=lm(r),i=this.compiler||this.Compiler;return Ub("stringify",i),XE(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Yb("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Vb(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===u){d=f;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[h,...p]=c;const v=n[d][1];jT(v)&&jT(h)&&(h=Vb(!0,v,h)),n[d]=[u,h,...p]}}}}const Hhe=new jk().freeze();function jb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ub(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XE(e){if(!jT(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qE(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lm(e){return Whe(e)?e:new vH(e)}function Whe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jhe(e){return typeof e=="string"||Uhe(e)}function Uhe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yhe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZE=[],KE={allowDangerousHtml:!0},Xhe=/^(https?|ircs?|mailto|xmpp)$/i,qhe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Zhe(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||ZE,l=e.remarkPlugins||ZE,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...KE}:KE,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Khe,h=Hhe().use(Dde).use(l).use(Ahe,u).use(s),p=new vH;typeof n=="string"&&(p.value=n);for(const y of qhe)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Yhe+y.id,void 0);const v=h.parse(p);let g=h.runSync(v,p);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),hH(g,m),gce(g,{Fragment:P.Fragment,components:a,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function m(y,x,S){if(y.type==="raw"&&S&&typeof x=="number")return c?S.children.splice(x,1):S.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let _;for(_ in Bb)if(Object.hasOwn(Bb,_)&&Object.hasOwn(y.properties,_)){const b=y.properties[_],w=Bb[_];(w===null||w.includes(y.tagName))&&(y.properties[_]=d(String(b||""),_,y))}}if(y.type==="element"){let _=t?!t.includes(y.tagName):o?o.includes(y.tagName):!1;if(!_&&r&&typeof x=="number"&&(_=!r(y,x,S)),_&&S&&typeof x=="number")return f&&y.children?S.children.splice(x,1,...y.children):S.children.splice(x,1),x}}}function Khe(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Xhe.test(e.slice(0,t))?e:""}function F0({content:e}){return P.jsx(Zhe,{components:{a:Lr},skipHtml:!1,children:e})}function gH({name:e,label:t,defaultValue:r,choices:n,isSecret:i,isRequired:a}){return n?P.jsx(Lk,{defaultValue:r,label:t,name:e,options:n,required:a,sx:{width:"100%"}}):typeof r=="boolean"?P.jsx(vG,{control:P.jsx(NT,{defaultChecked:r,required:a}),label:P.jsx(F0,{content:t}),name:e}):i?P.jsx(RG,{defaultValue:r,isRequired:a,label:t,name:e}):P.jsx(Xf,{defaultValue:r,label:t,name:e,required:a,sx:{width:"100%"},type:"text"})}var Uk={},mH={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(mH);var Xu=mH.exports,Xb={};const Qhe=FY(Xte);var QE;function qu(){return QE||(QE=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Qhe}(Xb)),Xb}var Jhe=Xu;Object.defineProperty(Uk,"__esModule",{value:!0});var yH=Uk.default=void 0,epe=Jhe(qu()),tpe=P,rpe=(0,epe.default)((0,tpe.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"}),"Brightness4");yH=Uk.default=rpe;var Yk={},npe=Xu;Object.defineProperty(Yk,"__esModule",{value:!0});var xH=Yk.default=void 0,ipe=npe(qu()),ape=P,ope=(0,ipe.default)((0,ape.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}),"Brightness7");xH=Yk.default=ope;const Wa={DARK:"dark",LIGHT:"light"},spe=localStorage.theme===Wa.DARK||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?Wa.DARK:Wa.LIGHT,si=t6,lpe=c6;function xo(e,t){const r=lpe();return O.useCallback(n=>{r(e(n))},[e,r])}const upe={isDarkMode:!1},SH=Si({name:"theme",initialState:upe,reducers:{setIsDarkMode:(e,{payload:t})=>{e.isDarkMode=t}}}),cpe=SH.actions,bH=SH.reducer;function _H(){const e=si(({theme:{isDarkMode:n}})=>n),t=xo(cpe.setIsDarkMode);O.useEffect(()=>{t(spe===Wa.DARK)},[]);const r=()=>{localStorage.theme=e?Wa.LIGHT:Wa.DARK,t(!e)};return P.jsx(cd,{color:"inherit",onClick:r,children:e?P.jsx(xH,{}):P.jsx(yH,{})})}const fpe=e=>hk({palette:{mode:e,primary:{main:"#15803d"},success:{main:"#00C853"}},components:{MuiCssBaseline:{styleOverrides:{":root":{"--footer-height":"40px"},p:{margin:0}}}}});function wH(){const e=si(({theme:{isDarkMode:r}})=>r);return O.useMemo(()=>fpe(e?Wa.DARK:Wa.LIGHT),[e])}function dpe({authProviders:e,customForm:t,error:r,info:n,usernamePasswordCallback:i}){const a=wH();return P.jsxs(U6,{theme:a,children:[P.jsx(dG,{}),P.jsx(Pt,{sx:{position:"absolute",top:4,right:4},children:P.jsx(_H,{})}),P.jsxs(Pt,{component:"main",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",flexDirection:"column",rowGap:4,boxShadow:24,borderRadius:4,width:400,border:"3px solid black",p:4},children:[P.jsx(Pt,{sx:{display:"flex",justifyContent:"center",columnGap:2},children:P.jsx(DG,{})}),i&&!t&&P.jsx("form",{action:i,method:"POST",children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:2},children:[P.jsx(Xf,{label:"Username",name:"username"}),P.jsx(RG,{}),n&&P.jsx(sf,{severity:"info",children:P.jsx(F0,{content:n})}),r&&P.jsx(sf,{severity:"error",children:r}),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:"Login"})]})}),t&&P.jsx("form",{action:t.callbackUrl,method:"POST",children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:2},children:[t.inputs.map((o,s)=>P.jsx(gH,{...o},`custom-form-input-${s}`)),n&&P.jsx(sf,{severity:"info",children:P.jsx(F0,{content:n})}),r&&P.jsx(sf,{severity:"error",children:r}),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:t.submitButtonText||"Login"})]})}),e&&P.jsx(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:1},children:e.map(({label:o,callbackUrl:s,iconUrl:l},u)=>P.jsxs(cd,{href:s,sx:{display:"flex",justifyContent:"center",alignItems:"center",columnGap:2,borderRadius:2,borderWidth:"1px",borderStyle:"solid",borderColor:"primary"},children:[P.jsx("img",{height:"32",src:l}),P.jsx(dt,{height:"32",variant:"button",children:o})]},`auth-provider-${u}`))})]})]})}var Xk={},hpe=Xu;Object.defineProperty(Xk,"__esModule",{value:!0});var CH=Xk.default=void 0,ppe=hpe(qu()),vpe=P,gpe=(0,ppe.default)((0,vpe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");CH=Xk.default=gpe;function eS({open:e,onClose:t,children:r}){return P.jsx(hG,{onClose:t,open:e,children:P.jsxs(ng,{maxWidth:"md",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxHeight:"90vh",overflowY:"auto",display:"flex",flexDirection:"column",rowGap:2,bgcolor:"background.paper",boxShadow:24,borderRadius:4,border:"3px solid black",p:4},children:[P.jsx(cd,{color:"inherit",onClick:t,sx:{position:"absolute",top:1,right:1},children:P.jsx(CH,{})}),r]})})}function mpe(){const[e,t]=O.useState(!1),r=si(({swarm:n})=>n.version);return P.jsxs(P.Fragment,{children:[P.jsx(Pt,{sx:{display:"flex",justifyContent:"flex-end"},children:P.jsx(Ka,{color:"inherit",onClick:()=>t(!0),variant:"text",children:"About"})}),P.jsxs(eS,{onClose:()=>t(!1),open:e,children:[P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"About"}),P.jsxs(dt,{component:"p",variant:"subtitle1",children:["Locust is free and open source software released under the"," ",P.jsx(Lr,{href:"https://github.com/locustio/locust/blob/master/LICENSE",children:"MIT License"})]}),P.jsxs(dt,{component:"p",sx:{mt:2},variant:"subtitle1",children:["It was originally developed by Carl Byström and"," ",P.jsx(Lr,{href:"https://twitter.com/jonatanheyman",children:"Jonatan Heyman"}),". Since 2019, it is primarily maintained by ",P.jsx(Lr,{href:"https://github.com/cyberw",children:"Lars Holmberg"}),"."]}),P.jsxs(dt,{component:"p",sx:{mt:2},variant:"subtitle1",children:["Many thanks to all our wonderful"," ",P.jsx(Lr,{href:"https://github.com/locustio/locust/graphs/contributors",children:"contributors"}),"!"]})]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Need help getting started?"}),P.jsx(Lr,{href:"https://locust.cloud",children:"Locust Cloud"})," gives you access to hosted, easily scalable, and distributed load generation, as well as advanced reporting — all while preserving the flexible “it’s just Python” approach to load test scripting that Locust provides"]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Version"}),P.jsx(Lr,{href:`https://github.com/locustio/locust/releases/tag/${r}`,children:r})]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Links"}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://github.com/locustio/locust",children:"GitHub"})}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://docs.locust.io/en/stable",children:"Documentation"})}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://medium.com/locust-cloud",children:"Blog"})})]})]})]})}function ype(){return P.jsx(ng,{maxWidth:"xl",sx:{display:"flex",height:"var(--footer-height)",alignItems:"center",justifyContent:"flex-end"},children:P.jsx(mpe,{})})}const TH=e=>(Array.isArray(e)?e.length:Object.keys(e).length)===0;function xpe(e,t){return{...e,...t}}const Spe=e=>{const t=new URLSearchParams;for(const[r,n]of Object.entries(e))if(Array.isArray(n))for(const i of n)t.append(r,i);else t.append(r,n);return t},tS=(e,t)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:[...r[n]||[],i]}),e),qr={READY:"ready",RUNNING:"running",STOPPED:"stopped",SPAWNING:"spawning",CLEANUP:"cleanup",STOPPING:"stopping",MISSING:"missing"},ja=window.templateArgs?af(window.templateArgs):{};var xF;ja.isReport&&{...ja,charts:(xF=ja.history)==null||xF.reduce((e,{currentResponseTimePercentiles:t,...r})=>tS(e,{...t,...r}),{})};function bpe({isDistributed:e,state:t,host:r,totalRps:n,failRatio:i,userCount:a,workerCount:o}){return P.jsxs(Pt,{sx:{display:"flex",columnGap:2},children:[P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column"},children:[P.jsx(dt,{variant:"button",children:"Host"}),P.jsx(TG,{title:r,children:P.jsx(dt,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"400px"},children:r})})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column"},children:[P.jsx(dt,{variant:"button",children:"Status"}),P.jsx(dt,{variant:"button",children:t})]}),(t===qr.RUNNING||t===qr.SPAWNING)&&P.jsxs(P.Fragment,{children:[P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Users"}),P.jsx(dt,{noWrap:!0,variant:"button",children:a})]})]}),e&&P.jsxs(P.Fragment,{children:[P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Workers"}),P.jsx(dt,{noWrap:!0,variant:"button",children:o})]})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"RPS"}),P.jsx(dt,{noWrap:!0,variant:"button",children:n})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Failures"}),P.jsx(dt,{noWrap:!0,variant:"button",children:`${i}%`})]})]})}const _pe=({swarm:{isDistributed:e,state:t,host:r,workerCount:n},ui:{totalRps:i,failRatio:a,userCount:o}})=>({isDistributed:e,state:t,host:r,totalRps:i,failRatio:a,userCount:o,workerCount:n}),wpe=ai(_pe)(bpe);var qk={},Cpe=Xu;Object.defineProperty(qk,"__esModule",{value:!0});var rS=qk.default=void 0,Tpe=Cpe(qu()),Ape=P,Mpe=(0,Tpe.default)((0,Ape.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");rS=qk.default=Mpe;const kpe="input, select, textarea",Ipe=e=>e instanceof HTMLInputElement&&e.getAttribute("data-type")==="number"?Number(e.value):e instanceof HTMLInputElement&&e.type==="checkbox"?e.checked:e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions).map(t=>t.value):e.value;function AH({children:e,onSubmit:t,onChange:r}){const n=O.useCallback(async i=>{i.preventDefault();const o=[...i.target.querySelectorAll(kpe)].reduce((s,l)=>({...s,[l.name]:Ipe(l)}),{});t(o)},[t]);return P.jsx("form",{onChange:r,onSubmit:n,children:e})}function JE({defaultValue:e,...t}){const[r,n]=O.useState(e||""),i=a=>{t.onChange&&t.onChange(a),!((a.target.value.match(/\./g)||[]).length>1)&&n(a.target.value.replace(/[^0-9.]/g,""))};return O.useEffect(()=>{e&&n(e)},[e]),P.jsx(Xf,{...t,onChange:i,value:r})}function Ppe({extraOptions:e}){return P.jsxs(gk,{children:[P.jsx(yk,{expandIcon:P.jsx(rS,{}),children:P.jsx(dt,{children:"Custom parameters"})}),P.jsx(mk,{children:P.jsx(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:4},children:Object.entries(e).map(([t,r],n)=>O.createElement(gH,{...r,key:`valid-parameter-${n}`,label:r.helpText?`${wT(t)} (${r.helpText})`:wT(t),name:t}))})})]})}var Zk={},Dpe=Xu;Object.defineProperty(Zk,"__esModule",{value:!0});var MH=Zk.default=void 0,Rpe=Dpe(qu()),Lpe=P,Epe=(0,Rpe.default)((0,Lpe.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");MH=Zk.default=Epe;var kH=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(kH||{});function Ope(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}function Npe(e){return new RegExp("(^|:)//").test(e)}var zpe=e=>e.replace(/\/$/,""),Bpe=e=>e.replace(/^\//,"");function Fpe(e,t){if(!e)return t;if(!t)return e;if(Npe(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=zpe(e),t=Bpe(t),`${e}${r}${t}`}var eO=e=>[].concat(...e);function $pe(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}function Vpe(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var tO=Xa;function IH(e,t){if(e===t||!(tO(e)&&tO(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let i=r.length===n.length;const a=Array.isArray(t)?[]:{};for(const o of r)a[o]=IH(e[o],t[o]),i&&(i=e[o]===a[o]);return i?e:a}var rO=(...e)=>fetch(...e),Gpe=e=>e.status>=200&&e.status<=299,Hpe=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function nO(e){if(!Xa(e))return e;const t={...e};for(const[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Wpe({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:r=rO,paramsSerializer:n,isJsonContentType:i=Hpe,jsonContentType:a="application/json",jsonReplacer:o,timeout:s,responseHandler:l,validateStatus:u,...c}={}){return typeof fetch>"u"&&r===rO&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,h)=>{const{signal:p,getState:v,extra:g,endpoint:m,forced:y,type:x}=h;let S,{url:_,headers:b=new Headers(c.headers),params:w=void 0,responseHandler:C=l??"json",validateStatus:A=u??Gpe,timeout:T=s,...M}=typeof d=="string"?{url:d}:d,k={...c,signal:p,...M};b=new Headers(nO(b)),k.headers=await t(b,{getState:v,extra:g,endpoint:m,forced:y,type:x})||b;const I=W=>typeof W=="object"&&(Xa(W)||Array.isArray(W)||typeof W.toJSON=="function");if(!k.headers.has("content-type")&&I(k.body)&&k.headers.set("content-type",a),I(k.body)&&i(k.headers)&&(k.body=JSON.stringify(k.body,o)),w){const W=~_.indexOf("?")?"&":"?",F=n?n(w):new URLSearchParams(nO(w));_+=W+F}_=Fpe(e,_);const R=new Request(_,k);S={request:new Request(_,k)};let N,$=!1,z=T&&setTimeout(()=>{$=!0,h.abort()},T);try{N=await r(R)}catch(W){return{error:{status:$?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(W)},meta:S}}finally{z&&clearTimeout(z)}const V=N.clone();S.response=V;let E,G="";try{let W;if(await Promise.all([f(N,C).then(F=>E=F,F=>W=F),V.text().then(F=>G=F,()=>{})]),W)throw W}catch(W){return{error:{status:"PARSING_ERROR",originalStatus:N.status,data:G,error:String(W)},meta:S}}return A(N,E)?{data:E,meta:S}:{error:{status:N.status,data:E},meta:S}};async function f(d,h){if(typeof h=="function")return h(d);if(h==="content-type"&&(h=i(d.headers)?"json":"text"),h==="json"){const p=await d.text();return p.length?JSON.parse(p):null}return d.text()}}var iO=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Kk=un("__rtkq/focused"),PH=un("__rtkq/unfocused"),Qk=un("__rtkq/online"),DH=un("__rtkq/offline");function RH(e){return e.type==="query"}function jpe(e){return e.type==="mutation"}function Jk(e,t,r,n,i,a){return Upe(e)?e(t,r,n,i).map(YT).map(a):Array.isArray(e)?e.map(YT).map(a):[]}function Upe(e){return typeof e=="function"}function YT(e){return typeof e=="string"?{type:e}:e}function aO(e){return e!=null}function _f(e){let t=0;for(const r in e)t++;return t}function Ype(e,t){return e.catch(t)}var uv=Symbol("forceQueryFn"),XT=e=>typeof e[uv]=="function";function Xpe({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:i}){const a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:l,updateSubscriptionOptions:u}=n.internalActions;return{buildInitiateQuery:p,buildInitiateMutation:v,getRunningQueryThunk:c,getRunningMutationThunk:f,getRunningQueriesThunk:d,getRunningMutationsThunk:h};function c(g,m){return y=>{var _;const x=i.endpointDefinitions[g],S=e({queryArgs:m,endpointDefinition:x,endpointName:g});return(_=a.get(y))==null?void 0:_[S]}}function f(g,m){return y=>{var x;return(x=o.get(y))==null?void 0:x[m]}}function d(){return g=>Object.values(a.get(g)||{}).filter(aO)}function h(){return g=>Object.values(o.get(g)||{}).filter(aO)}function p(g,m){const y=(x,{subscribe:S=!0,forceRefetch:_,subscriptionOptions:b,[uv]:w,...C}={})=>(A,T)=>{var W;const M=e({queryArgs:x,endpointDefinition:m,endpointName:g}),k=t({...C,type:"query",subscribe:S,forceRefetch:_,subscriptionOptions:b,endpointName:g,originalArgs:x,queryCacheKey:M,[uv]:w}),I=n.endpoints[g].select(x),R=A(k),L=I(T()),{requestId:N,abort:$}=R,z=L.requestId!==N,V=(W=a.get(A))==null?void 0:W[M],E=()=>I(T()),G=Object.assign(w?R.then(E):z&&!V?Promise.resolve(L):Promise.all([V,R]).then(E),{arg:x,requestId:N,subscriptionOptions:b,queryCacheKey:M,abort:$,async unwrap(){const F=await G;if(F.isError)throw F.error;return F.data},refetch:()=>A(y(x,{subscribe:!1,forceRefetch:!0})),unsubscribe(){S&&A(s({queryCacheKey:M,requestId:N}))},updateSubscriptionOptions(F){G.subscriptionOptions=F,A(u({endpointName:g,requestId:N,queryCacheKey:M,options:F}))}});if(!V&&!z&&!w){const F=a.get(A)||{};F[M]=G,a.set(A,F),G.then(()=>{delete F[M],_f(F)||a.delete(A)})}return G};return y}function v(g){return(m,{track:y=!0,fixedCacheKey:x}={})=>(S,_)=>{const b=r({type:"mutation",endpointName:g,originalArgs:m,track:y,fixedCacheKey:x}),w=S(b),{requestId:C,abort:A,unwrap:T}=w,M=Ype(w.unwrap().then(L=>({data:L})),L=>({error:L})),k=()=>{S(l({requestId:C,fixedCacheKey:x}))},I=Object.assign(M,{arg:w.arg,requestId:C,abort:A,unwrap:T,reset:k}),R=o.get(S)||{};return o.set(S,R),R[C]=I,I.then(()=>{delete R[C],_f(R)||o.delete(S)}),x&&(R[x]=I,I.then(()=>{R[x]===I&&(delete R[x],_f(R)||o.delete(S))})),I}}}function oO(e){return e}function qpe({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:i,assertTagType:a}){const o=(y,x,S,_)=>(b,w)=>{const C=r[y],A=n({queryArgs:x,endpointDefinition:C,endpointName:y});if(b(i.internalActions.queryResultPatched({queryCacheKey:A,patches:S})),!_)return;const T=i.endpoints[y].select(x)(w()),M=Jk(C.providesTags,T.data,void 0,x,{},a);b(i.internalActions.updateProvidedBy({queryCacheKey:A,providedTags:M}))},s=(y,x,S,_=!0)=>(b,w)=>{const A=i.endpoints[y].select(x)(w());let T={patches:[],inversePatches:[],undo:()=>b(i.util.patchQueryData(y,x,T.inversePatches,_))};if(A.status==="uninitialized")return T;let M;if("data"in A)if(la(A.data)){const[k,I,R]=GV(A.data,S);T.patches.push(...I),T.inversePatches.push(...R),M=k}else M=S(A.data),T.patches.push({op:"replace",path:[],value:M}),T.inversePatches.push({op:"replace",path:[],value:A.data});return T.patches.length===0||b(i.util.patchQueryData(y,x,T.patches,_)),T},l=(y,x,S)=>_=>_(i.endpoints[y].initiate(x,{subscribe:!1,forceRefetch:!0,[uv]:()=>({data:S})})),u=async(y,{signal:x,abort:S,rejectWithValue:_,fulfillWithValue:b,dispatch:w,getState:C,extra:A})=>{const T=r[y.endpointName];try{let M=oO,k;const I={signal:x,abort:S,dispatch:w,getState:C,extra:A,endpoint:y.endpointName,type:y.type,forced:y.type==="query"?c(y,C()):void 0},R=y.type==="query"?y[uv]:void 0;if(R?k=R():T.query?(k=await t(T.query(y.originalArgs),I,T.extraOptions),T.transformResponse&&(M=T.transformResponse)):k=await T.queryFn(y.originalArgs,I,T.extraOptions,L=>t(L,I,T.extraOptions)),typeof process<"u",k.error)throw new iO(k.error,k.meta);return b(await M(k.data,k.meta,y.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:k.meta,[nf]:!0})}catch(M){let k=M;if(k instanceof iO){let I=oO;T.query&&T.transformErrorResponse&&(I=T.transformErrorResponse);try{return _(await I(k.value,k.meta,y.originalArgs),{baseQueryMeta:k.meta,[nf]:!0})}catch(R){k=R}}throw typeof process<"u",console.error(k),k}};function c(y,x){var C,A,T;const S=(A=(C=x[e])==null?void 0:C.queries)==null?void 0:A[y.queryCacheKey],_=(T=x[e])==null?void 0:T.config.refetchOnMountOrArgChange,b=S==null?void 0:S.fulfilledTimeStamp,w=y.forceRefetch??(y.subscribe&&_);return w?w===!0||(Number(new Date)-Number(b))/1e3>=w:!1}const f=FR(`${e}/executeQuery`,u,{getPendingMeta(){return{startedTimeStamp:Date.now(),[nf]:!0}},condition(y,{getState:x}){var T,M,k;const S=x(),_=(M=(T=S[e])==null?void 0:T.queries)==null?void 0:M[y.queryCacheKey],b=_==null?void 0:_.fulfilledTimeStamp,w=y.originalArgs,C=_==null?void 0:_.originalArgs,A=r[y.endpointName];return XT(y)?!0:(_==null?void 0:_.status)==="pending"?!1:c(y,S)||RH(A)&&((k=A==null?void 0:A.forceRefetch)!=null&&k.call(A,{currentArg:w,previousArg:C,endpointState:_,state:S}))?!0:!b},dispatchConditionRejection:!0}),d=FR(`${e}/executeMutation`,u,{getPendingMeta(){return{startedTimeStamp:Date.now(),[nf]:!0}}}),h=y=>"force"in y,p=y=>"ifOlderThan"in y,v=(y,x,S)=>(_,b)=>{const w=h(S)&&S.force,C=p(S)&&S.ifOlderThan,A=(M=!0)=>{const k={forceRefetch:M,isPrefetch:!0};return i.endpoints[y].initiate(x,k)},T=i.endpoints[y].select(x)(b());if(w)_(A());else if(C){const M=T==null?void 0:T.fulfilledTimeStamp;if(!M){_(A());return}(Number(new Date)-Number(new Date(M)))/1e3>=C&&_(A())}else _(A(!1))};function g(y){return x=>{var S,_;return((_=(S=x==null?void 0:x.meta)==null?void 0:S.arg)==null?void 0:_.endpointName)===y}}function m(y,x){return{matchPending:ap(FM(y),g(x)),matchFulfilled:ap(Hs(y),g(x)),matchRejected:ap(zf(y),g(x))}}return{queryThunk:f,mutationThunk:d,prefetch:v,updateQueryData:s,upsertQueryData:l,patchQueryData:o,buildMatchThunkActions:m}}function LH(e,t,r,n){return Jk(r[e.meta.arg.endpointName][t],Hs(e)?e.payload:void 0,ix(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function um(e,t,r){const n=e[t];n&&r(n)}function cv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function sO(e,t,r){const n=e[cv(t)];n&&r(n)}var Qd={};function Zpe({reducerPath:e,queryThunk:t,mutationThunk:r,context:{endpointDefinitions:n,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:o},assertTagType:s,config:l}){const u=un(`${e}/resetApiState`),c=Si({name:`${e}/queries`,initialState:Qd,reducers:{removeQueryResult:{reducer(x,{payload:{queryCacheKey:S}}){delete x[S]},prepare:Gd()},queryResultPatched:{reducer(x,{payload:{queryCacheKey:S,patches:_}}){um(x,S,b=>{b.data=LR(b.data,_.concat())})},prepare:Gd()}},extraReducers(x){x.addCase(t.pending,(S,{meta:_,meta:{arg:b}})=>{var C;const w=XT(b);S[C=b.queryCacheKey]??(S[C]={status:"uninitialized",endpointName:b.endpointName}),um(S,b.queryCacheKey,A=>{A.status="pending",A.requestId=w&&A.requestId?A.requestId:_.requestId,b.originalArgs!==void 0&&(A.originalArgs=b.originalArgs),A.startedTimeStamp=_.startedTimeStamp})}).addCase(t.fulfilled,(S,{meta:_,payload:b})=>{um(S,_.arg.queryCacheKey,w=>{if(w.requestId!==_.requestId&&!XT(_.arg))return;const{merge:C}=n[_.arg.endpointName];if(w.status="fulfilled",C)if(w.data!==void 0){const{fulfilledTimeStamp:A,arg:T,baseQueryMeta:M,requestId:k}=_;let I=Yv(w.data,R=>C(R,b,{arg:T.originalArgs,baseQueryMeta:M,fulfilledTimeStamp:A,requestId:k}));w.data=I}else w.data=b;else w.data=n[_.arg.endpointName].structuralSharing??!0?IH(sa(w.data)?xZ(w.data):w.data,b):b;delete w.error,w.fulfilledTimeStamp=_.fulfilledTimeStamp})}).addCase(t.rejected,(S,{meta:{condition:_,arg:b,requestId:w},error:C,payload:A})=>{um(S,b.queryCacheKey,T=>{if(!_){if(T.requestId!==w)return;T.status="rejected",T.error=A??C}})}).addMatcher(o,(S,_)=>{const{queries:b}=a(_);for(const[w,C]of Object.entries(b))((C==null?void 0:C.status)==="fulfilled"||(C==null?void 0:C.status)==="rejected")&&(S[w]=C)})}}),f=Si({name:`${e}/mutations`,initialState:Qd,reducers:{removeMutationResult:{reducer(x,{payload:S}){const _=cv(S);_ in x&&delete x[_]},prepare:Gd()}},extraReducers(x){x.addCase(r.pending,(S,{meta:_,meta:{requestId:b,arg:w,startedTimeStamp:C}})=>{w.track&&(S[cv(_)]={requestId:b,status:"pending",endpointName:w.endpointName,startedTimeStamp:C})}).addCase(r.fulfilled,(S,{payload:_,meta:b})=>{b.arg.track&&sO(S,b,w=>{w.requestId===b.requestId&&(w.status="fulfilled",w.data=_,w.fulfilledTimeStamp=b.fulfilledTimeStamp)})}).addCase(r.rejected,(S,{payload:_,error:b,meta:w})=>{w.arg.track&&sO(S,w,C=>{C.requestId===w.requestId&&(C.status="rejected",C.error=_??b)})}).addMatcher(o,(S,_)=>{const{mutations:b}=a(_);for(const[w,C]of Object.entries(b))((C==null?void 0:C.status)==="fulfilled"||(C==null?void 0:C.status)==="rejected")&&w!==(C==null?void 0:C.requestId)&&(S[w]=C)})}}),d=Si({name:`${e}/invalidation`,initialState:Qd,reducers:{updateProvidedBy:{reducer(x,S){var w,C;const{queryCacheKey:_,providedTags:b}=S.payload;for(const A of Object.values(x))for(const T of Object.values(A)){const M=T.indexOf(_);M!==-1&&T.splice(M,1)}for(const{type:A,id:T}of b){const M=(w=x[A]??(x[A]={}))[C=T||"__internal_without_id"]??(w[C]=[]);M.includes(_)||M.push(_)}},prepare:Gd()}},extraReducers(x){x.addCase(c.actions.removeQueryResult,(S,{payload:{queryCacheKey:_}})=>{for(const b of Object.values(S))for(const w of Object.values(b)){const C=w.indexOf(_);C!==-1&&w.splice(C,1)}}).addMatcher(o,(S,_)=>{var w,C;const{provided:b}=a(_);for(const[A,T]of Object.entries(b))for(const[M,k]of Object.entries(T)){const I=(w=S[A]??(S[A]={}))[C=M||"__internal_without_id"]??(w[C]=[]);for(const R of k)I.includes(R)||I.push(R)}}).addMatcher(Ro(Hs(t),ix(t)),(S,_)=>{const b=LH(_,"providesTags",n,s),{queryCacheKey:w}=_.meta.arg;d.caseReducers.updateProvidedBy(S,d.actions.updateProvidedBy({queryCacheKey:w,providedTags:b}))})}}),h=Si({name:`${e}/subscriptions`,initialState:Qd,reducers:{updateSubscriptionOptions(x,S){},unsubscribeQueryResult(x,S){},internal_getRTKQSubscriptions(){}}}),p=Si({name:`${e}/internalSubscriptions`,initialState:Qd,reducers:{subscriptionsUpdated:{reducer(x,S){return LR(x,S.payload)},prepare:Gd()}}}),v=Si({name:`${e}/config`,initialState:{online:$pe(),focused:Vpe(),middlewareRegistered:!1,...l},reducers:{middlewareRegistered(x,{payload:S}){x.middlewareRegistered=x.middlewareRegistered==="conflict"||i!==S?"conflict":!0}},extraReducers:x=>{x.addCase(Qk,S=>{S.online=!0}).addCase(DH,S=>{S.online=!1}).addCase(Kk,S=>{S.focused=!0}).addCase(PH,S=>{S.focused=!1}).addMatcher(o,S=>({...S}))}}),g=tx({queries:c.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:p.reducer,config:v.reducer}),m=(x,S)=>g(u.match(S)?void 0:x,S),y={...v.actions,...c.actions,...h.actions,...p.actions,...f.actions,...d.actions,resetApiState:u};return{reducer:m,actions:y}}var nu=Symbol.for("RTKQ/skipToken"),EH={status:"uninitialized"},lO=Yv(EH,()=>{}),uO=Yv(EH,()=>{});function Kpe({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=f=>lO,i=f=>uO;return{buildQuerySelector:s,buildMutationSelector:l,selectInvalidatedBy:u,selectCachedArgsForQuery:c};function a(f){return{...f,...Ope(f.status)}}function o(f){return f[t]}function s(f,d){return h=>{const p=e({queryArgs:h,endpointDefinition:d,endpointName:f});return r(h===nu?n:m=>{var y,x;return((x=(y=o(m))==null?void 0:y.queries)==null?void 0:x[p])??lO},a)}}function l(){return f=>{let d;return typeof f=="object"?d=cv(f)??nu:d=f,r(d===nu?i:v=>{var g,m;return((m=(g=o(v))==null?void 0:g.mutations)==null?void 0:m[d])??uO},a)}}function u(f,d){const h=f[t],p=new Set;for(const v of d.map(YT)){const g=h.provided[v.type];if(!g)continue;let m=(v.id!==void 0?g[v.id]:eO(Object.values(g)))??[];for(const y of m)p.add(y)}return eO(Array.from(p.values()).map(v=>{const g=h.queries[v];return g?[{queryCacheKey:v,endpointName:g.endpointName,originalArgs:g.originalArgs}]:[]}))}function c(f,d){return Object.values(f[t].queries).filter(h=>(h==null?void 0:h.endpointName)===d&&h.status!=="uninitialized").map(h=>h.originalArgs)}}var pc=WeakMap?new WeakMap:void 0,cO=({endpointName:e,queryArgs:t})=>{let r="";const n=pc==null?void 0:pc.get(t);if(typeof n=="string")r=n;else{const i=JSON.stringify(t,(a,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=Xa(o)?Object.keys(o).sort().reduce((s,l)=>(s[l]=o[l],s),{}):o,o));Xa(t)&&(pc==null||pc.set(t,i)),r=i}return`${e}(${r})`};function Qpe(...e){return function(r){const n=ev(u=>{var c;return(c=r.extractRehydrationInfo)==null?void 0:c.call(r,u,{reducerPath:r.reducerPath??"api"})}),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(u){let c=cO;if("serializeQueryArgs"in u.endpointDefinition){const f=u.endpointDefinition.serializeQueryArgs;c=d=>{const h=f(d);return typeof h=="string"?h:cO({...d,queryArgs:h})}}else r.serializeQueryArgs&&(c=r.serializeQueryArgs);return c(u)},tagTypes:[...r.tagTypes||[]]},a={endpointDefinitions:{},batch(u){u()},apiUid:BM(),extractRehydrationInfo:n,hasRehydrationInfo:ev(u=>n(u)!=null)},o={injectEndpoints:l,enhanceEndpoints({addTagTypes:u,endpoints:c}){if(u)for(const f of u)i.tagTypes.includes(f)||i.tagTypes.push(f);if(c)for(const[f,d]of Object.entries(c))typeof d=="function"?d(a.endpointDefinitions[f]):Object.assign(a.endpointDefinitions[f]||{},d);return o}},s=e.map(u=>u.init(o,i,a));function l(u){const c=u.endpoints({query:f=>({...f,type:"query"}),mutation:f=>({...f,type:"mutation"})});for(const[f,d]of Object.entries(c)){if(u.overrideExisting!==!0&&f in a.endpointDefinitions){if(u.overrideExisting==="throw")throw new Error(Zr(39));typeof process<"u";continue}a.endpointDefinitions[f]=d;for(const h of s)h.injectEndpoint(f,d)}return o}return o.injectEndpoints({endpoints:r.endpoints})}}function Jpe(e){for(let t in e)return!1;return!0}var eve=2147483647/1e3-1,tve=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:i})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions,s=Ro(o.match,r.fulfilled,r.rejected);function l(d){const h=i.currentSubscriptions[d];return!!h&&!Jpe(h)}const u={},c=(d,h,p)=>{var v;if(s(d)){const g=h.getState()[e],{queryCacheKey:m}=o.match(d)?d.payload:d.meta.arg;f(m,(v=g.queries[m])==null?void 0:v.endpointName,h,g.config)}if(t.util.resetApiState.match(d))for(const[g,m]of Object.entries(u))m&&clearTimeout(m),delete u[g];if(n.hasRehydrationInfo(d)){const g=h.getState()[e],{queries:m}=n.extractRehydrationInfo(d);for(const[y,x]of Object.entries(m))f(y,x==null?void 0:x.endpointName,h,g.config)}};function f(d,h,p,v){const g=n.endpointDefinitions[h],m=(g==null?void 0:g.keepUnusedDataFor)??v.keepUnusedDataFor;if(m===1/0)return;const y=Math.max(0,Math.min(m,eve));if(!l(d)){const x=u[d];x&&clearTimeout(x),u[d]=setTimeout(()=>{l(d)||p.dispatch(a({queryCacheKey:d})),delete u[d]},y*1e3)}}return c},rve=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:i,api:a,assertTagType:o,refetchQuery:s,internalState:l})=>{const{removeQueryResult:u}=a.internalActions,c=Ro(Hs(n),ix(n)),f=Ro(Hs(n,i),zf(n,i));let d=[];const h=(g,m)=>{c(g)?v(LH(g,"invalidatesTags",r,o),m):f(g)?v([],m):a.util.invalidateTags.match(g)&&v(Jk(g.payload,void 0,void 0,void 0,void 0,o),m)};function p(g){var m,y;for(const x in g.queries)if(((m=g.queries[x])==null?void 0:m.status)==="pending")return!0;for(const x in g.mutations)if(((y=g.mutations[x])==null?void 0:y.status)==="pending")return!0;return!1}function v(g,m){const y=m.getState(),x=y[e];if(d.push(...g),x.config.invalidationBehavior==="delayed"&&p(x))return;const S=d;if(d=[],S.length===0)return;const _=a.util.selectInvalidatedBy(y,S);t.batch(()=>{const b=Array.from(_.values());for(const{queryCacheKey:w}of b){const C=x.queries[w],A=l.currentSubscriptions[w]??{};C&&(_f(A)===0?m.dispatch(u({queryCacheKey:w})):C.status!=="uninitialized"&&m.dispatch(s(C,w)))}})}return h},nve=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:i})=>{const a={},o=(d,h)=>{(r.internalActions.updateSubscriptionOptions.match(d)||r.internalActions.unsubscribeQueryResult.match(d))&&l(d.payload,h),(t.pending.match(d)||t.rejected.match(d)&&d.meta.condition)&&l(d.meta.arg,h),(t.fulfilled.match(d)||t.rejected.match(d)&&!d.meta.condition)&&s(d.meta.arg,h),r.util.resetApiState.match(d)&&c()};function s({queryCacheKey:d},h){const p=h.getState()[e],v=p.queries[d],g=i.currentSubscriptions[d];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:m,skipPollingIfUnfocused:y}=f(g);if(!Number.isFinite(m))return;const x=a[d];x!=null&&x.timeout&&(clearTimeout(x.timeout),x.timeout=void 0);const S=Date.now()+m;a[d]={nextPollTimestamp:S,pollingInterval:m,timeout:setTimeout(()=>{(p.config.focused||!y)&&h.dispatch(n(v,d)),s({queryCacheKey:d},h)},m)}}function l({queryCacheKey:d},h){const v=h.getState()[e].queries[d],g=i.currentSubscriptions[d];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:m}=f(g);if(!Number.isFinite(m)){u(d);return}const y=a[d],x=Date.now()+m;(!y||x<y.nextPollTimestamp)&&s({queryCacheKey:d},h)}function u(d){const h=a[d];h!=null&&h.timeout&&clearTimeout(h.timeout),delete a[d]}function c(){for(const d of Object.keys(a))u(d)}function f(d={}){let h=!1,p=Number.POSITIVE_INFINITY;for(let v in d)d[v].pollingInterval&&(p=Math.min(d[v].pollingInterval,p),h=d[v].skipPollingIfUnfocused||h);return{lowestPollingInterval:p,skipPollingIfUnfocused:h}}return o},ive=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:i})=>{const{removeQueryResult:a}=r.internalActions,o=(l,u)=>{Kk.match(l)&&s(u,"refetchOnFocus"),Qk.match(l)&&s(u,"refetchOnReconnect")};function s(l,u){const c=l.getState()[e],f=c.queries,d=i.currentSubscriptions;t.batch(()=>{for(const h of Object.keys(d)){const p=f[h],v=d[h];if(!v||!p)continue;(Object.values(v).some(m=>m[u]===!0)||Object.values(v).every(m=>m[u]===void 0)&&c.config[u])&&(_f(v)===0?l.dispatch(a({queryCacheKey:h})):p.status!=="uninitialized"&&l.dispatch(n(p,h)))}})}return o},fO=new Error("Promise never resolved before cacheEntryRemoved."),ave=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:i,internalState:a})=>{const o=ST(n),s=ST(i),l=Hs(n,i),u={},c=(h,p,v)=>{const g=f(h);if(n.pending.match(h)){const m=v[t].queries[g],y=p.getState()[t].queries[g];!m&&y&&d(h.meta.arg.endpointName,h.meta.arg.originalArgs,g,p,h.meta.requestId)}else if(i.pending.match(h))p.getState()[t].mutations[g]&&d(h.meta.arg.endpointName,h.meta.arg.originalArgs,g,p,h.meta.requestId);else if(l(h)){const m=u[g];m!=null&&m.valueResolved&&(m.valueResolved({data:h.payload,meta:h.meta.baseQueryMeta}),delete m.valueResolved)}else if(e.internalActions.removeQueryResult.match(h)||e.internalActions.removeMutationResult.match(h)){const m=u[g];m&&(delete u[g],m.cacheEntryRemoved())}else if(e.util.resetApiState.match(h))for(const[m,y]of Object.entries(u))delete u[m],y.cacheEntryRemoved()};function f(h){return o(h)?h.meta.arg.queryCacheKey:s(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:e.internalActions.removeQueryResult.match(h)?h.payload.queryCacheKey:e.internalActions.removeMutationResult.match(h)?cv(h.payload):""}function d(h,p,v,g,m){const y=r.endpointDefinitions[h],x=y==null?void 0:y.onCacheEntryAdded;if(!x)return;let S={};const _=new Promise(M=>{S.cacheEntryRemoved=M}),b=Promise.race([new Promise(M=>{S.valueResolved=M}),_.then(()=>{throw fO})]);b.catch(()=>{}),u[v]=S;const w=e.endpoints[h].select(y.type==="query"?p:v),C=g.dispatch((M,k,I)=>I),A={...g,getCacheEntry:()=>w(g.getState()),requestId:m,extra:C,updateCachedData:y.type==="query"?M=>g.dispatch(e.util.updateQueryData(h,p,M)):void 0,cacheDataLoaded:b,cacheEntryRemoved:_},T=x(p,A);Promise.resolve(T).catch(M=>{if(M!==fO)throw M})}return c},ove=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const i=FM(r,n),a=zf(r,n),o=Hs(r,n),s={};return(u,c)=>{var f,d;if(i(u)){const{requestId:h,arg:{endpointName:p,originalArgs:v}}=u.meta,g=t.endpointDefinitions[p],m=g==null?void 0:g.onQueryStarted;if(m){const y={},x=new Promise((w,C)=>{y.resolve=w,y.reject=C});x.catch(()=>{}),s[h]=y;const S=e.endpoints[p].select(g.type==="query"?v:h),_=c.dispatch((w,C,A)=>A),b={...c,getCacheEntry:()=>S(c.getState()),requestId:h,extra:_,updateCachedData:g.type==="query"?w=>c.dispatch(e.util.updateQueryData(p,v,w)):void 0,queryFulfilled:x};m(v,b)}}else if(o(u)){const{requestId:h,baseQueryMeta:p}=u.meta;(f=s[h])==null||f.resolve({data:u.payload,meta:p}),delete s[h]}else if(a(u)){const{requestId:h,rejectedWithValue:p,baseQueryMeta:v}=u.meta;(d=s[h])==null||d.reject({error:u.payload??u.error,isUnhandledError:!p,meta:v}),delete s[h]}}},sve=({api:e,context:{apiUid:t},reducerPath:r})=>(n,i)=>{e.util.resetApiState.match(n)&&i.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},lve=({api:e,queryThunk:t,internalState:r})=>{const n=`${e.reducerPath}/subscriptions`;let i=null,a=null;const{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions,l=(h,p)=>{var g,m,y;if(o.match(p)){const{queryCacheKey:x,requestId:S,options:_}=p.payload;return(g=h==null?void 0:h[x])!=null&&g[S]&&(h[x][S]=_),!0}if(s.match(p)){const{queryCacheKey:x,requestId:S}=p.payload;return h[x]&&delete h[x][S],!0}if(e.internalActions.removeQueryResult.match(p))return delete h[p.payload.queryCacheKey],!0;if(t.pending.match(p)){const{meta:{arg:x,requestId:S}}=p,_=h[m=x.queryCacheKey]??(h[m]={});return _[`${S}_running`]={},x.subscribe&&(_[S]=x.subscriptionOptions??_[S]??{}),!0}let v=!1;if(t.fulfilled.match(p)||t.rejected.match(p)){const x=h[p.meta.arg.queryCacheKey]||{},S=`${p.meta.requestId}_running`;v||(v=!!x[S]),delete x[S]}if(t.rejected.match(p)){const{meta:{condition:x,arg:S,requestId:_}}=p;if(x&&S.subscribe){const b=h[y=S.queryCacheKey]??(h[y]={});b[_]=S.subscriptionOptions??b[_]??{},v=!0}}return v},u=()=>r.currentSubscriptions,d={getSubscriptions:u,getSubscriptionCount:h=>{const v=u()[h]??{};return _f(v)},isRequestSubscribed:(h,p)=>{var g;const v=u();return!!((g=v==null?void 0:v[h])!=null&&g[p])}};return(h,p)=>{if(i||(i=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(h))return i=r.currentSubscriptions={},a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(h))return[!1,d];const v=l(r.currentSubscriptions,h);let g=!0;if(v){a||(a=setTimeout(()=>{const x=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,S]=GV(i,()=>x);p.next(e.internalActions.subscriptionsUpdated(S)),i=x,a=null},500));const m=typeof h.type=="string"&&!!h.type.startsWith(n),y=t.rejected.match(h)&&h.meta.condition&&!!h.meta.arg.subscribe;g=!m&&!y}return[g,!1]}};function uve(e){const{reducerPath:t,queryThunk:r,api:n,context:i}=e,{apiUid:a}=i,o={invalidateTags:un(`${t}/invalidateTags`)},s=f=>f.type.startsWith(`${t}/`),l=[sve,tve,rve,nve,ave,ove];return{middleware:f=>{let d=!1;const p={...e,internalState:{currentSubscriptions:{}},refetchQuery:c,isThisApiSliceAction:s},v=l.map(y=>y(p)),g=lve(p),m=ive(p);return y=>x=>{if(!OV(x))return y(x);d||(d=!0,f.dispatch(n.internalActions.middlewareRegistered(a)));const S={...f,next:y},_=f.getState(),[b,w]=g(x,S,_);let C;if(b?C=y(x):C=w,f.getState()[t]&&(m(x,S,_),s(x)||i.hasRehydrationInfo(x)))for(let A of v)A(x,S,_);return C}},actions:o};function c(f,d,h={}){return r({type:"query",endpointName:f.endpointName,originalArgs:f.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:d,...h})}}function Zo(e,...t){return Object.assign(e,...t)}var dO=Symbol(),cve=({createSelector:e=zM}={})=>({name:dO,init(t,{baseQuery:r,tagTypes:n,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:u,invalidationBehavior:c},f){kZ();const d=z=>(typeof process<"u",z);Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:Qk,onOffline:DH,onFocus:Kk,onFocusLost:PH},util:{}});const{queryThunk:h,mutationThunk:p,patchQueryData:v,updateQueryData:g,upsertQueryData:m,prefetch:y,buildMatchThunkActions:x}=qpe({baseQuery:r,reducerPath:i,context:f,api:t,serializeQueryArgs:a,assertTagType:d}),{reducer:S,actions:_}=Zpe({context:f,queryThunk:h,mutationThunk:p,reducerPath:i,assertTagType:d,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:i,invalidationBehavior:c}});Zo(t.util,{patchQueryData:v,updateQueryData:g,upsertQueryData:m,prefetch:y,resetApiState:_.resetApiState}),Zo(t.internalActions,_);const{middleware:b,actions:w}=uve({reducerPath:i,context:f,queryThunk:h,mutationThunk:p,api:t,assertTagType:d});Zo(t.util,w),Zo(t,{reducer:S,middleware:b});const{buildQuerySelector:C,buildMutationSelector:A,selectInvalidatedBy:T,selectCachedArgsForQuery:M}=Kpe({serializeQueryArgs:a,reducerPath:i,createSelector:e});Zo(t.util,{selectInvalidatedBy:T,selectCachedArgsForQuery:M});const{buildInitiateQuery:k,buildInitiateMutation:I,getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueriesThunk:N,getRunningQueryThunk:$}=Xpe({queryThunk:h,mutationThunk:p,api:t,serializeQueryArgs:a,context:f});return Zo(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueryThunk:$,getRunningQueriesThunk:N}),{name:dO,injectEndpoint(z,V){var G;const E=t;(G=E.endpoints)[z]??(G[z]={}),RH(V)?Zo(E.endpoints[z],{name:z,select:C(z,V),initiate:k(z,V)},x(h,z)):jpe(V)&&Zo(E.endpoints[z],{name:z,select:A(),initiate:I(z)},x(p,z))}}}});function fve(e){return e.type==="query"}function dve(e){return e.type==="mutation"}function cm(e,...t){return Object.assign(e,...t)}function qb(e){return e.replace(e[0],e[0].toUpperCase())}var vc=WeakMap?new WeakMap:void 0,hve=({endpointName:e,queryArgs:t})=>{let r="";const n=vc==null?void 0:vc.get(t);if(typeof n=="string")r=n;else{const i=JSON.stringify(t,(a,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=Xa(o)?Object.keys(o).sort().reduce((s,l)=>(s[l]=o[l],s),{}):o,o));Xa(t)&&(vc==null||vc.set(t,i)),r=i}return`${e}(${r})`},Zb=Symbol();function hO(e,t,r,n){const i=O.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:r,endpointName:n}):e}),[e,t,r,n]),a=O.useRef(i);return O.useEffect(()=>{a.current.serialized!==i.serialized&&(a.current=i)},[i]),a.current.serialized===i.serialized?a.current.queryArgs:e}function Kb(e){const t=O.useRef(e);return O.useEffect(()=>{Ns(t.current,e)||(t.current=e)},[e]),Ns(t.current,e)?t.current:e}var pve=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vve=pve(),gve=()=>typeof navigator<"u"&&navigator.product==="ReactNative",mve=gve(),yve=()=>vve||mve?O.useLayoutEffect:O.useEffect,xve=yve(),Sve=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:kH.pending}:e;function bve({api:e,moduleOptions:{batch:t,hooks:{useDispatch:r,useSelector:n,useStore:i},unstable__sideEffectsInRender:a,createSelector:o},serializeQueryArgs:s,context:l}){const u=a?p=>p():O.useEffect;return{buildQueryHooks:d,buildMutationHook:h,usePrefetch:f};function c(p,v,g){if(v!=null&&v.endpointName&&p.isUninitialized){const{endpointName:b}=v,w=l.endpointDefinitions[b];s({queryArgs:v.originalArgs,endpointDefinition:w,endpointName:b})===s({queryArgs:g,endpointDefinition:w,endpointName:b})&&(v=void 0)}let m=p.isSuccess?p.data:v==null?void 0:v.data;m===void 0&&(m=p.data);const y=m!==void 0,x=p.isLoading,S=(!v||v.isLoading||v.isUninitialized)&&!y&&x,_=p.isSuccess||x&&y;return{...p,data:m,currentData:p.data,isFetching:x,isLoading:S,isSuccess:_}}function f(p,v){const g=r(),m=Kb(v);return O.useCallback((y,x)=>g(e.util.prefetch(p,y,{...m,...x})),[p,g,m])}function d(p){const v=(y,{refetchOnReconnect:x,refetchOnFocus:S,refetchOnMountOrArgChange:_,skip:b=!1,pollingInterval:w=0,skipPollingIfUnfocused:C=!1}={})=>{const{initiate:A}=e.endpoints[p],T=r(),M=O.useRef(void 0);if(!M.current){const E=T(e.internalActions.internal_getRTKQSubscriptions());M.current=E}const k=hO(b?nu:y,hve,l.endpointDefinitions[p],p),I=Kb({refetchOnReconnect:x,refetchOnFocus:S,pollingInterval:w,skipPollingIfUnfocused:C}),R=O.useRef(!1),L=O.useRef(void 0);let{queryCacheKey:N,requestId:$}=L.current||{},z=!1;N&&$&&(z=M.current.isRequestSubscribed(N,$));const V=!z&&R.current;return u(()=>{R.current=z}),u(()=>{V&&(L.current=void 0)},[V]),u(()=>{var W;const E=L.current;if(typeof process<"u",k===nu){E==null||E.unsubscribe(),L.current=void 0;return}const G=(W=L.current)==null?void 0:W.subscriptionOptions;if(!E||E.arg!==k){E==null||E.unsubscribe();const F=T(A(k,{subscriptionOptions:I,forceRefetch:_}));L.current=F}else I!==G&&E.updateSubscriptionOptions(I)},[T,A,_,k,I,V]),O.useEffect(()=>()=>{var E;(E=L.current)==null||E.unsubscribe(),L.current=void 0},[]),O.useMemo(()=>({refetch:()=>{var E;if(!L.current)throw new Error(Zr(38));return(E=L.current)==null?void 0:E.refetch()}}),[])},g=({refetchOnReconnect:y,refetchOnFocus:x,pollingInterval:S=0,skipPollingIfUnfocused:_=!1}={})=>{const{initiate:b}=e.endpoints[p],w=r(),[C,A]=O.useState(Zb),T=O.useRef(void 0),M=Kb({refetchOnReconnect:y,refetchOnFocus:x,pollingInterval:S,skipPollingIfUnfocused:_});u(()=>{var L,N;const R=(L=T.current)==null?void 0:L.subscriptionOptions;M!==R&&((N=T.current)==null||N.updateSubscriptionOptions(M))},[M]);const k=O.useRef(M);u(()=>{k.current=M},[M]);const I=O.useCallback(function(R,L=!1){let N;return t(()=>{var $;($=T.current)==null||$.unsubscribe(),T.current=N=w(b(R,{subscriptionOptions:k.current,forceRefetch:!L})),A(R)}),N},[w,b]);return O.useEffect(()=>()=>{var R;(R=T==null?void 0:T.current)==null||R.unsubscribe()},[]),O.useEffect(()=>{C!==Zb&&!T.current&&I(C,!0)},[C,I]),O.useMemo(()=>[I,C],[I,C])},m=(y,{skip:x=!1,selectFromResult:S}={})=>{const{select:_}=e.endpoints[p],b=hO(x?nu:y,s,l.endpointDefinitions[p],p),w=O.useRef(void 0),C=O.useMemo(()=>o([_(b),(I,R)=>R,I=>b],c,{memoizeOptions:{resultEqualityCheck:Ns}}),[_,b]),A=O.useMemo(()=>S?o([C],S,{devModeChecks:{identityFunctionCheck:"never"}}):C,[C,S]),T=n(I=>A(I,w.current),Ns),M=i(),k=C(M.getState(),w.current);return xve(()=>{w.current=k},[k]),T};return{useQueryState:m,useQuerySubscription:v,useLazyQuerySubscription:g,useLazyQuery(y){const[x,S]=g(y),_=m(S,{...y,skip:S===Zb}),b=O.useMemo(()=>({lastArg:S}),[S]);return O.useMemo(()=>[x,_,b],[x,_,b])},useQuery(y,x){const S=v(y,x),_=m(y,{selectFromResult:y===nu||x!=null&&x.skip?void 0:Sve,...x}),{data:b,status:w,isLoading:C,isSuccess:A,isError:T,error:M}=_;return O.useDebugValue({data:b,status:w,isLoading:C,isSuccess:A,isError:T,error:M}),O.useMemo(()=>({..._,...S}),[_,S])}}}function h(p){return({selectFromResult:v,fixedCacheKey:g}={})=>{const{select:m,initiate:y}=e.endpoints[p],x=r(),[S,_]=O.useState();O.useEffect(()=>()=>{S!=null&&S.arg.fixedCacheKey||S==null||S.reset()},[S]);const b=O.useCallback(function(G){const W=x(y(G,{fixedCacheKey:g}));return _(W),W},[x,y,g]),{requestId:w}=S||{},C=O.useMemo(()=>m({fixedCacheKey:g,requestId:S==null?void 0:S.requestId}),[g,S,m]),A=O.useMemo(()=>v?o([C],v):C,[v,C]),T=n(A,Ns),M=g==null?S==null?void 0:S.arg.originalArgs:void 0,k=O.useCallback(()=>{t(()=>{S&&_(void 0),g&&x(e.internalActions.removeMutationResult({requestId:w,fixedCacheKey:g}))})},[x,g,S,w]),{endpointName:I,data:R,status:L,isLoading:N,isSuccess:$,isError:z,error:V}=T;O.useDebugValue({endpointName:I,data:R,status:L,isLoading:N,isSuccess:$,isError:z,error:V});const E=O.useMemo(()=>({...T,originalArgs:M,reset:k}),[T,M,k]);return O.useMemo(()=>[b,E],[b,E])}}}var _ve=Symbol(),wve=({batch:e=mQ,hooks:t={useDispatch:c6,useSelector:t6,useStore:u6},createSelector:r=zM,unstable__sideEffectsInRender:n=!1,...i}={})=>({name:_ve,init(a,{serializeQueryArgs:o},s){const l=a,{buildQueryHooks:u,buildMutationHook:c,usePrefetch:f}=bve({api:a,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:n,createSelector:r},serializeQueryArgs:o,context:s});return cm(l,{usePrefetch:f}),cm(s,{batch:e}),{injectEndpoint(d,h){if(fve(h)){const{useQuery:p,useLazyQuery:v,useLazyQuerySubscription:g,useQueryState:m,useQuerySubscription:y}=u(d);cm(l.endpoints[d],{useQuery:p,useLazyQuery:v,useLazyQuerySubscription:g,useQueryState:m,useQuerySubscription:y}),a[`use${qb(d)}Query`]=p,a[`useLazy${qb(d)}Query`]=v}else if(dve(h)){const p=c(d);cm(l.endpoints[d],{useMutation:p}),a[`use${qb(d)}Mutation`]=p}}}}}),Cve=Qpe(cve(),wve());const $0=Cve({baseQuery:Wpe(),endpoints:e=>({getStats:e.query({query:()=>"stats/requests",transformResponse:af}),getTasks:e.query({query:()=>"tasks",transformResponse:af}),getExceptions:e.query({query:()=>"exceptions",transformResponse:af}),getLogs:e.query({query:()=>"logs",transformResponse:af}),startSwarm:e.mutation({query:t=>({url:"swarm",method:"POST",body:Spe(qR(t)),headers:{"content-type":"application/x-www-form-urlencoded"}})}),updateUserSettings:e.mutation({query:t=>({url:"user",method:"POST",body:qR(t)})})})}),{useGetStatsQuery:Tve,useGetTasksQuery:Ave,useGetExceptionsQuery:Mve,useGetLogsQuery:kve,useStartSwarmMutation:Ive,useUpdateUserSettingsMutation:Pve}=$0;function og(e,{payload:t}){return xpe(e,t)}const Dve=ja,OH=Si({name:"swarm",initialState:Dve,reducers:{setSwarm:og}}),eI=OH.actions,Rve=OH.reducer;function Lve({availableTasks:e,userToEdit:t,handleEditUser:r}){const{tasks:n,...i}=t.userClass;return P.jsx(AH,{onSubmit:r,children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:4,my:2},children:[P.jsx(dt,{children:`${t.userClassName} Settings`}),P.jsx(Lk,{defaultValue:n,label:"Tasks",multiple:!0,name:"tasks",options:e}),Object.entries(i).map(([a,o])=>P.jsx(Xf,{defaultValue:o,inputProps:{"data-type":typeof o=="number"?"number":"text"},label:wT(a),name:a},`user-to-edit-${a}`)),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:"Save"})]})})}function Eve({availableUserClasses:e,availableUserTasks:t,selectedUserClasses:r,setSelectedUserClasses:n,setSwarm:i,users:a}){const[o,s]=O.useState(!1),[l,u]=O.useState(),[c]=Pve(),f=g=>{l&&(i({users:{...a,[l.userClassName]:g}}),c({...g,userClassName:l.userClassName}),s(!1))},d=g=>()=>r.includes(g)?n(r.filter(m=>m!==g)):n(r.concat(g)),h=r.length,p=e.length,v=g=>g.target.checked?n(e):n([]);return P.jsxs(P.Fragment,{children:[P.jsx(Pt,{sx:{position:"relative",border:"1px",borderColor:"divider",borderStyle:"solid",padding:2,borderRadius:1},children:P.jsxs(Pt,{sx:{maxHeight:"30vh",overflow:"auto"},children:[P.jsx(Xx,{shrink:!0,sx:{position:"absolute",backgroundColor:"background.paper",width:"fit-content",top:"0",marginTop:"-5px",padding:"0 5px"},children:"User Classes"}),P.jsx(gG,{children:P.jsx(IG,{component:rl,children:P.jsxs(MG,{children:[P.jsx(PG,{children:P.jsx(O0,{children:P.jsx(Yl,{colSpan:4,padding:"checkbox",children:P.jsx(NT,{checked:p>0&&h===p,indeterminate:h>0&&h<p,onChange:v})})})}),P.jsx(kG,{children:Object.entries(a).map(([g,m])=>P.jsxs(O0,{hover:!0,children:[P.jsx(Yl,{onClick:d(g),padding:"checkbox",children:P.jsx(NT,{checked:r.includes(g)})}),P.jsx(Yl,{children:g}),P.jsx(Yl,{children:P.jsx(dt,{variant:"subtitle2",children:m.host})}),P.jsx(Yl,{align:"right",children:P.jsx(cd,{onClick:()=>{s(!o),u({userClass:m,userClassName:g})},children:P.jsx(MH,{})})})]},`user-class-${g}`))})]})})})]})}),P.jsx(eS,{onClose:()=>s(!1),open:o,children:l&&P.jsx(Lve,{availableTasks:t[l.userClassName],handleEditUser:f,userToEdit:l})})]})}const Ove={setSwarm:eI.setSwarm},Nve=({swarm:{availableUserTasks:e,users:t}})=>({availableUserTasks:e,users:t}),zve=ai(Nve,Ove)(Eve);function Bve({availableShapeClasses:e,availableUserClasses:t,host:r,extraOptions:n,hideCommonOptions:i,shapeUseCommonOptions:a,numUsers:o,userCount:s,overrideHostWarning:l,runTime:u,setSwarm:c,showUserclassPicker:f,spawnRate:d,alert:h,isDisabled:p=!1,isEditSwarm:v=!1,onFormChange:g,onFormSubmit:m}){const[y]=Ive(),[x,S]=O.useState(""),[_,b]=O.useState(t),w=async T=>{const{data:M}=await y({...T,...f&&_?{userClasses:_}:{}});M&&M.success?c({state:qr.RUNNING,host:T.host||r,runTime:T.runTime,spawnRate:T.spawnRate,userCount:T.userCount}):S(M?M.message:"An unknown error occured."),m&&m(T)},C=T=>{x&&S(""),g&&g(T)},A=T=>{if(!a){const M=T.target.value!==e[0];c({hideCommonOptions:M})}};return P.jsxs(ng,{maxWidth:"md",sx:{my:2},children:[P.jsx(dt,{component:"h2",noWrap:!0,variant:"h6",children:v?"Edit running load test":"Start new load test"}),!v&&f&&P.jsx(Pt,{marginBottom:2,marginTop:2,children:P.jsx(zve,{availableUserClasses:t,selectedUserClasses:_,setSelectedUserClasses:b})}),P.jsx(AH,{onChange:C,onSubmit:w,children:P.jsxs(Pt,{sx:{marginBottom:2,marginTop:2,display:"flex",flexDirection:"column",rowGap:4},children:[!v&&f&&P.jsx(Lk,{label:"Shape Class",name:"shapeClass",onChange:A,options:e}),P.jsx(JE,{defaultValue:i&&"0"||s||o||1,disabled:!!i,label:"Number of users (peak concurrency)",name:"userCount",required:!0,title:i?"Disabled for tests using LoadTestShape class":""}),P.jsx(JE,{defaultValue:i&&"0"||d||1,disabled:!!i,label:"Ramp up (users started/second)",name:"spawnRate",required:!0,title:i?"Disabled for tests using LoadTestShape class":""}),!v&&P.jsxs(P.Fragment,{children:[P.jsx(Xf,{defaultValue:r,label:`Host ${l?"(setting this will override the host for the User classes)":""}`,name:"host"}),P.jsxs(gk,{children:[P.jsx(yk,{expandIcon:P.jsx(rS,{}),children:P.jsx(dt,{children:"Advanced options"})}),P.jsx(mk,{children:P.jsx(Xf,{defaultValue:u,disabled:!!i,label:"Run time (e.g. 20, 20s, 3m, 2h, 1h20m, 3h30m10s, etc.)",name:"runTime",sx:{width:"100%"},title:i?"Disabled for tests using LoadTestShape class":""})})]})]}),!TH(n)&&P.jsx(Ppe,{extraOptions:n}),h&&!x&&P.jsx(sf,{severity:h.level||"info",children:h.message}),x&&P.jsx(sf,{severity:"error",children:x}),P.jsx(Ka,{disabled:p,size:"large",type:"submit",variant:"contained",children:v?"Update":"Start"})]})})]})}const Fve=({swarm:{availableShapeClasses:e,availableUserClasses:t,extraOptions:r,hideCommonOptions:n,shapeUseCommonOptions:i,host:a,numUsers:o,userCount:s,overrideHostWarning:l,runTime:u,spawnRate:c,showUserclassPicker:f}})=>({availableShapeClasses:e,availableUserClasses:t,extraOptions:r,hideCommonOptions:n,shapeUseCommonOptions:i,host:a,overrideHostWarning:l,showUserclassPicker:f,numUsers:o,userCount:s,runTime:u,spawnRate:c}),$ve={setSwarm:eI.setSwarm},tI=ai(Fve,$ve)(Bve);function Vve(e){const[t,r]=O.useState(!1),{hideCommonOptions:n}=si(({swarm:i})=>i);return P.jsxs(P.Fragment,{children:[P.jsx(TG,{title:n?"Disabled for tests using LoadTestShape class":"",children:P.jsx(Pt,{children:P.jsx(Ka,{color:"secondary",disabled:!!n,onClick:()=>r(!0),sx:{minHeight:"100%"},type:"button",variant:"contained",children:"Edit"})})}),P.jsx(eS,{onClose:()=>r(!1),open:t,children:P.jsx(tI,{...e,isEditSwarm:!0,onFormSubmit:()=>r(!1)})})]})}function Gve(e){const[t,r]=O.useState(!1);return P.jsxs(P.Fragment,{children:[P.jsx(Ka,{color:"success",onClick:()=>r(!0),type:"button",variant:"contained",children:"New"}),P.jsx(eS,{onClose:()=>r(!1),open:t,children:P.jsx(tI,{...e})})]})}function Hve(){const e=()=>{fetch("stats/reset")};return P.jsx(Ka,{color:"warning",onClick:e,type:"button",variant:"contained",children:"Reset"})}function Wve(){const[e,t]=O.useState(!1);O.useEffect(()=>{t(!1)},[]);const r=()=>{fetch("stop"),t(!0)};return P.jsx(Ka,{color:"error",disabled:e,onClick:r,type:"button",variant:"contained",children:e?"Loading":"Stop"})}function jve(){const e=si(({swarm:t})=>t.state);return e===qr.READY?null:P.jsxs(Pt,{sx:{display:"flex",columnGap:2,marginY:"auto",height:"50px"},children:[e===qr.STOPPED?P.jsx(Gve,{}):P.jsxs(P.Fragment,{children:[P.jsx(Vve,{}),P.jsx(Wve,{})]}),P.jsx(Hve,{})]})}function Uve(){return P.jsx(dne,{position:"static",children:P.jsx(ng,{maxWidth:"xl",children:P.jsxs(tue,{disableGutters:!0,sx:{display:"flex",justifyContent:"space-between",columnGap:2},children:[P.jsx(Lr,{color:"inherit",href:"/",sx:{display:"flex",alignItems:"center"},underline:"none",children:P.jsx(DG,{})}),P.jsxs(Pt,{sx:{display:"flex",columnGap:6},children:[P.jsx(wpe,{}),P.jsx(jve,{}),P.jsx(_H,{})]})]})})})}function Yve({children:e}){return P.jsxs(P.Fragment,{children:[P.jsxs(Pt,{sx:{minHeight:"calc(100vh - var(--footer-height))"},children:[P.jsx(Uve,{}),P.jsx("main",{children:e})]}),P.jsx(ype,{})]})}const NH=e=>e.includes("WARNING")||e.includes("ERROR")||e.includes("CRITICAL"),zH="logViewer";function fv(e,t,{shouldRunInterval:r,immediate:n}={shouldRunInterval:!0,immediate:!1}){const i=O.useRef(e);O.useEffect(()=>{i.current=e},[e]),O.useEffect(()=>{if(!r)return;n&&i.current();const a=setInterval(()=>i.current(),t);return()=>{clearInterval(a)}},[t,r])}const Xve={},BH=Si({name:"notification",initialState:Xve,reducers:{setNotification:og}}),FH=BH.actions,qve=BH.reducer;function Zve(e,{key:t,shouldNotify:r}){const n=xo(FH.setNotification),i=si(({url:{query:o}})=>o&&o.tab),a=`${t}Notification`;O.useEffect(()=>{e.length>0&&e.length<localStorage[a]&&(localStorage[a]=e.length),e.length>(localStorage[a]||0)&&(!i||i!==t)&&(!r||r&&r(a))&&(n({[t]:!0}),localStorage[a]=e.length)},[e])}const Kve={master:[],workers:{}},$H=Si({name:"logViewer",initialState:Kve,reducers:{setLogs:og}}),Qve=$H.actions,Jve=$H.reducer,VH=e=>e.reduce((t,r)=>t.concat(Array.isArray(r)?VH(r):r),[]),ege={master:[],workers:{}};function tge(){const e=si(({swarm:l})=>l),t=xo(Qve.setLogs),{data:r,refetch:n}=kve(),i=r||ege,a=O.useMemo(()=>VH(Object.values(i.workers)),[i.workers]),o=O.useMemo(()=>[...i.master].concat(a),[i.master,i.workers]),s=O.useCallback(l=>o.slice(localStorage[l]).some(NH),[o]);return fv(n,5e3,{shouldRunInterval:e.state===qr.SPAWNING||e.state==qr.RUNNING}),Zve(o,{key:zH,shouldNotify:s}),O.useEffect(()=>{t(i)},[i]),i}var rI={},rge=Xu;Object.defineProperty(rI,"__esModule",{value:!0});var nI=rI.default=void 0,nge=rge(qu()),pO=P,ige=(0,nge.default)([(0,pO.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,pO.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");nI=rI.default=ige;function age(e,t){const r=t?-1:1;return function(n,i){const a=n[e],o=i[e];return a<o?r*-1:a>o?r*1:0}}function oge(e,{hasTotalRow:t=!1,defaultSortKey:r="name"}={hasTotalRow:!1,defaultSortKey:"name"}){const[n,i]=O.useState(e),[a,o]=O.useState(!1),s=O.useRef(),l=c=>{const d=(t?e.slice(0,-1):[...e]).sort(age(c,c===s.current&&!a));i(t?[...d,...e.slice(-1)]:d)},u=O.useCallback(c=>{s.current||(s.current=r);const f=c.target.getAttribute("data-sortkey");if(f===s.current)if(a){o(!1),s.current=void 0,l(r);return}else o(!0);else a&&o(!1);l(f),s.current=f},[s,e,a]);return O.useEffect(()=>{e.length&&l(s.current||r)},[e]),{onTableHeadClick:u,sortedRows:n,currentSortField:s.current}}const Nh=(e,t=0)=>{const r=Math.pow(10,t);return Math.round(e*r)/r};function sge({content:e,formatter:t,round:r,markdown:n}){return t?t(e):r?Nh(e,r):n?P.jsx(F0,{content:e}):e}function sg({rows:e,structure:t,hasTotalRow:r,defaultSortKey:n}){const{onTableHeadClick:i,sortedRows:a,currentSortField:o}=oge(e,{hasTotalRow:r,defaultSortKey:n});return P.jsx(IG,{component:rl,sx:{overflowX:"visible"},children:P.jsxs(MG,{children:[P.jsx(PG,{sx:{position:"sticky",top:0,zIndex:2,backgroundColor:"background.paper"},children:P.jsx(O0,{children:t.map(({title:s,key:l})=>P.jsx(Yl,{"data-sortkey":l,onClick:i,sx:{cursor:"pointer",color:o===l?"primary.main":"text.primary"},children:s},`table-head-${l}`))})}),P.jsx(kG,{children:a.map((s,l)=>P.jsx(O0,{children:t.map(({key:u,...c},f)=>P.jsx(Yl,{children:P.jsx(sge,{content:s[u],...c})},`table-row=${f}`))},`${s.name}-${l}`))})]})})}function lge({rows:e,tableStructure:t}){return t?P.jsx(sg,{rows:e,structure:t}):null}const uge=({swarm:{extendedTables:e},ui:{extendedStats:t},url:{query:r}})=>{const n=r&&r.tab&&e&&e.find(({key:a})=>a===r.tab),i=r&&r.tab&&t&&t.find(({key:a})=>a===r.tab);return{tableStructure:n?n.structure.map(({key:a,...o})=>({key:d6(a),...o})):null,rows:i?i.data:[]}},cge=ai(uge)(lge),fge=[{key:"count",title:"# occurrences"},{key:"msg",title:"Message",markdown:!0},{key:"traceback",title:"Traceback",markdown:!0}];function dge({exceptions:e}){return P.jsx(sg,{rows:e,structure:fge})}const hge=({ui:{exceptions:e}})=>({exceptions:e}),pge=ai(hge)(dge);var SF;const vge={totalRps:0,failRatio:0,startTime:"",stats:[],errors:[],exceptions:[],charts:(SF=ja.history)==null?void 0:SF.reduce(tS,{}),ratios:{},userCount:0};var bF;const gge=(bF=ja.percentilesToChart)==null?void 0:bF.reduce((e,t)=>({...e,[`responseTimePercentile${t}`]:{value:null}}),{}),mge=e=>tS(e,{...gge,currentRps:{value:null},currentFailPerSec:{value:null},totalAvgResponseTime:{value:null},userCount:{value:null},time:""}),GH=Si({name:"ui",initialState:vge,reducers:{setUi:og,updateCharts:(e,{payload:t})=>({...e,charts:tS(e.charts,t)}),updateChartMarkers:(e,{payload:t})=>({...e,charts:{...mge(e.charts),markers:e.charts.markers?[...e.charts.markers,t]:[(e.charts.time||[""])[0],t]}})}}),gp=GH.actions,yge=GH.reducer,xge=e=>{const t=new URL(window.location.href);for(const[r,n]of Object.entries(e))t.searchParams.set(r,n);window.history.pushState(null,"",t)},Sge=()=>window.location.search?xQ(window.location.search):null,bge={query:Sge()},HH=Si({name:"url",initialState:bge,reducers:{setUrl:og}}),_ge=HH.actions,wge=HH.reducer,Cge=tx({[$0.reducerPath]:$0.reducer,logViewer:Jve,notification:qve,swarm:Rve,theme:bH,ui:yge,url:wge}),Tge=YV({reducer:Cge,middleware:e=>e().concat($0.middleware)});/*! *****************************************************************************
155
+ `},i),a}function Ahe(e,t){return e&&"run"in e?async function(r,n){const i=FE(r,t);await e.run(i,n)}:function(r){return FE(r,t||e)}}function $E(e){if(e)throw e}var Dy=Object.prototype.hasOwnProperty,pH=Object.prototype.toString,VE=Object.defineProperty,GE=Object.getOwnPropertyDescriptor,HE=function(t){return typeof Array.isArray=="function"?Array.isArray(t):pH.call(t)==="[object Array]"},WE=function(t){if(!t||pH.call(t)!=="[object Object]")return!1;var r=Dy.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Dy.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||Dy.call(t,i)},jE=function(t,r){VE&&r.name==="__proto__"?VE(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},UE=function(t,r){if(r==="__proto__")if(Dy.call(t,r)){if(GE)return GE(t,r).value}else return;return t[r]},Mhe=function e(){var t,r,n,i,a,o,s=arguments[0],l=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(r in t)n=UE(s,r),i=UE(t,r),s!==i&&(c&&i&&(WE(i)||(a=HE(i)))?(a?(a=!1,o=n&&HE(n)?n:[]):o=n&&WE(n)?n:{},jE(s,{name:r,newValue:e(c,o,i)})):typeof i<"u"&&jE(s,{name:r,newValue:i}));return s};const Vb=z1(Mhe);function jT(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function khe(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...u){const c=e[++a];let f=-1;if(l){o(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?Ihe(c,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ihe(e,t){let r;return n;function n(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(u){const c=u;if(s&&r)throw c;return i(c)}s||(l instanceof Promise?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const Ma={basename:Phe,dirname:Dhe,extname:Rhe,join:Lhe,sep:"/"};function Phe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ag(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Dhe(e){if(ag(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Rhe(e){ag(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function Lhe(...e){let t=-1,r;for(;++t<e.length;)ag(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Ehe(r)}function Ehe(e){ag(e);const t=e.codePointAt(0)===47;let r=Ohe(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Ohe(e,t){let r="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function ag(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Nhe={cwd:zhe};function zhe(){return"/"}function UT(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bhe(e){if(typeof e=="string")e=new URL(e);else if(!UT(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Fhe(e)}function Fhe(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Gb=["history","path","basename","stem","extname","dirname"];class vH{constructor(t){let r;t?UT(t)?r={path:t}:typeof t=="string"||$he(t)?r={value:t}:r=t:r={},this.cwd=Nhe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Gb.length;){const a=Gb[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Gb.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Ma.basename(this.path):void 0}set basename(t){Wb(t,"basename"),Hb(t,"basename"),this.path=Ma.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ma.dirname(this.path):void 0}set dirname(t){YE(this.basename,"dirname"),this.path=Ma.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ma.extname(this.path):void 0}set extname(t){if(Hb(t,"extname"),YE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ma.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){UT(t)&&(t=Bhe(t)),Wb(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ma.basename(this.path,this.extname):void 0}set stem(t){Wb(t,"stem"),Hb(t,"stem"),this.path=Ma.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new yn(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hb(e,t){if(e&&e.includes(Ma.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ma.sep+"`")}function Wb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function YE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $he(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Vhe=function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,n);const o=Object.getOwnPropertyNames(i);for(const s of o){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(a,s,l)}return a},Ghe={}.hasOwnProperty;class jk extends Vhe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=khe()}copy(){const t=new jk;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Vb(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Yb("data",this.frozen),this.namespace[t]=r,this):Ghe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Yb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=lm(t),n=this.parser||this.Parser;return jb("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),jb("process",this.parser||this.Parser),Ub("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=lm(t),l=n.parse(s);n.run(l,s,function(c,f,d){if(c||!f||!d)return u(c);const h=f,p=n.stringify(h,d);jhe(p)?d.value=p:d.result=p,u(c,d)});function u(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),jb("processSync",this.parser||this.Parser),Ub("processSync",this.compiler||this.Compiler),this.process(t,i),qE("processSync","process",r),n;function i(a,o){r=!0,$E(a),n=o}}run(t,r,n){XE(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=lm(r);i.run(t,l,u);function u(c,f,d){const h=f||t;c?s(c):o?o(h):n(void 0,h,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),qE("runSync","run",n),i;function a(o,s){$E(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=lm(r),i=this.compiler||this.Compiler;return Ub("stringify",i),XE(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Yb("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;l(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Vb(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===u){d=f;break}if(d===-1)n.push([u,...c]);else if(c.length>0){let[h,...p]=c;const v=n[d][1];jT(v)&&jT(h)&&(h=Vb(!0,v,h)),n[d]=[u,h,...p]}}}}const Hhe=new jk().freeze();function jb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ub(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XE(e){if(!jT(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qE(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lm(e){return Whe(e)?e:new vH(e)}function Whe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function jhe(e){return typeof e=="string"||Uhe(e)}function Uhe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yhe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZE=[],KE={allowDangerousHtml:!0},Xhe=/^(https?|ircs?|mailto|xmpp)$/i,qhe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Zhe(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||ZE,l=e.remarkPlugins||ZE,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...KE}:KE,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Khe,h=Hhe().use(Dde).use(l).use(Ahe,u).use(s),p=new vH;typeof n=="string"&&(p.value=n);for(const y of qhe)Object.hasOwn(e,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Yhe+y.id,void 0);const v=h.parse(p);let g=h.runSync(v,p);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),hH(g,m),gce(g,{Fragment:P.Fragment,components:a,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function m(y,x,S){if(y.type==="raw"&&S&&typeof x=="number")return c?S.children.splice(x,1):S.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let _;for(_ in Bb)if(Object.hasOwn(Bb,_)&&Object.hasOwn(y.properties,_)){const b=y.properties[_],w=Bb[_];(w===null||w.includes(y.tagName))&&(y.properties[_]=d(String(b||""),_,y))}}if(y.type==="element"){let _=t?!t.includes(y.tagName):o?o.includes(y.tagName):!1;if(!_&&r&&typeof x=="number"&&(_=!r(y,x,S)),_&&S&&typeof x=="number")return f&&y.children?S.children.splice(x,1,...y.children):S.children.splice(x,1),x}}}function Khe(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Xhe.test(e.slice(0,t))?e:""}function F0({content:e}){return P.jsx(Zhe,{components:{a:Lr},skipHtml:!1,children:e})}function gH({name:e,label:t,type:r="text",defaultValue:n,choices:i,isSecret:a,isRequired:o}){return i?P.jsx(Lk,{defaultValue:n,label:t,name:e,options:i,required:o,sx:{width:"100%"}}):typeof n=="boolean"?P.jsx(vG,{control:P.jsx(NT,{defaultChecked:n,required:o}),label:P.jsx(F0,{content:t}),name:e}):a?P.jsx(RG,{defaultValue:n,isRequired:o,label:t,name:e}):P.jsx(Xf,{defaultValue:n,label:t,name:e,required:o,sx:{width:"100%"},type:r})}var Uk={},mH={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(mH);var Xu=mH.exports,Xb={};const Qhe=FY(Xte);var QE;function qu(){return QE||(QE=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=Qhe}(Xb)),Xb}var Jhe=Xu;Object.defineProperty(Uk,"__esModule",{value:!0});var yH=Uk.default=void 0,epe=Jhe(qu()),tpe=P,rpe=(0,epe.default)((0,tpe.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"}),"Brightness4");yH=Uk.default=rpe;var Yk={},npe=Xu;Object.defineProperty(Yk,"__esModule",{value:!0});var xH=Yk.default=void 0,ipe=npe(qu()),ape=P,ope=(0,ipe.default)((0,ape.jsx)("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}),"Brightness7");xH=Yk.default=ope;const Wa={DARK:"dark",LIGHT:"light"},spe=localStorage.theme===Wa.DARK||!("theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?Wa.DARK:Wa.LIGHT,si=t6,lpe=c6;function xo(e,t){const r=lpe();return O.useCallback(n=>{r(e(n))},[e,r])}const upe={isDarkMode:!1},SH=Si({name:"theme",initialState:upe,reducers:{setIsDarkMode:(e,{payload:t})=>{e.isDarkMode=t}}}),cpe=SH.actions,bH=SH.reducer;function _H(){const e=si(({theme:{isDarkMode:n}})=>n),t=xo(cpe.setIsDarkMode);O.useEffect(()=>{t(spe===Wa.DARK)},[]);const r=()=>{localStorage.theme=e?Wa.LIGHT:Wa.DARK,t(!e)};return P.jsx(cd,{color:"inherit",onClick:r,children:e?P.jsx(xH,{}):P.jsx(yH,{})})}const fpe=e=>hk({palette:{mode:e,primary:{main:"#15803d"},success:{main:"#00C853"}},components:{MuiCssBaseline:{styleOverrides:{":root":{"--footer-height":"40px"},p:{margin:0}}}}});function wH(){const e=si(({theme:{isDarkMode:r}})=>r);return O.useMemo(()=>fpe(e?Wa.DARK:Wa.LIGHT),[e])}function dpe({authProviders:e,customForm:t,error:r,info:n,usernamePasswordCallback:i}){const a=wH();return P.jsxs(U6,{theme:a,children:[P.jsx(dG,{}),P.jsx(Pt,{sx:{position:"absolute",top:4,right:4},children:P.jsx(_H,{})}),P.jsxs(Pt,{component:"main",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",flexDirection:"column",rowGap:4,boxShadow:24,borderRadius:4,width:400,border:"3px solid black",p:4},children:[P.jsx(Pt,{sx:{display:"flex",justifyContent:"center",columnGap:2},children:P.jsx(DG,{})}),i&&!t&&P.jsx("form",{action:i,method:"POST",children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:2},children:[P.jsx(Xf,{label:"Username",name:"username"}),P.jsx(RG,{}),n&&P.jsx(sf,{severity:"info",children:P.jsx(F0,{content:n})}),r&&P.jsx(sf,{severity:"error",children:r}),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:"Login"})]})}),t&&P.jsx("form",{action:t.callbackUrl,method:"POST",children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:2},children:[t.inputs.map((o,s)=>P.jsx(gH,{...o},`custom-form-input-${s}`)),n&&P.jsx(sf,{severity:"info",children:P.jsx(F0,{content:n})}),r&&P.jsx(sf,{severity:"error",children:r}),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:t.submitButtonText||"Login"})]})}),e&&P.jsx(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:1},children:e.map(({label:o,callbackUrl:s,iconUrl:l},u)=>P.jsxs(cd,{href:s,sx:{display:"flex",justifyContent:"center",alignItems:"center",columnGap:2,borderRadius:2,borderWidth:"1px",borderStyle:"solid",borderColor:"primary"},children:[P.jsx("img",{height:"32",src:l}),P.jsx(dt,{height:"32",variant:"button",children:o})]},`auth-provider-${u}`))})]})]})}var Xk={},hpe=Xu;Object.defineProperty(Xk,"__esModule",{value:!0});var CH=Xk.default=void 0,ppe=hpe(qu()),vpe=P,gpe=(0,ppe.default)((0,vpe.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");CH=Xk.default=gpe;function eS({open:e,onClose:t,children:r}){return P.jsx(hG,{onClose:t,open:e,children:P.jsxs(ng,{maxWidth:"md",sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",maxHeight:"90vh",overflowY:"auto",display:"flex",flexDirection:"column",rowGap:2,bgcolor:"background.paper",boxShadow:24,borderRadius:4,border:"3px solid black",p:4},children:[P.jsx(cd,{color:"inherit",onClick:t,sx:{position:"absolute",top:1,right:1},children:P.jsx(CH,{})}),r]})})}function mpe(){const[e,t]=O.useState(!1),r=si(({swarm:n})=>n.version);return P.jsxs(P.Fragment,{children:[P.jsx(Pt,{sx:{display:"flex",justifyContent:"flex-end"},children:P.jsx(Ka,{color:"inherit",onClick:()=>t(!0),variant:"text",children:"About"})}),P.jsxs(eS,{onClose:()=>t(!1),open:e,children:[P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"About"}),P.jsxs(dt,{component:"p",variant:"subtitle1",children:["Locust is free and open source software released under the"," ",P.jsx(Lr,{href:"https://github.com/locustio/locust/blob/master/LICENSE",children:"MIT License"})]}),P.jsxs(dt,{component:"p",sx:{mt:2},variant:"subtitle1",children:["It was originally developed by Carl Byström and"," ",P.jsx(Lr,{href:"https://twitter.com/jonatanheyman",children:"Jonatan Heyman"}),". Since 2019, it is primarily maintained by ",P.jsx(Lr,{href:"https://github.com/cyberw",children:"Lars Holmberg"}),"."]}),P.jsxs(dt,{component:"p",sx:{mt:2},variant:"subtitle1",children:["Many thanks to all our wonderful"," ",P.jsx(Lr,{href:"https://github.com/locustio/locust/graphs/contributors",children:"contributors"}),"!"]})]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Need help getting started?"}),P.jsx(Lr,{href:"https://locust.cloud",children:"Locust Cloud"})," gives you access to hosted, easily scalable, and distributed load generation, as well as advanced reporting — all while preserving the flexible “it’s just Python” approach to load test scripting that Locust provides"]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Version"}),P.jsx(Lr,{href:`https://github.com/locustio/locust/releases/tag/${r}`,children:r})]}),P.jsxs("div",{children:[P.jsx(dt,{component:"h2",mb:1,variant:"h4",children:"Links"}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://github.com/locustio/locust",children:"GitHub"})}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://docs.locust.io/en/stable",children:"Documentation"})}),P.jsx(dt,{component:"p",variant:"subtitle1",children:P.jsx(Lr,{href:"https://medium.com/locust-cloud",children:"Blog"})})]})]})]})}function ype(){return P.jsx(ng,{maxWidth:"xl",sx:{display:"flex",height:"var(--footer-height)",alignItems:"center",justifyContent:"flex-end"},children:P.jsx(mpe,{})})}const TH=e=>(Array.isArray(e)?e.length:Object.keys(e).length)===0;function xpe(e,t){return{...e,...t}}const Spe=e=>{const t=new URLSearchParams;for(const[r,n]of Object.entries(e))if(Array.isArray(n))for(const i of n)t.append(r,i);else t.append(r,n);return t},tS=(e,t)=>Object.entries(t).reduce((r,[n,i])=>({...r,[n]:[...r[n]||[],i]}),e),qr={READY:"ready",RUNNING:"running",STOPPED:"stopped",SPAWNING:"spawning",CLEANUP:"cleanup",STOPPING:"stopping",MISSING:"missing"},ja=window.templateArgs?af(window.templateArgs):{};var xF;ja.isReport&&{...ja,charts:(xF=ja.history)==null||xF.reduce((e,{currentResponseTimePercentiles:t,...r})=>tS(e,{...t,...r}),{})};function bpe({isDistributed:e,state:t,host:r,totalRps:n,failRatio:i,userCount:a,workerCount:o}){return P.jsxs(Pt,{sx:{display:"flex",columnGap:2},children:[P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column"},children:[P.jsx(dt,{variant:"button",children:"Host"}),P.jsx(TG,{title:r,children:P.jsx(dt,{noWrap:!0,sx:{overflow:"hidden",textOverflow:"ellipsis",maxWidth:"400px"},children:r})})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column"},children:[P.jsx(dt,{variant:"button",children:"Status"}),P.jsx(dt,{variant:"button",children:t})]}),(t===qr.RUNNING||t===qr.SPAWNING)&&P.jsxs(P.Fragment,{children:[P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Users"}),P.jsx(dt,{noWrap:!0,variant:"button",children:a})]})]}),e&&P.jsxs(P.Fragment,{children:[P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Workers"}),P.jsx(dt,{noWrap:!0,variant:"button",children:o})]})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"RPS"}),P.jsx(dt,{noWrap:!0,variant:"button",children:n})]}),P.jsx(Bc,{flexItem:!0,orientation:"vertical"}),P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[P.jsx(dt,{variant:"button",children:"Failures"}),P.jsx(dt,{noWrap:!0,variant:"button",children:`${i}%`})]})]})}const _pe=({swarm:{isDistributed:e,state:t,host:r,workerCount:n},ui:{totalRps:i,failRatio:a,userCount:o}})=>({isDistributed:e,state:t,host:r,totalRps:i,failRatio:a,userCount:o,workerCount:n}),wpe=ai(_pe)(bpe);var qk={},Cpe=Xu;Object.defineProperty(qk,"__esModule",{value:!0});var rS=qk.default=void 0,Tpe=Cpe(qu()),Ape=P,Mpe=(0,Tpe.default)((0,Ape.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");rS=qk.default=Mpe;const kpe="input, select, textarea",Ipe=e=>e instanceof HTMLInputElement&&e.getAttribute("data-type")==="number"?Number(e.value):e instanceof HTMLInputElement&&e.type==="checkbox"?e.checked:e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions).map(t=>t.value):e.value;function AH({children:e,onSubmit:t,onChange:r}){const n=O.useCallback(async i=>{i.preventDefault();const o=[...i.target.querySelectorAll(kpe)].reduce((s,l)=>({...s,[l.name]:Ipe(l)}),{});t(o)},[t]);return P.jsx("form",{onChange:r,onSubmit:n,children:e})}function JE({defaultValue:e,...t}){const[r,n]=O.useState(e||""),i=a=>{t.onChange&&t.onChange(a),!((a.target.value.match(/\./g)||[]).length>1)&&n(a.target.value.replace(/[^0-9.]/g,""))};return O.useEffect(()=>{e&&n(e)},[e]),P.jsx(Xf,{...t,onChange:i,value:r})}function Ppe({extraOptions:e}){return P.jsxs(gk,{children:[P.jsx(yk,{expandIcon:P.jsx(rS,{}),children:P.jsx(dt,{children:"Custom parameters"})}),P.jsx(mk,{children:P.jsx(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:4},children:Object.entries(e).map(([t,r],n)=>O.createElement(gH,{...r,key:`valid-parameter-${n}`,label:r.helpText?`${wT(t)} (${r.helpText})`:wT(t),name:t}))})})]})}var Zk={},Dpe=Xu;Object.defineProperty(Zk,"__esModule",{value:!0});var MH=Zk.default=void 0,Rpe=Dpe(qu()),Lpe=P,Epe=(0,Rpe.default)((0,Lpe.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");MH=Zk.default=Epe;var kH=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(kH||{});function Ope(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}function Npe(e){return new RegExp("(^|:)//").test(e)}var zpe=e=>e.replace(/\/$/,""),Bpe=e=>e.replace(/^\//,"");function Fpe(e,t){if(!e)return t;if(!t)return e;if(Npe(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=zpe(e),t=Bpe(t),`${e}${r}${t}`}var eO=e=>[].concat(...e);function $pe(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}function Vpe(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}var tO=Xa;function IH(e,t){if(e===t||!(tO(e)&&tO(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),n=Object.keys(e);let i=r.length===n.length;const a=Array.isArray(t)?[]:{};for(const o of r)a[o]=IH(e[o],t[o]),i&&(i=e[o]===a[o]);return i?e:a}var rO=(...e)=>fetch(...e),Gpe=e=>e.status>=200&&e.status<=299,Hpe=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function nO(e){if(!Xa(e))return e;const t={...e};for(const[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Wpe({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:r=rO,paramsSerializer:n,isJsonContentType:i=Hpe,jsonContentType:a="application/json",jsonReplacer:o,timeout:s,responseHandler:l,validateStatus:u,...c}={}){return typeof fetch>"u"&&r===rO&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,h)=>{const{signal:p,getState:v,extra:g,endpoint:m,forced:y,type:x}=h;let S,{url:_,headers:b=new Headers(c.headers),params:w=void 0,responseHandler:C=l??"json",validateStatus:A=u??Gpe,timeout:T=s,...M}=typeof d=="string"?{url:d}:d,k={...c,signal:p,...M};b=new Headers(nO(b)),k.headers=await t(b,{getState:v,extra:g,endpoint:m,forced:y,type:x})||b;const I=W=>typeof W=="object"&&(Xa(W)||Array.isArray(W)||typeof W.toJSON=="function");if(!k.headers.has("content-type")&&I(k.body)&&k.headers.set("content-type",a),I(k.body)&&i(k.headers)&&(k.body=JSON.stringify(k.body,o)),w){const W=~_.indexOf("?")?"&":"?",F=n?n(w):new URLSearchParams(nO(w));_+=W+F}_=Fpe(e,_);const R=new Request(_,k);S={request:new Request(_,k)};let N,$=!1,z=T&&setTimeout(()=>{$=!0,h.abort()},T);try{N=await r(R)}catch(W){return{error:{status:$?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(W)},meta:S}}finally{z&&clearTimeout(z)}const V=N.clone();S.response=V;let E,G="";try{let W;if(await Promise.all([f(N,C).then(F=>E=F,F=>W=F),V.text().then(F=>G=F,()=>{})]),W)throw W}catch(W){return{error:{status:"PARSING_ERROR",originalStatus:N.status,data:G,error:String(W)},meta:S}}return A(N,E)?{data:E,meta:S}:{error:{status:N.status,data:E},meta:S}};async function f(d,h){if(typeof h=="function")return h(d);if(h==="content-type"&&(h=i(d.headers)?"json":"text"),h==="json"){const p=await d.text();return p.length?JSON.parse(p):null}return d.text()}}var iO=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Kk=un("__rtkq/focused"),PH=un("__rtkq/unfocused"),Qk=un("__rtkq/online"),DH=un("__rtkq/offline");function RH(e){return e.type==="query"}function jpe(e){return e.type==="mutation"}function Jk(e,t,r,n,i,a){return Upe(e)?e(t,r,n,i).map(YT).map(a):Array.isArray(e)?e.map(YT).map(a):[]}function Upe(e){return typeof e=="function"}function YT(e){return typeof e=="string"?{type:e}:e}function aO(e){return e!=null}function _f(e){let t=0;for(const r in e)t++;return t}function Ype(e,t){return e.catch(t)}var uv=Symbol("forceQueryFn"),XT=e=>typeof e[uv]=="function";function Xpe({serializeQueryArgs:e,queryThunk:t,mutationThunk:r,api:n,context:i}){const a=new Map,o=new Map,{unsubscribeQueryResult:s,removeMutationResult:l,updateSubscriptionOptions:u}=n.internalActions;return{buildInitiateQuery:p,buildInitiateMutation:v,getRunningQueryThunk:c,getRunningMutationThunk:f,getRunningQueriesThunk:d,getRunningMutationsThunk:h};function c(g,m){return y=>{var _;const x=i.endpointDefinitions[g],S=e({queryArgs:m,endpointDefinition:x,endpointName:g});return(_=a.get(y))==null?void 0:_[S]}}function f(g,m){return y=>{var x;return(x=o.get(y))==null?void 0:x[m]}}function d(){return g=>Object.values(a.get(g)||{}).filter(aO)}function h(){return g=>Object.values(o.get(g)||{}).filter(aO)}function p(g,m){const y=(x,{subscribe:S=!0,forceRefetch:_,subscriptionOptions:b,[uv]:w,...C}={})=>(A,T)=>{var W;const M=e({queryArgs:x,endpointDefinition:m,endpointName:g}),k=t({...C,type:"query",subscribe:S,forceRefetch:_,subscriptionOptions:b,endpointName:g,originalArgs:x,queryCacheKey:M,[uv]:w}),I=n.endpoints[g].select(x),R=A(k),L=I(T()),{requestId:N,abort:$}=R,z=L.requestId!==N,V=(W=a.get(A))==null?void 0:W[M],E=()=>I(T()),G=Object.assign(w?R.then(E):z&&!V?Promise.resolve(L):Promise.all([V,R]).then(E),{arg:x,requestId:N,subscriptionOptions:b,queryCacheKey:M,abort:$,async unwrap(){const F=await G;if(F.isError)throw F.error;return F.data},refetch:()=>A(y(x,{subscribe:!1,forceRefetch:!0})),unsubscribe(){S&&A(s({queryCacheKey:M,requestId:N}))},updateSubscriptionOptions(F){G.subscriptionOptions=F,A(u({endpointName:g,requestId:N,queryCacheKey:M,options:F}))}});if(!V&&!z&&!w){const F=a.get(A)||{};F[M]=G,a.set(A,F),G.then(()=>{delete F[M],_f(F)||a.delete(A)})}return G};return y}function v(g){return(m,{track:y=!0,fixedCacheKey:x}={})=>(S,_)=>{const b=r({type:"mutation",endpointName:g,originalArgs:m,track:y,fixedCacheKey:x}),w=S(b),{requestId:C,abort:A,unwrap:T}=w,M=Ype(w.unwrap().then(L=>({data:L})),L=>({error:L})),k=()=>{S(l({requestId:C,fixedCacheKey:x}))},I=Object.assign(M,{arg:w.arg,requestId:C,abort:A,unwrap:T,reset:k}),R=o.get(S)||{};return o.set(S,R),R[C]=I,I.then(()=>{delete R[C],_f(R)||o.delete(S)}),x&&(R[x]=I,I.then(()=>{R[x]===I&&(delete R[x],_f(R)||o.delete(S))})),I}}}function oO(e){return e}function qpe({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:i,assertTagType:a}){const o=(y,x,S,_)=>(b,w)=>{const C=r[y],A=n({queryArgs:x,endpointDefinition:C,endpointName:y});if(b(i.internalActions.queryResultPatched({queryCacheKey:A,patches:S})),!_)return;const T=i.endpoints[y].select(x)(w()),M=Jk(C.providesTags,T.data,void 0,x,{},a);b(i.internalActions.updateProvidedBy({queryCacheKey:A,providedTags:M}))},s=(y,x,S,_=!0)=>(b,w)=>{const A=i.endpoints[y].select(x)(w());let T={patches:[],inversePatches:[],undo:()=>b(i.util.patchQueryData(y,x,T.inversePatches,_))};if(A.status==="uninitialized")return T;let M;if("data"in A)if(la(A.data)){const[k,I,R]=GV(A.data,S);T.patches.push(...I),T.inversePatches.push(...R),M=k}else M=S(A.data),T.patches.push({op:"replace",path:[],value:M}),T.inversePatches.push({op:"replace",path:[],value:A.data});return T.patches.length===0||b(i.util.patchQueryData(y,x,T.patches,_)),T},l=(y,x,S)=>_=>_(i.endpoints[y].initiate(x,{subscribe:!1,forceRefetch:!0,[uv]:()=>({data:S})})),u=async(y,{signal:x,abort:S,rejectWithValue:_,fulfillWithValue:b,dispatch:w,getState:C,extra:A})=>{const T=r[y.endpointName];try{let M=oO,k;const I={signal:x,abort:S,dispatch:w,getState:C,extra:A,endpoint:y.endpointName,type:y.type,forced:y.type==="query"?c(y,C()):void 0},R=y.type==="query"?y[uv]:void 0;if(R?k=R():T.query?(k=await t(T.query(y.originalArgs),I,T.extraOptions),T.transformResponse&&(M=T.transformResponse)):k=await T.queryFn(y.originalArgs,I,T.extraOptions,L=>t(L,I,T.extraOptions)),typeof process<"u",k.error)throw new iO(k.error,k.meta);return b(await M(k.data,k.meta,y.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:k.meta,[nf]:!0})}catch(M){let k=M;if(k instanceof iO){let I=oO;T.query&&T.transformErrorResponse&&(I=T.transformErrorResponse);try{return _(await I(k.value,k.meta,y.originalArgs),{baseQueryMeta:k.meta,[nf]:!0})}catch(R){k=R}}throw typeof process<"u",console.error(k),k}};function c(y,x){var C,A,T;const S=(A=(C=x[e])==null?void 0:C.queries)==null?void 0:A[y.queryCacheKey],_=(T=x[e])==null?void 0:T.config.refetchOnMountOrArgChange,b=S==null?void 0:S.fulfilledTimeStamp,w=y.forceRefetch??(y.subscribe&&_);return w?w===!0||(Number(new Date)-Number(b))/1e3>=w:!1}const f=FR(`${e}/executeQuery`,u,{getPendingMeta(){return{startedTimeStamp:Date.now(),[nf]:!0}},condition(y,{getState:x}){var T,M,k;const S=x(),_=(M=(T=S[e])==null?void 0:T.queries)==null?void 0:M[y.queryCacheKey],b=_==null?void 0:_.fulfilledTimeStamp,w=y.originalArgs,C=_==null?void 0:_.originalArgs,A=r[y.endpointName];return XT(y)?!0:(_==null?void 0:_.status)==="pending"?!1:c(y,S)||RH(A)&&((k=A==null?void 0:A.forceRefetch)!=null&&k.call(A,{currentArg:w,previousArg:C,endpointState:_,state:S}))?!0:!b},dispatchConditionRejection:!0}),d=FR(`${e}/executeMutation`,u,{getPendingMeta(){return{startedTimeStamp:Date.now(),[nf]:!0}}}),h=y=>"force"in y,p=y=>"ifOlderThan"in y,v=(y,x,S)=>(_,b)=>{const w=h(S)&&S.force,C=p(S)&&S.ifOlderThan,A=(M=!0)=>{const k={forceRefetch:M,isPrefetch:!0};return i.endpoints[y].initiate(x,k)},T=i.endpoints[y].select(x)(b());if(w)_(A());else if(C){const M=T==null?void 0:T.fulfilledTimeStamp;if(!M){_(A());return}(Number(new Date)-Number(new Date(M)))/1e3>=C&&_(A())}else _(A(!1))};function g(y){return x=>{var S,_;return((_=(S=x==null?void 0:x.meta)==null?void 0:S.arg)==null?void 0:_.endpointName)===y}}function m(y,x){return{matchPending:ap(FM(y),g(x)),matchFulfilled:ap(Hs(y),g(x)),matchRejected:ap(zf(y),g(x))}}return{queryThunk:f,mutationThunk:d,prefetch:v,updateQueryData:s,upsertQueryData:l,patchQueryData:o,buildMatchThunkActions:m}}function LH(e,t,r,n){return Jk(r[e.meta.arg.endpointName][t],Hs(e)?e.payload:void 0,ix(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function um(e,t,r){const n=e[t];n&&r(n)}function cv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function sO(e,t,r){const n=e[cv(t)];n&&r(n)}var Qd={};function Zpe({reducerPath:e,queryThunk:t,mutationThunk:r,context:{endpointDefinitions:n,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:o},assertTagType:s,config:l}){const u=un(`${e}/resetApiState`),c=Si({name:`${e}/queries`,initialState:Qd,reducers:{removeQueryResult:{reducer(x,{payload:{queryCacheKey:S}}){delete x[S]},prepare:Gd()},queryResultPatched:{reducer(x,{payload:{queryCacheKey:S,patches:_}}){um(x,S,b=>{b.data=LR(b.data,_.concat())})},prepare:Gd()}},extraReducers(x){x.addCase(t.pending,(S,{meta:_,meta:{arg:b}})=>{var C;const w=XT(b);S[C=b.queryCacheKey]??(S[C]={status:"uninitialized",endpointName:b.endpointName}),um(S,b.queryCacheKey,A=>{A.status="pending",A.requestId=w&&A.requestId?A.requestId:_.requestId,b.originalArgs!==void 0&&(A.originalArgs=b.originalArgs),A.startedTimeStamp=_.startedTimeStamp})}).addCase(t.fulfilled,(S,{meta:_,payload:b})=>{um(S,_.arg.queryCacheKey,w=>{if(w.requestId!==_.requestId&&!XT(_.arg))return;const{merge:C}=n[_.arg.endpointName];if(w.status="fulfilled",C)if(w.data!==void 0){const{fulfilledTimeStamp:A,arg:T,baseQueryMeta:M,requestId:k}=_;let I=Yv(w.data,R=>C(R,b,{arg:T.originalArgs,baseQueryMeta:M,fulfilledTimeStamp:A,requestId:k}));w.data=I}else w.data=b;else w.data=n[_.arg.endpointName].structuralSharing??!0?IH(sa(w.data)?xZ(w.data):w.data,b):b;delete w.error,w.fulfilledTimeStamp=_.fulfilledTimeStamp})}).addCase(t.rejected,(S,{meta:{condition:_,arg:b,requestId:w},error:C,payload:A})=>{um(S,b.queryCacheKey,T=>{if(!_){if(T.requestId!==w)return;T.status="rejected",T.error=A??C}})}).addMatcher(o,(S,_)=>{const{queries:b}=a(_);for(const[w,C]of Object.entries(b))((C==null?void 0:C.status)==="fulfilled"||(C==null?void 0:C.status)==="rejected")&&(S[w]=C)})}}),f=Si({name:`${e}/mutations`,initialState:Qd,reducers:{removeMutationResult:{reducer(x,{payload:S}){const _=cv(S);_ in x&&delete x[_]},prepare:Gd()}},extraReducers(x){x.addCase(r.pending,(S,{meta:_,meta:{requestId:b,arg:w,startedTimeStamp:C}})=>{w.track&&(S[cv(_)]={requestId:b,status:"pending",endpointName:w.endpointName,startedTimeStamp:C})}).addCase(r.fulfilled,(S,{payload:_,meta:b})=>{b.arg.track&&sO(S,b,w=>{w.requestId===b.requestId&&(w.status="fulfilled",w.data=_,w.fulfilledTimeStamp=b.fulfilledTimeStamp)})}).addCase(r.rejected,(S,{payload:_,error:b,meta:w})=>{w.arg.track&&sO(S,w,C=>{C.requestId===w.requestId&&(C.status="rejected",C.error=_??b)})}).addMatcher(o,(S,_)=>{const{mutations:b}=a(_);for(const[w,C]of Object.entries(b))((C==null?void 0:C.status)==="fulfilled"||(C==null?void 0:C.status)==="rejected")&&w!==(C==null?void 0:C.requestId)&&(S[w]=C)})}}),d=Si({name:`${e}/invalidation`,initialState:Qd,reducers:{updateProvidedBy:{reducer(x,S){var w,C;const{queryCacheKey:_,providedTags:b}=S.payload;for(const A of Object.values(x))for(const T of Object.values(A)){const M=T.indexOf(_);M!==-1&&T.splice(M,1)}for(const{type:A,id:T}of b){const M=(w=x[A]??(x[A]={}))[C=T||"__internal_without_id"]??(w[C]=[]);M.includes(_)||M.push(_)}},prepare:Gd()}},extraReducers(x){x.addCase(c.actions.removeQueryResult,(S,{payload:{queryCacheKey:_}})=>{for(const b of Object.values(S))for(const w of Object.values(b)){const C=w.indexOf(_);C!==-1&&w.splice(C,1)}}).addMatcher(o,(S,_)=>{var w,C;const{provided:b}=a(_);for(const[A,T]of Object.entries(b))for(const[M,k]of Object.entries(T)){const I=(w=S[A]??(S[A]={}))[C=M||"__internal_without_id"]??(w[C]=[]);for(const R of k)I.includes(R)||I.push(R)}}).addMatcher(Ro(Hs(t),ix(t)),(S,_)=>{const b=LH(_,"providesTags",n,s),{queryCacheKey:w}=_.meta.arg;d.caseReducers.updateProvidedBy(S,d.actions.updateProvidedBy({queryCacheKey:w,providedTags:b}))})}}),h=Si({name:`${e}/subscriptions`,initialState:Qd,reducers:{updateSubscriptionOptions(x,S){},unsubscribeQueryResult(x,S){},internal_getRTKQSubscriptions(){}}}),p=Si({name:`${e}/internalSubscriptions`,initialState:Qd,reducers:{subscriptionsUpdated:{reducer(x,S){return LR(x,S.payload)},prepare:Gd()}}}),v=Si({name:`${e}/config`,initialState:{online:$pe(),focused:Vpe(),middlewareRegistered:!1,...l},reducers:{middlewareRegistered(x,{payload:S}){x.middlewareRegistered=x.middlewareRegistered==="conflict"||i!==S?"conflict":!0}},extraReducers:x=>{x.addCase(Qk,S=>{S.online=!0}).addCase(DH,S=>{S.online=!1}).addCase(Kk,S=>{S.focused=!0}).addCase(PH,S=>{S.focused=!1}).addMatcher(o,S=>({...S}))}}),g=tx({queries:c.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:p.reducer,config:v.reducer}),m=(x,S)=>g(u.match(S)?void 0:x,S),y={...v.actions,...c.actions,...h.actions,...p.actions,...f.actions,...d.actions,resetApiState:u};return{reducer:m,actions:y}}var nu=Symbol.for("RTKQ/skipToken"),EH={status:"uninitialized"},lO=Yv(EH,()=>{}),uO=Yv(EH,()=>{});function Kpe({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const n=f=>lO,i=f=>uO;return{buildQuerySelector:s,buildMutationSelector:l,selectInvalidatedBy:u,selectCachedArgsForQuery:c};function a(f){return{...f,...Ope(f.status)}}function o(f){return f[t]}function s(f,d){return h=>{const p=e({queryArgs:h,endpointDefinition:d,endpointName:f});return r(h===nu?n:m=>{var y,x;return((x=(y=o(m))==null?void 0:y.queries)==null?void 0:x[p])??lO},a)}}function l(){return f=>{let d;return typeof f=="object"?d=cv(f)??nu:d=f,r(d===nu?i:v=>{var g,m;return((m=(g=o(v))==null?void 0:g.mutations)==null?void 0:m[d])??uO},a)}}function u(f,d){const h=f[t],p=new Set;for(const v of d.map(YT)){const g=h.provided[v.type];if(!g)continue;let m=(v.id!==void 0?g[v.id]:eO(Object.values(g)))??[];for(const y of m)p.add(y)}return eO(Array.from(p.values()).map(v=>{const g=h.queries[v];return g?[{queryCacheKey:v,endpointName:g.endpointName,originalArgs:g.originalArgs}]:[]}))}function c(f,d){return Object.values(f[t].queries).filter(h=>(h==null?void 0:h.endpointName)===d&&h.status!=="uninitialized").map(h=>h.originalArgs)}}var pc=WeakMap?new WeakMap:void 0,cO=({endpointName:e,queryArgs:t})=>{let r="";const n=pc==null?void 0:pc.get(t);if(typeof n=="string")r=n;else{const i=JSON.stringify(t,(a,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=Xa(o)?Object.keys(o).sort().reduce((s,l)=>(s[l]=o[l],s),{}):o,o));Xa(t)&&(pc==null||pc.set(t,i)),r=i}return`${e}(${r})`};function Qpe(...e){return function(r){const n=ev(u=>{var c;return(c=r.extractRehydrationInfo)==null?void 0:c.call(r,u,{reducerPath:r.reducerPath??"api"})}),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(u){let c=cO;if("serializeQueryArgs"in u.endpointDefinition){const f=u.endpointDefinition.serializeQueryArgs;c=d=>{const h=f(d);return typeof h=="string"?h:cO({...d,queryArgs:h})}}else r.serializeQueryArgs&&(c=r.serializeQueryArgs);return c(u)},tagTypes:[...r.tagTypes||[]]},a={endpointDefinitions:{},batch(u){u()},apiUid:BM(),extractRehydrationInfo:n,hasRehydrationInfo:ev(u=>n(u)!=null)},o={injectEndpoints:l,enhanceEndpoints({addTagTypes:u,endpoints:c}){if(u)for(const f of u)i.tagTypes.includes(f)||i.tagTypes.push(f);if(c)for(const[f,d]of Object.entries(c))typeof d=="function"?d(a.endpointDefinitions[f]):Object.assign(a.endpointDefinitions[f]||{},d);return o}},s=e.map(u=>u.init(o,i,a));function l(u){const c=u.endpoints({query:f=>({...f,type:"query"}),mutation:f=>({...f,type:"mutation"})});for(const[f,d]of Object.entries(c)){if(u.overrideExisting!==!0&&f in a.endpointDefinitions){if(u.overrideExisting==="throw")throw new Error(Zr(39));typeof process<"u";continue}a.endpointDefinitions[f]=d;for(const h of s)h.injectEndpoint(f,d)}return o}return o.injectEndpoints({endpoints:r.endpoints})}}function Jpe(e){for(let t in e)return!1;return!0}var eve=2147483647/1e3-1,tve=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:i})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions,s=Ro(o.match,r.fulfilled,r.rejected);function l(d){const h=i.currentSubscriptions[d];return!!h&&!Jpe(h)}const u={},c=(d,h,p)=>{var v;if(s(d)){const g=h.getState()[e],{queryCacheKey:m}=o.match(d)?d.payload:d.meta.arg;f(m,(v=g.queries[m])==null?void 0:v.endpointName,h,g.config)}if(t.util.resetApiState.match(d))for(const[g,m]of Object.entries(u))m&&clearTimeout(m),delete u[g];if(n.hasRehydrationInfo(d)){const g=h.getState()[e],{queries:m}=n.extractRehydrationInfo(d);for(const[y,x]of Object.entries(m))f(y,x==null?void 0:x.endpointName,h,g.config)}};function f(d,h,p,v){const g=n.endpointDefinitions[h],m=(g==null?void 0:g.keepUnusedDataFor)??v.keepUnusedDataFor;if(m===1/0)return;const y=Math.max(0,Math.min(m,eve));if(!l(d)){const x=u[d];x&&clearTimeout(x),u[d]=setTimeout(()=>{l(d)||p.dispatch(a({queryCacheKey:d})),delete u[d]},y*1e3)}}return c},rve=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:i,api:a,assertTagType:o,refetchQuery:s,internalState:l})=>{const{removeQueryResult:u}=a.internalActions,c=Ro(Hs(n),ix(n)),f=Ro(Hs(n,i),zf(n,i));let d=[];const h=(g,m)=>{c(g)?v(LH(g,"invalidatesTags",r,o),m):f(g)?v([],m):a.util.invalidateTags.match(g)&&v(Jk(g.payload,void 0,void 0,void 0,void 0,o),m)};function p(g){var m,y;for(const x in g.queries)if(((m=g.queries[x])==null?void 0:m.status)==="pending")return!0;for(const x in g.mutations)if(((y=g.mutations[x])==null?void 0:y.status)==="pending")return!0;return!1}function v(g,m){const y=m.getState(),x=y[e];if(d.push(...g),x.config.invalidationBehavior==="delayed"&&p(x))return;const S=d;if(d=[],S.length===0)return;const _=a.util.selectInvalidatedBy(y,S);t.batch(()=>{const b=Array.from(_.values());for(const{queryCacheKey:w}of b){const C=x.queries[w],A=l.currentSubscriptions[w]??{};C&&(_f(A)===0?m.dispatch(u({queryCacheKey:w})):C.status!=="uninitialized"&&m.dispatch(s(C,w)))}})}return h},nve=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:i})=>{const a={},o=(d,h)=>{(r.internalActions.updateSubscriptionOptions.match(d)||r.internalActions.unsubscribeQueryResult.match(d))&&l(d.payload,h),(t.pending.match(d)||t.rejected.match(d)&&d.meta.condition)&&l(d.meta.arg,h),(t.fulfilled.match(d)||t.rejected.match(d)&&!d.meta.condition)&&s(d.meta.arg,h),r.util.resetApiState.match(d)&&c()};function s({queryCacheKey:d},h){const p=h.getState()[e],v=p.queries[d],g=i.currentSubscriptions[d];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:m,skipPollingIfUnfocused:y}=f(g);if(!Number.isFinite(m))return;const x=a[d];x!=null&&x.timeout&&(clearTimeout(x.timeout),x.timeout=void 0);const S=Date.now()+m;a[d]={nextPollTimestamp:S,pollingInterval:m,timeout:setTimeout(()=>{(p.config.focused||!y)&&h.dispatch(n(v,d)),s({queryCacheKey:d},h)},m)}}function l({queryCacheKey:d},h){const v=h.getState()[e].queries[d],g=i.currentSubscriptions[d];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:m}=f(g);if(!Number.isFinite(m)){u(d);return}const y=a[d],x=Date.now()+m;(!y||x<y.nextPollTimestamp)&&s({queryCacheKey:d},h)}function u(d){const h=a[d];h!=null&&h.timeout&&clearTimeout(h.timeout),delete a[d]}function c(){for(const d of Object.keys(a))u(d)}function f(d={}){let h=!1,p=Number.POSITIVE_INFINITY;for(let v in d)d[v].pollingInterval&&(p=Math.min(d[v].pollingInterval,p),h=d[v].skipPollingIfUnfocused||h);return{lowestPollingInterval:p,skipPollingIfUnfocused:h}}return o},ive=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:i})=>{const{removeQueryResult:a}=r.internalActions,o=(l,u)=>{Kk.match(l)&&s(u,"refetchOnFocus"),Qk.match(l)&&s(u,"refetchOnReconnect")};function s(l,u){const c=l.getState()[e],f=c.queries,d=i.currentSubscriptions;t.batch(()=>{for(const h of Object.keys(d)){const p=f[h],v=d[h];if(!v||!p)continue;(Object.values(v).some(m=>m[u]===!0)||Object.values(v).every(m=>m[u]===void 0)&&c.config[u])&&(_f(v)===0?l.dispatch(a({queryCacheKey:h})):p.status!=="uninitialized"&&l.dispatch(n(p,h)))}})}return o},fO=new Error("Promise never resolved before cacheEntryRemoved."),ave=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:i,internalState:a})=>{const o=ST(n),s=ST(i),l=Hs(n,i),u={},c=(h,p,v)=>{const g=f(h);if(n.pending.match(h)){const m=v[t].queries[g],y=p.getState()[t].queries[g];!m&&y&&d(h.meta.arg.endpointName,h.meta.arg.originalArgs,g,p,h.meta.requestId)}else if(i.pending.match(h))p.getState()[t].mutations[g]&&d(h.meta.arg.endpointName,h.meta.arg.originalArgs,g,p,h.meta.requestId);else if(l(h)){const m=u[g];m!=null&&m.valueResolved&&(m.valueResolved({data:h.payload,meta:h.meta.baseQueryMeta}),delete m.valueResolved)}else if(e.internalActions.removeQueryResult.match(h)||e.internalActions.removeMutationResult.match(h)){const m=u[g];m&&(delete u[g],m.cacheEntryRemoved())}else if(e.util.resetApiState.match(h))for(const[m,y]of Object.entries(u))delete u[m],y.cacheEntryRemoved()};function f(h){return o(h)?h.meta.arg.queryCacheKey:s(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:e.internalActions.removeQueryResult.match(h)?h.payload.queryCacheKey:e.internalActions.removeMutationResult.match(h)?cv(h.payload):""}function d(h,p,v,g,m){const y=r.endpointDefinitions[h],x=y==null?void 0:y.onCacheEntryAdded;if(!x)return;let S={};const _=new Promise(M=>{S.cacheEntryRemoved=M}),b=Promise.race([new Promise(M=>{S.valueResolved=M}),_.then(()=>{throw fO})]);b.catch(()=>{}),u[v]=S;const w=e.endpoints[h].select(y.type==="query"?p:v),C=g.dispatch((M,k,I)=>I),A={...g,getCacheEntry:()=>w(g.getState()),requestId:m,extra:C,updateCachedData:y.type==="query"?M=>g.dispatch(e.util.updateQueryData(h,p,M)):void 0,cacheDataLoaded:b,cacheEntryRemoved:_},T=x(p,A);Promise.resolve(T).catch(M=>{if(M!==fO)throw M})}return c},ove=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{const i=FM(r,n),a=zf(r,n),o=Hs(r,n),s={};return(u,c)=>{var f,d;if(i(u)){const{requestId:h,arg:{endpointName:p,originalArgs:v}}=u.meta,g=t.endpointDefinitions[p],m=g==null?void 0:g.onQueryStarted;if(m){const y={},x=new Promise((w,C)=>{y.resolve=w,y.reject=C});x.catch(()=>{}),s[h]=y;const S=e.endpoints[p].select(g.type==="query"?v:h),_=c.dispatch((w,C,A)=>A),b={...c,getCacheEntry:()=>S(c.getState()),requestId:h,extra:_,updateCachedData:g.type==="query"?w=>c.dispatch(e.util.updateQueryData(p,v,w)):void 0,queryFulfilled:x};m(v,b)}}else if(o(u)){const{requestId:h,baseQueryMeta:p}=u.meta;(f=s[h])==null||f.resolve({data:u.payload,meta:p}),delete s[h]}else if(a(u)){const{requestId:h,rejectedWithValue:p,baseQueryMeta:v}=u.meta;(d=s[h])==null||d.reject({error:u.payload??u.error,isUnhandledError:!p,meta:v}),delete s[h]}}},sve=({api:e,context:{apiUid:t},reducerPath:r})=>(n,i)=>{e.util.resetApiState.match(n)&&i.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},lve=({api:e,queryThunk:t,internalState:r})=>{const n=`${e.reducerPath}/subscriptions`;let i=null,a=null;const{updateSubscriptionOptions:o,unsubscribeQueryResult:s}=e.internalActions,l=(h,p)=>{var g,m,y;if(o.match(p)){const{queryCacheKey:x,requestId:S,options:_}=p.payload;return(g=h==null?void 0:h[x])!=null&&g[S]&&(h[x][S]=_),!0}if(s.match(p)){const{queryCacheKey:x,requestId:S}=p.payload;return h[x]&&delete h[x][S],!0}if(e.internalActions.removeQueryResult.match(p))return delete h[p.payload.queryCacheKey],!0;if(t.pending.match(p)){const{meta:{arg:x,requestId:S}}=p,_=h[m=x.queryCacheKey]??(h[m]={});return _[`${S}_running`]={},x.subscribe&&(_[S]=x.subscriptionOptions??_[S]??{}),!0}let v=!1;if(t.fulfilled.match(p)||t.rejected.match(p)){const x=h[p.meta.arg.queryCacheKey]||{},S=`${p.meta.requestId}_running`;v||(v=!!x[S]),delete x[S]}if(t.rejected.match(p)){const{meta:{condition:x,arg:S,requestId:_}}=p;if(x&&S.subscribe){const b=h[y=S.queryCacheKey]??(h[y]={});b[_]=S.subscriptionOptions??b[_]??{},v=!0}}return v},u=()=>r.currentSubscriptions,d={getSubscriptions:u,getSubscriptionCount:h=>{const v=u()[h]??{};return _f(v)},isRequestSubscribed:(h,p)=>{var g;const v=u();return!!((g=v==null?void 0:v[h])!=null&&g[p])}};return(h,p)=>{if(i||(i=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(h))return i=r.currentSubscriptions={},a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(h))return[!1,d];const v=l(r.currentSubscriptions,h);let g=!0;if(v){a||(a=setTimeout(()=>{const x=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,S]=GV(i,()=>x);p.next(e.internalActions.subscriptionsUpdated(S)),i=x,a=null},500));const m=typeof h.type=="string"&&!!h.type.startsWith(n),y=t.rejected.match(h)&&h.meta.condition&&!!h.meta.arg.subscribe;g=!m&&!y}return[g,!1]}};function uve(e){const{reducerPath:t,queryThunk:r,api:n,context:i}=e,{apiUid:a}=i,o={invalidateTags:un(`${t}/invalidateTags`)},s=f=>f.type.startsWith(`${t}/`),l=[sve,tve,rve,nve,ave,ove];return{middleware:f=>{let d=!1;const p={...e,internalState:{currentSubscriptions:{}},refetchQuery:c,isThisApiSliceAction:s},v=l.map(y=>y(p)),g=lve(p),m=ive(p);return y=>x=>{if(!OV(x))return y(x);d||(d=!0,f.dispatch(n.internalActions.middlewareRegistered(a)));const S={...f,next:y},_=f.getState(),[b,w]=g(x,S,_);let C;if(b?C=y(x):C=w,f.getState()[t]&&(m(x,S,_),s(x)||i.hasRehydrationInfo(x)))for(let A of v)A(x,S,_);return C}},actions:o};function c(f,d,h={}){return r({type:"query",endpointName:f.endpointName,originalArgs:f.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:d,...h})}}function Zo(e,...t){return Object.assign(e,...t)}var dO=Symbol(),cve=({createSelector:e=zM}={})=>({name:dO,init(t,{baseQuery:r,tagTypes:n,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:o,refetchOnMountOrArgChange:s,refetchOnFocus:l,refetchOnReconnect:u,invalidationBehavior:c},f){kZ();const d=z=>(typeof process<"u",z);Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:Qk,onOffline:DH,onFocus:Kk,onFocusLost:PH},util:{}});const{queryThunk:h,mutationThunk:p,patchQueryData:v,updateQueryData:g,upsertQueryData:m,prefetch:y,buildMatchThunkActions:x}=qpe({baseQuery:r,reducerPath:i,context:f,api:t,serializeQueryArgs:a,assertTagType:d}),{reducer:S,actions:_}=Zpe({context:f,queryThunk:h,mutationThunk:p,reducerPath:i,assertTagType:d,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:o,reducerPath:i,invalidationBehavior:c}});Zo(t.util,{patchQueryData:v,updateQueryData:g,upsertQueryData:m,prefetch:y,resetApiState:_.resetApiState}),Zo(t.internalActions,_);const{middleware:b,actions:w}=uve({reducerPath:i,context:f,queryThunk:h,mutationThunk:p,api:t,assertTagType:d});Zo(t.util,w),Zo(t,{reducer:S,middleware:b});const{buildQuerySelector:C,buildMutationSelector:A,selectInvalidatedBy:T,selectCachedArgsForQuery:M}=Kpe({serializeQueryArgs:a,reducerPath:i,createSelector:e});Zo(t.util,{selectInvalidatedBy:T,selectCachedArgsForQuery:M});const{buildInitiateQuery:k,buildInitiateMutation:I,getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueriesThunk:N,getRunningQueryThunk:$}=Xpe({queryThunk:h,mutationThunk:p,api:t,serializeQueryArgs:a,context:f});return Zo(t.util,{getRunningMutationThunk:R,getRunningMutationsThunk:L,getRunningQueryThunk:$,getRunningQueriesThunk:N}),{name:dO,injectEndpoint(z,V){var G;const E=t;(G=E.endpoints)[z]??(G[z]={}),RH(V)?Zo(E.endpoints[z],{name:z,select:C(z,V),initiate:k(z,V)},x(h,z)):jpe(V)&&Zo(E.endpoints[z],{name:z,select:A(),initiate:I(z)},x(p,z))}}}});function fve(e){return e.type==="query"}function dve(e){return e.type==="mutation"}function cm(e,...t){return Object.assign(e,...t)}function qb(e){return e.replace(e[0],e[0].toUpperCase())}var vc=WeakMap?new WeakMap:void 0,hve=({endpointName:e,queryArgs:t})=>{let r="";const n=vc==null?void 0:vc.get(t);if(typeof n=="string")r=n;else{const i=JSON.stringify(t,(a,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=Xa(o)?Object.keys(o).sort().reduce((s,l)=>(s[l]=o[l],s),{}):o,o));Xa(t)&&(vc==null||vc.set(t,i)),r=i}return`${e}(${r})`},Zb=Symbol();function hO(e,t,r,n){const i=O.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:r,endpointName:n}):e}),[e,t,r,n]),a=O.useRef(i);return O.useEffect(()=>{a.current.serialized!==i.serialized&&(a.current=i)},[i]),a.current.serialized===i.serialized?a.current.queryArgs:e}function Kb(e){const t=O.useRef(e);return O.useEffect(()=>{Ns(t.current,e)||(t.current=e)},[e]),Ns(t.current,e)?t.current:e}var pve=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vve=pve(),gve=()=>typeof navigator<"u"&&navigator.product==="ReactNative",mve=gve(),yve=()=>vve||mve?O.useLayoutEffect:O.useEffect,xve=yve(),Sve=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:kH.pending}:e;function bve({api:e,moduleOptions:{batch:t,hooks:{useDispatch:r,useSelector:n,useStore:i},unstable__sideEffectsInRender:a,createSelector:o},serializeQueryArgs:s,context:l}){const u=a?p=>p():O.useEffect;return{buildQueryHooks:d,buildMutationHook:h,usePrefetch:f};function c(p,v,g){if(v!=null&&v.endpointName&&p.isUninitialized){const{endpointName:b}=v,w=l.endpointDefinitions[b];s({queryArgs:v.originalArgs,endpointDefinition:w,endpointName:b})===s({queryArgs:g,endpointDefinition:w,endpointName:b})&&(v=void 0)}let m=p.isSuccess?p.data:v==null?void 0:v.data;m===void 0&&(m=p.data);const y=m!==void 0,x=p.isLoading,S=(!v||v.isLoading||v.isUninitialized)&&!y&&x,_=p.isSuccess||x&&y;return{...p,data:m,currentData:p.data,isFetching:x,isLoading:S,isSuccess:_}}function f(p,v){const g=r(),m=Kb(v);return O.useCallback((y,x)=>g(e.util.prefetch(p,y,{...m,...x})),[p,g,m])}function d(p){const v=(y,{refetchOnReconnect:x,refetchOnFocus:S,refetchOnMountOrArgChange:_,skip:b=!1,pollingInterval:w=0,skipPollingIfUnfocused:C=!1}={})=>{const{initiate:A}=e.endpoints[p],T=r(),M=O.useRef(void 0);if(!M.current){const E=T(e.internalActions.internal_getRTKQSubscriptions());M.current=E}const k=hO(b?nu:y,hve,l.endpointDefinitions[p],p),I=Kb({refetchOnReconnect:x,refetchOnFocus:S,pollingInterval:w,skipPollingIfUnfocused:C}),R=O.useRef(!1),L=O.useRef(void 0);let{queryCacheKey:N,requestId:$}=L.current||{},z=!1;N&&$&&(z=M.current.isRequestSubscribed(N,$));const V=!z&&R.current;return u(()=>{R.current=z}),u(()=>{V&&(L.current=void 0)},[V]),u(()=>{var W;const E=L.current;if(typeof process<"u",k===nu){E==null||E.unsubscribe(),L.current=void 0;return}const G=(W=L.current)==null?void 0:W.subscriptionOptions;if(!E||E.arg!==k){E==null||E.unsubscribe();const F=T(A(k,{subscriptionOptions:I,forceRefetch:_}));L.current=F}else I!==G&&E.updateSubscriptionOptions(I)},[T,A,_,k,I,V]),O.useEffect(()=>()=>{var E;(E=L.current)==null||E.unsubscribe(),L.current=void 0},[]),O.useMemo(()=>({refetch:()=>{var E;if(!L.current)throw new Error(Zr(38));return(E=L.current)==null?void 0:E.refetch()}}),[])},g=({refetchOnReconnect:y,refetchOnFocus:x,pollingInterval:S=0,skipPollingIfUnfocused:_=!1}={})=>{const{initiate:b}=e.endpoints[p],w=r(),[C,A]=O.useState(Zb),T=O.useRef(void 0),M=Kb({refetchOnReconnect:y,refetchOnFocus:x,pollingInterval:S,skipPollingIfUnfocused:_});u(()=>{var L,N;const R=(L=T.current)==null?void 0:L.subscriptionOptions;M!==R&&((N=T.current)==null||N.updateSubscriptionOptions(M))},[M]);const k=O.useRef(M);u(()=>{k.current=M},[M]);const I=O.useCallback(function(R,L=!1){let N;return t(()=>{var $;($=T.current)==null||$.unsubscribe(),T.current=N=w(b(R,{subscriptionOptions:k.current,forceRefetch:!L})),A(R)}),N},[w,b]);return O.useEffect(()=>()=>{var R;(R=T==null?void 0:T.current)==null||R.unsubscribe()},[]),O.useEffect(()=>{C!==Zb&&!T.current&&I(C,!0)},[C,I]),O.useMemo(()=>[I,C],[I,C])},m=(y,{skip:x=!1,selectFromResult:S}={})=>{const{select:_}=e.endpoints[p],b=hO(x?nu:y,s,l.endpointDefinitions[p],p),w=O.useRef(void 0),C=O.useMemo(()=>o([_(b),(I,R)=>R,I=>b],c,{memoizeOptions:{resultEqualityCheck:Ns}}),[_,b]),A=O.useMemo(()=>S?o([C],S,{devModeChecks:{identityFunctionCheck:"never"}}):C,[C,S]),T=n(I=>A(I,w.current),Ns),M=i(),k=C(M.getState(),w.current);return xve(()=>{w.current=k},[k]),T};return{useQueryState:m,useQuerySubscription:v,useLazyQuerySubscription:g,useLazyQuery(y){const[x,S]=g(y),_=m(S,{...y,skip:S===Zb}),b=O.useMemo(()=>({lastArg:S}),[S]);return O.useMemo(()=>[x,_,b],[x,_,b])},useQuery(y,x){const S=v(y,x),_=m(y,{selectFromResult:y===nu||x!=null&&x.skip?void 0:Sve,...x}),{data:b,status:w,isLoading:C,isSuccess:A,isError:T,error:M}=_;return O.useDebugValue({data:b,status:w,isLoading:C,isSuccess:A,isError:T,error:M}),O.useMemo(()=>({..._,...S}),[_,S])}}}function h(p){return({selectFromResult:v,fixedCacheKey:g}={})=>{const{select:m,initiate:y}=e.endpoints[p],x=r(),[S,_]=O.useState();O.useEffect(()=>()=>{S!=null&&S.arg.fixedCacheKey||S==null||S.reset()},[S]);const b=O.useCallback(function(G){const W=x(y(G,{fixedCacheKey:g}));return _(W),W},[x,y,g]),{requestId:w}=S||{},C=O.useMemo(()=>m({fixedCacheKey:g,requestId:S==null?void 0:S.requestId}),[g,S,m]),A=O.useMemo(()=>v?o([C],v):C,[v,C]),T=n(A,Ns),M=g==null?S==null?void 0:S.arg.originalArgs:void 0,k=O.useCallback(()=>{t(()=>{S&&_(void 0),g&&x(e.internalActions.removeMutationResult({requestId:w,fixedCacheKey:g}))})},[x,g,S,w]),{endpointName:I,data:R,status:L,isLoading:N,isSuccess:$,isError:z,error:V}=T;O.useDebugValue({endpointName:I,data:R,status:L,isLoading:N,isSuccess:$,isError:z,error:V});const E=O.useMemo(()=>({...T,originalArgs:M,reset:k}),[T,M,k]);return O.useMemo(()=>[b,E],[b,E])}}}var _ve=Symbol(),wve=({batch:e=mQ,hooks:t={useDispatch:c6,useSelector:t6,useStore:u6},createSelector:r=zM,unstable__sideEffectsInRender:n=!1,...i}={})=>({name:_ve,init(a,{serializeQueryArgs:o},s){const l=a,{buildQueryHooks:u,buildMutationHook:c,usePrefetch:f}=bve({api:a,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:n,createSelector:r},serializeQueryArgs:o,context:s});return cm(l,{usePrefetch:f}),cm(s,{batch:e}),{injectEndpoint(d,h){if(fve(h)){const{useQuery:p,useLazyQuery:v,useLazyQuerySubscription:g,useQueryState:m,useQuerySubscription:y}=u(d);cm(l.endpoints[d],{useQuery:p,useLazyQuery:v,useLazyQuerySubscription:g,useQueryState:m,useQuerySubscription:y}),a[`use${qb(d)}Query`]=p,a[`useLazy${qb(d)}Query`]=v}else if(dve(h)){const p=c(d);cm(l.endpoints[d],{useMutation:p}),a[`use${qb(d)}Mutation`]=p}}}}}),Cve=Qpe(cve(),wve());const $0=Cve({baseQuery:Wpe(),endpoints:e=>({getStats:e.query({query:()=>"stats/requests",transformResponse:af}),getTasks:e.query({query:()=>"tasks",transformResponse:af}),getExceptions:e.query({query:()=>"exceptions",transformResponse:af}),getLogs:e.query({query:()=>"logs",transformResponse:af}),startSwarm:e.mutation({query:t=>({url:"swarm",method:"POST",body:Spe(qR(t)),headers:{"content-type":"application/x-www-form-urlencoded"}})}),updateUserSettings:e.mutation({query:t=>({url:"user",method:"POST",body:qR(t)})})})}),{useGetStatsQuery:Tve,useGetTasksQuery:Ave,useGetExceptionsQuery:Mve,useGetLogsQuery:kve,useStartSwarmMutation:Ive,useUpdateUserSettingsMutation:Pve}=$0;function og(e,{payload:t}){return xpe(e,t)}const Dve=ja,OH=Si({name:"swarm",initialState:Dve,reducers:{setSwarm:og}}),eI=OH.actions,Rve=OH.reducer;function Lve({availableTasks:e,userToEdit:t,handleEditUser:r}){const{tasks:n,...i}=t.userClass;return P.jsx(AH,{onSubmit:r,children:P.jsxs(Pt,{sx:{display:"flex",flexDirection:"column",rowGap:4,my:2},children:[P.jsx(dt,{children:`${t.userClassName} Settings`}),P.jsx(Lk,{defaultValue:n,label:"Tasks",multiple:!0,name:"tasks",options:e}),Object.entries(i).map(([a,o])=>P.jsx(Xf,{defaultValue:o,inputProps:{"data-type":typeof o=="number"?"number":"text"},label:wT(a),name:a},`user-to-edit-${a}`)),P.jsx(Ka,{size:"large",type:"submit",variant:"contained",children:"Save"})]})})}function Eve({availableUserClasses:e,availableUserTasks:t,selectedUserClasses:r,setSelectedUserClasses:n,setSwarm:i,users:a}){const[o,s]=O.useState(!1),[l,u]=O.useState(),[c]=Pve(),f=g=>{l&&(i({users:{...a,[l.userClassName]:g}}),c({...g,userClassName:l.userClassName}),s(!1))},d=g=>()=>r.includes(g)?n(r.filter(m=>m!==g)):n(r.concat(g)),h=r.length,p=e.length,v=g=>g.target.checked?n(e):n([]);return P.jsxs(P.Fragment,{children:[P.jsx(Pt,{sx:{position:"relative",border:"1px",borderColor:"divider",borderStyle:"solid",padding:2,borderRadius:1},children:P.jsxs(Pt,{sx:{maxHeight:"30vh",overflow:"auto"},children:[P.jsx(Xx,{shrink:!0,sx:{position:"absolute",backgroundColor:"background.paper",width:"fit-content",top:"0",marginTop:"-5px",padding:"0 5px"},children:"User Classes"}),P.jsx(gG,{children:P.jsx(IG,{component:rl,children:P.jsxs(MG,{children:[P.jsx(PG,{children:P.jsx(O0,{children:P.jsx(Yl,{colSpan:4,padding:"checkbox",children:P.jsx(NT,{checked:p>0&&h===p,indeterminate:h>0&&h<p,onChange:v})})})}),P.jsx(kG,{children:Object.entries(a).map(([g,m])=>P.jsxs(O0,{hover:!0,children:[P.jsx(Yl,{onClick:d(g),padding:"checkbox",children:P.jsx(NT,{checked:r.includes(g)})}),P.jsx(Yl,{children:g}),P.jsx(Yl,{children:P.jsx(dt,{variant:"subtitle2",children:m.host})}),P.jsx(Yl,{align:"right",children:P.jsx(cd,{onClick:()=>{s(!o),u({userClass:m,userClassName:g})},children:P.jsx(MH,{})})})]},`user-class-${g}`))})]})})})]})}),P.jsx(eS,{onClose:()=>s(!1),open:o,children:l&&P.jsx(Lve,{availableTasks:t[l.userClassName],handleEditUser:f,userToEdit:l})})]})}const Ove={setSwarm:eI.setSwarm},Nve=({swarm:{availableUserTasks:e,users:t}})=>({availableUserTasks:e,users:t}),zve=ai(Nve,Ove)(Eve);function Bve({availableShapeClasses:e,availableUserClasses:t,host:r,extraOptions:n,hideCommonOptions:i,shapeUseCommonOptions:a,numUsers:o,userCount:s,overrideHostWarning:l,runTime:u,setSwarm:c,showUserclassPicker:f,spawnRate:d,alert:h,isDisabled:p=!1,isEditSwarm:v=!1,onFormChange:g,onFormSubmit:m}){const[y]=Ive(),[x,S]=O.useState(""),[_,b]=O.useState(t),w=async T=>{const{data:M}=await y({...T,...f&&_?{userClasses:_}:{}});M&&M.success?c({state:qr.RUNNING,host:T.host||r,runTime:T.runTime,spawnRate:T.spawnRate,userCount:T.userCount}):S(M?M.message:"An unknown error occured."),m&&m(T)},C=T=>{x&&S(""),g&&g(T)},A=T=>{if(!a){const M=T.target.value!==e[0];c({hideCommonOptions:M})}};return P.jsxs(ng,{maxWidth:"md",sx:{my:2},children:[P.jsx(dt,{component:"h2",noWrap:!0,variant:"h6",children:v?"Edit running load test":"Start new load test"}),!v&&f&&P.jsx(Pt,{marginBottom:2,marginTop:2,children:P.jsx(zve,{availableUserClasses:t,selectedUserClasses:_,setSelectedUserClasses:b})}),P.jsx(AH,{onChange:C,onSubmit:w,children:P.jsxs(Pt,{sx:{marginBottom:2,marginTop:2,display:"flex",flexDirection:"column",rowGap:4},children:[!v&&f&&P.jsx(Lk,{label:"Shape Class",name:"shapeClass",onChange:A,options:e}),P.jsx(JE,{defaultValue:i&&"0"||s||o||1,disabled:!!i,label:"Number of users (peak concurrency)",name:"userCount",required:!0,title:i?"Disabled for tests using LoadTestShape class":""}),P.jsx(JE,{defaultValue:i&&"0"||d||1,disabled:!!i,label:"Ramp up (users started/second)",name:"spawnRate",required:!0,title:i?"Disabled for tests using LoadTestShape class":""}),!v&&P.jsxs(P.Fragment,{children:[P.jsx(Xf,{defaultValue:r,label:`Host ${l?"(setting this will override the host for the User classes)":""}`,name:"host"}),P.jsxs(gk,{children:[P.jsx(yk,{expandIcon:P.jsx(rS,{}),children:P.jsx(dt,{children:"Advanced options"})}),P.jsx(mk,{children:P.jsx(Xf,{defaultValue:u,disabled:!!i,label:"Run time (e.g. 20, 20s, 3m, 2h, 1h20m, 3h30m10s, etc.)",name:"runTime",sx:{width:"100%"},title:i?"Disabled for tests using LoadTestShape class":""})})]})]}),!TH(n)&&P.jsx(Ppe,{extraOptions:n}),h&&!x&&P.jsx(sf,{severity:h.level||"info",children:h.message}),x&&P.jsx(sf,{severity:"error",children:x}),P.jsx(Ka,{disabled:p,size:"large",type:"submit",variant:"contained",children:v?"Update":"Start"})]})})]})}const Fve=({swarm:{availableShapeClasses:e,availableUserClasses:t,extraOptions:r,hideCommonOptions:n,shapeUseCommonOptions:i,host:a,numUsers:o,userCount:s,overrideHostWarning:l,runTime:u,spawnRate:c,showUserclassPicker:f}})=>({availableShapeClasses:e,availableUserClasses:t,extraOptions:r,hideCommonOptions:n,shapeUseCommonOptions:i,host:a,overrideHostWarning:l,showUserclassPicker:f,numUsers:o,userCount:s,runTime:u,spawnRate:c}),$ve={setSwarm:eI.setSwarm},tI=ai(Fve,$ve)(Bve);function Vve(e){const[t,r]=O.useState(!1),{hideCommonOptions:n}=si(({swarm:i})=>i);return P.jsxs(P.Fragment,{children:[P.jsx(TG,{title:n?"Disabled for tests using LoadTestShape class":"",children:P.jsx(Pt,{children:P.jsx(Ka,{color:"secondary",disabled:!!n,onClick:()=>r(!0),sx:{minHeight:"100%"},type:"button",variant:"contained",children:"Edit"})})}),P.jsx(eS,{onClose:()=>r(!1),open:t,children:P.jsx(tI,{...e,isEditSwarm:!0,onFormSubmit:()=>r(!1)})})]})}function Gve(e){const[t,r]=O.useState(!1);return P.jsxs(P.Fragment,{children:[P.jsx(Ka,{color:"success",onClick:()=>r(!0),type:"button",variant:"contained",children:"New"}),P.jsx(eS,{onClose:()=>r(!1),open:t,children:P.jsx(tI,{...e})})]})}function Hve(){const e=()=>{fetch("stats/reset")};return P.jsx(Ka,{color:"warning",onClick:e,type:"button",variant:"contained",children:"Reset"})}function Wve(){const[e,t]=O.useState(!1);O.useEffect(()=>{t(!1)},[]);const r=()=>{fetch("stop"),t(!0)};return P.jsx(Ka,{color:"error",disabled:e,onClick:r,type:"button",variant:"contained",children:e?"Loading":"Stop"})}function jve(){const e=si(({swarm:t})=>t.state);return e===qr.READY?null:P.jsxs(Pt,{sx:{display:"flex",columnGap:2,marginY:"auto",height:"50px"},children:[e===qr.STOPPED?P.jsx(Gve,{}):P.jsxs(P.Fragment,{children:[P.jsx(Vve,{}),P.jsx(Wve,{})]}),P.jsx(Hve,{})]})}function Uve(){return P.jsx(dne,{position:"static",children:P.jsx(ng,{maxWidth:"xl",children:P.jsxs(tue,{disableGutters:!0,sx:{display:"flex",justifyContent:"space-between",columnGap:2},children:[P.jsx(Lr,{color:"inherit",href:"/",sx:{display:"flex",alignItems:"center"},underline:"none",children:P.jsx(DG,{})}),P.jsxs(Pt,{sx:{display:"flex",columnGap:6},children:[P.jsx(wpe,{}),P.jsx(jve,{}),P.jsx(_H,{})]})]})})})}function Yve({children:e}){return P.jsxs(P.Fragment,{children:[P.jsxs(Pt,{sx:{minHeight:"calc(100vh - var(--footer-height))"},children:[P.jsx(Uve,{}),P.jsx("main",{children:e})]}),P.jsx(ype,{})]})}const NH=e=>e.includes("WARNING")||e.includes("ERROR")||e.includes("CRITICAL"),zH="logViewer";function fv(e,t,{shouldRunInterval:r,immediate:n}={shouldRunInterval:!0,immediate:!1}){const i=O.useRef(e);O.useEffect(()=>{i.current=e},[e]),O.useEffect(()=>{if(!r)return;n&&i.current();const a=setInterval(()=>i.current(),t);return()=>{clearInterval(a)}},[t,r])}const Xve={},BH=Si({name:"notification",initialState:Xve,reducers:{setNotification:og}}),FH=BH.actions,qve=BH.reducer;function Zve(e,{key:t,shouldNotify:r}){const n=xo(FH.setNotification),i=si(({url:{query:o}})=>o&&o.tab),a=`${t}Notification`;O.useEffect(()=>{e.length>0&&e.length<localStorage[a]&&(localStorage[a]=e.length),e.length>(localStorage[a]||0)&&(!i||i!==t)&&(!r||r&&r(a))&&(n({[t]:!0}),localStorage[a]=e.length)},[e])}const Kve={master:[],workers:{}},$H=Si({name:"logViewer",initialState:Kve,reducers:{setLogs:og}}),Qve=$H.actions,Jve=$H.reducer,VH=e=>e.reduce((t,r)=>t.concat(Array.isArray(r)?VH(r):r),[]),ege={master:[],workers:{}};function tge(){const e=si(({swarm:l})=>l),t=xo(Qve.setLogs),{data:r,refetch:n}=kve(),i=r||ege,a=O.useMemo(()=>VH(Object.values(i.workers)),[i.workers]),o=O.useMemo(()=>[...i.master].concat(a),[i.master,i.workers]),s=O.useCallback(l=>o.slice(localStorage[l]).some(NH),[o]);return fv(n,5e3,{shouldRunInterval:e.state===qr.SPAWNING||e.state==qr.RUNNING}),Zve(o,{key:zH,shouldNotify:s}),O.useEffect(()=>{t(i)},[i]),i}var rI={},rge=Xu;Object.defineProperty(rI,"__esModule",{value:!0});var nI=rI.default=void 0,nge=rge(qu()),pO=P,ige=(0,nge.default)([(0,pO.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,pO.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");nI=rI.default=ige;function age(e,t){const r=t?-1:1;return function(n,i){const a=n[e],o=i[e];return a<o?r*-1:a>o?r*1:0}}function oge(e,{hasTotalRow:t=!1,defaultSortKey:r="name"}={hasTotalRow:!1,defaultSortKey:"name"}){const[n,i]=O.useState(e),[a,o]=O.useState(!1),s=O.useRef(),l=c=>{const d=(t?e.slice(0,-1):[...e]).sort(age(c,c===s.current&&!a));i(t?[...d,...e.slice(-1)]:d)},u=O.useCallback(c=>{s.current||(s.current=r);const f=c.target.getAttribute("data-sortkey");if(f===s.current)if(a){o(!1),s.current=void 0,l(r);return}else o(!0);else a&&o(!1);l(f),s.current=f},[s,e,a]);return O.useEffect(()=>{e.length&&l(s.current||r)},[e]),{onTableHeadClick:u,sortedRows:n,currentSortField:s.current}}const Nh=(e,t=0)=>{const r=Math.pow(10,t);return Math.round(e*r)/r};function sge({content:e,formatter:t,round:r,markdown:n}){return t?t(e):r?Nh(e,r):n?P.jsx(F0,{content:e}):e}function sg({rows:e,structure:t,hasTotalRow:r,defaultSortKey:n}){const{onTableHeadClick:i,sortedRows:a,currentSortField:o}=oge(e,{hasTotalRow:r,defaultSortKey:n});return P.jsx(IG,{component:rl,sx:{overflowX:"visible"},children:P.jsxs(MG,{children:[P.jsx(PG,{sx:{position:"sticky",top:0,zIndex:2,backgroundColor:"background.paper"},children:P.jsx(O0,{children:t.map(({title:s,key:l})=>P.jsx(Yl,{"data-sortkey":l,onClick:i,sx:{cursor:"pointer",color:o===l?"primary.main":"text.primary"},children:s},`table-head-${l}`))})}),P.jsx(kG,{children:a.map((s,l)=>P.jsx(O0,{children:t.map(({key:u,...c},f)=>P.jsx(Yl,{children:P.jsx(sge,{content:s[u],...c})},`table-row=${f}`))},`${s.name}-${l}`))})]})})}function lge({rows:e,tableStructure:t}){return t?P.jsx(sg,{rows:e,structure:t}):null}const uge=({swarm:{extendedTables:e},ui:{extendedStats:t},url:{query:r}})=>{const n=r&&r.tab&&e&&e.find(({key:a})=>a===r.tab),i=r&&r.tab&&t&&t.find(({key:a})=>a===r.tab);return{tableStructure:n?n.structure.map(({key:a,...o})=>({key:d6(a),...o})):null,rows:i?i.data:[]}},cge=ai(uge)(lge),fge=[{key:"count",title:"# occurrences"},{key:"msg",title:"Message",markdown:!0},{key:"traceback",title:"Traceback",markdown:!0}];function dge({exceptions:e}){return P.jsx(sg,{rows:e,structure:fge})}const hge=({ui:{exceptions:e}})=>({exceptions:e}),pge=ai(hge)(dge);var SF;const vge={totalRps:0,failRatio:0,startTime:"",stats:[],errors:[],exceptions:[],charts:(SF=ja.history)==null?void 0:SF.reduce(tS,{}),ratios:{},userCount:0};var bF;const gge=(bF=ja.percentilesToChart)==null?void 0:bF.reduce((e,t)=>({...e,[`responseTimePercentile${t}`]:{value:null}}),{}),mge=e=>tS(e,{...gge,currentRps:{value:null},currentFailPerSec:{value:null},totalAvgResponseTime:{value:null},userCount:{value:null},time:""}),GH=Si({name:"ui",initialState:vge,reducers:{setUi:og,updateCharts:(e,{payload:t})=>({...e,charts:tS(e.charts,t)}),updateChartMarkers:(e,{payload:t})=>({...e,charts:{...mge(e.charts),markers:e.charts.markers?[...e.charts.markers,t]:[(e.charts.time||[""])[0],t]}})}}),gp=GH.actions,yge=GH.reducer,xge=e=>{const t=new URL(window.location.href);for(const[r,n]of Object.entries(e))t.searchParams.set(r,n);window.history.pushState(null,"",t)},Sge=()=>window.location.search?xQ(window.location.search):null,bge={query:Sge()},HH=Si({name:"url",initialState:bge,reducers:{setUrl:og}}),_ge=HH.actions,wge=HH.reducer,Cge=tx({[$0.reducerPath]:$0.reducer,logViewer:Jve,notification:qve,swarm:Rve,theme:bH,ui:yge,url:wge}),Tge=YV({reducer:Cge,middleware:e=>e().concat($0.middleware)});/*! *****************************************************************************
156
156
  Copyright (c) Microsoft Corporation.
157
157
 
158
158
  Permission to use, copy, modify, and/or distribute this software for any
@@ -8,7 +8,7 @@
8
8
  <meta name="theme-color" content="#000000" />
9
9
 
10
10
  <title>Locust</title>
11
- <script type="module" crossorigin src="./assets/index-BXPhYgcX.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-NWe79_gt.js"></script>
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -8,7 +8,7 @@
8
8
  <meta name="theme-color" content="#000000" />
9
9
 
10
10
  <title>Locust</title>
11
- <script type="module" crossorigin src="./assets/index-BXPhYgcX.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-NWe79_gt.js"></script>
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: locust
3
- Version: 2.32.4.dev4
3
+ Version: 2.32.4.dev11
4
4
  Summary: Developer-friendly load testing framework
5
5
  Home-page: https://locust.io/
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  locust/__init__.py,sha256=Jit8eNUrwuMLqavyFvMZr69e61DILq_KB4yT4MciScw,1681
2
2
  locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
3
- locust/_version.py,sha256=NqfGvsVgijPL296LJwa81qVoAAiYWHgaDKO0D6cYyPE,458
3
+ locust/_version.py,sha256=bQVdV-lS-vJEDXwJwYQ2WO1ycG1KXRMIdCuyRQz_TU8,460
4
4
  locust/argument_parser.py,sha256=xB9TQhAALeIZLx0hxoBOVv4dhSNdB15BG0fDYXkyeFc,30137
5
5
  locust/clients.py,sha256=XK-xabq2_5GZKMEjebDobvEjeBTtCs8h2EelL7s68Qs,19346
6
6
  locust/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -39,16 +39,16 @@ locust/util/load_locustfile.py,sha256=hn70KcIG8jHmZyuKv2pcEmwgWtOEu24Efeji1KRYNU
39
39
  locust/util/rounding.py,sha256=5haxR8mKhATqag6WvPby-MSRRgIw5Ob6thbyvMYZM7o,92
40
40
  locust/util/timespan.py,sha256=Y0LtnhUq2Mq19p04u0XtBlYQ_-S2cRvwRdgru8W9WhA,986
41
41
  locust/util/url.py,sha256=s_W2PCxvxTWxWX0yUvp-8VBuQm881KwI5X9iifogZG4,321
42
- locust/web.py,sha256=suH_mMpkfOfwkhdRQBnOAIyinJT2XR4z64CJVf37-Jc,29760
42
+ locust/web.py,sha256=NpkMh4_cjHqatV5wQKembwT1BjOIDvUcHeKF1o2ZcqQ,29781
43
43
  locust/webui/dist/assets/favicon-dark.png,sha256=6zVkRtiRfU45qQGvEhf1cq2nNauFs_JW5SI79wT0YkM,2437
44
44
  locust/webui/dist/assets/favicon-light.png,sha256=VdG2GZyeTCOML7xfievupBP4EhmHoUqlVCw-tXqkvxU,2468
45
- locust/webui/dist/assets/index-BXPhYgcX.js,sha256=L3xasmqUo2BjQoMQ_F0huUgFZFwCKuz8zWDXOTFT_60,1674673
46
- locust/webui/dist/auth.html,sha256=bKzJKSAULiHAOI01JR96jrbOLEjpXOzlp0C3I0D2sWs,648
47
- locust/webui/dist/index.html,sha256=5bnINHCJTK-I7e4GrdOziXlYK_7aUVyUCpndIVq3e7U,654
45
+ locust/webui/dist/assets/index-NWe79_gt.js,sha256=naiSRysX4l-n8xyNeScVRB1A_c0FrmwimZNI7hSdSAw,1674682
46
+ locust/webui/dist/auth.html,sha256=edw-yAnJzsjTvD0lYpXv4Vtt39-qU8pR04oCpv-LkF8,648
47
+ locust/webui/dist/index.html,sha256=KKE2LgfE397OHPgjKHzCevNjxdfbpXzwjuxVH7VBC_4,654
48
48
  locust/webui/dist/report.html,sha256=KUmkufa4Ob8GTqBmVtFnueZL8h76eEUMVnoL069cAcg,1471006
49
49
  poetry.lock,sha256=Oznh6_Ckq5dKvnrv7SyQsbqkiLtz-0PZPM8QYoL5If0,214415
50
- locust-2.32.4.dev4.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
51
- locust-2.32.4.dev4.dist-info/METADATA,sha256=5mwor9R7F0HVcqTQJZH8bhgAmJWJO1oMaGBbN2OEuQI,9989
52
- locust-2.32.4.dev4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
- locust-2.32.4.dev4.dist-info/entry_points.txt,sha256=RhIxlLwU_Ae_WjimS5COUDLagdCh6IOMyLtgaQxNmlM,43
54
- locust-2.32.4.dev4.dist-info/RECORD,,
50
+ locust-2.32.4.dev11.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
51
+ locust-2.32.4.dev11.dist-info/METADATA,sha256=rZUMxzKcbxcAiUK-1ymu-FZQL4T-Bd-hpTRaK1Wbfjw,9990
52
+ locust-2.32.4.dev11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
+ locust-2.32.4.dev11.dist-info/entry_points.txt,sha256=RhIxlLwU_Ae_WjimS5COUDLagdCh6IOMyLtgaQxNmlM,43
54
+ locust-2.32.4.dev11.dist-info/RECORD,,