UNPKG

unleash-frontend

Version:
413 lines 1.38 MB
var fD=Object.defineProperty,hD=Object.defineProperties;var mD=Object.getOwnPropertyDescriptors;var Zf=Object.getOwnPropertySymbols;var I2=Object.prototype.hasOwnProperty,A2=Object.prototype.propertyIsEnumerable;var _2=(e,t,n)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))I2.call(t,n)&&_2(e,n,t[n]);if(Zf)for(var n of Zf(t))A2.call(t,n)&&_2(e,n,t[n]);return e},ee=(e,t)=>hD(e,mD(t));var en=(e,t)=>{var n={};for(var r in e)I2.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zf)for(var r of Zf(e))t.indexOf(r)<0&&A2.call(e,r)&&(n[r]=e[r]);return n};function gD(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const vD=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerpolicy&&(a.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?a.credentials="include":o.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}};vD();var Jr=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Jr!="undefined"&&Jr,To={searchParams:"URLSearchParams"in Jr,iterable:"Symbol"in Jr&&"iterator"in Symbol,blob:"FileReader"in Jr&&"Blob"in Jr&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Jr,arrayBuffer:"ArrayBuffer"in Jr};function yD(e){return e&&DataView.prototype.isPrototypeOf(e)}if(To.arrayBuffer)var bD=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],xD=ArrayBuffer.isView||function(e){return e&&bD.indexOf(Object.prototype.toString.call(e))>-1};function Xp(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function ux(e){return typeof e!="string"&&(e=String(e)),e}function dx(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return To.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Ir(e){this.map={},e instanceof Ir?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}Ir.prototype.append=function(e,t){e=Xp(e),t=ux(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};Ir.prototype.delete=function(e){delete this.map[Xp(e)]};Ir.prototype.get=function(e){return e=Xp(e),this.has(e)?this.map[e]:null};Ir.prototype.has=function(e){return this.map.hasOwnProperty(Xp(e))};Ir.prototype.set=function(e,t){this.map[Xp(e)]=ux(t)};Ir.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};Ir.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),dx(e)};Ir.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),dx(e)};Ir.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),dx(e)};To.iterable&&(Ir.prototype[Symbol.iterator]=Ir.prototype.entries);function Jy(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function j_(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function wD(e){var t=new FileReader,n=j_(t);return t.readAsArrayBuffer(e),n}function SD(e){var t=new FileReader,n=j_(t);return t.readAsText(e),n}function CD(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function N2(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function U_(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:To.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:To.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:To.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():To.arrayBuffer&&To.blob&&yD(e)?(this._bodyArrayBuffer=N2(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):To.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||xD(e))?this._bodyArrayBuffer=N2(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):To.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},To.blob&&(this.blob=function(){var e=Jy(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Jy(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(wD)}),this.text=function(){var e=Jy(this);if(e)return e;if(this._bodyBlob)return SD(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(CD(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},To.formData&&(this.formData=function(){return this.text().then(RD)}),this.json=function(){return this.text().then(JSON.parse)},this}var ED=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function TD(e){var t=e.toUpperCase();return ED.indexOf(t)>-1?t:e}function Nl(e,t){if(!(this instanceof Nl))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof Nl){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Ir(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new Ir(t.headers)),this.method=TD(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var o=/\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Nl.prototype.clone=function(){return new Nl(this,{body:this._bodyInit})};function RD(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),o=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(a))}}),t}function kD(e){var t=new Ir,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(`
`)===0?r.substr(1,r.length):r}).forEach(function(r){var o=r.split(":"),a=o.shift().trim();if(a){var s=o.join(":").trim();t.append(a,s)}}),t}U_.call(Nl.prototype);function ci(e,t){if(!(this instanceof ci))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new Ir(t.headers),this.url=t.url||"",this._initBody(e)}U_.call(ci.prototype);ci.prototype.clone=function(){return new ci(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Ir(this.headers),url:this.url})};ci.error=function(){var e=new ci(null,{status:0,statusText:""});return e.type="error",e};var _D=[301,302,303,307,308];ci.redirect=function(e,t){if(_D.indexOf(t)===-1)throw new RangeError("Invalid status code");return new ci(null,{status:t,headers:{location:e}})};var cl=Jr.DOMException;try{new cl}catch{cl=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},cl.prototype=Object.create(Error.prototype),cl.prototype.constructor=cl}function W_(e,t){return new Promise(function(n,r){var o=new Nl(e,t);if(o.signal&&o.signal.aborted)return r(new cl("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var c={status:a.status,statusText:a.statusText,headers:kD(a.getAllResponseHeaders()||"")};c.url="responseURL"in a?a.responseURL:c.headers.get("X-Request-URL");var u="response"in a?a.response:a.responseText;setTimeout(function(){n(new ci(u,c))},0)},a.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){r(new cl("Aborted","AbortError"))},0)};function l(c){try{return c===""&&Jr.location.href?Jr.location.href:c}catch{return c}}a.open(o.method,l(o.url),!0),o.credentials==="include"?a.withCredentials=!0:o.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(To.blob?a.responseType="blob":To.arrayBuffer&&o.headers.get("Content-Type")&&o.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof Ir)?Object.getOwnPropertyNames(t.headers).forEach(function(c){a.setRequestHeader(c,ux(t.headers[c]))}):o.headers.forEach(function(c,u){a.setRequestHeader(u,c)}),o.signal&&(o.signal.addEventListener("abort",s),a.onreadystatechange=function(){a.readyState===4&&o.signal.removeEventListener("abort",s)}),a.send(typeof o._bodyInit=="undefined"?null:o._bodyInit)})}W_.polyfill=!0;Jr.fetch||(Jr.fetch=W_,Jr.Headers=Ir,Jr.Request=Nl,Jr.Response=ci);var _n=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Hl(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var ID={exports:{}};(function(e){var t=function(n){var r=Object.prototype,o=r.hasOwnProperty,a,s=typeof Symbol=="function"?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(G,B,Y){return Object.defineProperty(G,B,{value:Y,enumerable:!0,configurable:!0,writable:!0}),G[B]}try{d({},"")}catch{d=function(B,Y,K){return B[Y]=K}}function p(G,B,Y,K){var Q=B&&B.prototype instanceof v?B:v,re=Object.create(Q.prototype),pe=new H(K||[]);return re._invoke=O(G,Y,pe),re}n.wrap=p;function h(G,B,Y){try{return{type:"normal",arg:G.call(B,Y)}}catch(K){return{type:"throw",arg:K}}}var m="suspendedStart",b="suspendedYield",y="executing",g="completed",x={};function v(){}function S(){}function E(){}var R={};d(R,l,function(){return this});var A=Object.getPrototypeOf,_=A&&A(A(U([])));_&&_!==r&&o.call(_,l)&&(R=_);var N=E.prototype=v.prototype=Object.create(R);S.prototype=E,d(N,"constructor",E),d(E,"constructor",S),S.displayName=d(E,u,"GeneratorFunction");function k(G){["next","throw","return"].forEach(function(B){d(G,B,function(Y){return this._invoke(B,Y)})})}n.isGeneratorFunction=function(G){var B=typeof G=="function"&&G.constructor;return B?B===S||(B.displayName||B.name)==="GeneratorFunction":!1},n.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,E):(G.__proto__=E,d(G,u,"GeneratorFunction")),G.prototype=Object.create(N),G},n.awrap=function(G){return{__await:G}};function I(G,B){function Y(re,pe,ye,ae){var oe=h(G[re],G,pe);if(oe.type==="throw")ae(oe.arg);else{var ue=oe.arg,ge=ue.value;return ge&&typeof ge=="object"&&o.call(ge,"__await")?B.resolve(ge.__await).then(function(_e){Y("next",_e,ye,ae)},function(_e){Y("throw",_e,ye,ae)}):B.resolve(ge).then(function(_e){ue.value=_e,ye(ue)},function(_e){return Y("throw",_e,ye,ae)})}}var K;function Q(re,pe){function ye(){return new B(function(ae,oe){Y(re,pe,ae,oe)})}return K=K?K.then(ye,ye):ye()}this._invoke=Q}k(I.prototype),d(I.prototype,c,function(){return this}),n.AsyncIterator=I,n.async=function(G,B,Y,K,Q){Q===void 0&&(Q=Promise);var re=new I(p(G,B,Y,K),Q);return n.isGeneratorFunction(B)?re:re.next().then(function(pe){return pe.done?pe.value:re.next()})};function O(G,B,Y){var K=m;return function(re,pe){if(K===y)throw new Error("Generator is already running");if(K===g){if(re==="throw")throw pe;return Z()}for(Y.method=re,Y.arg=pe;;){var ye=Y.delegate;if(ye){var ae=L(ye,Y);if(ae){if(ae===x)continue;return ae}}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(K===m)throw K=g,Y.arg;Y.dispatchException(Y.arg)}else Y.method==="return"&&Y.abrupt("return",Y.arg);K=y;var oe=h(G,B,Y);if(oe.type==="normal"){if(K=Y.done?g:b,oe.arg===x)continue;return{value:oe.arg,done:Y.done}}else oe.type==="throw"&&(K=g,Y.method="throw",Y.arg=oe.arg)}}}function L(G,B){var Y=G.iterator[B.method];if(Y===a){if(B.delegate=null,B.method==="throw"){if(G.iterator.return&&(B.method="return",B.arg=a,L(G,B),B.method==="throw"))return x;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return x}var K=h(Y,G.iterator,B.arg);if(K.type==="throw")return B.method="throw",B.arg=K.arg,B.delegate=null,x;var Q=K.arg;if(!Q)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,x;if(Q.done)B[G.resultName]=Q.value,B.next=G.nextLoc,B.method!=="return"&&(B.method="next",B.arg=a);else return Q;return B.delegate=null,x}k(N),d(N,u,"Generator"),d(N,l,function(){return this}),d(N,"toString",function(){return"[object Generator]"});function q(G){var B={tryLoc:G[0]};1 in G&&(B.catchLoc=G[1]),2 in G&&(B.finallyLoc=G[2],B.afterLoc=G[3]),this.tryEntries.push(B)}function D(G){var B=G.completion||{};B.type="normal",delete B.arg,G.completion=B}function H(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(q,this),this.reset(!0)}n.keys=function(G){var B=[];for(var Y in G)B.push(Y);return B.reverse(),function K(){for(;B.length;){var Q=B.pop();if(Q in G)return K.value=Q,K.done=!1,K}return K.done=!0,K}};function U(G){if(G){var B=G[l];if(B)return B.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var Y=-1,K=function Q(){for(;++Y<G.length;)if(o.call(G,Y))return Q.value=G[Y],Q.done=!1,Q;return Q.value=a,Q.done=!0,Q};return K.next=K}}return{next:Z}}n.values=U;function Z(){return{value:a,done:!0}}return H.prototype={constructor:H,reset:function(G){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(D),!G)for(var B in this)B.charAt(0)==="t"&&o.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=a)},stop:function(){this.done=!0;var G=this.tryEntries[0],B=G.completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(G){if(this.done)throw G;var B=this;function Y(ae,oe){return re.type="throw",re.arg=G,B.next=ae,oe&&(B.method="next",B.arg=a),!!oe}for(var K=this.tryEntries.length-1;K>=0;--K){var Q=this.tryEntries[K],re=Q.completion;if(Q.tryLoc==="root")return Y("end");if(Q.tryLoc<=this.prev){var pe=o.call(Q,"catchLoc"),ye=o.call(Q,"finallyLoc");if(pe&&ye){if(this.prev<Q.catchLoc)return Y(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return Y(Q.finallyLoc)}else if(pe){if(this.prev<Q.catchLoc)return Y(Q.catchLoc,!0)}else if(ye){if(this.prev<Q.finallyLoc)return Y(Q.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(G,B){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var K=this.tryEntries[Y];if(K.tryLoc<=this.prev&&o.call(K,"finallyLoc")&&this.prev<K.finallyLoc){var Q=K;break}}Q&&(G==="break"||G==="continue")&&Q.tryLoc<=B&&B<=Q.finallyLoc&&(Q=null);var re=Q?Q.completion:{};return re.type=G,re.arg=B,Q?(this.method="next",this.next=Q.finallyLoc,x):this.complete(re)},complete:function(G,B){if(G.type==="throw")throw G.arg;return G.type==="break"||G.type==="continue"?this.next=G.arg:G.type==="return"?(this.rval=this.arg=G.arg,this.method="return",this.next="end"):G.type==="normal"&&B&&(this.next=B),x},finish:function(G){for(var B=this.tryEntries.length-1;B>=0;--B){var Y=this.tryEntries[B];if(Y.finallyLoc===G)return this.complete(Y.completion,Y.afterLoc),D(Y),x}},catch:function(G){for(var B=this.tryEntries.length-1;B>=0;--B){var Y=this.tryEntries[B];if(Y.tryLoc===G){var K=Y.completion;if(K.type==="throw"){var Q=K.arg;D(Y)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(G,B,Y){return this.delegate={iterator:U(G),resultName:B,nextLoc:Y},this.method==="next"&&(this.arg=a),x}},n}(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(ID);var pg={exports:{}},va={},f={exports:{}},mn={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var $2=Object.getOwnPropertySymbols,AD=Object.prototype.hasOwnProperty,ND=Object.prototype.propertyIsEnumerable;function $D(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function PD(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(a){o[a]=a}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var H_=PD()?Object.assign:function(e,t){for(var n,r=$D(e),o,a=1;a<arguments.length;a++){n=Object(arguments[a]);for(var s in n)AD.call(n,s)&&(r[s]=n[s]);if($2){o=$2(n);for(var l=0;l<o.length;l++)ND.call(n,o[l])&&(r[o[l]]=n[o[l]])}}return r};/** @license React v17.0.2
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var px=H_,hu=60103,V_=60106;mn.Fragment=60107;mn.StrictMode=60108;mn.Profiler=60114;var G_=60109,q_=60110,Y_=60112;mn.Suspense=60113;var K_=60115,X_=60116;if(typeof Symbol=="function"&&Symbol.for){var Ra=Symbol.for;hu=Ra("react.element"),V_=Ra("react.portal"),mn.Fragment=Ra("react.fragment"),mn.StrictMode=Ra("react.strict_mode"),mn.Profiler=Ra("react.profiler"),G_=Ra("react.provider"),q_=Ra("react.context"),Y_=Ra("react.forward_ref"),mn.Suspense=Ra("react.suspense"),K_=Ra("react.memo"),X_=Ra("react.lazy")}var P2=typeof Symbol=="function"&&Symbol.iterator;function OD(e){return e===null||typeof e!="object"?null:(e=P2&&e[P2]||e["@@iterator"],typeof e=="function"?e:null)}function Jp(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var J_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q_={};function mu(e,t,n){this.props=e,this.context=t,this.refs=Q_,this.updater=n||J_}mu.prototype.isReactComponent={};mu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Jp(85));this.updater.enqueueSetState(this,e,t,"setState")};mu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Z_(){}Z_.prototype=mu.prototype;function fx(e,t,n){this.props=e,this.context=t,this.refs=Q_,this.updater=n||J_}var hx=fx.prototype=new Z_;hx.constructor=fx;px(hx,mu.prototype);hx.isPureReactComponent=!0;var mx={current:null},eI=Object.prototype.hasOwnProperty,tI={key:!0,ref:!0,__self:!0,__source:!0};function nI(e,t,n){var r,o={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)eI.call(t,r)&&!tI.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:hu,type:e,key:a,ref:s,props:o,_owner:mx.current}}function DD(e,t){return{$$typeof:hu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gx(e){return typeof e=="object"&&e!==null&&e.$$typeof===hu}function LD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var O2=/\/+/g;function Qy(e,t){return typeof e=="object"&&e!==null&&e.key!=null?LD(""+e.key):t.toString(36)}function Yh(e,t,n,r,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case hu:case V_:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Qy(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(O2,"$&/")+"/"),Yh(o,t,n,"",function(u){return u})):o!=null&&(gx(o)&&(o=DD(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(O2,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){a=e[l];var c=r+Qy(a,l);s+=Yh(a,t,n,c,o)}else if(c=OD(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=r+Qy(a,l++),s+=Yh(a,t,n,c,o);else if(a==="object")throw t=""+e,Error(Jp(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function eh(e,t,n){if(e==null)return e;var r=[],o=0;return Yh(e,r,"","",function(a){return t.call(n,a,o++)}),r}function MD(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var rI={current:null};function qi(){var e=rI.current;if(e===null)throw Error(Jp(321));return e}var BD={ReactCurrentDispatcher:rI,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:mx,IsSomeRendererActing:{current:!1},assign:px};mn.Children={map:eh,forEach:function(e,t,n){eh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return eh(e,function(){t++}),t},toArray:function(e){return eh(e,function(t){return t})||[]},only:function(e){if(!gx(e))throw Error(Jp(143));return e}};mn.Component=mu;mn.PureComponent=fx;mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BD;mn.cloneElement=function(e,t,n){if(e==null)throw Error(Jp(267,e));var r=px({},e.props),o=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=mx.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)eI.call(t,c)&&!tI.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:hu,type:e.type,key:o,ref:a,props:r,_owner:s}};mn.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:q_,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:G_,_context:e},e.Consumer=e};mn.createElement=nI;mn.createFactory=function(e){var t=nI.bind(null,e);return t.type=e,t};mn.createRef=function(){return{current:null}};mn.forwardRef=function(e){return{$$typeof:Y_,render:e}};mn.isValidElement=gx;mn.lazy=function(e){return{$$typeof:X_,_payload:{_status:-1,_result:e},_init:MD}};mn.memo=function(e,t){return{$$typeof:K_,type:e,compare:t===void 0?null:t}};mn.useCallback=function(e,t){return qi().useCallback(e,t)};mn.useContext=function(e,t){return qi().useContext(e,t)};mn.useDebugValue=function(){};mn.useEffect=function(e,t){return qi().useEffect(e,t)};mn.useImperativeHandle=function(e,t,n){return qi().useImperativeHandle(e,t,n)};mn.useLayoutEffect=function(e,t){return qi().useLayoutEffect(e,t)};mn.useMemo=function(e,t){return qi().useMemo(e,t)};mn.useReducer=function(e,t,n){return qi().useReducer(e,t,n)};mn.useRef=function(e){return qi().useRef(e)};mn.useState=function(e){return qi().useState(e)};mn.version="17.0.2";f.exports=mn;var hr=f.exports,Rs=gD({__proto__:null,default:hr},[f.exports]),oI={exports:{}},aI={};/** @license React v0.20.2
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){var t,n,r,o;if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}if(typeof window=="undefined"||typeof MessageChannel!="function"){var c=null,u=null,d=function(){if(c!==null)try{var K=e.unstable_now();c(!0,K),c=null}catch(Q){throw setTimeout(d,0),Q}};t=function(K){c!==null?setTimeout(t,0,K):(c=K,setTimeout(d,0))},n=function(K,Q){u=setTimeout(K,Q)},r=function(){clearTimeout(u)},e.unstable_shouldYield=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if(typeof console!="undefined"){var m=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof m!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var b=!1,y=null,g=-1,x=5,v=0;e.unstable_shouldYield=function(){return e.unstable_now()>=v},o=function(){},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<K?Math.floor(1e3/K):5};var S=new MessageChannel,E=S.port2;S.port1.onmessage=function(){if(y!==null){var K=e.unstable_now();v=K+x;try{y(!0,K)?E.postMessage(null):(b=!1,y=null)}catch(Q){throw E.postMessage(null),Q}}else b=!1},t=function(K){y=K,b||(b=!0,E.postMessage(null))},n=function(K,Q){g=p(function(){K(e.unstable_now())},Q)},r=function(){h(g),g=-1}}function R(K,Q){var re=K.length;K.push(Q);e:for(;;){var pe=re-1>>>1,ye=K[pe];if(ye!==void 0&&0<N(ye,Q))K[pe]=Q,K[re]=ye,re=pe;else break e}}function A(K){return K=K[0],K===void 0?null:K}function _(K){var Q=K[0];if(Q!==void 0){var re=K.pop();if(re!==Q){K[0]=re;e:for(var pe=0,ye=K.length;pe<ye;){var ae=2*(pe+1)-1,oe=K[ae],ue=ae+1,ge=K[ue];if(oe!==void 0&&0>N(oe,re))ge!==void 0&&0>N(ge,oe)?(K[pe]=ge,K[ue]=re,pe=ue):(K[pe]=oe,K[ae]=re,pe=ae);else if(ge!==void 0&&0>N(ge,re))K[pe]=ge,K[ue]=re,pe=ue;else break e}}return Q}return null}function N(K,Q){var re=K.sortIndex-Q.sortIndex;return re!==0?re:K.id-Q.id}var k=[],I=[],O=1,L=null,q=3,D=!1,H=!1,U=!1;function Z(K){for(var Q=A(I);Q!==null;){if(Q.callback===null)_(I);else if(Q.startTime<=K)_(I),Q.sortIndex=Q.expirationTime,R(k,Q);else break;Q=A(I)}}function G(K){if(U=!1,Z(K),!H)if(A(k)!==null)H=!0,t(B);else{var Q=A(I);Q!==null&&n(G,Q.startTime-K)}}function B(K,Q){H=!1,U&&(U=!1,r()),D=!0;var re=q;try{for(Z(Q),L=A(k);L!==null&&(!(L.expirationTime>Q)||K&&!e.unstable_shouldYield());){var pe=L.callback;if(typeof pe=="function"){L.callback=null,q=L.priorityLevel;var ye=pe(L.expirationTime<=Q);Q=e.unstable_now(),typeof ye=="function"?L.callback=ye:L===A(k)&&_(k),Z(Q)}else _(k);L=A(k)}if(L!==null)var ae=!0;else{var oe=A(I);oe!==null&&n(G,oe.startTime-Q),ae=!1}return ae}finally{L=null,q=re,D=!1}}var Y=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){H||D||(H=!0,t(B))},e.unstable_getCurrentPriorityLevel=function(){return q},e.unstable_getFirstCallbackNode=function(){return A(k)},e.unstable_next=function(K){switch(q){case 1:case 2:case 3:var Q=3;break;default:Q=q}var re=q;q=Q;try{return K()}finally{q=re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Y,e.unstable_runWithPriority=function(K,Q){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var re=q;q=K;try{return Q()}finally{q=re}},e.unstable_scheduleCallback=function(K,Q,re){var pe=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?pe+re:pe):re=pe,K){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=re+ye,K={id:O++,callback:Q,priorityLevel:K,startTime:re,expirationTime:ye,sortIndex:-1},re>pe?(K.sortIndex=re,R(I,K),A(k)===null&&K===A(I)&&(U?r():U=!0,n(G,re-pe))):(K.sortIndex=ye,R(k,K),H||D||(H=!0,t(B))),K},e.unstable_wrapCallback=function(K){var Q=q;return function(){var re=q;q=Q;try{return K.apply(this,arguments)}finally{q=re}}}})(aI);oI.exports=aI;/** @license React v17.0.2
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var fg=f.exports,Zn=H_,Dr=oI.exports;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!fg)throw Error(Me(227));var iI=new Set,up={};function Vl(e,t){Jc(e,t),Jc(e+"Capture",t)}function Jc(e,t){for(up[e]=t,e=0;e<t.length;e++)iI.add(t[e])}var zi=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),FD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,D2=Object.prototype.hasOwnProperty,L2={},M2={};function zD(e){return D2.call(M2,e)?!0:D2.call(L2,e)?!1:FD.test(e)?M2[e]=!0:(L2[e]=!0,!1)}function jD(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UD(e,t,n,r){if(t===null||typeof t=="undefined"||jD(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yo(e,t,n,r,o,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var Hr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hr[e]=new yo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hr[t]=new yo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hr[e]=new yo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hr[e]=new yo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hr[e]=new yo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hr[e]=new yo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hr[e]=new yo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hr[e]=new yo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hr[e]=new yo(e,5,!1,e.toLowerCase(),null,!1,!1)});var vx=/[\-:]([a-z])/g;function yx(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(vx,yx);Hr[t]=new yo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vx,yx);Hr[t]=new yo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vx,yx);Hr[t]=new yo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hr[e]=new yo(e,1,!1,e.toLowerCase(),null,!1,!1)});Hr.xlinkHref=new yo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hr[e]=new yo(e,1,!1,e.toLowerCase(),null,!0,!0)});function bx(e,t,n,r){var o=Hr.hasOwnProperty(t)?Hr[t]:null,a=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");a||(UD(t,n,o,r)&&(n=null),r||o===null?zD(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Gl=fg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cd=60103,pl=60106,ls=60107,xx=60108,Md=60114,wx=60109,Sx=60110,hg=60112,Bd=60113,pm=60120,mg=60115,Cx=60116,Ex=60121,Tx=60128,sI=60129,Rx=60130,b1=60131;if(typeof Symbol=="function"&&Symbol.for){var Pr=Symbol.for;Cd=Pr("react.element"),pl=Pr("react.portal"),ls=Pr("react.fragment"),xx=Pr("react.strict_mode"),Md=Pr("react.profiler"),wx=Pr("react.provider"),Sx=Pr("react.context"),hg=Pr("react.forward_ref"),Bd=Pr("react.suspense"),pm=Pr("react.suspense_list"),mg=Pr("react.memo"),Cx=Pr("react.lazy"),Ex=Pr("react.block"),Pr("react.scope"),Tx=Pr("react.opaque.id"),sI=Pr("react.debug_trace_mode"),Rx=Pr("react.offscreen"),b1=Pr("react.legacy_hidden")}var B2=typeof Symbol=="function"&&Symbol.iterator;function Gu(e){return e===null||typeof e!="object"?null:(e=B2&&e[B2]||e["@@iterator"],typeof e=="function"?e:null)}var Zy;function Ed(e){if(Zy===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zy=t&&t[1]||""}return`
`+Zy+e}var e0=!1;function th(e,t){if(!e||e0)return"";e0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
`),a=r.stack.split(`
`),s=o.length-1,l=a.length-1;1<=s&&0<=l&&o[s]!==a[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==a[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==a[l])return`
`+o[s].replace(" at new "," at ");while(1<=s&&0<=l);break}}}finally{e0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ed(e):""}function WD(e){switch(e.tag){case 5:return Ed(e.type);case 16:return Ed("Lazy");case 13:return Ed("Suspense");case 19:return Ed("SuspenseList");case 0:case 2:case 15:return e=th(e.type,!1),e;case 11:return e=th(e.type.render,!1),e;case 22:return e=th(e.type._render,!1),e;case 1:return e=th(e.type,!0),e;default:return""}}function Lc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ls:return"Fragment";case pl:return"Portal";case Md:return"Profiler";case xx:return"StrictMode";case Bd:return"Suspense";case pm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Sx:return(e.displayName||"Context")+".Consumer";case wx:return(e._context.displayName||"Context")+".Provider";case hg:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case mg:return Lc(e.type);case Ex:return Lc(e._render);case Cx:t=e._payload,e=e._init;try{return Lc(e(t))}catch{}}return null}function ks(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function lI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function HD(e){var t=lI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nh(e){e._valueTracker||(e._valueTracker=HD(e))}function cI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fm(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch{return e.body}}function x1(e,t){var n=t.checked;return Zn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function F2(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ks(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uI(e,t){t=t.checked,t!=null&&bx(e,"checked",t,!1)}function w1(e,t){uI(e,t);var n=ks(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?S1(e,t.type,n):t.hasOwnProperty("defaultValue")&&S1(e,t.type,ks(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function z2(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function S1(e,t,n){(t!=="number"||fm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function VD(e){var t="";return fg.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function C1(e,t){return e=Zn({children:void 0},t),(t=VD(t.children))&&(e.children=t),e}function Mc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ks(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function E1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Me(91));return Zn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function j2(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Me(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(Me(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ks(n)}}function dI(e,t){var n=ks(t.value),r=ks(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function U2(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var T1={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function pI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function R1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rh,fI=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==T1.svg||"innerHTML"in e)e.innerHTML=t;else{for(rh=rh||document.createElement("div"),rh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function dp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GD=["Webkit","ms","Moz","O"];Object.keys(Fd).forEach(function(e){GD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fd[t]=Fd[e]})});function hI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fd.hasOwnProperty(e)&&Fd[e]?(""+t).trim():t+"px"}function mI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=hI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var qD=Zn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function k1(e,t){if(t){if(qD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Me(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(Me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Me(62))}}function _1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function kx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var I1=null,Bc=null,Fc=null;function W2(e){if(e=Zp(e)){if(typeof I1!="function")throw Error(Me(280));var t=e.stateNode;t&&(t=wg(t),I1(e.stateNode,e.type,t))}}function gI(e){Bc?Fc?Fc.push(e):Fc=[e]:Bc=e}function vI(){if(Bc){var e=Bc,t=Fc;if(Fc=Bc=null,W2(e),t)for(e=0;e<t.length;e++)W2(t[e])}}function _x(e,t){return e(t)}function yI(e,t,n,r,o){return e(t,n,r,o)}function Ix(){}var bI=_x,fl=!1,t0=!1;function Ax(){(Bc!==null||Fc!==null)&&(Ix(),vI())}function YD(e,t,n){if(t0)return e(t,n);t0=!0;try{return bI(e,t,n)}finally{t0=!1,Ax()}}function pp(e,t){var n=e.stateNode;if(n===null)return null;var r=wg(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Me(231,t,typeof n));return n}var A1=!1;if(zi)try{var qu={};Object.defineProperty(qu,"passive",{get:function(){A1=!0}}),window.addEventListener("test",qu,qu),window.removeEventListener("test",qu,qu)}catch{A1=!1}function KD(e,t,n,r,o,a,s,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var zd=!1,hm=null,mm=!1,N1=null,XD={onError:function(e){zd=!0,hm=e}};function JD(e,t,n,r,o,a,s,l,c){zd=!1,hm=null,KD.apply(XD,arguments)}function QD(e,t,n,r,o,a,s,l,c){if(JD.apply(this,arguments),zd){if(zd){var u=hm;zd=!1,hm=null}else throw Error(Me(198));mm||(mm=!0,N1=u)}}function ql(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&1026)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function H2(e){if(ql(e)!==e)throw Error(Me(188))}function ZD(e){var t=e.alternate;if(!t){if(t=ql(e),t===null)throw Error(Me(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var a=o.alternate;if(a===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return H2(o),e;if(a===r)return H2(o),t;a=a.sibling}throw Error(Me(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(Me(189))}}if(n.alternate!==r)throw Error(Me(190))}if(n.tag!==3)throw Error(Me(188));return n.stateNode.current===n?e:t}function wI(e){if(e=ZD(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function V2(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var SI,Nx,CI,EI,$1=!1,Ja=[],gs=null,vs=null,ys=null,fp=new Map,hp=new Map,Yu=[],G2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function P1(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function q2(e,t){switch(e){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":fp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hp.delete(t.pointerId)}}function Ku(e,t,n,r,o,a){return e===null||e.nativeEvent!==a?(e=P1(t,n,r,o,a),t!==null&&(t=Zp(t),t!==null&&Nx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function e6(e,t,n,r,o){switch(t){case"focusin":return gs=Ku(gs,e,t,n,r,o),!0;case"dragenter":return vs=Ku(vs,e,t,n,r,o),!0;case"mouseover":return ys=Ku(ys,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return fp.set(a,Ku(fp.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,hp.set(a,Ku(hp.get(a)||null,e,t,n,r,o)),!0}return!1}function t6(e){var t=hl(e.target);if(t!==null){var n=ql(t);if(n!==null){if(t=n.tag,t===13){if(t=xI(n),t!==null){e.blockedOn=t,EI(e.lanePriority,function(){Dr.unstable_runWithPriority(e.priority,function(){CI(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Kh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Zp(n),t!==null&&Nx(t),e.blockedOn=n,!1;t.shift()}return!0}function Y2(e,t,n){Kh(e)&&n.delete(t)}function n6(){for($1=!1;0<Ja.length;){var e=Ja[0];if(e.blockedOn!==null){e=Zp(e.blockedOn),e!==null&&SI(e);break}for(var t=e.targetContainers;0<t.length;){var n=Dx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Ja.shift()}gs!==null&&Kh(gs)&&(gs=null),vs!==null&&Kh(vs)&&(vs=null),ys!==null&&Kh(ys)&&(ys=null),fp.forEach(Y2),hp.forEach(Y2)}function Xu(e,t){e.blockedOn===t&&(e.blockedOn=null,$1||($1=!0,Dr.unstable_scheduleCallback(Dr.unstable_NormalPriority,n6)))}function TI(e){function t(o){return Xu(o,e)}if(0<Ja.length){Xu(Ja[0],e);for(var n=1;n<Ja.length;n++){var r=Ja[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gs!==null&&Xu(gs,e),vs!==null&&Xu(vs,e),ys!==null&&Xu(ys,e),fp.forEach(t),hp.forEach(t),n=0;n<Yu.length;n++)r=Yu[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yu.length&&(n=Yu[0],n.blockedOn===null);)t6(n),n.blockedOn===null&&Yu.shift()}function oh(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _c={animationend:oh("Animation","AnimationEnd"),animationiteration:oh("Animation","AnimationIteration"),animationstart:oh("Animation","AnimationStart"),transitionend:oh("Transition","TransitionEnd")},n0={},RI={};zi&&(RI=document.createElement("div").style,"AnimationEvent"in window||(delete _c.animationend.animation,delete _c.animationiteration.animation,delete _c.animationstart.animation),"TransitionEvent"in window||delete _c.transitionend.transition);function gg(e){if(n0[e])return n0[e];if(!_c[e])return e;var t=_c[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in RI)return n0[e]=t[n];return e}var kI=gg("animationend"),_I=gg("animationiteration"),II=gg("animationstart"),AI=gg("transitionend"),NI=new Map,$x=new Map,r6=["abort","abort",kI,"animationEnd",_I,"animationIteration",II,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",AI,"transitionEnd","waiting","waiting"];function Px(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),$x.set(r,t),NI.set(r,o),Vl(o,[r])}}var o6=Dr.unstable_now;o6();var zn=8;function Ec(e){if((1&e)!==0)return zn=15,1;if((2&e)!==0)return zn=14,2;if((4&e)!==0)return zn=13,4;var t=24&e;return t!==0?(zn=12,t):(e&32)!==0?(zn=11,32):(t=192&e,t!==0?(zn=10,t):(e&256)!==0?(zn=9,256):(t=3584&e,t!==0?(zn=8,t):(e&4096)!==0?(zn=7,4096):(t=4186112&e,t!==0?(zn=6,t):(t=62914560&e,t!==0?(zn=5,t):e&67108864?(zn=4,67108864):(e&134217728)!==0?(zn=3,134217728):(t=805306368&e,t!==0?(zn=2,t):(1073741824&e)!==0?(zn=1,1073741824):(zn=8,e))))))}function a6(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function i6(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(Me(358,e))}}function mp(e,t){var n=e.pendingLanes;if(n===0)return zn=0;var r=0,o=0,a=e.expiredLanes,s=e.suspendedLanes,l=e.pingedLanes;if(a!==0)r=a,o=zn=15;else if(a=n&134217727,a!==0){var c=a&~s;c!==0?(r=Ec(c),o=zn):(l&=a,l!==0&&(r=Ec(l),o=zn))}else a=n&~s,a!==0?(r=Ec(a),o=zn):l!==0&&(r=Ec(l),o=zn);if(r===0)return 0;if(r=31-_s(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&(t&s)===0){if(Ec(t),o<=zn)return t;zn=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-_s(t),o=1<<n,r|=e[n],t&=~o;return r}function $I(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gm(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Tc(24&~t),e===0?gm(10,t):e;case 10:return e=Tc(192&~t),e===0?gm(8,t):e;case 8:return e=Tc(3584&~t),e===0&&(e=Tc(4186112&~t),e===0&&(e=512)),e;case 2:return t=Tc(805306368&~t),t===0&&(t=268435456),t}throw Error(Me(358,e))}function Tc(e){return e&-e}function r0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vg(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-_s(t),e[t]=n}var _s=Math.clz32?Math.clz32:c6,s6=Math.log,l6=Math.LN2;function c6(e){return e===0?32:31-(s6(e)/l6|0)|0}var u6=Dr.unstable_UserBlockingPriority,d6=Dr.unstable_runWithPriority,Xh=!0;function p6(e,t,n,r){fl||Ix();var o=Ox,a=fl;fl=!0;try{yI(o,e,t,n,r)}finally{(fl=a)||Ax()}}function f6(e,t,n,r){d6(u6,Ox.bind(null,e,t,n,r))}function Ox(e,t,n,r){if(Xh){var o;if((o=(t&4)===0)&&0<Ja.length&&-1<G2.indexOf(e))e=P1(null,e,t,n,r),Ja.push(e);else{var a=Dx(e,t,n,r);if(a===null)o&&q2(e,r);else{if(o){if(-1<G2.indexOf(e)){e=P1(a,e,t,n,r),Ja.push(e);return}if(e6(a,e,t,n,r))return;q2(e,r)}VI(e,t,r,null,n)}}}}function Dx(e,t,n,r){var o=kx(r);if(o=hl(o),o!==null){var a=ql(o);if(a===null)o=null;else{var s=a.tag;if(s===13){if(o=xI(a),o!==null)return o;o=null}else if(s===3){if(a.stateNode.hydrate)return a.tag===3?a.stateNode.containerInfo:null;o=null}else a!==o&&(o=null)}}return VI(e,t,r,o,n),null}var cs=null,Lx=null,Jh=null;function PI(){if(Jh)return Jh;var e,t=Lx,n=t.length,r,o="value"in cs?cs.value:cs.textContent,a=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[a-r];r++);return Jh=o.slice(e,1<r?1-r:void 0)}function Qh(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ah(){return!0}function K2(){return!1}function Xo(e){function t(n,r,o,a,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?ah:K2,this.isPropagationStopped=K2,this}return Zn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ah)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ah)},persist:function(){},isPersistent:ah}),t}var gu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mx=Xo(gu),Qp=Zn({},gu,{view:0,detail:0}),h6=Xo(Qp),o0,a0,Ju,yg=Zn({},Qp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bx,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ju&&(Ju&&e.type==="mousemove"?(o0=e.screenX-Ju.screenX,a0=e.screenY-Ju.screenY):a0=o0=0,Ju=e),o0)},movementY:function(e){return"movementY"in e?e.movementY:a0}}),X2=Xo(yg),m6=Zn({},yg,{dataTransfer:0}),g6=Xo(m6),v6=Zn({},Qp,{relatedTarget:0}),i0=Xo(v6),y6=Zn({},gu,{animationName:0,elapsedTime:0,pseudoElement:0}),b6=Xo(y6),x6=Zn({},gu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),w6=Xo(x6),S6=Zn({},gu,{data:0}),J2=Xo(S6),C6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E6={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},T6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T6[e])?!!t[e]:!1}function Bx(){return R6}var k6=Zn({},Qp,{key:function(e){if(e.key){var t=C6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bx,charCode:function(e){return e.type==="keypress"?Qh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_6=Xo(k6),I6=Zn({},yg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Q2=Xo(I6),A6=Zn({},Qp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bx}),N6=Xo(A6),$6=Zn({},gu,{propertyName:0,elapsedTime:0,pseudoElement:0}),P6=Xo($6),O6=Zn({},yg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),D6=Xo(O6),L6=[9,13,27,32],Fx=zi&&"CompositionEvent"in window,jd=null;zi&&"documentMode"in document&&(jd=document.documentMode);var M6=zi&&"TextEvent"in window&&!jd,OI=zi&&(!Fx||jd&&8<jd&&11>=jd),Z2=String.fromCharCode(32),eE=!1;function DI(e,t){switch(e){case"keyup":return L6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ic=!1;function B6(e,t){switch(e){case"compositionend":return LI(t);case"keypress":return t.which!==32?null:(eE=!0,Z2);case"textInput":return e=t.data,e===Z2&&eE?null:e;default:return null}}function F6(e,t){if(Ic)return e==="compositionend"||!Fx&&DI(e,t)?(e=PI(),Jh=Lx=cs=null,Ic=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OI&&t.locale!=="ko"?null:t.data;default:return null}}var z6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z6[e.type]:t==="textarea"}function MI(e,t,n,r){gI(r),t=vm(t,"onChange"),0<t.length&&(n=new Mx("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ud=null,gp=null;function j6(e){UI(e,0)}function bg(e){var t=Nc(e);if(cI(t))return e}function U6(e,t){if(e==="change")return t}var BI=!1;if(zi){var s0;if(zi){var l0="oninput"in document;if(!l0){var nE=document.createElement("div");nE.setAttribute("oninput","return;"),l0=typeof nE.oninput=="function"}s0=l0}else s0=!1;BI=s0&&(!document.documentMode||9<document.documentMode)}function rE(){Ud&&(Ud.detachEvent("onpropertychange",FI),gp=Ud=null)}function FI(e){if(e.propertyName==="value"&&bg(gp)){var t=[];if(MI(t,gp,e,kx(e)),e=j6,fl)e(t);else{fl=!0;try{_x(e,t)}finally{fl=!1,Ax()}}}}function W6(e,t,n){e==="focusin"?(rE(),Ud=t,gp=n,Ud.attachEvent("onpropertychange",FI)):e==="focusout"&&rE()}function H6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bg(gp)}function V6(e,t){if(e==="click")return bg(t)}function G6(e,t){if(e==="input"||e==="change")return bg(t)}function q6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:q6,Y6=Object.prototype.hasOwnProperty;function vp(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Y6.call(t,n[r])||!ra(e[n[r]],t[n[r]]))return!1;return!0}function oE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function aE(e,t){var n=oE(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oE(n)}}function zI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iE(){for(var e=window,t=fm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fm(e.document)}return t}function O1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var K6=zi&&"documentMode"in document&&11>=document.documentMode,Ac=null,D1=null,Wd=null,L1=!1;function sE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;L1||Ac==null||Ac!==fm(r)||(r=Ac,"selectionStart"in r&&O1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Wd&&vp(Wd,r)||(Wd=r,r=vm(D1,"onSelect"),0<r.length&&(t=new Mx("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ac)))}Px("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);Px("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Px(r6,2);for(var lE="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),c0=0;c0<lE.length;c0++)$x.set(lE[c0],0);Jc("onMouseEnter",["mouseout","mouseover"]);Jc("onMouseLeave",["mouseout","mouseover"]);Jc("onPointerEnter",["pointerout","pointerover"]);Jc("onPointerLeave",["pointerout","pointerover"]);Vl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Td="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jI=new Set("cancel close invalid load scroll toggle".split(" ").concat(Td));function cE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,QD(r,t,void 0,e),e.currentTarget=null}function UI(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&o.isPropagationStopped())break e;cE(o,l,u),a=c}else for(s=0;s<r.length;s++){if(l=r[s],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&o.isPropagationStopped())break e;cE(o,l,u),a=c}}}if(mm)throw e=N1,mm=!1,N1=null,e}function Hn(e,t){var n=qI(t),r=e+"__bubble";n.has(r)||(HI(t,e,2,!1),n.add(r))}var uE="_reactListening"+Math.random().toString(36).slice(2);function WI(e){e[uE]||(e[uE]=!0,iI.forEach(function(t){jI.has(t)||dE(t,!1,e,null),dE(t,!0,e,null)}))}function dE(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,a=n;if(e==="selectionchange"&&n.nodeType!==9&&(a=n.ownerDocument),r!==null&&!t&&jI.has(e)){if(e!=="scroll")return;o|=2,a=r}var s=qI(a),l=e+"__"+(t?"capture":"bubble");s.has(l)||(t&&(o|=4),HI(a,e,o,t),s.add(l))}function HI(e,t,n,r){var o=$x.get(t);switch(o===void 0?2:o){case 0:o=p6;break;case 1:o=f6;break;default:o=Ox}n=o.bind(null,t,n,e),o=void 0,!A1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function VI(e,t,n,r,o){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;s=s.return}for(;l!==null;){if(s=hl(l),s===null)return;if(c=s.tag,c===5||c===6){r=a=s;continue e}l=l.parentNode}}r=r.return}YD(function(){var u=a,d=kx(n),p=[];e:{var h=NI.get(e);if(h!==void 0){var m=Mx,b=e;switch(e){case"keypress":if(Qh(n)===0)break e;case"keydown":case"keyup":m=_6;break;case"focusin":b="focus",m=i0;break;case"focusout":b="blur",m=i0;break;case"beforeblur":case"afterblur":m=i0;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=X2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=g6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=N6;break;case kI:case _I:case II:m=b6;break;case AI:m=P6;break;case"scroll":m=h6;break;case"wheel":m=D6;break;case"copy":case"cut":case"paste":m=w6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Q2}var y=(t&4)!==0,g=!y&&e==="scroll",x=y?h!==null?h+"Capture":null:h;y=[];for(var v=u,S;v!==null;){S=v;var E=S.stateNode;if(S.tag===5&&E!==null&&(S=E,x!==null&&(E=pp(v,x),E!=null&&y.push(yp(v,E,S)))),g)break;v=v.return}0<y.length&&(h=new m(h,b,null,n,d),p.push({event:h,listeners:y}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&(t&16)===0&&(b=n.relatedTarget||n.fromElement)&&(hl(b)||b[vu]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(b=n.relatedTarget||n.toElement,m=u,b=b?hl(b):null,b!==null&&(g=ql(b),b!==g||b.tag!==5&&b.tag!==6)&&(b=null)):(m=null,b=u),m!==b)){if(y=X2,E="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Q2,E="onPointerLeave",x="onPointerEnter",v="pointer"),g=m==null?h:Nc(m),S=b==null?h:Nc(b),h=new y(E,v+"leave",m,n,d),h.target=g,h.relatedTarget=S,E=null,hl(d)===u&&(y=new y(x,v+"enter",b,n,d),y.target=S,y.relatedTarget=g,E=y),g=E,m&&b)t:{for(y=m,x=b,v=0,S=y;S;S=dc(S))v++;for(S=0,E=x;E;E=dc(E))S++;for(;0<v-S;)y=dc(y),v--;for(;0<S-v;)x=dc(x),S--;for(;v--;){if(y===x||x!==null&&y===x.alternate)break t;y=dc(y),x=dc(x)}y=null}else y=null;m!==null&&pE(p,h,m,y,!1),b!==null&&g!==null&&pE(p,g,b,y,!0)}}e:{if(h=u?Nc(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var R=U6;else if(tE(h))if(BI)R=G6;else{R=H6;var A=W6}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(R=V6);if(R&&(R=R(e,u))){MI(p,R,n,d);break e}A&&A(e,h,u),e==="focusout"&&(A=h._wrapperState)&&A.controlled&&h.type==="number"&&S1(h,"number",h.value)}switch(A=u?Nc(u):window,e){case"focusin":(tE(A)||A.contentEditable==="true")&&(Ac=A,D1=u,Wd=null);break;case"focusout":Wd=D1=Ac=null;break;case"mousedown":L1=!0;break;case"contextmenu":case"mouseup":case"dragend":L1=!1,sE(p,n,d);break;case"selectionchange":if(K6)break;case"keydown":case"keyup":sE(p,n,d)}var _;if(Fx)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Ic?DI(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(OI&&n.locale!=="ko"&&(Ic||N!=="onCompositionStart"?N==="onCompositionEnd"&&Ic&&(_=PI()):(cs=d,Lx="value"in cs?cs.value:cs.textContent,Ic=!0)),A=vm(u,N),0<A.length&&(N=new J2(N,e,null,n,d),p.push({event:N,listeners:A}),_?N.data=_:(_=LI(n),_!==null&&(N.data=_)))),(_=M6?B6(e,n):F6(e,n))&&(u=vm(u,"onBeforeInput"),0<u.length&&(d=new J2("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:u}),d.data=_))}UI(p,t)})}function yp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vm(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=pp(e,n),a!=null&&r.unshift(yp(e,a,o)),a=pp(e,t),a!=null&&r.push(yp(e,a,o))),e=e.return}return r}function dc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pE(e,t,n,r,o){for(var a=t._reactName,s=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=pp(n,a),c!=null&&s.unshift(yp(n,c,l))):o||(c=pp(n,a),c!=null&&s.push(yp(n,c,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function ym(){}var u0=null,d0=null;function GI(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function M1(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fE=typeof setTimeout=="function"?setTimeout:void 0,X6=typeof clearTimeout=="function"?clearTimeout:void 0;function zx(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function zc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function hE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var p0=0;function J6(e){return{$$typeof:Tx,toString:e,valueOf:e}}var xg=Math.random().toString(36).slice(2),us="__reactFiber$"+xg,bm="__reactProps$"+xg,vu="__reactContainer$"+xg,mE="__reactEvents$"+xg;function hl(e){var t=e[us];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vu]||n[us]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hE(e);e!==null;){if(n=e[us])return n;e=hE(e)}return t}e=n,n=e.parentNode}return null}function Zp(e){return e=e[us]||e[vu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Nc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Me(33))}function wg(e){return e[bm]||null}function qI(e){var t=e[mE];return t===void 0&&(t=e[mE]=new Set),t}var B1=[],$c=-1;function Os(e){return{current:e}}function Gn(e){0>$c||(e.current=B1[$c],B1[$c]=null,$c--)}function dr(e,t){$c++,B1[$c]=e.current,e.current=t}var Is={},to=Os(Is),Io=Os(!1),$l=Is;function Qc(e,t){var n=e.type.contextTypes;if(!n)return Is;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ao(e){return e=e.childContextTypes,e!=null}function xm(){Gn(Io),Gn(to)}function gE(e,t,n){if(to.current!==Is)throw Error(Me(168));dr(to,t),dr(Io,n)}function YI(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(Me(108,Lc(t)||"Unknown",o));return Zn({},n,r)}function Zh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Is,$l=to.current,dr(to,e),dr(Io,Io.current),!0}function vE(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=YI(e,t,$l),r.__reactInternalMemoizedMergedChildContext=e,Gn(Io),Gn(to),dr(to,e)):Gn(Io),dr(Io,n)}var jx=null,Tl=null,Q6=Dr.unstable_runWithPriority,Ux=Dr.unstable_scheduleCallback,F1=Dr.unstable_cancelCallback,Z6=Dr.unstable_shouldYield,yE=Dr.unstable_requestPaint,z1=Dr.unstable_now,e9=Dr.unstable_getCurrentPriorityLevel,Sg=Dr.unstable_ImmediatePriority,KI=Dr.unstable_UserBlockingPriority,XI=Dr.unstable_NormalPriority,JI=Dr.unstable_LowPriority,QI=Dr.unstable_IdlePriority,f0={},t9=yE!==void 0?yE:function(){},Ni=null,em=null,h0=!1,bE=z1(),Zr=1e4>bE?z1:function(){return z1()-bE};function Zc(){switch(e9()){case Sg:return 99;case KI:return 98;case XI:return 97;case JI:return 96;case QI:return 95;default:throw Error(Me(332))}}function ZI(e){switch(e){case 99:return Sg;case 98:return KI;case 97:return XI;case 96:return JI;case 95:return QI;default:throw Error(Me(332))}}function Pl(e,t){return e=ZI(e),Q6(e,t)}function bp(e,t,n){return e=ZI(e),Ux(e,t,n)}function hi(){if(em!==null){var e=em;em=null,F1(e)}eA()}function eA(){if(!h0&&Ni!==null){h0=!0;var e=0;try{var t=Ni;Pl(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Ni=null}catch(n){throw Ni!==null&&(Ni=Ni.slice(e+1)),Ux(Sg,hi),n}finally{h0=!1}}}var n9=Gl.ReactCurrentBatchConfig;function Aa(e,t){if(e&&e.defaultProps){t=Zn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var wm=Os(null),Sm=null,Pc=null,Cm=null;function Wx(){Cm=Pc=Sm=null}function Hx(e){var t=wm.current;Gn(wm),e.type._context._currentValue=t}function tA(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function jc(e,t){Sm=e,Cm=Pc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Pa=!0),e.firstContext=null)}function da(e,t){if(Cm!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Cm=e,t=1073741823),t={context:e,observedBits:t,next:null},Pc===null){if(Sm===null)throw Error(Me(308));Pc=t,Sm.dependencies={lanes:0,firstContext:t,responders:null}}else Pc=Pc.next=t;return e._currentValue}var is=!1;function Vx(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function nA(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xs(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function xE(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xp(e,t,n,r){var o=e.updateQueue;is=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,s===null?a=u:s.next=u,s=c;var d=e.alternate;if(d!==null){d=d.updateQueue;var p=d.lastBaseUpdate;p!==s&&(p===null?d.firstBaseUpdate=u:p.next=u,d.lastBaseUpdate=c)}}if(a!==null){p=o.baseState,s=0,d=u=c=null;do{l=a.lane;var h=a.eventTime;if((r&l)===l){d!==null&&(d=d.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,b=a;switch(l=t,h=n,b.tag){case 1:if(m=b.payload,typeof m=="function"){p=m.call(h,p,l);break e}p=m;break e;case 3:m.flags=m.flags&-4097|64;case 0:if(m=b.payload,l=typeof m=="function"?m.call(h,p,l):m,l==null)break e;p=Zn({},p,l);break e;case 2:is=!0}}a.callback!==null&&(e.flags|=32,l=o.effects,l===null?o.effects=[a]:l.push(a))}else h={eventTime:h,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=h,c=p):d=d.next=h,s|=l;if(a=a.next,a===null){if(l=o.shared.pending,l===null)break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}while(1);d===null&&(c=p),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,tf|=s,e.lanes=s,e.memoizedState=p}}function wE(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(Me(191,o));o.call(r)}}}var rA=new fg.Component().refs;function Em(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Zn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cg={isMounted:function(e){return(e=e._reactInternals)?ql(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wo(),o=ws(e),a=bs(r,o);a.payload=t,n!=null&&(a.callback=n),xs(e,a),Ss(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wo(),o=ws(e),a=bs(r,o);a.tag=1,a.payload=t,n!=null&&(a.callback=n),xs(e,a),Ss(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wo(),r=ws(e),o=bs(n,r);o.tag=2,t!=null&&(o.callback=t),xs(e,o),Ss(e,r,n)}};function SE(e,t,n,r,o,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,s):t.prototype&&t.prototype.isPureReactComponent?!vp(n,r)||!vp(o,a):!0}function oA(e,t,n){var r=!1,o=Is,a=t.contextType;return typeof a=="object"&&a!==null?a=da(a):(o=Ao(t)?$l:to.current,r=t.contextTypes,a=(r=r!=null)?Qc(e,o):Is),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Cg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function CE(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Cg.enqueueReplaceState(t,t.state,null)}function j1(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=rA,Vx(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=da(a):(a=Ao(t)?$l:to.current,o.context=Qc(e,a)),xp(e,n,o,r),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Em(e,t,a,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Cg.enqueueReplaceState(o,o.state,null),xp(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var ih=Array.isArray;function Qu(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Me(309));var r=n.stateNode}if(!r)throw Error(Me(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=r.refs;s===rA&&(s=r.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(Me(284));if(!n._owner)throw Error(Me(290,e))}return e}function sh(e,t){if(e.type!=="textarea")throw Error(Me(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function aA(e){function t(g,x){if(e){var v=g.lastEffect;v!==null?(v.nextEffect=x,g.lastEffect=x):g.firstEffect=g.lastEffect=x,x.nextEffect=null,x.flags=8}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function o(g,x){return g=Ns(g,x),g.index=0,g.sibling=null,g}function a(g,x,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<x?(g.flags=2,x):v):(g.flags=2,x)):x}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function l(g,x,v,S){return x===null||x.tag!==6?(x=b0(v,g.mode,S),x.return=g,x):(x=o(x,v),x.return=g,x)}function c(g,x,v,S){return x!==null&&x.elementType===v.type?(S=o(x,v.props),S.ref=Qu(g,x,v),S.return=g,S):(S=om(v.type,v.key,v.props,null,g.mode,S),S.ref=Qu(g,x,v),S.return=g,S)}function u(g,x,v,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=x0(v,g.mode,S),x.return=g,x):(x=o(x,v.children||[]),x.return=g,x)}function d(g,x,v,S,E){return x===null||x.tag!==7?(x=Vc(v,g.mode,S,E),x.return=g,x):(x=o(x,v),x.return=g,x)}function p(g,x,v){if(typeof x=="string"||typeof x=="number")return x=b0(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Cd:return v=om(x.type,x.key,x.props,null,g.mode,v),v.ref=Qu(g,null,x),v.return=g,v;case pl:return x=x0(x,g.mode,v),x.return=g,x}if(ih(x)||Gu(x))return x=Vc(x,g.mode,v,null),x.return=g,x;sh(g,x)}return null}function h(g,x,v,S){var E=x!==null?x.key:null;if(typeof v=="string"||typeof v=="number")return E!==null?null:l(g,x,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cd:return v.key===E?v.type===ls?d(g,x,v.props.children,S,E):c(g,x,v,S):null;case pl:return v.key===E?u(g,x,v,S):null}if(ih(v)||Gu(v))return E!==null?null:d(g,x,v,S,null);sh(g,v)}return null}function m(g,x,v,S,E){if(typeof S=="string"||typeof S=="number")return g=g.get(v)||null,l(x,g,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Cd:return g=g.get(S.key===null?v:S.key)||null,S.type===ls?d(x,g,S.props.children,E,S.key):c(x,g,S,E);case pl:return g=g.get(S.key===null?v:S.key)||null,u(x,g,S,E)}if(ih(S)||Gu(S))return g=g.get(v)||null,d(x,g,S,E,null);sh(x,S)}return null}function b(g,x,v,S){for(var E=null,R=null,A=x,_=x=0,N=null;A!==null&&_<v.length;_++){A.index>_?(N=A,A=null):N=A.sibling;var k=h(g,A,v[_],S);if(k===null){A===null&&(A=N);break}e&&A&&k.alternate===null&&t(g,A),x=a(k,x,_),R===null?E=k:R.sibling=k,R=k,A=N}if(_===v.length)return n(g,A),E;if(A===null){for(;_<v.length;_++)A=p(g,v[_],S),A!==null&&(x=a(A,x,_),R===null?E=A:R.sibling=A,R=A);return E}for(A=r(g,A);_<v.length;_++)N=m(A,g,_,v[_],S),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?_:N.key),x=a(N,x,_),R===null?E=N:R.sibling=N,R=N);return e&&A.forEach(function(I){return t(g,I)}),E}function y(g,x,v,S){var E=Gu(v);if(typeof E!="function")throw Error(Me(150));if(v=E.call(v),v==null)throw Error(Me(151));for(var R=E=null,A=x,_=x=0,N=null,k=v.next();A!==null&&!k.done;_++,k=v.next()){A.index>_?(N=A,A=null):N=A.sibling;var I=h(g,A,k.value,S);if(I===null){A===null&&(A=N);break}e&&A&&I.alternate===null&&t(g,A),x=a(I,x,_),R===null?E=I:R.sibling=I,R=I,A=N}if(k.done)return n(g,A),E;if(A===null){for(;!k.done;_++,k=v.next())k=p(g,k.value,S),k!==null&&(x=a(k,x,_),R===null?E=k:R.sibling=k,R=k);return E}for(A=r(g,A);!k.done;_++,k=v.next())k=m(A,g,_,k.value,S),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?_:k.key),x=a(k,x,_),R===null?E=k:R.sibling=k,R=k);return e&&A.forEach(function(O){return t(g,O)}),E}return function(g,x,v,S){var E=typeof v=="object"&&v!==null&&v.type===ls&&v.key===null;E&&(v=v.props.children);var R=typeof v=="object"&&v!==null;if(R)switch(v.$$typeof){case Cd:e:{for(R=v.key,E=x;E!==null;){if(E.key===R){switch(E.tag){case 7:if(v.type===ls){n(g,E.sibling),x=o(E,v.props.children),x.return=g,g=x;break e}break;default:if(E.elementType===v.type){n(g,E.sibling),x=o(E,v.props),x.ref=Qu(g,E,v),x.return=g,g=x;break e}}n(g,E);break}else t(g,E);E=E.sibling}v.type===ls?(x=Vc(v.props.children,g.mode,S,v.key),x.return=g,g=x):(S=om(v.type,v.key,v.props,null,g.mode,S),S.ref=Qu(g,x,v),S.return=g,g=S)}return s(g);case pl:e:{for(E=v.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(g,x.sibling),x=o(x,v.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=x0(v,g.mode,S),x.return=g,g=x}return s(g)}if(typeof v=="string"||typeof v=="number")return v=""+v,x!==null&&x.tag===6?(n(g,x.sibling),x=o(x,v),x.return=g,g=x):(n(g,x),x=b0(v,g.mode,S),x.return=g,g=x),s(g);if(ih(v))return b(g,x,v,S);if(Gu(v))return y(g,x,v,S);if(R&&sh(g,v),typeof v=="undefined"&&!E)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(Me(152,Lc(g.type)||"Component"))}return n(g,x)}}var Tm=aA(!0),iA=aA(!1),ef={},ri=Os(ef),wp=Os(ef),Sp=Os(ef);function ml(e){if(e===ef)throw Error(Me(174));return e}function U1(e,t){switch(dr(Sp,t),dr(wp,e),dr(ri,ef),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:R1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=R1(t,e)}Gn(ri),dr(ri,t)}function eu(){Gn(ri),Gn(wp),Gn(Sp)}function EE(e){ml(Sp.current);var t=ml(ri.current),n=R1(t,e.type);t!==n&&(dr(wp,e),dr(ri,n))}function Gx(e){wp.current===e&&(Gn(ri),Gn(wp))}var ur=Os(0);function Rm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&64)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Oi=null,ds=null,oi=!1;function sA(e,t){var n=oa(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function TE(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function W1(e){if(oi){var t=ds;if(t){var n=t;if(!TE(e,t)){if(t=zc(n.nextSibling),!t||!TE(e,t)){e.flags=e.flags&-1025|2,oi=!1,Oi=e;return}sA(Oi,n)}Oi=e,ds=zc(t.firstChild)}else e.flags=e.flags&-1025|2,oi=!1,Oi=e}}function RE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Oi=e}function lh(e){if(e!==Oi)return!1;if(!oi)return RE(e),oi=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!M1(t,e.memoizedProps))for(t=ds;t;)sA(e,t),t=zc(t.nextSibling);if(RE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Me(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ds=zc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ds=null}}else ds=Oi?zc(e.stateNode.nextSibling):null;return!0}function m0(){ds=Oi=null,oi=!1}var Uc=[];function qx(){for(var e=0;e<Uc.length;e++)Uc[e]._workInProgressVersionPrimary=null;Uc.length=0}var Hd=Gl.ReactCurrentDispatcher,sa=Gl.ReactCurrentBatchConfig,Cp=0,gr=null,Xr=null,Fr=null,km=!1,Vd=!1;function Eo(){throw Error(Me(321))}function Yx(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ra(e[n],t[n]))return!1;return!0}function Kx(e,t,n,r,o,a){if(Cp=a,gr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hd.current=e===null||e.memoizedState===null?o9:a9,e=n(r,o),Vd){a=0;do{if(Vd=!1,!(25>a))throw Error(Me(301));a+=1,Fr=Xr=null,t.updateQueue=null,Hd.current=i9,e=n(r,o)}while(Vd)}if(Hd.current=Nm,t=Xr!==null&&Xr.next!==null,Cp=0,Fr=Xr=gr=null,km=!1,t)throw Error(Me(300));return e}function gl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fr===null?gr.memoizedState=Fr=e:Fr=Fr.next=e,Fr}function Yl(){if(Xr===null){var e=gr.alternate;e=e!==null?e.memoizedState:null}else e=Xr.next;var t=Fr===null?gr.memoizedState:Fr.next;if(t!==null)Fr=t,Xr=e;else{if(e===null)throw Error(Me(310));Xr=e,e={memoizedState:Xr.memoizedState,baseState:Xr.baseState,baseQueue:Xr.baseQueue,queue:Xr.queue,next:null},Fr===null?gr.memoizedState=Fr=e:Fr=Fr.next=e}return Fr}function Qa(e,t){return typeof t=="function"?t(e):t}function Zu(e){var t=Yl(),n=t.queue;if(n===null)throw Error(Me(311));n.lastRenderedReducer=e;var r=Xr,o=r.baseQueue,a=n.pending;if(a!==null){if(o!==null){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var l=s=a=null,c=o;do{var u=c.lane;if((Cp&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};l===null?(s=l=d,a=r):l=l.next=d,gr.lanes|=u,tf|=u}c=c.next}while(c!==null&&c!==o);l===null?a=r:l.next=s,ra(r,t.memoizedState)||(Pa=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ed(e){var t=Yl(),n=t.queue;if(n===null)throw Error(Me(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do a=e(a,s.action),s=s.next;while(s!==o);ra(a,t.memoizedState)||(Pa=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function kE(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(Cp&e)===e)&&(t._workInProgressVersionPrimary=r,Uc.push(t))),e)return n(t._source);throw Uc.push(t),Error(Me(350))}function lA(e,t,n,r){var o=mo;if(o===null)throw Error(Me(349));var a=t._getVersion,s=a(t._source),l=Hd.current,c=l.useState(function(){return kE(o,t,n)}),u=c[1],d=c[0];c=Fr;var p=e.memoizedState,h=p.refs,m=h.getSnapshot,b=p.source;p=p.subscribe;var y=gr;return e.memoizedState={refs:h,source:t,subscribe:r},l.useEffect(function(){h.getSnapshot=n,h.setSnapshot=u;var g=a(t._source);if(!ra(s,g)){g=n(t._source),ra(d,g)||(u(g),g=ws(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var x=o.entanglements,v=g;0<v;){var S=31-_s(v),E=1<<S;x[S]|=g,v&=~E}}},[n,t,r]),l.useEffect(function(){return r(t._source,function(){var g=h.getSnapshot,x=h.setSnapshot;try{x(g(t._source));var v=ws(y);o.mutableReadLanes|=v&o.pendingLanes}catch(S){x(function(){throw S})}})},[t,r]),ra(m,n)&&ra(b,t)&&ra(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:d},e.dispatch=u=Qx.bind(null,gr,e),c.queue=e,c.baseQueue=null,d=kE(o,t,n),c.memoizedState=c.baseState=d),d}function cA(e,t,n){var r=Yl();return lA(r,e,t,n)}function td(e){var t=gl();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},e=e.dispatch=Qx.bind(null,gr,e),[t.memoizedState,e]}function _m(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=gr.updateQueue,t===null?(t={lastEffect:null},gr.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function _E(e){var t=gl();return e={current:e},t.memoizedState=e}function Im(){return Yl().memoizedState}function H1(e,t,n,r){var o=gl();gr.flags|=e,o.memoizedState=_m(1|t,n,void 0,r===void 0?null:r)}function Xx(e,t,n,r){var o=Yl();r=r===void 0?null:r;var a=void 0;if(Xr!==null){var s=Xr.memoizedState;if(a=s.destroy,r!==null&&Yx(r,s.deps)){_m(t,n,a,r);return}}gr.flags|=e,o.memoizedState=_m(1|t,n,a,r)}function IE(e,t){return H1(516,4,e,t)}function Am(e,t){return Xx(516,4,e,t)}function uA(e,t){return Xx(4,2,e,t)}function dA(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function pA(e,t,n){return n=n!=null?n.concat([e]):null,Xx(4,2,dA.bind(null,t,e),n)}function Jx(){}function fA(e,t){var n=Yl();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yx(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hA(e,t){var n=Yl();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yx(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function r9(e,t){var n=Zc();Pl(98>n?98:n,function(){e(!0)}),Pl(97<n?97:n,function(){var r=sa.transition;sa.transition=1;try{e(!1),t()}finally{sa.transition=r}})}function Qx(e,t,n){var r=Wo(),o=ws(e),a={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?a.next=a:(a.next=s.next,s.next=a),t.pending=a,s=e.alternate,e===gr||s!==null&&s===gr)Vd=km=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,c=s(l,n);if(a.eagerReducer=s,a.eagerState=c,ra(c,l))return}catch{}finally{}Ss(e,o,r)}}var Nm={readContext:da,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useMutableSource:Eo,useOpaqueIdentifier:Eo,unstable_isNewReconciler:!1},o9={readContext:da,useCallback:function(e,t){return gl().memoizedState=[e,t===void 0?null:t],e},useContext:da,useEffect:IE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,H1(4,2,dA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return H1(4,2,e,t)},useMemo:function(e,t){var n=gl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Qx.bind(null,gr,e),[r.memoizedState,e]},useRef:_E,useState:td,useDebugValue:Jx,useDeferredValue:function(e){var t=td(e),n=t[0],r=t[1];return IE(function(){var o=sa.transition;sa.transition=1;try{r(e)}finally{sa.transition=o}},[e]),n},useTransition:function(){var e=td(!1),t=e[0];return e=r9.bind(null,e[1]),_E(e),[e,t]},useMutableSource:function(e,t,n){var r=gl();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},lA(r,e,t,n)},useOpaqueIdentifier:function(){if(oi){var e=!1,t=J6(function(){throw e||(e=!0,n("r:"+(p0++).toString(36))),Error(Me(355))}),n=td(t)[1];return(gr.mode&2)===0&&(gr.flags|=516,_m(5,function(){n("r:"+(p0++).toString(36))},void 0,null)),t}return t="r:"+(p0++).toString(36),td(t),t},unstable_isNewReconciler:!1},a9={readContext:da,useCallback:fA,useContext:da,useEffect:Am,useImperativeHandle:pA,useLayoutEffect:uA,useMemo:hA,useReducer:Zu,useRef:Im,useState:function(){return Zu(Qa)},useDebugValue:Jx,useDeferredValue:function(e){var t=Zu(Qa),n=t[0],r=t[1];return Am(function(){var o=sa.transition;sa.transition=1;try{r(e)}finally{sa.transition=o}},[e]),n},useTransition:function(){var e=Zu(Qa)[0];return[Im().current,e]},useMutableSource:cA,useOpaqueIdentifier:function(){return Zu(Qa)[0]},unstable_isNewReconciler:!1},i9={readContext:da,useCallback:fA,useContext:da,useEffect:Am,useImperativeHandle:pA,useLayoutEffect:uA,useMemo:hA,useReducer:ed,useRef:Im,useState:function(){return ed(Qa)},useDebugValue:Jx,useDeferredValue:function(e){var t=ed(Qa),n=t[0],r=t[1];return Am(function(){var o=sa.transition;sa.transition=1;try{r(e)}finally{sa.transition=o}},[e]),n},useTransition:function(){var e=ed(Qa)[0];return[Im().current,e]},useMutableSource:cA,useOpaqueIdentifier:function(){return ed(Qa)[0]},unstable_isNewReconciler:!1},s9=Gl.ReactCurrentOwner,Pa=!1;function Ro(e,t,n,r){t.child=e===null?iA(t,null,n,r):Tm(t,e.child,n,r)}function AE(e,t,n,r,o){n=n.render;var a=t.ref;return jc(t,o),r=Kx(e,t,n,r,a,o),e!==null&&!Pa?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Di(e,t,o)):(t.flags|=1,Ro(e,t,r,o),t.child)}function NE(e,t,n,r,o,a){if(e===null){var s=n.type;return typeof s=="function"&&!ow(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mA(e,t,s,r,o,a)):(e=om(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,(o&a)===0&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:vp,n(o,r)&&e.ref===t.ref)?Di(e,t,a):(t.flags|=1,e=Ns(s,r),e.ref=t.ref,e.return=t,t.child=e)}function mA(e,t,n,r,o,a){if(e!==null&&vp(e.memoizedProps,r)&&e.ref===t.ref)if(Pa=!1,(a&o)!==0)(e.flags&16384)!==0&&(Pa=!0);else return t.lanes=e.lanes,Di(e,t,a);return V1(e,t,n,r,a)}function g0(e,t,n){var r=t.pendingProps,o=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if((t.mode&4)===0)t.memoizedState={baseLanes:0},uh(t,n);else if((n&1073741824)!==0)t.memoizedState={baseLanes:0},uh(t,a!==null?a.baseLanes:n);else return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},uh(t,e),null;else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,uh(t,r);return Ro(e,t,o,n),t.child}function gA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function V1(e,t,n,r,o){var a=Ao(n)?$l:to.current;return a=Qc(t,a),jc(t,o),n=Kx(e,t,n,r,a,o),e!==null&&!Pa?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Di(e,t,o)):(t.flags|=1,Ro(e,t,n,o),t.child)}function $E(e,t,n,r,o){if(Ao(n)){var a=!0;Zh(t)}else a=!1;if(jc(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),oA(t,n,r),j1(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=da(u):(u=Ao(n)?$l:to.current,u=Qc(t,u));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==u)&&CE(t,s,r,u),is=!1;var h=t.memoizedState;s.state=h,xp(t,r,s,o),c=t.memoizedState,l!==r||h!==c||Io.current||is?(typeof d=="function"&&(Em(t,n,d,r),c=t.memoizedState),(l=is||SE(t,n,l,r,h,c,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,nA(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Aa(t.type,l),s.props=u,p=t.pendingProps,h=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=da(c):(c=Ao(n)?$l:to.current,c=Qc(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||h!==c)&&CE(t,s,r,c),is=!1,h=t.memoizedState,s.state=h,xp(t,r,s,o);var b=t.memoizedState;l!==p||h!==b||Io.current||is?(typeof m=="function"&&(Em(t,n,m,r),b=t.memoizedState),(u=is||SE(t,n,u,r,h,b,c))?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,b,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,b,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=b),s.props=r,s.state=b,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return G1(e,t,n,r,a,o)}function G1(e,t,n,r,o,a){gA(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&vE(t,n,!1),Di(e,t,a);r=t.stateNode,s9.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Tm(t,e.child,null,a),t.child=Tm(t,null,l,a)):Ro(e,t,l,a),t.memoizedState=r.state,o&&vE(t,n,!0),t.child}function PE(e){var t=e.stateNode;t.pendingContext?gE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gE(e,t.context,!1),U1(e,t.containerInfo)}var ch={dehydrated:null,retryLane:0};function OE(e,t,n){var r=t.pendingProps,o=ur.current,a=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(a=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),dr(ur,o&1),e===null?(r.fallback!==void 0&&W1(t),e=r.children,o=r.fallback,a?(e=DE(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ch,e):typeof r.unstable_expectedLoadTime=="number"?(e=DE(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ch,t.lanes=33554432,e):(n=aw({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?a?(r=ME(e,t,r.children,r.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=ch,r):(n=LE(e,t,r.children,n),t.memoizedState=null,n):a?(r=ME(e,t,r.children,r.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=ch,r):(n=LE(e,t,r.children,n),t.memoizedState=null,n)}function DE(e,t,n,r){var o=e.mode,a=e.child;return t={mode:"hidden",children:t},(o&2)===0&&a!==null?(a.childLanes=0,a.pendingProps=t):a=aw(t,o,0,null),n=Vc(n,o,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n}function LE(e,t,n,r){var o=e.child;return e=o.sibling,n=Ns(o,{mode:"visible",children:n}),(t.mode&2)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ME(e,t,n,r,o){var a=t.mode,s=e.child;e=s.sibling;var l={mode:"hidden",children:n};return(a&2)===0&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ns(s,l),e!==null?r=Ns(e,r):(r=Vc(r,a,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function BE(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),tA(e.return,t)}function v0(e,t,n,r,o,a){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=a)}function FE(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(Ro(e,t,r.children,n),r=ur.current,(r&2)!==0)r=r&1|2,t.flags|=64;else{if(e!==null&&(e.flags&64)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&BE(e,n);else if(e.tag===19)BE(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(dr(ur,r),(t.mode&2)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Rm(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),v0(t,!1,o,n,a,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Rm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}v0(t,!0,n,null,a,t.lastEffect);break;case"together":v0(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Di(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tf|=t.lanes,(n&t.childLanes)!==0){if(e!==null&&t.child!==e.child)throw Error(Me(153));if(t.child!==null){for(e=t.child,n=Ns(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ns(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var vA,q1,yA,bA;vA=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};q1=function(){};yA=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ml(ri.current);var a=null;switch(n){case"input":o=x1(e,o),r=x1(e,r),a=[];break;case"option":o=C1(e,o),r=C1(e,r),a=[];break;case"select":o=Zn({},o,{value:void 0}),r=Zn({},r,{value:void 0}),a=[];break;case"textarea":o=E1(e,o),r=E1(e,r),a=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ym)}k1(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(up.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(up.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Hn("scroll",e),a||l===c||(a=[])):typeof c=="object"&&c!==null&&c.$$typeof===Tx?c.toString():(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};bA=function(e,t,n,r){n!==r&&(t.flags|=4)};function nd(e,t){if(!oi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function l9(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ao(t.type)&&xm(),null;case 3:return eu(),Gn(Io),Gn(to),qx(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lh(t)?t.flags|=4:r.hydrate||(t.flags|=256)),q1(t),null;case 5:Gx(t);var o=ml(Sp.current);if(n=t.type,e!==null&&t.stateNode!=null)yA(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(Me(166));return null}if(e=ml(ri.current),lh(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[us]=t,r[bm]=a,n){case"dialog":Hn("cancel",r),Hn("close",r);break;case"iframe":case"object":case"embed":Hn("load",r);break;case"video":case"audio":for(e=0;e<Td.length;e++)Hn(Td[e],r);break;case"source":Hn("error",r);break;case"img":case"image":case"link":Hn("error",r),Hn("load",r);break;case"details":Hn("toggle",r);break;case"input":F2(r,a),Hn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Hn("invalid",r);break;case"textarea":j2(r,a),Hn("invalid",r)}k1(n,a),e=null;for(var s in a)a.hasOwnProperty(s)&&(o=a[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):up.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&Hn("scroll",r));switch(n){case"input":nh(r),z2(r,a,!0);break;case"textarea":nh(r),U2(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=ym)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===T1.html&&(e=pI(n)),e===T1.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[us]=t,e[bm]=r,vA(e,t,!1,!1),t.stateNode=e,s=_1(n,r),n){case"dialog":Hn("cancel",e),Hn("close",e),o=r;break;case"iframe":case"object":case"embed":Hn("load",e),o=r;break;case"video":case"audio":for(o=0;o<Td.length;o++)Hn(Td[o],e);o=r;break;case"source":Hn("error",e),o=r;break;case"img":case"image":case"link":Hn("error",e),Hn("load",e),o=r;break;case"details":Hn("toggle",e),o=r;break;case"input":F2(e,r),o=x1(e,r),Hn("invalid",e);break;case"option":o=C1(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Zn({},r,{value:void 0}),Hn("invalid",e);break;case"textarea":j2(e,r),o=E1(e,r),Hn("invalid",e);break;default:o=r}k1(n,o);var l=o;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?mI(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&fI(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&dp(e,c):typeof c=="number"&&dp(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(up.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Hn("scroll",e):c!=null&&bx(e,a,c,s))}switch(n){case"input":nh(e),z2(e,r,!1);break;case"textarea":nh(e),U2(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ks(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Mc(e,!!r.multiple,a,!1):r.defaultValue!=null&&Mc(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ym)}GI(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)bA(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Me(166));n=ml(Sp.current),ml(ri.current),lh(t)?(r=t.stateNode,n=t.memoizedProps,r[us]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[us]=t,t.stateNode=r)}return null;case 13:return Gn(ur),r=t.memoizedState,(t.flags&64)!==0?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&lh(t):n=e.memoizedState!==null,r&&!n&&(t.mode&2)!==0&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||(ur.current&1)!==0?zr===0&&(zr=3):((zr===0||zr===3)&&(zr=4),mo===null||(tf&134217727)===0&&(bu&134217727)===0||Wc(mo,eo))),(r||n)&&(t.flags|=4),null);case 4:return eu(),q1(t),e===null&&WI(t.stateNode.containerInfo),null;case 10:return Hx(t),null;case 17:return Ao(t.type)&&xm(),null;case 19:if(Gn(ur),r=t.memoizedState,r===null)return null;if(a=(t.flags&64)!==0,s=r.rendering,s===null)if(a)nd(r,!1);else{if(zr!==0||e!==null&&(e.flags&64)!==0)for(e=t.child;e!==null;){if(s=Rm(e),s!==null){for(t.flags|=64,nd(r,!1),a=s.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,s=a.alternate,s===null?(a.childLanes=0,a.lanes=e,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return dr(ur,ur.current&1|2),t.child}e=e.sibling}r.tail!==null&&Zr()>Z1&&(t.flags|=64,a=!0,nd(r,!1),t.lanes=33554432)}else{if(!a)if(e=Rm(s),e!==null){if(t.flags|=64,a=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nd(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!oi)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Zr()-r.renderingStartTime>Z1&&n!==1073741824&&(t.flags|=64,a=!0,nd(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Zr(),n.sibling=null,t=ur.current,dr(ur,a?t&1|2:t&1),n):null;case 23:case 24:return rw(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(Me(156,t.tag))}function c9(e){switch(e.tag){case 1:Ao(e.type)&&xm();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(eu(),Gn(Io),Gn(to),qx(),t=e.flags,(t&64)!==0)throw Error(Me(285));return e.flags=t&-4097|64,e;case 5:return Gx(e),null;case 13:return Gn(ur),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return Gn(ur),null;case 4:return eu(),null;case 10:return Hx(e),null;case 23:case 24:return rw(),null;default:return null}}function Zx(e,t){try{var n="",r=t;do n+=WD(r),r=r.return;while(r);var o=n}catch(a){o=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:o}}function Y1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var u9=typeof WeakMap=="function"?WeakMap:Map;function xA(e,t,n){n=bs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Pm||(Pm=!0,eb=r),Y1(e,t)},n}function wA(e,t,n){n=bs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Y1(e,t),r(o)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Za===null?Za=new Set([this]):Za.add(this),Y1(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var d9=typeof WeakSet=="function"?WeakSet:Set;function zE(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Cs(e,n)}else t.current=null}function p9(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Aa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&zx(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(Me(163))}function f9(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,(o&4)!==0&&(o&1)!==0&&(AA(n,e),w9(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Aa(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&wE(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}wE(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&GI(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&TI(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(Me(163))}function jE(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=hI("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function UE(e,t){if(Tl&&typeof Tl.onCommitFiberUnmount=="function")try{Tl.onCommitFiberUnmount(jx,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if((r&4)!==0)AA(t,n);else{r=t;try{o()}catch(a){Cs(r,a)}}n=n.next}while(n!==e)}break;case 1:if(zE(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(a){Cs(t,a)}break;case 5:zE(t);break;case 4:SA(e,t)}}function WE(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function HE(e){return e.tag===5||e.tag===3||e.tag===4}function VE(e){e:{for(var t=e.return;t!==null;){if(HE(t))break e;t=t.return}throw Error(Me(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(Me(161))}n.flags&16&&(dp(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||HE(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?K1(e,n,t):X1(e,n,t)}function K1(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ym));else if(r!==4&&(e=e.child,e!==null))for(K1(e,t,n),e=e.sibling;e!==null;)K1(e,t,n),e=e.sibling}function X1(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(X1(e,t,n),e=e.sibling;e!==null;)X1(e,t,n),e=e.sibling}function SA(e,t){for(var n=t,r=!1,o,a;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(Me(160));switch(o=r.stateNode,r.tag){case 5:a=!1;break e;case 3:o=o.containerInfo,a=!0;break e;case 4:o=o.containerInfo,a=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,l=n,c=l;;)if(UE(s,c),c.child!==null&&c.tag!==4)c.child.return=c,c=c.child;else{if(c===l)break e;for(;c.sibling===null;){if(c.return===null||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}a?(s=o,l=n.stateNode,s.nodeType===8?s.parentNode.removeChild(l):s.removeChild(l)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,a=!0,n.child.return=n,n=n.child;continue}}else if(UE(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function y0(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,a!==null){for(n[bm]=r,e==="input"&&r.type==="radio"&&r.name!=null&&uI(n,r),_1(e,o),t=_1(e,r),o=0;o<a.length;o+=2){var s=a[o],l=a[o+1];s==="style"?mI(n,l):s==="dangerouslySetInnerHTML"?fI(n,l):s==="children"?dp(n,l):bx(n,s,l,t)}switch(e){case"input":w1(n,r);break;case"textarea":dI(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,a=r.value,a!=null?Mc(n,!!r.multiple,a,!1):e!==!!r.multiple&&(r.defaultValue!=null?Mc(n,!!r.multiple,r.defaultValue,!0):Mc(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(Me(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,TI(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(nw=Zr(),jE(t.child,!0)),GE(t);return;case 19:GE(t);return;case 17:return;case 23:case 24:jE(t,t.memoizedState!==null);return}throw Error(Me(163))}function GE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new d9),t.forEach(function(r){var o=E9.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function h9(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var m9=Math.ceil,$m=Gl.ReactCurrentDispatcher,ew=Gl.ReactCurrentOwner,Ot=0,mo=null,Rr=null,eo=0,Ol=0,J1=Os(0),zr=0,Eg=null,yu=0,tf=0,bu=0,tw=0,Q1=null,nw=0,Z1=1/0;function xu(){Z1=Zr()+500}var ot=null,Pm=!1,eb=null,Za=null,As=!1,Gd=null,Rd=90,tb=[],nb=[],Li=null,qd=0,rb=null,tm=-1,Pi=0,nm=0,Yd=null,rm=!1;function Wo(){return(Ot&48)!==0?Zr():tm!==-1?tm:tm=Zr()}function ws(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return Zc()===99?1:2;if(Pi===0&&(Pi=yu),n9.transition!==0){nm!==0&&(nm=Q1!==null?Q1.pendingLanes:0),e=Pi;var t=4186112&~nm;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Zc(),(Ot&4)!==0&&e===98?e=gm(12,Pi):(e=a6(e),e=gm(e,Pi)),e}function Ss(e,t,n){if(50<qd)throw qd=0,rb=null,Error(Me(185));if(e=Tg(e,t),e===null)return null;vg(e,t,n),e===mo&&(bu|=t,zr===4&&Wc(e,eo));var r=Zc();t===1?(Ot&8)!==0&&(Ot&48)===0?ob(e):(pa(e,n),Ot===0&&(xu(),hi())):((Ot&4)===0||r!==98&&r!==99||(Li===null?Li=new Set([e]):Li.add(e)),pa(e,n)),Q1=e}function Tg(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}function pa(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-_s(s),c=1<<l,u=a[l];if(u===-1){if((c&r)===0||(c&o)!==0){u=t,Ec(c);var d=zn;a[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=mp(e,e===mo?eo:0),t=zn,r===0)n!==null&&(n!==f0&&F1(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==f0&&F1(n)}t===15?(n=ob.bind(null,e),Ni===null?(Ni=[n],em=Ux(Sg,eA)):Ni.push(n),n=f0):t===14?n=bp(99,ob.bind(null,e)):(n=i6(t),n=bp(n,CA.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function CA(e){if(tm=-1,nm=Pi=0,(Ot&48)!==0)throw Error(Me(327));var t=e.callbackNode;if(Ds()&&e.callbackNode!==t)return null;var n=mp(e,e===mo?eo:0);if(n===0)return null;var r=n,o=Ot;Ot|=16;var a=kA();(mo!==e||eo!==r)&&(xu(),Hc(e,r));do try{y9();break}catch(l){RA(e,l)}while(1);if(Wx(),$m.current=a,Ot=o,Rr!==null?r=0:(mo=null,eo=0,r=zr),(yu&bu)!==0)Hc(e,0);else if(r!==0){if(r===2&&(Ot|=64,e.hydrate&&(e.hydrate=!1,zx(e.containerInfo)),n=$I(e),n!==0&&(r=kd(e,n))),r===1)throw t=Eg,Hc(e,0),Wc(e,n),pa(e,Zr()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(Me(345));case 2:rl(e);break;case 3:if(Wc(e,n),(n&62914560)===n&&(r=nw+500-Zr(),10<r)){if(mp(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Wo(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=fE(rl.bind(null,e),r);break}rl(e);break;case 4:if(Wc(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-_s(n);a=1<<s,s=r[s],s>o&&(o=s),n&=~a}if(n=o,n=Zr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*m9(n/1960))-n,10<n){e.timeoutHandle=fE(rl.bind(null,e),n);break}rl(e);break;case 5:rl(e);break;default:throw Error(Me(329))}}return pa(e,Zr()),e.callbackNode===t?CA.bind(null,e):null}function Wc(e,t){for(t&=~tw,t&=~bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_s(t),r=1<<n;e[n]=-1,t&=~r}}function ob(e){if((Ot&48)!==0)throw Error(Me(327));if(Ds(),e===mo&&(e.expiredLanes&eo)!==0){var t=eo,n=kd(e,t);(yu&bu)!==0&&(t=mp(e,t),n=kd(e,t))}else t=mp(e,0),n=kd(e,t);if(e.tag!==0&&n===2&&(Ot|=64,e.hydrate&&(e.hydrate=!1,zx(e.containerInfo)),t=$I(e),t!==0&&(n=kd(e,t))),n===1)throw n=Eg,Hc(e,0),Wc(e,t),pa(e,Zr()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,rl(e),pa(e,Zr()),null}function g9(){if(Li!==null){var e=Li;Li=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,pa(t,Zr())})}hi()}function EA(e,t){var n=Ot;Ot|=1;try{return e(t)}finally{Ot=n,Ot===0&&(xu(),hi())}}function TA(e,t){var n=Ot;Ot&=-2,Ot|=8;try{return e(t)}finally{Ot=n,Ot===0&&(xu(),hi())}}function uh(e,t){dr(J1,Ol),Ol|=t,yu|=t}function rw(){Ol=J1.current,Gn(J1)}function Hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,X6(n)),Rr!==null)for(n=Rr.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&xm();break;case 3:eu(),Gn(Io),Gn(to),qx();break;case 5:Gx(r);break;case 4:eu();break;case 13:Gn(ur);break;case 19:Gn(ur);break;case 10:Hx(r);break;case 23:case 24:rw()}n=n.return}mo=e,Rr=Ns(e.current,null),eo=Ol=yu=t,zr=0,Eg=null,tw=bu=tf=0}function RA(e,t){do{var n=Rr;try{if(Wx(),Hd.current=Nm,km){for(var r=gr.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}km=!1}if(Cp=0,Fr=Xr=gr=null,Vd=!1,ew.current=null,n===null||n.return===null){zr=1,Eg=t,Rr=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=eo,l.flags|=2048,l.firstEffect=l.lastEffect=null,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c;if((l.mode&2)===0){var d=l.alternate;d?(l.updateQueue=d.updateQueue,l.memoizedState=d.memoizedState,l.lanes=d.lanes):(l.updateQueue=null,l.memoizedState=null)}var p=(ur.current&1)!==0,h=s;do{var m;if(m=h.tag===13){var b=h.memoizedState;if(b!==null)m=b.dehydrated!==null;else{var y=h.memoizedProps;m=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(m){var g=h.updateQueue;if(g===null){var x=new Set;x.add(u),h.updateQueue=x}else g.add(u);if((h.mode&2)===0){if(h.flags|=64,l.flags|=16384,l.flags&=-2981,l.tag===1)if(l.alternate===null)l.tag=17;else{var v=bs(-1,1);v.tag=2,xs(l,v)}l.lanes|=1;break e}c=void 0,l=t;var S=a.pingCache;if(S===null?(S=a.pingCache=new u9,c=new Set,S.set(u,c)):(c=S.get(u),c===void 0&&(c=new Set,S.set(u,c))),!c.has(l)){c.add(l);var E=C9.bind(null,a,u,l);u.then(E,E)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(h!==null);c=Error((Lc(l.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.

Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}zr!==5&&(zr=2),c=Zx(c,l),h=s;do{switch(h.tag){case 3:a=c,h.flags|=4096,t&=-t,h.lanes|=t;var R=xA(h,a,t);xE(h,R);break e;case 1:a=c;var A=h.type,_=h.stateNode;if((h.flags&64)===0&&(typeof A.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Za===null||!Za.has(_)))){h.flags|=4096,t&=-t,h.lanes|=t;var N=wA(h,a,t);xE(h,N);break e}}h=h.return}while(h!==null)}IA(n)}catch(k){t=k,Rr===n&&n!==null&&(Rr=n=n.return);continue}break}while(1)}function kA(){var e=$m.current;return $m.current=Nm,e===null?Nm:e}function kd(e,t){var n=Ot;Ot|=16;var r=kA();mo===e&&eo===t||Hc(e,t);do try{v9();break}catch(o){RA(e,o)}while(1);if(Wx(),Ot=n,$m.current=r,Rr!==null)throw Error(Me(261));return mo=null,eo=0,zr}function v9(){for(;Rr!==null;)_A(Rr)}function y9(){for(;Rr!==null&&!Z6();)_A(Rr)}function _A(e){var t=NA(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,t===null?IA(e):Rr=t,ew.current=null}function IA(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&2048)===0){if(n=l9(n,t,Ol),n!==null){Rr=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||(Ol&1073741824)!==0||(n.mode&4)===0){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&(e.flags&2048)===0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(n=c9(t),n!==null){n.flags&=2047,Rr=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(t=t.sibling,t!==null){Rr=t;return}Rr=t=e}while(t!==null);zr===0&&(zr=5)}function rl(e){var t=Zc();return Pl(99,b9.bind(null,e,t)),null}function b9(e,t){do Ds();while(Gd!==null);if((Ot&48)!==0)throw Error(Me(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Me(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,a=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<a;){var c=31-_s(a),u=1<<c;o[c]=0,s[c]=-1,l[c]=-1,a&=~u}if(Li!==null&&(r&24)===0&&Li.has(e)&&Li.delete(e),e===mo&&(Rr=mo=null,eo=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=Ot,Ot|=32,ew.current=null,u0=Xh,s=iE(),O1(s)){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&u.rangeCount!==0){l=u.anchorNode,a=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var d=0,p=-1,h=-1,m=0,b=0,y=s,g=null;t:for(;;){for(var x;y!==l||a!==0&&y.nodeType!==3||(p=d+a),y!==c||u!==0&&y.nodeType!==3||(h=d+u),y.nodeType===3&&(d+=y.nodeValue.length),(x=y.firstChild)!==null;)g=y,y=x;for(;;){if(y===s)break t;if(g===l&&++m===a&&(p=d),g===c&&++b===u&&(h=d),(x=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=x}l=p===-1||h===-1?null:{start:p,end:h}}else l=null;l=l||{start:0,end:0}}else l=null;d0={focusedElem:s,selectionRange:l},Xh=!1,Yd=null,rm=!1,ot=r;do try{x9()}catch(k){if(ot===null)throw Error(Me(330));Cs(ot,k),ot=ot.nextEffect}while(ot!==null);Yd=null,ot=r;do try{for(s=e;ot!==null;){var v=ot.flags;if(v&16&&dp(ot.stateNode,""),v&128){var S=ot.alternate;if(S!==null){var E=S.ref;E!==null&&(typeof E=="function"?E(null):E.current=null)}}switch(v&1038){case 2:VE(ot),ot.flags&=-3;break;case 6:VE(ot),ot.flags&=-3,y0(ot.alternate,ot);break;case 1024:ot.flags&=-1025;break;case 1028:ot.flags&=-1025,y0(ot.alternate,ot);break;case 4:y0(ot.alternate,ot);break;case 8:l=ot,SA(s,l);var R=l.alternate;WE(l),R!==null&&WE(R)}ot=ot.nextEffect}}catch(k){if(ot===null)throw Error(Me(330));Cs(ot,k),ot=ot.nextEffect}while(ot!==null);if(E=d0,S=iE(),v=E.focusedElem,s=E.selectionRange,S!==v&&v&&v.ownerDocument&&zI(v.ownerDocument.documentElement,v)){for(s!==null&&O1(v)&&(S=s.start,E=s.end,E===void 0&&(E=S),"selectionStart"in v?(v.selectionStart=S,v.selectionEnd=Math.min(E,v.value.length)):(E=(S=v.ownerDocument||document)&&S.defaultView||window,E.getSelection&&(E=E.getSelection(),l=v.textContent.length,R=Math.min(s.start,l),s=s.end===void 0?R:Math.min(s.end,l),!E.extend&&R>s&&(l=s,s=R,R=l),l=aE(v,R),a=aE(v,s),l&&a&&(E.rangeCount!==1||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==a.node||E.focusOffset!==a.offset)&&(S=S.createRange(),S.setStart(l.node,l.offset),E.removeAllRanges(),R>s?(E.addRange(S),E.extend(a.node,a.offset)):(S.setEnd(a.node,a.offset),E.addRange(S)))))),S=[],E=v;E=E.parentNode;)E.nodeType===1&&S.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<S.length;v++)E=S[v],E.element.scrollLeft=E.left,E.element.scrollTop=E.top}Xh=!!u0,d0=u0=null,e.current=n,ot=r;do try{for(v=e;ot!==null;){var A=ot.flags;if(A&36&&f9(v,ot.alternate,ot),A&128){S=void 0;var _=ot.ref;if(_!==null){var N=ot.stateNode;switch(ot.tag){case 5:S=N;break;default:S=N}typeof _=="function"?_(S):_.current=S}}ot=ot.nextEffect}}catch(k){if(ot===null)throw Error(Me(330));Cs(ot,k),ot=ot.nextEffect}while(ot!==null);ot=null,t9(),Ot=o}else e.current=n;if(As)As=!1,Gd=e,Rd=t;else for(ot=r;ot!==null;)t=ot.nextEffect,ot.nextEffect=null,ot.flags&8&&(A=ot,A.sibling=null,A.stateNode=null),ot=t;if(r=e.pendingLanes,r===0&&(Za=null),r===1?e===rb?qd++:(qd=0,rb=e):qd=0,n=n.stateNode,Tl&&typeof Tl.onCommitFiberRoot=="function")try{Tl.onCommitFiberRoot(jx,n,void 0,(n.current.flags&64)===64)}catch{}if(pa(e,Zr()),Pm)throw Pm=!1,e=eb,eb=null,e;return(Ot&8)!==0||hi(),null}function x9(){for(;ot!==null;){var e=ot.alternate;rm||Yd===null||((ot.flags&8)!==0?V2(ot,Yd)&&(rm=!0):ot.tag===13&&h9(e,ot)&&V2(ot,Yd)&&(rm=!0));var t=ot.flags;(t&256)!==0&&p9(e,ot),(t&512)===0||As||(As=!0,bp(97,function(){return Ds(),null})),ot=ot.nextEffect}}function Ds(){if(Rd!==90){var e=97<Rd?97:Rd;return Rd=90,Pl(e,S9)}return!1}function w9(e,t){tb.push(t,e),As||(As=!0,bp(97,function(){return Ds(),null}))}function AA(e,t){nb.push(t,e),As||(As=!0,bp(97,function(){return Ds(),null}))}function S9(){if(Gd===null)return!1;var e=Gd;if(Gd=null,(Ot&48)!==0)throw Error(Me(331));var t=Ot;Ot|=32;var n=nb;nb=[];for(var r=0;r<n.length;r+=2){var o=n[r],a=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(c){if(a===null)throw Error(Me(330));Cs(a,c)}}for(n=tb,tb=[],r=0;r<n.length;r+=2){o=n[r],a=n[r+1];try{var l=o.create;o.destroy=l()}catch(c){if(a===null)throw Error(Me(330));Cs(a,c)}}for(l=e.current.firstEffect;l!==null;)e=l.nextEffect,l.nextEffect=null,l.flags&8&&(l.sibling=null,l.stateNode=null),l=e;return Ot=t,hi(),!0}function qE(e,t,n){t=Zx(n,t),t=xA(e,t,1),xs(e,t),t=Wo(),e=Tg(e,1),e!==null&&(vg(e,1,t),pa(e,t))}function Cs(e,t){if(e.tag===3)qE(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){qE(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Za===null||!Za.has(r))){e=Zx(t,e);var o=wA(n,e,1);if(xs(n,o),o=Wo(),n=Tg(n,1),n!==null)vg(n,1,o),pa(n,o);else if(typeof r.componentDidCatch=="function"&&(Za===null||!Za.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function C9(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Wo(),e.pingedLanes|=e.suspendedLanes&n,mo===e&&(eo&n)===n&&(zr===4||zr===3&&(eo&62914560)===eo&&500>Zr()-nw?Hc(e,0):tw|=n),pa(e,t)}function E9(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,(t&2)===0?t=1:(t&4)===0?t=Zc()===99?1:2:(Pi===0&&(Pi=yu),t=Tc(62914560&~Pi),t===0&&(t=4194304))),n=Wo(),e=Tg(e,t),e!==null&&(vg(e,t,n),pa(e,n))}var NA;NA=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Io.current)Pa=!0;else if((n&r)!==0)Pa=(e.flags&16384)!==0;else{switch(Pa=!1,t.tag){case 3:PE(t),m0();break;case 5:EE(t);break;case 1:Ao(t.type)&&Zh(t);break;case 4:U1(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;dr(wm,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return(n&t.child.childLanes)!==0?OE(e,t,n):(dr(ur,ur.current&1),t=Di(e,t,n),t!==null?t.sibling:null);dr(ur,ur.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&64)!==0){if(r)return FE(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),dr(ur,ur.current),r)break;return null;case 23:case 24:return t.lanes=0,g0(e,t,n)}return Di(e,t,n)}else Pa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Qc(t,to.current),jc(t,n),o=Kx(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)){var a=!0;Zh(t)}else a=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Vx(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Em(t,r,s,e),o.updater=Cg,t.stateNode=o,o._reactInternals=t,j1(t,r,e,n),t=G1(null,t,r,!0,a,n)}else t.tag=0,Ro(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=o._init,o=a(o._payload),t.type=o,a=t.tag=R9(o),e=Aa(o,e),a){case 0:t=V1(null,t,o,e,n);break e;case 1:t=$E(null,t,o,e,n);break e;case 11:t=AE(null,t,o,e,n);break e;case 14:t=NE(null,t,o,Aa(o.type,e),r,n);break e}throw Error(Me(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Aa(r,o),V1(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Aa(r,o),$E(e,t,r,o,n);case 3:if(PE(t),r=t.updateQueue,e===null||r===null)throw Error(Me(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,nA(e,t),xp(t,r,null,n),r=t.memoizedState.element,r===o)m0(),t=Di(e,t,n);else{if(o=t.stateNode,(a=o.hydrate)&&(ds=zc(t.stateNode.containerInfo.firstChild),Oi=t,a=oi=!0),a){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)a=e[o],a._workInProgressVersionPrimary=e[o+1],Uc.push(a);for(n=iA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Ro(e,t,r,n),m0();t=t.child}return t;case 5:return EE(t),e===null&&W1(t),r=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,s=o.children,M1(r,o)?s=null:a!==null&&M1(r,a)&&(t.flags|=16),gA(e,t),Ro(e,t,s,n),t.child;case 6:return e===null&&W1(t),null;case 13:return OE(e,t,n);case 4:return U1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tm(t,null,r,n):Ro(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Aa(r,o),AE(e,t,r,o,n);case 7:return Ro(e,t,t.pendingProps,n),t.child;case 8:return Ro(e,t,t.pendingProps.children,n),t.child;case 12:return Ro(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value;var l=t.type._context;if(dr(wm,l._currentValue),l._currentValue=a,s!==null)if(l=s.value,a=ra(l,a)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(l,a):1073741823)|0,a===0){if(s.children===o.children&&!Io.current){t=Di(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var c=l.dependencies;if(c!==null){s=l.child;for(var u=c.firstContext;u!==null;){if(u.context===r&&(u.observedBits&a)!==0){l.tag===1&&(u=bs(-1,n&-n),u.tag=2,xs(l,u)),l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),tA(l.return,n),c.lanes|=n;break}u=u.next}}else s=l.tag===10&&l.type===t.type?null:l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Ro(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,a=t.pendingProps,r=a.children,jc(t,n),o=da(o,a.unstable_observedBits),r=r(o),t.flags|=1,Ro(e,t,r,n),t.child;case 14:return o=t.type,a=Aa(o,t.pendingProps),a=Aa(o.type,a),NE(e,t,o,a,r,n);case 15:return mA(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Aa(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ao(r)?(e=!0,Zh(t)):e=!1,jc(t,n),oA(t,r,o),j1(t,r,o,n),G1(null,t,r,!0,e,n);case 19:return FE(e,t,n);case 23:return g0(e,t,n);case 24:return g0(e,t,n)}throw Error(Me(156,t.tag))};function T9(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(e,t,n,r){return new T9(e,t,n,r)}function ow(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R9(e){if(typeof e=="function")return ow(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hg)return 11;if(e===mg)return 14}return 2}function Ns(e,t){var n=e.alternate;return n===null?(n=oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function om(e,t,n,r,o,a){var s=2;if(r=e,typeof e=="function")ow(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ls:return Vc(n.children,o,a,t);case sI:s=8,o|=16;break;case xx:s=8,o|=1;break;case Md:return e=oa(12,n,t,o|8),e.elementType=Md,e.type=Md,e.lanes=a,e;case Bd:return e=oa(13,n,t,o),e.type=Bd,e.elementType=Bd,e.lanes=a,e;case pm:return e=oa(19,n,t,o),e.elementType=pm,e.lanes=a,e;case Rx:return aw(n,o,a,t);case b1:return e=oa(24,n,t,o),e.elementType=b1,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wx:s=10;break e;case Sx:s=9;break e;case hg:s=11;break e;case mg:s=14;break e;case Cx:s=16,r=null;break e;case Ex:s=22;break e}throw Error(Me(130,e==null?e:typeof e,""))}return t=oa(s,n,t,o),t.elementType=e,t.type=r,t.lanes=a,t}function Vc(e,t,n,r){return e=oa(7,e,r,t),e.lanes=n,e}function aw(e,t,n,r){return e=oa(23,e,r,t),e.elementType=Rx,e.lanes=n,e}function b0(e,t,n){return e=oa(6,e,null,t),e.lanes=n,e}function x0(e,t,n){return t=oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function k9(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=r0(0),this.expirationTimes=r0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=r0(0),this.mutableSourceEagerHydrationData=null}function _9(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Om(e,t,n,r){var o=t.current,a=Wo(),s=ws(o);e:if(n){n=n._reactInternals;t:{if(ql(n)!==n||n.tag!==1)throw Error(Me(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(Ao(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(l!==null);throw Error(Me(171))}if(n.tag===1){var c=n.type;if(Ao(c)){n=YI(n,c,l);break e}}n=l}else n=Is;return t.context===null?t.context=n:t.pendingContext=n,t=bs(a,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),xs(o,t),Ss(o,s,a),s}function w0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function YE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function iw(e,t){YE(e,t),(e=e.alternate)&&YE(e,t)}function I9(){return null}function sw(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new k9(e,t,n!=null&&n.hydrate===!0),t=oa(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Vx(t),e[vu]=n.current,WI(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}sw.prototype.render=function(e){Om(e,this._internalRoot,null,null)};sw.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Om(null,e,null,function(){t[vu]=null})};function nf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function A9(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new sw(e,0,t?{hydrate:!0}:void 0)}function Rg(e,t,n,r,o){var a=n._reactRootContainer;if(a){var s=a._internalRoot;if(typeof o=="function"){var l=o;o=function(){var u=w0(s);l.call(u)}}Om(t,s,e,o)}else{if(a=n._reactRootContainer=A9(n,r),s=a._internalRoot,typeof o=="function"){var c=o;o=function(){var u=w0(s);c.call(u)}}TA(function(){Om(t,s,e,o)})}return w0(s)}SI=function(e){if(e.tag===13){var t=Wo();Ss(e,4,t),iw(e,4)}};Nx=function(e){if(e.tag===13){var t=Wo();Ss(e,67108864,t),iw(e,67108864)}};CI=function(e){if(e.tag===13){var t=Wo(),n=ws(e);Ss(e,n,t),iw(e,n)}};EI=function(e,t){return t()};I1=function(e,t,n){switch(t){case"input":if(w1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=wg(r);if(!o)throw Error(Me(90));cI(r),w1(r,o)}}}break;case"textarea":dI(e,n);break;case"select":t=n.value,t!=null&&Mc(e,!!n.multiple,t,!1)}};_x=EA;yI=function(e,t,n,r,o){var a=Ot;Ot|=4;try{return Pl(98,e.bind(null,t,n,r,o))}finally{Ot=a,Ot===0&&(xu(),hi())}};Ix=function(){(Ot&49)===0&&(g9(),Ds())};bI=function(e,t){var n=Ot;Ot|=2;try{return e(t)}finally{Ot=n,Ot===0&&(xu(),hi())}};function $A(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nf(t))throw Error(Me(200));return _9(e,t,null,n)}var N9={Events:[Zp,Nc,wg,gI,vI,Ds,{current:!1}]},rd={findFiberByHostInstance:hl,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},$9={bundleType:rd.bundleType,version:rd.version,rendererPackageName:rd.rendererPackageName,rendererConfig:rd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Gl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wI(e),e===null?null:e.stateNode},findFiberByHostInstance:rd.findFiberByHostInstance||I9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var dh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dh.isDisabled&&dh.supportsFiber)try{jx=dh.inject($9),Tl=dh}catch{}}va.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N9;va.createPortal=$A;va.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Me(188)):Error(Me(268,Object.keys(e)));return e=wI(t),e=e===null?null:e.stateNode,e};va.flushSync=function(e,t){var n=Ot;if((n&48)!==0)return e(t);Ot|=1;try{if(e)return Pl(99,e.bind(null,t))}finally{Ot=n,hi()}};va.hydrate=function(e,t,n){if(!nf(t))throw Error(Me(200));return Rg(null,e,t,!0,n)};va.render=function(e,t,n){if(!nf(t))throw Error(Me(200));return Rg(null,e,t,!1,n)};va.unmountComponentAtNode=function(e){if(!nf(e))throw Error(Me(40));return e._reactRootContainer?(TA(function(){Rg(null,null,e,!1,function(){e._reactRootContainer=null,e[vu]=null})}),!0):!1};va.unstable_batchedUpdates=EA;va.unstable_createPortal=function(e,t){return $A(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};va.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nf(n))throw Error(Me(200));if(e==null||e._reactInternals===void 0)throw Error(Me(38));return Rg(e,t,n,!1,r)};va.version="17.0.2";function PA(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(PA)}catch(e){console.error(e)}}PA(),pg.exports=va;var _d=pg.exports;function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}var vl;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(vl||(vl={}));var KE=function(e){return e},XE="beforeunload",P9="popstate";function O9(e){e===void 0&&(e={});var t=e,n=t.window,r=n===void 0?document.defaultView:n,o=r.history;function a(){var _=r.location,N=_.pathname,k=_.search,I=_.hash,O=o.state||{};return[O.idx,KE({pathname:N,search:k,hash:I,state:O.usr||null,key:O.key||"default"})]}var s=null;function l(){if(s)m.call(s),s=null;else{var _=vl.Pop,N=a(),k=N[0],I=N[1];if(m.length){if(k!=null){var O=d-k;O&&(s={action:_,location:I,retry:function(){R(O*-1)}},R(O))}}else v(_)}}r.addEventListener(P9,l);var c=vl.Pop,u=a(),d=u[0],p=u[1],h=QE(),m=QE();d==null&&(d=0,o.replaceState(T({},o.state,{idx:d}),""));function b(_){return typeof _=="string"?_:ab(_)}function y(_,N){return N===void 0&&(N=null),KE(T({pathname:p.pathname,hash:"",search:""},typeof _=="string"?Kl(_):_,{state:N,key:D9()}))}function g(_,N){return[{usr:_.state,key:_.key,idx:N},b(_)]}function x(_,N,k){return!m.length||(m.call({action:_,location:N,retry:k}),!1)}function v(_){c=_;var N=a();d=N[0],p=N[1],h.call({action:c,location:p})}function S(_,N){var k=vl.Push,I=y(_,N);function O(){S(_,N)}if(x(k,I,O)){var L=g(I,d+1),q=L[0],D=L[1];try{o.pushState(q,"",D)}catch{r.location.assign(D)}v(k)}}function E(_,N){var k=vl.Replace,I=y(_,N);function O(){E(_,N)}if(x(k,I,O)){var L=g(I,d),q=L[0],D=L[1];o.replaceState(q,"",D),v(k)}}function R(_){o.go(_)}var A={get action(){return c},get location(){return p},createHref:b,push:S,replace:E,go:R,back:function(){R(-1)},forward:function(){R(1)},listen:function(N){return h.push(N)},block:function(N){var k=m.push(N);return m.length===1&&r.addEventListener(XE,JE),function(){k(),m.length||r.removeEventListener(XE,JE)}}};return A}function JE(e){e.preventDefault(),e.returnValue=""}function QE(){var e=[];return{get length(){return e.length},push:function(n){return e.push(n),function(){e=e.filter(function(r){return r!==n})}},call:function(n){e.forEach(function(r){return r&&r(n)})}}}function D9(){return Math.random().toString(36).substr(2,8)}function ab(e){var t=e.pathname,n=t===void 0?"/":t,r=e.search,o=r===void 0?"":r,a=e.hash,s=a===void 0?"":a;return o&&o!=="?"&&(n+=o.charAt(0)==="?"?o:"?"+o),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Kl(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}/**
 * React Router v6.3.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */const lw=f.exports.createContext(null),cw=f.exports.createContext(null),rf=f.exports.createContext({outlet:null,matches:[]});function La(e,t){if(!e)throw new Error(t)}function L9(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Kl(t):t,o=LA(r.pathname||"/",n);if(o==null)return null;let a=OA(e);M9(a);let s=null;for(let l=0;s==null&&l<a.length;++l)s=G9(a[l],o);return s}function OA(e,t,n,r){return t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=""),e.forEach((o,a)=>{let s={relativePath:o.path||"",caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(s.relativePath.startsWith(r)||La(!1),s.relativePath=s.relativePath.slice(r.length));let l=Es([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(o.index===!0&&La(!1),OA(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:H9(l,o.index),routesMeta:c})}),t}function M9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:V9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const B9=/^:\w+$/,F9=3,z9=2,j9=1,U9=10,W9=-2,ZE=e=>e==="*";function H9(e,t){let n=e.split("/"),r=n.length;return n.some(ZE)&&(r+=W9),t&&(r+=z9),n.filter(o=>!ZE(o)).reduce((o,a)=>o+(B9.test(a)?F9:a===""?j9:U9),r)}function V9(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function G9(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",d=uw({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u);if(!d)return null;Object.assign(r,d.params);let p=l.route;a.push({params:r,pathname:Es([o,d.pathname]),pathnameBase:MA(Es([o,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(o=Es([o,d.pathnameBase]))}return a}function uw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=q9(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,d,p)=>{if(d==="*"){let h=l[p]||"";s=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}return u[d]=Y9(l[p]||""),u},{}),pathname:a,pathnameBase:s,pattern:e}}function q9(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(s,l)=>(r.push(l),"([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(o,t?void 0:"i"),r]}function Y9(e,t){try{return decodeURIComponent(e)}catch{return e}}function K9(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Kl(e):e;return{pathname:n?n.startsWith("/")?n:X9(n,t):t,search:Q9(r),hash:Z9(o)}}function X9(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function DA(e,t,n){let r=typeof e=="string"?Kl(e):e,o=e===""||r.pathname===""?"/":r.pathname,a;if(o==null)a=n;else{let l=t.length-1;if(o.startsWith("..")){let c=o.split("/");for(;c[0]==="..";)c.shift(),l-=1;r.pathname=c.join("/")}a=l>=0?t[l]:"/"}let s=K9(r,a);return o&&o!=="/"&&o.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function J9(e){return e===""||e.pathname===""?"/":typeof e=="string"?Kl(e).pathname:e.pathname}function LA(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&n!=="/"?null:e.slice(t.length)||"/"}const Es=e=>e.join("/").replace(/\/\/+/g,"/"),MA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Z9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function eL(e){wu()||La(!1);let{basename:t,navigator:n}=f.exports.useContext(lw),{hash:r,pathname:o,search:a}=dw(e),s=o;if(t!=="/"){let l=J9(e),c=l!=null&&l.endsWith("/");s=o==="/"?t+(c?"/":""):Es([t,o])}return n.createHref({pathname:s,search:a,hash:r})}function wu(){return f.exports.useContext(cw)!=null}function Gr(){return wu()||La(!1),f.exports.useContext(cw).location}function Ye(){wu()||La(!1);let{basename:e,navigator:t}=f.exports.useContext(lw),{matches:n}=f.exports.useContext(rf),{pathname:r}=Gr(),o=JSON.stringify(n.map(l=>l.pathnameBase)),a=f.exports.useRef(!1);return f.exports.useEffect(()=>{a.current=!0}),f.exports.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){t.go(l);return}let u=DA(l,JSON.parse(o),r);e!=="/"&&(u.pathname=Es([e,u.pathname])),(c.replace?t.replace:t.push)(u,c.state)},[e,t,o,r])}function tL(){let{matches:e}=f.exports.useContext(rf),t=e[e.length-1];return t?t.params:{}}function dw(e){let{matches:t}=f.exports.useContext(rf),{pathname:n}=Gr(),r=JSON.stringify(t.map(o=>o.pathnameBase));return f.exports.useMemo(()=>DA(e,JSON.parse(r),n),[e,r,n])}function nL(e,t){wu()||La(!1);let{matches:n}=f.exports.useContext(rf),r=n[n.length-1],o=r?r.params:{};r&&r.pathname;let a=r?r.pathnameBase:"/";r&&r.route;let s=Gr(),l;if(t){var c;let h=typeof t=="string"?Kl(t):t;a==="/"||((c=h.pathname)==null?void 0:c.startsWith(a))||La(!1),l=h}else l=s;let u=l.pathname||"/",d=a==="/"?u:u.slice(a.length)||"/",p=L9(e,{pathname:d});return rL(p&&p.map(h=>Object.assign({},h,{params:Object.assign({},o,h.params),pathname:Es([a,h.pathname]),pathnameBase:h.pathnameBase==="/"?a:Es([a,h.pathnameBase])})),n)}function rL(e,t){return t===void 0&&(t=[]),e==null?null:e.reduceRight((n,r,o)=>f.exports.createElement(rf.Provider,{children:r.route.element!==void 0?r.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,o+1))}}),null)}function Yi(e){let{to:t,replace:n,state:r}=e;wu()||La(!1);let o=Ye();return f.exports.useEffect(()=>{o(t,{replace:n,state:r})}),null}function Er(e){La(!1)}function oL(e){let{basename:t="/",children:n=null,location:r,navigationType:o=vl.Pop,navigator:a,static:s=!1}=e;wu()&&La(!1);let l=MA(t),c=f.exports.useMemo(()=>({basename:l,navigator:a,static:s}),[l,a,s]);typeof r=="string"&&(r=Kl(r));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:m="default"}=r,b=f.exports.useMemo(()=>{let y=LA(u,l);return y==null?null:{pathname:y,search:d,hash:p,state:h,key:m}},[l,u,d,p,h,m]);return b==null?null:f.exports.createElement(lw.Provider,{value:c},f.exports.createElement(cw.Provider,{children:n,value:{location:b,navigationType:o}}))}function of(e){let{children:t,location:n}=e;return nL(ib(t),n)}function ib(e){let t=[];return f.exports.Children.forEach(e,n=>{if(!f.exports.isValidElement(n))return;if(n.type===f.exports.Fragment){t.push.apply(t,ib(n.props.children));return}n.type!==Er&&La(!1);let r={caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path};n.props.children&&(r.children=ib(n.props.children)),t.push(r)}),t}/**
 * React Router DOM v6.3.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Dm(){return Dm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dm.apply(this,arguments)}function BA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const aL=["onClick","reloadDocument","replace","state","target","to"],iL=["aria-current","caseSensitive","className","end","style","to","children"];function sL(e){let{basename:t,children:n,window:r}=e,o=f.exports.useRef();o.current==null&&(o.current=O9({window:r}));let a=o.current,[s,l]=f.exports.useState({action:a.action,location:a.location});return f.exports.useLayoutEffect(()=>a.listen(l),[a]),f.exports.createElement(oL,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}function lL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Ct=f.exports.forwardRef(function(t,n){let{onClick:r,reloadDocument:o,replace:a=!1,state:s,target:l,to:c}=t,u=BA(t,aL),d=eL(c),p=cL(c,{replace:a,state:s,target:l});function h(m){r&&r(m),!m.defaultPrevented&&!o&&p(m)}return f.exports.createElement("a",Dm({},u,{href:d,onClick:h,ref:n,target:l}))}),el=f.exports.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:l,to:c,children:u}=t,d=BA(t,iL),p=Gr(),h=dw(c),m=p.pathname,b=h.pathname;o||(m=m.toLowerCase(),b=b.toLowerCase());let y=m===b||!s&&m.startsWith(b)&&m.charAt(b.length)==="/",g=y?r:void 0,x;typeof a=="function"?x=a({isActive:y}):x=[a,y?"active":null].filter(Boolean).join(" ");let v=typeof l=="function"?l({isActive:y}):l;return f.exports.createElement(Ct,Dm({},d,{"aria-current":g,className:x,ref:n,style:v,to:c}),typeof u=="function"?u({isActive:y}):u)});function cL(e,t){let{target:n,replace:r,state:o}=t===void 0?{}:t,a=Ye(),s=Gr(),l=dw(e);return f.exports.useCallback(c=>{if(c.button===0&&(!n||n==="_self")&&!lL(c)){c.preventDefault();let u=!!r||ab(s)===ab(l);a(e,{replace:u,state:o})}},[s,a,l,r,o,n,e])}function Ls(e){let t=f.exports.useRef(S0(e)),n=Gr(),r=f.exports.useMemo(()=>{let s=S0(n.search);for(let l of t.current.keys())s.has(l)||t.current.getAll(l).forEach(c=>{s.append(l,c)});return s},[n.search]),o=Ye(),a=f.exports.useCallback((s,l)=>{o("?"+S0(s),l)},[o]);return[r,a]}function S0(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}const uL={black:"#000",white:"#fff"};var Ep=uL;const dL={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var pc=dL;const pL={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var fc=pL;const fL={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var hc=fL;const hL={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var mc=hL;const mL={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};var gc=mL;const gL={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var od=gL;const vL={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var yL=vL;function Re(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function kg(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xL=kg(function(e){return bL.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function wL(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function SL(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var CL=function(){function e(n){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(SL(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=wL(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Kr="-ms-",Lm="-moz-",wn="-webkit-",FA="comm",pw="rule",fw="decl",EL="@import",zA="@keyframes",TL=Math.abs,af=String.fromCharCode,RL=Object.assign;function kL(e,t){return(((t<<2^ko(e,0))<<2^ko(e,1))<<2^ko(e,2))<<2^ko(e,3)}function jA(e){return e.trim()}function _L(e,t){return(e=t.exec(e))?e[0]:e}function Tn(e,t,n){return e.replace(t,n)}function sb(e,t){return e.indexOf(t)}function ko(e,t){return e.charCodeAt(t)|0}function Tp(e,t,n){return e.slice(t,n)}function Va(e){return e.length}function hw(e){return e.length}function ph(e,t){return t.push(e),e}function IL(e,t){return e.map(t).join("")}var _g=1,tu=1,UA=0,no=0,Sr=0,Su="";function Ig(e,t,n,r,o,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:_g,column:tu,length:s,return:""}}function ad(e,t){return RL(Ig("",null,null,"",null,null,0),e,{length:-e.length},t)}function AL(){return Sr}function NL(){return Sr=no>0?ko(Su,--no):0,tu--,Sr===10&&(tu=1,_g--),Sr}function go(){return Sr=no<UA?ko(Su,no++):0,tu++,Sr===10&&(tu=1,_g++),Sr}function Ho(){return ko(Su,no)}function am(){return no}function Cu(e,t){return Tp(Su,e,t)}function Dl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mw(e){return _g=tu=1,UA=Va(Su=e),no=0,[]}function gw(e){return Su="",e}function Kd(e){return jA(Cu(no-1,lb(e===91?e+2:e===40?e+1:e)))}function $L(e){for(;(Sr=Ho())&&Sr<33;)go();return Dl(e)>2||Dl(Sr)>3?"":" "}function PL(e,t){for(;--t&&go()&&!(Sr<48||Sr>102||Sr>57&&Sr<65||Sr>70&&Sr<97););return Cu(e,am()+(t<6&&Ho()==32&&go()==32))}function lb(e){for(;go();)switch(Sr){case e:return no;case 34:case 39:e!==34&&e!==39&&lb(Sr);break;case 40:e===41&&lb(e);break;case 92:go();break}return no}function OL(e,t){for(;go()&&e+Sr!==47+10;)if(e+Sr===42+42&&Ho()===47)break;return"/*"+Cu(t,no-1)+"*"+af(e===47?e:go())}function DL(e){for(;!Dl(Ho());)go();return Cu(e,no)}function WA(e){return gw(im("",null,null,null,[""],e=mw(e),0,[0],e))}function im(e,t,n,r,o,a,s,l,c){for(var u=0,d=0,p=s,h=0,m=0,b=0,y=1,g=1,x=1,v=0,S="",E=o,R=a,A=r,_=S;g;)switch(b=v,v=go()){case 40:if(b!=108&&_.charCodeAt(p-1)==58){sb(_+=Tn(Kd(v),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:_+=Kd(v);break;case 9:case 10:case 13:case 32:_+=$L(b);break;case 92:_+=PL(am()-1,7);continue;case 47:switch(Ho()){case 42:case 47:ph(LL(OL(go(),am()),t,n),c);break;default:_+="/"}break;case 123*y:l[u++]=Va(_)*x;case 125*y:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+d:m>0&&Va(_)-p&&ph(m>32?tT(_+";",r,n,p-1):tT(Tn(_," ","")+";",r,n,p-2),c);break;case 59:_+=";";default:if(ph(A=eT(_,t,n,u,d,o,l,S,E=[],R=[],p),a),v===123)if(d===0)im(_,t,A,A,E,a,p,l,R);else switch(h){case 100:case 109:case 115:im(e,A,A,r&&ph(eT(e,A,A,0,0,o,l,S,o,E=[],p),R),o,R,p,l,r?E:R);break;default:im(_,A,A,A,[""],R,0,l,R)}}u=d=m=0,y=x=1,S=_="",p=s;break;case 58:p=1+Va(_),m=b;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&NL()==125)continue}switch(_+=af(v),v*y){case 38:x=d>0?1:(_+="\f",-1);break;case 44:l[u++]=(Va(_)-1)*x,x=1;break;case 64:Ho()===45&&(_+=Kd(go())),h=Ho(),d=p=Va(S=_+=DL(am())),v++;break;case 45:b===45&&Va(_)==2&&(y=0)}}return a}function eT(e,t,n,r,o,a,s,l,c,u,d){for(var p=o-1,h=o===0?a:[""],m=hw(h),b=0,y=0,g=0;b<r;++b)for(var x=0,v=Tp(e,p+1,p=TL(y=s[b])),S=e;x<m;++x)(S=jA(y>0?h[x]+" "+v:Tn(v,/&\f/g,h[x])))&&(c[g++]=S);return Ig(e,t,n,o===0?pw:l,c,u,d)}function LL(e,t,n){return Ig(e,t,n,FA,af(AL()),Tp(e,2,-2),0)}function tT(e,t,n,r){return Ig(e,t,n,fw,Tp(e,0,r),Tp(e,r+1,-1),r)}function HA(e,t){switch(kL(e,t)){case 5103:return wn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return wn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return wn+e+Lm+e+Kr+e+e;case 6828:case 4268:return wn+e+Kr+e+e;case 6165:return wn+e+Kr+"flex-"+e+e;case 5187:return wn+e+Tn(e,/(\w+).+(:[^]+)/,wn+"box-$1$2"+Kr+"flex-$1$2")+e;case 5443:return wn+e+Kr+"flex-item-"+Tn(e,/flex-|-self/,"")+e;case 4675:return wn+e+Kr+"flex-line-pack"+Tn(e,/align-content|flex-|-self/,"")+e;case 5548:return wn+e+Kr+Tn(e,"shrink","negative")+e;case 5292:return wn+e+Kr+Tn(e,"basis","preferred-size")+e;case 6060:return wn+"box-"+Tn(e,"-grow","")+wn+e+Kr+Tn(e,"grow","positive")+e;case 4554:return wn+Tn(e,/([^-])(transform)/g,"$1"+wn+"$2")+e;case 6187:return Tn(Tn(Tn(e,/(zoom-|grab)/,wn+"$1"),/(image-set)/,wn+"$1"),e,"")+e;case 5495:case 3959:return Tn(e,/(image-set\([^]*)/,wn+"$1$`$1");case 4968:return Tn(Tn(e,/(.+:)(flex-)?(.*)/,wn+"box-pack:$3"+Kr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+wn+e+e;case 4095:case 3583:case 4068:case 2532:return Tn(e,/(.+)-inline(.+)/,wn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Va(e)-1-t>6)switch(ko(e,t+1)){case 109:if(ko(e,t+4)!==45)break;case 102:return Tn(e,/(.+:)(.+)-([^]+)/,"$1"+wn+"$2-$3$1"+Lm+(ko(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~sb(e,"stretch")?HA(Tn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ko(e,t+1)!==115)break;case 6444:switch(ko(e,Va(e)-3-(~sb(e,"!important")&&10))){case 107:return Tn(e,":",":"+wn)+e;case 101:return Tn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+wn+(ko(e,14)===45?"inline-":"")+"box$3$1"+wn+"$2$3$1"+Kr+"$2box$3")+e}break;case 5936:switch(ko(e,t+11)){case 114:return wn+e+Kr+Tn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return wn+e+Kr+Tn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return wn+e+Kr+Tn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return wn+e+Kr+e+e}return e}function Rl(e,t){for(var n="",r=hw(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function VA(e,t,n,r){switch(e.type){case EL:case fw:return e.return=e.return||e.value;case FA:return"";case zA:return e.return=e.value+"{"+Rl(e.children,r)+"}";case pw:e.value=e.props.join(",")}return Va(n=Rl(e.children,r))?e.return=e.value+"{"+n+"}":""}function GA(e){var t=hw(e);return function(n,r,o,a){for(var s="",l=0;l<t;l++)s+=e[l](n,r,o,a)||"";return s}}function qA(e){return function(t){t.root||(t=t.return)&&e(t)}}function YA(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case fw:e.return=HA(e.value,e.length);break;case zA:return Rl([ad(e,{value:Tn(e.value,"@","@"+wn)})],r);case pw:if(e.length)return IL(e.props,function(o){switch(_L(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rl([ad(e,{props:[Tn(o,/:(read-\w+)/,":"+Lm+"$1")]})],r);case"::placeholder":return Rl([ad(e,{props:[Tn(o,/:(plac\w+)/,":"+wn+"input-$1")]}),ad(e,{props:[Tn(o,/:(plac\w+)/,":"+Lm+"$1")]}),ad(e,{props:[Tn(o,/:(plac\w+)/,Kr+"input-$1")]})],r)}return""})}}var nT=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var o=t(r);return n.set(r,o),o}},ML=function(t,n,r){for(var o=0,a=0;o=a,a=Ho(),o===38&&a===12&&(n[r]=1),!Dl(a);)go();return Cu(t,no)},BL=function(t,n){var r=-1,o=44;do switch(Dl(o)){case 0:o===38&&Ho()===12&&(n[r]=1),t[r]+=ML(no-1,n,r);break;case 2:t[r]+=Kd(o);break;case 4:if(o===44){t[++r]=Ho()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=af(o)}while(o=go());return t},FL=function(t,n){return gw(BL(mw(t),n))},rT=new WeakMap,zL=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!rT.get(r))&&!o){rT.set(t,!0);for(var a=[],s=FL(n,a),l=r.props,c=0,u=0;c<s.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=a[c]?s[c].replace(/&\f/g,l[d]):l[d]+" "+s[c]}}},jL=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}},UL=[YA],vw=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||UL,a={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),x=1;x<g.length;x++)a[g[x]]=!0;l.push(y)});var c,u=[zL,jL];{var d,p=[VA,qA(function(y){d.insert(y)})],h=GA(u.concat(o,p)),m=function(g){return Rl(WA(g),h)};c=function(g,x,v,S){d=v,m(g?g+"{"+x.styles+"}":x.styles),S&&(b.inserted[x.name]=!0)}}var b={key:n,sheet:new CL({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:c};return b.sheet.hydrate(l),b},KA={exports:{}},Pn={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Lr=typeof Symbol=="function"&&Symbol.for,yw=Lr?Symbol.for("react.element"):60103,bw=Lr?Symbol.for("react.portal"):60106,Ag=Lr?Symbol.for("react.fragment"):60107,Ng=Lr?Symbol.for("react.strict_mode"):60108,$g=Lr?Symbol.for("react.profiler"):60114,Pg=Lr?Symbol.for("react.provider"):60109,Og=Lr?Symbol.for("react.context"):60110,xw=Lr?Symbol.for("react.async_mode"):60111,Dg=Lr?Symbol.for("react.concurrent_mode"):60111,Lg=Lr?Symbol.for("react.forward_ref"):60112,Mg=Lr?Symbol.for("react.suspense"):60113,WL=Lr?Symbol.for("react.suspense_list"):60120,Bg=Lr?Symbol.for("react.memo"):60115,Fg=Lr?Symbol.for("react.lazy"):60116,HL=Lr?Symbol.for("react.block"):60121,VL=Lr?Symbol.for("react.fundamental"):60117,GL=Lr?Symbol.for("react.responder"):60118,qL=Lr?Symbol.for("react.scope"):60119;function Jo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case yw:switch(e=e.type,e){case xw:case Dg:case Ag:case $g:case Ng:case Mg:return e;default:switch(e=e&&e.$$typeof,e){case Og:case Lg:case Fg:case Bg:case Pg:return e;default:return t}}case bw:return t}}}function XA(e){return Jo(e)===Dg}Pn.AsyncMode=xw;Pn.ConcurrentMode=Dg;Pn.ContextConsumer=Og;Pn.ContextProvider=Pg;Pn.Element=yw;Pn.ForwardRef=Lg;Pn.Fragment=Ag;Pn.Lazy=Fg;Pn.Memo=Bg;Pn.Portal=bw;Pn.Profiler=$g;Pn.StrictMode=Ng;Pn.Suspense=Mg;Pn.isAsyncMode=function(e){return XA(e)||Jo(e)===xw};Pn.isConcurrentMode=XA;Pn.isContextConsumer=function(e){return Jo(e)===Og};Pn.isContextProvider=function(e){return Jo(e)===Pg};Pn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===yw};Pn.isForwardRef=function(e){return Jo(e)===Lg};Pn.isFragment=function(e){return Jo(e)===Ag};Pn.isLazy=function(e){return Jo(e)===Fg};Pn.isMemo=function(e){return Jo(e)===Bg};Pn.isPortal=function(e){return Jo(e)===bw};Pn.isProfiler=function(e){return Jo(e)===$g};Pn.isStrictMode=function(e){return Jo(e)===Ng};Pn.isSuspense=function(e){return Jo(e)===Mg};Pn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ag||e===Dg||e===$g||e===Ng||e===Mg||e===WL||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Bg||e.$$typeof===Pg||e.$$typeof===Og||e.$$typeof===Lg||e.$$typeof===VL||e.$$typeof===GL||e.$$typeof===qL||e.$$typeof===HL)};Pn.typeOf=Jo;KA.exports=Pn;var ww=KA.exports,YL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},XL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},JA={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Sw={};Sw[ww.ForwardRef]=XL;Sw[ww.Memo]=JA;function oT(e){return ww.isMemo(e)?JA:Sw[e.$$typeof]||YL}var JL=Object.defineProperty,QL=Object.getOwnPropertyNames,aT=Object.getOwnPropertySymbols,ZL=Object.getOwnPropertyDescriptor,eM=Object.getPrototypeOf,iT=Object.prototype;function QA(e,t,n){if(typeof t!="string"){if(iT){var r=eM(t);r&&r!==iT&&QA(e,r,n)}var o=QL(t);aT&&(o=o.concat(aT(t)));for(var a=oT(e),s=oT(t),l=0;l<o.length;++l){var c=o[l];if(!KL[c]&&!(n&&n[c])&&!(s&&s[c])&&!(a&&a[c])){var u=ZL(t,c);try{JL(e,c,u)}catch{}}}}return e}var tM=QA,nM=function(e,t){return tM(e,t)},rM=nM,oM=!0;function zg(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var sf=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||oM===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},lf=function(t,n,r){sf(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},aM=Object.freeze(Object.defineProperty({__proto__:null,getRegisteredStyles:zg,insertStyles:lf,registerStyles:sf},Symbol.toStringTag,{value:"Module"}));function Cw(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ew={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},iM=/[A-Z]|^ms/g,sM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ZA=function(t){return t.charCodeAt(1)===45},sT=function(t){return t!=null&&typeof t!="boolean"},C0=kg(function(e){return ZA(e)?e:e.replace(iM,"-$&").toLowerCase()}),lT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(sM,function(r,o,a){return Ga={name:o,styles:a,next:Ga},o})}return Ew[t]!==1&&!ZA(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ga={name:n.name,styles:n.styles,next:Ga},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ga={name:r.name,styles:r.styles,next:Ga},r=r.next;var o=n.styles+";";return o}return lM(e,t,n)}case"function":{if(e!==void 0){var a=Ga,s=n(e);return Ga=a,Rp(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function lM(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Rp(e,t,n[o])+";";else for(var a in n){var s=n[a];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":sT(s)&&(r+=C0(a)+":"+lT(a,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)sT(s[l])&&(r+=C0(a)+":"+lT(a,s[l])+";");else{var c=Rp(e,t,s);switch(a){case"animation":case"animationName":{r+=C0(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}return r}var cT=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ga,jg=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";Ga=void 0;var s=t[0];s==null||s.raw===void 0?(o=!1,a+=Rp(r,n,s)):a+=s[0];for(var l=1;l<t.length;l++)a+=Rp(r,n,t[l]),o&&(a+=s[l]);cT.lastIndex=0;for(var c="",u;(u=cT.exec(a))!==null;)c+="-"+u[1];var d=Cw(a)+c;return{name:d,styles:a,next:Ga}},Tw={}.hasOwnProperty,Rw=f.exports.createContext(typeof HTMLElement!="undefined"?vw({key:"css"}):null),kw=Rw.Provider,cM=function(){return f.exports.useContext(Rw)},cf=function(t){return f.exports.forwardRef(function(n,r){var o=f.exports.useContext(Rw);return t(n,o,r)})},ui=f.exports.createContext({}),uM=function(){return f.exports.useContext(ui)},dM=function(t,n){if(typeof n=="function"){var r=n(t);return r}return T({},t,n)},pM=nT(function(e){return nT(function(t){return dM(e,t)})}),fM=function(t){var n=f.exports.useContext(ui);return t.theme!==n&&(n=pM(n)(t.theme)),f.exports.createElement(ui.Provider,{value:n},t.children)};function hM(e){var t=e.displayName||e.name||"Component",n=function(a,s){var l=f.exports.useContext(ui);return f.exports.createElement(e,T({theme:l,ref:s},a))},r=f.exports.forwardRef(n);return r.displayName="WithTheme("+t+")",rM(r,e)}var mM=Rs["useInsertionEffect"]?Rs["useInsertionEffect"]:function(t){t()};function eN(e){mM(e)}var cb="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gM=function(t,n){var r={};for(var o in n)Tw.call(n,o)&&(r[o]=n[o]);return r[cb]=t,r},vM=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return sf(n,r,o),eN(function(){return lf(n,r,o)}),null},yM=cf(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[cb],a=[r],s="";typeof e.className=="string"?s=zg(t.registered,a,e.className):e.className!=null&&(s=e.className+" ");var l=jg(a,void 0,f.exports.useContext(ui));s+=t.key+"-"+l.name;var c={};for(var u in e)Tw.call(e,u)&&u!=="css"&&u!==cb&&(c[u]=e[u]);return c.ref=n,c.className=s,f.exports.createElement(f.exports.Fragment,null,f.exports.createElement(vM,{cache:t,serialized:l,isStringTag:typeof o=="string"}),f.exports.createElement(o,c))}),uT=function(t,n){var r=arguments;if(n==null||!Tw.call(n,"css"))return f.exports.createElement.apply(void 0,r);var o=r.length,a=new Array(o);a[0]=yM,a[1]=gM(t,n);for(var s=2;s<o;s++)a[s]=r[s];return f.exports.createElement.apply(null,a)},dT=Rs["useInsertionEffect"]?Rs["useInsertionEffect"]:f.exports.useLayoutEffect,tN=cf(function(e,t){var n=e.styles,r=jg([n],void 0,f.exports.useContext(ui)),o=f.exports.useRef();return dT(function(){var a=t.key+"-global",s=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+a+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",a),s.hydrate([c])),o.current=[s,l],function(){s.flush()}},[t]),dT(function(){var a=o.current,s=a[0],l=a[1];if(l){a[1]=!1;return}if(r.next!==void 0&&lf(t,r.next,!0),s.tags.length){var c=s.tags[s.tags.length-1].nextElementSibling;s.before=c,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function Ms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return jg(t)}var mi=function(){var t=Ms.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},bM=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var a=t[r];if(a!=null){var s=void 0;switch(typeof a){case"boolean":break;case"object":{if(Array.isArray(a))s=e(a);else{s="";for(var l in a)a[l]&&l&&(s&&(s+=" "),s+=l)}break}default:s=a}s&&(o&&(o+=" "),o+=s)}}return o};function xM(e,t,n){var r=[],o=zg(e,r,n);return r.length<2?n:o+t(r)}var wM=function(t){var n=t.cache,r=t.serializedArr;return eN(function(){for(var o=0;o<r.length;o++)lf(n,r[o],!1)}),null},SM=cf(function(e,t){var n=!1,r=[],o=function(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var h=jg(d,t.registered);return r.push(h),sf(t,h,!1),t.key+"-"+h.name},a=function(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];return xM(t.registered,o,bM(d))},s={css:o,cx:a,theme:f.exports.useContext(ui)},l=e.children(s);return n=!0,f.exports.createElement(f.exports.Fragment,null,f.exports.createElement(wM,{cache:t,serializedArr:r}),l)}),CM=Object.freeze(Object.defineProperty({__proto__:null,ClassNames:SM,Global:tN,createElement:uT,css:Ms,jsx:uT,keyframes:mi,CacheProvider:kw,ThemeContext:ui,ThemeProvider:fM,__unsafe_useEmotionCache:cM,useTheme:uM,withEmotionCache:cf,withTheme:hM},Symbol.toStringTag,{value:"Module"})),EM=/[A-Z]|^ms/g,TM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nN=function(t){return t.charCodeAt(1)===45},pT=function(t){return t!=null&&typeof t!="boolean"},E0=kg(function(e){return nN(e)?e:e.replace(EM,"-$&").toLowerCase()}),fT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(TM,function(r,o,a){return qa={name:o,styles:a,next:qa},o})}return Ew[t]!==1&&!nN(t)&&typeof n=="number"&&n!==0?n+"px":n};function kp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return qa={name:n.name,styles:n.styles,next:qa},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)qa={name:r.name,styles:r.styles,next:qa},r=r.next;var o=n.styles+";";return o}return RM(e,t,n)}case"function":{if(e!==void 0){var a=qa,s=n(e);return qa=a,kp(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function RM(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=kp(e,t,n[o])+";";else for(var a in n){var s=n[a];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":pT(s)&&(r+=E0(a)+":"+fT(a,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)pT(s[l])&&(r+=E0(a)+":"+fT(a,s[l])+";");else{var c=kp(e,t,s);switch(a){case"animation":case"animationName":{r+=E0(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}return r}var hT=/label:\s*([^\s;\n{]+)\s*(;|$)/g,qa,kM=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";qa=void 0;var s=t[0];s==null||s.raw===void 0?(o=!1,a+=kp(r,n,s)):a+=s[0];for(var l=1;l<t.length;l++)a+=kp(r,n,t[l]),o&&(a+=s[l]);hT.lastIndex=0;for(var c="",u;(u=hT.exec(a))!==null;)c+="-"+u[1];var d=Cw(a)+c;return{name:d,styles:a,next:qa}},_M=xL,IM=function(t){return t!=="theme"},mT=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?_M:IM},gT=function(t,n,r){var o;if(n){var a=n.shouldForwardProp;o=t.__emotion_forwardProp&&a?function(s){return t.__emotion_forwardProp(s)&&a(s)}:a}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},AM=Rs["useInsertionEffect"]?Rs["useInsertionEffect"]:function(t){t()};function NM(e){AM(e)}var $M=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return sf(n,r,o),NM(function(){return lf(n,r,o)}),null},PM=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,a,s;n!==void 0&&(a=n.label,s=n.target);var l=gT(t,n,r),c=l||mT(o),u=!c("as");return function(){var d=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&p.push("label:"+a+";"),d[0]==null||d[0].raw===void 0)p.push.apply(p,d);else{p.push(d[0][0]);for(var h=d.length,m=1;m<h;m++)p.push(d[m],d[0][m])}var b=cf(function(y,g,x){var v=u&&y.as||o,S="",E=[],R=y;if(y.theme==null){R={};for(var A in y)R[A]=y[A];R.theme=f.exports.useContext(ui)}typeof y.className=="string"?S=zg(g.registered,E,y.className):y.className!=null&&(S=y.className+" ");var _=kM(p.concat(E),g.registered,R);S+=g.key+"-"+_.name,s!==void 0&&(S+=" "+s);var N=u&&l===void 0?mT(v):c,k={};for(var I in y)u&&I==="as"||N(I)&&(k[I]=y[I]);return k.className=S,k.ref=x,f.exports.createElement(f.exports.Fragment,null,f.exports.createElement($M,{cache:g,serialized:_,isStringTag:typeof v=="string"}),f.exports.createElement(v,k))});return b.displayName=a!==void 0?a:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",b.defaultProps=t.defaultProps,b.__emotion_real=b,b.__emotion_base=o,b.__emotion_styles=p,b.__emotion_forwardProp=l,Object.defineProperty(b,"toString",{value:function(){return"."+s}}),b.withComponent=function(y,g){return e(y,T({},n,g,{shouldForwardProp:gT(b,g,!0)})).apply(void 0,p)},b}},OM=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ub=PM.bind();OM.forEach(function(e){ub[e]=ub(e)});var DM=ub,rN={exports:{}},LM="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",MM=LM,BM=MM;function oN(){}function aN(){}aN.resetWarningCache=oN;var FM=function(){function e(r,o,a,s,l,c){if(c!==BM){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:aN,resetWarningCache:oN};return n.PropTypes=n,n};rN.exports=FM();var Vo=rN.exports,Ug={exports:{}},uf={};/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zM=f.exports,iN=60103;uf.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var vT=Symbol.for;iN=vT("react.element"),uf.Fragment=vT("react.fragment")}var jM=zM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,UM=Object.prototype.hasOwnProperty,WM={key:!0,ref:!0,__self:!0,__source:!0};function sN(e,t,n){var r,o={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)UM.call(t,r)&&!WM.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:iN,type:e,key:a,ref:s,props:o,_owner:jM.current}}uf.jsx=sN;uf.jsxs=sN;Ug.exports=uf;const i=Ug.exports.jsx,w=Ug.exports.jsxs,Ne=Ug.exports.Fragment;var HM=Object.freeze(Object.defineProperty({__proto__:null,jsx:i,jsxs:w,Fragment:Ne},Symbol.toStringTag,{value:"Module"}));const VM=vw({key:"css",prepend:!0});function GM(e){const{injectFirst:t,children:n}=e;return t?i(kw,{value:VM,children:n}):n}function qM(e){return e==null||Object.keys(e).length===0}function sm(e){const{styles:t,defaultTheme:n={}}=e;return i(tN,{styles:typeof t=="function"?o=>t(qM(o)?n:o):t})}/** @license MUI v5.10.1
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function lN(e,t){return DM(e,t)}const YM=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Id(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function vo(e,t,n={clone:!0}){const r=n.clone?T({},e):e;return Id(e)&&Id(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Id(t[o])&&o in e&&Id(e[o])?r[o]=vo(e[o],t[o],n):r[o]=t[o])}),r}function Go(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Ln={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _w=Symbol.for("react.element"),Iw=Symbol.for("react.portal"),Wg=Symbol.for("react.fragment"),Hg=Symbol.for("react.strict_mode"),Vg=Symbol.for("react.profiler"),Gg=Symbol.for("react.provider"),qg=Symbol.for("react.context"),KM=Symbol.for("react.server_context"),Yg=Symbol.for("react.forward_ref"),Kg=Symbol.for("react.suspense"),Xg=Symbol.for("react.suspense_list"),Jg=Symbol.for("react.memo"),Qg=Symbol.for("react.lazy"),XM=Symbol.for("react.offscreen"),cN;cN=Symbol.for("react.module.reference");function ya(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _w:switch(e=e.type,e){case Wg:case Vg:case Hg:case Kg:case Xg:return e;default:switch(e=e&&e.$$typeof,e){case KM:case qg:case Yg:case Qg:case Jg:case Gg:return e;default:return t}}case Iw:return t}}}Ln.ContextConsumer=qg;Ln.ContextProvider=Gg;Ln.Element=_w;Ln.ForwardRef=Yg;Ln.Fragment=Wg;Ln.Lazy=Qg;Ln.Memo=Jg;Ln.Portal=Iw;Ln.Profiler=Vg;Ln.StrictMode=Hg;Ln.Suspense=Kg;Ln.SuspenseList=Xg;Ln.isAsyncMode=function(){return!1};Ln.isConcurrentMode=function(){return!1};Ln.isContextConsumer=function(e){return ya(e)===qg};Ln.isContextProvider=function(e){return ya(e)===Gg};Ln.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_w};Ln.isForwardRef=function(e){return ya(e)===Yg};Ln.isFragment=function(e){return ya(e)===Wg};Ln.isLazy=function(e){return ya(e)===Qg};Ln.isMemo=function(e){return ya(e)===Jg};Ln.isPortal=function(e){return ya(e)===Iw};Ln.isProfiler=function(e){return ya(e)===Vg};Ln.isStrictMode=function(e){return ya(e)===Hg};Ln.isSuspense=function(e){return ya(e)===Kg};Ln.isSuspenseList=function(e){return ya(e)===Xg};Ln.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wg||e===Vg||e===Hg||e===Kg||e===Xg||e===XM||typeof e=="object"&&e!==null&&(e.$$typeof===Qg||e.$$typeof===Jg||e.$$typeof===Gg||e.$$typeof===qg||e.$$typeof===Yg||e.$$typeof===cN||e.getModuleId!==void 0)};Ln.typeOf=ya;function se(e){if(typeof e!="string")throw new Error(Go(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Mm(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function Ll(e,t=166){let n;function r(...o){const a=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r}function JM(e,t){return()=>null}function Xd(e,t){return f.exports.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function or(e){return e&&e.ownerDocument||document}function fa(e){return or(e).defaultView||window}function QM(e,t){return()=>null}function nu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const ZM=typeof window!="undefined"?f.exports.useLayoutEffect:f.exports.useEffect;var Oo=ZM;let yT=0;function e7(e){const[t,n]=f.exports.useState(e),r=e||t;return f.exports.useEffect(()=>{t==null&&(yT+=1,n(`mui-${yT}`))},[t]),r}const bT=Rs["useId"];function Eu(e){if(bT!==void 0){const t=bT();return e!=null?e:t}return e7(e)}function t7(e,t,n,r,o){return null}function Oa({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=f.exports.useRef(e!==void 0),[a,s]=f.exports.useState(t),l=o?e:a,c=f.exports.useCallback(u=>{o||s(u)},[]);return[l,c]}function kr(e){const t=f.exports.useRef(e);return Oo(()=>{t.current=e}),f.exports.useCallback((...n)=>(0,t.current)(...n),[])}function Xt(e,t){return f.exports.useMemo(()=>e==null&&t==null?null:n=>{nu(e,n),nu(t,n)},[e,t])}let Zg=!0,db=!1,xT;const n7={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function r7(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&n7[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function o7(e){e.metaKey||e.altKey||e.ctrlKey||(Zg=!0)}function T0(){Zg=!1}function a7(){this.visibilityState==="hidden"&&db&&(Zg=!0)}function i7(e){e.addEventListener("keydown",o7,!0),e.addEventListener("mousedown",T0,!0),e.addEventListener("pointerdown",T0,!0),e.addEventListener("touchstart",T0,!0),e.addEventListener("visibilitychange",a7,!0)}function s7(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Zg||r7(t)}function df(){const e=f.exports.useCallback(o=>{o!=null&&i7(o.ownerDocument)},[]),t=f.exports.useRef(!1);function n(){return t.current?(db=!0,window.clearTimeout(xT),xT=window.setTimeout(()=>{db=!1},100),t.current=!1,!0):!1}function r(o){return s7(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function uN(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let vc;function dN(){if(vc)return vc;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),vc="reverse",e.scrollLeft>0?vc="default":(e.scrollLeft=1,e.scrollLeft===0&&(vc="negative")),document.body.removeChild(e),vc}function wT(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(dN()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const l7={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var c7=l7;function pN(e,t){const n=T({},t);return Object.keys(e).forEach(r=>{n[r]===void 0&&(n[r]=e[r])}),n}function Qe(e,t,n){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((a,s)=>(s&&(a.push(t(s)),n&&n[s]&&a.push(n[s])),a),[]).join(" ")}),r}const ST=e=>e,u7=()=>{let e=ST;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ST}}},d7=u7();var Aw=d7;const p7={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Xe(e,t,n="Mui"){const r=p7[t];return r?`${n}-${r}`:`${Aw.generate(e)}-${t}`}function Ke(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Xe(e,o,n)}),r}function Jd(e,t){return t?vo(e,t,{clone:!1}):e}const Nw={xs:0,sm:600,md:900,lg:1200,xl:1536},CT={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Nw[e]}px)`};function Ba(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||CT;return t.reduce((s,l,c)=>(s[a.up(a.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const a=r.breakpoints||CT;return Object.keys(t).reduce((s,l)=>{if(Object.keys(a.values||Nw).indexOf(l)!==-1){const c=a.up(l);s[c]=n(t[l],l)}else{const c=l;s[c]=t[c]}return s},{})}return n(t)}function f7(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function h7(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function m7(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,a)=>{a<e.length&&(n[o]=!0)}):r.forEach(o=>{e[o]!=null&&(n[o]=!0)}),n}function ev({values:e,breakpoints:t,base:n}){const r=n||m7(e,t),o=Object.keys(r);if(o.length===0)return e;let a;return o.reduce((s,l,c)=>(Array.isArray(e)?(s[l]=e[c]!=null?e[c]:e[a],a=c):typeof e=="object"?(s[l]=e[l]!=null?e[l]:e[a],a=l):s[l]=e,s),{})}function _p(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function ET(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=_p(e,n)||r,t&&(o=t(o)),o}function at(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=s=>{if(s[t]==null)return null;const l=s[t],c=s.theme,u=_p(c,r)||{};return Ba(s,l,p=>{let h=ET(u,o,p);return p===h&&typeof p=="string"&&(h=ET(u,o,`${t}${p==="default"?"":se(p)}`,p)),n===!1?h:{[n]:h}})};return a.propTypes={},a.filterProps=[t],a}function Bs(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?Jd(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function g7(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const v7={m:"margin",p:"padding"},y7={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},TT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},b7=g7(e=>{if(e.length>2)if(TT[e])e=TT[e];else return[e];const[t,n]=e.split(""),r=v7[t],o=y7[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),x7=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],w7=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fN=[...x7,...w7];function pf(e,t,n,r){var o;const a=(o=_p(e,t,!1))!=null?o:n;return typeof a=="number"?s=>typeof s=="string"?s:a*s:Array.isArray(a)?s=>typeof s=="string"?s:a[s]:typeof a=="function"?a:()=>{}}function hN(e){return pf(e,"spacing",8)}function ff(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function S7(e,t){return n=>e.reduce((r,o)=>(r[o]=ff(t,n),r),{})}function C7(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=b7(n),a=S7(o,r),s=e[n];return Ba(e,s,a)}function E7(e,t){const n=hN(e.theme);return Object.keys(e).map(r=>C7(e,t,r,n)).reduce(Jd,{})}function tv(e){return E7(e,fN)}tv.propTypes={};tv.filterProps=fN;function hf(e){return typeof e!="number"?e:`${e}px solid`}const T7=at({prop:"border",themeKey:"borders",transform:hf}),R7=at({prop:"borderTop",themeKey:"borders",transform:hf}),k7=at({prop:"borderRight",themeKey:"borders",transform:hf}),_7=at({prop:"borderBottom",themeKey:"borders",transform:hf}),I7=at({prop:"borderLeft",themeKey:"borders",transform:hf}),A7=at({prop:"borderColor",themeKey:"palette"}),N7=at({prop:"borderTopColor",themeKey:"palette"}),$7=at({prop:"borderRightColor",themeKey:"palette"}),P7=at({prop:"borderBottomColor",themeKey:"palette"}),O7=at({prop:"borderLeftColor",themeKey:"palette"}),$w=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=pf(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ff(t,r)});return Ba(e,e.borderRadius,n)}return null};$w.propTypes={};$w.filterProps=["borderRadius"];const D7=Bs(T7,R7,k7,_7,I7,A7,N7,$7,P7,O7,$w);var mN=D7;const L7=at({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),M7=at({prop:"display"}),B7=at({prop:"overflow"}),F7=at({prop:"textOverflow"}),z7=at({prop:"visibility"}),j7=at({prop:"whiteSpace"});var gN=Bs(L7,M7,B7,F7,z7,j7);const U7=at({prop:"flexBasis"}),W7=at({prop:"flexDirection"}),H7=at({prop:"flexWrap"}),V7=at({prop:"justifyContent"}),G7=at({prop:"alignItems"}),q7=at({prop:"alignContent"}),Y7=at({prop:"order"}),K7=at({prop:"flex"}),X7=at({prop:"flexGrow"}),J7=at({prop:"flexShrink"}),Q7=at({prop:"alignSelf"}),Z7=at({prop:"justifyItems"}),eB=at({prop:"justifySelf"}),tB=Bs(U7,W7,H7,V7,G7,q7,Y7,K7,X7,J7,Q7,Z7,eB);var vN=tB;const Pw=e=>{if(e.gap!==void 0&&e.gap!==null){const t=pf(e.theme,"spacing",8),n=r=>({gap:ff(t,r)});return Ba(e,e.gap,n)}return null};Pw.propTypes={};Pw.filterProps=["gap"];const Ow=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=pf(e.theme,"spacing",8),n=r=>({columnGap:ff(t,r)});return Ba(e,e.columnGap,n)}return null};Ow.propTypes={};Ow.filterProps=["columnGap"];const Dw=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=pf(e.theme,"spacing",8),n=r=>({rowGap:ff(t,r)});return Ba(e,e.rowGap,n)}return null};Dw.propTypes={};Dw.filterProps=["rowGap"];const nB=at({prop:"gridColumn"}),rB=at({prop:"gridRow"}),oB=at({prop:"gridAutoFlow"}),aB=at({prop:"gridAutoColumns"}),iB=at({prop:"gridAutoRows"}),sB=at({prop:"gridTemplateColumns"}),lB=at({prop:"gridTemplateRows"}),cB=at({prop:"gridTemplateAreas"}),uB=at({prop:"gridArea"}),dB=Bs(Pw,Ow,Dw,nB,rB,oB,aB,iB,sB,lB,cB,uB);var yN=dB;const pB=at({prop:"color",themeKey:"palette"}),fB=at({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),hB=at({prop:"backgroundColor",themeKey:"palette"}),mB=Bs(pB,fB,hB);var bN=mB;const gB=at({prop:"position"}),vB=at({prop:"zIndex",themeKey:"zIndex"}),yB=at({prop:"top"}),bB=at({prop:"right"}),xB=at({prop:"bottom"}),wB=at({prop:"left"});var xN=Bs(gB,vB,yB,bB,xB,wB);const SB=at({prop:"boxShadow",themeKey:"shadows"});var wN=SB;function Fs(e){return e<=1&&e!==0?`${e*100}%`:e}const CB=at({prop:"width",transform:Fs}),SN=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,o,a;return{maxWidth:((r=e.theme)==null||(o=r.breakpoints)==null||(a=o.values)==null?void 0:a[n])||Nw[n]||Fs(n)}};return Ba(e,e.maxWidth,t)}return null};SN.filterProps=["maxWidth"];const EB=at({prop:"minWidth",transform:Fs}),TB=at({prop:"height",transform:Fs}),RB=at({prop:"maxHeight",transform:Fs}),kB=at({prop:"minHeight",transform:Fs});at({prop:"size",cssProperty:"width",transform:Fs});at({prop:"size",cssProperty:"height",transform:Fs});const _B=at({prop:"boxSizing"}),IB=Bs(CB,SN,EB,TB,RB,kB,_B);var CN=IB;const AB=at({prop:"fontFamily",themeKey:"typography"}),NB=at({prop:"fontSize",themeKey:"typography"}),$B=at({prop:"fontStyle",themeKey:"typography"}),PB=at({prop:"fontWeight",themeKey:"typography"}),OB=at({prop:"letterSpacing"}),DB=at({prop:"textTransform"}),LB=at({prop:"lineHeight"}),MB=at({prop:"textAlign"}),BB=at({prop:"typography",cssProperty:!1,themeKey:"typography"}),FB=Bs(BB,AB,NB,$B,PB,OB,LB,MB,DB);var EN=FB;const RT={borders:mN.filterProps,display:gN.filterProps,flexbox:vN.filterProps,grid:yN.filterProps,positions:xN.filterProps,palette:bN.filterProps,shadows:wN.filterProps,sizing:CN.filterProps,spacing:tv.filterProps,typography:EN.filterProps},TN={borders:mN,display:gN,flexbox:vN,grid:yN,positions:xN,palette:bN,shadows:wN,sizing:CN,spacing:tv,typography:EN},zB=Object.keys(RT).reduce((e,t)=>(RT[t].forEach(n=>{e[n]=TN[t]}),e),{});function jB(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function UB(e,t){return typeof e=="function"?e(t):e}function WB(e=TN){const t=Object.keys(e).reduce((o,a)=>(e[a].filterProps.forEach(s=>{o[s]=e[a]}),o),{});function n(o,a,s){const l={[o]:a,theme:s},c=t[o];return c?c(l):{[o]:a}}function r(o){const{sx:a,theme:s={}}=o||{};if(!a)return null;function l(c){let u=c;if(typeof c=="function")u=c(s);else if(typeof c!="object")return c;if(!u)return null;const d=f7(s.breakpoints),p=Object.keys(d);let h=d;return Object.keys(u).forEach(m=>{const b=UB(u[m],s);if(b!=null)if(typeof b=="object")if(t[m])h=Jd(h,n(m,b,s));else{const y=Ba({theme:s},b,g=>({[m]:g}));jB(y,b)?h[m]=r({sx:b,theme:s}):h=Jd(h,y)}else h=Jd(h,n(m,b,s))}),h7(p,h)}return Array.isArray(a)?a.map(l):l(a)}return r}const RN=WB();RN.filterProps=["sx"];var Lw=RN;const HB=["sx"],VB=e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach(n=>{zB[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]}),t};function Mw(e){const{sx:t}=e,n=Re(e,HB),{systemProps:r,otherProps:o}=VB(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...s)=>{const l=t(...s);return Id(l)?T({},r,l):r}:a=T({},r,t),T({},o,{sx:a})}function GB(e){return({theme:t})=>Lw({sx:e,theme:t})}function kN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=kN(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ce(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=kN(e))&&(r&&(r+=" "),r+=t);return r}const qB=["values","unit","step"],YB=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>T({},n,{[r.key]:r.val}),{})};function _N(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=Re(e,qB),a=YB(t),s=Object.keys(a);function l(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function u(h,m){const b=s.indexOf(m);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(b!==-1&&typeof t[s[b]]=="number"?t[s[b]]:m)-r/100}${n})`}function d(h){return s.indexOf(h)+1<s.length?u(h,s[s.indexOf(h)+1]):l(h)}function p(h){const m=s.indexOf(h);return m===0?l(s[1]):m===s.length-1?c(s[m]):u(h,s[s.indexOf(h)+1]).replace("@media","@media not all and")}return T({keys:s,values:a,up:l,down:c,between:u,only:d,not:p,unit:n},o)}const KB={borderRadius:4};var XB=KB;function IN(e=8){if(e.mui)return e;const t=hN({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}const JB=["breakpoints","palette","spacing","shape"];function nv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:a={}}=e,s=Re(e,JB),l=_N(n),c=IN(o);let u=vo({breakpoints:l,direction:"ltr",components:{},palette:T({mode:"light"},r),spacing:c,shape:T({},XB,a)},s);return u=t.reduce((d,p)=>vo(d,p),u),u}const QB=f.exports.createContext(null);var AN=QB;function NN(){return f.exports.useContext(AN)}const ZB=typeof Symbol=="function"&&Symbol.for;var e8=ZB?Symbol.for("mui.nested"):"__THEME_NESTED__";function t8(e,t){return typeof t=="function"?t(e):T({},e,t)}function n8(e){const{children:t,theme:n}=e,r=NN(),o=f.exports.useMemo(()=>{const a=r===null?n:t8(r,n);return a!=null&&(a[e8]=r!==null),a},[n,r]);return i(AN.Provider,{value:o,children:t})}function r8(e){return Object.keys(e).length===0}function Bw(e=null){const t=NN();return!t||r8(t)?e:t}const o8=nv();function zs(e=o8){return Bw(e)}const a8=["className","component"];function i8(e={}){const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:r,styleFunctionSx:o=Lw}=e,a=lN("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(o);return f.exports.forwardRef(function(c,u){const d=zs(t),p=Mw(c),{className:h,component:m="div"}=p,b=Re(p,a8);return i(a,T({as:m,ref:u,className:Ce(h,r?r(n):n),theme:d},b))})}const s8=["variant"];function kT(e){return e.length===0}function $N(e){const{variant:t}=e,n=Re(e,s8);let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=kT(r)?e[o]:se(e[o]):r+=`${kT(r)?o:se(o)}${se(e[o].toString())}`}),r}const l8=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],c8=["theme"],u8=["theme"];function id(e){return Object.keys(e).length===0}function d8(e){return typeof e=="string"&&e.charCodeAt(0)>96}const p8=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,f8=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(o=>{const a=$N(o.props);r[a]=o.style}),r},h8=(e,t,n,r)=>{var o,a;const{ownerState:s={}}=e,l=[],c=n==null||(o=n.components)==null||(a=o[r])==null?void 0:a.variants;return c&&c.forEach(u=>{let d=!0;Object.keys(u.props).forEach(p=>{s[p]!==u.props[p]&&e[p]!==u.props[p]&&(d=!1)}),d&&l.push(t[$N(u.props)])}),l};function Qd(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const m8=nv();function PN(e={}){const{defaultTheme:t=m8,rootShouldForwardProp:n=Qd,slotShouldForwardProp:r=Qd,styleFunctionSx:o=Lw}=e,a=s=>{const l=id(s.theme)?t:s.theme;return o(T({},s,{theme:l}))};return a.__mui_systemSx=!0,(s,l={})=>{YM(s,E=>E.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:d,skipSx:p,overridesResolver:h}=l,m=Re(l,l8),b=d!==void 0?d:u&&u!=="Root"||!1,y=p||!1;let g,x=Qd;u==="Root"?x=n:u?x=r:d8(s)&&(x=void 0);const v=lN(s,T({shouldForwardProp:x,label:g},m)),S=(E,...R)=>{const A=R?R.map(I=>typeof I=="function"&&I.__emotion_real!==I?O=>{let{theme:L}=O,q=Re(O,c8);return I(T({theme:id(L)?t:L},q))}:I):[];let _=E;c&&h&&A.push(I=>{const O=id(I.theme)?t:I.theme,L=p8(c,O);if(L){const q={};return Object.entries(L).forEach(([D,H])=>{q[D]=typeof H=="function"?H(T({},I,{theme:O})):H}),h(I,q)}return null}),c&&!b&&A.push(I=>{const O=id(I.theme)?t:I.theme;return h8(I,f8(c,O),O,c)}),y||A.push(a);const N=A.length-R.length;if(Array.isArray(E)&&N>0){const I=new Array(N).fill("");_=[...E,...I],_.raw=[...E.raw,...I]}else typeof E=="function"&&E.__emotion_real!==E&&(_=I=>{let{theme:O}=I,L=Re(I,u8);return E(T({theme:id(O)?t:O},L))});return v(_,...A)};return v.withConfig&&(S.withConfig=v.withConfig),S}}const g8=PN();var ao=g8;function ON(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:pN(t.components[n].defaultProps,r)}function DN({props:e,name:t,defaultTheme:n}){const r=zs(n);return ON({theme:r,name:t,props:e})}function Fw(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function LN(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function v8(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function di(e){if(e.type)return e;if(e.charAt(0)==="#")return di(LN(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Go(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(Go(10,o))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:o}}const ka=e=>{const t=di(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function mf(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function y8(e){if(e.indexOf("#")===0)return e;const{values:t}=di(e);return`#${t.map((n,r)=>v8(r===3?Math.round(255*n):n)).join("")}`}function MN(e){e=di(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),s=(u,d=(u+n/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),mf({type:l,values:c})}function Bm(e){e=di(e);let t=e.type==="hsl"?di(MN(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function BN(e,t){const n=Bm(e),r=Bm(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $t(e,t){return e=di(e),t=Fw(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,mf(e)}function tn(e,t){if(e=di(e),t=Fw(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return mf(e)}function nn(e,t){if(e=di(e),t=Fw(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return mf(e)}function yl(e,t=.15){return Bm(e)>.5?tn(e,t):nn(e,t)}function b8(e){const t=zs();return i(ui.Provider,{value:typeof t=="object"?t:{},children:e.children})}function zw(e){const{children:t,theme:n}=e;return i(n8,{theme:n,children:i(b8,{children:t})})}const _T=(e,t,n,r=[])=>{let o=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(o)?o[Number(a)]=n:o&&typeof o=="object"&&(o[a]=n):o&&typeof o=="object"&&(o[a]||(o[a]=r.includes(a)?[]:{}),o=o[a])})},x8=(e,t,n)=>{function r(o,a=[],s=[]){Object.entries(o).forEach(([l,c])=>{(!n||n&&!n([...a,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...a,l],Array.isArray(c)?[...s,l]:s):t([...a,l],c,s))})}r(e)},w8=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function IT(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},a={},s={};return x8(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||r&&!r(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`;Object.assign(o,{[d]:w8(l,c)}),_T(a,l,`var(${d})`,u)}_T(s,l,c,u)},l=>l[0]==="vars"),{css:o,vars:a,parsedTheme:s}}const jw="mode",Uw="color-scheme",FN="data-color-scheme";function S8(e){const{enableColorScheme:t=!0,enableSystem:n=!1,defaultLightColorScheme:r="light",defaultDarkColorScheme:o="dark",modeStorageKey:a=jw,colorSchemeStorageKey:s=Uw,attribute:l=FN,colorSchemeNode:c="document.documentElement"}=e||{};return i("script",{dangerouslySetInnerHTML:{__html:`(function() { try {
        var mode = localStorage.getItem('${a}');
        var cssColorScheme = mode;
        var colorScheme = '';
        if (mode === 'system' || (!mode && !!${n})) {
          // handle system mode
          var mql = window.matchMedia('(prefers-color-scheme: dark)');
          if (mql.matches) {
            cssColorScheme = 'dark';
            colorScheme = localStorage.getItem('${s}-dark') || '${o}';
          } else {
            cssColorScheme = 'light';
            colorScheme = localStorage.getItem('${s}-light') || '${r}';
          }
        }
        if (mode === 'light') {
          colorScheme = localStorage.getItem('${s}-light') || '${r}';
        }
        if (mode === 'dark') {
          colorScheme = localStorage.getItem('${s}-dark') || '${o}';
        }
        if (colorScheme) {
          ${c}.setAttribute('${l}', colorScheme);
        }
        if (${t} && !!cssColorScheme) {
          ${c}.style.setProperty('color-scheme', cssColorScheme);
        }
      } catch (e) {} })();`}})}function AT(e){if(typeof window!="undefined"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function pb(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function C8(e){return pb(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function R0(e,t){if(typeof window=="undefined")return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t}function E8(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:a=jw,colorSchemeStorageKey:s=Uw,storageWindow:l=typeof window=="undefined"?void 0:window}=e,c=o.join(","),[u,d]=f.exports.useState(()=>{const g=R0(a,t);return{mode:g,systemMode:AT(g),lightColorScheme:R0(`${s}-light`)||n,darkColorScheme:R0(`${s}-dark`)||r}}),p=C8(u),h=f.exports.useCallback(g=>{d(x=>{const v=g||t;return g===x.mode?x:(typeof localStorage!="undefined"&&localStorage.setItem(a,v),T({},x,{mode:v,systemMode:AT(v)}))})},[a,t]),m=f.exports.useCallback(g=>{!g||typeof g=="string"?g&&!c.includes(g)?console.error(`\`${g}\` does not exist in \`theme.colorSchemes\`.`):d(x=>{const v=T({},x);return g?(pb(x,S=>{localStorage.setItem(`${s}-${S}`,g),S==="light"&&(v.lightColorScheme=g),S==="dark"&&(v.darkColorScheme=g)}),v):(v.lightColorScheme=n,v.darkColorScheme=r,v)}):g.light&&!c.includes(g.light)||g.dark&&!c.includes(g.dark)?console.error(`\`${g}\` does not exist in \`theme.colorSchemes\`.`):(d(x=>{const v=T({},x);return(g.light||g.light===null)&&(v.lightColorScheme=g.light===null?n:g.light),(g.dark||g.dark===null)&&(v.darkColorScheme=g.dark===null?r:g.dark),v}),g.light&&localStorage.setItem(`${s}-light`,g.light),g.dark&&localStorage.setItem(`${s}-dark`,g.dark))},[c,s,n,r]),b=f.exports.useCallback(g=>{u.mode==="system"&&d(x=>T({},x,{systemMode:g!=null&&g.matches?"dark":"light"}))},[u.mode]),y=f.exports.useRef(b);return y.current=b,f.exports.useEffect(()=>{const g=(...v)=>y.current(...v),x=window.matchMedia("(prefers-color-scheme: dark)");return x.addListener(g),g(x),()=>x.removeListener(g)},[]),f.exports.useEffect(()=>{u.mode&&localStorage.setItem(a,u.mode),pb(u,g=>{g==="light"&&localStorage.setItem(`${s}-light`,u.lightColorScheme),g==="dark"&&localStorage.setItem(`${s}-dark`,u.darkColorScheme)})},[u,s,a]),f.exports.useEffect(()=>{const g=x=>{const v=x.newValue;typeof x.key=="string"&&x.key.startsWith(s)&&(!v||c.match(v))&&(x.key.endsWith("light")&&m({light:v}),x.key.endsWith("dark")&&m({dark:v})),x.key===a&&(!v||["light","dark","system"].includes(v))&&h(v||t)};if(l)return l.addEventListener("storage",g),()=>l.removeEventListener("storage",g)},[m,h,a,s,c,t,l]),T({},u,{colorScheme:p,setMode:h,setColorScheme:m})}const T8=["colorSchemes","components","cssVarPrefix"],R8="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function k8(e){const{theme:t={},attribute:n=FN,modeStorageKey:r=jw,colorSchemeStorageKey:o=Uw,defaultMode:a="light",defaultColorScheme:s,disableTransitionOnChange:l=!1,enableColorScheme:c=!0,shouldSkipGeneratingVar:u,resolveTheme:d}=e;(!t.colorSchemes||typeof s=="string"&&!t.colorSchemes[s]||typeof s=="object"&&!t.colorSchemes[s==null?void 0:s.light]||typeof s=="object"&&!t.colorSchemes[s==null?void 0:s.dark])&&console.error(`MUI: \`${s}\` does not exist in \`theme.colorSchemes\`.`);const p=f.exports.createContext(void 0),h=()=>{const y=f.exports.useContext(p);if(!y)throw new Error(Go(19));return y};function m({children:y,theme:g=t,modeStorageKey:x=r,colorSchemeStorageKey:v=o,attribute:S=n,defaultMode:E=a,defaultColorScheme:R=s,disableTransitionOnChange:A=l,enableColorScheme:_=c,storageWindow:N=typeof window=="undefined"?void 0:window,documentNode:k=typeof document=="undefined"?void 0:document,colorSchemeNode:I=typeof document=="undefined"?void 0:document.documentElement,colorSchemeSelector:O=":root",shouldSkipGeneratingVar:L=u}){const q=f.exports.useRef(!1),{colorSchemes:D={},components:H={},cssVarPrefix:U}=g,Z=Re(g,T8),G=Object.keys(D),B=typeof R=="string"?R:R.light,Y=typeof R=="string"?R:R.dark,{mode:K,setMode:Q,systemMode:re,lightColorScheme:pe,darkColorScheme:ye,colorScheme:ae,setColorScheme:oe}=E8({supportedColorSchemes:G,defaultLightColorScheme:B,defaultDarkColorScheme:Y,modeStorageKey:x,colorSchemeStorageKey:v,defaultMode:E,storageWindow:N}),ue=(()=>ae||(E==="dark"?Y:B))();let ge=Z;const{css:_e,vars:We,parsedTheme:be}=IT(ge,{prefix:U,shouldSkipGeneratingVar:L});ge=T({},be,{components:H,colorSchemes:D,cssVarPrefix:U,vars:We,getColorSchemeSelector:Pe=>`[${S}="${Pe}"] &`});const he={},He={};return Object.entries(D).forEach(([Pe,pt])=>{const{css:St,vars:Ut,parsedTheme:zt}=IT(pt,{prefix:U,shouldSkipGeneratingVar:L});ge.vars=vo(ge.vars,Ut),Pe===ue&&(ge=T({},ge,zt),ge.palette&&(ge.palette.mode=K,ge.palette.colorScheme=ue));const gt=(()=>typeof R=="string"?R:E==="dark"?R.dark:R.light)();Pe===gt?he[`${O}, [${S}="${Pe}"]`]=St:He[`${O===":root"?"":O}[${S}="${Pe}"]`]=St}),f.exports.useEffect(()=>{ae&&I&&I.setAttribute(S,ae)},[ae,S,I]),Oo(()=>{if(!K||!_||!I)return;const Pe=I.style.getPropertyValue("color-scheme");return K==="system"?I.style.setProperty("color-scheme",re):I.style.setProperty("color-scheme",K),()=>{I.style.setProperty("color-scheme",Pe)}},[K,re,_,I]),f.exports.useEffect(()=>{let Pe;if(A&&q.current&&k){const pt=k.createElement("style");pt.appendChild(k.createTextNode(R8)),k.head.appendChild(pt),window.getComputedStyle(k.body),Pe=setTimeout(()=>{k.head.removeChild(pt)},1)}return()=>{clearTimeout(Pe)}},[ae,A,k]),f.exports.useEffect(()=>(q.current=!0,()=>{q.current=!1}),[]),w(p.Provider,{value:{mode:K,setMode:Q,lightColorScheme:pe,darkColorScheme:ye,colorScheme:ae,setColorScheme:oe,allColorSchemes:G},children:[i(sm,{styles:{[O]:_e}}),i(sm,{styles:he}),i(sm,{styles:He}),i(zw,{theme:d?d(ge):ge,children:y})]})}return{CssVarsProvider:m,useColorScheme:h,getInitColorSchemeScript:y=>S8(T({attribute:n,colorSchemeStorageKey:o,modeStorageKey:r,enableColorScheme:c},y))}}function _8(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const I8=["className","component","disableGutters","fixed","maxWidth","classes"],A8=nv(),N8=ao("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),$8=e=>DN({props:e,name:"MuiContainer",defaultTheme:A8}),P8=(e,t)=>{const n=c=>Xe(t,c),{classes:r,fixed:o,disableGutters:a,maxWidth:s}=e,l={root:["root",s&&`maxWidth${se(String(s))}`,o&&"fixed",a&&"disableGutters"]};return Qe(l,n,r)};function O8(e={}){const{createStyledComponent:t=N8,useThemeProps:n=$8,componentName:r="MuiContainer"}=e,o=t(({theme:s,ownerState:l})=>T({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!l.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:l})=>l.fixed&&Object.keys(s.breakpoints.values).reduce((c,u)=>{const d=u,p=s.breakpoints.values[d];return p!==0&&(c[s.breakpoints.up(d)]={maxWidth:`${p}${s.breakpoints.unit}`}),c},{}),({theme:s,ownerState:l})=>T({},l.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},l.maxWidth&&l.maxWidth!=="xs"&&{[s.breakpoints.up(l.maxWidth)]:{maxWidth:`${s.breakpoints.values[l.maxWidth]}${s.breakpoints.unit}`}}));return f.exports.forwardRef(function(l,c){const u=n(l),{className:d,component:p="div",disableGutters:h=!1,fixed:m=!1,maxWidth:b="lg"}=u,y=Re(u,I8),g=T({},u,{component:p,disableGutters:h,fixed:m,maxWidth:b}),x=P8(g,r);return i(o,T({as:p,ownerState:g,className:Ce(x.root,d),ref:c},y))})}const D8=["defaultProps","mixins","overrides","palette","props","styleOverrides"],L8=["type","mode"];function M8(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:a={},styleOverrides:s={}}=e,l=Re(e,D8),c=T({},l,{components:{}});Object.keys(t).forEach(y=>{const g=c.components[y]||{};g.defaultProps=t[y],c.components[y]=g}),Object.keys(a).forEach(y=>{const g=c.components[y]||{};g.defaultProps=a[y],c.components[y]=g}),Object.keys(s).forEach(y=>{const g=c.components[y]||{};g.styleOverrides=s[y],c.components[y]=g}),Object.keys(r).forEach(y=>{const g=c.components[y]||{};g.styleOverrides=r[y],c.components[y]=g}),c.spacing=IN(e.spacing);const u=_N(e.breakpoints||{}),d=c.spacing;c.mixins=T({gutters:(y={})=>T({paddingLeft:d(2),paddingRight:d(2)},y,{[u.up("sm")]:T({paddingLeft:d(3),paddingRight:d(3)},y[u.up("sm")])})},n);const{type:p,mode:h}=o,m=Re(o,L8),b=h||p||"light";return c.palette=T({text:{hint:b==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:b,type:b},m),c}function ai(e){return typeof e=="string"}function Ad(e,t={},n){return ai(e)?t:T({},t,{ownerState:T({},t.ownerState,n)})}function B8(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function fb(e,t){return typeof e=="function"?e(t):e}function NT(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function F8(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const m=Ce(o==null?void 0:o.className,r==null?void 0:r.className,a,n==null?void 0:n.className),b=T({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),y=T({},n,o,r);return m.length>0&&(y.className=m),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=B8(T({},o,r)),l=NT(r),c=NT(o),u=t(s),d=Ce(u==null?void 0:u.className,n==null?void 0:n.className,a,o==null?void 0:o.className,r==null?void 0:r.className),p=T({},u==null?void 0:u.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=T({},u,n,c,l);return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:u.ref}}const z8=["elementType","externalSlotProps","ownerState"];function Na(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o}=e,a=Re(e,z8),s=fb(r,o),{props:l,internalRef:c}=F8(T({},a,{externalSlotProps:s})),u=Xt(c,Xt(s==null?void 0:s.ref,(t=e.additionalProps)==null?void 0:t.ref));return Ad(n,T({},l,{ref:u}),o)}function $T(e){return typeof e.normalize!="undefined"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function j8(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:a,trim:s=!1}=e;return(l,{inputValue:c,getOptionLabel:u})=>{let d=s?c.trim():c;n&&(d=d.toLowerCase()),t&&(d=$T(d));const p=l.filter(h=>{let m=(a||u)(h);return n&&(m=m.toLowerCase()),t&&(m=$T(m)),o==="start"?m.indexOf(d)===0:m.indexOf(d)>-1});return typeof r=="number"?p.slice(0,r):p}}function k0(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const U8=j8(),PT=5;function W8(e){const{autoComplete:t=!1,autoHighlight:n=!1,autoSelect:r=!1,blurOnSelect:o=!1,clearOnBlur:a=!e.freeSolo,clearOnEscape:s=!1,componentName:l="useAutocomplete",defaultValue:c=e.multiple?[]:null,disableClearable:u=!1,disableCloseOnSelect:d=!1,disabled:p,disabledItemsFocusable:h=!1,disableListWrap:m=!1,filterOptions:b=U8,filterSelectedOptions:y=!1,freeSolo:g=!1,getOptionDisabled:x,getOptionLabel:v=Ie=>{var we;return(we=Ie.label)!=null?we:Ie},groupBy:S,handleHomeEndKeys:E=!e.freeSolo,id:R,includeInputInList:A=!1,inputValue:_,isOptionEqualToValue:N=(Ie,we)=>Ie===we,multiple:k=!1,onChange:I,onClose:O,onHighlightChange:L,onInputChange:q,onOpen:D,open:H,openOnFocus:U=!1,options:Z,readOnly:G=!1,selectOnFocus:B=!e.freeSolo,value:Y}=e,K=Eu(R);let Q=v;Q=Ie=>{const we=v(Ie);return typeof we!="string"?String(we):we};const re=f.exports.useRef(!1),pe=f.exports.useRef(!0),ye=f.exports.useRef(null),ae=f.exports.useRef(null),[oe,ue]=f.exports.useState(null),[ge,_e]=f.exports.useState(-1),We=n?0:-1,be=f.exports.useRef(We),[he,He]=Oa({controlled:Y,default:c,name:l}),[Pe,pt]=Oa({controlled:_,default:"",name:l,state:"inputValue"}),[St,Ut]=f.exports.useState(!1),zt=f.exports.useCallback((Ie,we)=>{if(!(k?he.length<we.length:we!==null)&&!a)return;let Mt;if(k)Mt="";else if(we==null)Mt="";else{const An=Q(we);Mt=typeof An=="string"?An:""}Pe!==Mt&&(pt(Mt),q&&q(Ie,Mt,"reset"))},[Q,Pe,k,q,pt,a,he]),gt=f.exports.useRef();f.exports.useEffect(()=>{const Ie=he!==gt.current;gt.current=he,!(St&&!Ie)&&(g&&!Ie||zt(null,he))},[he,zt,St,gt,g]);const[Et,Qt]=Oa({controlled:H,default:!1,name:l,state:"open"}),[In,ke]=f.exports.useState(!0),Fe=!k&&he!=null&&Pe===Q(he),Ge=Et&&!G,$e=Ge?b(Z.filter(Ie=>!(y&&(k?he:[he]).some(we=>we!==null&&N(Ie,we)))),{inputValue:Fe&&In?"":Pe,getOptionLabel:Q}):[],te=Et&&$e.length>0&&!G,Ee=kr(Ie=>{Ie===-1?ye.current.focus():oe.querySelector(`[data-tag-index="${Ie}"]`).focus()});f.exports.useEffect(()=>{k&&ge>he.length-1&&(_e(-1),Ee(-1))},[he,k,ge,Ee]);function me(Ie,we){if(!ae.current||Ie===-1)return-1;let xt=Ie;for(;;){if(we==="next"&&xt===$e.length||we==="previous"&&xt===-1)return-1;const Mt=ae.current.querySelector(`[data-option-index="${xt}"]`),An=h?!1:!Mt||Mt.disabled||Mt.getAttribute("aria-disabled")==="true";if(Mt&&!Mt.hasAttribute("tabindex")||An)xt+=we==="next"?1:-1;else return xt}}const je=kr(({event:Ie,index:we,reason:xt="auto"})=>{if(be.current=we,we===-1?ye.current.removeAttribute("aria-activedescendant"):ye.current.setAttribute("aria-activedescendant",`${K}-option-${we}`),L&&L(Ie,we===-1?null:$e[we],xt),!ae.current)return;const Mt=ae.current.querySelector('[role="option"].Mui-focused');Mt&&(Mt.classList.remove("Mui-focused"),Mt.classList.remove("Mui-focusVisible"));const An=ae.current.parentElement.querySelector('[role="listbox"]');if(!An)return;if(we===-1){An.scrollTop=0;return}const Mn=ae.current.querySelector(`[data-option-index="${we}"]`);if(!!Mn&&(Mn.classList.add("Mui-focused"),xt==="keyboard"&&Mn.classList.add("Mui-focusVisible"),An.scrollHeight>An.clientHeight&&xt!=="mouse")){const Xn=Mn,qr=An.clientHeight+An.scrollTop,Ua=Xn.offsetTop+Xn.offsetHeight;Ua>qr?An.scrollTop=Ua-An.clientHeight:Xn.offsetTop-Xn.offsetHeight*(S?1.3:0)<An.scrollTop&&(An.scrollTop=Xn.offsetTop-Xn.offsetHeight*(S?1.3:0))}}),ut=kr(({event:Ie,diff:we,direction:xt="next",reason:Mt="auto"})=>{if(!Ge)return;const Mn=me((()=>{const Xn=$e.length-1;if(we==="reset")return We;if(we==="start")return 0;if(we==="end")return Xn;const qr=be.current+we;return qr<0?qr===-1&&A?-1:m&&be.current!==-1||Math.abs(we)>1?0:Xn:qr>Xn?qr===Xn+1&&A?-1:m||Math.abs(we)>1?Xn:0:qr})(),xt);if(je({index:Mn,reason:Mt,event:Ie}),t&&we!=="reset")if(Mn===-1)ye.current.value=Pe;else{const Xn=Q($e[Mn]);ye.current.value=Xn,Xn.toLowerCase().indexOf(Pe.toLowerCase())===0&&Pe.length>0&&ye.current.setSelectionRange(Pe.length,Xn.length)}}),kt=f.exports.useCallback(()=>{if(!Ge)return;const Ie=k?he[0]:he;if($e.length===0||Ie==null){ut({diff:"reset"});return}if(!!ae.current){if(Ie!=null){const we=$e[be.current];if(k&&we&&k0(he,Mt=>N(we,Mt))!==-1)return;const xt=k0($e,Mt=>N(Mt,Ie));xt===-1?ut({diff:"reset"}):je({index:xt});return}if(be.current>=$e.length-1){je({index:$e.length-1});return}je({index:be.current})}},[$e.length,k?!1:he,y,ut,je,Ge,Pe,k]),cn=kr(Ie=>{nu(ae,Ie),Ie&&kt()});f.exports.useEffect(()=>{kt()},[kt]);const Wn=Ie=>{Et||(Qt(!0),ke(!0),D&&D(Ie))},So=(Ie,we)=>{!Et||(Qt(!1),O&&O(Ie,we))},tr=(Ie,we,xt,Mt)=>{if(k){if(he.length===we.length&&he.every((An,Mn)=>An===we[Mn]))return}else if(he===we)return;I&&I(Ie,we,xt,Mt),He(we)},pr=f.exports.useRef(!1),Nr=(Ie,we,xt="selectOption",Mt="options")=>{let An=xt,Mn=we;if(k){Mn=Array.isArray(he)?he.slice():[];const Xn=k0(Mn,qr=>N(we,qr));Xn===-1?Mn.push(we):Mt!=="freeSolo"&&(Mn.splice(Xn,1),An="removeOption")}zt(Ie,Mn),tr(Ie,Mn,An,{option:we}),!d&&(!Ie||!Ie.ctrlKey&&!Ie.metaKey)&&So(Ie,An),(o===!0||o==="touch"&&pr.current||o==="mouse"&&!pr.current)&&ye.current.blur()};function On(Ie,we){if(Ie===-1)return-1;let xt=Ie;for(;;){if(we==="next"&&xt===he.length||we==="previous"&&xt===-1)return-1;const Mt=oe.querySelector(`[data-tag-index="${xt}"]`);if(!Mt||!Mt.hasAttribute("tabindex")||Mt.disabled||Mt.getAttribute("aria-disabled")==="true")xt+=we==="next"?1:-1;else return xt}}const En=(Ie,we)=>{if(!k)return;Pe===""&&So(Ie,"toggleInput");let xt=ge;ge===-1?Pe===""&&we==="previous"&&(xt=he.length-1):(xt+=we==="next"?1:-1,xt<0&&(xt=0),xt===he.length&&(xt=-1)),xt=On(xt,we),_e(xt),Ee(xt)},fn=Ie=>{re.current=!0,pt(""),q&&q(Ie,"","clear"),tr(Ie,k?[]:null,"clear")},Bo=Ie=>we=>{if(Ie.onKeyDown&&Ie.onKeyDown(we),!we.defaultMuiPrevented&&(ge!==-1&&["ArrowLeft","ArrowRight"].indexOf(we.key)===-1&&(_e(-1),Ee(-1)),we.which!==229))switch(we.key){case"Home":Ge&&E&&(we.preventDefault(),ut({diff:"start",direction:"next",reason:"keyboard",event:we}));break;case"End":Ge&&E&&(we.preventDefault(),ut({diff:"end",direction:"previous",reason:"keyboard",event:we}));break;case"PageUp":we.preventDefault(),ut({diff:-PT,direction:"previous",reason:"keyboard",event:we}),Wn(we);break;case"PageDown":we.preventDefault(),ut({diff:PT,direction:"next",reason:"keyboard",event:we}),Wn(we);break;case"ArrowDown":we.preventDefault(),ut({diff:1,direction:"next",reason:"keyboard",event:we}),Wn(we);break;case"ArrowUp":we.preventDefault(),ut({diff:-1,direction:"previous",reason:"keyboard",event:we}),Wn(we);break;case"ArrowLeft":En(we,"previous");break;case"ArrowRight":En(we,"next");break;case"Enter":if(be.current!==-1&&Ge){const xt=$e[be.current],Mt=x?x(xt):!1;if(we.preventDefault(),Mt)return;Nr(we,xt,"selectOption"),t&&ye.current.setSelectionRange(ye.current.value.length,ye.current.value.length)}else g&&Pe!==""&&Fe===!1&&(k&&we.preventDefault(),Nr(we,Pe,"createOption","freeSolo"));break;case"Escape":Ge?(we.preventDefault(),we.stopPropagation(),So(we,"escape")):s&&(Pe!==""||k&&he.length>0)&&(we.preventDefault(),we.stopPropagation(),fn(we));break;case"Backspace":if(k&&!G&&Pe===""&&he.length>0){const xt=ge===-1?he.length-1:ge,Mt=he.slice();Mt.splice(xt,1),tr(we,Mt,"removeOption",{option:he[xt]})}break}},Fo=Ie=>{Ut(!0),U&&!re.current&&Wn(Ie)},Co=Ie=>{if(ae.current!==null&&ae.current.parentElement.contains(document.activeElement)){ye.current.focus();return}Ut(!1),pe.current=!0,re.current=!1,r&&be.current!==-1&&Ge?Nr(Ie,$e[be.current],"blur"):r&&g&&Pe!==""?Nr(Ie,Pe,"blur","freeSolo"):a&&zt(Ie,he),So(Ie,"blur")},Ca=Ie=>{const we=Ie.target.value;Pe!==we&&(pt(we),ke(!1),q&&q(Ie,we,"input")),we===""?!u&&!k&&tr(Ie,null,"clear"):Wn(Ie)},Ea=Ie=>{je({event:Ie,index:Number(Ie.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},qt=()=>{pr.current=!0},ir=Ie=>{const we=Number(Ie.currentTarget.getAttribute("data-option-index"));Nr(Ie,$e[we],"selectOption"),pr.current=!1},fr=Ie=>we=>{const xt=he.slice();xt.splice(Ie,1),tr(we,xt,"removeOption",{option:he[Ie]})},Ta=Ie=>{Et?So(Ie,"toggleInput"):Wn(Ie)},Zi=Ie=>{Ie.target.getAttribute("id")!==K&&Ie.preventDefault()},qs=()=>{ye.current.focus(),B&&pe.current&&ye.current.selectionEnd-ye.current.selectionStart===0&&ye.current.select(),pe.current=!1},Ys=Ie=>{(Pe===""||!Et)&&Ta(Ie)};let Lt=g&&Pe.length>0;Lt=Lt||(k?he.length>0:he!==null);let xn=$e;return S&&(xn=$e.reduce((Ie,we,xt)=>{const Mt=S(we);return Ie.length>0&&Ie[Ie.length-1].group===Mt?Ie[Ie.length-1].options.push(we):Ie.push({key:xt,index:xt,group:Mt,options:[we]}),Ie},[])),p&&St&&Co(),{getRootProps:(Ie={})=>T({"aria-owns":te?`${K}-listbox`:null},Ie,{onKeyDown:Bo(Ie),onMouseDown:Zi,onClick:qs}),getInputLabelProps:()=>({id:`${K}-label`,htmlFor:K}),getInputProps:()=>({id:K,value:Pe,onBlur:Co,onFocus:Fo,onChange:Ca,onMouseDown:Ys,"aria-activedescendant":Ge?"":null,"aria-autocomplete":t?"both":"list","aria-controls":te?`${K}-listbox`:void 0,"aria-expanded":te,autoComplete:"off",ref:ye,autoCapitalize:"none",spellCheck:"false",role:"combobox"}),getClearProps:()=>({tabIndex:-1,onClick:fn}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:Ta}),getTagProps:({index:Ie})=>T({key:Ie,"data-tag-index":Ie,tabIndex:-1},!G&&{onDelete:fr(Ie)}),getListboxProps:()=>({role:"listbox",id:`${K}-listbox`,"aria-labelledby":`${K}-label`,ref:cn,onMouseDown:Ie=>{Ie.preventDefault()}}),getOptionProps:({index:Ie,option:we})=>{const xt=(k?he:[he]).some(An=>An!=null&&N(we,An)),Mt=x?x(we):!1;return{key:Q(we),tabIndex:-1,role:"option",id:`${K}-option-${Ie}`,onMouseOver:Ea,onClick:ir,onTouchStart:qt,"data-option-index":Ie,"aria-disabled":Mt,"aria-selected":xt}},id:K,inputValue:Pe,value:he,dirty:Lt,popupOpen:Ge,focused:St||ge!==-1,anchorEl:oe,setAnchorEl:ue,focusedTag:ge,groupedOptions:xn}}function OT(e){return e.substring(2).toLowerCase()}function H8(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function V8(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=e,s=f.exports.useRef(!1),l=f.exports.useRef(null),c=f.exports.useRef(!1),u=f.exports.useRef(!1);f.exports.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const d=Xt(t.ref,l),p=kr(b=>{const y=u.current;u.current=!1;const g=or(l.current);if(!c.current||!l.current||"clientX"in b&&H8(b,g))return;if(s.current){s.current=!1;return}let x;b.composedPath?x=b.composedPath().indexOf(l.current)>-1:x=!g.documentElement.contains(b.target)||l.current.contains(b.target),!x&&(n||!y)&&o(b)}),h=b=>y=>{u.current=!0;const g=t.props[b];g&&g(y)},m={ref:d};return a!==!1&&(m[a]=h(a)),f.exports.useEffect(()=>{if(a!==!1){const b=OT(a),y=or(l.current),g=()=>{s.current=!0};return y.addEventListener(b,p),y.addEventListener("touchmove",g),()=>{y.removeEventListener(b,p),y.removeEventListener("touchmove",g)}}},[p,a]),r!==!1&&(m[r]=h(r)),f.exports.useEffect(()=>{if(r!==!1){const b=OT(r),y=or(l.current);return y.addEventListener(b,p),()=>{y.removeEventListener(b,p)}}},[p,r]),i(f.exports.Fragment,{children:f.exports.cloneElement(t,m)})}var No="top",ha="bottom",ma="right",$o="left",Ww="auto",gf=[No,ha,ma,$o],ru="start",Ip="end",G8="clippingParents",zN="viewport",sd="popper",q8="reference",DT=gf.reduce(function(e,t){return e.concat([t+"-"+ru,t+"-"+Ip])},[]),jN=[].concat(gf,[Ww]).reduce(function(e,t){return e.concat([t,t+"-"+ru,t+"-"+Ip])},[]),Y8="beforeRead",K8="read",X8="afterRead",J8="beforeMain",Q8="main",Z8="afterMain",eF="beforeWrite",tF="write",nF="afterWrite",rF=[Y8,K8,X8,J8,Q8,Z8,eF,tF,nF];function pi(e){return e?(e.nodeName||"").toLowerCase():null}function ba(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ml(e){var t=ba(e).Element;return e instanceof t||e instanceof Element}function la(e){var t=ba(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Hw(e){if(typeof ShadowRoot=="undefined")return!1;var t=ba(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oF(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!la(a)||!pi(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function aF(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,u){return c[u]="",c},{});!la(o)||!pi(o)||(Object.assign(o.style,l),Object.keys(a).forEach(function(c){o.removeAttribute(c)}))})}}var iF={name:"applyStyles",enabled:!0,phase:"write",fn:oF,effect:aF,requires:["computeStyles"]};function ii(e){return e.split("-")[0]}var kl=Math.max,Fm=Math.min,ou=Math.round;function hb(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function UN(){return!/^((?!chrome|android).)*safari/i.test(hb())}function au(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&la(e)&&(o=e.offsetWidth>0&&ou(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ou(r.height)/e.offsetHeight||1);var s=Ml(e)?ba(e):window,l=s.visualViewport,c=!UN()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/a,p=r.width/o,h=r.height/a;return{width:p,height:h,top:d,right:u+p,bottom:d+h,left:u,x:u,y:d}}function Vw(e){var t=au(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function WN(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Hw(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ji(e){return ba(e).getComputedStyle(e)}function sF(e){return["table","td","th"].indexOf(pi(e))>=0}function js(e){return((Ml(e)?e.ownerDocument:e.document)||window.document).documentElement}function rv(e){return pi(e)==="html"?e:e.assignedSlot||e.parentNode||(Hw(e)?e.host:null)||js(e)}function LT(e){return!la(e)||ji(e).position==="fixed"?null:e.offsetParent}function lF(e){var t=/firefox/i.test(hb()),n=/Trident/i.test(hb());if(n&&la(e)){var r=ji(e);if(r.position==="fixed")return null}var o=rv(e);for(Hw(o)&&(o=o.host);la(o)&&["html","body"].indexOf(pi(o))<0;){var a=ji(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function vf(e){for(var t=ba(e),n=LT(e);n&&sF(n)&&ji(n).position==="static";)n=LT(n);return n&&(pi(n)==="html"||pi(n)==="body"&&ji(n).position==="static")?t:n||lF(e)||t}function Gw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Zd(e,t,n){return kl(e,Fm(t,n))}function cF(e,t,n){var r=Zd(e,t,n);return r>n?n:r}function HN(){return{top:0,right:0,bottom:0,left:0}}function VN(e){return Object.assign({},HN(),e)}function GN(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var uF=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,VN(typeof t!="number"?t:GN(t,gf))};function dF(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,l=ii(n.placement),c=Gw(l),u=[$o,ma].indexOf(l)>=0,d=u?"height":"width";if(!(!a||!s)){var p=uF(o.padding,n),h=Vw(a),m=c==="y"?No:$o,b=c==="y"?ha:ma,y=n.rects.reference[d]+n.rects.reference[c]-s[c]-n.rects.popper[d],g=s[c]-n.rects.reference[c],x=vf(a),v=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,S=y/2-g/2,E=p[m],R=v-h[d]-p[b],A=v/2-h[d]/2+S,_=Zd(E,A,R),N=c;n.modifiersData[r]=(t={},t[N]=_,t.centerOffset=_-A,t)}}function pF(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||!WN(t.elements.popper,o)||(t.elements.arrow=o))}var fF={name:"arrow",enabled:!0,phase:"main",fn:dF,effect:pF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function iu(e){return e.split("-")[1]}var hF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mF(e){var t=e.x,n=e.y,r=window,o=r.devicePixelRatio||1;return{x:ou(t*o)/o||0,y:ou(n*o)/o||0}}function MT(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,h=s.x,m=h===void 0?0:h,b=s.y,y=b===void 0?0:b,g=typeof d=="function"?d({x:m,y}):{x:m,y};m=g.x,y=g.y;var x=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),S=$o,E=No,R=window;if(u){var A=vf(n),_="clientHeight",N="clientWidth";if(A===ba(n)&&(A=js(n),ji(A).position!=="static"&&l==="absolute"&&(_="scrollHeight",N="scrollWidth")),A=A,o===No||(o===$o||o===ma)&&a===Ip){E=ha;var k=p&&A===R&&R.visualViewport?R.visualViewport.height:A[_];y-=k-r.height,y*=c?1:-1}if(o===$o||(o===No||o===ha)&&a===Ip){S=ma;var I=p&&A===R&&R.visualViewport?R.visualViewport.width:A[N];m-=I-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&hF),L=d===!0?mF({x:m,y}):{x:m,y};if(m=L.x,y=L.y,c){var q;return Object.assign({},O,(q={},q[E]=v?"0":"",q[S]=x?"0":"",q.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",q))}return Object.assign({},O,(t={},t[E]=v?y+"px":"",t[S]=x?m+"px":"",t.transform="",t))}function gF(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,s=a===void 0?!0:a,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:ii(t.placement),variation:iu(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,MT(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,MT(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var vF={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gF,data:{}},fh={passive:!0};function yF(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,c=ba(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(d){d.addEventListener("scroll",n.update,fh)}),l&&c.addEventListener("resize",n.update,fh),function(){a&&u.forEach(function(d){d.removeEventListener("scroll",n.update,fh)}),l&&c.removeEventListener("resize",n.update,fh)}}var bF={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yF,data:{}},xF={left:"right",right:"left",bottom:"top",top:"bottom"};function lm(e){return e.replace(/left|right|bottom|top/g,function(t){return xF[t]})}var wF={start:"end",end:"start"};function BT(e){return e.replace(/start|end/g,function(t){return wF[t]})}function qw(e){var t=ba(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Yw(e){return au(js(e)).left+qw(e).scrollLeft}function SF(e,t){var n=ba(e),r=js(e),o=n.visualViewport,a=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){a=o.width,s=o.height;var u=UN();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:l+Yw(e),y:c}}function CF(e){var t,n=js(e),r=qw(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=kl(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=kl(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Yw(e),c=-r.scrollTop;return ji(o||n).direction==="rtl"&&(l+=kl(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:l,y:c}}function Kw(e){var t=ji(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function qN(e){return["html","body","#document"].indexOf(pi(e))>=0?e.ownerDocument.body:la(e)&&Kw(e)?e:qN(rv(e))}function ep(e,t){var n;t===void 0&&(t=[]);var r=qN(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=ba(r),s=o?[a].concat(a.visualViewport||[],Kw(r)?r:[]):r,l=t.concat(s);return o?l:l.concat(ep(rv(s)))}function mb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function EF(e,t){var n=au(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function FT(e,t,n){return t===zN?mb(SF(e,n)):Ml(t)?EF(t,n):mb(CF(js(e)))}function TF(e){var t=ep(rv(e)),n=["absolute","fixed"].indexOf(ji(e).position)>=0,r=n&&la(e)?vf(e):e;return Ml(r)?t.filter(function(o){return Ml(o)&&WN(o,r)&&pi(o)!=="body"}):[]}function RF(e,t,n,r){var o=t==="clippingParents"?TF(e):[].concat(t),a=[].concat(o,[n]),s=a[0],l=a.reduce(function(c,u){var d=FT(e,u,r);return c.top=kl(d.top,c.top),c.right=Fm(d.right,c.right),c.bottom=Fm(d.bottom,c.bottom),c.left=kl(d.left,c.left),c},FT(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function YN(e){var t=e.reference,n=e.element,r=e.placement,o=r?ii(r):null,a=r?iu(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case No:c={x:s,y:t.y-n.height};break;case ha:c={x:s,y:t.y+t.height};break;case ma:c={x:t.x+t.width,y:l};break;case $o:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?Gw(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(a){case ru:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Ip:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ap(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,l=n.boundary,c=l===void 0?G8:l,u=n.rootBoundary,d=u===void 0?zN:u,p=n.elementContext,h=p===void 0?sd:p,m=n.altBoundary,b=m===void 0?!1:m,y=n.padding,g=y===void 0?0:y,x=VN(typeof g!="number"?g:GN(g,gf)),v=h===sd?q8:sd,S=e.rects.popper,E=e.elements[b?v:h],R=RF(Ml(E)?E:E.contextElement||js(e.elements.popper),c,d,s),A=au(e.elements.reference),_=YN({reference:A,element:S,strategy:"absolute",placement:o}),N=mb(Object.assign({},S,_)),k=h===sd?N:A,I={top:R.top-k.top+x.top,bottom:k.bottom-R.bottom+x.bottom,left:R.left-k.left+x.left,right:k.right-R.right+x.right},O=e.modifiersData.offset;if(h===sd&&O){var L=O[o];Object.keys(I).forEach(function(q){var D=[ma,ha].indexOf(q)>=0?1:-1,H=[No,ha].indexOf(q)>=0?"y":"x";I[q]+=L[H]*D})}return I}function kF(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?jN:c,d=iu(r),p=d?l?DT:DT.filter(function(b){return iu(b)===d}):gf,h=p.filter(function(b){return u.indexOf(b)>=0});h.length===0&&(h=p);var m=h.reduce(function(b,y){return b[y]=Ap(e,{placement:y,boundary:o,rootBoundary:a,padding:s})[ii(y)],b},{});return Object.keys(m).sort(function(b,y){return m[b]-m[y]})}function _F(e){if(ii(e)===Ww)return[];var t=lm(e);return[BT(e),t,BT(t)]}function IF(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,u=n.padding,d=n.boundary,p=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,b=m===void 0?!0:m,y=n.allowedAutoPlacements,g=t.options.placement,x=ii(g),v=x===g,S=c||(v||!b?[lm(g)]:_F(g)),E=[g].concat(S).reduce(function(pe,ye){return pe.concat(ii(ye)===Ww?kF(t,{placement:ye,boundary:d,rootBoundary:p,padding:u,flipVariations:b,allowedAutoPlacements:y}):ye)},[]),R=t.rects.reference,A=t.rects.popper,_=new Map,N=!0,k=E[0],I=0;I<E.length;I++){var O=E[I],L=ii(O),q=iu(O)===ru,D=[No,ha].indexOf(L)>=0,H=D?"width":"height",U=Ap(t,{placement:O,boundary:d,rootBoundary:p,altBoundary:h,padding:u}),Z=D?q?ma:$o:q?ha:No;R[H]>A[H]&&(Z=lm(Z));var G=lm(Z),B=[];if(a&&B.push(U[L]<=0),l&&B.push(U[Z]<=0,U[G]<=0),B.every(function(pe){return pe})){k=O,N=!1;break}_.set(O,B)}if(N)for(var Y=b?3:1,K=function(ye){var ae=E.find(function(oe){var ue=_.get(oe);if(ue)return ue.slice(0,ye).every(function(ge){return ge})});if(ae)return k=ae,"break"},Q=Y;Q>0;Q--){var re=K(Q);if(re==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}var AF={name:"flip",enabled:!0,phase:"main",fn:IF,requiresIfExists:["offset"],data:{_skip:!1}};function zT(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function jT(e){return[No,ma,ha,$o].some(function(t){return e[t]>=0})}function NF(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ap(t,{elementContext:"reference"}),l=Ap(t,{altBoundary:!0}),c=zT(s,r),u=zT(l,o,a),d=jT(c),p=jT(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}var $F={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NF};function PF(e,t,n){var r=ii(e),o=[$o,No].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],l=a[1];return s=s||0,l=(l||0)*o,[$o,ma].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function OF(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,s=jN.reduce(function(d,p){return d[p]=PF(p,t.rects,a),d},{}),l=s[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}var DF={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:OF};function LF(e){var t=e.state,n=e.name;t.modifiersData[n]=YN({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var MF={name:"popperOffsets",enabled:!0,phase:"read",fn:LF,data:{}};function BF(e){return e==="x"?"y":"x"}function FF(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,p=n.padding,h=n.tether,m=h===void 0?!0:h,b=n.tetherOffset,y=b===void 0?0:b,g=Ap(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),x=ii(t.placement),v=iu(t.placement),S=!v,E=Gw(x),R=BF(E),A=t.modifiersData.popperOffsets,_=t.rects.reference,N=t.rects.popper,k=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,I=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(!!A){if(a){var q,D=E==="y"?No:$o,H=E==="y"?ha:ma,U=E==="y"?"height":"width",Z=A[E],G=Z+g[D],B=Z-g[H],Y=m?-N[U]/2:0,K=v===ru?_[U]:N[U],Q=v===ru?-N[U]:-_[U],re=t.elements.arrow,pe=m&&re?Vw(re):{width:0,height:0},ye=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:HN(),ae=ye[D],oe=ye[H],ue=Zd(0,_[U],pe[U]),ge=S?_[U]/2-Y-ue-ae-I.mainAxis:K-ue-ae-I.mainAxis,_e=S?-_[U]/2+Y+ue+oe+I.mainAxis:Q+ue+oe+I.mainAxis,We=t.elements.arrow&&vf(t.elements.arrow),be=We?E==="y"?We.clientTop||0:We.clientLeft||0:0,he=(q=O==null?void 0:O[E])!=null?q:0,He=Z+ge-he-be,Pe=Z+_e-he,pt=Zd(m?Fm(G,He):G,Z,m?kl(B,Pe):B);A[E]=pt,L[E]=pt-Z}if(l){var St,Ut=E==="x"?No:$o,zt=E==="x"?ha:ma,gt=A[R],Et=R==="y"?"height":"width",Qt=gt+g[Ut],In=gt-g[zt],ke=[No,$o].indexOf(x)!==-1,Fe=(St=O==null?void 0:O[R])!=null?St:0,Ge=ke?Qt:gt-_[Et]-N[Et]-Fe+I.altAxis,$e=ke?gt+_[Et]+N[Et]-Fe-I.altAxis:In,te=m&&ke?cF(Ge,gt,$e):Zd(m?Ge:Qt,gt,m?$e:In);A[R]=te,L[R]=te-gt}t.modifiersData[r]=L}}var zF={name:"preventOverflow",enabled:!0,phase:"main",fn:FF,requiresIfExists:["offset"]};function jF(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function UF(e){return e===ba(e)||!la(e)?qw(e):jF(e)}function WF(e){var t=e.getBoundingClientRect(),n=ou(t.width)/e.offsetWidth||1,r=ou(t.height)/e.offsetHeight||1;return n!==1||r!==1}function HF(e,t,n){n===void 0&&(n=!1);var r=la(t),o=la(t)&&WF(t),a=js(t),s=au(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((pi(t)!=="body"||Kw(a))&&(l=UF(t)),la(t)?(c=au(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Yw(a))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function VF(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function GF(e){var t=VF(e);return rF.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function qF(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function YF(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var UT={placement:"bottom",modifiers:[],strategy:"absolute"};function WT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function KF(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?UT:o;return function(l,c,u){u===void 0&&(u=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},UT,a),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},p=[],h=!1,m={state:d,setOptions:function(x){var v=typeof x=="function"?x(d.options):x;y(),d.options=Object.assign({},a,d.options,v),d.scrollParents={reference:Ml(l)?ep(l):l.contextElement?ep(l.contextElement):[],popper:ep(c)};var S=GF(YF([].concat(r,d.options.modifiers)));return d.orderedModifiers=S.filter(function(E){return E.enabled}),b(),m.update()},forceUpdate:function(){if(!h){var x=d.elements,v=x.reference,S=x.popper;if(!!WT(v,S)){d.rects={reference:HF(v,vf(S),d.options.strategy==="fixed"),popper:Vw(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(I){return d.modifiersData[I.name]=Object.assign({},I.data)});for(var E=0;E<d.orderedModifiers.length;E++){if(d.reset===!0){d.reset=!1,E=-1;continue}var R=d.orderedModifiers[E],A=R.fn,_=R.options,N=_===void 0?{}:_,k=R.name;typeof A=="function"&&(d=A({state:d,options:N,name:k,instance:m})||d)}}}},update:qF(function(){return new Promise(function(g){m.forceUpdate(),g(d)})}),destroy:function(){y(),h=!0}};if(!WT(l,c))return m;m.setOptions(u).then(function(g){!h&&u.onFirstUpdate&&u.onFirstUpdate(g)});function b(){d.orderedModifiers.forEach(function(g){var x=g.name,v=g.options,S=v===void 0?{}:v,E=g.effect;if(typeof E=="function"){var R=E({state:d,name:x,instance:m,options:S}),A=function(){};p.push(R||A)}})}function y(){p.forEach(function(g){return g()}),p=[]}return m}}var XF=[bF,MF,vF,iF,DF,AF,zF,fF,$F],JF=KF({defaultModifiers:XF});function QF(e){return typeof e=="function"?e():e}const ZF=f.exports.forwardRef(function(t,n){const{children:r,container:o,disablePortal:a=!1}=t,[s,l]=f.exports.useState(null),c=Xt(f.exports.isValidElement(r)?r.ref:null,n);return Oo(()=>{a||l(QF(o)||document.body)},[o,a]),Oo(()=>{if(s&&!a)return nu(n,s),()=>{nu(n,null)}},[n,s,a]),a?f.exports.isValidElement(r)?f.exports.cloneElement(r,{ref:c}):r:s&&pg.exports.createPortal(r,s)});var Xw=ZF;function ez(e){return Xe("MuiPopperUnstyled",e)}Ke("MuiPopperUnstyled",["root"]);const tz=["anchorEl","children","component","components","componentsProps","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","TransitionProps"],nz=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function rz(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function gb(e){return typeof e=="function"?e():e}const oz=()=>Qe({root:["root"]},ez,{}),az={},iz=f.exports.forwardRef(function(t,n){var r;const{anchorEl:o,children:a,component:s,components:l={},componentsProps:c={},direction:u,disablePortal:d,modifiers:p,open:h,ownerState:m,placement:b,popperOptions:y,popperRef:g,TransitionProps:x}=t,v=Re(t,tz),S=f.exports.useRef(null),E=Xt(S,n),R=f.exports.useRef(null),A=Xt(R,g),_=f.exports.useRef(A);Oo(()=>{_.current=A},[A]),f.exports.useImperativeHandle(g,()=>R.current,[]);const N=rz(b,u),[k,I]=f.exports.useState(N);f.exports.useEffect(()=>{R.current&&R.current.forceUpdate()}),Oo(()=>{if(!o||!h)return;const H=G=>{I(G.placement)};gb(o);let U=[{name:"preventOverflow",options:{altBoundary:d}},{name:"flip",options:{altBoundary:d}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:G})=>{H(G)}}];p!=null&&(U=U.concat(p)),y&&y.modifiers!=null&&(U=U.concat(y.modifiers));const Z=JF(gb(o),S.current,T({placement:N},y,{modifiers:U}));return _.current(Z),()=>{Z.destroy(),_.current(null)}},[o,d,p,h,y,N]);const O={placement:k};x!==null&&(O.TransitionProps=x);const L=oz(),q=(r=s!=null?s:l.Root)!=null?r:"div",D=Na({elementType:q,externalSlotProps:c.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:E},ownerState:T({},t,m),className:L.root});return i(q,T({},D,{children:typeof a=="function"?a(O):a}))}),sz=f.exports.forwardRef(function(t,n){const{anchorEl:r,children:o,container:a,direction:s="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:u,open:d,placement:p="bottom",popperOptions:h=az,popperRef:m,style:b,transition:y=!1}=t,g=Re(t,nz),[x,v]=f.exports.useState(!0),S=()=>{v(!1)},E=()=>{v(!0)};if(!c&&!d&&(!y||x))return null;const R=a||(r?or(gb(r)).body:void 0);return i(Xw,{disablePortal:l,container:R,children:i(iz,T({anchorEl:r,direction:s,disablePortal:l,modifiers:u,ref:n,open:y?!x:d,placement:p,popperOptions:h,popperRef:m},g,{style:T({position:"fixed",top:0,left:0,display:!d&&c&&(!y||x)?"none":null},b),TransitionProps:y?{in:d,onEnter:S,onExited:E}:null,children:o}))})});var lz=sz;function cz(e){const t=or(e);return t.body===e?fa(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function tp(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function HT(e){return parseInt(fa(e).getComputedStyle(e).paddingRight,10)||0}function uz(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function VT(e,t,n,r=[],o){const a=[t,n,...r];[].forEach.call(e.children,s=>{const l=a.indexOf(s)===-1,c=!uz(s);l&&c&&tp(s,o)})}function _0(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function dz(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(cz(r)){const s=uN(or(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HT(r)+s}px`;const l=or(r).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${HT(c)+s}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=or(r).body;else{const s=r.parentElement,l=fa(r);a=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:s,property:l})=>{a?s.style.setProperty(l,a):s.style.removeProperty(l)})}}function pz(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class fz{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&tp(t.modalRef,!1);const o=pz(n);VT(n,t.mount,t.modalRef,o,!0);const a=_0(this.containers,s=>s.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=_0(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=dz(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=_0(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&tp(t.modalRef,n),VT(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&tp(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const hz=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function mz(e){const t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function gz(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function vz(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||gz(e))}function yz(e){const t=[],n=[];return Array.from(e.querySelectorAll(hz)).forEach((r,o)=>{const a=mz(r);a===-1||!vz(r)||(a===0?t.push(r):n.push({documentOrder:o,tabIndex:a,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function bz(){return!0}function xz(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:a=yz,isEnabled:s=bz,open:l}=e,c=f.exports.useRef(),u=f.exports.useRef(null),d=f.exports.useRef(null),p=f.exports.useRef(null),h=f.exports.useRef(null),m=f.exports.useRef(!1),b=f.exports.useRef(null),y=Xt(t.ref,b),g=f.exports.useRef(null);f.exports.useEffect(()=>{!l||!b.current||(m.current=!n)},[n,l]),f.exports.useEffect(()=>{if(!l||!b.current)return;const S=or(b.current);return b.current.contains(S.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),m.current&&b.current.focus()),()=>{o||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),f.exports.useEffect(()=>{if(!l||!b.current)return;const S=or(b.current),E=_=>{const{current:N}=b;if(N!==null){if(!S.hasFocus()||r||!s()||c.current){c.current=!1;return}if(!N.contains(S.activeElement)){if(_&&h.current!==_.target||S.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let O=[];if((S.activeElement===u.current||S.activeElement===d.current)&&(O=a(b.current)),O.length>0){var k,I;const L=Boolean(((k=g.current)==null?void 0:k.shiftKey)&&((I=g.current)==null?void 0:I.key)==="Tab"),q=O[0],D=O[O.length-1];L?D.focus():q.focus()}else N.focus()}}},R=_=>{g.current=_,!(r||!s()||_.key!=="Tab")&&S.activeElement===b.current&&_.shiftKey&&(c.current=!0,d.current.focus())};S.addEventListener("focusin",E),S.addEventListener("keydown",R,!0);const A=setInterval(()=>{S.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(A),S.removeEventListener("focusin",E),S.removeEventListener("keydown",R,!0)}},[n,r,o,s,l,a]);const x=S=>{p.current===null&&(p.current=S.relatedTarget),m.current=!0,h.current=S.target;const E=t.props.onFocus;E&&E(S)},v=S=>{p.current===null&&(p.current=S.relatedTarget),m.current=!0};return w(f.exports.Fragment,{children:[i("div",{tabIndex:l?0:-1,onFocus:v,ref:u,"data-testid":"sentinelStart"}),f.exports.cloneElement(t,{ref:y,onFocus:x}),i("div",{tabIndex:l?0:-1,onFocus:v,ref:d,"data-testid":"sentinelEnd"})]})}function wz(e){return Xe("MuiModal",e)}Ke("MuiModal",["root","hidden"]);const Sz=["children","classes","closeAfterTransition","component","components","componentsProps","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited"],Cz=e=>{const{open:t,exited:n,classes:r}=e;return Qe({root:["root",!t&&n&&"hidden"]},wz,r)};function Ez(e){return typeof e=="function"?e():e}function Tz(e){return e.children?e.children.props.hasOwnProperty("in"):!1}const Rz=new fz,kz=f.exports.forwardRef(function(t,n){var r;const{children:o,classes:a,closeAfterTransition:s=!1,component:l="div",components:c={},componentsProps:u={},container:d,disableAutoFocus:p=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:m=!1,disablePortal:b=!1,disableRestoreFocus:y=!1,disableScrollLock:g=!1,hideBackdrop:x=!1,keepMounted:v=!1,manager:S=Rz,onBackdropClick:E,onClose:R,onKeyDown:A,open:_,onTransitionEnter:N,onTransitionExited:k}=t,I=Re(t,Sz),[O,L]=f.exports.useState(!0),q=f.exports.useRef({}),D=f.exports.useRef(null),H=f.exports.useRef(null),U=Xt(H,n),Z=Tz(t),G=(r=t["aria-hidden"])!=null?r:!0,B=()=>or(D.current),Y=()=>(q.current.modalRef=H.current,q.current.mountNode=D.current,q.current),K=()=>{S.mount(Y(),{disableScrollLock:g}),H.current.scrollTop=0},Q=kr(()=>{const St=Ez(d)||B().body;S.add(Y(),St),H.current&&K()}),re=f.exports.useCallback(()=>S.isTopModal(Y()),[S]),pe=kr(St=>{D.current=St,St&&(_&&re()?K():tp(H.current,G))}),ye=f.exports.useCallback(()=>{S.remove(Y(),G)},[S,G]);f.exports.useEffect(()=>()=>{ye()},[ye]),f.exports.useEffect(()=>{_?Q():(!Z||!s)&&ye()},[_,ye,Z,s,Q]);const ae=T({},t,{classes:a,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:h,disableEscapeKeyDown:m,disablePortal:b,disableRestoreFocus:y,disableScrollLock:g,exited:O,hideBackdrop:x,keepMounted:v}),oe=Cz(ae),ue=()=>{L(!1),N&&N()},ge=()=>{L(!0),k&&k(),s&&ye()},_e=St=>{St.target===St.currentTarget&&(E&&E(St),R&&R(St,"backdropClick"))},We=St=>{A&&A(St),!(St.key!=="Escape"||!re())&&(m||(St.stopPropagation(),R&&R(St,"escapeKeyDown")))},be={};o.props.tabIndex===void 0&&(be.tabIndex="-1"),Z&&(be.onEnter=Mm(ue,o.props.onEnter),be.onExited=Mm(ge,o.props.onExited));const he=c.Root||l,He=Na({elementType:he,externalSlotProps:u.root,externalForwardedProps:I,additionalProps:{ref:U,role:"presentation",onKeyDown:We},className:oe.root,ownerState:ae}),Pe=c.Backdrop,pt=Na({elementType:Pe,externalSlotProps:u.backdrop,additionalProps:{"aria-hidden":!0,onClick:_e,open:_},ownerState:ae});return!v&&!_&&(!Z||O)?null:i(Xw,{ref:pe,container:d,disablePortal:b,children:w(he,T({},He,{children:[!x&&Pe?i(Pe,T({},pt)):null,i(xz,{disableEnforceFocus:h,disableAutoFocus:p,disableRestoreFocus:y,isEnabled:re,open:_,children:f.exports.cloneElement(o,be)})]}))})});var _z=kz;function Nd(e){return Xe("MuiSlider",e)}const Iz=Ke("MuiSlider",["root","active","focusVisible","disabled","dragging","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","markLabelActive","thumb","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel"]);var cm=Iz;const Az=e=>{const{open:t}=e;return{offset:Ce(t&&cm.valueLabelOpen),circle:cm.valueLabelCircle,label:cm.valueLabelLabel}};function KN(e){const{children:t,className:n,value:r,theme:o}=e,a=Az(e);return f.exports.cloneElement(t,{className:Ce(t.props.className)},w(f.exports.Fragment,{children:[t.props.children,i("span",{className:Ce(a.offset,n),theme:o,"aria-hidden":!0,children:i("span",{className:a.circle,children:i("span",{className:a.label,children:r})})})]}))}const Nz=2;function XN(e,t){return e-t}function ld(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function GT(e,t){var n;const{index:r}=(n=e.reduce((o,a,s)=>{const l=Math.abs(t-a);return o===null||l<o.distance||l===o.distance?{distance:l,index:s}:o},null))!=null?n:{};return r}function hh(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function zm(e,t,n){return(e-t)*100/(n-t)}function $z(e,t,n){return(n-t)*e+t}function Pz(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Oz(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Pz(t)))}function qT({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(XN)}function mh({sliderRef:e,activeIndex:t,setActive:n}){var r,o;const a=or(e.current);if(!((r=e.current)!=null&&r.contains(a.activeElement))||Number(a==null||(o=a.activeElement)==null?void 0:o.getAttribute("data-index"))!==t){var s;(s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()}n&&n(t)}const Dz={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Lz=e=>e;let gh;function I0(){return gh===void 0&&(typeof CSS!="undefined"&&typeof CSS.supports=="function"?gh=CSS.supports("touch-action","none"):gh=!0),gh}function Mz(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:a=!1,marks:s=!1,max:l=100,min:c=0,name:u,onChange:d,onChangeCommitted:p,orientation:h="horizontal",ref:m,scale:b=Lz,step:y=1,tabIndex:g,value:x}=e,v=f.exports.useRef(),[S,E]=f.exports.useState(-1),[R,A]=f.exports.useState(-1),[_,N]=f.exports.useState(!1),k=f.exports.useRef(0),[I,O]=Oa({controlled:x,default:n!=null?n:c,name:"Slider"}),L=d&&((ke,Fe,Ge)=>{const $e=ke.nativeEvent||ke,te=new $e.constructor($e.type,$e);Object.defineProperty(te,"target",{writable:!0,value:{value:Fe,name:u}}),d(te,Fe,Ge)}),q=Array.isArray(I);let D=q?I.slice().sort(XN):[I];D=D.map(ke=>ld(ke,c,l));const H=s===!0&&y!==null?[...Array(Math.floor((l-c)/y)+1)].map((ke,Fe)=>({value:c+y*Fe})):s||[],U=H.map(ke=>ke.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:B,ref:Y}=df(),[K,Q]=f.exports.useState(-1),re=f.exports.useRef(),pe=Xt(Y,re),ye=Xt(m,pe),ae=ke=>Fe=>{var Ge;const $e=Number(Fe.currentTarget.getAttribute("data-index"));B(Fe),Z.current===!0&&Q($e),A($e),ke==null||(Ge=ke.onFocus)==null||Ge.call(ke,Fe)},oe=ke=>Fe=>{var Ge;G(Fe),Z.current===!1&&Q(-1),A(-1),ke==null||(Ge=ke.onBlur)==null||Ge.call(ke,Fe)};Oo(()=>{if(r&&re.current.contains(document.activeElement)){var ke;(ke=document.activeElement)==null||ke.blur()}},[r]),r&&S!==-1&&E(-1),r&&K!==-1&&Q(-1);const ue=ke=>Fe=>{var Ge;(Ge=ke.onChange)==null||Ge.call(ke,Fe);const $e=Number(Fe.currentTarget.getAttribute("data-index")),te=D[$e],Ee=U.indexOf(te);let me=Fe.target.valueAsNumber;if(H&&y==null&&(me=me<te?U[Ee-1]:U[Ee+1]),me=ld(me,c,l),H&&y==null){const je=U.indexOf(D[$e]);me=me<D[$e]?U[je-1]:U[je+1]}if(q){o&&(me=ld(me,D[$e-1]||-1/0,D[$e+1]||1/0));const je=me;me=qT({values:D,newValue:me,index:$e});let ut=$e;o||(ut=me.indexOf(je)),mh({sliderRef:re,activeIndex:ut})}O(me),Q($e),L&&L(Fe,me,$e),p&&p(Fe,me)},ge=f.exports.useRef();let _e=h;a&&h==="horizontal"&&(_e+="-reverse");const We=({finger:ke,move:Fe=!1,values:Ge})=>{const{current:$e}=re,{width:te,height:Ee,bottom:me,left:je}=$e.getBoundingClientRect();let ut;_e.indexOf("vertical")===0?ut=(me-ke.y)/Ee:ut=(ke.x-je)/te,_e.indexOf("-reverse")!==-1&&(ut=1-ut);let kt;if(kt=$z(ut,c,l),y)kt=Oz(kt,y,c);else{const Wn=GT(U,kt);kt=U[Wn]}kt=ld(kt,c,l);let cn=0;if(q){Fe?cn=ge.current:cn=GT(Ge,kt),o&&(kt=ld(kt,Ge[cn-1]||-1/0,Ge[cn+1]||1/0));const Wn=kt;kt=qT({values:Ge,newValue:kt,index:cn}),o&&Fe||(cn=kt.indexOf(Wn),ge.current=cn)}return{newValue:kt,activeIndex:cn}},be=kr(ke=>{const Fe=hh(ke,v);if(!Fe)return;if(k.current+=1,ke.type==="mousemove"&&ke.buttons===0){he(ke);return}const{newValue:Ge,activeIndex:$e}=We({finger:Fe,move:!0,values:D});mh({sliderRef:re,activeIndex:$e,setActive:E}),O(Ge),!_&&k.current>Nz&&N(!0),L&&L(ke,Ge,$e)}),he=kr(ke=>{const Fe=hh(ke,v);if(N(!1),!Fe)return;const{newValue:Ge}=We({finger:Fe,move:!0,values:D});E(-1),ke.type==="touchend"&&A(-1),p&&p(ke,Ge),v.current=void 0,Pe()}),He=kr(ke=>{if(r)return;I0()||ke.preventDefault();const Fe=ke.changedTouches[0];Fe!=null&&(v.current=Fe.identifier);const Ge=hh(ke,v);if(Ge!==!1){const{newValue:te,activeIndex:Ee}=We({finger:Ge,values:D});mh({sliderRef:re,activeIndex:Ee,setActive:E}),O(te),L&&L(ke,te,Ee)}k.current=0;const $e=or(re.current);$e.addEventListener("touchmove",be),$e.addEventListener("touchend",he)}),Pe=f.exports.useCallback(()=>{const ke=or(re.current);ke.removeEventListener("mousemove",be),ke.removeEventListener("mouseup",he),ke.removeEventListener("touchmove",be),ke.removeEventListener("touchend",he)},[he,be]);f.exports.useEffect(()=>{const{current:ke}=re;return ke.addEventListener("touchstart",He,{passive:I0()}),()=>{ke.removeEventListener("touchstart",He,{passive:I0()}),Pe()}},[Pe,He]),f.exports.useEffect(()=>{r&&Pe()},[r,Pe]);const pt=ke=>Fe=>{var Ge;if((Ge=ke.onMouseDown)==null||Ge.call(ke,Fe),r||Fe.defaultPrevented||Fe.button!==0)return;Fe.preventDefault();const $e=hh(Fe,v);if($e!==!1){const{newValue:Ee,activeIndex:me}=We({finger:$e,values:D});mh({sliderRef:re,activeIndex:me,setActive:E}),O(Ee),L&&L(Fe,Ee,me)}k.current=0;const te=or(re.current);te.addEventListener("mousemove",be),te.addEventListener("mouseup",he)},St=zm(q?D[0]:c,c,l),Ut=zm(D[D.length-1],c,l)-St,zt=(ke={})=>{const Fe={onMouseDown:pt(ke||{})},Ge=T({},ke,Fe);return T({ref:ye},Ge)},gt=ke=>Fe=>{var Ge;(Ge=ke.onMouseOver)==null||Ge.call(ke,Fe);const $e=Number(Fe.currentTarget.getAttribute("data-index"));A($e)},Et=ke=>Fe=>{var Ge;(Ge=ke.onMouseLeave)==null||Ge.call(ke,Fe),A(-1)};return{active:S,axis:_e,axisProps:Dz,dragging:_,focusedThumbIndex:K,getHiddenInputProps:(ke={})=>{var Fe;const Ge={onChange:ue(ke||{}),onFocus:ae(ke||{}),onBlur:oe(ke||{})},$e=T({},ke,Ge);return T({tabIndex:g,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":b(l),"aria-valuemin":b(c),name:u,type:"range",min:e.min,max:e.max,step:(Fe=e.step)!=null?Fe:void 0,disabled:r},$e,{style:T({},c7,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:zt,getThumbProps:(ke={})=>{const Fe={onMouseOver:gt(ke||{}),onMouseLeave:Et(ke||{})};return T({},ke,Fe)},marks:H,open:R,range:q,trackLeap:Ut,trackOffset:St,values:D}}const Bz=["aria-label","aria-valuetext","className","component","classes","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","scale","step","tabIndex","track","value","valueLabelDisplay","valueLabelFormat","isRtl","components","componentsProps"],YT=e=>e,Fz=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:a,classes:s}=e;return Qe({root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse"],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},Nd,s)},zz=({children:e})=>e,jz=f.exports.forwardRef(function(t,n){var r,o,a,s,l,c,u;const{"aria-label":d,"aria-valuetext":p,className:h,component:m,classes:b,disableSwap:y=!1,disabled:g=!1,getAriaLabel:x,getAriaValueText:v,marks:S=!1,max:E=100,min:R=0,orientation:A="horizontal",scale:_=YT,step:N=1,track:k="normal",valueLabelDisplay:I="off",valueLabelFormat:O=YT,isRtl:L=!1,components:q={},componentsProps:D={}}=t,H=Re(t,Bz),U=T({},t,{marks:S,classes:b,disabled:g,isRtl:L,max:E,min:R,orientation:A,scale:_,step:N,track:k,valueLabelDisplay:I,valueLabelFormat:O}),{axisProps:Z,getRootProps:G,getHiddenInputProps:B,getThumbProps:Y,open:K,active:Q,axis:re,range:pe,focusedThumbIndex:ye,dragging:ae,marks:oe,values:ue,trackOffset:ge,trackLeap:_e}=Mz(T({},U,{ref:n}));U.marked=oe.length>0&&oe.some(te=>te.label),U.dragging=ae,U.focusedThumbIndex=ye;const We=Fz(U),be=(r=m!=null?m:q.Root)!=null?r:"span",he=Na({elementType:be,getSlotProps:G,externalSlotProps:D.root,externalForwardedProps:H,ownerState:U,className:[We.root,h]}),He=(o=q.Rail)!=null?o:"span",Pe=Na({elementType:He,externalSlotProps:D.rail,ownerState:U,className:We.rail}),pt=(a=q.Track)!=null?a:"span",St=Na({elementType:pt,externalSlotProps:D.track,additionalProps:{style:T({},Z[re].offset(ge),Z[re].leap(_e))},ownerState:U,className:We.track}),Ut=(s=q.Thumb)!=null?s:"span",zt=Na({elementType:Ut,getSlotProps:Y,externalSlotProps:D.thumb,ownerState:U}),gt=(l=q.ValueLabel)!=null?l:KN,Et=Na({elementType:gt,externalSlotProps:D.valueLabel,ownerState:U}),Qt=(c=q.Mark)!=null?c:"span",In=Na({elementType:Qt,externalSlotProps:D.mark,ownerState:U,className:We.mark}),ke=(u=q.MarkLabel)!=null?u:"span",Fe=Na({elementType:ke,externalSlotProps:D.markLabel,ownerState:U}),Ge=q.Input||"input",$e=Na({elementType:Ge,getSlotProps:B,externalSlotProps:D.input,ownerState:U});return w(be,T({},he,{children:[i(He,T({},Pe)),i(pt,T({},St)),oe.filter(te=>te.value>=R&&te.value<=E).map((te,Ee)=>{const me=zm(te.value,R,E),je=Z[re].offset(me);let ut;return k===!1?ut=ue.indexOf(te.value)!==-1:ut=k==="normal"&&(pe?te.value>=ue[0]&&te.value<=ue[ue.length-1]:te.value<=ue[0])||k==="inverted"&&(pe?te.value<=ue[0]||te.value>=ue[ue.length-1]:te.value>=ue[0]),w(f.exports.Fragment,{children:[i(Qt,T({"data-index":Ee},In,!ai(Qt)&&{markActive:ut},{style:T({},je,In.style),className:Ce(In.className,ut&&We.markActive)})),te.label!=null?i(ke,T({"aria-hidden":!0,"data-index":Ee},Fe,!ai(ke)&&{markLabelActive:ut},{style:T({},je,Fe.style),className:Ce(We.markLabel,Fe.className,ut&&We.markLabelActive),children:te.label})):null]},te.value)}),ue.map((te,Ee)=>{const me=zm(te,R,E),je=Z[re].offset(me),ut=I==="off"?zz:gt;return i(f.exports.Fragment,{children:i(ut,T({},!ai(ut)&&{valueLabelFormat:O,valueLabelDisplay:I,value:typeof O=="function"?O(_(te),Ee):O,index:Ee,open:K===Ee||Q===Ee||I==="on",disabled:g},Et,{className:Ce(We.valueLabel,Et.className),children:i(Ut,T({"data-index":Ee,"data-focusvisible":ye===Ee},zt,{className:Ce(We.thumb,zt.className,Q===Ee&&We.active,ye===Ee&&We.focusVisible),style:T({},je,{pointerEvents:y&&Q!==Ee?"none":void 0},zt.style),children:i(Ge,T({"data-index":Ee,"aria-label":x?x(Ee):d,"aria-valuenow":_(te),"aria-valuetext":v?v(_(te),Ee):p,value:ue[Ee]},$e))}))}))},Ee)})]}))});var Uz=jz;const Wz=["onChange","maxRows","minRows","style","value"];function vh(e,t){return parseInt(e[t],10)||0}const Hz={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function KT(e){return e==null||Object.keys(e).length===0}const Vz=f.exports.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:a=1,style:s,value:l}=t,c=Re(t,Wz),{current:u}=f.exports.useRef(l!=null),d=f.exports.useRef(null),p=Xt(n,d),h=f.exports.useRef(null),m=f.exports.useRef(0),[b,y]=f.exports.useState({}),g=f.exports.useCallback(()=>{const R=d.current,_=fa(R).getComputedStyle(R);if(_.width==="0px")return{};const N=h.current;N.style.width=_.width,N.value=R.value||t.placeholder||"x",N.value.slice(-1)===`
`&&(N.value+=" ");const k=_["box-sizing"],I=vh(_,"padding-bottom")+vh(_,"padding-top"),O=vh(_,"border-bottom-width")+vh(_,"border-top-width"),L=N.scrollHeight;N.value="x";const q=N.scrollHeight;let D=L;a&&(D=Math.max(Number(a)*q,D)),o&&(D=Math.min(Number(o)*q,D)),D=Math.max(D,q);const H=D+(k==="border-box"?I+O:0),U=Math.abs(D-L)<=1;return{outerHeightStyle:H,overflow:U}},[o,a,t.placeholder]),x=(R,A)=>{const{outerHeightStyle:_,overflow:N}=A;return m.current<20&&(_>0&&Math.abs((R.outerHeightStyle||0)-_)>1||R.overflow!==N)?(m.current+=1,{overflow:N,outerHeightStyle:_}):R},v=f.exports.useCallback(()=>{const R=g();KT(R)||y(A=>x(A,R))},[g]),S=()=>{const R=g();KT(R)||pg.exports.flushSync(()=>{y(A=>x(A,R))})};f.exports.useEffect(()=>{const R=Ll(()=>{m.current=0,d.current&&S()}),A=fa(d.current);A.addEventListener("resize",R);let _;return typeof ResizeObserver!="undefined"&&(_=new ResizeObserver(R),_.observe(d.current)),()=>{R.clear(),A.removeEventListener("resize",R),_&&_.disconnect()}}),Oo(()=>{v()}),f.exports.useEffect(()=>{m.current=0},[l]);const E=R=>{m.current=0,u||v(),r&&r(R)};return w(f.exports.Fragment,{children:[i("textarea",T({value:l,onChange:E,ref:p,rows:a,style:T({height:b.outerHeightStyle,overflow:b.overflow?"hidden":null},s)},c)),i("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:T({},Hz.shadow,s,{padding:0})})]})});var Gz=Vz;function qz(e,t){return T({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Yz=["mode","contrastThreshold","tonalOffset"],XT={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ep.white,default:Ep.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A0={text:{primary:Ep.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ep.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function JT(e,t,n,r){const o=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=nn(e.main,o):t==="dark"&&(e.dark=tn(e.main,a)))}function Kz(e="light"){return e==="dark"?{main:hc[200],light:hc[50],dark:hc[400]}:{main:hc[700],light:hc[400],dark:hc[800]}}function Xz(e="light"){return e==="dark"?{main:fc[200],light:fc[50],dark:fc[400]}:{main:fc[500],light:fc[300],dark:fc[700]}}function Jz(e="light"){return e==="dark"?{main:pc[500],light:pc[300],dark:pc[700]}:{main:pc[700],light:pc[400],dark:pc[800]}}function Qz(e="light"){return e==="dark"?{main:mc[400],light:mc[300],dark:mc[700]}:{main:mc[700],light:mc[500],dark:mc[900]}}function Zz(e="light"){return e==="dark"?{main:gc[400],light:gc[300],dark:gc[700]}:{main:gc[800],light:gc[500],dark:gc[900]}}function ej(e="light"){return e==="dark"?{main:od[400],light:od[300],dark:od[700]}:{main:"#ed6c02",light:od[500],dark:od[900]}}function tj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=Re(e,Yz),a=e.primary||Kz(t),s=e.secondary||Xz(t),l=e.error||Jz(t),c=e.info||Qz(t),u=e.success||Zz(t),d=e.warning||ej(t);function p(y){return BN(y,A0.text.primary)>=n?A0.text.primary:XT.text.primary}const h=({color:y,name:g,mainShade:x=500,lightShade:v=300,darkShade:S=700})=>{if(y=T({},y),!y.main&&y[x]&&(y.main=y[x]),!y.hasOwnProperty("main"))throw new Error(Go(11,g?` (${g})`:"",x));if(typeof y.main!="string")throw new Error(Go(12,g?` (${g})`:"",JSON.stringify(y.main)));return JT(y,"light",v,r),JT(y,"dark",S,r),y.contrastText||(y.contrastText=p(y.main)),y},m={dark:A0,light:XT};return vo(T({common:T({},Ep),mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:u,name:"success"}),grey:yL,contrastThreshold:n,getContrastText:p,augmentColor:h,tonalOffset:r},m[t]),o)}const nj=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function rj(e){return Math.round(e*1e5)/1e5}const QT={textTransform:"uppercase"},ZT='"Roboto", "Helvetica", "Arial", sans-serif';function JN(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=ZT,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:u=16,allVariants:d,pxToRem:p}=n,h=Re(n,nj),m=o/14,b=p||(x=>`${x/u*m}rem`),y=(x,v,S,E,R)=>T({fontFamily:r,fontWeight:x,fontSize:b(v),lineHeight:S},r===ZT?{letterSpacing:`${rj(E/v)}em`}:{},R,d),g={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,QT),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,QT)};return vo(T({htmlFontSize:u,pxToRem:b,fontFamily:r,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:c},g),h,{clone:!1})}const oj=.2,aj=.14,ij=.12;function Qn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${oj})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${aj})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ij})`].join(",")}const sj=["none",Qn(0,2,1,-1,0,1,1,0,0,1,3,0),Qn(0,3,1,-2,0,2,2,0,0,1,5,0),Qn(0,3,3,-2,0,3,4,0,0,1,8,0),Qn(0,2,4,-1,0,4,5,0,0,1,10,0),Qn(0,3,5,-1,0,5,8,0,0,1,14,0),Qn(0,3,5,-1,0,6,10,0,0,1,18,0),Qn(0,4,5,-2,0,7,10,1,0,2,16,1),Qn(0,5,5,-3,0,8,10,1,0,3,14,2),Qn(0,5,6,-3,0,9,12,1,0,3,16,2),Qn(0,6,6,-3,0,10,14,1,0,4,18,3),Qn(0,6,7,-4,0,11,15,1,0,4,20,3),Qn(0,7,8,-4,0,12,17,2,0,5,22,4),Qn(0,7,8,-4,0,13,19,2,0,5,24,4),Qn(0,7,9,-4,0,14,21,2,0,5,26,4),Qn(0,8,9,-5,0,15,22,2,0,6,28,5),Qn(0,8,10,-5,0,16,24,2,0,6,30,5),Qn(0,8,11,-5,0,17,26,2,0,6,32,5),Qn(0,9,11,-5,0,18,28,2,0,7,34,6),Qn(0,9,12,-6,0,19,29,2,0,7,36,6),Qn(0,10,13,-6,0,20,31,3,0,8,38,7),Qn(0,10,13,-6,0,21,33,3,0,8,40,7),Qn(0,10,14,-6,0,22,35,3,0,8,42,7),Qn(0,11,14,-7,0,23,36,3,0,9,44,8),Qn(0,11,15,-7,0,24,38,3,0,9,46,8)];var lj=sj;const cj=["duration","easing","delay"],QN={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Jw={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function eR(e){return`${Math.round(e)}ms`}function uj(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function dj(e){const t=T({},QN,e.easing),n=T({},Jw,e.duration);return T({getAutoHeightDuration:uj,create:(o=["all"],a={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:c=0}=a;return Re(a,cj),(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof s=="string"?s:eR(s)} ${l} ${typeof c=="string"?c:eR(c)}`).join(",")}},e,{easing:t,duration:n})}const pj={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var fj=pj;const hj=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Ui(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:a={}}=e,s=Re(e,hj);if(e.vars)throw new Error(Go(18));const l=tj(r),c=nv(e);let u=vo(c,{mixins:qz(c.breakpoints,n),palette:l,shadows:lj.slice(),typography:JN(l,a),transitions:dj(o),zIndex:T({},fj)});return u=vo(u,s),u=t.reduce((d,p)=>vo(d,p),u),u}function mj(...e){return Ui(...e)}function gj(e,...t){return Ui(vo({unstable_strictMode:!0},e),...t)}let tR=!1;function vj(e){return tR||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join(`
`)),tR=!0),e}function nR(e){return String(parseFloat(e)).length===String(e).length}function ZN(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function os(e){return parseFloat(e)}function yj(e){return(t,n)=>{const r=ZN(t);if(r===n)return t;let o=os(t);r!=="px"&&(r==="em"||r==="rem")&&(o=os(t)*os(e));let a=o;if(n!=="px")if(n==="em")a=o/os(e);else if(n==="rem")a=o/os(e);else return t;return parseFloat(a.toFixed(5))+n}}function bj({size:e,grid:t}){const n=e-e%t,r=n+t;return e-n<r-e?n:r}function xj({lineHeight:e,pixels:t,htmlFontSize:n}){return t/(e*n)}function wj({cssProperty:e,min:t,max:n,unit:r="rem",breakpoints:o=[600,900,1200],transform:a=null}){const s={[e]:`${t}${r}`},l=(n-t)/o[o.length-1];return o.forEach(c=>{let u=t+l*c;a!==null&&(u=a(u)),s[`@media (min-width:${c}px)`]={[e]:`${Math.round(u*1e4)/1e4}${r}`}}),s}function Sj(e,t={}){const{breakpoints:n=["sm","md","lg"],disableAlign:r=!1,factor:o=2,variants:a=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,s=T({},e);s.typography=T({},s.typography);const l=s.typography,c=yj(l.htmlFontSize),u=n.map(d=>s.breakpoints.values[d]);return a.forEach(d=>{const p=l[d],h=parseFloat(c(p.fontSize,"rem"));if(h<=1)return;const m=h,b=1+(m-1)/o;let{lineHeight:y}=p;if(!nR(y)&&!r)throw new Error(Go(6));nR(y)||(y=parseFloat(c(y,"rem"))/parseFloat(h));let g=null;r||(g=x=>bj({size:x,grid:xj({pixels:4,lineHeight:y,htmlFontSize:l.htmlFontSize})})),l[d]=T({},p,wj({cssProperty:"fontSize",min:b,max:m,unit:"rem",breakpoints:u,transform:g}))}),s}const Cj=Ui();var ov=Cj;function pn(){return zs(ov)}function Je({props:e,name:t}){return DN({props:e,name:t,defaultTheme:ov})}const Qo=e=>Qd(e)&&e!=="classes",Qw=Qd,Ej=PN({defaultTheme:ov,rootShouldForwardProp:Qo});var z=Ej;function Tj(){throw new Error(Go(14))}function Rj(){throw new Error(Go(15))}function kj(){throw new Error(Go(16))}function _j(e){return Xe("MuiPaper",e)}Ke("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Ij=["className","component","elevation","square","variant"],vb=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},Aj=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Qe(a,_j,o)},Nj=z("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return T({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&T({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${$t("#fff",vb(t.elevation))}, ${$t("#fff",vb(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),$j=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiPaper"}),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation"}=r,u=Re(r,Ij),d=T({},r,{component:a,elevation:s,square:l,variant:c}),p=Aj(d);return i(Nj,T({as:a,ownerState:d,className:Ce(p.root,o),ref:n},u))});var yr=$j;const Pj=["colorSchemes","cssVarPrefix"],Oj=["palette"],Dj=[...Array(25)].map((e,t)=>{if(t===0)return;const n=vb(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Lj(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function xe(e,t,n){e[t]=e[t]||n}const Mj=(e="mui")=>_8(e);function e4(e={},...t){var n,r,o,a,s,l;const{colorSchemes:c={},cssVarPrefix:u="mui"}=e,d=Re(e,Pj),p=Mj(u),h=Ui(T({},d,c.light&&{palette:(n=c.light)==null?void 0:n.palette})),{palette:m}=h,b=Re(h,Oj),{palette:y}=Ui({palette:T({mode:"dark"},(r=c.dark)==null?void 0:r.palette)});let g=T({},b,{cssVarPrefix:u,getCssVar:p,colorSchemes:T({},c,{light:T({},c.light,{palette:m,opacity:T({inputPlaceholder:.42,inputUnderline:.42,switchTrackDisabled:.12,switchTrack:.38},(o=c.light)==null?void 0:o.opacity),overlays:((a=c.light)==null?void 0:a.overlays)||[]}),dark:T({},c.dark,{palette:y,opacity:T({inputPlaceholder:.5,inputUnderline:.7,switchTrackDisabled:.2,switchTrack:.3},(s=c.dark)==null?void 0:s.opacity),overlays:((l=c.dark)==null?void 0:l.overlays)||Dj})})});return Object.keys(g.colorSchemes).forEach(x=>{const v=g.colorSchemes[x].palette;if(x==="light"?(xe(v.common,"background","#fff"),xe(v.common,"onBackground","#000")):(xe(v.common,"background","#000"),xe(v.common,"onBackground","#fff")),Lj(v,["Alert","AppBar","Avatar","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x==="light"){xe(v.Alert,"errorColor",tn(v.error.light,.6)),xe(v.Alert,"infoColor",tn(v.info.light,.6)),xe(v.Alert,"successColor",tn(v.success.light,.6)),xe(v.Alert,"warningColor",tn(v.warning.light,.6)),xe(v.Alert,"errorFilledBg",p("palette-error-main")),xe(v.Alert,"infoFilledBg",p("palette-info-main")),xe(v.Alert,"successFilledBg",p("palette-success-main")),xe(v.Alert,"warningFilledBg",p("palette-warning-main")),xe(v.Alert,"errorFilledColor",m.getContrastText(v.error.main)),xe(v.Alert,"infoFilledColor",m.getContrastText(v.info.main)),xe(v.Alert,"successFilledColor",m.getContrastText(v.success.main)),xe(v.Alert,"warningFilledColor",m.getContrastText(v.warning.main)),xe(v.Alert,"errorStandardBg",nn(v.error.light,.9)),xe(v.Alert,"infoStandardBg",nn(v.info.light,.9)),xe(v.Alert,"successStandardBg",nn(v.success.light,.9)),xe(v.Alert,"warningStandardBg",nn(v.warning.light,.9)),xe(v.Alert,"errorIconColor",p("palette-error-light")),xe(v.Alert,"infoIconColor",p("palette-info-light")),xe(v.Alert,"successIconColor",p("palette-success-light")),xe(v.Alert,"warningIconColor",p("palette-warning-light")),xe(v.AppBar,"defaultBg",p("palette-grey-100")),xe(v.Avatar,"defaultBg",p("palette-grey-400")),xe(v.Chip,"defaultBorder",p("palette-grey-400")),xe(v.Chip,"defaultAvatarColor",p("palette-grey-700")),xe(v.Chip,"defaultIconColor",p("palette-grey-700")),xe(v.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),xe(v.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),xe(v.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),xe(v.LinearProgress,"primaryBg",nn(v.primary.main,.62)),xe(v.LinearProgress,"secondaryBg",nn(v.secondary.main,.62)),xe(v.LinearProgress,"errorBg",nn(v.error.main,.62)),xe(v.LinearProgress,"infoBg",nn(v.info.main,.62)),xe(v.LinearProgress,"successBg",nn(v.success.main,.62)),xe(v.LinearProgress,"warningBg",nn(v.warning.main,.62)),xe(v.Skeleton,"bg",`rgba(${p("palette-text-primaryChannel")} / 0.11)`),xe(v.Slider,"primaryTrack",nn(v.primary.main,.62)),xe(v.Slider,"secondaryTrack",nn(v.secondary.main,.62)),xe(v.Slider,"errorTrack",nn(v.error.main,.62)),xe(v.Slider,"infoTrack",nn(v.info.main,.62)),xe(v.Slider,"successTrack",nn(v.success.main,.62)),xe(v.Slider,"warningTrack",nn(v.warning.main,.62));const S=yl(v.background.default,.8);xe(v.SnackbarContent,"bg",S),xe(v.SnackbarContent,"color",m.getContrastText(S)),xe(v.SpeedDialAction,"fabHoverBg",yl(v.background.paper,.15)),xe(v.StepConnector,"border",p("palette-grey-400")),xe(v.StepContent,"border",p("palette-grey-400")),xe(v.Switch,"defaultColor",p("palette-common-white")),xe(v.Switch,"defaultDisabledColor",p("palette-grey-100")),xe(v.Switch,"primaryDisabledColor",nn(v.primary.main,.62)),xe(v.Switch,"secondaryDisabledColor",nn(v.secondary.main,.62)),xe(v.Switch,"errorDisabledColor",nn(v.error.main,.62)),xe(v.Switch,"infoDisabledColor",nn(v.info.main,.62)),xe(v.Switch,"successDisabledColor",nn(v.success.main,.62)),xe(v.Switch,"warningDisabledColor",nn(v.warning.main,.62)),xe(v.TableCell,"border",nn($t(v.divider,1),.88)),xe(v.Tooltip,"bg",$t(v.grey[700],.92))}else{xe(v.Alert,"errorColor",nn(v.error.light,.6)),xe(v.Alert,"infoColor",nn(v.info.light,.6)),xe(v.Alert,"successColor",nn(v.success.light,.6)),xe(v.Alert,"warningColor",nn(v.warning.light,.6)),xe(v.Alert,"errorFilledBg",p("palette-error-dark")),xe(v.Alert,"infoFilledBg",p("palette-info-dark")),xe(v.Alert,"successFilledBg",p("palette-success-dark")),xe(v.Alert,"warningFilledBg",p("palette-warning-dark")),xe(v.Alert,"errorFilledColor",y.getContrastText(v.error.dark)),xe(v.Alert,"infoFilledColor",y.getContrastText(v.info.dark)),xe(v.Alert,"successFilledColor",y.getContrastText(v.success.dark)),xe(v.Alert,"warningFilledColor",y.getContrastText(v.warning.dark)),xe(v.Alert,"errorStandardBg",tn(v.error.light,.9)),xe(v.Alert,"infoStandardBg",tn(v.info.light,.9)),xe(v.Alert,"successStandardBg",tn(v.success.light,.9)),xe(v.Alert,"warningStandardBg",tn(v.warning.light,.9)),xe(v.Alert,"errorIconColor",p("palette-error-main")),xe(v.Alert,"infoIconColor",p("palette-info-main")),xe(v.Alert,"successIconColor",p("palette-success-main")),xe(v.Alert,"warningIconColor",p("palette-warning-main")),xe(v.AppBar,"defaultBg",p("palette-grey-900")),xe(v.AppBar,"darkBg",p("palette-background-paper")),xe(v.AppBar,"darkColor",p("palette-text-primary")),xe(v.Avatar,"defaultBg",p("palette-grey-600")),xe(v.Chip,"defaultBorder",p("palette-grey-700")),xe(v.Chip,"defaultAvatarColor",p("palette-grey-300")),xe(v.Chip,"defaultIconColor",p("palette-grey-300")),xe(v.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),xe(v.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),xe(v.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),xe(v.LinearProgress,"primaryBg",tn(v.primary.main,.5)),xe(v.LinearProgress,"secondaryBg",tn(v.secondary.main,.5)),xe(v.LinearProgress,"errorBg",tn(v.error.main,.5)),xe(v.LinearProgress,"infoBg",tn(v.info.main,.5)),xe(v.LinearProgress,"successBg",tn(v.success.main,.5)),xe(v.LinearProgress,"warningBg",tn(v.warning.main,.5)),xe(v.Skeleton,"bg",`rgba(${p("palette-text-primaryChannel")} / 0.13)`),xe(v.Slider,"primaryTrack",tn(v.primary.main,.5)),xe(v.Slider,"secondaryTrack",tn(v.secondary.main,.5)),xe(v.Slider,"errorTrack",tn(v.error.main,.5)),xe(v.Slider,"infoTrack",tn(v.info.main,.5)),xe(v.Slider,"successTrack",tn(v.success.main,.5)),xe(v.Slider,"warningTrack",tn(v.warning.main,.5));const S=yl(v.background.default,.98);xe(v.SnackbarContent,"bg",S),xe(v.SnackbarContent,"color",y.getContrastText(S)),xe(v.SpeedDialAction,"fabHoverBg",yl(v.background.paper,.15)),xe(v.StepConnector,"border",p("palette-grey-600")),xe(v.StepContent,"border",p("palette-grey-600")),xe(v.Switch,"defaultColor",p("palette-grey-300")),xe(v.Switch,"defaultDisabledColor",p("palette-grey-600")),xe(v.Switch,"primaryDisabledColor",tn(v.primary.main,.55)),xe(v.Switch,"secondaryDisabledColor",tn(v.secondary.main,.55)),xe(v.Switch,"errorDisabledColor",tn(v.error.main,.55)),xe(v.Switch,"infoDisabledColor",tn(v.info.main,.55)),xe(v.Switch,"successDisabledColor",tn(v.success.main,.55)),xe(v.Switch,"warningDisabledColor",tn(v.warning.main,.55)),xe(v.TableCell,"border",tn($t(v.divider,1),.68)),xe(v.Tooltip,"bg",$t(v.grey[700],.92))}v.common.backgroundChannel=ka(v.common.background),v.common.onBackgroundChannel=ka(v.common.onBackground),v.dividerChannel=ka(v.divider),Object.keys(v).forEach(S=>{const E=v[S];E.main&&(v[S].mainChannel=ka(E.main)),E.light&&(v[S].lightChannel=ka(E.light)),E.dark&&(v[S].darkChannel=ka(E.dark)),E.contrastText&&(v[S].contrastTextChannel=ka(E.contrastText)),E.primary&&(v[S].primaryChannel=ka(E.primary)),E.secondary&&(v[S].secondaryChannel=ka(E.secondary)),E.active&&(v[S].activeChannel=ka(E.active)),E.selected&&(v[S].selectedChannel=ka(E.selected))})}),g=t.reduce((x,v)=>vo(x,v),g),g}const t4=e=>{var t;return!!e[0].match(/(typography|mixins|breakpoints|direction|transitions)/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))},Bj=e4(),{CssVarsProvider:Fj,useColorScheme:zj,getInitColorSchemeScript:jj}=k8({theme:Bj,attribute:"data-mui-color-scheme",modeStorageKey:"mui-mode",colorSchemeStorageKey:"mui-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>T({},e,{typography:JN(e.palette,e.typography)}),shouldSkipGeneratingVar:t4});var Uj=Object.freeze(Object.defineProperty({__proto__:null,adaptV4Theme:M8,hexToRgb:LN,rgbToHex:y8,hslToRgb:MN,decomposeColor:di,recomposeColor:mf,getContrastRatio:BN,getLuminance:Bm,emphasize:yl,alpha:$t,darken:tn,lighten:nn,css:Ms,keyframes:mi,experimental_sx:GB,createTheme:Ui,createMuiTheme:mj,unstable_createMuiStrictModeTheme:gj,createStyles:vj,unstable_getUnit:ZN,unstable_toUnitless:os,responsiveFontSizes:Sj,duration:Jw,easing:QN,useTheme:pn,useThemeProps:Je,styled:z,experimentalStyled:z,ThemeProvider:zw,StyledEngineProvider:GM,makeStyles:Tj,withStyles:Rj,withTheme:kj,experimental_extendTheme:e4,useColorScheme:zj,getInitColorSchemeScript:jj,shouldSkipGeneratingVar:t4,Experimental_CssVarsProvider:Fj},Symbol.toStringTag,{value:"Module"}));function Wj(e){return Xe("MuiSvgIcon",e)}Ke("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Hj=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Vj=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${se(t)}`,`fontSize${se(n)}`]};return Qe(o,Wj,r)},Gj=z("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${se(n.color)}`],t[`fontSize${se(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,a,s,l,c,u,d,p,h,m,b,y,g,x,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(o=e.transitions)==null||(a=o.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,20))||"1.25rem",medium:((c=e.typography)==null||(u=c.pxToRem)==null?void 0:u.call(c,24))||"1.5rem",large:((d=e.typography)==null||(p=d.pxToRem)==null?void 0:p.call(d,35))||"2.1875"}[t.fontSize],color:(h=(m=(e.vars||e).palette)==null||(b=m[t.color])==null?void 0:b.main)!=null?h:{action:(y=(e.vars||e).palette)==null||(g=y.action)==null?void 0:g.active,disabled:(x=(e.vars||e).palette)==null||(v=x.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),n4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:p,viewBox:h="0 0 24 24"}=r,m=Re(r,Hj),b=T({},r,{color:s,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h}),y={};d||(y.viewBox=h);const g=Vj(b);return w(Gj,T({as:l,className:Ce(g.root,a),ownerState:b,focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n},y,m,{children:[o,p?i("title",{children:p}):null]}))});n4.muiName="SvgIcon";var yb=n4;function et(e,t){const n=(r,o)=>i(yb,T({"data-testid":`${t}Icon`,ref:o},r,{children:e}));return n.muiName=yb.muiName,f.exports.memo(f.exports.forwardRef(n))}const qj={configure:e=>{console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
`)),Aw.configure(e)}};var Yj=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:qj,capitalize:se,createChainedFunction:Mm,createSvgIcon:et,debounce:Ll,deprecatedPropType:JM,isMuiElement:Xd,ownerDocument:or,ownerWindow:fa,requirePropFactory:QM,setRef:nu,unstable_useEnhancedEffect:Oo,unstable_useId:Eu,unsupportedProp:t7,useControlled:Oa,useEventCallback:kr,useForkRef:Xt,useIsFocusVisible:df},Symbol.toStringTag,{value:"Module"}));function bb(e,t){return bb=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},bb(e,t)}function r4(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bb(e,t)}var rR={disabled:!1},jm=hr.createContext(null),Kj=function(t){return t.scrollTop},$d="unmounted",ol="exited",al="entering",Rc="entered",xb="exiting",Ki=function(e){r4(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,c;return a.appearStatus=null,r.in?l?(c=ol,a.appearStatus=al):c=Rc:r.unmountOnExit||r.mountOnEnter?c=$d:c=ol,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var s=o.in;return s&&a.status===$d?{status:ol}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var a=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==al&&s!==Rc&&(a=al):(s===al||s===Rc)&&(a=xb)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,a,s,l;return a=s=l=o,o!=null&&typeof o!="number"&&(a=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:a,enter:s,appear:l}},n.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===al){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:_d.findDOMNode(this);s&&Kj(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ol&&this.setState({status:$d})},n.performEnter=function(o){var a=this,s=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[_d.findDOMNode(this),l],u=c[0],d=c[1],p=this.getTimeouts(),h=l?p.appear:p.enter;if(!o&&!s||rR.disabled){this.safeSetState({status:Rc},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:al},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:Rc},function(){a.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,a=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:_d.findDOMNode(this);if(!a||rR.disabled){this.safeSetState({status:ol},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:xb},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:ol},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},n.setNextCallback=function(o){var a=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:_d.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===$d)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=Re(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return hr.createElement(jm.Provider,{value:null},typeof s=="function"?s(o,l):hr.cloneElement(hr.Children.only(s),l))},t}(hr.Component);Ki.contextType=jm;Ki.propTypes={};function yc(){}Ki.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yc,onEntering:yc,onEntered:yc,onExit:yc,onExiting:yc,onExited:yc};Ki.UNMOUNTED=$d;Ki.EXITED=ol;Ki.ENTERING=al;Ki.ENTERED=Rc;Ki.EXITING=xb;var av=Ki;function Xj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zw(e,t){var n=function(a){return t&&f.exports.isValidElement(a)?t(a):a},r=Object.create(null);return e&&f.exports.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Jj(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var a in e)a in t?o.length&&(r[a]=o,o=[]):o.push(a);var s,l={};for(var c in t){if(r[c])for(s=0;s<r[c].length;s++){var u=r[c][s];l[r[c][s]]=n(u)}l[c]=n(c)}for(s=0;s<o.length;s++)l[o[s]]=n(o[s]);return l}function bl(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Qj(e,t){return Zw(e.children,function(n){return f.exports.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:bl(n,"appear",e),enter:bl(n,"enter",e),exit:bl(n,"exit",e)})})}function Zj(e,t,n){var r=Zw(e.children),o=Jj(t,r);return Object.keys(o).forEach(function(a){var s=o[a];if(!!f.exports.isValidElement(s)){var l=a in t,c=a in r,u=t[a],d=f.exports.isValidElement(u)&&!u.props.in;c&&(!l||d)?o[a]=f.exports.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:bl(s,"exit",e),enter:bl(s,"enter",e)}):!c&&l&&!d?o[a]=f.exports.cloneElement(s,{in:!1}):c&&l&&f.exports.isValidElement(u)&&(o[a]=f.exports.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:bl(s,"exit",e),enter:bl(s,"enter",e)}))}}),o}var eU=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},tU={component:"div",childFactory:function(t){return t}},eS=function(e){r4(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var s=a.handleExited.bind(Xj(a));return a.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},a}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,a){var s=a.children,l=a.handleExited,c=a.firstRender;return{children:c?Qj(o,l):Zj(o,s,l),firstRender:!1}},n.handleExited=function(o,a){var s=Zw(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(l){var c=T({},l.children);return delete c[o.key],{children:c}}))},n.render=function(){var o=this.props,a=o.component,s=o.childFactory,l=Re(o,["component","childFactory"]),c=this.state.contextValue,u=eU(this.state.children).map(s);return delete l.appear,delete l.enter,delete l.exit,a===null?hr.createElement(jm.Provider,{value:c},u):hr.createElement(jm.Provider,{value:c},hr.createElement(a,l,u))},t}(hr.Component);eS.propTypes={};eS.defaultProps=tU;var nU=eS;const tS=e=>e.scrollTop;function $s(e,t){var n,r;const{timeout:o,easing:a,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof a=="object"?a[t.mode]:a,delay:s.transitionDelay}}function rU(e){return Xe("MuiCollapse",e)}Ke("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const oU=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],aU=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Qe(r,rU,n)},iU=z("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(({theme:e,ownerState:t})=>T({height:0,overflow:"hidden",transition:e.transitions.create("height")},t.orientation==="horizontal"&&{height:"auto",width:0,transition:e.transitions.create("width")},t.state==="entered"&&T({height:"auto",overflow:"visible"},t.orientation==="horizontal"&&{width:"auto"}),t.state==="exited"&&!t.in&&t.collapsedSize==="0px"&&{visibility:"hidden"})),sU=z("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})(({ownerState:e})=>T({display:"flex",width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),lU=z("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})(({ownerState:e})=>T({width:"100%"},e.orientation==="horizontal"&&{width:"auto",height:"100%"})),o4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCollapse"}),{addEndListener:o,children:a,className:s,collapsedSize:l="0px",component:c,easing:u,in:d,onEnter:p,onEntered:h,onEntering:m,onExit:b,onExited:y,onExiting:g,orientation:x="vertical",style:v,timeout:S=Jw.standard,TransitionComponent:E=av}=r,R=Re(r,oU),A=T({},r,{orientation:x,collapsedSize:l}),_=aU(A),N=pn(),k=f.exports.useRef(),I=f.exports.useRef(null),O=f.exports.useRef(),L=typeof l=="number"?`${l}px`:l,q=x==="horizontal",D=q?"width":"height";f.exports.useEffect(()=>()=>{clearTimeout(k.current)},[]);const H=f.exports.useRef(null),U=Xt(n,H),Z=ae=>oe=>{if(ae){const ue=H.current;oe===void 0?ae(ue):ae(ue,oe)}},G=()=>I.current?I.current[q?"clientWidth":"clientHeight"]:0,B=Z((ae,oe)=>{I.current&&q&&(I.current.style.position="absolute"),ae.style[D]=L,p&&p(ae,oe)}),Y=Z((ae,oe)=>{const ue=G();I.current&&q&&(I.current.style.position="");const{duration:ge,easing:_e}=$s({style:v,timeout:S,easing:u},{mode:"enter"});if(S==="auto"){const We=N.transitions.getAutoHeightDuration(ue);ae.style.transitionDuration=`${We}ms`,O.current=We}else ae.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;ae.style[D]=`${ue}px`,ae.style.transitionTimingFunction=_e,m&&m(ae,oe)}),K=Z((ae,oe)=>{ae.style[D]="auto",h&&h(ae,oe)}),Q=Z(ae=>{ae.style[D]=`${G()}px`,b&&b(ae)}),re=Z(y),pe=Z(ae=>{const oe=G(),{duration:ue,easing:ge}=$s({style:v,timeout:S,easing:u},{mode:"exit"});if(S==="auto"){const _e=N.transitions.getAutoHeightDuration(oe);ae.style.transitionDuration=`${_e}ms`,O.current=_e}else ae.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;ae.style[D]=L,ae.style.transitionTimingFunction=ge,g&&g(ae)});return i(E,T({in:d,onEnter:B,onEntered:K,onEntering:Y,onExit:Q,onExited:re,onExiting:pe,addEndListener:ae=>{S==="auto"&&(k.current=setTimeout(ae,O.current||0)),o&&o(H.current,ae)},nodeRef:H,timeout:S==="auto"?null:S},R,{children:(ae,oe)=>i(iU,T({as:c,className:Ce(_.root,s,{entered:_.entered,exited:!d&&L==="0px"&&_.hidden}[ae]),style:T({[q?"minWidth":"minHeight"]:L},v),ownerState:T({},A,{state:ae}),ref:U},oe,{children:i(sU,{ownerState:T({},A,{state:ae}),className:_.wrapper,ref:I,children:i(lU,{ownerState:T({},A,{state:ae}),className:_.wrapperInner,children:a})})}))}))});o4.muiSupportAuto=!0;var a4=o4;const cU=f.exports.createContext({});var i4=cU;function uU(e){return Xe("MuiAccordion",e)}const dU=Ke("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]);var yh=dU;const pU=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],fU=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:a}=e;return Qe({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!a&&"gutters"],region:["region"]},uU,t)},hU=z(yr,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${yh.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&:before":{display:"none"}},[`&.${yh.expanded}`]:{"&:before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}},[`&.${yh.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}},({theme:e,ownerState:t})=>T({},!t.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!t.disableGutters&&{[`&.${yh.expanded}`]:{margin:"16px 0"}})),mU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAccordion"}),{children:o,className:a,defaultExpanded:s=!1,disabled:l=!1,disableGutters:c=!1,expanded:u,onChange:d,square:p=!1,TransitionComponent:h=a4,TransitionProps:m}=r,b=Re(r,pU),[y,g]=Oa({controlled:u,default:s,name:"Accordion",state:"expanded"}),x=f.exports.useCallback(_=>{g(!y),d&&d(_,!y)},[y,d,g]),[v,...S]=f.exports.Children.toArray(o),E=f.exports.useMemo(()=>({expanded:y,disabled:l,disableGutters:c,toggle:x}),[y,l,c,x]),R=T({},r,{square:p,disabled:l,disableGutters:c,expanded:y}),A=fU(R);return w(hU,T({className:Ce(A.root,a),ref:n,ownerState:R,square:p},b,{children:[i(i4.Provider,{value:E,children:v}),i(h,T({in:y,timeout:"auto"},m,{children:i("div",{"aria-labelledby":v.props.id,id:v.props["aria-controls"],role:"region",className:A.region,children:S})}))]}))});var Tu=mU;function gU(e){return Xe("MuiAccordionActions",e)}Ke("MuiAccordionActions",["root","spacing"]);const vU=["className","disableSpacing"],yU=e=>{const{classes:t,disableSpacing:n}=e;return Qe({root:["root",!n&&"spacing"]},gU,t)},bU=z("div",{name:"MuiAccordionActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>T({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),xU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAccordionActions"}),{className:o,disableSpacing:a=!1}=r,s=Re(r,vU),l=T({},r,{disableSpacing:a}),c=yU(l);return i(bU,T({className:Ce(c.root,o),ref:n,ownerState:l},s))});var wU=xU;function SU(e){return Xe("MuiAccordionDetails",e)}Ke("MuiAccordionDetails",["root"]);const CU=["className"],EU=e=>{const{classes:t}=e;return Qe({root:["root"]},SU,t)},TU=z("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(1,2,2)})),RU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAccordionDetails"}),{className:o}=r,a=Re(r,CU),s=r,l=EU(s);return i(TU,T({className:Ce(l.root,o),ref:n,ownerState:s},a))});var Ru=RU;function kU(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,p]=f.exports.useState(!1),h=Ce(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-(s/2)+a,left:-(s/2)+o},b=Ce(n.child,d&&n.childLeaving,r&&n.childPulsate);return!l&&!d&&p(!0),f.exports.useEffect(()=>{if(!l&&c!=null){const y=setTimeout(c,u);return()=>{clearTimeout(y)}}},[c,l,u]),i("span",{className:h,style:m,children:i("span",{className:b})})}const _U=Ke("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var na=_U;const IU=["center","classes","className"];let iv=e=>e,oR,aR,iR,sR;const wb=550,AU=80,NU=mi(oR||(oR=iv`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),$U=mi(aR||(aR=iv`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),PU=mi(iR||(iR=iv`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),OU=z("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),DU=z(kU,{name:"MuiTouchRipple",slot:"Ripple"})(sR||(sR=iv`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),na.rippleVisible,NU,wb,({theme:e})=>e.transitions.easing.easeInOut,na.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,na.child,na.childLeaving,$U,wb,({theme:e})=>e.transitions.easing.easeInOut,na.childPulsate,PU,({theme:e})=>e.transitions.easing.easeInOut),LU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:a={},className:s}=r,l=Re(r,IU),[c,u]=f.exports.useState([]),d=f.exports.useRef(0),p=f.exports.useRef(null);f.exports.useEffect(()=>{p.current&&(p.current(),p.current=null)},[c]);const h=f.exports.useRef(!1),m=f.exports.useRef(null),b=f.exports.useRef(null),y=f.exports.useRef(null);f.exports.useEffect(()=>()=>{clearTimeout(m.current)},[]);const g=f.exports.useCallback(E=>{const{pulsate:R,rippleX:A,rippleY:_,rippleSize:N,cb:k}=E;u(I=>[...I,i(DU,{classes:{ripple:Ce(a.ripple,na.ripple),rippleVisible:Ce(a.rippleVisible,na.rippleVisible),ripplePulsate:Ce(a.ripplePulsate,na.ripplePulsate),child:Ce(a.child,na.child),childLeaving:Ce(a.childLeaving,na.childLeaving),childPulsate:Ce(a.childPulsate,na.childPulsate)},timeout:wb,pulsate:R,rippleX:A,rippleY:_,rippleSize:N},d.current)]),d.current+=1,p.current=k},[a]),x=f.exports.useCallback((E={},R={},A)=>{const{pulsate:_=!1,center:N=o||R.pulsate,fakeElement:k=!1}=R;if((E==null?void 0:E.type)==="mousedown"&&h.current){h.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(h.current=!0);const I=k?null:y.current,O=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,q,D;if(N||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)L=Math.round(O.width/2),q=Math.round(O.height/2);else{const{clientX:H,clientY:U}=E.touches&&E.touches.length>0?E.touches[0]:E;L=Math.round(H-O.left),q=Math.round(U-O.top)}if(N)D=Math.sqrt((2*O.width**2+O.height**2)/3),D%2===0&&(D+=1);else{const H=Math.max(Math.abs((I?I.clientWidth:0)-L),L)*2+2,U=Math.max(Math.abs((I?I.clientHeight:0)-q),q)*2+2;D=Math.sqrt(H**2+U**2)}E!=null&&E.touches?b.current===null&&(b.current=()=>{g({pulsate:_,rippleX:L,rippleY:q,rippleSize:D,cb:A})},m.current=setTimeout(()=>{b.current&&(b.current(),b.current=null)},AU)):g({pulsate:_,rippleX:L,rippleY:q,rippleSize:D,cb:A})},[o,g]),v=f.exports.useCallback(()=>{x({},{pulsate:!0})},[x]),S=f.exports.useCallback((E,R)=>{if(clearTimeout(m.current),(E==null?void 0:E.type)==="touchend"&&b.current){b.current(),b.current=null,m.current=setTimeout(()=>{S(E,R)});return}b.current=null,u(A=>A.length>0?A.slice(1):A),p.current=R},[]);return f.exports.useImperativeHandle(n,()=>({pulsate:v,start:x,stop:S}),[v,x,S]),i(OU,T({className:Ce(na.root,a.root,s),ref:y},l,{children:i(nU,{component:null,exit:!0,children:c})}))});var MU=LU;function BU(e){return Xe("MuiButtonBase",e)}const FU=Ke("MuiButtonBase",["root","disabled","focusVisible"]);var zU=FU;const jU=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],UU=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Qe({root:["root",t&&"disabled",n&&"focusVisible"]},BU,o);return n&&r&&(s.root+=` ${r}`),s},WU=z("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${zU.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),HU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:a=!1,children:s,className:l,component:c="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:p=!1,focusRipple:h=!1,LinkComponent:m="a",onBlur:b,onClick:y,onContextMenu:g,onDragLeave:x,onFocus:v,onFocusVisible:S,onKeyDown:E,onKeyUp:R,onMouseDown:A,onMouseLeave:_,onMouseUp:N,onTouchEnd:k,onTouchMove:I,onTouchStart:O,tabIndex:L=0,TouchRippleProps:q,touchRippleRef:D,type:H}=r,U=Re(r,jU),Z=f.exports.useRef(null),G=f.exports.useRef(null),B=Xt(G,D),{isFocusVisibleRef:Y,onFocus:K,onBlur:Q,ref:re}=df(),[pe,ye]=f.exports.useState(!1);u&&pe&&ye(!1),f.exports.useImperativeHandle(o,()=>({focusVisible:()=>{ye(!0),Z.current.focus()}}),[]);const[ae,oe]=f.exports.useState(!1);f.exports.useEffect(()=>{oe(!0)},[]);const ue=ae&&!d&&!u;f.exports.useEffect(()=>{pe&&h&&!d&&ae&&G.current.pulsate()},[d,h,pe,ae]);function ge(me,je,ut=p){return kr(kt=>(je&&je(kt),!ut&&G.current&&G.current[me](kt),!0))}const _e=ge("start",A),We=ge("stop",g),be=ge("stop",x),he=ge("stop",N),He=ge("stop",me=>{pe&&me.preventDefault(),_&&_(me)}),Pe=ge("start",O),pt=ge("stop",k),St=ge("stop",I),Ut=ge("stop",me=>{Q(me),Y.current===!1&&ye(!1),b&&b(me)},!1),zt=kr(me=>{Z.current||(Z.current=me.currentTarget),K(me),Y.current===!0&&(ye(!0),S&&S(me)),v&&v(me)}),gt=()=>{const me=Z.current;return c&&c!=="button"&&!(me.tagName==="A"&&me.href)},Et=f.exports.useRef(!1),Qt=kr(me=>{h&&!Et.current&&pe&&G.current&&me.key===" "&&(Et.current=!0,G.current.stop(me,()=>{G.current.start(me)})),me.target===me.currentTarget&&gt()&&me.key===" "&&me.preventDefault(),E&&E(me),me.target===me.currentTarget&&gt()&&me.key==="Enter"&&!u&&(me.preventDefault(),y&&y(me))}),In=kr(me=>{h&&me.key===" "&&G.current&&pe&&!me.defaultPrevented&&(Et.current=!1,G.current.stop(me,()=>{G.current.pulsate(me)})),R&&R(me),y&&me.target===me.currentTarget&&gt()&&me.key===" "&&!me.defaultPrevented&&y(me)});let ke=c;ke==="button"&&(U.href||U.to)&&(ke=m);const Fe={};ke==="button"?(Fe.type=H===void 0?"button":H,Fe.disabled=u):(!U.href&&!U.to&&(Fe.role="button"),u&&(Fe["aria-disabled"]=u));const Ge=Xt(re,Z),$e=Xt(n,Ge),te=T({},r,{centerRipple:a,component:c,disabled:u,disableRipple:d,disableTouchRipple:p,focusRipple:h,tabIndex:L,focusVisible:pe}),Ee=UU(te);return w(WU,T({as:ke,className:Ce(Ee.root,l),ownerState:te,onBlur:Ut,onClick:y,onContextMenu:We,onFocus:zt,onKeyDown:Qt,onKeyUp:In,onMouseDown:_e,onMouseLeave:He,onMouseUp:he,onDragLeave:be,onTouchEnd:pt,onTouchMove:St,onTouchStart:Pe,ref:$e,tabIndex:u?-1:L,type:H},Fe,U,{children:[s,ue?i(MU,T({ref:B,center:a},q)):null]}))});var Ma=HU;function VU(e){return Xe("MuiAccordionSummary",e)}const GU=Ke("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var Oc=GU;const qU=["children","className","expandIcon","focusVisibleClassName","onClick"],YU=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return Qe({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},VU,t)},KU=z(Ma,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{const n={duration:e.transitions.duration.shortest};return T({display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],n),[`&.${Oc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Oc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Oc.disabled})`]:{cursor:"pointer"}},!t.disableGutters&&{[`&.${Oc.expanded}`]:{minHeight:64}})}),XU=z("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(({theme:e,ownerState:t})=>T({display:"flex",flexGrow:1,margin:"12px 0"},!t.disableGutters&&{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${Oc.expanded}`]:{margin:"20px 0"}})),JU=z("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${Oc.expanded}`]:{transform:"rotate(180deg)"}})),QU=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAccordionSummary"}),{children:o,className:a,expandIcon:s,focusVisibleClassName:l,onClick:c}=r,u=Re(r,qU),{disabled:d=!1,disableGutters:p,expanded:h,toggle:m}=f.exports.useContext(i4),b=x=>{m&&m(x),c&&c(x)},y=T({},r,{expanded:h,disabled:d,disableGutters:p}),g=YU(y);return w(KU,T({focusRipple:!1,disableRipple:!0,disabled:d,component:"div","aria-expanded":h,className:Ce(g.root,a),focusVisibleClassName:Ce(g.focusVisible,l),onClick:b,ref:n,ownerState:y},u,{children:[i(XU,{className:g.content,ownerState:y,children:o}),s&&i(JU,{className:g.expandIconWrapper,ownerState:y,children:s})]}))});var ku=QU;function ZU(e){return Xe("MuiAlert",e)}const eW=Ke("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var lR=eW;function tW(e){return Xe("MuiIconButton",e)}const nW=Ke("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var rW=nW;const oW=["edge","children","className","color","disabled","disableFocusRipple","size"],aW=e=>{const{classes:t,disabled:n,color:r,edge:o,size:a}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${se(r)}`,o&&`edge${se(o)}`,`size${se(a)}`]};return Qe(s,tW,t)},iW=z(Ma,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${se(n.color)}`],n.edge&&t[`edge${se(n.edge)}`],t[`size${se(n.size)}`]]}})(({theme:e,ownerState:t})=>T({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.active} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>T({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&T({color:(e.vars||e).palette[t.color].main},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${rW.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})),sW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiIconButton"}),{edge:o=!1,children:a,className:s,color:l="default",disabled:c=!1,disableFocusRipple:u=!1,size:d="medium"}=r,p=Re(r,oW),h=T({},r,{edge:o,color:l,disabled:c,disableFocusRipple:u,size:d}),m=aW(h);return i(iW,T({className:Ce(m.root,s),centerRipple:!0,focusRipple:!u,disabled:c,ref:n,ownerState:h},p,{children:a}))});var Ht=sW,lW=et(i("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),cW=et(i("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),uW=et(i("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),dW=et(i("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),s4=et(i("path",{d:"M19 6.41L17.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"),cR;const pW=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],fW=e=>{const{variant:t,color:n,severity:r,classes:o}=e,a={root:["root",`${t}${se(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Qe(a,ZU,o)},hW=z(yr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${se(n.color||n.severity)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?tn:nn,r=e.palette.mode==="light"?nn:tn,o=t.color||t.severity;return T({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},o&&t.variant==="standard"&&{color:e.vars?e.vars.palette.Alert[`${o}Color`]:n(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${o}StandardBg`]:r(e.palette[o].light,.9),[`& .${lR.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette.mode==="dark"?e.palette[o].main:e.palette[o].light}},o&&t.variant==="outlined"&&{color:e.vars?e.vars.palette.Alert[`${o}Color`]:n(e.palette[o].light,.6),border:`1px solid ${(e.vars||e).palette[o].light}`,[`& .${lR.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette.mode==="dark"?e.palette[o].main:e.palette[o].light}},o&&t.variant==="filled"&&T({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${o}FilledColor`],backgroundColor:e.vars.palette.Alert[`${o}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[o].dark:e.palette[o].main,color:e.palette.getContrastText(e.palette.mode==="dark"?e.palette[o].dark:e.palette[o].main)}))}),mW=z("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),gW=z("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),uR=z("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),dR={success:i(lW,{fontSize:"inherit"}),warning:i(cW,{fontSize:"inherit"}),error:i(uW,{fontSize:"inherit"}),info:i(dW,{fontSize:"inherit"})},vW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAlert"}),{action:o,children:a,className:s,closeText:l="Close",color:c,icon:u,iconMapping:d=dR,onClose:p,role:h="alert",severity:m="success",variant:b="standard"}=r,y=Re(r,pW),g=T({},r,{color:c,severity:m,variant:b}),x=fW(g);return w(hW,T({role:h,elevation:0,ownerState:g,className:Ce(x.root,s),ref:n},y,{children:[u!==!1?i(mW,{ownerState:g,className:x.icon,children:u||d[m]||dR[m]}):null,i(gW,{ownerState:g,className:x.message,children:a}),o!=null?i(uR,{ownerState:g,className:x.action,children:o}):null,o==null&&p?i(uR,{ownerState:g,className:x.action,children:i(Ht,{size:"small","aria-label":l,title:l,color:"inherit",onClick:p,children:cR||(cR=i(s4,{fontSize:"small"}))})}):null]}))});var yt=vW;function yW(e){return Xe("MuiTypography",e)}Ke("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const bW=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],xW=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:s}=e,l={root:["root",a,e.align!=="inherit"&&`align${se(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Qe(l,yW,s)},wW=z("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${se(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>T({margin:0},t.variant&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),pR={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},SW={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},CW=e=>SW[e]||e,EW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTypography"}),o=CW(r.color),a=Mw(T({},r,{color:o})),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:p=!1,variant:h="body1",variantMapping:m=pR}=a,b=Re(a,bW),y=T({},a,{align:s,color:o,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:p,variant:h,variantMapping:m}),g=c||(p?"p":m[h]||pR[h])||"span",x=xW(y);return i(wW,T({as:g,ref:n,ownerState:y,className:Ce(x.root,l)},b))});var Te=EW;function TW(e){return Xe("MuiAlertTitle",e)}Ke("MuiAlertTitle",["root"]);const RW=["className"],kW=e=>{const{classes:t}=e;return Qe({root:["root"]},TW,t)},_W=z(Te,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2})),IW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAlertTitle"}),{className:o}=r,a=Re(r,RW),s=r,l=kW(s);return i(_W,T({gutterBottom:!0,component:"div",ownerState:s,ref:n,className:Ce(l.root,o)},a))});var nS=IW;function AW(e){return Xe("MuiAppBar",e)}Ke("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const NW=["className","color","enableColorOnDark","position"],$W=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${se(t)}`,`position${se(n)}`]};return Qe(o,AW,r)},bh=(e,t)=>`${e==null?void 0:e.replace(")","")}, ${t})`,PW=z(yr,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${se(n.position)}`],t[`color${se(n.color)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return T({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&T({},t.color==="default"&&{backgroundColor:n,color:e.palette.getContrastText(n)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&T({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&T({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:bh(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:bh(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:bh(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:bh(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),OW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAppBar"}),{className:o,color:a="primary",enableColorOnDark:s=!1,position:l="fixed"}=r,c=Re(r,NW),u=T({},r,{color:a,position:l,enableColorOnDark:s}),d=$W(u);return i(PW,T({square:!0,component:"header",ownerState:u,elevation:4,className:Ce(d.root,o,l==="fixed"&&"mui-fixed"),ref:n},c))});var fR=OW;const DW=z(lz,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),LW=f.exports.forwardRef(function(t,n){const r=Bw(),o=Je({props:t,name:"MuiPopper"});return i(DW,T({direction:r==null?void 0:r.direction},o,{ref:n}))});var sv=LW;function MW(e){return Xe("MuiListSubheader",e)}Ke("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const BW=["className","color","component","disableGutters","disableSticky","inset"],FW=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,s={root:["root",n!=="default"&&`color${se(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return Qe(s,MW,t)},zW=z("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${se(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>T({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),jW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListSubheader"}),{className:o,color:a="default",component:s="li",disableGutters:l=!1,disableSticky:c=!1,inset:u=!1}=r,d=Re(r,BW),p=T({},r,{color:a,component:s,disableGutters:l,disableSticky:c,inset:u}),h=FW(p);return i(zW,T({as:s,className:Ce(h.root,o),ref:n,ownerState:p},d))});var UW=jW,WW=et(i("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function HW(e){return Xe("MuiChip",e)}const VW=Ke("MuiChip",["root","sizeSmall","sizeMedium","colorPrimary","colorSecondary","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);var gn=VW;const GW=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"],qW=e=>{const{classes:t,disabled:n,size:r,color:o,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${se(r)}`,`color${se(o)}`,s&&"clickable",s&&`clickableColor${se(o)}`,a&&"deletable",a&&`deletableColor${se(o)}`,`${l}${se(o)}`],label:["label",`label${se(r)}`],avatar:["avatar",`avatar${se(r)}`,`avatarColor${se(o)}`],icon:["icon",`icon${se(r)}`,`iconColor${se(o)}`],deleteIcon:["deleteIcon",`deleteIcon${se(r)}`,`deleteIconColor${se(o)}`,`deleteIcon${se(l)}Color${se(o)}`]};return Qe(c,HW,t)},YW=z("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,clickable:o,onDelete:a,size:s,variant:l}=n;return[{[`& .${gn.avatar}`]:t.avatar},{[`& .${gn.avatar}`]:t[`avatar${se(s)}`]},{[`& .${gn.avatar}`]:t[`avatarColor${se(r)}`]},{[`& .${gn.icon}`]:t.icon},{[`& .${gn.icon}`]:t[`icon${se(s)}`]},{[`& .${gn.icon}`]:t[`iconColor${se(r)}`]},{[`& .${gn.deleteIcon}`]:t.deleteIcon},{[`& .${gn.deleteIcon}`]:t[`deleteIcon${se(s)}`]},{[`& .${gn.deleteIcon}`]:t[`deleteIconColor${se(r)}`]},{[`& .${gn.deleteIcon}`]:t[`deleteIcon${se(l)}Color${se(r)}`]},t.root,t[`size${se(s)}`],t[`color${se(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${se(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${se(r)}`],t[l],t[`${l}${se(r)}`]]}})(({theme:e,ownerState:t})=>{const n=$t(e.palette.text.primary,.26),r=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return T({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${gn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${gn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:r,fontSize:e.typography.pxToRem(12)},[`& .${gn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${gn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${gn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${gn.icon}`]:T({color:e.vars?e.vars.palette.Chip.defaultIconColor:r,marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.color!=="default"&&{color:"inherit"}),[`& .${gn.deleteIcon}`]:T({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:n,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:$t(n,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:$t(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${gn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity+e.vars.palette.action.focusOpacity}))`:$t(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${gn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>T({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity+e.vars.palette.action.hoverOpacity}))`:$t(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${gn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity+e.vars.palette.action.focusOpacity}))`:$t(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${gn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>T({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${gn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${gn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${gn.avatar}`]:{marginLeft:4},[`& .${gn.avatarSmall}`]:{marginLeft:2},[`& .${gn.icon}`]:{marginLeft:4},[`& .${gn.iconSmall}`]:{marginLeft:2},[`& .${gn.deleteIcon}`]:{marginRight:5},[`& .${gn.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:$t(e.palette[t.color].main,.7)}`,[`&.${gn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${gn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:$t(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${gn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:$t(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),KW=z("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${se(r)}`]]}})(({ownerState:e})=>T({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.size==="small"&&{paddingLeft:8,paddingRight:8}));function hR(e){return e.key==="Backspace"||e.key==="Delete"}const XW=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiChip"}),{avatar:o,className:a,clickable:s,color:l="default",component:c,deleteIcon:u,disabled:d=!1,icon:p,label:h,onClick:m,onDelete:b,onKeyDown:y,onKeyUp:g,size:x="medium",variant:v="filled"}=r,S=Re(r,GW),E=f.exports.useRef(null),R=Xt(E,n),A=Z=>{Z.stopPropagation(),b&&b(Z)},_=Z=>{Z.currentTarget===Z.target&&hR(Z)&&Z.preventDefault(),y&&y(Z)},N=Z=>{Z.currentTarget===Z.target&&(b&&hR(Z)?b(Z):Z.key==="Escape"&&E.current&&E.current.blur()),g&&g(Z)},k=s!==!1&&m?!0:s,I=k||b?Ma:c||"div",O=T({},r,{component:I,disabled:d,size:x,color:l,onDelete:!!b,clickable:k,variant:v}),L=qW(O),q=I===Ma?T({component:c||"div",focusVisibleClassName:L.focusVisible},b&&{disableRipple:!0}):{};let D=null;b&&(D=u&&f.exports.isValidElement(u)?f.exports.cloneElement(u,{className:Ce(u.props.className,L.deleteIcon),onClick:A}):i(WW,{className:Ce(L.deleteIcon),onClick:A}));let H=null;o&&f.exports.isValidElement(o)&&(H=f.exports.cloneElement(o,{className:Ce(L.avatar,o.props.className)}));let U=null;return p&&f.exports.isValidElement(p)&&(U=f.exports.cloneElement(p,{className:Ce(L.icon,p.props.className)})),w(YW,T({as:I,className:Ce(L.root,a),disabled:k&&d?!0:void 0,onClick:m,onKeyDown:_,onKeyUp:N,ref:R,ownerState:O},q,S,{children:[H||U,i(KW,{className:Ce(L.label),ownerState:O,children:h}),D]}))});var jr=XW;function Us({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]=="undefined"&&(r[o]=n[o]),r),{})}const JW=f.exports.createContext();var lv=JW;function gi(){return f.exports.useContext(lv)}function l4(e){return i(sm,T({},e,{defaultTheme:ov}))}function mR(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function rS(e,t=!1){return e&&(mR(e.value)&&e.value!==""||t&&mR(e.defaultValue)&&e.defaultValue!=="")}function QW(e){return e.startAdornment}function ZW(e){return Xe("MuiInputBase",e)}const eH=Ke("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ei=eH;const tH=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],cv=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${se(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},uv=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},nH=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:a,focused:s,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:p,size:h,startAdornment:m,type:b}=e,y={root:["root",`color${se(n)}`,r&&"disabled",o&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",h==="small"&&"sizeSmall",d&&"multiline",m&&"adornedStart",a&&"adornedEnd",u&&"hiddenLabel",p&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",d&&"inputMultiline",h==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",m&&"inputAdornedStart",a&&"inputAdornedEnd",p&&"readOnly"]};return Qe(y,ZW,t)},dv=z("div",{name:"MuiInputBase",slot:"Root",overridesResolver:cv})(({theme:e,ownerState:t})=>T({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ei.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&T({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),pv=z("input",{name:"MuiInputBase",slot:"Input",overridesResolver:uv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light",r=T({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return T({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ei.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${ei.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),rH=i(l4,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),oH=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:h,endAdornment:m,fullWidth:b=!1,id:y,inputComponent:g="input",inputProps:x={},inputRef:v,maxRows:S,minRows:E,multiline:R=!1,name:A,onBlur:_,onChange:N,onClick:k,onFocus:I,onKeyDown:O,onKeyUp:L,placeholder:q,readOnly:D,renderSuffix:H,rows:U,startAdornment:Z,type:G="text",value:B}=r,Y=Re(r,tH),K=x.value!=null?x.value:B,{current:Q}=f.exports.useRef(K!=null),re=f.exports.useRef(),pe=f.exports.useCallback($e=>{},[]),ye=Xt(x.ref,pe),ae=Xt(v,ye),oe=Xt(re,ae),[ue,ge]=f.exports.useState(!1),_e=gi(),We=Us({props:r,muiFormControl:_e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});We.focused=_e?_e.focused:ue,f.exports.useEffect(()=>{!_e&&p&&ue&&(ge(!1),_&&_())},[_e,p,ue,_]);const be=_e&&_e.onFilled,he=_e&&_e.onEmpty,He=f.exports.useCallback($e=>{rS($e)?be&&be():he&&he()},[be,he]);Oo(()=>{Q&&He({value:K})},[K,He,Q]);const Pe=$e=>{if(We.disabled){$e.stopPropagation();return}I&&I($e),x.onFocus&&x.onFocus($e),_e&&_e.onFocus?_e.onFocus($e):ge(!0)},pt=$e=>{_&&_($e),x.onBlur&&x.onBlur($e),_e&&_e.onBlur?_e.onBlur($e):ge(!1)},St=($e,...te)=>{if(!Q){const Ee=$e.target||re.current;if(Ee==null)throw new Error(Go(1));He({value:Ee.value})}x.onChange&&x.onChange($e,...te),N&&N($e,...te)};f.exports.useEffect(()=>{He(re.current)},[]);const Ut=$e=>{re.current&&$e.currentTarget===$e.target&&re.current.focus(),k&&k($e)};let zt=g,gt=x;R&&zt==="input"&&(U?gt=T({type:void 0,minRows:U,maxRows:U},gt):gt=T({type:void 0,maxRows:S,minRows:E},gt),zt=Gz);const Et=$e=>{He($e.animationName==="mui-auto-fill-cancel"?re.current:{value:"x"})};f.exports.useEffect(()=>{_e&&_e.setAdornedStart(Boolean(Z))},[_e,Z]);const Qt=T({},r,{color:We.color||"primary",disabled:We.disabled,endAdornment:m,error:We.error,focused:We.focused,formControl:_e,fullWidth:b,hiddenLabel:We.hiddenLabel,multiline:R,size:We.size,startAdornment:Z,type:G}),In=nH(Qt),ke=c.Root||dv,Fe=u.root||{},Ge=c.Input||pv;return gt=T({},gt,u.input),w(f.exports.Fragment,{children:[!h&&rH,w(ke,T({},Fe,!ai(ke)&&{ownerState:T({},Qt,Fe.ownerState)},{ref:n,onClick:Ut},Y,{className:Ce(In.root,Fe.className,l),children:[Z,i(lv.Provider,{value:null,children:i(Ge,T({ownerState:Qt,"aria-invalid":We.error,"aria-describedby":o,autoComplete:a,autoFocus:s,defaultValue:d,disabled:We.disabled,id:y,onAnimationStart:Et,name:A,placeholder:q,readOnly:D,required:We.required,rows:U,value:K,onKeyDown:O,onKeyUp:L,type:G},gt,!ai(Ge)&&{as:zt,ownerState:T({},Qt,gt.ownerState)},{ref:oe,className:Ce(In.input,gt.className),onBlur:pt,onChange:St,onFocus:Pe}))}),m,H?H(T({},We,{startAdornment:Z})):null]}))]})});var fv=oH;function aH(e){return Xe("MuiInput",e)}const iH=T({},ei,Ke("MuiInput",["root","underline","input"]));var xl=iH;function sH(e){return Xe("MuiOutlinedInput",e)}const lH=T({},ei,Ke("MuiOutlinedInput",["root","notchedOutline","input"]));var Wa=lH;function cH(e){return Xe("MuiFilledInput",e)}const uH=T({},ei,Ke("MuiFilledInput",["root","underline","input"]));var Ya=uH,c4=et(i("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function dH(e){return Xe("MuiAutocomplete",e)}const pH=Ke("MuiAutocomplete",["root","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var on=pH,gR,vR;const fH=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"],hH=e=>{const{classes:t,disablePortal:n,focused:r,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${se(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Qe(d,dH,t)},mH=z("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:s,size:l}=n;return[{[`& .${on.tag}`]:t.tag},{[`& .${on.tag}`]:t[`tagSize${se(l)}`]},{[`& .${on.inputRoot}`]:t.inputRoot},{[`& .${on.input}`]:t.input},{[`& .${on.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})(({ownerState:e})=>T({[`&.${on.focused} .${on.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${on.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${on.tag}`]:T({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${on.inputRoot}`]:{flexWrap:"wrap",[`.${on.hasPopupIcon}&, .${on.hasClearIcon}&`]:{paddingRight:26+4},[`.${on.hasPopupIcon}.${on.hasClearIcon}&`]:{paddingRight:52+4},[`& .${on.input}`]:{width:0,minWidth:30}},[`& .${xl.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${xl.root}.${ei.sizeSmall}`]:{[`& .${xl.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Wa.root}`]:{padding:9,[`.${on.hasPopupIcon}&, .${on.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${on.hasPopupIcon}.${on.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${on.input}`]:{padding:"7.5px 4px 7.5px 6px"},[`& .${on.endAdornment}`]:{right:9}},[`& .${Wa.root}.${ei.sizeSmall}`]:{padding:6,[`& .${on.input}`]:{padding:"2.5px 4px 2.5px 6px"}},[`& .${Ya.root}`]:{paddingTop:19,paddingLeft:8,[`.${on.hasPopupIcon}&, .${on.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${on.hasPopupIcon}.${on.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Ya.input}`]:{padding:"7px 4px"},[`& .${on.endAdornment}`]:{right:9}},[`& .${Ya.root}.${ei.sizeSmall}`]:{paddingBottom:1,[`& .${Ya.input}`]:{padding:"2.5px 4px"}},[`& .${ei.hiddenLabel}`]:{paddingTop:8},[`& .${on.input}`]:T({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),gH=z("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),vH=z(Ht,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),yH=z(Ht,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>T({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})(({ownerState:e})=>T({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),bH=z(sv,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${on.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(({theme:e,ownerState:t})=>T({zIndex:(e.vars||e).zIndex.modal},t.disablePortal&&{position:"absolute"})),xH=z(yr,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>T({},e.typography.body1,{overflow:"auto"})),wH=z("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),SH=z("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),CH=z("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",[`& .${on.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${on.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${on.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${on.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${on.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),EH=z(UW,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),TH=z("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${on.option}`]:{paddingLeft:24}}),RH=f.exports.forwardRef(function(t,n){var r,o,a,s;const l=Je({props:t,name:"MuiAutocomplete"}),{autoComplete:c=!1,autoHighlight:u=!1,autoSelect:d=!1,blurOnSelect:p=!1,ChipProps:h,className:m,clearIcon:b=gR||(gR=i(s4,{fontSize:"small"})),clearOnBlur:y=!l.freeSolo,clearOnEscape:g=!1,clearText:x="Clear",closeText:v="Close",componentsProps:S={},defaultValue:E=l.multiple?[]:null,disableClearable:R=!1,disableCloseOnSelect:A=!1,disabled:_=!1,disabledItemsFocusable:N=!1,disableListWrap:k=!1,disablePortal:I=!1,filterSelectedOptions:O=!1,forcePopupIcon:L="auto",freeSolo:q=!1,fullWidth:D=!1,getLimitTagsText:H=qt=>`+${qt}`,getOptionLabel:U=qt=>{var ir;return(ir=qt.label)!=null?ir:qt},groupBy:Z,handleHomeEndKeys:G=!l.freeSolo,includeInputInList:B=!1,limitTags:Y=-1,ListboxComponent:K="ul",ListboxProps:Q,loading:re=!1,loadingText:pe="Loading\u2026",multiple:ye=!1,noOptionsText:ae="No options",openOnFocus:oe=!1,openText:ue="Open",PaperComponent:ge=yr,PopperComponent:_e=sv,popupIcon:We=vR||(vR=i(c4,{})),readOnly:be=!1,renderGroup:he,renderInput:He,renderOption:Pe,renderTags:pt,selectOnFocus:St=!l.freeSolo,size:Ut="medium"}=l,zt=Re(l,fH),{getRootProps:gt,getInputProps:Et,getInputLabelProps:Qt,getPopupIndicatorProps:In,getClearProps:ke,getTagProps:Fe,getListboxProps:Ge,getOptionProps:$e,value:te,dirty:Ee,id:me,popupOpen:je,focused:ut,focusedTag:kt,anchorEl:cn,setAnchorEl:Wn,inputValue:So,groupedOptions:tr}=W8(T({},l,{componentName:"Autocomplete"})),pr=!R&&!_&&Ee&&!be,Nr=(!q||L===!0)&&L!==!1,On=T({},l,{disablePortal:I,focused:ut,fullWidth:D,hasClearIcon:pr,hasPopupIcon:Nr,inputFocused:kt===-1,popupOpen:je,size:Ut}),En=hH(On);let fn;if(ye&&te.length>0){const qt=ir=>T({className:En.tag,disabled:_},Fe(ir));pt?fn=pt(te,qt,On):fn=te.map((ir,fr)=>i(jr,T({label:U(ir),size:Ut},qt({index:fr}),h)))}if(Y>-1&&Array.isArray(fn)){const qt=fn.length-Y;!ut&&qt>0&&(fn=fn.splice(0,Y),fn.push(i("span",{className:En.tag,children:H(qt)},fn.length)))}const Fo=he||(qt=>w("li",{children:[i(EH,{className:En.groupLabel,ownerState:On,component:"div",children:qt.group}),i(TH,{className:En.groupUl,ownerState:On,children:qt.children})]},qt.key)),Ca=Pe||((qt,ir)=>i("li",T({},qt,{children:U(ir)}))),Ea=(qt,ir)=>{const fr=$e({option:qt,index:ir});return Ca(T({},fr,{className:En.option}),qt,{selected:fr["aria-selected"],inputValue:So})};return w(f.exports.Fragment,{children:[i(mH,T({ref:n,className:Ce(En.root,m),ownerState:On},gt(zt),{children:He({id:me,disabled:_,fullWidth:!0,size:Ut==="small"?"small":void 0,InputLabelProps:Qt(),InputProps:T({ref:Wn,className:En.inputRoot,startAdornment:fn},(pr||Nr)&&{endAdornment:w(gH,{className:En.endAdornment,ownerState:On,children:[pr?i(vH,T({},ke(),{"aria-label":x,title:x,ownerState:On},S.clearIndicator,{className:Ce(En.clearIndicator,(r=S.clearIndicator)==null?void 0:r.className),children:b})):null,Nr?i(yH,T({},In(),{disabled:_,"aria-label":je?v:ue,title:je?v:ue,ownerState:On},S.popupIndicator,{className:Ce(En.popupIndicator,(o=S.popupIndicator)==null?void 0:o.className),children:We})):null]})}),inputProps:T({className:En.input,disabled:_,readOnly:be},Et())})})),je&&cn?i(bH,T({as:_e,disablePortal:I,style:{width:cn?cn.clientWidth:null},ownerState:On,role:"presentation",anchorEl:cn,open:!0},S.popper,{className:Ce(En.popper,(a=S.popper)==null?void 0:a.className),children:w(xH,T({ownerState:On,as:ge},S.paper,{className:Ce(En.paper,(s=S.paper)==null?void 0:s.className),children:[re&&tr.length===0?i(wH,{className:En.loading,ownerState:On,children:pe}):null,tr.length===0&&!q&&!re?i(SH,{className:En.noOptions,ownerState:On,role:"presentation",onMouseDown:qt=>{qt.preventDefault()},children:ae}):null,tr.length>0?i(CH,T({as:K,className:En.listbox,ownerState:On},Ge(),Q,{children:tr.map((qt,ir)=>Z?Fo({key:qt.key,group:qt.group,children:qt.options.map((fr,Ta)=>Ea(fr,qt.index+Ta))}):Ea(qt,ir))})):null]}))})):null]})});var Bl=RH,kH=et(i("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function _H(e){return Xe("MuiAvatar",e)}Ke("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const IH=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],AH=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Qe({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},_H,t)},NH=z("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>T({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&T({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),$H=z("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),PH=z(kH,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function OH({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,a]=f.exports.useState(!1);return f.exports.useEffect(()=>{if(!n&&!r)return;a(!1);let s=!0;const l=new Image;return l.onload=()=>{!s||a("loaded")},l.onerror=()=>{!s||a("error")},l.crossOrigin=e,l.referrerPolicy=t,l.src=n,r&&(l.srcset=r),()=>{s=!1}},[e,t,n,r]),o}const DH=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiAvatar"}),{alt:o,children:a,className:s,component:l="div",imgProps:c,sizes:u,src:d,srcSet:p,variant:h="circular"}=r,m=Re(r,IH);let b=null;const y=OH(T({},c,{src:d,srcSet:p})),g=d||p,x=g&&y!=="error",v=T({},r,{colorDefault:!x,component:l,variant:h}),S=AH(v);return x?b=i($H,T({alt:o,src:d,srcSet:p,sizes:u,ownerState:v,className:S.img},c)):a!=null?b=a:g&&o?b=o[0]:b=i(PH,{className:S.fallback}),i(NH,T({as:l,ownerState:v,className:Ce(S.root,s),ref:n},m,{children:b}))});var _u=DH;const LH=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],MH={entering:{opacity:1},entered:{opacity:1}},BH=f.exports.forwardRef(function(t,n){const r=pn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,easing:c,in:u,onEnter:d,onEntered:p,onEntering:h,onExit:m,onExited:b,onExiting:y,style:g,timeout:x=o,TransitionComponent:v=av}=t,S=Re(t,LH),E=f.exports.useRef(null),R=Xt(l.ref,n),A=Xt(E,R),_=H=>U=>{if(H){const Z=E.current;U===void 0?H(Z):H(Z,U)}},N=_(h),k=_((H,U)=>{tS(H);const Z=$s({style:g,timeout:x,easing:c},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",Z),H.style.transition=r.transitions.create("opacity",Z),d&&d(H,U)}),I=_(p),O=_(y),L=_(H=>{const U=$s({style:g,timeout:x,easing:c},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",U),H.style.transition=r.transitions.create("opacity",U),m&&m(H)}),q=_(b);return i(v,T({appear:s,in:u,nodeRef:E,onEnter:k,onEntered:I,onEntering:N,onExit:L,onExited:q,onExiting:O,addEndListener:H=>{a&&a(E.current,H)},timeout:x},S,{children:(H,U)=>f.exports.cloneElement(l,T({style:T({opacity:0,visibility:H==="exited"&&!u?"hidden":void 0},MH[H],g,l.props.style),ref:A},U))}))});var oS=BH;function FH(e){return Xe("MuiBackdrop",e)}Ke("MuiBackdrop",["root","invisible"]);const zH=["children","component","components","componentsProps","className","invisible","open","transitionDuration","TransitionComponent"],jH=e=>{const{classes:t,invisible:n}=e;return Qe({root:["root",n&&"invisible"]},FH,t)},UH=z("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>T({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),WH=f.exports.forwardRef(function(t,n){var r,o;const a=Je({props:t,name:"MuiBackdrop"}),{children:s,component:l="div",components:c={},componentsProps:u={},className:d,invisible:p=!1,open:h,transitionDuration:m,TransitionComponent:b=oS}=a,y=Re(a,zH),g=T({},a,{component:l,invisible:p}),x=jH(g);return i(b,T({in:h,timeout:m},y,{children:i(UH,{"aria-hidden":!0,as:(r=c.Root)!=null?r:l,className:Ce(x.root,d),ownerState:T({},g,(o=u.root)==null?void 0:o.ownerState),classes:x,ref:n,children:s})}))});var aS=WH;const HH=e=>!e||!ai(e);var xh=HH;const VH=Ui(),GH=i8({defaultTheme:VH,defaultClassName:"MuiBox-root",generateClassName:Aw.generate});var mt=GH,qH=et(i("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");const YH=z(Ma)(({theme:e})=>T({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":T({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":T({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:yl(e.palette.grey[200],.12)}:{backgroundColor:yl(e.palette.grey[600],.12)})})),KH=z(qH)({width:24,height:16});function XH(e){const t=e;return i("li",{children:i(YH,T({focusRipple:!0},e,{ownerState:t,children:i(KH,{ownerState:t})}))})}function JH(e){return Xe("MuiBreadcrumbs",e)}const QH=Ke("MuiBreadcrumbs",["root","ol","li","separator"]);var ZH=QH;const eV=["children","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],tV=e=>{const{classes:t}=e;return Qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},JH,t)},nV=z(Te,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ZH.li}`]:t.li},t.root]})({}),rV=z("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),oV=z("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function aV(e,t,n,r){return e.reduce((o,a,s)=>(s<e.length-1?o=o.concat(a,i(oV,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${s}`)):o.push(a),o),[])}const iV=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiBreadcrumbs"}),{children:o,className:a,component:s="nav",expandText:l="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:u=1,maxItems:d=8,separator:p="/"}=r,h=Re(r,eV),[m,b]=f.exports.useState(!1),y=T({},r,{component:s,expanded:m,expandText:l,itemsAfterCollapse:c,itemsBeforeCollapse:u,maxItems:d,separator:p}),g=tV(y),x=f.exports.useRef(null),v=E=>{const R=()=>{b(!0);const A=x.current.querySelector("a[href],button,[tabindex]");A&&A.focus()};return u+c>=E.length?E:[...E.slice(0,u),i(XH,{"aria-label":l,onClick:R},"ellipsis"),...E.slice(E.length-c,E.length)]},S=f.exports.Children.toArray(o).filter(E=>f.exports.isValidElement(E)).map((E,R)=>i("li",{className:g.li,children:E},`child-${R}`));return i(nV,T({ref:n,component:s,color:"text.secondary",className:Ce(g.root,a),ownerState:y},h,{children:i(rV,{className:g.ol,ref:x,ownerState:y,children:aV(m||d&&S.length<=d?S:v(S),g.separator,p,y)})}))});var sV=iV;function lV(e){return Xe("MuiButton",e)}const cV=Ke("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var wh=cV;const uV=f.exports.createContext({});var dV=uV;const pV=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],fV=["root"],hV=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,classes:s}=e,l={root:["root",a,`${a}${se(t)}`,`size${se(o)}`,`${a}Size${se(o)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${se(o)}`],endIcon:["endIcon",`iconSize${se(o)}`]},c=Qe(l,lV,s);return T({},s,c)},u4=e=>T({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),mV=z(Ma,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${se(n.color)}`],t[`size${se(n.size)}`],t[`${n.variant}Size${se(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;return T({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":T({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":T({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${wh.focusVisible}`]:T({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${wh.disabled}`]:T({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="outlined"&&t.color==="secondary"&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${$t(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${wh.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${wh.disabled}`]:{boxShadow:"none"}}),gV=z("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${se(n.size)}`]]}})(({ownerState:e})=>T({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},u4(e))),vV=z("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${se(n.size)}`]]}})(({ownerState:e})=>T({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},u4(e))),yV=f.exports.forwardRef(function(t,n){const r=f.exports.useContext(dV),o=pN(r,t),a=Je({props:o,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:h=!1,endIcon:m,focusVisibleClassName:b,fullWidth:y=!1,size:g="medium",startIcon:x,type:v,variant:S="text"}=a,E=Re(a,pV),R=T({},a,{color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:h,fullWidth:y,size:g,type:v,variant:S}),A=hV(R),{root:_}=A,N=Re(A,fV),k=x&&i(gV,{className:N.startIcon,ownerState:R,children:x}),I=m&&i(vV,{className:N.endIcon,ownerState:R,children:m});return w(mV,T({ownerState:R,className:Ce(r.className,_,u),component:c,disabled:d,focusRipple:!h,focusVisibleClassName:Ce(N.focusVisible,b),ref:n,type:v},E,{classes:N,children:[k,s,I]}))});var nt=yV;function bV(e){return Xe("MuiCard",e)}Ke("MuiCard",["root"]);const xV=["className","raised"],wV=e=>{const{classes:t}=e;return Qe({root:["root"]},bV,t)},SV=z(yr,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),CV=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCard"}),{className:o,raised:a=!1}=r,s=Re(r,xV),l=T({},r,{raised:a}),c=wV(l);return i(SV,T({className:Ce(c.root,o),elevation:a?8:void 0,ref:n,ownerState:l},s))});var d4=CV;function EV(e){return Xe("MuiCardActions",e)}Ke("MuiCardActions",["root","spacing"]);const TV=["disableSpacing","className"],RV=e=>{const{classes:t,disableSpacing:n}=e;return Qe({root:["root",!n&&"spacing"]},EV,t)},kV=z("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>T({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),_V=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:a}=r,s=Re(r,TV),l=T({},r,{disableSpacing:o}),c=RV(l);return i(kV,T({className:Ce(c.root,a),ownerState:l,ref:n},s))});var IV=_V;function AV(e){return Xe("MuiCardContent",e)}Ke("MuiCardContent",["root"]);const NV=["className","component"],$V=e=>{const{classes:t}=e;return Qe({root:["root"]},AV,t)},PV=z("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),OV=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCardContent"}),{className:o,component:a="div"}=r,s=Re(r,NV),l=T({},r,{component:a}),c=$V(l);return i(PV,T({as:a,className:Ce(c.root,o),ownerState:l,ref:n},s))});var DV=OV;function LV(e){return Xe("PrivateSwitchBase",e)}Ke("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const MV=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],BV=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,a={root:["root",n&&"checked",r&&"disabled",o&&`edge${se(o)}`],input:["input"]};return Qe(a,LV,t)},FV=z(Ma)(({ownerState:e})=>T({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),zV=z("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jV=f.exports.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:a,className:s,defaultChecked:l,disabled:c,disableFocusRipple:u=!1,edge:d=!1,icon:p,id:h,inputProps:m,inputRef:b,name:y,onBlur:g,onChange:x,onFocus:v,readOnly:S,required:E,tabIndex:R,type:A,value:_}=t,N=Re(t,MV),[k,I]=Oa({controlled:o,default:Boolean(l),name:"SwitchBase",state:"checked"}),O=gi(),L=B=>{v&&v(B),O&&O.onFocus&&O.onFocus(B)},q=B=>{g&&g(B),O&&O.onBlur&&O.onBlur(B)},D=B=>{if(B.nativeEvent.defaultPrevented)return;const Y=B.target.checked;I(Y),x&&x(B,Y)};let H=c;O&&typeof H=="undefined"&&(H=O.disabled);const U=A==="checkbox"||A==="radio",Z=T({},t,{checked:k,disabled:H,disableFocusRipple:u,edge:d}),G=BV(Z);return w(FV,T({component:"span",className:Ce(G.root,s),centerRipple:!0,focusRipple:!u,disabled:H,tabIndex:null,role:void 0,onFocus:L,onBlur:q,ownerState:Z,ref:n},N,{children:[i(zV,T({autoFocus:r,checked:o,defaultChecked:l,className:G.input,disabled:H,id:U&&h,name:y,onChange:D,readOnly:S,ref:b,required:E,ownerState:Z,tabIndex:R,type:A},A==="checkbox"&&_===void 0?{}:{value:_},m)),k?a:p]}))});var iS=jV,UV=et(i("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),WV=et(i("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),HV=et(i("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function VV(e){return Xe("MuiCheckbox",e)}const GV=Ke("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);var N0=GV;const qV=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],YV=e=>{const{classes:t,indeterminate:n,color:r}=e,o={root:["root",n&&"indeterminate",`color${se(r)}`]},a=Qe(o,VV,t);return T({},t,a)},KV=z(iS,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,n.color!=="default"&&t[`color${se(n.color)}`]]}})(({theme:e,ownerState:t})=>T({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${N0.checked}, &.${N0.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${N0.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),XV=i(WV,{}),JV=i(UV,{}),QV=i(HV,{}),ZV=f.exports.forwardRef(function(t,n){var r,o;const a=Je({props:t,name:"MuiCheckbox"}),{checkedIcon:s=XV,color:l="primary",icon:c=JV,indeterminate:u=!1,indeterminateIcon:d=QV,inputProps:p,size:h="medium"}=a,m=Re(a,qV),b=u?d:c,y=u?d:s,g=T({},a,{color:l,indeterminate:u,size:h}),x=YV(g);return i(KV,T({type:"checkbox",inputProps:T({"data-indeterminate":u},p),icon:f.exports.cloneElement(b,{fontSize:(r=b.props.fontSize)!=null?r:h}),checkedIcon:f.exports.cloneElement(y,{fontSize:(o=y.props.fontSize)!=null?o:h}),ownerState:g,ref:n},m,{classes:x}))});var Do=ZV;function eG(e){return Xe("MuiCircularProgress",e)}Ke("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const tG=["className","color","disableShrink","size","style","thickness","value","variant"];let hv=e=>e,yR,bR,xR,wR;const ts=44,nG=mi(yR||(yR=hv`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),rG=mi(bR||(bR=hv`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),oG=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${se(r)}`],svg:["svg"],circle:["circle",`circle${se(n)}`,o&&"circleDisableShrink"]};return Qe(a,eG,t)},aG=z("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${se(n.color)}`]]}})(({ownerState:e,theme:t})=>T({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Ms(xR||(xR=hv`
      animation: ${0} 1.4s linear infinite;
    `),nG)),iG=z("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),sG=z("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${se(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>T({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Ms(wR||(wR=hv`
      animation: ${0} 1.4s ease-in-out infinite;
    `),rG)),lG=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiCircularProgress"}),{className:o,color:a="primary",disableShrink:s=!1,size:l=40,style:c,thickness:u=3.6,value:d=0,variant:p="indeterminate"}=r,h=Re(r,tG),m=T({},r,{color:a,disableShrink:s,size:l,thickness:u,value:d,variant:p}),b=oG(m),y={},g={},x={};if(p==="determinate"){const v=2*Math.PI*((ts-u)/2);y.strokeDasharray=v.toFixed(3),x["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*v).toFixed(3)}px`,g.transform="rotate(-90deg)"}return i(aG,T({className:Ce(b.root,o),style:T({width:l,height:l},g,c),ownerState:m,ref:n,role:"progressbar"},x,h,{children:i(iG,{className:b.svg,ownerState:m,viewBox:`${ts/2} ${ts/2} ${ts} ${ts}`,children:i(sG,{className:b.circle,style:y,ownerState:m,cx:ts,cy:ts,r:(ts-u)/2,fill:"none",strokeWidth:u})})}))});var cG=lG;const uG=O8({createStyledComponent:z("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${se(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Je({props:e,name:"MuiContainer"})});var SR=uG;const dG=(e,t)=>T({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:e.palette.mode}),pG=e=>T({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),fG=(e,t=!1)=>{var n,r;let o={html:dG(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:T({margin:0},pG(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})};const a=(n=e.components)==null||(r=n.MuiCssBaseline)==null?void 0:r.styleOverrides;return a&&(o=[o,a]),o};function hG(e){const t=Je({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return w(f.exports.Fragment,{children:[i(l4,{styles:o=>fG(o,r)}),n]})}const mG=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","theme"],gG=e=>e.classes,vG=z("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>T({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),yG=z(aS,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),bG=f.exports.forwardRef(function(t,n){var r,o;const a=Je({name:"MuiModal",props:t}),{BackdropComponent:s=yG,BackdropProps:l,closeAfterTransition:c=!1,children:u,component:d,components:p={},componentsProps:h={},disableAutoFocus:m=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:y=!1,disablePortal:g=!1,disableRestoreFocus:x=!1,disableScrollLock:v=!1,hideBackdrop:S=!1,keepMounted:E=!1,theme:R}=a,A=Re(a,mG),[_,N]=f.exports.useState(!0),k={closeAfterTransition:c,disableAutoFocus:m,disableEnforceFocus:b,disableEscapeKeyDown:y,disablePortal:g,disableRestoreFocus:x,disableScrollLock:v,hideBackdrop:S,keepMounted:E},I=T({},a,k,{exited:_}),O=gG(I),L=(r=(o=p.Root)!=null?o:d)!=null?r:vG;return i(_z,T({components:T({Root:L,Backdrop:s},p),componentsProps:{root:()=>T({},fb(h.root,I),!ai(L)&&{as:d,theme:R}),backdrop:()=>T({},l,fb(h.backdrop,I))},onTransitionEnter:()=>N(!1),onTransitionExited:()=>N(!0),ref:n},A,{classes:O},k,{children:u}))});var yf=bG;function xG(e){return Xe("MuiDialog",e)}const wG=Ke("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var $0=wG;const SG=f.exports.createContext({});var p4=SG;const CG=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],EG=z(aS,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),TG=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,s={root:["root"],container:["container",`scroll${se(n)}`],paper:["paper",`paperScroll${se(n)}`,`paperWidth${se(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return Qe(s,xG,t)},RG=z(yf,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),kG=z("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${se(n.scroll)}`]]}})(({ownerState:e})=>T({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),_G=z(yr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${se(n.scroll)}`],t[`paperWidth${se(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>T({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${$0.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${$0.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${$0.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),IG=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialog"}),o=pn(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":l,BackdropComponent:c,BackdropProps:u,children:d,className:p,disableEscapeKeyDown:h=!1,fullScreen:m=!1,fullWidth:b=!1,maxWidth:y="sm",onBackdropClick:g,onClose:x,open:v,PaperComponent:S=yr,PaperProps:E={},scroll:R="paper",TransitionComponent:A=oS,transitionDuration:_=a,TransitionProps:N}=r,k=Re(r,CG),I=T({},r,{disableEscapeKeyDown:h,fullScreen:m,fullWidth:b,maxWidth:y,scroll:R}),O=TG(I),L=f.exports.useRef(),q=Z=>{L.current=Z.target===Z.currentTarget},D=Z=>{!L.current||(L.current=null,g&&g(Z),x&&x(Z,"backdropClick"))},H=Eu(l),U=f.exports.useMemo(()=>({titleId:H}),[H]);return i(RG,T({className:Ce(O.root,p),closeAfterTransition:!0,components:{Backdrop:EG},componentsProps:{backdrop:T({transitionDuration:_,as:c},u)},disableEscapeKeyDown:h,onClose:x,open:v,ref:n,onClick:D,ownerState:I},k,{children:i(A,T({appear:!0,in:v,timeout:_,role:"presentation"},N,{children:i(kG,{className:Ce(O.container),onMouseDown:q,ownerState:I,children:i(_G,T({as:S,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":H},E,{className:Ce(O.paper,E.className),ownerState:I,children:i(p4.Provider,{value:U,children:d})}))})}))}))});var AG=IG;function NG(e){return Xe("MuiDialogActions",e)}Ke("MuiDialogActions",["root","spacing"]);const $G=["className","disableSpacing"],PG=e=>{const{classes:t,disableSpacing:n}=e;return Qe({root:["root",!n&&"spacing"]},NG,t)},OG=z("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>T({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),DG=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1}=r,s=Re(r,$G),l=T({},r,{disableSpacing:a}),c=PG(l);return i(OG,T({className:Ce(c.root,o),ownerState:l,ref:n},s))});var LG=DG;function MG(e){return Xe("MuiDialogContent",e)}Ke("MuiDialogContent",["root","dividers"]);function BG(e){return Xe("MuiDialogTitle",e)}const FG=Ke("MuiDialogTitle",["root"]);var zG=FG;const jG=["className","dividers"],UG=e=>{const{classes:t,dividers:n}=e;return Qe({root:["root",n&&"dividers"]},MG,t)},WG=z("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>T({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${zG.root} + &`]:{paddingTop:0}})),HG=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogContent"}),{className:o,dividers:a=!1}=r,s=Re(r,jG),l=T({},r,{dividers:a}),c=UG(l);return i(WG,T({className:Ce(c.root,o),ownerState:l,ref:n},s))});var VG=HG;const GG=["className","id"],qG=e=>{const{classes:t}=e;return Qe({root:["root"]},BG,t)},YG=z(Te,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),KG=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDialogTitle"}),{className:o,id:a}=r,s=Re(r,GG),l=r,c=qG(l),{titleId:u=a}=f.exports.useContext(p4);return i(YG,T({component:"h2",className:Ce(c.root,o),ownerState:l,ref:n,variant:"h6",id:u},s))});var XG=KG;function JG(e){return Xe("MuiDivider",e)}const QG=Ke("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);var CR=QG;const ZG=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],eq=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:a,orientation:s,textAlign:l,variant:c}=e;return Qe({root:["root",t&&"absolute",c,a&&"light",s==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",l==="right"&&s!=="vertical"&&"textAlignRight",l==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},JG,r)},tq=z("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>T({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:$t(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({theme:e,ownerState:t})=>T({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{position:"relative",width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,top:"50%",content:'""',transform:"translateY(50%)"}}),({theme:e,ownerState:t})=>T({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",top:"0%",left:"50%",borderTop:0,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,transform:"translateX(0%)"}}),({ownerState:e})=>T({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),nq=z("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>T({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),rq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDivider"}),{absolute:o=!1,children:a,className:s,component:l=a?"div":"hr",flexItem:c=!1,light:u=!1,orientation:d="horizontal",role:p=l!=="hr"?"separator":void 0,textAlign:h="center",variant:m="fullWidth"}=r,b=Re(r,ZG),y=T({},r,{absolute:o,component:l,flexItem:c,light:u,orientation:d,role:p,textAlign:h,variant:m}),g=eq(y);return i(tq,T({as:l,className:Ce(g.root,s),role:p,ref:n,ownerState:y},b,{children:a?i(nq,{className:g.wrapper,ownerState:y,children:a}):null}))});var Ur=rq;const oq=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function aq(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=fa(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const u=a.getComputedStyle(t);s=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let l=0,c=0;if(s&&s!=="none"&&typeof s=="string"){const u=s.split("(")[1].split(")")[0].split(",");l=parseInt(u[4],10),c=parseInt(u[5],10)}return e==="left"?o?`translateX(${o.right+l-r.left}px)`:`translateX(${a.innerWidth+l-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-l}px)`:`translateX(-${r.left+r.width-l}px)`:e==="up"?o?`translateY(${o.bottom+c-r.top}px)`:`translateY(${a.innerHeight+c-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-c}px)`:`translateY(-${r.top+r.height-c}px)`}function iq(e){return typeof e=="function"?e():e}function Sh(e,t,n){const r=iq(n),o=aq(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const sq=f.exports.forwardRef(function(t,n){const r=pn(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:c,container:u,direction:d="down",easing:p=o,in:h,onEnter:m,onEntered:b,onEntering:y,onExit:g,onExited:x,onExiting:v,style:S,timeout:E=a,TransitionComponent:R=av}=t,A=Re(t,oq),_=f.exports.useRef(null),N=Xt(c.ref,_),k=Xt(N,n),I=B=>Y=>{B&&(Y===void 0?B(_.current):B(_.current,Y))},O=I((B,Y)=>{Sh(d,B,u),tS(B),m&&m(B,Y)}),L=I((B,Y)=>{const K=$s({timeout:E,style:S,easing:p},{mode:"enter"});B.style.webkitTransition=r.transitions.create("-webkit-transform",T({},K)),B.style.transition=r.transitions.create("transform",T({},K)),B.style.webkitTransform="none",B.style.transform="none",y&&y(B,Y)}),q=I(b),D=I(v),H=I(B=>{const Y=$s({timeout:E,style:S,easing:p},{mode:"exit"});B.style.webkitTransition=r.transitions.create("-webkit-transform",Y),B.style.transition=r.transitions.create("transform",Y),Sh(d,B,u),g&&g(B)}),U=I(B=>{B.style.webkitTransition="",B.style.transition="",x&&x(B)}),Z=B=>{s&&s(_.current,B)},G=f.exports.useCallback(()=>{_.current&&Sh(d,_.current,u)},[d,u]);return f.exports.useEffect(()=>{if(h||d==="down"||d==="right")return;const B=Ll(()=>{_.current&&Sh(d,_.current,u)}),Y=fa(_.current);return Y.addEventListener("resize",B),()=>{B.clear(),Y.removeEventListener("resize",B)}},[d,h,u]),f.exports.useEffect(()=>{h||G()},[h,G]),i(R,T({nodeRef:_,onEnter:O,onEntered:q,onEntering:L,onExit:H,onExited:U,onExiting:D,addEndListener:Z,appear:l,in:h,timeout:E},A,{children:(B,Y)=>f.exports.cloneElement(c,T({ref:k,style:T({visibility:B==="exited"&&!h?"hidden":void 0},S,c.props.style)},Y))}))});var lq=sq;function cq(e){return Xe("MuiDrawer",e)}Ke("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const uq=["BackdropProps"],dq=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],f4=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},pq=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${se(n)}`,r!=="temporary"&&`paperAnchorDocked${se(n)}`]};return Qe(o,cq,t)},fq=z(yf,{name:"MuiDrawer",slot:"Root",overridesResolver:f4})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),ER=z("div",{shouldForwardProp:Qo,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:f4})({flex:"0 0 auto"}),hq=z(yr,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${se(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${se(n.anchor)}`]]}})(({theme:e,ownerState:t})=>T({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),h4={left:"right",right:"left",top:"down",bottom:"up"};function mq(e){return["left","right"].indexOf(e)!==-1}function gq(e,t){return e.direction==="rtl"&&mq(t)?h4[t]:t}const vq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiDrawer"}),o=pn(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:h}={},onClose:m,open:b=!1,PaperProps:y={},SlideProps:g,TransitionComponent:x=lq,transitionDuration:v=a,variant:S="temporary"}=r,E=Re(r.ModalProps,uq),R=Re(r,dq),A=f.exports.useRef(!1);f.exports.useEffect(()=>{A.current=!0},[]);const _=gq(o,s),k=T({},r,{anchor:s,elevation:d,open:b,variant:S},R),I=pq(k),O=i(hq,T({elevation:S==="temporary"?d:0,square:!0},y,{className:Ce(I.paper,y.className),ownerState:k,children:c}));if(S==="permanent")return i(ER,T({className:Ce(I.root,I.docked,u),ownerState:k,ref:n},R,{children:O}));const L=i(x,T({in:b,direction:h4[_],timeout:v,appear:A.current},g,{children:O}));return S==="persistent"?i(ER,T({className:Ce(I.root,I.docked,u),ownerState:k,ref:n},R,{children:L})):i(fq,T({BackdropProps:T({},l,h,{transitionDuration:v}),className:Ce(I.root,I.modal,u),open:b,ownerState:k,onClose:m,hideBackdrop:p,ref:n},R,E,{children:L}))});var yq=vq;const bq=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","type"],xq=e=>{const{classes:t,disableUnderline:n}=e,o=Qe({root:["root",!n&&"underline"],input:["input"]},cH,t);return T({},t,o)},wq=z(dv,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r=e.palette.mode==="light",o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return T({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${Ya.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${Ya.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ya.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ya.error}:after`]:{borderBottomColor:(e.vars||e).palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ya.disabled}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ya.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&T({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),Sq=z(pv,{name:"MuiFilledInput",slot:"Input",overridesResolver:uv})(({theme:e,ownerState:t})=>T({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9})),m4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFilledInput"}),{components:o={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,type:u="text"}=r,d=Re(r,bq),p=T({},r,{fullWidth:s,inputComponent:l,multiline:c,type:u}),h=xq(r),m={root:{ownerState:p},input:{ownerState:p}},b=a?vo(a,m):m;return i(fv,T({components:T({Root:wq,Input:Sq},o),componentsProps:b,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:u},d,{classes:h}))});m4.muiName="Input";var g4=m4;function Cq(e){return Xe("MuiFormControl",e)}Ke("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Eq=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Tq=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${se(n)}`,r&&"fullWidth"]};return Qe(o,Cq,t)},Rq=z("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${se(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),kq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormControl"}),{children:o,className:a,color:s="primary",component:l="div",disabled:c=!1,error:u=!1,focused:d,fullWidth:p=!1,hiddenLabel:h=!1,margin:m="none",required:b=!1,size:y="medium",variant:g="outlined"}=r,x=Re(r,Eq),v=T({},r,{color:s,component:l,disabled:c,error:u,fullWidth:p,hiddenLabel:h,margin:m,required:b,size:y,variant:g}),S=Tq(v),[E,R]=f.exports.useState(()=>{let H=!1;return o&&f.exports.Children.forEach(o,U=>{if(!Xd(U,["Input","Select"]))return;const Z=Xd(U,["Select"])?U.props.input:U;Z&&QW(Z.props)&&(H=!0)}),H}),[A,_]=f.exports.useState(()=>{let H=!1;return o&&f.exports.Children.forEach(o,U=>{!Xd(U,["Input","Select"])||rS(U.props,!0)&&(H=!0)}),H}),[N,k]=f.exports.useState(!1);c&&N&&k(!1);const I=d!==void 0&&!c?d:N;let O;const L=f.exports.useCallback(()=>{_(!0)},[]),q=f.exports.useCallback(()=>{_(!1)},[]),D={adornedStart:E,setAdornedStart:R,color:s,disabled:c,error:u,filled:A,focused:I,fullWidth:p,hiddenLabel:h,size:y,onBlur:()=>{k(!1)},onEmpty:q,onFilled:L,onFocus:()=>{k(!0)},registerEffect:O,required:b,variant:g};return i(lv.Provider,{value:D,children:i(Rq,T({as:l,ownerState:v,className:Ce(S.root,a),ref:n},x,{children:o}))})});var qo=kq;function _q(e){return Xe("MuiFormControlLabel",e)}const Iq=Ke("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]);var Ch=Iq;const Aq=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],Nq=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o}=e,a={root:["root",n&&"disabled",`labelPlacement${se(r)}`,o&&"error"],label:["label",n&&"disabled"]};return Qe(a,_q,t)},$q=z("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ch.label}`]:t.label},t.root,t[`labelPlacement${se(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>T({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Ch.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${Ch.label}`]:{[`&.${Ch.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Pq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:c,label:u,labelPlacement:d="end"}=r,p=Re(r,Aq),h=gi();let m=l;typeof m=="undefined"&&typeof s.props.disabled!="undefined"&&(m=s.props.disabled),typeof m=="undefined"&&h&&(m=h.disabled);const b={disabled:m};["checked","name","onChange","value","inputRef"].forEach(S=>{typeof s.props[S]=="undefined"&&typeof r[S]!="undefined"&&(b[S]=r[S])});const y=Us({props:r,muiFormControl:h,states:["error"]}),g=T({},r,{disabled:m,labelPlacement:d,error:y.error}),x=Nq(g);let v=u;return v!=null&&v.type!==Te&&!c&&(v=i(Te,T({component:"span",className:x.label},a.typography,{children:v}))),w($q,T({className:Ce(x.root,o),ownerState:g,ref:n},p,{children:[f.exports.cloneElement(s,b),v]}))});var $n=Pq;function Oq(e){return Xe("MuiFormGroup",e)}Ke("MuiFormGroup",["root","row","error"]);const Dq=["className","row"],Lq=e=>{const{classes:t,row:n,error:r}=e;return Qe({root:["root",n&&"row",r&&"error"]},Oq,t)},Mq=z("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})(({ownerState:e})=>T({display:"flex",flexDirection:"column",flexWrap:"wrap"},e.row&&{flexDirection:"row"})),Bq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormGroup"}),{className:o,row:a=!1}=r,s=Re(r,Dq),l=gi(),c=Us({props:r,muiFormControl:l,states:["error"]}),u=T({},r,{row:a,error:c.error}),d=Lq(u);return i(Mq,T({className:Ce(d.root,o),ownerState:u,ref:n},s))});var v4=Bq;function Fq(e){return Xe("MuiFormHelperText",e)}const zq=Ke("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var TR=zq,RR;const jq=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Uq=e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:s,focused:l,required:c}=e,u={root:["root",o&&"disabled",a&&"error",r&&`size${se(r)}`,n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return Qe(u,Fq,t)},Wq=z("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${se(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>T({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${TR.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${TR.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),Hq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormHelperText"}),{children:o,className:a,component:s="p"}=r,l=Re(r,jq),c=gi(),u=Us({props:r,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),d=T({},r,{component:s,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),p=Uq(d);return i(Wq,T({as:s,ownerState:d,className:Ce(p.root,a),ref:n},l,{children:o===" "?RR||(RR=i("span",{className:"notranslate",children:"\u200B"})):o}))});var Vq=Hq;function Gq(e){return Xe("MuiFormLabel",e)}const qq=Ke("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var np=qq;const Yq=["children","className","color","component","disabled","error","filled","focused","required"],Kq=e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:s,required:l}=e,c={root:["root",`color${se(n)}`,o&&"disabled",a&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",a&&"error"]};return Qe(c,Gq,t)},Xq=z("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>T({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${np.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${np.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${np.error}`]:{color:(e.vars||e).palette.error.main}})),Jq=z("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${np.error}`]:{color:(e.vars||e).palette.error.main}})),Qq=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiFormLabel"}),{children:o,className:a,component:s="label"}=r,l=Re(r,Yq),c=gi(),u=Us({props:r,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),d=T({},r,{color:u.color||"primary",component:s,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),p=Kq(d);return w(Xq,T({as:s,ownerState:d,className:Ce(p.root,a),ref:n},l,{children:[o,u.required&&w(Jq,{ownerState:d,"aria-hidden":!0,className:p.asterisk,children:["\u2009","*"]})]}))});var Zq=Qq;const eY=f.exports.createContext();var kR=eY;function tY(e){return Xe("MuiGrid",e)}const nY=[0,1,2,3,4,5,6,7,8,9,10],rY=["column-reverse","column","row-reverse","row"],oY=["nowrap","wrap-reverse","wrap"],cd=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Np=Ke("MuiGrid",["root","container","item","zeroMinWidth",...nY.map(e=>`spacing-xs-${e}`),...rY.map(e=>`direction-xs-${e}`),...oY.map(e=>`wrap-xs-${e}`),...cd.map(e=>`grid-xs-${e}`),...cd.map(e=>`grid-sm-${e}`),...cd.map(e=>`grid-md-${e}`),...cd.map(e=>`grid-lg-${e}`),...cd.map(e=>`grid-xl-${e}`)]),aY=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Gc(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function iY({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,o)=>{let a={};if(t[o]&&(n=t[o]),!n)return r;if(n===!0)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=ev({values:t.columns,breakpoints:e.breakpoints.values}),l=typeof s=="object"?s[o]:s;if(l==null)return r;const c=`${Math.round(n/l*1e8)/1e6}%`;let u={};if(t.container&&t.item&&t.columnSpacing!==0){const d=e.spacing(t.columnSpacing);if(d!=="0px"){const p=`calc(${c} + ${Gc(d)})`;u={flexBasis:p,maxWidth:p}}}a=T({flexBasis:c,flexGrow:0,maxWidth:c},u)}return e.breakpoints.values[o]===0?Object.assign(r,a):r[e.breakpoints.up(o)]=a,r},{})}function sY({theme:e,ownerState:t}){const n=ev({values:t.direction,breakpoints:e.breakpoints.values});return Ba({theme:e},n,r=>{const o={flexDirection:r};return r.indexOf("column")===0&&(o[`& > .${Np.item}`]={maxWidth:"none"}),o})}function y4({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(o=>{n===""&&t[o]!==0&&(n=o)});const r=Object.keys(e).sort((o,a)=>e[o]-e[a]);return r.slice(0,r.indexOf(n))}function lY({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&r!==0){const a=ev({values:r,breakpoints:e.breakpoints.values});let s;typeof a=="object"&&(s=y4({breakpoints:e.breakpoints.values,values:a})),o=Ba({theme:e},a,(l,c)=>{var u;const d=e.spacing(l);return d!=="0px"?{marginTop:`-${Gc(d)}`,[`& > .${Np.item}`]:{paddingTop:Gc(d)}}:(u=s)!=null&&u.includes(c)?{}:{marginTop:0,[`& > .${Np.item}`]:{paddingTop:0}}})}return o}function cY({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&r!==0){const a=ev({values:r,breakpoints:e.breakpoints.values});let s;typeof a=="object"&&(s=y4({breakpoints:e.breakpoints.values,values:a})),o=Ba({theme:e},a,(l,c)=>{var u;const d=e.spacing(l);return d!=="0px"?{width:`calc(100% + ${Gc(d)})`,marginLeft:`-${Gc(d)}`,[`& > .${Np.item}`]:{paddingLeft:Gc(d)}}:(u=s)!=null&&u.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${Np.item}`]:{paddingLeft:0}}})}return o}function uY(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(o=>{const a=e[o];Number(a)>0&&r.push(n[`spacing-${o}-${String(a)}`])}),r}const dY=z("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:a,spacing:s,wrap:l,zeroMinWidth:c,breakpoints:u}=n;let d=[];r&&(d=uY(s,u,t));const p=[];return u.forEach(h=>{const m=n[h];m&&p.push(t[`grid-${h}-${String(m)}`])}),[t.root,r&&t.container,a&&t.item,c&&t.zeroMinWidth,...d,o!=="row"&&t[`direction-xs-${String(o)}`],l!=="wrap"&&t[`wrap-xs-${String(l)}`],...p]}})(({ownerState:e})=>T({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),sY,lY,cY,iY);function pY(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const o=e[r];if(Number(o)>0){const a=`spacing-${r}-${String(o)}`;n.push(a)}}),n}const fY=e=>{const{classes:t,container:n,direction:r,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=e;let u=[];n&&(u=pY(a,c));const d=[];c.forEach(h=>{const m=e[h];m&&d.push(`grid-${h}-${String(m)}`)});const p={root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return Qe(p,tY,t)},hY=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiGrid"}),{breakpoints:o}=pn(),a=Mw(r),{className:s,columns:l,columnSpacing:c,component:u="div",container:d=!1,direction:p="row",item:h=!1,rowSpacing:m,spacing:b=0,wrap:y="wrap",zeroMinWidth:g=!1}=a,x=Re(a,aY),v=m||b,S=c||b,E=f.exports.useContext(kR),R=d?l||12:E,A={},_=T({},x);o.keys.forEach(I=>{x[I]!=null&&(A[I]=x[I],delete _[I])});const N=T({},a,{columns:R,container:d,direction:p,item:h,rowSpacing:v,columnSpacing:S,wrap:y,zeroMinWidth:g,spacing:b},A,{breakpoints:o.keys}),k=fY(N);return i(kR.Provider,{value:R,children:i(dY,T({ownerState:N,className:Ce(k.root,s),as:u,ref:n},_))})});var de=hY;const mY=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Sb(e){return`scale(${e}, ${e**2})`}const gY={entering:{opacity:1,transform:Sb(1)},entered:{opacity:1,transform:"none"}},P0=typeof navigator!="undefined"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),b4=f.exports.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:p,onExited:h,onExiting:m,style:b,timeout:y="auto",TransitionComponent:g=av}=t,x=Re(t,mY),v=f.exports.useRef(),S=f.exports.useRef(),E=pn(),R=f.exports.useRef(null),A=Xt(a.ref,n),_=Xt(R,A),N=U=>Z=>{if(U){const G=R.current;Z===void 0?U(G):U(G,Z)}},k=N(d),I=N((U,Z)=>{tS(U);const{duration:G,delay:B,easing:Y}=$s({style:b,timeout:y,easing:s},{mode:"enter"});let K;y==="auto"?(K=E.transitions.getAutoHeightDuration(U.clientHeight),S.current=K):K=G,U.style.transition=[E.transitions.create("opacity",{duration:K,delay:B}),E.transitions.create("transform",{duration:P0?K:K*.666,delay:B,easing:Y})].join(","),c&&c(U,Z)}),O=N(u),L=N(m),q=N(U=>{const{duration:Z,delay:G,easing:B}=$s({style:b,timeout:y,easing:s},{mode:"exit"});let Y;y==="auto"?(Y=E.transitions.getAutoHeightDuration(U.clientHeight),S.current=Y):Y=Z,U.style.transition=[E.transitions.create("opacity",{duration:Y,delay:G}),E.transitions.create("transform",{duration:P0?Y:Y*.666,delay:P0?G:G||Y*.333,easing:B})].join(","),U.style.opacity=0,U.style.transform=Sb(.75),p&&p(U)}),D=N(h),H=U=>{y==="auto"&&(v.current=setTimeout(U,S.current||0)),r&&r(R.current,U)};return f.exports.useEffect(()=>()=>{clearTimeout(v.current)},[]),i(g,T({appear:o,in:l,nodeRef:R,onEnter:I,onEntered:O,onEntering:k,onExit:q,onExited:D,onExiting:L,addEndListener:H,timeout:y==="auto"?null:y},x,{children:(U,Z)=>f.exports.cloneElement(a,T({style:T({opacity:0,transform:Sb(.75),visibility:U==="exited"&&!l?"hidden":void 0},gY[U],b,a.props.style),ref:_},Z))}))});b4.muiSupportAuto=!0;var Cb=b4;function vY(e,t,n,r,o){const a=typeof window!="undefined"&&typeof window.matchMedia!="undefined",[s,l]=f.exports.useState(()=>o&&a?n(e).matches:r?r(e).matches:t);return Oo(()=>{let c=!0;if(!a)return;const u=n(e),d=()=>{c&&l(u.matches)};return d(),u.addListener(d),()=>{c=!1,u.removeListener(d)}},[e,n,a]),s}const x4=Rs["useSyncExternalStore"];function yY(e,t,n,r){const o=f.exports.useCallback(()=>t,[t]),a=f.exports.useMemo(()=>{if(r!==null){const{matches:u}=r(e);return()=>u}return o},[o,e,r]),[s,l]=f.exports.useMemo(()=>{if(n===null)return[o,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addListener(d),()=>{u.removeListener(d)})]},[o,n,e]);return x4(l,s,a)}function an(e,t={}){const n=Bw(),r=typeof window!="undefined"&&typeof window.matchMedia!="undefined",{defaultMatches:o=!1,matchMedia:a=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l}=ON({name:"MuiUseMediaQuery",props:t,theme:n});let c=typeof e=="function"?e(n):e;return c=c.replace(/^@media( ?)/m,""),(x4!==void 0?yY:vY)(c,o,a,s,l)}function bY(e){return Xe("MuiIcon",e)}Ke("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const xY=["baseClassName","className","color","component","fontSize"],wY=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${se(t)}`,`fontSize${se(n)}`]};return Qe(o,bY,r)},SY=z("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${se(n.color)}`],t[`fontSize${se(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[t.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[t.color]})),w4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiIcon"}),{baseClassName:o="material-icons",className:a,color:s="inherit",component:l="span",fontSize:c="medium"}=r,u=Re(r,xY),d=T({},r,{baseClassName:o,color:s,component:l,fontSize:c}),p=wY(d);return i(SY,T({as:l,className:Ce(o,"notranslate",p.root,a),ownerState:d,"aria-hidden":!0,ref:n},u))});w4.muiName="Icon";var S4=w4;const CY=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],EY=e=>{const{classes:t,disableUnderline:n}=e,o=Qe({root:["root",!n&&"underline"],input:["input"]},aH,t);return T({},t,o)},TY=z(dv,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...cv(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),T({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${xl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${xl.error}:after`]:{borderBottomColor:(e.vars||e).palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${xl.disabled}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${xl.disabled}:before`]:{borderBottomStyle:"dotted"}})}),RY=z(pv,{name:"MuiInput",slot:"Input",overridesResolver:uv})({}),C4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiInput"}),{disableUnderline:o,components:a={},componentsProps:s,fullWidth:l=!1,inputComponent:c="input",multiline:u=!1,type:d="text"}=r,p=Re(r,CY),h=EY(r),b={root:{ownerState:{disableUnderline:o}}},y=s?vo(s,b):b;return i(fv,T({components:T({Root:TY,Input:RY},a),componentsProps:y,fullWidth:l,inputComponent:c,multiline:u,ref:n,type:d},p,{classes:h}))});C4.muiName="Input";var E4=C4;function kY(e){return Xe("MuiInputAdornment",e)}const _Y=Ke("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var _R=_Y,IR;const IY=["children","className","component","disablePointerEvents","disableTypography","position","variant"],AY=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${se(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},NY=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:s}=e,l={root:["root",n&&"disablePointerEvents",o&&`position${se(o)}`,s,r&&"hiddenLabel",a&&`size${se(a)}`]};return Qe(l,kY,t)},$Y=z("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:AY})(({theme:e,ownerState:t})=>T({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},t.variant==="filled"&&{[`&.${_R.positionStart}&:not(.${_R.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),PY=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiInputAdornment"}),{children:o,className:a,component:s="div",disablePointerEvents:l=!1,disableTypography:c=!1,position:u,variant:d}=r,p=Re(r,IY),h=gi()||{};let m=d;d&&h.variant,h&&!m&&(m=h.variant);const b=T({},r,{hiddenLabel:h.hiddenLabel,size:h.size,disablePointerEvents:l,position:u,variant:m}),y=NY(b);return i(lv.Provider,{value:null,children:i($Y,T({as:s,ownerState:b,className:Ce(y.root,a),ref:n},p,{children:typeof o=="string"&&!c?i(Te,{color:"text.secondary",children:o}):w(f.exports.Fragment,{children:[u==="start"?IR||(IR=i("span",{className:"notranslate",children:"\u200B"})):null,o]})}))})});var sS=PY;function OY(e){return Xe("MuiInputLabel",e)}Ke("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const DY=["disableAnimation","margin","shrink","variant"],LY=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:a,variant:s,required:l}=e,u=Qe({root:["root",n&&"formControl",!a&&"animated",o&&"shrink",r==="small"&&"sizeSmall",s],asterisk:[l&&"asterisk"]},OY,t);return T({},t,u)},MY=z(Zq,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${np.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})(({theme:e,ownerState:t})=>T({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&T({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&T({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&T({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))),BY=f.exports.forwardRef(function(t,n){const r=Je({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:a}=r,s=Re(r,DY),l=gi();let c=a;typeof c=="undefined"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Us({props:r,muiFormControl:l,states:["size","variant","required"]}),d=T({},r,{disableAnimation:o,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required}),p=LY(d);return i(MY,T({"data-shrink":c,ownerState:d,ref:n},s,{classes:p}))});var Iu=BY;function FY(e){return Xe("MuiLinearProgress",e)}Ke("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const zY=["className","color","value","valueBuffer","variant"];let Au=e=>e,AR,NR,$R,PR,OR,DR;const Eb=4,jY=mi(AR||(AR=Au`
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
`)),UY=mi(NR||(NR=Au`
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
`)),WY=mi($R||($R=Au`
  0% {
    opacity: 1;
    background-position: 0 -23px;
  }

  60% {
    opacity: 0;
    background-position: 0 -23px;
  }

  100% {
    opacity: 1;
    background-position: -200px -23px;
  }
`)),HY=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${se(r)}`,n],dashed:["dashed",`dashedColor${se(r)}`],bar1:["bar",`barColor${se(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${se(r)}`,n==="buffer"&&`color${se(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return Qe(o,FY,t)},lS=(e,t)=>t==="inherit"?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?nn(e.palette[t].main,.62):tn(e.palette[t].main,.5),VY=z("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${se(n.color)}`],t[n.variant]]}})(({ownerState:e,theme:t})=>T({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:lS(t,e.color)},e.color==="inherit"&&e.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},e.variant==="buffer"&&{backgroundColor:"transparent"},e.variant==="query"&&{transform:"rotate(180deg)"})),GY=z("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${se(n.color)}`]]}})(({ownerState:e,theme:t})=>{const n=lS(t,e.color);return T({position:"absolute",marginTop:0,height:"100%",width:"100%"},e.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},Ms(PR||(PR=Au`
    animation: ${0} 3s infinite linear;
  `),WY)),qY=z("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(({ownerState:e,theme:t})=>T({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.variant==="determinate"&&{transition:`transform .${Eb}s linear`},e.variant==="buffer"&&{zIndex:1,transition:`transform .${Eb}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Ms(OR||(OR=Au`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    `),jY)),YY=z("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>T({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:lS(t,e.color),transition:`transform .${Eb}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Ms(DR||(DR=Au`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
    `),UY)),KY=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiLinearProgress"}),{className:o,color:a="primary",value:s,valueBuffer:l,variant:c="indeterminate"}=r,u=Re(r,zY),d=T({},r,{color:a,variant:c}),p=HY(d),h=pn(),m={},b={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&s!==void 0){m["aria-valuenow"]=Math.round(s),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let y=s-100;h.direction==="rtl"&&(y=-y),b.bar1.transform=`translateX(${y}%)`}if(c==="buffer"&&l!==void 0){let y=(l||0)-100;h.direction==="rtl"&&(y=-y),b.bar2.transform=`translateX(${y}%)`}return w(VY,T({className:Ce(p.root,o),ownerState:d,role:"progressbar"},m,{ref:n},u,{children:[c==="buffer"?i(GY,{className:p.dashed,ownerState:d}):null,i(qY,{className:p.bar1,ownerState:d,style:b.bar1}),c==="determinate"?null:i(YY,{className:p.bar2,ownerState:d,style:b.bar2})]}))});var XY=KY;function JY(e){return Xe("MuiLink",e)}const QY=Ke("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var ZY=QY;const T4={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},eK=e=>T4[e]||e,tK=({theme:e,ownerState:t})=>{const n=eK(t.color),r=_p(e,`palette.${n}`,!1)||t.color,o=_p(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:$t(r,.4)};var nK=tK;const rK=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],oK=e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,a={root:["root",`underline${se(o)}`,n==="button"&&"button",r&&"focusVisible"]};return Qe(a,JY,t)},aK=z(Te,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${se(n.underline)}`],n.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>T({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&T({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:nK({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ZY.focusVisible}`]:{outline:"auto"}})),iK=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiLink"}),{className:o,color:a="primary",component:s="a",onBlur:l,onFocus:c,TypographyClasses:u,underline:d="always",variant:p="inherit",sx:h}=r,m=Re(r,rK),{isFocusVisibleRef:b,onBlur:y,onFocus:g,ref:x}=df(),[v,S]=f.exports.useState(!1),E=Xt(n,x),R=k=>{y(k),b.current===!1&&S(!1),l&&l(k)},A=k=>{g(k),b.current===!0&&S(!0),c&&c(k)},_=T({},r,{color:a,component:s,focusVisible:v,underline:d,variant:p}),N=oK(_);return i(aK,T({color:a,className:Ce(N.root,o),classes:u,component:s,onBlur:R,onFocus:A,ref:E,ownerState:_,variant:p,sx:[...Object.keys(T4).includes(a)?[]:[{color:a}],...Array.isArray(h)?h:[h]]},m))});var Fl=iK;const sK=f.exports.createContext({});var si=sK;function lK(e){return Xe("MuiList",e)}Ke("MuiList",["root","padding","dense","subheader"]);const cK=["children","className","component","dense","disablePadding","subheader"],uK=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Qe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},lK,t)},dK=z("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>T({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),pK=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiList"}),{children:o,className:a,component:s="ul",dense:l=!1,disablePadding:c=!1,subheader:u}=r,d=Re(r,cK),p=f.exports.useMemo(()=>({dense:l}),[l]),h=T({},r,{component:s,dense:l,disablePadding:c}),m=uK(h);return i(si.Provider,{value:p,children:w(dK,T({as:s,className:Ce(m.root,a),ref:n,ownerState:h},d,{children:[u,o]}))})});var Po=pK;function fK(e){return Xe("MuiListItem",e)}const hK=Ke("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var kc=hK;const mK=Ke("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);var gK=mK;function vK(e){return Xe("MuiListItemSecondaryAction",e)}Ke("MuiListItemSecondaryAction",["root","disableGutters"]);const yK=["className"],bK=e=>{const{disableGutters:t,classes:n}=e;return Qe({root:["root",t&&"disableGutters"]},vK,n)},xK=z("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>T({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),R4=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=r,a=Re(r,yK),s=f.exports.useContext(si),l=T({},r,{disableGutters:s.disableGutters}),c=bK(l);return i(xK,T({className:Ce(c.root,o),ownerState:l,ref:n},a))});R4.muiName="ListItemSecondaryAction";var wK=R4;const SK=["className"],CK=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected"],EK=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]},TK=e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:a,disableGutters:s,disablePadding:l,divider:c,hasSecondaryAction:u,selected:d}=e;return Qe({root:["root",o&&"dense",!s&&"gutters",!l&&"padding",c&&"divider",a&&"disabled",n&&"button",t==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",d&&"selected"],container:["container"]},fK,r)},RK=z("div",{name:"MuiListItem",slot:"Root",overridesResolver:EK})(({theme:e,ownerState:t})=>T({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&T({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${gK.root}`]:{paddingRight:48}},{[`&.${kc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${kc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${kc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${kc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${kc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),kK=z("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),_K=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:a=!1,button:s=!1,children:l,className:c,component:u,components:d={},componentsProps:p={},ContainerComponent:h="li",ContainerProps:{className:m}={},dense:b=!1,disabled:y=!1,disableGutters:g=!1,disablePadding:x=!1,divider:v=!1,focusVisibleClassName:S,secondaryAction:E,selected:R=!1}=r,A=Re(r.ContainerProps,SK),_=Re(r,CK),N=f.exports.useContext(si),k={dense:b||N.dense||!1,alignItems:o,disableGutters:g},I=f.exports.useRef(null);Oo(()=>{a&&I.current&&I.current.focus()},[a]);const O=f.exports.Children.toArray(l),L=O.length&&Xd(O[O.length-1],["ListItemSecondaryAction"]),q=T({},r,{alignItems:o,autoFocus:a,button:s,dense:k.dense,disabled:y,disableGutters:g,disablePadding:x,divider:v,hasSecondaryAction:L,selected:R}),D=TK(q),H=Xt(I,n),U=d.Root||RK,Z=p.root||{},G=T({className:Ce(D.root,Z.className,c),disabled:y},_);let B=u||"li";return s&&(G.component=u||"div",G.focusVisibleClassName=Ce(kc.focusVisible,S),B=Ma),L?(B=!G.component&&!u?"div":B,h==="li"&&(B==="li"?B="div":G.component==="li"&&(G.component="div")),i(si.Provider,{value:k,children:w(kK,T({as:h,className:Ce(D.container,m),ref:H,ownerState:q},A,{children:[i(U,T({},Z,!ai(U)&&{as:B,ownerState:T({},q,Z.ownerState)},G,{children:O})),O.pop()]}))})):i(si.Provider,{value:k,children:w(U,T({},Z,{as:B,ref:H,ownerState:q},!ai(U)&&{ownerState:T({},q,Z.ownerState)},G,{children:[O,E&&i(wK,{children:E})]}))})});var Rn=_K;function IK(e){return Xe("MuiListItemAvatar",e)}Ke("MuiListItemAvatar",["root","alignItemsFlexStart"]);const AK=["className"],NK=e=>{const{alignItems:t,classes:n}=e;return Qe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},IK,n)},$K=z("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>T({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),PK=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemAvatar"}),{className:o}=r,a=Re(r,AK),s=f.exports.useContext(si),l=T({},r,{alignItems:s.alignItems}),c=NK(l);return i($K,T({className:Ce(c.root,o),ownerState:l,ref:n},a))});var ps=PK;function OK(e){return Xe("MuiListItemIcon",e)}const DK=Ke("MuiListItemIcon",["root","alignItemsFlexStart"]);var LR=DK;const LK=["className"],MK=e=>{const{alignItems:t,classes:n}=e;return Qe({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},OK,n)},BK=z("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>T({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),FK=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemIcon"}),{className:o}=r,a=Re(r,LK),s=f.exports.useContext(si),l=T({},r,{alignItems:s.alignItems}),c=MK(l);return i(BK,T({className:Ce(c.root,o),ownerState:l,ref:n},a))});var Mi=FK;function zK(e){return Xe("MuiListItemText",e)}const jK=Ke("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var Um=jK;const UK=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],WK=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e;return Qe({root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},zK,t)},HK=z("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Um.primary}`]:t.primary},{[`& .${Um.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>T({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),VK=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiListItemText"}),{children:o,className:a,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:p}=r,h=Re(r,UK),{dense:m}=f.exports.useContext(si);let b=c!=null?c:o,y=d;const g=T({},r,{disableTypography:s,inset:l,primary:!!b,secondary:!!y,dense:m}),x=WK(g);return b!=null&&b.type!==Te&&!s&&(b=i(Te,T({variant:m?"body2":"body1",className:x.primary,component:"span",display:"block"},u,{children:b}))),y!=null&&y.type!==Te&&!s&&(y=i(Te,T({variant:"body2",className:x.secondary,color:"text.secondary",display:"block"},p,{children:y}))),w(HK,T({className:Ce(x.root,a),ownerState:g,ref:n},h,{children:[b,y]}))});var dn=VK;const GK=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function O0(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function MR(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function k4(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function ud(e,t,n,r,o,a){let s=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const c=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!k4(l,a)||c)l=o(e,l,n);else return l.focus(),!0}return!1}const qK=f.exports.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:a=!1,children:s,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:p="selectedMenu"}=t,h=Re(t,GK),m=f.exports.useRef(null),b=f.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Oo(()=>{o&&m.current.focus()},[o]),f.exports.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,E)=>{const R=!m.current.style.width;if(S.clientHeight<m.current.clientHeight&&R){const A=`${uN(or(S))}px`;m.current.style[E.direction==="rtl"?"paddingLeft":"paddingRight"]=A,m.current.style.width=`calc(100% + ${A})`}return m.current}}),[]);const y=S=>{const E=m.current,R=S.key,A=or(E).activeElement;if(R==="ArrowDown")S.preventDefault(),ud(E,A,u,c,O0);else if(R==="ArrowUp")S.preventDefault(),ud(E,A,u,c,MR);else if(R==="Home")S.preventDefault(),ud(E,null,u,c,O0);else if(R==="End")S.preventDefault(),ud(E,null,u,c,MR);else if(R.length===1){const _=b.current,N=R.toLowerCase(),k=performance.now();_.keys.length>0&&(k-_.lastTime>500?(_.keys=[],_.repeating=!0,_.previousKeyMatched=!0):_.repeating&&N!==_.keys[0]&&(_.repeating=!1)),_.lastTime=k,_.keys.push(N);const I=A&&!_.repeating&&k4(A,_);_.previousKeyMatched&&(I||ud(E,A,!1,c,O0,_))?S.preventDefault():_.previousKeyMatched=!1}d&&d(S)},g=Xt(m,n);let x=-1;f.exports.Children.forEach(s,(S,E)=>{!f.exports.isValidElement(S)||S.props.disabled||(p==="selectedMenu"&&S.props.selected||x===-1)&&(x=E)});const v=f.exports.Children.map(s,(S,E)=>{if(E===x){const R={};return a&&(R.autoFocus=!0),S.props.tabIndex===void 0&&p==="selectedMenu"&&(R.tabIndex=0),f.exports.cloneElement(S,R)}return S});return i(Po,T({role:"menu",ref:g,className:l,onKeyDown:y,tabIndex:o?0:-1},h,{children:v}))});var mv=qK;function YK(e){return Xe("MuiPopover",e)}Ke("MuiPopover",["root","paper"]);const KK=["onEntering"],XK=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function BR(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function FR(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function zR(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function D0(e){return typeof e=="function"?e():e}const JK=e=>{const{classes:t}=e;return Qe({root:["root"],paper:["paper"]},YK,t)},QK=z(yf,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ZK=z(yr,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),eX=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiPopover"}),{action:o,anchorEl:a,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:u,className:d,container:p,elevation:h=8,marginThreshold:m=16,open:b,PaperProps:y={},transformOrigin:g={vertical:"top",horizontal:"left"},TransitionComponent:x=Cb,transitionDuration:v="auto",TransitionProps:{onEntering:S}={}}=r,E=Re(r.TransitionProps,KK),R=Re(r,XK),A=f.exports.useRef(),_=Xt(A,y.ref),N=T({},r,{anchorOrigin:s,anchorReference:c,elevation:h,marginThreshold:m,PaperProps:y,transformOrigin:g,TransitionComponent:x,transitionDuration:v,TransitionProps:E}),k=JK(N),I=f.exports.useCallback(()=>{if(c==="anchorPosition")return l;const Z=D0(a),B=(Z&&Z.nodeType===1?Z:or(A.current).body).getBoundingClientRect();return{top:B.top+BR(B,s.vertical),left:B.left+FR(B,s.horizontal)}},[a,s.horizontal,s.vertical,l,c]),O=f.exports.useCallback(Z=>({vertical:BR(Z,g.vertical),horizontal:FR(Z,g.horizontal)}),[g.horizontal,g.vertical]),L=f.exports.useCallback(Z=>{const G={width:Z.offsetWidth,height:Z.offsetHeight},B=O(G);if(c==="none")return{top:null,left:null,transformOrigin:zR(B)};const Y=I();let K=Y.top-B.vertical,Q=Y.left-B.horizontal;const re=K+G.height,pe=Q+G.width,ye=fa(D0(a)),ae=ye.innerHeight-m,oe=ye.innerWidth-m;if(K<m){const ue=K-m;K-=ue,B.vertical+=ue}else if(re>ae){const ue=re-ae;K-=ue,B.vertical+=ue}if(Q<m){const ue=Q-m;Q-=ue,B.horizontal+=ue}else if(pe>oe){const ue=pe-oe;Q-=ue,B.horizontal+=ue}return{top:`${Math.round(K)}px`,left:`${Math.round(Q)}px`,transformOrigin:zR(B)}},[a,c,I,O,m]),q=f.exports.useCallback(()=>{const Z=A.current;if(!Z)return;const G=L(Z);G.top!==null&&(Z.style.top=G.top),G.left!==null&&(Z.style.left=G.left),Z.style.transformOrigin=G.transformOrigin},[L]),D=(Z,G)=>{S&&S(Z,G),q()};f.exports.useEffect(()=>{b&&q()}),f.exports.useImperativeHandle(o,()=>b?{updatePosition:()=>{q()}}:null,[b,q]),f.exports.useEffect(()=>{if(!b)return;const Z=Ll(()=>{q()}),G=fa(a);return G.addEventListener("resize",Z),()=>{Z.clear(),G.removeEventListener("resize",Z)}},[a,b,q]);let H=v;v==="auto"&&!x.muiSupportAuto&&(H=void 0);const U=p||(a?or(D0(a)).body:void 0);return i(QK,T({BackdropProps:{invisible:!0},className:Ce(k.root,d),container:U,open:b,ref:n,ownerState:N},R,{children:i(x,T({appear:!0,in:b,onEntering:D,timeout:H},E,{children:i(ZK,T({elevation:h},y,{ref:_,className:Ce(k.paper,y.className),children:u}))}))}))});var Xl=eX;function tX(e){return Xe("MuiMenu",e)}Ke("MuiMenu",["root","paper","list"]);const nX=["onEntering"],rX=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],oX={vertical:"top",horizontal:"right"},aX={vertical:"top",horizontal:"left"},iX=e=>{const{classes:t}=e;return Qe({root:["root"],paper:["paper"],list:["list"]},tX,t)},sX=z(Xl,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),lX=z(yr,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),cX=z(mv,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),uX=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:p,transitionDuration:h="auto",TransitionProps:{onEntering:m}={},variant:b="selectedMenu"}=r,y=Re(r.TransitionProps,nX),g=Re(r,rX),x=pn(),v=x.direction==="rtl",S=T({},r,{autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:h,TransitionProps:y,variant:b}),E=iX(S),R=o&&!s&&u,A=f.exports.useRef(null),_=(I,O)=>{A.current&&A.current.adjustStyleForScrollbar(I,x),m&&m(I,O)},N=I=>{I.key==="Tab"&&(I.preventDefault(),c&&c(I,"tabKeyDown"))};let k=-1;return f.exports.Children.map(a,(I,O)=>{!f.exports.isValidElement(I)||I.props.disabled||(b==="selectedMenu"&&I.props.selected||k===-1)&&(k=O)}),i(sX,T({classes:p,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:v?"right":"left"},transformOrigin:v?oX:aX,PaperProps:T({component:lX},d,{classes:T({},d.classes,{root:E.paper})}),className:E.root,open:u,ref:n,transitionDuration:h,TransitionProps:T({onEntering:_},y),ownerState:S},g,{children:i(cX,T({onKeyDown:N,actions:A,autoFocus:o&&(k===-1||s),autoFocusItem:R,variant:b},l,{className:Ce(E.list,l.className),children:a}))}))});var bf=uX;function dX(e){return Xe("MuiMenuItem",e)}const pX=Ke("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var dd=pX;const fX=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],hX=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},mX=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:s}=e,c=Qe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},dX,s);return T({},s,c)},gX=z(Ma,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:hX})(({theme:e,ownerState:t})=>T({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${dd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${dd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${dd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${dd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${dd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${CR.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${CR.inset}`]:{marginLeft:52},[`& .${Um.root}`]:{marginTop:0,marginBottom:0},[`& .${Um.inset}`]:{paddingLeft:36},[`& .${LR.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&T({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${LR.root} svg`]:{fontSize:"1.25rem"}}))),vX=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:a="li",dense:s=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:p}=r,h=Re(r,fX),m=f.exports.useContext(si),b={dense:s||m.dense||!1,disableGutters:c},y=f.exports.useRef(null);Oo(()=>{o&&y.current&&y.current.focus()},[o]);const g=T({},r,{dense:b.dense,divider:l,disableGutters:c}),x=mX(r),v=Xt(y,n);let S;return r.disabled||(S=p!==void 0?p:-1),i(si.Provider,{value:b,children:i(gX,T({ref:v,role:d,tabIndex:S,component:a,focusVisibleClassName:Ce(x.focusVisible,u)},h,{ownerState:g,classes:x}))})});var _r=vX;function yX(e){return Xe("MuiNativeSelect",e)}const bX=Ke("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var cS=bX;const xX=["className","disabled","IconComponent","inputRef","variant"],wX=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple"],icon:["icon",`icon${se(n)}`,a&&"iconOpen",r&&"disabled"]};return Qe(s,yX,t)},_4=({ownerState:e,theme:t})=>T({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},[`&.${cS.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:t.palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:t.shape.borderRadius,"&:focus":{borderRadius:t.shape.borderRadius},"&&&":{paddingRight:32}}),SX=z("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Qo,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],{[`&.${cS.multiple}`]:t.multiple}]}})(_4),I4=({ownerState:e,theme:t})=>T({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:t.palette.action.active,[`&.${cS.disabled}`]:{color:t.palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),CX=z("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${se(n.variant)}`],n.open&&t.iconOpen]}})(I4),EX=f.exports.forwardRef(function(t,n){const{className:r,disabled:o,IconComponent:a,inputRef:s,variant:l="standard"}=t,c=Re(t,xX),u=T({},t,{disabled:o,variant:l}),d=wX(u);return w(f.exports.Fragment,{children:[i(SX,T({ownerState:u,className:Ce(d.select,r),disabled:o,ref:s||n},c)),t.multiple?null:i(CX,{as:a,ownerState:u,className:d.icon})]})});var TX=EX,jR;const RX=["children","classes","className","label","notched"],kX=z("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),_X=z("legend")(({ownerState:e,theme:t})=>T({float:"unset",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&T({display:"block",width:"auto",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function IX(e){const{className:t,label:n,notched:r}=e,o=Re(e,RX),a=n!=null&&n!=="",s=T({},e,{notched:r,withLabel:a});return i(kX,T({"aria-hidden":!0,className:t,ownerState:s},o,{children:i(_X,{ownerState:s,children:a?i("span",{children:n}):jR||(jR=i("span",{className:"notranslate",children:"\u200B"}))})}))}const AX=["components","fullWidth","inputComponent","label","multiline","notched","type"],NX=e=>{const{classes:t}=e,r=Qe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},sH,t);return T({},t,r)},$X=z(dv,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:cv})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return T({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Wa.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Wa.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Wa.focused} .${Wa.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Wa.error} .${Wa.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Wa.disabled} .${Wa.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&T({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),PX=z(IX,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),OX=z(pv,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:uv})(({theme:e,ownerState:t})=>T({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),A4=f.exports.forwardRef(function(t,n){var r;const o=Je({props:t,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:l="input",label:c,multiline:u=!1,notched:d,type:p="text"}=o,h=Re(o,AX),m=NX(o),b=gi(),y=Us({props:o,muiFormControl:b,states:["required"]}),g=T({},o,{color:y.color||"primary",disabled:y.disabled,error:y.error,focused:y.focused,formControl:b,fullWidth:s,hiddenLabel:y.hiddenLabel,multiline:u,size:y.size,type:p});return i(fv,T({components:T({Root:$X,Input:OX},a),renderSuffix:x=>i(PX,{ownerState:g,className:m.notchedOutline,label:c!=null&&c!==""&&y.required?r||(r=w(f.exports.Fragment,{children:[c,"\xA0","*"]})):c,notched:typeof d!="undefined"?d:Boolean(x.startAdornment||x.filled||x.focused)}),fullWidth:s,inputComponent:l,multiline:u,ref:n,type:p},h,{classes:T({},m,{notchedOutline:null})}))});A4.muiName="Input";var N4=A4,DX=et(i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),LX=et(i("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const MX=z("span")({position:"relative",display:"flex"}),BX=z(DX)({transform:"scale(1)"}),FX=z(LX)(({theme:e,ownerState:t})=>T({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},t.checked&&{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}));function $4(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=T({},e,{checked:t});return w(MX,{className:n.root,ownerState:o,children:[i(BX,{fontSize:r,className:n.background,ownerState:o}),i(FX,{fontSize:r,className:n.dot,ownerState:o})]})}const zX=f.exports.createContext(void 0);var P4=zX;function jX(){return f.exports.useContext(P4)}function UX(e){return Xe("MuiRadio",e)}const WX=Ke("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]);var UR=WX;const HX=["checked","checkedIcon","color","icon","name","onChange","size"],VX=e=>{const{classes:t,color:n}=e,r={root:["root",`color${se(n)}`]};return T({},t,Qe(r,UX,t))},GX=z(iS,{shouldForwardProp:e=>Qo(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${se(n.color)}`]]}})(({theme:e,ownerState:t})=>T({color:(e.vars||e).palette.text.secondary,"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${UR.checked}`]:{color:(e.vars||e).palette[t.color].main}},{[`&.${UR.disabled}`]:{color:(e.vars||e).palette.action.disabled}}));function qX(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const WR=i($4,{checked:!0}),HR=i($4,{}),YX=f.exports.forwardRef(function(t,n){var r,o;const a=Je({props:t,name:"MuiRadio"}),{checked:s,checkedIcon:l=WR,color:c="primary",icon:u=HR,name:d,onChange:p,size:h="medium"}=a,m=Re(a,HX),b=T({},a,{color:c,size:h}),y=VX(b),g=jX();let x=s;const v=Mm(p,g&&g.onChange);let S=d;return g&&(typeof x=="undefined"&&(x=qX(g.value,a.value)),typeof S=="undefined"&&(S=g.name)),i(GX,T({type:"radio",icon:f.exports.cloneElement(u,{fontSize:(r=HR.props.fontSize)!=null?r:h}),checkedIcon:f.exports.cloneElement(l,{fontSize:(o=WR.props.fontSize)!=null?o:h}),ownerState:b,classes:y,name:S,checked:x,onChange:v,ref:n},m))});var wl=YX;const KX=["actions","children","defaultValue","name","onChange","value"],XX=f.exports.forwardRef(function(t,n){const{actions:r,children:o,defaultValue:a,name:s,onChange:l,value:c}=t,u=Re(t,KX),d=f.exports.useRef(null),[p,h]=Oa({controlled:c,default:a,name:"RadioGroup"});f.exports.useImperativeHandle(r,()=>({focus:()=>{let g=d.current.querySelector("input:not(:disabled):checked");g||(g=d.current.querySelector("input:not(:disabled)")),g&&g.focus()}}),[]);const m=Xt(n,d),b=g=>{h(g.target.value),l&&l(g,g.target.value)},y=Eu(s);return i(P4.Provider,{value:{name:y,onChange:b,value:p},children:i(v4,T({role:"radiogroup",ref:m},u,{children:o}))})});var gv=XX;function JX(e){return Xe("MuiSelect",e)}const QX=Ke("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var Eh=QX,VR;const ZX=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],eJ=z("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Eh.select}`]:t.select},{[`&.${Eh.select}`]:t[n.variant]},{[`&.${Eh.multiple}`]:t.multiple}]}})(_4,{[`&.${Eh.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),tJ=z("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${se(n.variant)}`],n.open&&t.iconOpen]}})(I4),nJ=z("input",{shouldForwardProp:e=>Qw(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function GR(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function rJ(e){return e==null||typeof e=="string"&&!e.trim()}const oJ=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple"],icon:["icon",`icon${se(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Qe(s,JX,t)},aJ=f.exports.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":o,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:h,IconComponent:m,inputRef:b,labelId:y,MenuProps:g={},multiple:x,name:v,onBlur:S,onChange:E,onClose:R,onFocus:A,onOpen:_,open:N,readOnly:k,renderValue:I,SelectDisplayProps:O={},tabIndex:L,value:q,variant:D="standard"}=t,H=Re(t,ZX),[U,Z]=Oa({controlled:q,default:d,name:"Select"}),[G,B]=Oa({controlled:N,default:u,name:"Select"}),Y=f.exports.useRef(null),K=f.exports.useRef(null),[Q,re]=f.exports.useState(null),{current:pe}=f.exports.useRef(N!=null),[ye,ae]=f.exports.useState(),oe=Xt(n,b),ue=f.exports.useCallback(te=>{K.current=te,te&&re(te)},[]);f.exports.useImperativeHandle(oe,()=>({focus:()=>{K.current.focus()},node:Y.current,value:U}),[U]),f.exports.useEffect(()=>{u&&G&&Q&&!pe&&(ae(s?null:Q.clientWidth),K.current.focus())},[Q,s]),f.exports.useEffect(()=>{a&&K.current.focus()},[a]),f.exports.useEffect(()=>{if(!y)return;const te=or(K.current).getElementById(y);if(te){const Ee=()=>{getSelection().isCollapsed&&K.current.focus()};return te.addEventListener("click",Ee),()=>{te.removeEventListener("click",Ee)}}},[y]);const ge=(te,Ee)=>{te?_&&_(Ee):R&&R(Ee),pe||(ae(s?null:Q.clientWidth),B(te))},_e=te=>{te.button===0&&(te.preventDefault(),K.current.focus(),ge(!0,te))},We=te=>{ge(!1,te)},be=f.exports.Children.toArray(l),he=te=>{const Ee=be.map(je=>je.props.value).indexOf(te.target.value);if(Ee===-1)return;const me=be[Ee];Z(me.props.value),E&&E(te,me)},He=te=>Ee=>{let me;if(!!Ee.currentTarget.hasAttribute("tabindex")){if(x){me=Array.isArray(U)?U.slice():[];const je=U.indexOf(te.props.value);je===-1?me.push(te.props.value):me.splice(je,1)}else me=te.props.value;if(te.props.onClick&&te.props.onClick(Ee),U!==me&&(Z(me),E)){const je=Ee.nativeEvent||Ee,ut=new je.constructor(je.type,je);Object.defineProperty(ut,"target",{writable:!0,value:{value:me,name:v}}),E(ut,te)}x||ge(!1,Ee)}},Pe=te=>{k||[" ","ArrowUp","ArrowDown","Enter"].indexOf(te.key)!==-1&&(te.preventDefault(),ge(!0,te))},pt=Q!==null&&G,St=te=>{!pt&&S&&(Object.defineProperty(te,"target",{writable:!0,value:{value:U,name:v}}),S(te))};delete H["aria-invalid"];let Ut,zt;const gt=[];let Et=!1;(rS({value:U})||h)&&(I?Ut=I(U):Et=!0);const Qt=be.map((te,Ee,me)=>{if(!f.exports.isValidElement(te))return null;let je;if(x){if(!Array.isArray(U))throw new Error(Go(2));je=U.some(kt=>GR(kt,te.props.value)),je&&Et&&gt.push(te.props.children)}else je=GR(U,te.props.value),je&&Et&&(zt=te.props.children);if(te.props.value===void 0)return f.exports.cloneElement(te,{"aria-readonly":!0,role:"option"});const ut=()=>{if(U)return je;const kt=me.find(cn=>cn.props.value!==void 0&&cn.props.disabled!==!0);return te===kt?!0:je};return f.exports.cloneElement(te,{"aria-selected":je?"true":"false",onClick:He(te),onKeyUp:kt=>{kt.key===" "&&kt.preventDefault(),te.props.onKeyUp&&te.props.onKeyUp(kt)},role:"option",selected:me[0].props.value===void 0||me[0].props.disabled===!0?ut():je,value:void 0,"data-value":te.props.value})});Et&&(x?gt.length===0?Ut=null:Ut=gt.reduce((te,Ee,me)=>(te.push(Ee),me<gt.length-1&&te.push(", "),te),[]):Ut=zt);let In=ye;!s&&pe&&Q&&(In=Q.clientWidth);let ke;typeof L!="undefined"?ke=L:ke=p?null:0;const Fe=O.id||(v?`mui-component-select-${v}`:void 0),Ge=T({},t,{variant:D,value:U,open:pt}),$e=oJ(Ge);return w(f.exports.Fragment,{children:[i(eJ,T({ref:ue,tabIndex:ke,role:"button","aria-disabled":p?"true":void 0,"aria-expanded":pt?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[y,Fe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:Pe,onMouseDown:p||k?null:_e,onBlur:St,onFocus:A},O,{ownerState:Ge,className:Ce(O.className,$e.select,c),id:Fe,children:rJ(Ut)?VR||(VR=i("span",{className:"notranslate",children:"\u200B"})):Ut})),i(nJ,T({value:Array.isArray(U)?U.join(","):U,name:v,ref:Y,"aria-hidden":!0,onChange:he,tabIndex:-1,disabled:p,className:$e.nativeInput,autoFocus:a,ownerState:Ge},H)),i(tJ,{as:m,className:$e.icon,ownerState:Ge}),i(bf,T({id:`menu-${v||""}`,anchorEl:Q,open:pt,onClose:We,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},g,{MenuListProps:T({"aria-labelledby":y,role:"listbox",disableListWrap:!0},g.MenuListProps),PaperProps:T({},g.PaperProps,{style:T({minWidth:In},g.PaperProps!=null?g.PaperProps.style:null)}),children:Qt}))]})});var iJ=aJ,qR,YR;const sJ=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],lJ=e=>{const{classes:t}=e;return t},uS={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Qo(e)&&e!=="variant",slot:"Root"},cJ=z(E4,uS)(""),uJ=z(N4,uS)(""),dJ=z(g4,uS)(""),O4=f.exports.forwardRef(function(t,n){const r=Je({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:a,classes:s={},className:l,defaultOpen:c=!1,displayEmpty:u=!1,IconComponent:d=c4,id:p,input:h,inputProps:m,label:b,labelId:y,MenuProps:g,multiple:x=!1,native:v=!1,onClose:S,onOpen:E,open:R,renderValue:A,SelectDisplayProps:_,variant:N="outlined"}=r,k=Re(r,sJ),I=v?TX:iJ,O=gi(),q=Us({props:r,muiFormControl:O,states:["variant"]}).variant||N,D=h||{standard:qR||(qR=i(cJ,{})),outlined:i(uJ,{label:b}),filled:YR||(YR=i(dJ,{}))}[q],H=T({},r,{variant:q,classes:s}),U=lJ(H),Z=Xt(n,D.ref);return f.exports.cloneElement(D,T({inputComponent:I,inputProps:T({children:a,IconComponent:d,variant:q,type:void 0,multiple:x},v?{id:p}:{autoWidth:o,defaultOpen:c,displayEmpty:u,labelId:y,MenuProps:g,onClose:S,onOpen:E,open:R,renderValue:A,SelectDisplayProps:T({id:p},_)},m,{classes:m?vo(U,m.classes):U},h?h.props.inputProps:{})},x&&v&&q==="outlined"?{notched:!0}:{},{ref:Z,className:Ce(D.props.className,l),variant:q},k))});O4.muiName="Select";var Nu=O4;const pJ=["component","components","componentsProps","color","size"],fs=T({},cm,Ke("MuiSlider",["colorPrimary","colorSecondary","thumbColorPrimary","thumbColorSecondary","sizeSmall","thumbSizeSmall"])),fJ=z("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${se(n.color)}`],n.size!=="medium"&&t[`size${se(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>T({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&T({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&T({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${fs.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${fs.dragging}`]:{[`& .${fs.thumb}, & .${fs.track}`]:{transition:"none"}}})),hJ=z("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>T({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),mJ=z("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?nn(e.palette[t.color].main,.62):tn(e.palette[t.color].main,.5);return T({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),gJ=z("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${se(n.color)}`],n.size!=="medium"&&t[`thumbSize${se(n.size)}`]]}})(({theme:e,ownerState:t})=>T({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":T({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${fs.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:$t(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${fs.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:$t(e.palette[t.color].main,.16)}`},[`&.${fs.disabled}`]:{"&:hover":{boxShadow:"none"}}})),vJ=z(KN,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>T({[`&.${fs.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:"translateY(-100%) scale(0)",position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:"30px",top:"24px",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",right:"-20%",top:"25%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),yJ=z("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Qw(e)&&e!=="markActive",overridesResolver:(e,t)=>t.mark})(({theme:e,ownerState:t,markActive:n})=>T({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),bJ=z("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Qw(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>T({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),xJ=e=>{const{color:t,size:n,classes:r={}}=e;return T({},r,{root:Ce(r.root,Nd(`color${se(t)}`),r[`color${se(t)}`],n&&[Nd(`size${se(n)}`),r[`size${se(n)}`]]),thumb:Ce(r.thumb,Nd(`thumbColor${se(t)}`),r[`thumbColor${se(t)}`],n&&[Nd(`thumbSize${se(n)}`),r[`thumbSize${se(n)}`]])})},wJ=f.exports.forwardRef(function(t,n){var r,o,a,s;const l=Je({props:t,name:"MuiSlider"}),u=pn().direction==="rtl",{component:d="span",components:p={},componentsProps:h={},color:m="primary",size:b="medium"}=l,y=Re(l,pJ),g=T({},l,{color:m,size:b}),x=xJ(g);return i(Uz,T({},y,{isRtl:u,components:T({Root:fJ,Rail:hJ,Track:mJ,Thumb:gJ,ValueLabel:vJ,Mark:yJ,MarkLabel:bJ},p),componentsProps:T({},h,{root:T({},h.root,xh(p.Root)&&{as:d,ownerState:T({},(r=h.root)==null?void 0:r.ownerState,{color:m,size:b})}),thumb:T({},h.thumb,xh(p.Thumb)&&{ownerState:T({},(o=h.thumb)==null?void 0:o.ownerState,{color:m,size:b})}),track:T({},h.track,xh(p.Track)&&{ownerState:T({},(a=h.track)==null?void 0:a.ownerState,{color:m,size:b})}),valueLabel:T({},h.valueLabel,xh(p.ValueLabel)&&{ownerState:T({},(s=h.valueLabel)==null?void 0:s.ownerState,{color:m,size:b})})}),classes:x,ref:n}))});var SJ=wJ;function CJ(e){return Xe("MuiTooltip",e)}const EJ=Ke("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var hs=EJ;const TJ=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"];function RJ(e){return Math.round(e*1e5)/1e5}const kJ=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${se(a.split("-")[0])}`],arrow:["arrow"]};return Qe(s,CJ,t)},_J=z(sv,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>T({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${hs.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${hs.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${hs.arrow}`]:T({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${hs.arrow}`]:T({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),IJ=z("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${se(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>T({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:$t(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${RJ(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${hs.popper}[data-popper-placement*="left"] &`]:T({transformOrigin:"right center"},t.isRtl?T({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):T({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${hs.popper}[data-popper-placement*="right"] &`]:T({transformOrigin:"left center"},t.isRtl?T({marginRight:"14px"},t.touch&&{marginRight:"24px"}):T({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${hs.popper}[data-popper-placement*="top"] &`]:T({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${hs.popper}[data-popper-placement*="bottom"] &`]:T({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),AJ=z("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:$t(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Th=!1,L0=null;function Rh(e,t){return n=>{t&&t(n),e(n)}}const NJ=f.exports.forwardRef(function(t,n){var r,o,a,s,l,c;const u=Je({props:t,name:"MuiTooltip"}),{arrow:d=!1,children:p,components:h={},componentsProps:m={},describeChild:b=!1,disableFocusListener:y=!1,disableHoverListener:g=!1,disableInteractive:x=!1,disableTouchListener:v=!1,enterDelay:S=100,enterNextDelay:E=0,enterTouchDelay:R=700,followCursor:A=!1,id:_,leaveDelay:N=0,leaveTouchDelay:k=1500,onClose:I,onOpen:O,open:L,placement:q="bottom",PopperComponent:D,PopperProps:H={},title:U,TransitionComponent:Z=Cb,TransitionProps:G}=u,B=Re(u,TJ),Y=pn(),K=Y.direction==="rtl",[Q,re]=f.exports.useState(),[pe,ye]=f.exports.useState(null),ae=f.exports.useRef(!1),oe=x||A,ue=f.exports.useRef(),ge=f.exports.useRef(),_e=f.exports.useRef(),We=f.exports.useRef(),[be,he]=Oa({controlled:L,default:!1,name:"Tooltip",state:"open"});let He=be;const Pe=Eu(_),pt=f.exports.useRef(),St=f.exports.useCallback(()=>{pt.current!==void 0&&(document.body.style.WebkitUserSelect=pt.current,pt.current=void 0),clearTimeout(We.current)},[]);f.exports.useEffect(()=>()=>{clearTimeout(ue.current),clearTimeout(ge.current),clearTimeout(_e.current),St()},[St]);const Ut=Lt=>{clearTimeout(L0),Th=!0,he(!0),O&&!He&&O(Lt)},zt=kr(Lt=>{clearTimeout(L0),L0=setTimeout(()=>{Th=!1},800+N),he(!1),I&&He&&I(Lt),clearTimeout(ue.current),ue.current=setTimeout(()=>{ae.current=!1},Y.transitions.duration.shortest)}),gt=Lt=>{ae.current&&Lt.type!=="touchstart"||(Q&&Q.removeAttribute("title"),clearTimeout(ge.current),clearTimeout(_e.current),S||Th&&E?ge.current=setTimeout(()=>{Ut(Lt)},Th?E:S):Ut(Lt))},Et=Lt=>{clearTimeout(ge.current),clearTimeout(_e.current),_e.current=setTimeout(()=>{zt(Lt)},N)},{isFocusVisibleRef:Qt,onBlur:In,onFocus:ke,ref:Fe}=df(),[,Ge]=f.exports.useState(!1),$e=Lt=>{In(Lt),Qt.current===!1&&(Ge(!1),Et(Lt))},te=Lt=>{Q||re(Lt.currentTarget),ke(Lt),Qt.current===!0&&(Ge(!0),gt(Lt))},Ee=Lt=>{ae.current=!0;const xn=p.props;xn.onTouchStart&&xn.onTouchStart(Lt)},me=gt,je=Et,ut=Lt=>{Ee(Lt),clearTimeout(_e.current),clearTimeout(ue.current),St(),pt.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",We.current=setTimeout(()=>{document.body.style.WebkitUserSelect=pt.current,gt(Lt)},R)},kt=Lt=>{p.props.onTouchEnd&&p.props.onTouchEnd(Lt),St(),clearTimeout(_e.current),_e.current=setTimeout(()=>{zt(Lt)},k)};f.exports.useEffect(()=>{if(!He)return;function Lt(xn){(xn.key==="Escape"||xn.key==="Esc")&&zt(xn)}return document.addEventListener("keydown",Lt),()=>{document.removeEventListener("keydown",Lt)}},[zt,He]);const cn=Xt(re,n),Wn=Xt(Fe,cn),So=Xt(p.ref,Wn);U===""&&(He=!1);const tr=f.exports.useRef({x:0,y:0}),pr=f.exports.useRef(),Nr=Lt=>{const xn=p.props;xn.onMouseMove&&xn.onMouseMove(Lt),tr.current={x:Lt.clientX,y:Lt.clientY},pr.current&&pr.current.update()},On={},En=typeof U=="string";b?(On.title=!He&&En&&!g?U:null,On["aria-describedby"]=He?Pe:null):(On["aria-label"]=En?U:null,On["aria-labelledby"]=He&&!En?Pe:null);const fn=T({},On,B,p.props,{className:Ce(B.className,p.props.className),onTouchStart:Ee,ref:So},A?{onMouseMove:Nr}:{}),Bo={};v||(fn.onTouchStart=ut,fn.onTouchEnd=kt),g||(fn.onMouseOver=Rh(me,fn.onMouseOver),fn.onMouseLeave=Rh(je,fn.onMouseLeave),oe||(Bo.onMouseOver=me,Bo.onMouseLeave=je)),y||(fn.onFocus=Rh(te,fn.onFocus),fn.onBlur=Rh($e,fn.onBlur),oe||(Bo.onFocus=te,Bo.onBlur=$e));const Fo=f.exports.useMemo(()=>{var Lt;let xn=[{name:"arrow",enabled:Boolean(pe),options:{element:pe,padding:4}}];return(Lt=H.popperOptions)!=null&&Lt.modifiers&&(xn=xn.concat(H.popperOptions.modifiers)),T({},H.popperOptions,{modifiers:xn})},[pe,H]),Co=T({},u,{isRtl:K,arrow:d,disableInteractive:oe,placement:q,PopperComponentProp:D,touch:ae.current}),Ca=kJ(Co),Ea=(r=h.Popper)!=null?r:_J,qt=(o=(a=h.Transition)!=null?a:Z)!=null?o:Cb,ir=(s=h.Tooltip)!=null?s:IJ,fr=(l=h.Arrow)!=null?l:AJ,Ta=Ad(Ea,T({},H,m.popper),Co),Zi=Ad(qt,T({},G,m.transition),Co),qs=Ad(ir,T({},m.tooltip),Co),Ys=Ad(fr,T({},m.arrow),Co);return w(f.exports.Fragment,{children:[f.exports.cloneElement(p,fn),i(Ea,T({as:D!=null?D:sv,placement:q,anchorEl:A?{getBoundingClientRect:()=>({top:tr.current.y,left:tr.current.x,right:tr.current.x,bottom:tr.current.y,width:0,height:0})}:Q,popperRef:pr,open:Q?He:!1,id:Pe,transition:!0},Bo,Ta,{className:Ce(Ca.popper,H==null?void 0:H.className,(c=m.popper)==null?void 0:c.className),popperOptions:Fo,children:({TransitionProps:Lt})=>{var xn,Ie;return i(qt,T({timeout:Y.transitions.duration.shorter},Lt,Zi,{children:w(ir,T({},qs,{className:Ce(Ca.tooltip,(xn=m.tooltip)==null?void 0:xn.className),children:[U,d?i(fr,T({},Ys,{className:Ce(Ca.arrow,(Ie=m.arrow)==null?void 0:Ie.className),ref:ye})):null]}))}))}}))]})});var wt=NJ;function $J(e){return Xe("MuiSwitch",e)}const PJ=Ke("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var uo=PJ;const OJ=["className","color","edge","size","sx"],DJ=e=>{const{classes:t,edge:n,size:r,color:o,checked:a,disabled:s}=e,l={root:["root",n&&`edge${se(n)}`,`size${se(r)}`],switchBase:["switchBase",`color${se(o)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=Qe(l,$J,t);return T({},t,c)},LJ=z("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${se(n.edge)}`],t[`size${se(n.size)}`]]}})(({ownerState:e})=>T({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},e.edge==="start"&&{marginLeft:-8},e.edge==="end"&&{marginRight:-8},e.size==="small"&&{width:40,height:24,padding:7,[`& .${uo.thumb}`]:{width:16,height:16},[`& .${uo.switchBase}`]:{padding:4,[`&.${uo.checked}`]:{transform:"translateX(16px)"}}})),MJ=z(iS,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${uo.input}`]:t.input},n.color!=="default"&&t[`color${se(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${uo.checked}`]:{transform:"translateX(20px)"},[`&.${uo.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${uo.checked} + .${uo.track}`]:{opacity:.5},[`&.${uo.disabled} + .${uo.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${uo.input}`]:{left:"-100%",width:"300%"}}),({theme:e,ownerState:t})=>T({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${uo.checked}`]:{color:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:$t(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${uo.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t.color}DisabledColor`]:`${e.palette.mode==="light"?nn(e.palette[t.color].main,.62):tn(e.palette[t.color].main,.55)}`}},[`&.${uo.checked} + .${uo.track}`]:{backgroundColor:(e.vars||e).palette[t.color].main}})),BJ=z("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),FJ=z("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),zJ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiSwitch"}),{className:o,color:a="primary",edge:s=!1,size:l="medium",sx:c}=r,u=Re(r,OJ),d=T({},r,{color:a,edge:s,size:l}),p=DJ(d),h=i(FJ,{className:p.thumb,ownerState:d});return w(LJ,{className:Ce(p.root,o),sx:c,ownerState:d,children:[i(MJ,T({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:d},u,{classes:T({},p,{root:p.switchBase})})),i(BJ,{className:p.track,ownerState:d})]})});var ro=zJ;function jJ(e){return Xe("MuiTab",e)}const UJ=Ke("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);var tl=UJ;const WJ=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],HJ=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:s,selected:l,disabled:c}=e,u={root:["root",a&&s&&"labelIcon",`textColor${se(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Qe(u,jJ,t)},VJ=z(Ma,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${se(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>T({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tl.iconWrapper}`]:T({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${tl.selected}`]:{opacity:1},[`&.${tl.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${tl.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${tl.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${tl.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${tl.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),GJ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTab"}),{className:o,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:l,icon:c,iconPosition:u="top",indicator:d,label:p,onChange:h,onClick:m,onFocus:b,selected:y,selectionFollowsFocus:g,textColor:x="inherit",value:v,wrapped:S=!1}=r,E=Re(r,WJ),R=T({},r,{disabled:a,disableFocusRipple:s,selected:y,icon:!!c,iconPosition:u,label:!!p,fullWidth:l,textColor:x,wrapped:S}),A=HJ(R),_=c&&p&&f.exports.isValidElement(c)?f.exports.cloneElement(c,{className:Ce(A.iconWrapper,c.props.className)}):c,N=I=>{!y&&h&&h(I,v),m&&m(I)},k=I=>{g&&!y&&h&&h(I,v),b&&b(I)};return w(VJ,T({focusRipple:!s,className:Ce(A.root,o),ref:n,role:"tab","aria-selected":y,disabled:a,onClick:N,onFocus:k,ownerState:R,tabIndex:y?0:-1},E,{children:[u==="top"||u==="start"?w(f.exports.Fragment,{children:[_,p]}):w(f.exports.Fragment,{children:[p,_]}),d]}))});var Ha=GJ;const qJ=f.exports.createContext();var D4=qJ;function YJ(e){return Xe("MuiTable",e)}Ke("MuiTable",["root","stickyHeader"]);const KJ=["className","component","padding","size","stickyHeader"],XJ=e=>{const{classes:t,stickyHeader:n}=e;return Qe({root:["root",n&&"stickyHeader"]},YJ,t)},JJ=z("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>T({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":T({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"})),KR="table",QJ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTable"}),{className:o,component:a=KR,padding:s="normal",size:l="medium",stickyHeader:c=!1}=r,u=Re(r,KJ),d=T({},r,{component:a,padding:s,size:l,stickyHeader:c}),p=XJ(d),h=f.exports.useMemo(()=>({padding:s,size:l,stickyHeader:c}),[s,l,c]);return i(D4.Provider,{value:h,children:i(JJ,T({as:a,role:a===KR?null:"table",ref:n,className:Ce(p.root,o),ownerState:d},u))})});var vv=QJ;const ZJ=f.exports.createContext();var yv=ZJ;function eQ(e){return Xe("MuiTableBody",e)}Ke("MuiTableBody",["root"]);const tQ=["className","component"],nQ=e=>{const{classes:t}=e;return Qe({root:["root"]},eQ,t)},rQ=z("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),oQ={variant:"body"},XR="tbody",aQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTableBody"}),{className:o,component:a=XR}=r,s=Re(r,tQ),l=T({},r,{component:a}),c=nQ(l);return i(yv.Provider,{value:oQ,children:i(rQ,T({className:Ce(c.root,o),as:a,ref:n,role:a===XR?null:"rowgroup",ownerState:l},s))})});var bo=aQ;function iQ(e){return Xe("MuiTableCell",e)}const sQ=Ke("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var lQ=sQ;const cQ=["align","className","component","padding","scope","size","sortDirection","variant"],uQ=e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:s}=e,l={root:["root",n,s&&"stickyHeader",r!=="inherit"&&`align${se(r)}`,o!=="normal"&&`padding${se(o)}`,`size${se(a)}`]};return Qe(l,iQ,t)},dQ=z("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${se(n.size)}`],n.padding!=="normal"&&t[`padding${se(n.padding)}`],n.align!=="inherit"&&t[`align${se(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>T({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
    ${e.palette.mode==="light"?nn($t(e.palette.divider,1),.88):tn($t(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${lQ.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),pQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTableCell"}),{align:o="inherit",className:a,component:s,padding:l,scope:c,size:u,sortDirection:d,variant:p}=r,h=Re(r,cQ),m=f.exports.useContext(D4),b=f.exports.useContext(yv),y=b&&b.variant==="head";let g;s?g=s:g=y?"th":"td";let x=c;!x&&y&&(x="col");const v=p||b&&b.variant,S=T({},r,{align:o,component:g,padding:l||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:d,stickyHeader:v==="head"&&m&&m.stickyHeader,variant:v}),E=uQ(S);let R=null;return d&&(R=d==="asc"?"ascending":"descending"),i(dQ,T({as:g,ref:n,className:Ce(E.root,a),"aria-sort":R,scope:x,ownerState:S},h))});var jo=pQ;function fQ(e){return Xe("MuiTableHead",e)}Ke("MuiTableHead",["root"]);const hQ=["className","component"],mQ=e=>{const{classes:t}=e;return Qe({root:["root"]},fQ,t)},gQ=z("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),vQ={variant:"head"},JR="thead",yQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTableHead"}),{className:o,component:a=JR}=r,s=Re(r,hQ),l=T({},r,{component:a}),c=mQ(l);return i(yv.Provider,{value:vQ,children:i(gQ,T({as:a,className:Ce(c.root,o),ref:n,role:a===JR?null:"rowgroup",ownerState:l},s))})});var L4=yQ,bQ=et(i("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),xQ=et(i("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function wQ(e){return Xe("MuiTableRow",e)}const SQ=Ke("MuiTableRow",["root","selected","hover","head","footer"]);var QR=SQ;const CQ=["className","component","hover","selected"],EQ=e=>{const{classes:t,selected:n,hover:r,head:o,footer:a}=e;return Qe({root:["root",n&&"selected",r&&"hover",o&&"head",a&&"footer"]},wQ,t)},TQ=z("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${QR.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${QR.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:$t(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:$t(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),ZR="tr",RQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTableRow"}),{className:o,component:a=ZR,hover:s=!1,selected:l=!1}=r,c=Re(r,CQ),u=f.exports.useContext(yv),d=T({},r,{component:a,hover:s,selected:l,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=EQ(d);return i(TQ,T({as:a,ref:n,className:Ce(p.root,o),role:a===ZR?null:"row",ownerState:d},c))});var Vr=RQ;function kQ(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function _Q(e,t,n,r={},o=()=>{}){const{ease:a=kQ,duration:s=300}=r;let l=null;const c=t[e];let u=!1;const d=()=>{u=!0},p=h=>{if(u){o(new Error("Animation cancelled"));return}l===null&&(l=h);const m=Math.min(1,(h-l)/s);if(t[e]=a(m)*(n-c)+c,m>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(p)};return c===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const IQ=["onChange"],AQ={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function NQ(e){const{onChange:t}=e,n=Re(e,IQ),r=f.exports.useRef(),o=f.exports.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return f.exports.useEffect(()=>{const s=Ll(()=>{const c=r.current;a(),c!==r.current&&t(r.current)}),l=fa(o.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),f.exports.useEffect(()=>{a(),t(r.current)},[t]),i("div",T({style:AQ,ref:o},n))}function $Q(e){return Xe("MuiTabScrollButton",e)}const PQ=Ke("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);var OQ=PQ,ek,tk;const DQ=["className","direction","orientation","disabled"],LQ=e=>{const{classes:t,orientation:n,disabled:r}=e;return Qe({root:["root",n,r&&"disabled"]},$Q,t)},MQ=z(Ma,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>T({width:40,flexShrink:0,opacity:.8,[`&.${OQ.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),BQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTabScrollButton"}),{className:o,direction:a}=r,s=Re(r,DQ),c=pn().direction==="rtl",u=T({isRtl:c},r),d=LQ(u);return i(MQ,T({component:"div",className:Ce(d.root,o),ref:n,role:null,ownerState:u,tabIndex:null},s,{children:a==="left"?ek||(ek=i(bQ,{fontSize:"small"})):tk||(tk=i(xQ,{fontSize:"small"}))}))});var FQ=BQ;function zQ(e){return Xe("MuiTabs",e)}const jQ=Ke("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var M0=jQ;const UQ=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],nk=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,rk=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,kh=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const a=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||a)o=n(e,o);else{o.focus();return}}},WQ=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:c}=e;return Qe({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},zQ,c)},HQ=z("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${M0.scrollButtons}`]:t.scrollButtons},{[`& .${M0.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>T({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${M0.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),VQ=z("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>T({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),GQ=z("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>T({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),qQ=z("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>T({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),YQ=z(NQ,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ok={},KQ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTabs"}),o=pn(),a=o.direction==="rtl",{"aria-label":s,"aria-labelledby":l,action:c,centered:u=!1,children:d,className:p,component:h="div",allowScrollButtonsMobile:m=!1,indicatorColor:b="primary",onChange:y,orientation:g="horizontal",ScrollButtonComponent:x=FQ,scrollButtons:v="auto",selectionFollowsFocus:S,TabIndicatorProps:E={},TabScrollButtonProps:R={},textColor:A="primary",value:_,variant:N="standard",visibleScrollbar:k=!1}=r,I=Re(r,UQ),O=N==="scrollable",L=g==="vertical",q=L?"scrollTop":"scrollLeft",D=L?"top":"left",H=L?"bottom":"right",U=L?"clientHeight":"clientWidth",Z=L?"height":"width",G=T({},r,{component:h,allowScrollButtonsMobile:m,indicatorColor:b,orientation:g,vertical:L,scrollButtons:v,textColor:A,variant:N,visibleScrollbar:k,fixed:!O,hideScrollbar:O&&!k,scrollableX:O&&!L,scrollableY:O&&L,centered:u&&!O,scrollButtonsHideMobile:!m}),B=WQ(G),[Y,K]=f.exports.useState(!1),[Q,re]=f.exports.useState(ok),[pe,ye]=f.exports.useState({start:!1,end:!1}),[ae,oe]=f.exports.useState({overflow:"hidden",scrollbarWidth:0}),ue=new Map,ge=f.exports.useRef(null),_e=f.exports.useRef(null),We=()=>{const te=ge.current;let Ee;if(te){const je=te.getBoundingClientRect();Ee={clientWidth:te.clientWidth,scrollLeft:te.scrollLeft,scrollTop:te.scrollTop,scrollLeftNormalized:wT(te,o.direction),scrollWidth:te.scrollWidth,top:je.top,bottom:je.bottom,left:je.left,right:je.right}}let me;if(te&&_!==!1){const je=_e.current.children;if(je.length>0){const ut=je[ue.get(_)];me=ut?ut.getBoundingClientRect():null}}return{tabsMeta:Ee,tabMeta:me}},be=kr(()=>{const{tabsMeta:te,tabMeta:Ee}=We();let me=0,je;if(L)je="top",Ee&&te&&(me=Ee.top-te.top+te.scrollTop);else if(je=a?"right":"left",Ee&&te){const kt=a?te.scrollLeftNormalized+te.clientWidth-te.scrollWidth:te.scrollLeft;me=(a?-1:1)*(Ee[je]-te[je]+kt)}const ut={[je]:me,[Z]:Ee?Ee[Z]:0};if(isNaN(Q[je])||isNaN(Q[Z]))re(ut);else{const kt=Math.abs(Q[je]-ut[je]),cn=Math.abs(Q[Z]-ut[Z]);(kt>=1||cn>=1)&&re(ut)}}),he=(te,{animation:Ee=!0}={})=>{Ee?_Q(q,ge.current,te,{duration:o.transitions.duration.standard}):ge.current[q]=te},He=te=>{let Ee=ge.current[q];L?Ee+=te:(Ee+=te*(a?-1:1),Ee*=a&&dN()==="reverse"?-1:1),he(Ee)},Pe=()=>{const te=ge.current[U];let Ee=0;const me=Array.from(_e.current.children);for(let je=0;je<me.length;je+=1){const ut=me[je];if(Ee+ut[U]>te){je===0&&(Ee=te);break}Ee+=ut[U]}return Ee},pt=()=>{He(-1*Pe())},St=()=>{He(Pe())},Ut=f.exports.useCallback(te=>{oe({overflow:null,scrollbarWidth:te})},[]),zt=()=>{const te={};te.scrollbarSizeListener=O?i(YQ,{onChange:Ut,className:Ce(B.scrollableX,B.hideScrollbar)}):null;const Ee=pe.start||pe.end,me=O&&(v==="auto"&&Ee||v===!0);return te.scrollButtonStart=me?i(x,T({orientation:g,direction:a?"right":"left",onClick:pt,disabled:!pe.start},R,{className:Ce(B.scrollButtons,R.className)})):null,te.scrollButtonEnd=me?i(x,T({orientation:g,direction:a?"left":"right",onClick:St,disabled:!pe.end},R,{className:Ce(B.scrollButtons,R.className)})):null,te},gt=kr(te=>{const{tabsMeta:Ee,tabMeta:me}=We();if(!(!me||!Ee)){if(me[D]<Ee[D]){const je=Ee[q]+(me[D]-Ee[D]);he(je,{animation:te})}else if(me[H]>Ee[H]){const je=Ee[q]+(me[H]-Ee[H]);he(je,{animation:te})}}}),Et=kr(()=>{if(O&&v!==!1){const{scrollTop:te,scrollHeight:Ee,clientHeight:me,scrollWidth:je,clientWidth:ut}=ge.current;let kt,cn;if(L)kt=te>1,cn=te<Ee-me-1;else{const Wn=wT(ge.current,o.direction);kt=a?Wn<je-ut-1:Wn>1,cn=a?Wn>1:Wn<je-ut-1}(kt!==pe.start||cn!==pe.end)&&ye({start:kt,end:cn})}});f.exports.useEffect(()=>{const te=Ll(()=>{ge.current&&(be(),Et())}),Ee=fa(ge.current);Ee.addEventListener("resize",te);let me;return typeof ResizeObserver!="undefined"&&(me=new ResizeObserver(te),Array.from(_e.current.children).forEach(je=>{me.observe(je)})),()=>{te.clear(),Ee.removeEventListener("resize",te),me&&me.disconnect()}},[be,Et]);const Qt=f.exports.useMemo(()=>Ll(()=>{Et()}),[Et]);f.exports.useEffect(()=>()=>{Qt.clear()},[Qt]),f.exports.useEffect(()=>{K(!0)},[]),f.exports.useEffect(()=>{be(),Et()}),f.exports.useEffect(()=>{gt(ok!==Q)},[gt,Q]),f.exports.useImperativeHandle(c,()=>({updateIndicator:be,updateScrollButtons:Et}),[be,Et]);const In=i(qQ,T({},E,{className:Ce(B.indicator,E.className),ownerState:G,style:T({},Q,E.style)}));let ke=0;const Fe=f.exports.Children.map(d,te=>{if(!f.exports.isValidElement(te))return null;const Ee=te.props.value===void 0?ke:te.props.value;ue.set(Ee,ke);const me=Ee===_;return ke+=1,f.exports.cloneElement(te,T({fullWidth:N==="fullWidth",indicator:me&&!Y&&In,selected:me,selectionFollowsFocus:S,onChange:y,textColor:A,value:Ee},ke===1&&_===!1&&!te.props.tabIndex?{tabIndex:0}:{}))}),Ge=te=>{const Ee=_e.current,me=or(Ee).activeElement;if(me.getAttribute("role")!=="tab")return;let ut=g==="horizontal"?"ArrowLeft":"ArrowUp",kt=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&a&&(ut="ArrowRight",kt="ArrowLeft"),te.key){case ut:te.preventDefault(),kh(Ee,me,rk);break;case kt:te.preventDefault(),kh(Ee,me,nk);break;case"Home":te.preventDefault(),kh(Ee,null,nk);break;case"End":te.preventDefault(),kh(Ee,null,rk);break}},$e=zt();return w(HQ,T({className:Ce(B.root,p),ownerState:G,ref:n,as:h},I,{children:[$e.scrollButtonStart,$e.scrollbarSizeListener,w(VQ,{className:B.scroller,ownerState:G,style:{overflow:ae.overflow,[L?`margin${a?"Left":"Right"}`:"marginBottom"]:k?void 0:-ae.scrollbarWidth},ref:ge,onScroll:Qt,children:[i(GQ,{"aria-label":s,"aria-labelledby":l,"aria-orientation":g==="vertical"?"vertical":null,className:B.flexContainer,ownerState:G,onKeyDown:Ge,ref:_e,role:"tablist",children:Fe}),Y&&In]}),$e.scrollButtonEnd]}))});var bv=KQ;function XQ(e){return Xe("MuiTextField",e)}Ke("MuiTextField",["root"]);const JQ=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],QQ={standard:E4,filled:g4,outlined:N4},ZQ=e=>{const{classes:t}=e;return Qe({root:["root"]},XQ,t)},eZ=z(qo,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tZ=f.exports.forwardRef(function(t,n){const r=Je({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:s,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:b,id:y,InputLabelProps:g,inputProps:x,InputProps:v,inputRef:S,label:E,maxRows:R,minRows:A,multiline:_=!1,name:N,onBlur:k,onChange:I,onFocus:O,placeholder:L,required:q=!1,rows:D,select:H=!1,SelectProps:U,type:Z,value:G,variant:B="outlined"}=r,Y=Re(r,JQ),K=T({},r,{autoFocus:a,color:c,disabled:d,error:p,fullWidth:m,multiline:_,required:q,select:H,variant:B}),Q=ZQ(K),re={};B==="outlined"&&(g&&typeof g.shrink!="undefined"&&(re.notched=g.shrink),re.label=E),H&&((!U||!U.native)&&(re.id=void 0),re["aria-describedby"]=void 0);const pe=Eu(y),ye=b&&pe?`${pe}-helper-text`:void 0,ae=E&&pe?`${pe}-label`:void 0,oe=QQ[B],ue=i(oe,T({"aria-describedby":ye,autoComplete:o,autoFocus:a,defaultValue:u,fullWidth:m,multiline:_,name:N,rows:D,maxRows:R,minRows:A,type:Z,value:G,id:pe,inputRef:S,onBlur:k,onChange:I,onFocus:O,placeholder:L,inputProps:x},re,v));return w(eZ,T({className:Ce(Q.root,l),disabled:d,error:p,fullWidth:m,ref:n,required:q,color:c,variant:B,ownerState:K},Y,{children:[E!=null&&E!==""&&i(Iu,T({htmlFor:pe,id:ae},g,{children:E})),H?i(Nu,T({"aria-describedby":ye,id:pe,labelId:ae,value:G,input:ue},U,{children:s})):ue,b&&i(Vq,T({id:ye},h,{children:b}))]}))});var At=tZ;const M4=()=>({type:"success",title:"",text:"",components:[],show:!1,persist:!1}),nZ=()=>{throw new Error("setToast called outside UIContext")},rZ=()=>{throw new Error("setShowFeedback called outside UIContext")},oZ=()=>{throw new Error("setMode called outside UIContext")},Ws=hr.createContext({toastData:M4(),setToast:nZ,showFeedback:!1,setShowFeedback:rZ,themeMode:"light",setThemeMode:oZ});function Wm(e){try{return aZ(window.localStorage.getItem(e))}catch(t){console.warn(t)}}function $p(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){console.warn(n)}}function aZ(e){try{return e?JSON.parse(e):void 0}catch(t){console.warn(t)}}const ne={white:"#FFFFFF",black:"#000000",grey:{900:"#202021",800:"#6E6E70",700:"#78787A",600:"#9F9FA1",500:"#BDBDBF",400:"#E1E1E3",300:"#EAEAED",200:"#F2F2F5",100:"#F7F7FA",50:"#FFFFFF"},purple:{900:"#615BC2",800:"#6C65E5",700:"#817AFE",600:"#8C87EB",500:"#9D98EE",400:"#ADA9F1",300:"#BEBBF3",200:"#CECCF6",100:"#E4E3F9",50:"#F1F0FC"},red:{900:"#A6000E",800:"#D11525",700:"#D93644",600:"#E04C59",500:"#E04C59",400:"#F0616D",300:"#FEB0B7",200:"#FFD4D8",100:"#FFE5E7",50:"#FFF2F3"},orange:{900:"#B35300",800:"#D76500",700:"#F28D00",600:"#FFAA33",500:"#FFC46F",400:"#FFCF8B",300:"#FFD9A3",200:"#FFEACC",100:"#FFF4E5",50:"#FFFCF5"},green:{900:"#305200",800:"#3B6600",700:"#4D8400",600:"#68A611",500:"#7FB435",400:"#99C35D",300:"#B0D182",200:"#CFE5AE",100:"#E4F0D3",50:"#F4FAEB"},blue:{900:"#163E59",800:"#0060A1",700:"#0071BD",600:"#007ACA",500:"#0087E0",400:"#1C98EB",300:"#5BB4F0",200:"#96D2FA",100:"#DCEEFA",50:"#EBF7FF"},darkblue:{1e3:"#091826",900:"#041c32",800:"#1d3247",700:"#28415c",600:"#1f3751",500:"#0e2840"}};var oo=Ui({breakpoints:{values:{xs:0,sm:600,md:960,lg:1260,xl:1536}},boxShadows:{main:"0px 2px 4px rgba(129, 122, 254, 0.2)",card:"0px 2px 10px rgba(28, 25, 78, 0.12)",elevated:"0px 1px 20px rgba(45, 42, 89, 0.1)"},typography:{fontFamily:"Sen, Roboto, sans-serif",fontWeightBold:"700",fontWeightMedium:"700",allVariants:{lineHeight:1.4},button:{lineHeight:1.75},h1:{fontSize:"1.5rem",lineHeight:1.875},h3:{fontSize:"1rem",fontWeight:"700"},caption:{fontSize:`${12/16}rem`}},fontSizes:{mainHeader:"1.25rem",bodySize:"1rem",smallBody:`${14/16}rem`,smallerBody:`${12/16}rem`},fontWeight:{thin:300,medium:400,semi:700,bold:700},shape:{borderRadius:4,borderRadiusMedium:8,borderRadiusLarge:12,borderRadiusExtraLarge:20,tableRowHeight:64,tableRowHeightCompact:56,tableRowHeightDense:48},palette:{primary:{main:ne.purple[800],light:ne.purple[700],dark:ne.purple[900]},secondary:{light:ne.purple[50],main:ne.purple[800],dark:ne.purple[900],border:ne.purple[300]},info:{light:ne.blue[50],main:ne.blue[500],dark:ne.blue[700],border:ne.blue[200]},success:{light:ne.green[50],main:ne.green[600],dark:ne.green[800],border:ne.green[300]},warning:{light:ne.orange[100],main:ne.orange[800],dark:ne.orange[900],border:ne.orange[500]},error:{light:ne.red[50],main:ne.red[700],dark:ne.red[800],border:ne.red[300]},neutral:{light:ne.grey[100],main:ne.grey[700],dark:ne.grey[800],border:ne.grey[500]},tertiary:{light:ne.grey[200],main:ne.grey[400],dark:ne.grey[600],background:"white",contrast:ne.grey[300]},divider:ne.grey[300],dividerAlternative:ne.grey[400],tableHeaderHover:ne.grey[400],tableHeaderBackground:ne.grey[200],tableHeaderColor:ne.grey[900],formSidebarTextColor:ne.white,highlight:"#FFEACC",secondaryContainer:ne.grey[200],contentWrapper:ne.grey[300],headerBackground:ne.white,footerBackground:ne.white,formBackground:ne.white,formSidebar:ne.purple[800],featureMetaData:ne.purple[800],codebox:"rgba(32,32,33, 0.2)",sidebarContainer:"rgba(32,32,33, 0.2)",playgroundBackground:ne.grey[200],playgroundFormBackground:ne.grey[200],standaloneBackground:ne.grey[300],constraintAccordion:{editBackground:"#F6F6FA",background:ne.white,operatorBackground:ne.grey[200]},projectCard:{hover:ne.grey[100],textColor:"#4A4599"},standaloneBannerGradient:{from:ne.purple[900],to:"#173341"},checkmarkBadge:ne.purple[800],inputLabelBackground:ne.white,featureMetricsBackground:ne.grey[100],featureStrategySegmentChipBackground:ne.purple[800],featureSegmentSearchBackground:ne.purple[800],dialogHeaderBackground:ne.purple[800],dialogHeaderText:"#ffffffe6",grey:ne.grey,lightBorder:ne.grey[400],text:{primary:ne.grey[900],secondary:ne.grey[800],disabled:ne.grey[600],tertiaryContrast:"#fff"},code:{main:"#0b8c8f",diffAdd:"#3b6600",diffSub:"#d11525",diffNeutral:"black",edited:"black"},activityIndicators:{unknown:ne.grey[100],recent:ne.green[100],inactive:ne.orange[200],abandoned:ne.red[200],primary:ne.purple[100]},inactiveIcon:ne.grey[600]},components:{MuiLink:{styleOverrides:{root:{color:ne.purple[900],"&:hover":{textDecoration:"none"}}}},MuiBreadcrumbs:{styleOverrides:{root:{color:ne.grey[900],fontSize:"0.875rem","& a":{color:ne.purple[900],textDecoration:"underline","&:hover":{textDecoration:"none"}}}}},MuiTableHead:{styleOverrides:{root:{background:"transparent","& th":{background:ne.grey[200]}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{background:ne.grey[100]}}}},MuiTableCell:{styleOverrides:{root:{borderBottomColor:ne.grey[300]}}},MuiAlert:{styleOverrides:{root:{borderRadius:"8px",a:{color:"inherit"},"&.MuiAlert-standardInfo":{backgroundColor:ne.blue[50],color:ne.blue[700],border:`1px solid ${ne.blue[200]}`,"& .MuiAlert-icon":{color:ne.blue[500]}},"&.MuiAlert-standardSuccess":{backgroundColor:ne.green[50],color:ne.green[800],border:`1px solid ${ne.green[300]}`,"& .MuiAlert-icon":{color:ne.green[500]}},"&.MuiAlert-standardWarning":{backgroundColor:ne.orange[100],color:ne.orange[900],border:`1px solid ${ne.orange[500]}`,"& .MuiAlert-icon":{color:ne.orange[800]}},"&.MuiAlert-standardError":{backgroundColor:ne.red[50],color:ne.red[800],border:`1px solid ${ne.red[300]}`,"& .MuiAlert-icon":{color:ne.red[700]}}}}},MuiTabs:{styleOverrides:{root:{"& .MuiTabs-indicator":{height:"4px"}}}},MuiTab:{styleOverrides:{root:{color:ne.grey[900],fontSize:"1rem",textTransform:"none",fontWeight:400,minHeight:"62px","&:hover":{backgroundColor:ne.grey[200]},"&.Mui-selected":{color:ne.grey[900],fontWeight:700},"& > span":{color:ne.purple[900]}}}},MuiAccordion:{styleOverrides:{root:({theme:e})=>({"&:first-of-type, &:last-of-type":{borderRadius:e.shape.borderRadiusMedium}})}},MuiAccordionSummary:{styleOverrides:{root:{"& > .MuiAccordionSummary-content.Mui-expanded":{margin:"12px 0"},"&.Mui-expanded":{minHeight:"0"}}}},MuiSwitch:{styleOverrides:{switchBase:{zIndex:1,"&:not(.Mui-checked) .MuiTouchRipple-child":{color:ne.grey["500"]}}}},MuiIcon:{styleOverrides:{colorDisabled:{color:ne.grey[600]}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-disabled":{opacity:.66}}}},MuiChip:{styleOverrides:{root:({ownerState:e,theme:t})=>V({},e.variant==="outlined"&&e.size==="small"&&V(V(V({borderRadius:t.shape.borderRadius,margin:0,borderWidth:1,borderStyle:"solid",fontWeight:t.typography.fontWeightBold,fontSize:t.typography.caption.fontSize},e.color==="success"&&{backgroundColor:ne.green[50],borderColor:t.palette.success.border,color:t.palette.success.dark}),e.color==="default"&&{color:t.palette.text.secondary}),e.color==="error"&&{color:t.palette.error.dark,background:t.palette.error.light,borderColor:t.palette.error.border}))}},MuiInputBase:{styleOverrides:{root:{backgroundColor:"#fff"}}},MuiPaper:{styleOverrides:{root:{backgroundColor:"#fff"}}},MuiAppBar:{styleOverrides:{root:{color:ne.black}}}}});const Bt={main:ne.darkblue[900],secondary:ne.darkblue[800],textColor:"#ffffffe6",hover:"rgb(255, 255, 255, 0.7)"};var iZ=Ui({breakpoints:{values:{xs:0,sm:600,md:960,lg:1260,xl:1536}},boxShadows:{main:"0px 2px 4px rgba(129, 122, 254, 0.2)",card:"0px 2px 10px rgba(28, 25, 78, 0.12)",elevated:"0px 1px 20px rgba(45, 42, 89, 0.1)"},typography:{fontFamily:"Sen, Roboto, sans-serif",fontWeightBold:"700",fontWeightMedium:"700",allVariants:{lineHeight:1.4},button:{lineHeight:1.75},h1:{fontSize:"1.5rem",lineHeight:1.875},h3:{fontSize:"1rem",fontWeight:"700"},caption:{fontSize:`${12/16}rem`}},fontSizes:{mainHeader:"1.25rem",bodySize:"1rem",smallBody:`${14/16}rem`,smallerBody:`${12/16}rem`},fontWeight:{thin:300,medium:400,semi:700,bold:700},shape:{borderRadius:4,borderRadiusMedium:8,borderRadiusLarge:12,borderRadiusExtraLarge:20,tableRowHeight:64,tableRowHeightCompact:56,tableRowHeightDense:48},palette:{primary:{main:Bt.textColor,light:ne.purple[700],dark:ne.purple[900]},secondary:{main:ne.purple[800],light:ne.purple[700],dark:ne.purple[900]},info:{light:ne.blue[50],main:ne.blue[500],dark:ne.blue[700],border:ne.blue[200]},success:{light:ne.green[50],main:ne.green[600],dark:Bt.main,border:ne.green[300]},warning:{light:ne.orange[100],main:ne.orange[800],dark:ne.orange[900],border:ne.orange[500]},error:{light:ne.red[50],main:ne.red[700],dark:ne.red[800],border:ne.red[300]},background:{paper:Bt.main},divider:Bt.secondary,dividerAlternative:ne.grey[400],tableHeaderHover:ne.darkblue[700],tableHeaderBackground:Bt.secondary,tableHeaderColor:Bt.textColor,highlight:"#FFEACC",secondaryContainer:Bt.secondary,contentWrapper:ne.darkblue[800],formBackground:Bt.main,formSidebar:ne.darkblue[1e3],headerBackground:Bt.main,footerBackground:Bt.main,sidebarContainer:"rgba(32,32,33, 0.2)",codebox:ne.darkblue[600],featureMetaData:ne.darkblue[1e3],playgroundBackground:ne.darkblue[600],playgroundFormBackground:Bt.secondary,standaloneBackground:ne.black,featureStrategySegmentChipBackground:Bt.secondary,featureSegmentSearchBackground:Bt.secondary,dialogHeaderBackground:Bt.secondary,dialogHeaderText:Bt.textColor,lightBorder:ne.darkblue[500],constraintAccordion:{editBackground:ne.darkblue[600],background:Bt.secondary,operatorBackground:Bt.main},standaloneBannerGradient:{from:ne.darkblue[1e3],to:ne.black},projectCard:{hover:Bt.secondary,textColor:Bt.textColor},formSidebarTextColor:Bt.textColor,checkmarkBadge:Bt.secondary,inputLabelBackground:"transparent",featureMetricsBackground:Bt.secondary,grey:ne.grey,text:{primary:Bt.textColor,secondary:ne.grey[800],disabled:ne.grey[600]},code:{main:"#0b8c8f",diffAdd:"green",diffSub:"red",diffNeutral:"black",edited:"blue"},neutral:{light:ne.darkblue[500],main:ne.grey[700],dark:ne.grey[800],border:ne.grey[500]},activityIndicators:{primary:Bt.secondary,unknown:Bt.secondary,recent:Bt.secondary,inactive:Bt.secondary,abandoned:Bt.secondary},tertiary:{light:Bt.secondary,main:ne.grey[400],dark:ne.grey[600],background:"white",contrast:ne.grey[300]},inactiveIcon:ne.grey[600]},components:{MuiAppBar:{styleOverrides:{root:{color:Bt.textColor}}},MuiInputLabel:{styleOverrides:{root:{color:Bt.textColor}}},MuiIconButton:{styleOverrides:{root:{color:ne.white,"&:hover":{backgroundColor:Bt.hover},"&.Mui-disabled":{"& .MuiSvgIcon-root":{color:ne.grey[700]}}}}},MuiLink:{styleOverrides:{root:{color:ne.white,"&:hover":{textDecoration:"none"}}}},MuiBreadcrumbs:{styleOverrides:{root:{color:Bt.textColor,fontSize:"0.875rem","& a":{color:Bt.textColor,textDecoration:"underline","&:hover":{textDecoration:"none"}}}}},MuiTableHead:{styleOverrides:{root:{background:"transparent","& th":{background:ne.grey[200]}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{background:Bt.secondary}}}},MuiTableCell:{styleOverrides:{root:{borderBottomColor:Bt.main}}},MuiAlert:{styleOverrides:{root:{borderRadius:"8px",a:{color:"inherit"},"&.MuiAlert-standardInfo":{backgroundColor:ne.blue[50],color:ne.blue[700],border:`1px solid ${ne.blue[200]}`,"& .MuiAlert-icon .MuiSvgIcon-root":{color:ne.blue[500]}},"&.MuiAlert-standardSuccess":{backgroundColor:ne.green[50],color:ne.green[800],border:`1px solid ${ne.green[300]}`,"& .MuiAlert-icon .MuiSvgIcon-root":{color:ne.green[500]}},"&.MuiAlert-standardWarning":{backgroundColor:ne.orange[100],color:ne.orange[900],border:`1px solid ${ne.orange[500]}`,"& .MuiAlert-icon .MuiSvgIcon-root":{color:ne.orange[800]}},"&.MuiAlert-standardError":{backgroundColor:ne.red[50],color:ne.red[800],border:`1px solid ${ne.red[300]}`,"& .MuiAlert-icon .MuiSvgIcon-root":{color:ne.red[700]}}}}},MuiButton:{styleOverrides:{root:{"&.Mui-disabled":{backgroundColor:ne.grey[400]}}}},MuiSvgIcon:{styleOverrides:{root:{color:Bt.textColor}}},MuiTabs:{styleOverrides:{root:{backgroundColor:Bt.main,color:Bt.textColor,"& .MuiTabs-indicator":{height:"4px"}}}},MuiTab:{styleOverrides:{root:{color:Bt.textColor,fontSize:"1rem",textTransform:"none",fontWeight:400,minHeight:"62px","&:hover":{backgroundColor:Bt.secondary},"&.Mui-selected":{color:Bt.textColor,fontWeight:700},"& > span":{color:ne.purple[900]}}}},MuiAccordionSummary:{styleOverrides:{root:{"& > .MuiAccordionSummary-content.Mui-expanded":{margin:"12px 0"}}}},MuiSwitch:{styleOverrides:{switchBase:{zIndex:1,"&:not(.Mui-checked) .MuiTouchRipple-child":{color:ne.grey["500"]}}}},MuiIcon:{styleOverrides:{root:{color:ne.white},colorDisabled:{color:ne.white[600]}}},MuiMenu:{styleOverrides:{root:{".MuiMenu-list":{backgroundColor:ne.darkblue[600]}}}},MuiMenuItem:{styleOverrides:{root:{"&.Mui-disabled":{opacity:.66},"&:hover":{backgroundColor:Bt.secondary}}}},MuiInputBase:{styleOverrides:{root:{backgroundColor:ne.darkblue[1e3],".MuiSvgIcon-root":{color:"#fff"}}}},MuiPaper:{styleOverrides:{root:{backgroundColor:Bt.main,color:Bt.textColor}}}}});const B4=()=>{const{themeMode:e,setThemeMode:t}=f.exports.useContext(Ws);return{resolveTheme:()=>e==="light"?oo:iZ,onSetThemeMode:()=>{t(o=>o==="light"?($p("unleash-theme","dark"),"dark"):($p("unleash-theme","light"),"light"))},themeMode:e}},sZ=vw({key:"mui",prepend:!0}),lZ=({children:e})=>{const{resolveTheme:t}=B4();return i(kw,{value:sZ,children:w(zw,{theme:t(),children:[i(hG,{}),e]})})},F=({condition:e,show:t,elseShow:n})=>{const r=a=>{const s=a();return s||(console.warn("Nothing was returned from your render function. Verify that you are returning a valid react component"),null)},o=a=>typeof a=="function";return e?o(t)?r(t):t:!e&&n?o(n)?r(n):n:null};var F4={exports:{}};/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(!!a){var s=typeof a;if(s==="string"||s==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var l=n.apply(null,a);l&&r.push(l)}}else if(s==="object")if(a.toString===Object.prototype.toString)for(var c in a)t.call(a,c)&&a[c]&&r.push(c);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(F4);var it=F4.exports,dS={},yn={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yn);var bn={},cZ=Hl(Yj);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=cZ})(bn);var Cn=Hl(HM),uZ=yn.exports;Object.defineProperty(dS,"__esModule",{value:!0});var xv=dS.default=void 0,dZ=uZ(bn),pZ=Cn,fZ=(0,dZ.default)((0,pZ.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");xv=dS.default=fZ;const hZ=e=>f.exports.createElement("svg",V({width:23,height:23,viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("rect",{x:.288513,y:.288574,width:7.13461,height:22.4231,fill:"#1A4049"}),f.exports.createElement("rect",{x:15.5769,y:.288574,width:7.13461,height:22.4231,fill:"#1A4049"}),f.exports.createElement("path",{d:"M22.7115 15.5771L22.7115 22.7118L0.28841 22.7118L0.28841 15.5771L22.7115 15.5771Z",fill:"#1A4049"}),f.exports.createElement("rect",{x:15.5769,y:15.5771,width:7.13461,height:7.13461,fill:"#817AFE"}));var _l={},mZ=Hl(Uj),z4={},wv={},j4={},xf={};Object.defineProperty(xf,"__esModule",{value:!0});xf.assert=void 0;function gZ(e,t){if(!e)throw new Error(t)}xf.assert=gZ;var wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.typeGuard=void 0;function vZ(e,t){return t}wf.typeGuard=vZ;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.classnames=void 0;const t=xf,n=wf,r=o=>{const a=o.length;let s=0,l="";for(;s<a;s++){const c=o[s];if(c==null)continue;let u;switch(typeof c){case"boolean":break;case"object":{if(Array.isArray(c))u=(0,e.classnames)(c);else{(0,t.assert)(!(0,n.typeGuard)(c,!1)),u="";for(const d in c)c[d]&&d&&(u&&(u+=" "),u+=d)}break}default:u=c}u&&(l&&(l+=" "),l+=u)}return l};e.classnames=r})(j4);var yZ=/[A-Z]|^ms/g,bZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,U4=function(t){return t.charCodeAt(1)===45},ak=function(t){return t!=null&&typeof t!="boolean"},B0=kg(function(e){return U4(e)?e:e.replace(yZ,"-$&").toLowerCase()}),ik=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bZ,function(r,o,a){return Ka={name:o,styles:a,next:Ka},o})}return Ew[t]!==1&&!U4(t)&&typeof n=="number"&&n!==0?n+"px":n};function Pp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ka={name:n.name,styles:n.styles,next:Ka},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ka={name:r.name,styles:r.styles,next:Ka},r=r.next;var o=n.styles+";";return o}return xZ(e,t,n)}case"function":{if(e!==void 0){var a=Ka,s=n(e);return Ka=a,Pp(e,t,s)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function xZ(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Pp(e,t,n[o])+";";else for(var a in n){var s=n[a];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":ak(s)&&(r+=B0(a)+":"+ik(a,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)ak(s[l])&&(r+=B0(a)+":"+ik(a,s[l])+";");else{var c=Pp(e,t,s);switch(a){case"animation":case"animationName":{r+=B0(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}return r}var sk=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ka,wZ=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";Ka=void 0;var s=t[0];s==null||s.raw===void 0?(o=!1,a+=Pp(r,n,s)):a+=s[0];for(var l=1;l<t.length;l++)a+=Pp(r,n,t[l]),o&&(a+=s[l]);sk.lastIndex=0;for(var c="",u;(u=sk.exec(a))!==null;)c+="-"+u[1];var d=Cw(a)+c;return{name:d,styles:a,next:Ka}},SZ=Object.freeze(Object.defineProperty({__proto__:null,serializeStyles:wZ},Symbol.toStringTag,{value:"Module"})),CZ=Hl(SZ),EZ=Hl(aM),Sv={};Object.defineProperty(Sv,"__esModule",{value:!0});Sv.useGuaranteedMemo=void 0;const TZ=f.exports;function RZ(e,t){const n=(0,TZ.useRef)();return(!n.current||t.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,o)=>r===t[o]).indexOf(!1)>=0)&&(n.current={v:e(),prevDeps:[...t]}),n.current.v}Sv.useGuaranteedMemo=RZ;var aa={};function kZ(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function _Z(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var IZ=function(){function e(n){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(_Z(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=kZ(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),AZ=function(t,n,r){for(var o=0,a=0;o=a,a=Ho(),o===38&&a===12&&(n[r]=1),!Dl(a);)go();return Cu(t,no)},NZ=function(t,n){var r=-1,o=44;do switch(Dl(o)){case 0:o===38&&Ho()===12&&(n[r]=1),t[r]+=AZ(no-1,n,r);break;case 2:t[r]+=Kd(o);break;case 4:if(o===44){t[++r]=Ho()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=af(o)}while(o=go());return t},$Z=function(t,n){return gw(NZ(mw(t),n))},lk=new WeakMap,PZ=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!lk.get(r))&&!o){lk.set(t,!0);for(var a=[],s=$Z(n,a),l=r.props,c=0,u=0;c<s.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=a[c]?s[c].replace(/&\f/g,l[d]):l[d]+" "+s[c]}}},OZ=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}},DZ=[YA],LZ=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||DZ,a={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),x=1;x<g.length;x++)a[g[x]]=!0;l.push(y)});var c,u=[PZ,OZ];{var d,p=[VA,qA(function(y){d.insert(y)})],h=GA(u.concat(o,p)),m=function(g){return Rl(WA(g),h)};c=function(g,x,v,S){d=v,m(g?g+"{"+x.styles+"}":x.styles),S&&(b.inserted[x.name]=!0)}}var b={key:n,sheet:new IZ({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:c};return b.sheet.hydrate(l),b},MZ=Object.freeze(Object.defineProperty({__proto__:null,default:LZ},Symbol.toStringTag,{value:"Module"})),BZ=Hl(MZ),FZ=_n&&_n.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),zZ=_n&&_n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jZ=_n&&_n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&FZ(t,e,n);return zZ(t,e),t},UZ=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});aa.TssCacheProvider=aa.useTssEmotionCache=aa.getTssDefaultEmotionCache=aa.getDoExistsTssDefaultEmotionCacheMemoizedValue=void 0;const Hm=jZ(f.exports),WZ=UZ(BZ),{getDoExistsTssDefaultEmotionCacheMemoizedValue:HZ,getTssDefaultEmotionCache:W4,reactContext:H4}=(()=>{const e="__tss-react_context",t=Hm.createContext;let n=t["__tss-react_context"];if(n===void 0){const{getTssDefaultEmotionCache:r,getDoExistsTssDefaultEmotionCacheMemoizedValue:o}=(()=>{let a;function s(l){const{doReset:c=!1}=l!=null?l:{};return c&&(a=void 0),a===void 0&&(a=(0,WZ.default)({key:"tss"})),a}return{getTssDefaultEmotionCache:s,getDoExistsTssDefaultEmotionCacheMemoizedValue:()=>a!==void 0}})();n={getTssDefaultEmotionCache:r,getDoExistsTssDefaultEmotionCacheMemoizedValue:o,reactContext:(0,Hm.createContext)(void 0)},Object.defineProperty(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}return n})();aa.getDoExistsTssDefaultEmotionCacheMemoizedValue=HZ;aa.getTssDefaultEmotionCache=W4;function VZ(){const e=(0,Hm.useContext)(H4);return e!=null?e:W4()}aa.useTssEmotionCache=VZ;function GZ(e){const{children:t,value:n}=e;return Hm.default.createElement(H4.Provider,{value:n},t)}aa.TssCacheProvider=GZ;var Cv={};Object.defineProperty(Cv,"__esModule",{value:!0});Cv.matchCSSObject=void 0;function qZ(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}Cv.matchCSSObject=qZ;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.useCssAndCx=e.createCssAndCx=void 0;const t=j4,n=CZ,r=EZ,o=Sv,a=aa,s=Cv;e.createCssAndCx=(()=>{function u(p,h,m){const b=[],y=(0,r.getRegisteredStyles)(p,b,m);return b.length<2?m:y+h(b)}function d(p){const{cache:h}=p,m=(...y)=>{const g=(0,n.serializeStyles)(y,h.registered);(0,r.insertStyles)(h,g,!1);const x=`${h.key}-${g.name}`;e:{const v=y[0];if(!(0,s.matchCSSObject)(v))break e;c.saveClassNameCSSObjectMapping(h,x,v)}return x};return{css:m,cx:(...y)=>{const g=(0,t.classnames)(y),x=c.fixClassName(h,g,m);return u(h.registered,m,x)}}}return{createCssAndCx:d}})().createCssAndCx;function l(){const u=(0,a.useTssEmotionCache)(),{css:d,cx:p}=(0,o.useGuaranteedMemo)(()=>(0,e.createCssAndCx)({cache:u}),[u]);return{css:d,cx:p}}e.useCssAndCx=l;const c=(()=>{const u=new WeakMap;return{saveClassNameCSSObjectMapping:(d,p,h)=>{let m=u.get(d);m===void 0&&(m=new Map,u.set(d,m)),m.set(p,h)},fixClassName:(()=>{function d(p){let h=!1;return p.map(([m,b])=>{if(b===void 0)return m;let y;if(h)y={"&&":b};else{y=m;for(const g in b)if(g.startsWith("@media")){h=!0;break}}return y})}return(p,h,m)=>{const b=u.get(p);return(0,t.classnames)(d(h.split(" ").map(y=>[y,b==null?void 0:b.get(y)])).map(y=>typeof y=="string"?y:m(y)))}})()}})()})(wv);var zl={},Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});Sf.objectKeys=void 0;function YZ(e){return Object.keys(e)}Sf.objectKeys=YZ;var Cf={};Object.defineProperty(Cf,"__esModule",{value:!0});Cf.getDependencyArrayRef=void 0;function KZ(e){if(!(e instanceof Object)||typeof e=="function")return e;const t=[];for(const n in e){const r=e[n],o=typeof r;if(!(o==="string"||o==="number"&&!isNaN(r)||o==="boolean"||r===void 0||r===null))return e;t.push(`${n}:${o}_${r}`)}return"xSqLiJdLMd9s"+t.join("|")}Cf.getDependencyArrayRef=KZ;Object.defineProperty(zl,"__esModule",{value:!0});zl.useMergedClasses=zl.mergeClasses=void 0;const ck=Sf,XZ=Cf,JZ=wv,QZ=f.exports;function V4(e,t,n){if(!(t instanceof Object))return e;const r={};return(0,ck.objectKeys)(e).forEach(o=>r[o]=n(e[o],t[o])),(0,ck.objectKeys)(t).forEach(o=>{if(o in e)return;const a=t[o];typeof a=="string"&&(r[o]=a)}),r}zl.mergeClasses=V4;function ZZ(e,t){const{cx:n}=(0,JZ.useCssAndCx)();return(0,QZ.useMemo)(()=>V4(e,t,n),[e,(0,XZ.getDependencyArrayRef)(t),n])}zl.useMergedClasses=ZZ;var Ef={},Ev={};Object.defineProperty(Ev,"__esModule",{value:!0});Ev.objectFromEntries=void 0;Ev.objectFromEntries=Object.fromEntries?Object.fromEntries:e=>{if(!e||!e[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const t={};return Object.keys(e).forEach(n=>{const[r,o]=e[n];t[r]=o}),t};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.createMakeStyles=void 0;const _h=f.exports,eee=Ev,uk=Sf,dk=wv,Ih=Cf,tee=wf,nee=aa,ree=xf,pk=zl;let oee=0;function aee(e){const{useTheme:t}=e;function n(o){const{name:a,uniqId:s=oee++}=o!=null?o:{},l=typeof a!="object"?a:Object.keys(a)[0];return function(c){const u=typeof c=="function"?c:()=>c;return function(p,h){var m,b;const y=t(),{css:g,cx:x}=(0,dk.useCssAndCx)(),v=(0,nee.useTssEmotionCache)();let S=(0,_h.useMemo)(()=>{const R={},A=typeof Proxy!="undefined"&&new Proxy({},{get:(k,I)=>(typeof I=="symbol"&&(0,ree.assert)(!1),R[I]=`${v.key}-${s}${l!==void 0?`-${l}`:""}-${I}-ref`)}),_=u(y,p,A||{}),N=(0,eee.objectFromEntries)((0,uk.objectKeys)(_).map(k=>{const I=_[k];return I.label||(I.label=`${l!==void 0?`${l}-`:""}${k}`),[k,`${g(I)}${(0,tee.typeGuard)(k,k in R)?` ${R[k]}`:""}`]}));return(0,uk.objectKeys)(R).forEach(k=>{k in N||(N[k]=R[k])}),N},[v,g,x,y,(0,Ih.getDependencyArrayRef)(p)]);const E=h==null?void 0:h.props.classes;S=(0,_h.useMemo)(()=>(0,pk.mergeClasses)(S,E,x),[S,(0,Ih.getDependencyArrayRef)(E),x]);{let R;try{R=l!==void 0?(b=(m=y.components)===null||m===void 0?void 0:m[l])===null||b===void 0?void 0:b.styleOverrides:void 0}catch{}const A=(0,_h.useMemo)(()=>{if(!R)return;const _={};for(const N in R){const k=R[N];k instanceof Object&&(_[N]=g(typeof k=="function"?k(Object.assign({theme:y,ownerState:h==null?void 0:h.ownerState},h==null?void 0:h.props)):k))}return _},[R===void 0?void 0:JSON.stringify(R),(0,Ih.getDependencyArrayRef)(h==null?void 0:h.props),(0,Ih.getDependencyArrayRef)(h==null?void 0:h.ownerState),g]);S=(0,_h.useMemo)(()=>(0,pk.mergeClasses)(S,A,x),[S,A,x])}return{classes:S,theme:y,css:g,cx:x}}}}function r(){const o=t(),{css:a,cx:s}=(0,dk.useCssAndCx)();return{theme:o,css:a,cx:s}}return{makeStyles:n,useStyles:r}}Ef.createMakeStyles=aee;var Tv={},Rv={};Object.defineProperty(Rv,"__esModule",{value:!0});Rv.capitalize=void 0;function iee(e){return e.charAt(0).toUpperCase()+e.slice(1)}Rv.capitalize=iee;var see=_n&&_n.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),lee=_n&&_n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cee=_n&&_n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&see(t,e,n);return lee(t,e),t},fk=_n&&_n.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};Object.defineProperty(Tv,"__esModule",{value:!0});Tv.createWithStyles=void 0;const F0=cee(f.exports),uee=Ef,dee=Rv;function pee(e){const{useTheme:t}=e,{makeStyles:n}=(0,uee.createMakeStyles)({useTheme:t});function r(o,a,s){const l=typeof o=="string"?(()=>{const p=o,h=function(m){var{children:b}=m,y=fk(m,["children"]);return(0,F0.createElement)(p,y,b)};return Object.defineProperty(h,"name",{value:(0,dee.capitalize)(p)}),h})():o,c=(()=>{const{name:p}=l;return typeof p=="string"?p:void 0})(),u=n(s)(typeof a=="function"?(p,h,m)=>hk(a(p,h,m)):hk(a)),d=(0,F0.forwardRef)(function(p,h){const{className:m,classes:b}=p,y=fk(p,["className","classes"]),{classes:g,cx:x}=u(p,{props:p});return F0.default.createElement(l,Object.assign({ref:h,className:x(g.root,m)},typeof o=="string"?{}:{classes:g},y))});return c!==void 0&&Object.defineProperty(d,"name",{value:`${c}WithStyles`}),d}return{withStyles:r}}Tv.createWithStyles=pee;function hk(e){const t={},n={};return Object.keys(e).forEach(r=>(r.startsWith("@media")?n:t)[r]=e[r]),Object.keys(n).forEach(r=>{const o=n[r];Object.keys(o).forEach(a=>{var s;return t[a]=Object.assign(Object.assign({},(s=t[a])!==null&&s!==void 0?s:{}),{[r]:o[a]})})}),t}var G4=Hl(CM),kv={},fee=_n&&_n.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),hee=_n&&_n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mee=_n&&_n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&fee(t,e,n);return hee(t,e),t},gee=_n&&_n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kv,"__esModule",{value:!0});kv.GlobalStyles=void 0;const vee=gee(f.exports),mk=mee(G4);function yee(e){const{styles:t}=e;return vee.default.createElement(mk.Global,{styles:mk.css(t)})}kv.GlobalStyles=yee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMakeAndWithStyles=e.TssCacheProvider=e.getTssDefaultEmotionCache=e.GlobalStyles=e.keyframes=e.createWithStyles=e.createMakeStyles=e.useMergedClasses=e.useCssAndCx=void 0;var t=wv;Object.defineProperty(e,"useCssAndCx",{enumerable:!0,get:function(){return t.useCssAndCx}});var n=zl;Object.defineProperty(e,"useMergedClasses",{enumerable:!0,get:function(){return n.useMergedClasses}});const r=Ef;Object.defineProperty(e,"createMakeStyles",{enumerable:!0,get:function(){return r.createMakeStyles}});const o=Tv;Object.defineProperty(e,"createWithStyles",{enumerable:!0,get:function(){return o.createWithStyles}});var a=G4;Object.defineProperty(e,"keyframes",{enumerable:!0,get:function(){return a.keyframes}});var s=kv;Object.defineProperty(e,"GlobalStyles",{enumerable:!0,get:function(){return s.GlobalStyles}});var l=aa;Object.defineProperty(e,"getTssDefaultEmotionCache",{enumerable:!0,get:function(){return l.getTssDefaultEmotionCache}}),Object.defineProperty(e,"TssCacheProvider",{enumerable:!0,get:function(){return l.TssCacheProvider}});function c(u){return Object.assign(Object.assign({},(0,r.createMakeStyles)(u)),(0,o.createWithStyles)(u))}e.createMakeAndWithStyles=c})(z4);var le,pS,Ah;Object.defineProperty(_l,"__esModule",{value:!0});_l.useStyles=pS=_l.withStyles=le=_l.makeStyles=void 0;const bee=mZ,xee=z4;Ah=(0,xee.createMakeAndWithStyles)({useTheme:bee.useTheme}),le=_l.makeStyles=Ah.makeStyles,pS=_l.withStyles=Ah.withStyles,_l.useStyles=Ah.useStyles;const wee=le()(e=>({feedback:{borderRadius:"12.5px",backgroundColor:e.palette.background.paper,zIndex:9999,boxShadow:"2px 2px 4px 4px rgba(143,143,143, 0.25)",padding:"1.5rem",maxWidth:"400px"},animateContainer:{zIndex:9999},container:{display:"flex",flexDirection:"column",position:"relative"},close:{position:"absolute",right:"-38px",top:"-47px",backgroundColor:e.palette.background.paper,boxShadow:"2px 2px 4px 4px rgba(143,143,143, 0.25)",["&:hover"]:{backgroundColor:"#fff"}},logo:{width:"25px",height:"25px"},cancel:{marginLeft:"1rem"}})),q4=({mounted:e,enter:t,start:n,leave:r,container:o,children:a,style:s,onStart:l,onEnd:c})=>{const[u,d]=f.exports.useState(e),[p,h]=f.exports.useState(""),m=f.exports.useRef(null);f.exports.useEffect(()=>{(m.current!==e||m===null)&&(e?(d(!0),l==null||l(),setTimeout(()=>{h(t)},50)):(r||d(!1),h(r)))},[e,t,l,r]);const b=()=>{e||(d(!1),c==null||c())};return i(F,{condition:u,show:i("div",{className:`${n} ${p} ${o||""}`,onTransitionEnd:b,style:V({},s),children:a})})},Yn=le()(e=>({focusable:{"&:focus-visible":{outline:0,outlineStyle:"solid",outlineWidth:2,outlineOffset:2,outlineColor:e.palette.primary.main}},contentSpacingY:{"& > *":{marginTop:"0.5rem !important",marginBottom:"0.5rem !important"}},contentSpacingYLarge:{"& > *":{marginTop:"1.5rem !important",marginBottom:"1.5rem !important"}},contentSpacingX:{"& > *":{marginRight:"0.8rem !important",marginLeft:"0.8rem !important"}},relative:{position:"relative"},divider:{margin:"1rem 0",backgroundColor:e.palette.divider,height:"3px",width:"100%"},largeDivider:{margin:"2rem 0",backgroundColor:e.palette.divider,height:"3px",width:"100%"},bold:{fontWeight:"bold"},flexRow:{display:"flex",alignItems:"center"},flexColumn:{display:"flex",flexDirection:"column"},itemsCenter:{alignItems:"center"},justifyCenter:{justifyContent:"center"},flexWrap:{flexWrap:"wrap"},textCenter:{textAlign:"center"},fullWidth:{width:"100%"},fullHeight:{height:"100%"},title:{fontSize:e.fontSizes.mainHeader,fontWeight:"bold",marginBottom:"0.5rem"},fadeInBottomStartNoPosition:{transform:"translateY(400px)",opacity:"0",boxShadow:"rgb(129 129 129 / 40%) 4px 5px 11px 4px",zIndex:500,width:"100%",backgroundColor:"#fff",right:0,bottom:0,left:0,height:"300px",position:"fixed"},fadeInBottomStart:{opacity:"0",position:"fixed",right:"40px",bottom:"40px",transform:"translateY(400px)"},fadeInBottomStartWithoutFixed:{opacity:"0",right:"40px",bottom:"40px",transform:"translateY(400px)",zIndex:1400,position:"fixed"},fadeInBottomEnter:{transform:"translateY(0)",opacity:"1",transition:"transform 0.6s ease, opacity 1s ease"},fadeInBottomLeave:{transform:"translateY(400px)",opacity:"0",transition:"transform 1.25s ease, opacity 1s ease"},fadeInTopStart:{opacity:"0",position:"fixed",right:"40px",top:"40px",transform:"translateY(-400px)",[e.breakpoints.down("sm")]:{right:20,left:10,top:40}},fadeInTopEnter:{transform:"translateY(100px)",opacity:"1",transition:"transform 0.6s ease, opacity 1s ease"},fadeInTopLeave:{transform:"translateY(-400px)",opacity:"0",transition:"transform 1.25s ease, opacity 1s ease"},error:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main}}));function Kn(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function mr(e){Kn(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Op(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function gk(e){Kn(1,arguments);var t=mr(e);return t.setHours(0,0,0,0),t}var See=864e5;function Cee(e,t){Kn(2,arguments);var n=gk(e),r=gk(t),o=n.getTime()-Op(n),a=r.getTime()-Op(r);return Math.round((o-a)/See)}function vk(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function fS(e,t){Kn(2,arguments);var n=mr(e),r=mr(t),o=vk(n,r),a=Math.abs(Cee(n,r));n.setDate(n.getDate()-o*a);var s=Number(vk(n,r)===-o),l=o*(a-s);return l===0?0:l}const Y4="pnps",Eee=e=>{if(!e)return!1;if(e.length===0)return!0;const t=e.find(n=>n.feedbackId===Y4);if(!t)return!0;if(t.neverShow)return!1;if(t.given){const r=new Date;return fS(r,new Date(t.given))>182}return!1};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function K4(e,t,n,r){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}function X4(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],o=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var ti=function(){},Qr=ti(),rp=Object,po=function(e){return e===Qr},ms=function(e){return typeof e=="function"},Wi=function(e,t){return rp.assign({},e,t)},hS="undefined",mS=function(){return typeof window!=hS},Tee=function(){return typeof document!=hS},Ree=function(){return mS()&&typeof window.requestAnimationFrame!=hS},Nh=new WeakMap,kee=0,Dp=function(e){var t=typeof e,n=e&&e.constructor,r=n==Date,o,a;if(rp(e)===e&&!r&&n!=RegExp){if(o=Nh.get(e),o)return o;if(o=++kee+"~",Nh.set(e,o),n==Array){for(o="@",a=0;a<e.length;a++)o+=Dp(e[a])+",";Nh.set(e,o)}if(n==rp){o="#";for(var s=rp.keys(e).sort();!po(a=s.pop());)po(e[a])||(o+=a+":"+Dp(e[a])+",");Nh.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},Tb=!0,_ee=function(){return Tb},J4=mS(),gS=Tee(),Rb=J4&&window.addEventListener?window.addEventListener.bind(window):ti,Iee=gS?document.addEventListener.bind(document):ti,kb=J4&&window.removeEventListener?window.removeEventListener.bind(window):ti,Aee=gS?document.removeEventListener.bind(document):ti,Nee=function(){var e=gS&&document.visibilityState;return po(e)||e!=="hidden"},$ee=function(e){return Iee("visibilitychange",e),Rb("focus",e),function(){Aee("visibilitychange",e),kb("focus",e)}},Pee=function(e){var t=function(){Tb=!0,e()},n=function(){Tb=!1};return Rb("online",t),Rb("offline",n),function(){kb("online",t),kb("offline",n)}},Oee={isOnline:_ee,isVisible:Nee},Dee={initFocus:$ee,initReconnect:Pee},_v=!mS()||"Deno"in window,Lee=function(e){return Ree()?window.requestAnimationFrame(e):setTimeout(e,1)},op=_v?f.exports.useEffect:f.exports.useLayoutEffect,z0=typeof navigator!="undefined"&&navigator.connection,yk=!_v&&z0&&(["slow-2g","2g"].includes(z0.effectiveType)||z0.saveData),Q4=function(e){if(ms(e))try{e=e()}catch{e=""}var t=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Dp(e):"";var n=e?"$swr$"+e:"";return[e,t,n]},Sl=new WeakMap,Z4=0,e$=1,t$=2,ap=function(e,t,n,r,o,a,s){s===void 0&&(s=!0);var l=Sl.get(e),c=l[0],u=l[1],d=l[3],p=c[t],h=u[t];if(s&&h)for(var m=0;m<h.length;++m)h[m](n,r,o);return a&&(delete d[t],p&&p[0])?p[0](t$).then(function(){return e.get(t)}):e.get(t)},Mee=0,_b=function(){return++Mee},n$=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return K4(void 0,void 0,void 0,function(){var n,r,o,a,s,l,c,u,d,p,h,m,b,y,g,x,v,S,E,R,A;return X4(this,function(_){switch(_.label){case 0:if(n=e[0],r=e[1],o=e[2],a=e[3],s=typeof a=="boolean"?{revalidate:a}:a||{},l=po(s.populateCache)?!0:s.populateCache,c=s.revalidate!==!1,u=s.rollbackOnError!==!1,d=s.optimisticData,p=Q4(r),h=p[0],m=p[2],!h)return[2];if(b=Sl.get(n),y=b[2],e.length<3)return[2,ap(n,h,n.get(h),Qr,Qr,c,!0)];if(g=o,v=_b(),y[h]=[v,0],S=!po(d),E=n.get(h),S&&(R=ms(d)?d(E):d,n.set(h,R),ap(n,h,R)),ms(g))try{g=g(n.get(h))}catch(N){x=N}return g&&ms(g.then)?[4,g.catch(function(N){x=N})]:[3,2];case 1:if(g=_.sent(),v!==y[h][0]){if(x)throw x;return[2,g]}else x&&S&&u&&(l=!0,g=E,n.set(h,E));_.label=2;case 2:return l&&(x||(ms(l)&&(g=l(g,E)),n.set(h,g)),n.set(m,Wi(n.get(m),{error:x}))),y[h][1]=_b(),[4,ap(n,h,g,x,Qr,c,!!l)];case 3:if(A=_.sent(),x)throw x;return[2,l?A:g]}})})},bk=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},r$=function(e,t){if(!Sl.has(e)){var n=Wi(Dee,t),r={},o=n$.bind(Qr,e),a=ti;if(Sl.set(e,[r,{},{},{},o]),!_v){var s=n.initFocus(setTimeout.bind(Qr,bk.bind(Qr,r,Z4))),l=n.initReconnect(setTimeout.bind(Qr,bk.bind(Qr,r,e$)));a=function(){s&&s(),l&&l(),Sl.delete(e)}}return[e,o,a]}return[e,Sl.get(e)[4]]},Bee=function(e,t,n,r,o){var a=n.errorRetryCount,s=o.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!po(a)&&s>a||setTimeout(r,l,o)},o$=r$(new Map),a$=o$[0],Fn=o$[1],i$=Wi({onLoadingSlow:ti,onSuccess:ti,onError:ti,onErrorRetry:Bee,onDiscarded:ti,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:yk?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:yk?5e3:3e3,compare:function(e,t){return Dp(e)==Dp(t)},isPaused:function(){return!1},cache:a$,mutate:Fn,fallback:{}},Oee),s$=function(e,t){var n=Wi(e,t);if(t){var r=e.use,o=e.fallback,a=t.use,s=t.fallback;r&&a&&(n.use=r.concat(a)),o&&s&&(n.fallback=Wi(o,s))}return n},Ib=f.exports.createContext({}),Fee=function(e){var t=e.value,n=s$(f.exports.useContext(Ib),t),r=t&&t.provider,o=f.exports.useState(function(){return r?r$(r(n.cache||a$),t):Qr})[0];return o&&(n.cache=o[0],n.mutate=o[1]),op(function(){return o?o[2]:Qr},[]),f.exports.createElement(Ib.Provider,Wi(e,{value:n}))},zee=function(e,t){var n=f.exports.useState({})[1],r=f.exports.useRef(e),o=f.exports.useRef({data:!1,error:!1,isValidating:!1}),a=f.exports.useCallback(function(s){var l=!1,c=r.current;for(var u in s){var d=u;c[d]!==s[d]&&(c[d]=s[d],o.current[d]&&(l=!0))}l&&!t.current&&n({})},[]);return op(function(){r.current=e}),[r,o.current,a]},jee=function(e){return ms(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},l$=function(){return Wi(i$,f.exports.useContext(Ib))},Uee=function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=l$(),a=jee(n),s=a[0],l=a[1],c=a[2],u=s$(o,c),d=e,p=u.use;if(p)for(var h=p.length;h-- >0;)d=p[h](d);return d(s,l||u.fetcher,u)}},xk=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}},j0={dedupe:!0},Wee=function(e,t,n){var r=n.cache,o=n.compare,a=n.fallbackData,s=n.suspense,l=n.revalidateOnMount,c=n.refreshInterval,u=n.refreshWhenHidden,d=n.refreshWhenOffline,p=Sl.get(r),h=p[0],m=p[1],b=p[2],y=p[3],g=Q4(e),x=g[0],v=g[1],S=g[2],E=f.exports.useRef(!1),R=f.exports.useRef(!1),A=f.exports.useRef(x),_=f.exports.useRef(t),N=f.exports.useRef(n),k=function(){return N.current},I=function(){return k().isVisible()&&k().isOnline()},O=function(oe){return r.set(S,Wi(r.get(S),oe))},L=r.get(x),q=po(a)?n.fallback[x]:a,D=po(L)?q:L,H=r.get(S)||{},U=H.error,Z=!E.current,G=function(){return Z&&!po(l)?l:k().isPaused()?!1:s?po(D)?!1:n.revalidateIfStale:po(D)||n.revalidateIfStale},B=function(){return!x||!t?!1:H.isValidating?!0:Z&&G()},Y=B(),K=zee({data:D,error:U,isValidating:Y},R),Q=K[0],re=K[1],pe=K[2],ye=f.exports.useCallback(function(oe){return K4(void 0,void 0,void 0,function(){var ue,ge,_e,We,be,he,He,Pe,pt,St,Ut,zt,gt;return X4(this,function(Et){switch(Et.label){case 0:if(ue=_.current,!x||!ue||R.current||k().isPaused())return[2,!1];We=!0,be=oe||{},he=!y[x]||!be.dedupe,He=function(){return!R.current&&x===A.current&&E.current},Pe=function(){var Qt=y[x];Qt&&Qt[1]===_e&&delete y[x]},pt={isValidating:!1},St=function(){O({isValidating:!1}),He()&&pe(pt)},O({isValidating:!0}),pe({isValidating:!0}),Et.label=1;case 1:return Et.trys.push([1,3,,4]),he&&(ap(r,x,Q.current.data,Q.current.error,!0),n.loadingTimeout&&!r.get(x)&&setTimeout(function(){We&&He()&&k().onLoadingSlow(x,n)},n.loadingTimeout),y[x]=[ue.apply(void 0,v),_b()]),gt=y[x],ge=gt[0],_e=gt[1],[4,ge];case 2:return ge=Et.sent(),he&&setTimeout(Pe,n.dedupingInterval),!y[x]||y[x][1]!==_e?(he&&He()&&k().onDiscarded(x),[2,!1]):(O({error:Qr}),pt.error=Qr,Ut=b[x],!po(Ut)&&(_e<=Ut[0]||_e<=Ut[1]||Ut[1]===0)?(St(),he&&He()&&k().onDiscarded(x),[2,!1]):(o(Q.current.data,ge)?pt.data=Q.current.data:pt.data=ge,o(r.get(x),ge)||r.set(x,ge),he&&He()&&k().onSuccess(ge,x,n),[3,4]));case 3:return zt=Et.sent(),Pe(),k().isPaused()||(O({error:zt}),pt.error=zt,he&&He()&&(k().onError(zt,x,n),(typeof n.shouldRetryOnError=="boolean"&&n.shouldRetryOnError||ms(n.shouldRetryOnError)&&n.shouldRetryOnError(zt))&&I()&&k().onErrorRetry(zt,x,n,ye,{retryCount:(be.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return We=!1,St(),He()&&he&&ap(r,x,pt.data,pt.error,!1),[2,!0]}})})},[x]),ae=f.exports.useCallback(n$.bind(Qr,r,function(){return A.current}),[]);if(op(function(){_.current=t,N.current=n}),op(function(){if(!!x){var oe=x!==A.current,ue=ye.bind(Qr,j0),ge=function(He,Pe,pt){pe(Wi({error:Pe,isValidating:pt},o(Q.current.data,He)?Qr:{data:He}))},_e=0,We=function(He){if(He==Z4){var Pe=Date.now();k().revalidateOnFocus&&Pe>_e&&I()&&(_e=Pe+k().focusThrottleInterval,ue())}else if(He==e$)k().revalidateOnReconnect&&I()&&ue();else if(He==t$)return ye()},be=xk(x,m,ge),he=xk(x,h,We);return R.current=!1,A.current=x,E.current=!0,oe&&pe({data:D,error:U,isValidating:Y}),G()&&(po(D)||_v?ue():Lee(ue)),function(){R.current=!0,be(),he()}}},[x,ye]),op(function(){var oe;function ue(){var _e=ms(c)?c(D):c;_e&&oe!==-1&&(oe=setTimeout(ge,_e))}function ge(){!Q.current.error&&(u||k().isVisible())&&(d||k().isOnline())?ye(j0).then(ue):ue()}return ue(),function(){oe&&(clearTimeout(oe),oe=-1)}},[c,u,d,ye]),f.exports.useDebugValue(D),s&&po(D)&&x)throw _.current=t,N.current=n,R.current=!1,po(U)?ye(j0):U;return{mutate:ae,get data(){return re.data=!0,D},get error(){return re.error=!0,U},get isValidating(){return re.isValidating=!0,Y}}},Hee=rp.defineProperty(Fee,"default",{value:i$}),Wt=Uee(Wee);const bt=(e,t=Xi)=>vS(t,e),Xa=(e,t=Xi)=>vS(t,e),Vee=(e=Gee())=>e==="::baseUriPath::"?"":vS(e),vS=(...e)=>["",...e].join("/").replace(/\/+$/g,"").replace(/\/+/g,"/"),Gee=()=>{var t;const e=document.querySelector('meta[name="baseUriPath"]');return(t=e==null?void 0:e.content)!=null?t:""},Xi=Vee(),Tf=()=>{const{data:e,error:t}=Wt(Vm,qee,Yee),n=f.exports.useCallback(()=>{Fn(Vm).catch(console.warn)},[]);return{data:e,refetchAuth:n,loading:!t&&!e,error:t}},qee=()=>fetch(Vm).then(e=>e.json()),Yee={revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:15e3},Vm=bt("api/admin/user"),yS=()=>{const e=Tf();return{feedback:e.data&&"feedback"in e.data?e.data.feedback:void 0,refetchFeedback:e.refetchAuth,loading:e.loading,error:e.error}},c$=()=>{const{refetchFeedback:e}=yS(),t=bt("api/admin/feedback"),n=f.exports.useCallback(async o=>{await wk("POST",t,o),await e()},[t,e]),r=f.exports.useCallback(async o=>{const a=`${t}/${o.feedbackId}`;await wk("PUT",a,o),await e()},[t,e]);return{createFeedback:n,updateFeedback:r}},wk=async(e,t,n)=>{await fetch(t,{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},Kee=({openUrl:e})=>{const{showFeedback:t,setShowFeedback:n}=f.exports.useContext(Ws),{createFeedback:r,updateFeedback:o}=c$(),{feedback:a}=yS(),[s,l]=f.exports.useState(!1),{classes:c}=wee(),{classes:u}=Yn(),d=Y4,p=async()=>{try{await r({feedbackId:d})}catch(m){console.warn(m),n(!1)}window.open(e,"_blank"),setTimeout(()=>{n(!1)},200)},h=async()=>{try{await o({feedbackId:d,neverShow:!0})}catch(m){console.warn(m),n(!1)}setTimeout(()=>{n(!1)},100)};return Eee(a)?i(q4,{mounted:t,start:u.fadeInTopStart,enter:u.fadeInTopEnter,leave:u.fadeInTopLeave,container:c.animateContainer,children:i("div",{className:c.feedback,children:w("div",{className:it(c.container,u.contentSpacingY),children:[i(wt,{title:"Close",arrow:!0,children:i(Ht,{className:c.close,onClick:()=>n(!1),size:"large",children:i(xv,{})})}),i(hZ,{className:c.logo}),i(F,{condition:s,show:i("p",{children:"Alright, apologies for the disruption. Have a nice day!"}),elseShow:w("p",{children:["Hi. Do you have 2 minutes to help us improve Unleash?"," "]})}),i("div",{children:i(F,{condition:s,show:i(nt,{variant:"outlined",onClick:h,children:"Don't show again"}),elseShow:w(Ne,{children:[i(nt,{variant:"contained",color:"primary",onClick:p,children:"Yes, no problem"}),i(nt,{className:c.cancel,onClick:()=>l(!0),children:"Not now"})]})})})]})})}):null},u$=le()(e=>({container:{"& ul":{margin:0}},primaryBreadcrumb:{color:"white"},headerTitleLink:{color:"white",textDecoration:"none"},contentWrapper:{margin:"0 auto",flex:1,width:"100%",backgroundColor:e.palette.contentWrapper},content:{width:"1250px",margin:"16px auto",[e.breakpoints.down("lg")]:{width:"1024px"},[e.breakpoints.down(1024)]:{width:"100%",marginLeft:0,marginRight:0},[e.breakpoints.down("sm")]:{minWidth:"100%"}},contentContainer:{padding:"2rem 0",height:"100%"},drawerTitle:{lineHeight:"1 !important",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"24px !important",[e.breakpoints.down(1024)]:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:"16px !important"}},drawerTitleLogo:{paddingRight:"16px"},drawerTitleText:{display:"inline-block",verticalAlign:"middle",fontSize:e.fontSizes.smallerBody},navigation:{padding:"8px 5px 8px 0 !important"},navigationLink:{padding:"12px 20px !important",borderRadius:"0 50px 50px 0",textDecoration:"none",[e.breakpoints.down(1024)]:{padding:"12px 16px !important"}},navigationIcon:{marginRight:"16px"},iconGitHub:{width:"24px",height:"24px",background:"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJ3aWR0aDoyNHB4O2hlaWdodDoyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZmlsbD0iIzc1NzU3NSIgZD0iTTEyLDJBMTAsMTAgMCAwLDAgMiwxMkMyLDE2LjQyIDQuODcsMjAuMTcgOC44NCwyMS41QzkuMzQsMjEuNTggOS41LDIxLjI3IDkuNSwyMUM5LjUsMjAuNzcgOS41LDIwLjE0IDkuNSwxOS4zMUM2LjczLDE5LjkxIDYuMTQsMTcuOTcgNi4xNCwxNy45N0M1LjY4LDE2LjgxIDUuMDMsMTYuNSA1LjAzLDE2LjVDNC4xMiwxNS44OCA1LjEsMTUuOSA1LjEsMTUuOUM2LjEsMTUuOTcgNi42MywxNi45MyA2LjYzLDE2LjkzQzcuNSwxOC40NSA4Ljk3LDE4IDkuNTQsMTcuNzZDOS42MywxNy4xMSA5Ljg5LDE2LjY3IDEwLjE3LDE2LjQyQzcuOTUsMTYuMTcgNS42MiwxNS4zMSA1LjYyLDExLjVDNS42MiwxMC4zOSA2LDkuNSA2LjY1LDguNzlDNi41NSw4LjU0IDYuMiw3LjUgNi43NSw2LjE1QzYuNzUsNi4xNSA3LjU5LDUuODggOS41LDcuMTdDMTAuMjksNi45NSAxMS4xNSw2Ljg0IDEyLDYuODRDMTIuODUsNi44NCAxMy43MSw2Ljk1IDE0LjUsNy4xN0MxNi40MSw1Ljg4IDE3LjI1LDYuMTUgMTcuMjUsNi4xNUMxNy44LDcuNSAxNy40NSw4LjU0IDE3LjM1LDguNzlDMTgsOS41IDE4LjM4LDEwLjM5IDE4LjM4LDExLjVDMTguMzgsMTUuMzIgMTYuMDQsMTYuMTYgMTMuODEsMTYuNDFDMTQuMTcsMTYuNzIgMTQuNSwxNy4zMyAxNC41LDE4LjI2QzE0LjUsMTkuNiAxNC41LDIwLjY4IDE0LjUsMjFDMTQuNSwyMS4yNyAxNC42NiwyMS41OSAxNS4xNywyMS41QzE5LjE0LDIwLjE2IDIyLDE2LjQyIDIyLDEyQTEwLDEwIDAgMCwwIDEyLDJaIiAvPgo8L3N2Zz4=)"}}));var bS={},Xee=yn.exports;Object.defineProperty(bS,"__esModule",{value:!0});var d$=bS.default=void 0,Jee=Xee(bn),Qee=Cn,Zee=(0,Jee.default)((0,Qee.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");d$=bS.default=Zee;var xS={},ete=yn.exports;Object.defineProperty(xS,"__esModule",{value:!0});var p$=xS.default=void 0,tte=ete(bn),nte=Cn,rte=(0,tte.default)((0,nte.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");p$=xS.default=rte;var wS={},ote=yn.exports;Object.defineProperty(wS,"__esModule",{value:!0});var f$=wS.default=void 0,ate=ote(bn),ite=Cn,ste=(0,ate.default)((0,ite.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");f$=wS.default=ste;const lte=le()(e=>({userProfileMenu:{display:"flex"},profileContainer:{position:"relative"},button:{color:"inherit",padding:"0.2rem 1rem","&:hover":{backgroundColor:"transparent"}},icon:{color:e.palette.grey[700]}})),cte=le()(e=>({profile:{position:"absolute",zIndex:5e3,minWidth:"300px",right:0,padding:"1.5rem",[e.breakpoints.down("md")]:{width:"100%",padding:"1rem"}},avatar:{width:"40px",height:"40px",transition:"transform 0.4s ease"},editingAvatar:{transform:"translateX(-102px) translateY(-9px)"},profileEmail:{transition:"transform 0.4s ease"},editingEmail:{transform:"translateX(10px) translateY(-60px)"},link:{color:e.palette.primary.main,textDecoration:"none",textAlign:"left",width:"100%"}})),ute=le()(e=>({container:{width:"100%",transform:"translateY(-30px)"},form:{width:"100%","& > *":{width:"100%"}},editProfileTitle:{fontWeight:"bold"},button:{width:"150px",marginTop:"1.15rem",[e.breakpoints.down("md")]:{width:"100px"}}})),Iv=400,Av=200,SS=404,h$=403,CS=401,dte=le()(e=>({container:{border:"1px solid #f1f1f1",borderRadius:e.shape.borderRadius,position:"relative",maxWidth:"350px",color:"#44606e"},headerContainer:{display:"flex",padding:"0.5rem"},divider:{backgroundColor:e.palette.neutral.light,height:"1px",width:"100%"},checkContainer:{width:"95px",margin:"0 0.25rem",display:"flex",justifyContent:"center"},statusBarContainer:{display:"flex",padding:"0.5rem"},statusBar:{width:"50px",borderRadius:e.shape.borderRadius,backgroundColor:"red",height:"6px"},title:{marginBottom:"0",display:"flex",alignItems:"center",gap:"1ch"},statusBarSuccess:{backgroundColor:e.palette.primary.main},repeatingError:{marginTop:"0.5rem",bottom:"0",position:"absolute"}}));var io=et(i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),pte=et(i("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"}),"AddToPhotos"),fte=et(i("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"}),"Adjust"),hte=et(i("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"}),"Apps"),mte=et(i("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5 6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"}),"Archive"),gte=et(i("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),vte=et(i("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"}),"Assessment"),yte=et(i("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),m$=et(i("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),bte=et(i("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"}),"Clear"),ES=et(i("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"),g$=et(i("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 12 19 6.41z"}),"CloseOutlined"),xte=et(i("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"}),"Cloud"),v$=et(i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"}),"CloudCircle"),er=et(i("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),wte=et(i("path",{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"}),"DeviceHub"),y$=et(i("path",{d:"M11 5.08V2c-5 .5-9 4.81-9 10s4 9.5 9 10v-3.08c-3-.48-6-3.4-6-6.92s3-6.44 6-6.92zM18.97 11H22c-.47-5-4-8.53-9-9v3.08C16 5.51 18.54 8 18.97 11zM13 18.92V22c5-.47 8.53-4 9-9h-3.03c-.43 3-2.97 5.49-5.97 5.92z"}),"DonutLarge"),b$=et(i("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"DragIndicator"),ar=et(i("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit"),TS=et(i("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),x$=et(i("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"}),"Extension"),w$=et(i("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),Nv=et(i("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy"),Ste=et(i("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Cte=et(i("path",{d:"m14.4 6-.24-1.2c-.09-.46-.5-.8-.98-.8H6c-.55 0-1 .45-1 1v15c0 .55.45 1 1 1s1-.45 1-1v-6h5.6l.24 1.2c.09.47.5.8.98.8H19c.55 0 1-.45 1-1V7c0-.55-.45-1-1-1h-4.6z"}),"FlagRounded"),Ete=et(i("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V18c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-1.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05.02.01.03.03.04.04 1.14.83 1.93 1.94 1.93 3.41V18c0 .35-.07.69-.18 1H22c.55 0 1-.45 1-1v-1.5c0-2.33-4.67-3.5-7-3.5z"}),"GroupRounded"),Tte=et(i("path",{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"}),"HelpOutline"),S$=et(i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),Rte=et(i("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined"),kte=et(i("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Key"),Ab=et(i("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown"),Gm=et(i("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),_te=et(i("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),RS=et(i("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"}),"Label"),Ite=et(i("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"}),"LibraryBooks"),Ate=et(i("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),$v=et(i("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock"),Nte=et(i("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"}),"MonetizationOn"),$te=et(i("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),Pte=et(i("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),"Pause"),Ote=et(i("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),Dte=et(i("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonChecked"),Sk=et(i("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"}),"Report"),Lte=et(i("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),kS=et(i("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),Mte=et(i("path",{d:"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm3.61 6.34c1.07 0 1.93.86 1.93 1.93 0 1.07-.86 1.93-1.93 1.93-1.07 0-1.93-.86-1.93-1.93-.01-1.07.86-1.93 1.93-1.93zm-6-1.58c1.3 0 2.36 1.06 2.36 2.36 0 1.3-1.06 2.36-2.36 2.36s-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36zm0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68zM11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09z"}),"SupervisedUserCircle"),Bte=et(i("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline"),Fte=et(i("path",{d:"m19.07 4.93-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"}),"TrackChanges"),zte=et(i("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"}),"Undo"),jte=et(i("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"}),"UnfoldMoreOutlined"),C$=et(i("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility"),E$=et(i("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Ute=et(i("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),Wte=et([i("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2z"},"0"),i("path",{d:"M13 16h-2v2h2zm0-6h-2v5h2z"},"1")],"WarningAmber"),Hte=et(i("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"}),"WatchLater");const Vte=le()(e=>({container:{display:"inline-grid",alignItems:"center",outline:0,"&:is(:focus-visible, :active) > *, &:hover > *":{outlineStyle:"solid",outlineWidth:2,outlineOffset:0,outlineColor:e.palette.primary.main,borderRadius:"100%",color:e.palette.primary.main}},icon:{fontSize:"1rem",color:e.palette.inactiveIcon}})),su=({tooltip:e,placement:t})=>{const{classes:n}=Vte();return i(wt,{title:e,placement:t,arrow:!0,children:i("span",{className:n.container,tabIndex:0,"aria-label":"Help",children:i(S$,{className:n.icon})})})},Gte="The password must be at least 10 characters long.",qte="The password must contain at least one number.",Yte="The password must contain at least one special character.",Kte="The password must contain at least one uppercase letter.",Xte="The password must contain at least one lowercase letter.",Jte="The password may not contain sequences of three or more repeated characters.",Lp="The password must be at least 10 characters long and must include an uppercase letter, a lowercase letter, a number, and a symbol.",_S=({password:e,callback:t,style:n={}})=>{const{classes:r}=dte(),[o,a]=f.exports.useState(!0),[s,l]=f.exports.useState(!0),[c,u]=f.exports.useState(!0),[d,p]=f.exports.useState(!0),[h,m]=f.exports.useState(!1),b=f.exports.useCallback(()=>{const _=bt("auth/reset/validate-password");return fetch(_,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({password:e})})},[e]),y=f.exports.useCallback(()=>{x(!1)},[]),g=f.exports.useCallback(async()=>{if(!e){x(!0);return}if(e.length<3){p(!0);return}try{const _=await b();if(_.status===Iv){const N=await _.json();v(N),t(!1)}_.status===Av&&(y(),m(!1),t(!0))}catch{console.log("An exception was caught and handled")}},[b,t,e,y]);f.exports.useEffect(()=>{g()},[e,g]);const x=_=>{a(_),l(_),u(_),p(_)},v=_=>{const N=_.details[0].validationErrors;N.includes(qte)?l(!0):l(!1),N.includes(Yte)?u(!0):u(!1),N.includes(Gte)?p(!0):p(!1),N.includes(Xte)||N.includes(Kte)?a(!0):a(!1),N.includes(Jte)?m(!0):m(!1)},S=it(r.statusBar,{[r.statusBarSuccess]:!d}),E=it(r.statusBar,{[r.statusBarSuccess]:!s}),R=it(r.statusBar,{[r.statusBarSuccess]:!c}),A=it(r.statusBar,{[r.statusBarSuccess]:!o});return w(Ne,{children:[w(Te,{variant:"body2",className:r.title,"data-loading":!0,children:["Please set a strong password",i(su,{tooltip:Lp})]}),w("div",{className:r.container,style:V({},n),children:[w("div",{className:r.headerContainer,children:[i("div",{className:r.checkContainer,children:i(Te,{variant:"body2","data-loading":!0,children:"Length"})}),i("div",{className:r.checkContainer,children:i(Te,{variant:"body2","data-loading":!0,children:"Casing"})}),i("div",{className:r.checkContainer,children:i(Te,{variant:"body2","data-loading":!0,children:"Number"})}),i("div",{className:r.checkContainer,children:i(Te,{variant:"body2","data-loading":!0,children:"Symbol"})})]}),i("div",{className:r.divider}),w("div",{className:r.statusBarContainer,children:[i("div",{className:r.checkContainer,children:i("div",{className:S,"data-loading":!0})}),i("div",{className:r.checkContainer,children:i("div",{className:A,"data-loading":!0})})," ",i("div",{className:r.checkContainer,children:i("div",{className:E,"data-loading":!0})}),i("div",{className:r.checkContainer,children:i("div",{className:R,"data-loading":!0})})]}),i(F,{condition:h,show:i(yt,{severity:"error",className:r.repeatingError,children:"You may not repeat three characters in a row."})})]})]})};var IS={},Qte=yn.exports;Object.defineProperty(IS,"__esModule",{value:!0});var Pv=IS.default=void 0,Zte=Qte(bn),ene=Cn,tne=(0,Zte.default)((0,ene.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");Pv=IS.default=tne;const nne=le()(e=>({matcherContainer:{position:"relative"},matcherIcon:{marginRight:"5px"},matcher:{position:"absolute",bottom:"-8px",display:"flex",alignItems:"center"},matcherError:{color:e.palette.error.main},matcherSuccess:{color:e.palette.primary.main}})),AS=({started:e,matchingPasswords:t})=>{const{classes:n}=nne();return i("div",{className:n.matcherContainer,children:i(F,{condition:e,show:i(F,{condition:t,show:w(Te,{variant:"body2","data-loading":!0,className:it(n.matcher,{[n.matcherSuccess]:t}),children:[i(Pv,{className:n.matcherIcon})," ","Passwords match"]}),elseShow:i(Te,{variant:"body2","data-loading":!0,className:it(n.matcher,{[n.matcherError]:!t}),children:"Passwords do not match"})})})})},Ji=e=>{const t=f.exports.createRef();return f.exports.useLayoutEffect(()=>{t.current&&t.current.querySelectorAll("[data-loading]").forEach(r=>{e?r.classList.add("skeleton"):r.classList.remove("skeleton")})},[e,t]),t},lu=t=>{var e=en(t,[]);const[n,r]=f.exports.useState(!1);return i(At,V({variant:"outlined",size:"small",type:n?"text":"password",InputProps:{style:{paddingRight:"0px"},endAdornment:i(sS,{position:"end",children:i(Ht,{onClick:()=>{r(!n)},onMouseDown:c=>{c.preventDefault()},size:"large",children:i(n?C$:E$,{titleAccess:"Toggle password visibility"})})})}},e))};class NS extends Error{constructor(t=CS){super("Authentication required"),this.name="AuthenticationError",this.statusCode=t}}class T$ extends Error{constructor(t=h$,n={}){var r;super((r=n.details)!=null&&r.length?n.details[0].message:"You cannot perform this action"),this.name="ForbiddenError",this.statusCode=t,this.body=n}}class $S extends Error{constructor(t=Iv,n={}){var r;super((r=n.details)!=null&&r.length?n.details[0].message:"Bad request"),this.name="BadRequestError",this.statusCode=t,this.body=n}}class Ov extends Error{constructor(t=SS){super("The requested resource could not be found."),this.name="NotFoundError",this.statusCode=t}}const qm={Accept:"application/json","Content-Type":"application/json"},Ue=e=>e instanceof Error?e.message||e.toString():typeof e=="string"?e:"Unknown error",rne=({setEditingProfile:e,setUpdatedPassword:t})=>{const{classes:n}=ute(),{classes:r}=Yn(),[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState(!1),[c,u]=f.exports.useState(),[d,p]=f.exports.useState(""),[h,m]=f.exports.useState(""),b=Ji(o),y=async x=>{if(x.preventDefault(),d===h){if(!s)u(Lp);else{a(!0),u(void 0);try{const v=bt("api/admin/user/change-password"),S=await fetch(v,{headers:qm,body:JSON.stringify({password:d,confirmPassword:h}),method:"POST",credentials:"include"});g(S)}catch(v){u(Ue(v))}}a(!1)}},g=x=>{x.status===Iv&&u(Lp),x.status===CS&&u("You are not authorized to make this request."),x.status===SS&&u("The resource you requested could not be found on the server."),x.status===Av&&(e(!1),t(!0))};return w("div",{className:n.container,ref:b,children:[i(Te,{variant:"body1",className:n.editProfileTitle,"data-loading":!0,children:"Update password"}),w("form",{className:it(n.form,r.contentSpacingY),children:[i(_S,{password:d,callback:l,"data-loading":!0}),i(lu,{"data-loading":!0,label:"Password",name:"password",value:d,error:Boolean(c),helperText:c,autoComplete:"new-password",onChange:x=>p(x.target.value)}),i(lu,{"data-loading":!0,label:"Confirm password",name:"confirmPassword",value:h,autoComplete:"new-password",onChange:x=>m(x.target.value)}),i(AS,{"data-loading":!0,started:Boolean(d&&h),matchingPasswords:d===h}),i(nt,{"data-loading":!0,variant:"contained",color:"primary",className:n.button,type:"submit",onClick:y,children:"Save"}),i(nt,{"data-loading":!0,className:n.button,type:"submit",onClick:()=>e(!1),children:"Cancel"})]})]})},one="_showUser_l1e6f_1",ane="_showLocale_l1e6f_7",ine="_labelFlag_l1e6f_12",sne="_avatar_l1e6f_21",lne="_showUserSettings_l1e6f_26",cne="_dropdown_l1e6f_32";var une={showUser:one,showLocale:ane,labelFlag:ine,avatar:sne,showUserSettings:lne,dropdown:cne};const Ck={name:"Unleash",version:"3.x",slogan:"The enterprise ready feature toggle service.",flags:{P:!1,C:!1,E:!1,RE:!1,EEA:!1,CO:!1,SE:!1,T:!1,UNLEASH_CLOUD:!1,UG:!1},links:[{value:"Documentation",icon:Ite,href:"https://docs.getunleash.io/docs?source=oss",title:"User documentation"},{value:"GitHub",icon:"c_github",href:"https://github.com/Unleash",title:"Source code on GitHub"}]},rn=e=>async t=>{if(!t.ok){const n=new Error(`An error occurred while trying to get ${e}`);try{n.info=await t.json()}catch{n.info={}}throw n.status=t.status,n.statusText=t.statusText,n}return t},st=()=>{const e=bt("api/admin/ui-config"),{data:t,error:n,mutate:r}=Wt(e,dne),o=f.exports.useCallback(()=>{var s,l;return!((l=(s=t==null?void 0:t.versionInfo)==null?void 0:s.current)!=null&&l.enterprise)},[t]);return{uiConfig:f.exports.useMemo(()=>ee(V(V({},Ck),t),{flags:V(V({},Ck.flags),t==null?void 0:t.flags)}),[t]),loading:!n&&!t,error:n,refetch:r,isOss:o}},dne=e=>fetch(e).then(rn("configuration")).then(t=>t.json()),pne=({id:e,showProfile:t,profile:n,possibleLocales:r,imageUrl:o,currentLocale:a,setCurrentLocale:s,setLocationSettings:l})=>{const{classes:c}=Yn(),u=pn(),{uiConfig:d}=st(),[p,h]=f.exports.useState(!1),[m,b]=f.exports.useState(!1),{classes:y}=cte(),g=it(y.avatar,{[y.editingAvatar]:m}),x=it(y.profileEmail,{[y.editingEmail]:m}),v=S=>{const E=S.target.value;s(E),l({locale:E})};return i(F,{condition:t,show:w(yr,{id:e,className:it(y.profile,c.flexColumn,c.itemsCenter,c.contentSpacingY),children:[i(_u,{alt:"Your Gravatar",src:o,className:g}),i(Te,{variant:"body1",className:x,children:n==null?void 0:n.email}),i(F,{condition:p,show:i(yt,{onClose:()=>h(!1),children:"Successfully updated password."})}),i(F,{condition:!m,show:w(Ne,{children:[i(F,{condition:!d.disablePasswordAuth,show:i(nt,{onClick:()=>b(!0),children:"Update password"})}),i("div",{className:c.divider}),i("div",{className:une.showUserSettings,children:w(qo,{variant:"outlined",size:"small",style:{width:"100%",minWidth:"120px"},children:[i(Iu,{htmlFor:"locale-select",style:{backgroundColor:u.palette.inputLabelBackground},children:"Date/Time formatting"}),i(Nu,{id:"locale-select",value:a||"",native:!0,onChange:v,MenuProps:{style:{zIndex:9999}},children:r.map(S=>i("option",{value:S,children:S},S))})]})}),i("div",{className:c.divider}),i("a",{className:y.link,href:"https://www.getunleash.io/privacy-policy",rel:"noopener noreferrer",target:"_blank",children:"Privacy policy"}),i("div",{className:c.divider}),i(nt,{variant:"contained",color:"primary",href:`${Xi}/logout`,children:"Logout"})]}),elseShow:i(rne,{setEditingProfile:b,setUpdatedPassword:h})})]})})},Ek="NAVIGATE_TO_CREATE_FEATURE",fne="NAVIGATE_TO_CREATE_GROUP",hne="NAVIGATE_TO_CREATE_SEGMENT",mne="CREATE_API_TOKEN_BUTTON",gne="CF_NAME_ID",vne="CF_TYPE_ID",yne="CF_DESC_ID",bne="CF_CREATE_BTN_ID",xne="UG_NAME_ID",wne="UG_DESC_ID",Sne="UG_USERS_ID",Cne="UG_CREATE_BTN_ID",R$="UG_SAVE_BTN_ID",Ene="UG_EDIT_BTN_ID",Tne="UG_DELETE_BTN_ID",Rne="UG_EDIT_USERS_BTN_ID",kne="UG_REMOVE_USER_BTN_ID",_ne="PA_ASSIGN_BUTTON_ID",Ine="PA_USERS_GROUPS_ID",Ane="PA_ROLE_ID",Nne="PA_ASSIGN_CREATE_ID",$ne="PA_USERS_GROUPS_TITLE_ID",Pne="PA_EDIT_BUTTON_ID",One="PA_REMOVE_BUTTON_ID",Dne="SEGMENT_NAME_ID",Lne="SEGMENT_DESC_ID",Mne="SEGMENT_NEXT_BTN_ID",Bne="SEGMENT_CREATE_BTN_ID",Fne="SEGMENT_SAVE_BTN_ID",zne="SEGMENT_DELETE_BTN_ID",jne="SEGMENT_DIALOG_NAME_ID",Dv="LOGIN_EMAIL_ID",Lv="LOGIN_BUTTON",k$="LOGIN_PASSWORD_ID",Une="SSO_LOGIN_BUTTON",Wne="FORGOTTEN_PASSWORD_FIELD",Hne="INVALID_TOKEN_BUTTON",Vne="FEATURE_ENVIRONMENT_ACCORDION",Tk="ADD_NEW_STRATEGY_ID",Gne="ROLLOUT_SLIDER_ID",qne="DIALOGUE_CONFIRM_ID",Yne="FLEXIBLE_STRATEGY_STICKINESS_ID",Kne="FLEXIBLE_STRATEGY_GROUP_ID",_$="SELECT_ITEM_ID",Xne="STRATEGY_INPUT_LIST",Jne="ADD_TO_STRATEGY_INPUT_LIST",Qne="STRATEGY_FORM_SUBMIT_ID",Rk="STRATEGY_FORM_REMOVE_ID",Zne="INPUT_ERROR_TEXT",ere="HEADER_USER_AVATAR",tre="SIDEBAR_MODAL_ID",nre="AUTH_PAGE_ID",rre="ANNOUNCER_ELEMENT_TEST_ID",PS="INSTANCE_STATUS_BAR_ID",ore="TOAST_TEXT";var are="/static/unknownUser.fc3b9184.png";const ga=(e="useId")=>f.exports.useMemo(()=>`${e}-${ire++}`,[e]);let ire=0;const sre=({profile:e,locationSettings:t,setLocationSettings:n})=>{const[r,o]=f.exports.useState(!1),[a,s]=f.exports.useState(),l=ga(),{classes:c}=lte(),{classes:u}=Yn(),[d,p]=f.exports.useState(["en-US","en-GB","nb-NO","sv-SE","da-DK","en-IN","de","cs","pt-BR","fr-FR"]);f.exports.useEffect(()=>{let b=d.find(y=>y.toLowerCase().includes(t.locale.toLowerCase()));s(b),b||p(y=>[...y,t.locale])},[t]);const m=(e?e.email:"")?e.imageUrl:are;return i(V8,{onClickAway:()=>o(!1),children:w("div",{className:c.profileContainer,children:[w(nt,{className:it(u.flexRow,u.itemsCenter,u.focusable,c.button),onClick:()=>o(b=>!b),"aria-controls":r?l:void 0,"aria-expanded":r,color:"secondary",disableRipple:!0,children:[i(_u,{style:{backgroundColor:"#fff",padding:"0.15rem"},alt:"Your Gravatar",src:m,"data-testid":ere}),i(f$,{className:c.icon})]}),i(pne,{id:l,showProfile:r,imageUrl:m,profile:e,setLocationSettings:n,possibleLocales:d,setCurrentLocale:s,currentLocale:a})]})})},kk=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(d!==t){const p=t;t=u?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},o=()=>t,l={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return t=e(r,o,l),l},lre=e=>e?kk(e):kk;var I$={exports:{}},A$={},N$={exports:{}},$$={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var cu=f.exports;function cre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ure=typeof Object.is=="function"?Object.is:cre,dre=cu.useState,pre=cu.useEffect,fre=cu.useLayoutEffect,hre=cu.useDebugValue;function mre(e,t){var n=t(),r=dre({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return fre(function(){o.value=n,o.getSnapshot=t,U0(o)&&a({inst:o})},[e,n,t]),pre(function(){return U0(o)&&a({inst:o}),e(function(){U0(o)&&a({inst:o})})},[e]),hre(n),n}function U0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ure(e,n)}catch{return!0}}function gre(e,t){return t()}var vre=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?gre:mre;$$.useSyncExternalStore=cu.useSyncExternalStore!==void 0?cu.useSyncExternalStore:vre;N$.exports=$$;/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Mv=f.exports,yre=N$.exports;function bre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xre=typeof Object.is=="function"?Object.is:bre,wre=yre.useSyncExternalStore,Sre=Mv.useRef,Cre=Mv.useEffect,Ere=Mv.useMemo,Tre=Mv.useDebugValue;A$.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var a=Sre(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=Ere(function(){function c(m){if(!u){if(u=!0,d=m,m=r(m),o!==void 0&&s.hasValue){var b=s.value;if(o(b,m))return p=b}return p=m}if(b=p,xre(d,m))return b;var y=r(m);return o!==void 0&&o(b,y)?b:(d=m,p=y)}var u=!1,d,p,h=n===void 0?null:n;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,n,r,o]);var l=wre(e,a[0],a[1]);return Cre(function(){s.hasValue=!0,s.value=l},[l]),Tre(l),l};I$.exports=A$;var Rre=I$.exports;const{useSyncExternalStoreWithSelector:kre}=Rre;function _re(e,t=e.getState,n){const r=kre(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return f.exports.useDebugValue(r),r}const _k=e=>{const t=typeof e=="function"?lre(e):e,n=(r,o)=>_re(t,r,o);return Object.assign(n,t),n},Ire=e=>e?_k(e):_k;var Are=Ire;const Nre=e=>{const t=Are(()=>e),n=(r,o)=>{t.setState(a=>{return{[r]:(s=a[r],l=o,typeof l=="function"?l(s):l)};var s,l})};return{useGlobalState:r=>{const o=f.exports.useCallback(a=>a[r],[r]);return[t(o),f.exports.useCallback(a=>n(r,a),[r])]},getGlobalState:r=>t.getState()[r],setGlobalState:n}},OS=(e,t)=>{var o;const n=Nre({[e]:(o=Wm(e))!=null?o:t}),r=a=>{const s=n.getGlobalState(e),l=a instanceof Function?a(s):a;n.setGlobalState(e,l),$p(e,l)};return()=>[n.useGlobalState(e)[0],r]},vi=()=>{const[e,t]=Pre();return{locationSettings:e,setLocationSettings:t}},$re=()=>({locale:navigator.language}),Pre=OS(`${Xi}:useLocationSettings:v1`,$re()),yi=()=>{const e=Tf();return{user:e.data&&"user"in e.data?e.data.user:void 0,refetchUser:e.refetchAuth,loading:e.loading,error:e.error}},Ik=()=>{const{locationSettings:e,setLocationSettings:t}=vi(),{user:n}=yi();return n?i(sre,{locationSettings:e,setLocationSettings:t,profile:n}):null};var DS={},Ore=yn.exports;Object.defineProperty(DS,"__esModule",{value:!0});var LS=DS.default=void 0,Dre=Ore(bn),Ak=Cn,Lre=(0,Dre.default)([(0,Ak.jsx)("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zm0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5v11.5z"},"0"),(0,Ak.jsx)("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99zM13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83zm4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24z"},"1")],"MenuBook");LS=DS.default=Lre;const Mre=e=>f.exports.createElement("svg",V({id:"bg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 653.4 251.24"},e),f.exports.createElement("defs",null,f.exports.createElement("style",null,".cls-1{fill:#1a4049;}.cls-2{fill:#fff;}.cls-3{fill:#817afe;}")),f.exports.createElement("circle",{className:"cls-1",cx:125.62,cy:125.62,r:80}),f.exports.createElement("polygon",{className:"cls-2",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-2",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("polygon",{className:"cls-2",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-2",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("rect",{className:"cls-3",x:137.05,y:137.05,width:22.86,height:22.86}),f.exports.createElement("path",{className:"cls-1",d:"M251.58,139.13V112.77h11.93v25.06c0,7.36,3.91,12.2,11.27,12.2s11.27-4.84,11.27-12.2V112.77h12v26.36c0,12.67-8.48,21.8-23.1,21.8C260.06,160.93,251.58,151.8,251.58,139.13Z"}),f.exports.createElement("path",{className:"cls-1",d:"M321.91,159.9H310.08V112.77h11.83v7.92a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"}),f.exports.createElement("path",{className:"cls-1",d:"M369.42,91.34h11.92V159.9H369.42Z"}),f.exports.createElement("path",{className:"cls-1",d:"M441.24,137v1.3H403.79c.47,7.36,5.87,13,13.69,13,7.55,0,10.62-3.82,11.46-5.12h11.74c-.75,4.84-7.17,15-23.2,15-15.27,0-25.61-10.61-25.61-24.77,0-14.63,10.24-24.78,24.68-24.78S441.24,121.62,441.24,137Zm-37.08-6.9h24.6c-1.77-6-6.15-9.31-12.21-9.31C410.12,120.78,405.65,124.23,404.16,130.09Z"}),f.exports.createElement("path",{className:"cls-1",d:"M467.78,130.37h15.47c0-5.68-4.29-9.31-11.27-9.31-6.62,0-9,3.54-9.78,4.75h-12c1-4.94,6.89-14.25,21.8-14.25,14.62,0,22.73,7.64,22.73,18.81V146.3c0,2.89,1,4,3.72,4.29v9.59h-3.72c-6.06-.09-9.69-2.33-11-6.52-2.23,3.45-7.26,7.27-15.27,7.27-11.09,0-19.47-6.24-19.47-15.93S456.14,130.37,467.78,130.37Zm15.47,12.11v-4H469.74c-5.59,0-9,2-9,6.33,0,4.57,4.29,7.27,10.25,7.27C477.66,152.08,483.25,148.82,483.25,142.48Z"}),f.exports.createElement("path",{className:"cls-1",d:"M523.12,140.62c-10.34-.74-17.33-5.59-17.33-14.72,0-8.85,8.1-14.44,20.77-14.44,17,0,21.8,8.76,23.1,13.32H537.09c-.84-1-3.54-4.28-10.62-4.28-5.68,0-8.66,1.86-8.66,4.75,0,2.61,2,4.29,6.7,4.94l8,.84c12.77,1.11,18,6,18,15.27,0,8.85-7.36,14.91-21.8,14.91-17.51,0-23.19-10.16-24.12-14.53h12.76c.47,1.11,3.35,5.31,11.36,5.31,6.62,0,9.69-2.24,9.69-5.22s-1.67-4.66-7-5.31C528.05,141.18,526.38,141,523.12,140.62Z"}),f.exports.createElement("path",{className:"cls-1",d:"M571.55,159.9H559.72V91.34h11.83v29.35a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"})),Bre=e=>f.exports.createElement("svg",V({id:"bg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 653.4 251.24"},e),f.exports.createElement("defs",null,f.exports.createElement("style",null,".cls-1{fill:#fff;}.cls-2{fill:#1a4049;}.cls-3{fill:#817afe;}")),f.exports.createElement("circle",{className:"cls-1",cx:125.62,cy:125.62,r:80}),f.exports.createElement("polygon",{className:"cls-1",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-1",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("polygon",{className:"cls-2",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-2",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("rect",{className:"cls-3",x:137.05,y:137.05,width:22.86,height:22.86}),f.exports.createElement("path",{className:"cls-1",d:"M251.58,139.13V112.77h11.93v25.06c0,7.36,3.91,12.2,11.27,12.2s11.27-4.84,11.27-12.2V112.77h12v26.36c0,12.67-8.48,21.8-23.1,21.8C260.06,160.93,251.58,151.8,251.58,139.13Z"}),f.exports.createElement("path",{className:"cls-1",d:"M321.91,159.9H310.08V112.77h11.83v7.92a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"}),f.exports.createElement("path",{className:"cls-1",d:"M369.42,91.34h11.92V159.9H369.42Z"}),f.exports.createElement("path",{className:"cls-1",d:"M441.24,137v1.3H403.79c.47,7.36,5.87,13,13.69,13,7.55,0,10.62-3.82,11.46-5.12h11.74c-.75,4.84-7.17,15-23.2,15-15.27,0-25.61-10.61-25.61-24.77,0-14.63,10.24-24.78,24.68-24.78S441.24,121.62,441.24,137Zm-37.08-6.9h24.6c-1.77-6-6.15-9.31-12.21-9.31C410.12,120.78,405.65,124.23,404.16,130.09Z"}),f.exports.createElement("path",{className:"cls-1",d:"M467.78,130.37h15.47c0-5.68-4.29-9.31-11.27-9.31-6.62,0-9,3.54-9.78,4.75h-12c1-4.94,6.89-14.25,21.8-14.25,14.62,0,22.73,7.64,22.73,18.81V146.3c0,2.89,1,4,3.72,4.29v9.59h-3.72c-6.06-.09-9.69-2.33-11-6.52-2.23,3.45-7.26,7.27-15.27,7.27-11.09,0-19.47-6.24-19.47-15.93S456.14,130.37,467.78,130.37Zm15.47,12.11v-4H469.74c-5.59,0-9,2-9,6.33,0,4.57,4.29,7.27,10.25,7.27C477.66,152.08,483.25,148.82,483.25,142.48Z"}),f.exports.createElement("path",{className:"cls-1",d:"M523.12,140.62c-10.34-.74-17.33-5.59-17.33-14.72,0-8.85,8.1-14.44,20.77-14.44,17,0,21.8,8.76,23.1,13.32H537.09c-.84-1-3.54-4.28-10.62-4.28-5.68,0-8.66,1.86-8.66,4.75,0,2.61,2,4.29,6.7,4.94l8,.84c12.77,1.11,18,6,18,15.27,0,8.85-7.36,14.91-21.8,14.91-17.51,0-23.19-10.16-24.12-14.53h12.76c.47,1.11,3.35,5.31,11.36,5.31,6.62,0,9.69-2.24,9.69-5.22s-1.67-4.66-7-5.31C528.05,141.18,526.38,141,523.12,140.62Z"}),f.exports.createElement("path",{className:"cls-1",d:"M571.55,159.9H559.72V91.34h11.83v29.35a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"}));var MS={},Fre=yn.exports;Object.defineProperty(MS,"__esModule",{value:!0});var P$=MS.default=void 0;Ure(f.exports);var zre=Fre(bn),jre=Cn;function O$(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(O$=function(r){return r?n:t})(e)}function Ure(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=O$(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}var Wre=(0,zre.default)((0,jre.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");P$=MS.default=Wre;var BS={},Hre=yn.exports;Object.defineProperty(BS,"__esModule",{value:!0});var D$=BS.default=void 0,Vre=Hre(bn),Gre=Cn,qre=(0,Vre.default)((0,Gre.jsx)("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"}),"LibraryBooks");D$=BS.default=qre;var FS={},Yre=yn.exports;Object.defineProperty(FS,"__esModule",{value:!0});var L$=FS.default=void 0,Kre=Yre(bn),Xre=Cn,Jre=(0,Kre.default)((0,Xre.jsx)("path",{d:"M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"ExitToApp");L$=FS.default=Jre;const M$=e=>f.exports.createElement("svg",V({id:"bg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 251.43 251.03"},e),f.exports.createElement("defs",null,f.exports.createElement("style",null,".cls-1{fill:#1a4049;}.cls-2{fill:#fff;}.cls-3{fill:#817afe;}")),f.exports.createElement("circle",{className:"cls-1",cx:125.71,cy:125.31,r:80}),f.exports.createElement("polygon",{className:"cls-2",points:"137.14 91.03 137.14 113.88 137.14 136.74 160 136.74 160 113.88 160 91.03 137.14 91.03"}),f.exports.createElement("polygon",{className:"cls-2",points:"114.29 113.88 114.29 91.03 91.43 91.03 91.43 113.88 91.43 136.74 91.43 159.6 114.29 159.6 137.14 159.6 137.14 136.74 114.29 136.74 114.29 113.88"}),f.exports.createElement("rect",{className:"cls-3",x:137.14,y:136.74,width:22.86,height:22.86})),B$=le()(e=>({menuItem:{minWidth:"150px",height:"100%",width:"100%",margin:"0",padding:"0"},menuItemBox:{width:"12.5px",height:"12.5px",display:"block",backgroundColor:e.palette.primary.main,marginRight:"1rem",borderRadius:"2px"},navMenuLink:{textDecoration:"none",alignItems:"center",display:"flex",color:"inherit",height:"100%",width:"100%","&&":{padding:"0.5rem 1rem"}}})),Nk=({path:e,text:t,handleClose:n})=>{const{classes:r}=B$();return i(Rn,{className:r.menuItem,onClick:()=>{n()},children:w(Fl,{style:{textDecoration:"none"},component:Ct,className:r.navMenuLink,to:e,underline:"hover",children:[i("span",{className:r.menuItemBox}),t]})})},Qre="_drawer_cxqms_1",Zre="_drawerTitle_cxqms_6",eoe="_drawerContainer_cxqms_13",toe="_drawerTitleLogo_cxqms_17",noe="_drawerTitleText_cxqms_22",roe="_drawerList_cxqms_27",ooe="_iconLinkList_cxqms_28",aoe="_iconLink_cxqms_28",ioe="_navigationLink_cxqms_42",soe="_navigationLinkActive_cxqms_50",loe="_navigationIcon_cxqms_56",coe="_iconGitHub_cxqms_61";var zo={drawer:Qre,drawerTitle:Zre,drawerContainer:eoe,drawerTitleLogo:toe,drawerTitleText:noe,drawerList:roe,iconLinkList:ooe,iconLink:aoe,navigationLink:ioe,navigationLinkActive:soe,navigationIcon:loe,iconGitHub:coe};const uoe=({links:e=[],title:t="Unleash",flags:n={},open:r=!1,toggleDrawer:o,admin:a=!1,routes:s})=>{const l=()=>e.map(c=>{let u=null;return c.value==="GitHub"?u=i(P$,{className:zo.navigationIcon}):c.value==="Documentation"&&(u=i(D$,{className:zo.navigationIcon})),w("a",{href:c.href,rel:"noopener noreferrer",target:"_blank",className:zo.iconLink,children:[u,c.value]},c.value)});return i(yq,{className:zo.drawer,open:r,anchor:"left",onClose:o,children:w("nav",{id:"header-drawer",className:zo.drawerContainer,children:[i("div",{children:w(Ct,{to:"/",className:zo.drawerTitle,"aria-label":"Home",onClick:()=>o(),children:[i(M$,{className:zo.drawerTitleLogo,"aria-label":"Unleash logo"}),i("span",{className:zo.drawerTitleText,children:t})]})}),i(Ur,{}),i(Po,{className:zo.drawerList,children:s.mobileRoutes.map(c=>i(Nk,{handleClose:()=>o(),path:c.path,text:c.title},c.path))}),i(F,{condition:a,show:w(Ne,{children:[i(Ur,{}),i(Po,{className:zo.drawerList,children:s.adminRoutes.map(c=>i(Nk,{handleClose:()=>o(),path:c.path,text:c.title},c.path))})]})}),i(Ur,{}),w("div",{className:zo.iconLinkList,children:[l(),w("a",{className:zo.iconLink,href:`${Xi}/logout`,children:[i(L$,{className:zo.navigationIcon}),"Sign out"]})]})]})})},sn="ADMIN",Jl="CREATE_FEATURE",Hi="UPDATE_FEATURE",zS="DELETE_FEATURE",Ym="CREATE_STRATEGY",Bv="UPDATE_STRATEGY",doe="DELETE_STRATEGY",$k="UPDATE_APPLICATION",Km="CREATE_CONTEXT_FIELD",F$="UPDATE_CONTEXT_FIELD",poe="DELETE_CONTEXT_FIELD",Nb="CREATE_PROJECT",ca="UPDATE_PROJECT",z$="DELETE_PROJECT",foe="DELETE_TAG_TYPE",Mp="UPDATE_TAG_TYPE",hoe="CREATE_ADDON",Pk="UPDATE_ADDON",moe="DELETE_ADDON",goe="CREATE_API_TOKEN",voe="DELETE_API_TOKEN",yoe="READ_API_TOKEN",boe="DELETE_ENVIRONMENT",Xm="UPDATE_ENVIRONMENT",Vi="CREATE_FEATURE_STRATEGY",jS="UPDATE_FEATURE_STRATEGY",Ok="DELETE_FEATURE_STRATEGY",j$="UPDATE_FEATURE_ENVIRONMENT",Bp="UPDATE_FEATURE_VARIANTS",Dk="MOVE_FEATURE_TOGGLE",US="CREATE_SEGMENT",WS="UPDATE_SEGMENT",xoe="DELETE_SEGMENT",Lk=({options:e,id:t,handleClose:n,anchorEl:r,style:o})=>{const{classes:a}=B$();return i(bf,{id:t,onClose:n,anchorEl:r,open:Boolean(r),style:o,children:e.map(s=>w(_r,{component:Ct,to:s.path,onClick:n,classes:{root:a.navMenuLink},children:[i("span",{className:a.menuItemBox}),s.title]},s.path))})};var ct={exports:{}},$b={exports:{}};(function(e,t){(function(n,r){r(t,f.exports)})(_n,function(n,r){function o(C,$,P,M,X,W,J){try{var ce=C[W](J),fe=ce.value}catch(ve){return void P(ve)}ce.done?$(fe):Promise.resolve(fe).then(M,X)}function a(C){return function(){var $=this,P=arguments;return new Promise(function(M,X){var W=C.apply($,P);function J(fe){o(W,M,X,J,ce,"next",fe)}function ce(fe){o(W,M,X,J,ce,"throw",fe)}J(void 0)})}}function s(){return(s=Object.assign||function(C){for(var $=1;$<arguments.length;$++){var P=arguments[$];for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(C[M]=P[M])}return C}).apply(this,arguments)}function l(C,$){if(C==null)return{};var P,M,X={},W=Object.keys(C);for(M=0;M<W.length;M++)P=W[M],$.indexOf(P)>=0||(X[P]=C[P]);return X}function c(C){var $=function(P,M){if(typeof P!="object"||P===null)return P;var X=P[Symbol.toPrimitive];if(X!==void 0){var W=X.call(P,M||"default");if(typeof W!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(M==="string"?String:Number)(P)}(C,"string");return typeof $=="symbol"?$:String($)}r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var u={init:"init"},d=function(C){var $=C.value;return $===void 0?"":$},p=function(){return r.createElement(r.Fragment,null,"\xA0")},h={Cell:d,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function m(){for(var C=arguments.length,$=new Array(C),P=0;P<C;P++)$[P]=arguments[P];return $.reduce(function(M,X){var W=X.style,J=X.className;return M=s({},M,{},l(X,["style","className"])),W&&(M.style=M.style?s({},M.style||{},{},W||{}):W),J&&(M.className=M.className?M.className+" "+J:J),M.className===""&&delete M.className,M},{})}var b=function(C,$){return $===void 0&&($={}),function(P){return P===void 0&&(P={}),[].concat(C,[P]).reduce(function(M,X){return function W(J,ce,fe){return typeof ce=="function"?W({},ce(J,fe)):Array.isArray(ce)?m.apply(void 0,[J].concat(ce)):m(J,ce)}(M,X,s({},$,{userProps:P}))},{})}},y=function(C,$,P,M){return P===void 0&&(P={}),C.reduce(function(X,W){return W(X,P)},$)},g=function(C,$,P){return P===void 0&&(P={}),C.forEach(function(M){M($,P)})};function x(C,$,P,M){C.findIndex(function(X){return X.pluginName===P}),$.forEach(function(X){C.findIndex(function(W){return W.pluginName===X})})}function v(C,$){return typeof C=="function"?C($):C}function S(C){var $=r.useRef();return $.current=C,r.useCallback(function(){return $.current},[])}var E=typeof document!="undefined"?r.useLayoutEffect:r.useEffect;function R(C,$){var P=r.useRef(!1);E(function(){P.current&&C(),P.current=!0},$)}function A(C,$,P){return P===void 0&&(P={}),function(M,X){X===void 0&&(X={});var W=typeof M=="string"?$[M]:M;if(W===void 0)throw console.info($),new Error("Renderer Error \u261D\uFE0F");return _(W,s({},C,{column:$},P,{},X))}}function _(C,$){return function(M){return typeof M=="function"&&(X=Object.getPrototypeOf(M)).prototype&&X.prototype.isReactComponent;var X}(P=C)||typeof P=="function"||function(M){return typeof M=="object"&&typeof M.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(M.$$typeof.description)}(P)?r.createElement(C,$):C;var P}function N(C,$,P){return P===void 0&&(P=0),C.map(function(M){return I(M=s({},M,{parent:$,depth:P})),M.columns&&(M.columns=N(M.columns,M,P+1)),M})}function k(C){return U(C,"columns")}function I(C){var $=C.id,P=C.accessor,M=C.Header;if(typeof P=="string"){$=$||P;var X=P.split(".");P=function(W){return function(J,ce,fe){if(!ce)return J;var ve,Be=typeof ce=="function"?ce:JSON.stringify(ce),Oe=q.get(Be)||function(){var De=function(Ae){return function Le(qe,Ze){if(Ze===void 0&&(Ze=[]),Array.isArray(qe))for(var ft=0;ft<qe.length;ft+=1)Le(qe[ft],Ze);else Ze.push(qe);return Ze}(Ae).map(function(Le){return String(Le).replace(".","_")}).join(".").replace(Q,".").replace(re,"").split(".")}(ce);return q.set(Be,De),De}();try{ve=Oe.reduce(function(De,Ae){return De[Ae]},J)}catch{}return ve!==void 0?ve:fe}(W,X)}}if(!$&&typeof M=="string"&&M&&($=M),!$&&C.columns)throw console.error(C),new Error('A column ID (or unique "Header" value) is required!');if(!$)throw console.error(C),new Error("A column ID (or string accessor) is required!");return Object.assign(C,{id:$,accessor:P}),C}function O(C,$){if(!$)throw new Error;return Object.assign(C,s({Header:p,Footer:p},h,{},$,{},C)),Object.assign(C,{originalWidth:C.width}),C}function L(C,$,P){P===void 0&&(P=function(){return{}});for(var M=[],X=C,W=0,J=function(){return W++},ce=function(){var fe={headers:[]},ve=[],Be=X.some(function(Oe){return Oe.parent});X.forEach(function(Oe){var De,Ae=[].concat(ve).reverse()[0];Be&&(Oe.parent?De=s({},Oe.parent,{originalId:Oe.parent.id,id:Oe.parent.id+"_"+J(),headers:[Oe]},P(Oe)):De=O(s({originalId:Oe.id+"_placeholder",id:Oe.id+"_placeholder_"+J(),placeholderOf:Oe,headers:[Oe]},P(Oe)),$),Ae&&Ae.originalId===De.originalId?Ae.headers.push(Oe):ve.push(De)),fe.headers.push(Oe)}),M.push(fe),X=ve};X.length;)ce();return M.reverse()}var q=new Map;function D(){for(var C=arguments.length,$=new Array(C),P=0;P<C;P++)$[P]=arguments[P];for(var M=0;M<$.length;M+=1)if($[M]!==void 0)return $[M]}function H(C){if(typeof C=="function")return C}function U(C,$){var P=[];return function M(X){X.forEach(function(W){W[$]?M(W[$]):P.push(W)})}(C),P}function Z(C,$){var P=$.manualExpandedKey,M=$.expanded,X=$.expandSubRows,W=X===void 0||X,J=[];return C.forEach(function(ce){return function fe(ve,Be){Be===void 0&&(Be=!0),ve.isExpanded=ve.original&&ve.original[P]||M[ve.id],ve.canExpand=ve.subRows&&!!ve.subRows.length,Be&&J.push(ve),ve.subRows&&ve.subRows.length&&ve.isExpanded&&ve.subRows.forEach(function(Oe){return fe(Oe,W)})}(ce)}),J}function G(C,$,P){return H(C)||$[C]||P[C]||P.text}function B(C,$,P){return C?C($,P):$===void 0}function Y(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var K=null,Q=/\[/g,re=/\]/g,pe=function(C){return s({role:"table"},C)},ye=function(C){return s({role:"rowgroup"},C)},ae=function(C,$){var P=$.column;return s({key:"header_"+P.id,colSpan:P.totalVisibleHeaderCount,role:"columnheader"},C)},oe=function(C,$){var P=$.column;return s({key:"footer_"+P.id,colSpan:P.totalVisibleHeaderCount},C)},ue=function(C,$){return s({key:"headerGroup_"+$.index,role:"row"},C)},ge=function(C,$){return s({key:"footerGroup_"+$.index},C)},_e=function(C,$){return s({key:"row_"+$.row.id,role:"row"},C)},We=function(C,$){var P=$.cell;return s({key:"cell_"+P.row.id+"_"+P.column.id,role:"cell"},C)};function be(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[pe],getTableBodyProps:[ye],getHeaderGroupProps:[ue],getFooterGroupProps:[ge],getHeaderProps:[ae],getFooterProps:[oe],getRowProps:[_e],getCellProps:[We],useFinalInstance:[]}}u.resetHiddenColumns="resetHiddenColumns",u.toggleHideColumn="toggleHideColumn",u.setHiddenColumns="setHiddenColumns",u.toggleHideAllColumns="toggleHideAllColumns";var he=function(C){C.getToggleHiddenProps=[He],C.getToggleHideAllColumnsProps=[Pe],C.stateReducers.push(pt),C.useInstanceBeforeDimensions.push(St),C.headerGroupsDeps.push(function($,P){var M=P.instance;return[].concat($,[M.state.hiddenColumns])}),C.useInstance.push(Ut)};he.pluginName="useColumnVisibility";var He=function(C,$){var P=$.column;return[C,{onChange:function(M){P.toggleHidden(!M.target.checked)},style:{cursor:"pointer"},checked:P.isVisible,title:"Toggle Column Visible"}]},Pe=function(C,$){var P=$.instance;return[C,{onChange:function(M){P.toggleHideAllColumns(!M.target.checked)},style:{cursor:"pointer"},checked:!P.allColumnsHidden&&!P.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!P.allColumnsHidden&&P.state.hiddenColumns.length}]};function pt(C,$,P,M){if($.type===u.init)return s({hiddenColumns:[]},C);if($.type===u.resetHiddenColumns)return s({},C,{hiddenColumns:M.initialState.hiddenColumns||[]});if($.type===u.toggleHideColumn){var X=($.value!==void 0?$.value:!C.hiddenColumns.includes($.columnId))?[].concat(C.hiddenColumns,[$.columnId]):C.hiddenColumns.filter(function(W){return W!==$.columnId});return s({},C,{hiddenColumns:X})}return $.type===u.setHiddenColumns?s({},C,{hiddenColumns:v($.value,C.hiddenColumns)}):$.type===u.toggleHideAllColumns?s({},C,{hiddenColumns:($.value!==void 0?$.value:!C.hiddenColumns.length)?M.allColumns.map(function(W){return W.id}):[]}):void 0}function St(C){var $=C.headers,P=C.state.hiddenColumns;r.useRef(!1).current;var M=0;$.forEach(function(X){return M+=function W(J,ce){J.isVisible=ce&&!P.includes(J.id);var fe=0;return J.headers&&J.headers.length?J.headers.forEach(function(ve){return fe+=W(ve,J.isVisible)}):fe=J.isVisible?1:0,J.totalVisibleHeaderCount=fe,fe}(X,!0)})}function Ut(C){var $=C.columns,P=C.flatHeaders,M=C.dispatch,X=C.allColumns,W=C.getHooks,J=C.state.hiddenColumns,ce=C.autoResetHiddenColumns,fe=ce===void 0||ce,ve=S(C),Be=X.length===J.length,Oe=r.useCallback(function(Ze,ft){return M({type:u.toggleHideColumn,columnId:Ze,value:ft})},[M]),De=r.useCallback(function(Ze){return M({type:u.setHiddenColumns,value:Ze})},[M]),Ae=r.useCallback(function(Ze){return M({type:u.toggleHideAllColumns,value:Ze})},[M]),Le=b(W().getToggleHideAllColumnsProps,{instance:ve()});P.forEach(function(Ze){Ze.toggleHidden=function(ft){M({type:u.toggleHideColumn,columnId:Ze.id,value:ft})},Ze.getToggleHiddenProps=b(W().getToggleHiddenProps,{instance:ve(),column:Ze})});var qe=S(fe);R(function(){qe()&&M({type:u.resetHiddenColumns})},[M,$]),Object.assign(C,{allColumnsHidden:Be,toggleHideColumn:Oe,setHiddenColumns:De,toggleHideAllColumns:Ae,getToggleHideAllColumnsProps:Le})}var zt={},gt={},Et=function(C,$,P){return C},Qt=function(C,$){return C.subRows||[]},In=function(C,$,P){return""+(P?[P.id,$].join("."):$)},ke=function(C){return C};function Fe(C){var $=C.initialState,P=$===void 0?zt:$,M=C.defaultColumn,X=M===void 0?gt:M,W=C.getSubRows,J=W===void 0?Qt:W,ce=C.getRowId,fe=ce===void 0?In:ce,ve=C.stateReducer,Be=ve===void 0?Et:ve,Oe=C.useControlledState,De=Oe===void 0?ke:Oe;return s({},l(C,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:P,defaultColumn:X,getSubRows:J,getRowId:fe,stateReducer:Be,useControlledState:De})}function Ge(C,$){$===void 0&&($=0);var P=0,M=0,X=0,W=0;return C.forEach(function(J){var ce=J.headers;if(J.totalLeft=$,ce&&ce.length){var fe=Ge(ce,$),ve=fe[0],Be=fe[1],Oe=fe[2],De=fe[3];J.totalMinWidth=ve,J.totalWidth=Be,J.totalMaxWidth=Oe,J.totalFlexWidth=De}else J.totalMinWidth=J.minWidth,J.totalWidth=Math.min(Math.max(J.minWidth,J.width),J.maxWidth),J.totalMaxWidth=J.maxWidth,J.totalFlexWidth=J.canResize?J.totalWidth:0;J.isVisible&&($+=J.totalWidth,P+=J.totalMinWidth,M+=J.totalWidth,X+=J.totalMaxWidth,W+=J.totalFlexWidth)}),[P,M,X,W]}function $e(C){var $=C.data,P=C.rows,M=C.flatRows,X=C.rowsById,W=C.column,J=C.getRowId,ce=C.getSubRows,fe=C.accessValueHooks,ve=C.getInstance;$.forEach(function(Be,Oe){return function De(Ae,Le,qe,Ze,ft){qe===void 0&&(qe=0);var jt=Ae,dt=J(Ae,Le,Ze),ze=X[dt];if(ze)ze.subRows&&ze.originalSubRows.forEach(function(rt,It){return De(rt,It,qe+1,ze)});else if((ze={id:dt,original:jt,index:Le,depth:qe,cells:[{}]}).cells.map=Y,ze.cells.filter=Y,ze.cells.forEach=Y,ze.cells[0].getCellProps=Y,ze.values={},ft.push(ze),M.push(ze),X[dt]=ze,ze.originalSubRows=ce(Ae,Le),ze.originalSubRows){var Pt=[];ze.originalSubRows.forEach(function(rt,It){return De(rt,It,qe+1,ze,Pt)}),ze.subRows=Pt}W.accessor&&(ze.values[W.id]=W.accessor(Ae,Le,ze,ft,$)),ze.values[W.id]=y(fe,ze.values[W.id],{row:ze,column:W,instance:ve()})}(Be,Oe,0,void 0,P)})}u.resetExpanded="resetExpanded",u.toggleRowExpanded="toggleRowExpanded",u.toggleAllRowsExpanded="toggleAllRowsExpanded";var te=function(C){C.getToggleAllRowsExpandedProps=[Ee],C.getToggleRowExpandedProps=[me],C.stateReducers.push(je),C.useInstance.push(ut),C.prepareRow.push(kt)};te.pluginName="useExpanded";var Ee=function(C,$){var P=$.instance;return[C,{onClick:function(M){P.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},me=function(C,$){var P=$.row;return[C,{onClick:function(){P.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function je(C,$,P,M){if($.type===u.init)return s({expanded:{}},C);if($.type===u.resetExpanded)return s({},C,{expanded:M.initialState.expanded||{}});if($.type===u.toggleAllRowsExpanded){var X=$.value,W=M.rowsById,J=Object.keys(W).length===Object.keys(C.expanded).length;if(X!==void 0?X:!J){var ce={};return Object.keys(W).forEach(function(Le){ce[Le]=!0}),s({},C,{expanded:ce})}return s({},C,{expanded:{}})}if($.type===u.toggleRowExpanded){var fe,ve=$.id,Be=$.value,Oe=C.expanded[ve],De=Be!==void 0?Be:!Oe;if(!Oe&&De)return s({},C,{expanded:s({},C.expanded,(fe={},fe[ve]=!0,fe))});if(Oe&&!De){var Ae=C.expanded;return Ae[ve],s({},C,{expanded:l(Ae,[ve].map(c))})}return C}}function ut(C){var $=C.data,P=C.rows,M=C.rowsById,X=C.manualExpandedKey,W=X===void 0?"expanded":X,J=C.paginateExpandedRows,ce=J===void 0||J,fe=C.expandSubRows,ve=fe===void 0||fe,Be=C.autoResetExpanded,Oe=Be===void 0||Be,De=C.getHooks,Ae=C.plugins,Le=C.state.expanded,qe=C.dispatch;x(Ae,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var Ze=S(Oe),ft=Boolean(Object.keys(M).length&&Object.keys(Le).length);ft&&Object.keys(M).some(function(Yt){return!Le[Yt]})&&(ft=!1),R(function(){Ze()&&qe({type:u.resetExpanded})},[qe,$]);var jt=r.useCallback(function(Yt,Tt){qe({type:u.toggleRowExpanded,id:Yt,value:Tt})},[qe]),dt=r.useCallback(function(Yt){return qe({type:u.toggleAllRowsExpanded,value:Yt})},[qe]),ze=r.useMemo(function(){return ce?Z(P,{manualExpandedKey:W,expanded:Le,expandSubRows:ve}):P},[ce,P,W,Le,ve]),Pt=r.useMemo(function(){return function(Yt){var Tt=0;return Object.keys(Yt).forEach(function(_t){var hn=_t.split(".");Tt=Math.max(Tt,hn.length)}),Tt}(Le)},[Le]),rt=S(C),It=b(De().getToggleAllRowsExpandedProps,{instance:rt()});Object.assign(C,{preExpandedRows:P,expandedRows:ze,rows:ze,expandedDepth:Pt,isAllRowsExpanded:ft,toggleRowExpanded:jt,toggleAllRowsExpanded:dt,getToggleAllRowsExpandedProps:It})}function kt(C,$){var P=$.instance.getHooks,M=$.instance;C.toggleRowExpanded=function(X){return M.toggleRowExpanded(C.id,X)},C.getToggleRowExpandedProps=b(P().getToggleRowExpandedProps,{instance:M,row:C})}var cn=function(C,$,P){return C=C.filter(function(M){return $.some(function(X){var W=M.values[X];return String(W).toLowerCase().includes(String(P).toLowerCase())})})};cn.autoRemove=function(C){return!C};var Wn=function(C,$,P){return C.filter(function(M){return $.some(function(X){var W=M.values[X];return W===void 0||String(W).toLowerCase()===String(P).toLowerCase()})})};Wn.autoRemove=function(C){return!C};var So=function(C,$,P){return C.filter(function(M){return $.some(function(X){var W=M.values[X];return W===void 0||String(W)===String(P)})})};So.autoRemove=function(C){return!C};var tr=function(C,$,P){return C.filter(function(M){return $.some(function(X){return M.values[X].includes(P)})})};tr.autoRemove=function(C){return!C||!C.length};var pr=function(C,$,P){return C.filter(function(M){return $.some(function(X){var W=M.values[X];return W&&W.length&&P.every(function(J){return W.includes(J)})})})};pr.autoRemove=function(C){return!C||!C.length};var Nr=function(C,$,P){return C.filter(function(M){return $.some(function(X){var W=M.values[X];return W&&W.length&&P.some(function(J){return W.includes(J)})})})};Nr.autoRemove=function(C){return!C||!C.length};var On=function(C,$,P){return C.filter(function(M){return $.some(function(X){var W=M.values[X];return P.includes(W)})})};On.autoRemove=function(C){return!C||!C.length};var En=function(C,$,P){return C.filter(function(M){return $.some(function(X){return M.values[X]===P})})};En.autoRemove=function(C){return C===void 0};var fn=function(C,$,P){return C.filter(function(M){return $.some(function(X){return M.values[X]==P})})};fn.autoRemove=function(C){return C==null};var Bo=function(C,$,P){var M=P||[],X=M[0],W=M[1];if((X=typeof X=="number"?X:-1/0)>(W=typeof W=="number"?W:1/0)){var J=X;X=W,W=J}return C.filter(function(ce){return $.some(function(fe){var ve=ce.values[fe];return ve>=X&&ve<=W})})};Bo.autoRemove=function(C){return!C||typeof C[0]!="number"&&typeof C[1]!="number"};var Fo=Object.freeze({__proto__:null,text:cn,exactText:Wn,exactTextCase:So,includes:tr,includesAll:pr,includesSome:Nr,includesValue:On,exact:En,equals:fn,between:Bo});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Co=function(C){C.stateReducers.push(Ca),C.useInstance.push(Ea)};function Ca(C,$,P,M){if($.type===u.init)return s({filters:[]},C);if($.type===u.resetFilters)return s({},C,{filters:M.initialState.filters||[]});if($.type===u.setFilter){var X=$.columnId,W=$.filterValue,J=M.allColumns,ce=M.filterTypes,fe=J.find(function(qe){return qe.id===X});if(!fe)throw new Error("React-Table: Could not find a column with id: "+X);var ve=G(fe.filter,ce||{},Fo),Be=C.filters.find(function(qe){return qe.id===X}),Oe=v(W,Be&&Be.value);return B(ve.autoRemove,Oe,fe)?s({},C,{filters:C.filters.filter(function(qe){return qe.id!==X})}):s({},C,Be?{filters:C.filters.map(function(qe){return qe.id===X?{id:X,value:Oe}:qe})}:{filters:[].concat(C.filters,[{id:X,value:Oe}])})}if($.type===u.setAllFilters){var De=$.filters,Ae=M.allColumns,Le=M.filterTypes;return s({},C,{filters:v(De,C.filters).filter(function(qe){var Ze=Ae.find(function(ft){return ft.id===qe.id});return!B(G(Ze.filter,Le||{},Fo).autoRemove,qe.value,Ze)})})}}function Ea(C){var $=C.data,P=C.rows,M=C.flatRows,X=C.rowsById,W=C.allColumns,J=C.filterTypes,ce=C.manualFilters,fe=C.defaultCanFilter,ve=fe!==void 0&&fe,Be=C.disableFilters,Oe=C.state.filters,De=C.dispatch,Ae=C.autoResetFilters,Le=Ae===void 0||Ae,qe=r.useCallback(function(rt,It){De({type:u.setFilter,columnId:rt,filterValue:It})},[De]),Ze=r.useCallback(function(rt){De({type:u.setAllFilters,filters:rt})},[De]);W.forEach(function(rt){var It=rt.id,Yt=rt.accessor,Tt=rt.defaultCanFilter,_t=rt.disableFilters;rt.canFilter=Yt?D(_t!==!0&&void 0,Be!==!0&&void 0,!0):D(Tt,ve,!1),rt.setFilter=function(Nt){return qe(rt.id,Nt)};var hn=Oe.find(function(Nt){return Nt.id===It});rt.filterValue=hn&&hn.value});var ft=r.useMemo(function(){if(ce||!Oe.length)return[P,M,X];var rt=[],It={};return[function Yt(Tt,_t){_t===void 0&&(_t=0);var hn=Tt;return(hn=Oe.reduce(function(Nt,un){var Zt=un.id,Dn=un.value,ht=W.find(function(sr){return sr.id===Zt});if(!ht)return Nt;_t===0&&(ht.preFilteredRows=Nt);var Kt=G(ht.filter,J||{},Fo);return Kt?(ht.filteredRows=Kt(Nt,[Zt],Dn),ht.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+ht.id+"."),Nt)},Tt)).forEach(function(Nt){rt.push(Nt),It[Nt.id]=Nt,Nt.subRows&&(Nt.subRows=Nt.subRows&&Nt.subRows.length>0?Yt(Nt.subRows,_t+1):Nt.subRows)}),hn}(P),rt,It]},[ce,Oe,P,M,X,W,J]),jt=ft[0],dt=ft[1],ze=ft[2];r.useMemo(function(){W.filter(function(rt){return!Oe.find(function(It){return It.id===rt.id})}).forEach(function(rt){rt.preFilteredRows=jt,rt.filteredRows=jt})},[jt,Oe,W]);var Pt=S(Le);R(function(){Pt()&&De({type:u.resetFilters})},[De,ce?null:$]),Object.assign(C,{preFilteredRows:P,preFilteredFlatRows:M,preFilteredRowsById:X,filteredRows:jt,filteredFlatRows:dt,filteredRowsById:ze,rows:jt,flatRows:dt,rowsById:ze,setFilter:qe,setAllFilters:Ze})}Co.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var qt=function(C){C.stateReducers.push(ir),C.useInstance.push(fr)};function ir(C,$,P,M){if($.type===u.resetGlobalFilter)return s({},C,{globalFilter:M.initialState.globalFilter||void 0});if($.type===u.setGlobalFilter){var X=$.filterValue,W=M.userFilterTypes,J=G(M.globalFilter,W||{},Fo),ce=v(X,C.globalFilter);return B(J.autoRemove,ce)?(C.globalFilter,l(C,["globalFilter"])):s({},C,{globalFilter:ce})}}function fr(C){var $=C.data,P=C.rows,M=C.flatRows,X=C.rowsById,W=C.allColumns,J=C.filterTypes,ce=C.globalFilter,fe=C.manualGlobalFilter,ve=C.state.globalFilter,Be=C.dispatch,Oe=C.autoResetGlobalFilter,De=Oe===void 0||Oe,Ae=C.disableGlobalFilter,Le=r.useCallback(function(ze){Be({type:u.setGlobalFilter,filterValue:ze})},[Be]),qe=r.useMemo(function(){if(fe||ve===void 0)return[P,M,X];var ze=[],Pt={},rt=G(ce,J||{},Fo);if(!rt)return console.warn("Could not find a valid 'globalFilter' option."),P;W.forEach(function(Yt){var Tt=Yt.disableGlobalFilter;Yt.canFilter=D(Tt!==!0&&void 0,Ae!==!0&&void 0,!0)});var It=W.filter(function(Yt){return Yt.canFilter===!0});return[function Yt(Tt){return(Tt=rt(Tt,It.map(function(_t){return _t.id}),ve)).forEach(function(_t){ze.push(_t),Pt[_t.id]=_t,_t.subRows=_t.subRows&&_t.subRows.length?Yt(_t.subRows):_t.subRows}),Tt}(P),ze,Pt]},[fe,ve,ce,J,W,P,M,X,Ae]),Ze=qe[0],ft=qe[1],jt=qe[2],dt=S(De);R(function(){dt()&&Be({type:u.resetGlobalFilter})},[Be,fe?null:$]),Object.assign(C,{preGlobalFilteredRows:P,preGlobalFilteredFlatRows:M,preGlobalFilteredRowsById:X,globalFilteredRows:Ze,globalFilteredFlatRows:ft,globalFilteredRowsById:jt,rows:Ze,flatRows:ft,rowsById:jt,setGlobalFilter:Le,disableGlobalFilter:Ae})}function Ta(C,$){return $.reduce(function(P,M){return P+(typeof M=="number"?M:0)},0)}qt.pluginName="useGlobalFilter";var Zi=Object.freeze({__proto__:null,sum:Ta,min:function(C){var $=C[0]||0;return C.forEach(function(P){typeof P=="number"&&($=Math.min($,P))}),$},max:function(C){var $=C[0]||0;return C.forEach(function(P){typeof P=="number"&&($=Math.max($,P))}),$},minMax:function(C){var $=C[0]||0,P=C[0]||0;return C.forEach(function(M){typeof M=="number"&&($=Math.min($,M),P=Math.max(P,M))}),$+".."+P},average:function(C){return Ta(0,C)/C.length},median:function(C){if(!C.length)return null;var $=Math.floor(C.length/2),P=[].concat(C).sort(function(M,X){return M-X});return C.length%2!=0?P[$]:(P[$-1]+P[$])/2},unique:function(C){return Array.from(new Set(C).values())},uniqueCount:function(C){return new Set(C).size},count:function(C){return C.length}}),qs=[],Ys={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var Lt=function(C){C.getGroupByToggleProps=[xn],C.stateReducers.push(Ie),C.visibleColumnsDeps.push(function($,P){var M=P.instance;return[].concat($,[M.state.groupBy])}),C.visibleColumns.push(we),C.useInstance.push(Mt),C.prepareRow.push(An)};Lt.pluginName="useGroupBy";var xn=function(C,$){var P=$.header;return[C,{onClick:P.canGroupBy?function(M){M.persist(),P.toggleGroupBy()}:void 0,style:{cursor:P.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Ie(C,$,P,M){if($.type===u.init)return s({groupBy:[]},C);if($.type===u.resetGroupBy)return s({},C,{groupBy:M.initialState.groupBy||[]});if($.type===u.setGroupBy)return s({},C,{groupBy:$.value});if($.type===u.toggleGroupBy){var X=$.columnId,W=$.value,J=W!==void 0?W:!C.groupBy.includes(X);return s({},C,J?{groupBy:[].concat(C.groupBy,[X])}:{groupBy:C.groupBy.filter(function(ce){return ce!==X})})}}function we(C,$){var P=$.instance.state.groupBy,M=P.map(function(W){return C.find(function(J){return J.id===W})}).filter(Boolean),X=C.filter(function(W){return!P.includes(W.id)});return(C=[].concat(M,X)).forEach(function(W){W.isGrouped=P.includes(W.id),W.groupedIndex=P.indexOf(W.id)}),C}var xt={};function Mt(C){var $=C.data,P=C.rows,M=C.flatRows,X=C.rowsById,W=C.allColumns,J=C.flatHeaders,ce=C.groupByFn,fe=ce===void 0?Mn:ce,ve=C.manualGroupBy,Be=C.aggregations,Oe=Be===void 0?xt:Be,De=C.plugins,Ae=C.state.groupBy,Le=C.dispatch,qe=C.autoResetGroupBy,Ze=qe===void 0||qe,ft=C.disableGroupBy,jt=C.defaultCanGroupBy,dt=C.getHooks;x(De,["useColumnOrder","useFilters"],"useGroupBy");var ze=S(C);W.forEach(function(ht){var Kt=ht.accessor,sr=ht.defaultGroupBy,lo=ht.disableGroupBy;ht.canGroupBy=Kt?D(ht.canGroupBy,lo!==!0&&void 0,ft!==!0&&void 0,!0):D(ht.canGroupBy,sr,jt,!1),ht.canGroupBy&&(ht.toggleGroupBy=function(){return C.toggleGroupBy(ht.id)}),ht.Aggregated=ht.Aggregated||ht.Cell});var Pt=r.useCallback(function(ht,Kt){Le({type:u.toggleGroupBy,columnId:ht,value:Kt})},[Le]),rt=r.useCallback(function(ht){Le({type:u.setGroupBy,value:ht})},[Le]);J.forEach(function(ht){ht.getGroupByToggleProps=b(dt().getGroupByToggleProps,{instance:ze(),header:ht})});var It=r.useMemo(function(){if(ve||!Ae.length)return[P,M,X,qs,Ys,M,X];var ht=Ae.filter(function($r){return W.find(function(es){return es.id===$r})}),Kt=[],sr={},lo=[],Rt={},Jn=[],xr={},co=function $r(es,Ii,S2){if(Ii===void 0&&(Ii=0),Ii===ht.length)return es.map(function(Yf){return s({},Yf,{depth:Ii})});var Yy=ht[Ii],iD=fe(es,Yy);return Object.entries(iD).map(function(Yf,sD){var C2=Yf[0],Kf=Yf[1],Xf=Yy+":"+C2,E2=$r(Kf,Ii+1,Xf=S2?S2+">"+Xf:Xf),T2=Ii?U(Kf,"leafRows"):Kf,lD=function(ea,Ky,uD){var Jf={};return W.forEach(function(wr){if(ht.includes(wr.id))Jf[wr.id]=Ky[0]?Ky[0].values[wr.id]:null;else{var R2=typeof wr.aggregate=="function"?wr.aggregate:Oe[wr.aggregate]||Zi[wr.aggregate];if(R2){var dD=Ky.map(function(Qf){return Qf.values[wr.id]}),pD=ea.map(function(Qf){var Xy=Qf.values[wr.id];if(!uD&&wr.aggregateValue){var k2=typeof wr.aggregateValue=="function"?wr.aggregateValue:Oe[wr.aggregateValue]||Zi[wr.aggregateValue];if(!k2)throw console.info({column:wr}),new Error("React Table: Invalid column.aggregateValue option for column listed above");Xy=k2(Xy,Qf,wr)}return Xy});Jf[wr.id]=R2(pD,dD)}else{if(wr.aggregate)throw console.info({column:wr}),new Error("React Table: Invalid column.aggregate option for column listed above");Jf[wr.id]=null}}}),Jf}(T2,Kf,Ii),cD={id:Xf,isGrouped:!0,groupByID:Yy,groupByVal:C2,values:lD,subRows:E2,leafRows:T2,depth:Ii,index:sD};return E2.forEach(function(ea){Kt.push(ea),sr[ea.id]=ea,ea.isGrouped?(lo.push(ea),Rt[ea.id]=ea):(Jn.push(ea),xr[ea.id]=ea)}),cD})}(P);return co.forEach(function($r){Kt.push($r),sr[$r.id]=$r,$r.isGrouped?(lo.push($r),Rt[$r.id]=$r):(Jn.push($r),xr[$r.id]=$r)}),[co,Kt,sr,lo,Rt,Jn,xr]},[ve,Ae,P,M,X,W,Oe,fe]),Yt=It[0],Tt=It[1],_t=It[2],hn=It[3],Nt=It[4],un=It[5],Zt=It[6],Dn=S(Ze);R(function(){Dn()&&Le({type:u.resetGroupBy})},[Le,ve?null:$]),Object.assign(C,{preGroupedRows:P,preGroupedFlatRow:M,preGroupedRowsById:X,groupedRows:Yt,groupedFlatRows:Tt,groupedRowsById:_t,onlyGroupedFlatRows:hn,onlyGroupedRowsById:Nt,nonGroupedFlatRows:un,nonGroupedRowsById:Zt,rows:Yt,flatRows:Tt,rowsById:_t,toggleGroupBy:Pt,setGroupBy:rt})}function An(C){C.allCells.forEach(function($){var P;$.isGrouped=$.column.isGrouped&&$.column.id===C.groupByID,$.isPlaceholder=!$.isGrouped&&$.column.isGrouped,$.isAggregated=!$.isGrouped&&!$.isPlaceholder&&((P=C.subRows)==null?void 0:P.length)})}function Mn(C,$){return C.reduce(function(P,M,X){var W=""+M.values[$];return P[W]=Array.isArray(P[W])?P[W]:[],P[W].push(M),P},{})}var Xn=/([0-9]+)/gm;function qr(C,$){return C===$?0:C>$?1:-1}function Ua(C,$,P){return[C.values[P],$.values[P]]}function Bf(C){return typeof C=="number"?isNaN(C)||C===1/0||C===-1/0?"":String(C):typeof C=="string"?C:""}var by=Object.freeze({__proto__:null,alphanumeric:function(C,$,P){var M=Ua(C,$,P),X=M[0],W=M[1];for(X=Bf(X),W=Bf(W),X=X.split(Xn).filter(Boolean),W=W.split(Xn).filter(Boolean);X.length&&W.length;){var J=X.shift(),ce=W.shift(),fe=parseInt(J,10),ve=parseInt(ce,10),Be=[fe,ve].sort();if(isNaN(Be[0])){if(J>ce)return 1;if(ce>J)return-1}else{if(isNaN(Be[1]))return isNaN(fe)?-1:1;if(fe>ve)return 1;if(ve>fe)return-1}}return X.length-W.length},datetime:function(C,$,P){var M=Ua(C,$,P),X=M[0],W=M[1];return qr(X=X.getTime(),W=W.getTime())},basic:function(C,$,P){var M=Ua(C,$,P);return qr(M[0],M[1])},string:function(C,$,P){var M=Ua(C,$,P),X=M[0],W=M[1];for(X=X.split("").filter(Boolean),W=W.split("").filter(Boolean);X.length&&W.length;){var J=X.shift(),ce=W.shift(),fe=J.toLowerCase(),ve=ce.toLowerCase();if(fe>ve)return 1;if(ve>fe)return-1;if(J>ce)return 1;if(ce>J)return-1}return X.length-W.length},number:function(C,$,P){var M=Ua(C,$,P),X=M[0],W=M[1],J=/[^0-9.]/gi;return qr(X=Number(String(X).replace(J,"")),W=Number(String(W).replace(J,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",h.sortType="alphanumeric",h.sortDescFirst=!1;var Ti=function(C){C.getSortByToggleProps=[xy],C.stateReducers.push(wy),C.useInstance.push(Sy)};Ti.pluginName="useSortBy";var xy=function(C,$){var P=$.instance,M=$.column,X=P.isMultiSortEvent,W=X===void 0?function(J){return J.shiftKey}:X;return[C,{onClick:M.canSort?function(J){J.persist(),M.toggleSortBy(void 0,!P.disableMultiSort&&W(J))}:void 0,style:{cursor:M.canSort?"pointer":void 0},title:M.canSort?"Toggle SortBy":void 0}]};function wy(C,$,P,M){if($.type===u.init)return s({sortBy:[]},C);if($.type===u.resetSortBy)return s({},C,{sortBy:M.initialState.sortBy||[]});if($.type===u.clearSortBy)return s({},C,{sortBy:C.sortBy.filter(function(ze){return ze.id!==$.columnId})});if($.type===u.setSortBy)return s({},C,{sortBy:$.sortBy});if($.type===u.toggleSortBy){var X,W=$.columnId,J=$.desc,ce=$.multi,fe=M.allColumns,ve=M.disableMultiSort,Be=M.disableSortRemove,Oe=M.disableMultiRemove,De=M.maxMultiSortColCount,Ae=De===void 0?Number.MAX_SAFE_INTEGER:De,Le=C.sortBy,qe=fe.find(function(ze){return ze.id===W}).sortDescFirst,Ze=Le.find(function(ze){return ze.id===W}),ft=Le.findIndex(function(ze){return ze.id===W}),jt=J!=null,dt=[];return(X=!ve&&ce?Ze?"toggle":"add":ft!==Le.length-1||Le.length!==1?"replace":Ze?"toggle":"replace")!="toggle"||Be||jt||ce&&Oe||!(Ze&&Ze.desc&&!qe||!Ze.desc&&qe)||(X="remove"),X==="replace"?dt=[{id:W,desc:jt?J:qe}]:X==="add"?(dt=[].concat(Le,[{id:W,desc:jt?J:qe}])).splice(0,dt.length-Ae):X==="toggle"?dt=Le.map(function(ze){return ze.id===W?s({},ze,{desc:jt?J:!Ze.desc}):ze}):X==="remove"&&(dt=Le.filter(function(ze){return ze.id!==W})),s({},C,{sortBy:dt})}}function Sy(C){var $=C.data,P=C.rows,M=C.flatRows,X=C.allColumns,W=C.orderByFn,J=W===void 0?Ff:W,ce=C.sortTypes,fe=C.manualSortBy,ve=C.defaultCanSort,Be=C.disableSortBy,Oe=C.flatHeaders,De=C.state.sortBy,Ae=C.dispatch,Le=C.plugins,qe=C.getHooks,Ze=C.autoResetSortBy,ft=Ze===void 0||Ze;x(Le,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var jt=r.useCallback(function(Tt){Ae({type:u.setSortBy,sortBy:Tt})},[Ae]),dt=r.useCallback(function(Tt,_t,hn){Ae({type:u.toggleSortBy,columnId:Tt,desc:_t,multi:hn})},[Ae]),ze=S(C);Oe.forEach(function(Tt){var _t=Tt.accessor,hn=Tt.canSort,Nt=Tt.disableSortBy,un=Tt.id,Zt=_t?D(Nt!==!0&&void 0,Be!==!0&&void 0,!0):D(ve,hn,!1);Tt.canSort=Zt,Tt.canSort&&(Tt.toggleSortBy=function(ht,Kt){return dt(Tt.id,ht,Kt)},Tt.clearSortBy=function(){Ae({type:u.clearSortBy,columnId:Tt.id})}),Tt.getSortByToggleProps=b(qe().getSortByToggleProps,{instance:ze(),column:Tt});var Dn=De.find(function(ht){return ht.id===un});Tt.isSorted=!!Dn,Tt.sortedIndex=De.findIndex(function(ht){return ht.id===un}),Tt.isSortedDesc=Tt.isSorted?Dn.desc:void 0});var Pt=r.useMemo(function(){if(fe||!De.length)return[P,M];var Tt=[],_t=De.filter(function(hn){return X.find(function(Nt){return Nt.id===hn.id})});return[function hn(Nt){var un=J(Nt,_t.map(function(Zt){var Dn=X.find(function(sr){return sr.id===Zt.id});if(!Dn)throw new Error("React-Table: Could not find a column with id: "+Zt.id+" while sorting");var ht=Dn.sortType,Kt=H(ht)||(ce||{})[ht]||by[ht];if(!Kt)throw new Error("React-Table: Could not find a valid sortType of '"+ht+"' for column '"+Zt.id+"'.");return function(sr,lo){return Kt(sr,lo,Zt.id,Zt.desc)}}),_t.map(function(Zt){var Dn=X.find(function(ht){return ht.id===Zt.id});return Dn&&Dn.sortInverted?Zt.desc:!Zt.desc}));return un.forEach(function(Zt){Tt.push(Zt),Zt.subRows&&Zt.subRows.length!==0&&(Zt.subRows=hn(Zt.subRows))}),un}(P),Tt]},[fe,De,P,M,X,J,ce]),rt=Pt[0],It=Pt[1],Yt=S(ft);R(function(){Yt()&&Ae({type:u.resetSortBy})},[fe?null:$]),Object.assign(C,{preSortedRows:P,preSortedFlatRows:M,sortedRows:rt,sortedFlatRows:It,rows:rt,flatRows:It,setSortBy:jt,toggleSortBy:dt})}function Ff(C,$,P){return[].concat(C).sort(function(M,X){for(var W=0;W<$.length;W+=1){var J=$[W],ce=P[W]===!1||P[W]==="desc",fe=J(M,X);if(fe!==0)return ce?-fe:fe}return P[0]?M.index-X.index:X.index-M.index})}u.resetPage="resetPage",u.gotoPage="gotoPage",u.setPageSize="setPageSize";var zf=function(C){C.stateReducers.push(Cy),C.useInstance.push(jf)};function Cy(C,$,P,M){if($.type===u.init)return s({pageSize:10,pageIndex:0},C);if($.type===u.resetPage)return s({},C,{pageIndex:M.initialState.pageIndex||0});if($.type===u.gotoPage){var X=M.pageCount,W=M.page,J=v($.pageIndex,C.pageIndex),ce=!1;return J>C.pageIndex?ce=X===-1?W.length>=C.pageSize:J<X:J<C.pageIndex&&(ce=J>-1),ce?s({},C,{pageIndex:J}):C}if($.type===u.setPageSize){var fe=$.pageSize,ve=C.pageSize*C.pageIndex;return s({},C,{pageIndex:Math.floor(ve/fe),pageSize:fe})}}function jf(C){var $=C.rows,P=C.autoResetPage,M=P===void 0||P,X=C.manualExpandedKey,W=X===void 0?"expanded":X,J=C.plugins,ce=C.pageCount,fe=C.paginateExpandedRows,ve=fe===void 0||fe,Be=C.expandSubRows,Oe=Be===void 0||Be,De=C.state,Ae=De.pageSize,Le=De.pageIndex,qe=De.expanded,Ze=De.globalFilter,ft=De.filters,jt=De.groupBy,dt=De.sortBy,ze=C.dispatch,Pt=C.data,rt=C.manualPagination;x(J,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var It=S(M);R(function(){It()&&ze({type:u.resetPage})},[ze,rt?null:Pt,Ze,ft,jt,dt]);var Yt=rt?ce:Math.ceil($.length/Ae),Tt=r.useMemo(function(){return Yt>0?[].concat(new Array(Yt)).fill(null).map(function(Kt,sr){return sr}):[]},[Yt]),_t=r.useMemo(function(){var Kt;if(rt)Kt=$;else{var sr=Ae*Le,lo=sr+Ae;Kt=$.slice(sr,lo)}return ve?Kt:Z(Kt,{manualExpandedKey:W,expanded:qe,expandSubRows:Oe})},[Oe,qe,W,rt,Le,Ae,ve,$]),hn=Le>0,Nt=Yt===-1?_t.length>=Ae:Le<Yt-1,un=r.useCallback(function(Kt){ze({type:u.gotoPage,pageIndex:Kt})},[ze]),Zt=r.useCallback(function(){return un(function(Kt){return Kt-1})},[un]),Dn=r.useCallback(function(){return un(function(Kt){return Kt+1})},[un]),ht=r.useCallback(function(Kt){ze({type:u.setPageSize,pageSize:Kt})},[ze]);Object.assign(C,{pageOptions:Tt,pageCount:Yt,page:_t,canPreviousPage:hn,canNextPage:Nt,gotoPage:un,previousPage:Zt,nextPage:Dn,setPageSize:ht})}zf.pluginName="usePagination",u.resetPivot="resetPivot",u.togglePivot="togglePivot";var Ks=function(C){C.getPivotToggleProps=[zu],C.stateReducers.push(Ey),C.useInstanceAfterData.push(Ty),C.allColumns.push(Ry),C.accessValue.push(ky),C.materializedColumns.push(_y),C.materializedColumnsDeps.push(Iy),C.visibleColumns.push(ju),C.visibleColumnsDeps.push(Ay),C.useInstance.push(Ny),C.prepareRow.push($y)};Ks.pluginName="usePivotColumns";var Uf=[],zu=function(C,$){var P=$.header;return[C,{onClick:P.canPivot?function(M){M.persist(),P.togglePivot()}:void 0,style:{cursor:P.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function Ey(C,$,P,M){if($.type===u.init)return s({pivotColumns:Uf},C);if($.type===u.resetPivot)return s({},C,{pivotColumns:M.initialState.pivotColumns||Uf});if($.type===u.togglePivot){var X=$.columnId,W=$.value,J=W!==void 0?W:!C.pivotColumns.includes(X);return s({},C,J?{pivotColumns:[].concat(C.pivotColumns,[X])}:{pivotColumns:C.pivotColumns.filter(function(ce){return ce!==X})})}}function Ty(C){C.allColumns.forEach(function($){$.isPivotSource=C.state.pivotColumns.includes($.id)})}function Ry(C,$){var P=$.instance;return C.forEach(function(M){M.isPivotSource=P.state.pivotColumns.includes(M.id),M.uniqueValues=new Set}),C}function ky(C,$){var P=$.column;return P.uniqueValues&&C!==void 0&&P.uniqueValues.add(C),C}function _y(C,$){var P=$.instance,M=P.allColumns,X=P.state;if(!X.pivotColumns.length||!X.groupBy||!X.groupBy.length)return C;var W=X.pivotColumns.map(function(fe){return M.find(function(ve){return ve.id===fe})}).filter(Boolean),J=M.filter(function(fe){return!fe.isPivotSource&&!X.groupBy.includes(fe.id)&&!X.pivotColumns.includes(fe.id)}),ce=k(function fe(ve,Be,Oe){ve===void 0&&(ve=0),Oe===void 0&&(Oe=[]);var De=W[ve];return De?Array.from(De.uniqueValues).sort().map(function(Ae){var Le=s({},De,{Header:De.PivotHeader||typeof De.header=="string"?De.Header+": "+Ae:Ae,isPivotGroup:!0,parent:Be,depth:ve,id:Be?Be.id+"."+De.id+"."+Ae:De.id+"."+Ae,pivotValue:Ae});return Le.columns=fe(ve+1,Le,[].concat(Oe,[function(qe){return qe.values[De.id]===Ae}])),Le}):J.map(function(Ae){return s({},Ae,{canPivot:!1,isPivoted:!0,parent:Be,depth:ve,id:""+(Be?Be.id+"."+Ae.id:Ae.id),accessor:function(Le,qe,Ze){if(Oe.every(function(ft){return ft(Ze)}))return Ze.values[Ae.id]}})})}());return[].concat(C,ce)}function Iy(C,$){var P=$.instance.state,M=P.pivotColumns,X=P.groupBy;return[].concat(C,[M,X])}function ju(C,$){var P=$.instance.state;return C=C.filter(function(M){return!M.isPivotSource}),P.pivotColumns.length&&P.groupBy&&P.groupBy.length&&(C=C.filter(function(M){return M.isGrouped||M.isPivoted})),C}function Ay(C,$){var P=$.instance;return[].concat(C,[P.state.pivotColumns,P.state.groupBy])}function Ny(C){var $=C.columns,P=C.allColumns,M=C.flatHeaders,X=C.getHooks,W=C.plugins,J=C.dispatch,ce=C.autoResetPivot,fe=ce===void 0||ce,ve=C.manaulPivot,Be=C.disablePivot,Oe=C.defaultCanPivot;x(W,["useGroupBy"],"usePivotColumns");var De=S(C);P.forEach(function(Le){var qe=Le.accessor,Ze=Le.defaultPivot,ft=Le.disablePivot;Le.canPivot=qe?D(Le.canPivot,ft!==!0&&void 0,Be!==!0&&void 0,!0):D(Le.canPivot,Ze,Oe,!1),Le.canPivot&&(Le.togglePivot=function(){return C.togglePivot(Le.id)}),Le.Aggregated=Le.Aggregated||Le.Cell}),M.forEach(function(Le){Le.getPivotToggleProps=b(X().getPivotToggleProps,{instance:De(),header:Le})});var Ae=S(fe);R(function(){Ae()&&J({type:u.resetPivot})},[J,ve?null:$]),Object.assign(C,{togglePivot:function(Le,qe){J({type:u.togglePivot,columnId:Le,value:qe})}})}function $y(C){C.allCells.forEach(function($){$.isPivoted=$.column.isPivoted})}u.resetSelectedRows="resetSelectedRows",u.toggleAllRowsSelected="toggleAllRowsSelected",u.toggleRowSelected="toggleRowSelected",u.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var Wf=function(C){C.getToggleRowSelectedProps=[Py],C.getToggleAllRowsSelectedProps=[Oy],C.getToggleAllPageRowsSelectedProps=[Dy],C.stateReducers.push(Hf),C.useInstance.push(Ly),C.prepareRow.push(My)};Wf.pluginName="useRowSelect";var Py=function(C,$){var P=$.instance,M=$.row,X=P.manualRowSelectedKey,W=X===void 0?"isSelected":X;return[C,{onChange:function(J){M.toggleRowSelected(J.target.checked)},style:{cursor:"pointer"},checked:!(!M.original||!M.original[W])||M.isSelected,title:"Toggle Row Selected",indeterminate:M.isSomeSelected}]},Oy=function(C,$){var P=$.instance;return[C,{onChange:function(M){P.toggleAllRowsSelected(M.target.checked)},style:{cursor:"pointer"},checked:P.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!P.isAllRowsSelected&&Object.keys(P.state.selectedRowIds).length)}]},Dy=function(C,$){var P=$.instance;return[C,{onChange:function(M){P.toggleAllPageRowsSelected(M.target.checked)},style:{cursor:"pointer"},checked:P.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!P.isAllPageRowsSelected&&P.page.some(function(M){var X=M.id;return P.state.selectedRowIds[X]}))}]};function Hf(C,$,P,M){if($.type===u.init)return s({selectedRowIds:{}},C);if($.type===u.resetSelectedRows)return s({},C,{selectedRowIds:M.initialState.selectedRowIds||{}});if($.type===u.toggleAllRowsSelected){var X=$.value,W=M.isAllRowsSelected,J=M.rowsById,ce=M.nonGroupedRowsById,fe=ce===void 0?J:ce,ve=X!==void 0?X:!W,Be=Object.assign({},C.selectedRowIds);return ve?Object.keys(fe).forEach(function(un){Be[un]=!0}):Object.keys(fe).forEach(function(un){delete Be[un]}),s({},C,{selectedRowIds:Be})}if($.type===u.toggleRowSelected){var Oe=$.id,De=$.value,Ae=M.rowsById,Le=M.selectSubRows,qe=Le===void 0||Le,Ze=M.getSubRows,ft=C.selectedRowIds[Oe],jt=De!==void 0?De:!ft;if(ft===jt)return C;var dt=s({},C.selectedRowIds);return function un(Zt){var Dn=Ae[Zt];if(Dn&&(Dn.isGrouped||(jt?dt[Zt]=!0:delete dt[Zt]),qe&&Ze(Dn)))return Ze(Dn).forEach(function(ht){return un(ht.id)})}(Oe),s({},C,{selectedRowIds:dt})}if($.type===u.toggleAllPageRowsSelected){var ze=$.value,Pt=M.page,rt=M.rowsById,It=M.selectSubRows,Yt=It===void 0||It,Tt=M.isAllPageRowsSelected,_t=M.getSubRows,hn=ze!==void 0?ze:!Tt,Nt=s({},C.selectedRowIds);return Pt.forEach(function(un){return function Zt(Dn){var ht=rt[Dn];if(ht.isGrouped||(hn?Nt[Dn]=!0:delete Nt[Dn]),Yt&&_t(ht))return _t(ht).forEach(function(Kt){return Zt(Kt.id)})}(un.id)}),s({},C,{selectedRowIds:Nt})}return C}function Ly(C){var $=C.data,P=C.rows,M=C.getHooks,X=C.plugins,W=C.rowsById,J=C.nonGroupedRowsById,ce=J===void 0?W:J,fe=C.autoResetSelectedRows,ve=fe===void 0||fe,Be=C.state.selectedRowIds,Oe=C.selectSubRows,De=Oe===void 0||Oe,Ae=C.dispatch,Le=C.page,qe=C.getSubRows;x(X,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var Ze=r.useMemo(function(){var _t=[];return P.forEach(function(hn){var Nt=De?function un(Zt,Dn,ht){if(Dn[Zt.id])return!0;var Kt=ht(Zt);if(Kt&&Kt.length){var sr=!0,lo=!1;return Kt.forEach(function(Rt){lo&&!sr||(un(Rt,Dn,ht)?lo=!0:sr=!1)}),!!sr||!!lo&&null}return!1}(hn,Be,qe):!!Be[hn.id];hn.isSelected=!!Nt,hn.isSomeSelected=Nt===null,Nt&&_t.push(hn)}),_t},[P,De,Be,qe]),ft=Boolean(Object.keys(ce).length&&Object.keys(Be).length),jt=ft;ft&&Object.keys(ce).some(function(_t){return!Be[_t]})&&(ft=!1),ft||Le&&Le.length&&Le.some(function(_t){var hn=_t.id;return!Be[hn]})&&(jt=!1);var dt=S(ve);R(function(){dt()&&Ae({type:u.resetSelectedRows})},[Ae,$]);var ze=r.useCallback(function(_t){return Ae({type:u.toggleAllRowsSelected,value:_t})},[Ae]),Pt=r.useCallback(function(_t){return Ae({type:u.toggleAllPageRowsSelected,value:_t})},[Ae]),rt=r.useCallback(function(_t,hn){return Ae({type:u.toggleRowSelected,id:_t,value:hn})},[Ae]),It=S(C),Yt=b(M().getToggleAllRowsSelectedProps,{instance:It()}),Tt=b(M().getToggleAllPageRowsSelectedProps,{instance:It()});Object.assign(C,{selectedFlatRows:Ze,isAllRowsSelected:ft,isAllPageRowsSelected:jt,toggleRowSelected:rt,toggleAllRowsSelected:ze,getToggleAllRowsSelectedProps:Yt,getToggleAllPageRowsSelectedProps:Tt,toggleAllPageRowsSelected:Pt})}function My(C,$){var P=$.instance;C.toggleRowSelected=function(M){return P.toggleRowSelected(C.id,M)},C.getToggleRowSelectedProps=b(P.getHooks().getToggleRowSelectedProps,{instance:P,row:C})}var Xs=function(C){return{}},Ri=function(C){return{}};u.setRowState="setRowState",u.setCellState="setCellState",u.resetRowState="resetRowState";var Uu=function(C){C.stateReducers.push(ki),C.useInstance.push(By),C.prepareRow.push(Fy)};function ki(C,$,P,M){var X=M.initialRowStateAccessor,W=X===void 0?Xs:X,J=M.initialCellStateAccessor,ce=J===void 0?Ri:J,fe=M.rowsById;if($.type===u.init)return s({rowState:{}},C);if($.type===u.resetRowState)return s({},C,{rowState:M.initialState.rowState||{}});if($.type===u.setRowState){var ve,Be=$.rowId,Oe=$.value,De=C.rowState[Be]!==void 0?C.rowState[Be]:W(fe[Be]);return s({},C,{rowState:s({},C.rowState,(ve={},ve[Be]=v(Oe,De),ve))})}if($.type===u.setCellState){var Ae,Le,qe,Ze,ft,jt=$.rowId,dt=$.columnId,ze=$.value,Pt=C.rowState[jt]!==void 0?C.rowState[jt]:W(fe[jt]),rt=(Pt==null||(Ae=Pt.cellState)==null?void 0:Ae[dt])!==void 0?Pt.cellState[dt]:ce((Le=fe[jt])==null||(qe=Le.cells)==null?void 0:qe.find(function(It){return It.column.id===dt}));return s({},C,{rowState:s({},C.rowState,(ft={},ft[jt]=s({},Pt,{cellState:s({},Pt.cellState||{},(Ze={},Ze[dt]=v(ze,rt),Ze))}),ft))})}}function By(C){var $=C.autoResetRowState,P=$===void 0||$,M=C.data,X=C.dispatch,W=r.useCallback(function(fe,ve){return X({type:u.setRowState,rowId:fe,value:ve})},[X]),J=r.useCallback(function(fe,ve,Be){return X({type:u.setCellState,rowId:fe,columnId:ve,value:Be})},[X]),ce=S(P);R(function(){ce()&&X({type:u.resetRowState})},[M]),Object.assign(C,{setRowState:W,setCellState:J})}function Fy(C,$){var P=$.instance,M=P.initialRowStateAccessor,X=M===void 0?Xs:M,W=P.initialCellStateAccessor,J=W===void 0?Ri:W,ce=P.state.rowState;C&&(C.state=ce[C.id]!==void 0?ce[C.id]:X(C),C.setState=function(fe){return P.setRowState(C.id,fe)},C.cells.forEach(function(fe){C.state.cellState||(C.state.cellState={}),fe.state=C.state.cellState[fe.column.id]!==void 0?C.state.cellState[fe.column.id]:J(fe),fe.setState=function(ve){return P.setCellState(C.id,fe.column.id,ve)}}))}Uu.pluginName="useRowState",u.resetColumnOrder="resetColumnOrder",u.setColumnOrder="setColumnOrder";var Vf=function(C){C.stateReducers.push(zy),C.visibleColumnsDeps.push(function($,P){var M=P.instance;return[].concat($,[M.state.columnOrder])}),C.visibleColumns.push(jy),C.useInstance.push(Uy)};function zy(C,$,P,M){return $.type===u.init?s({columnOrder:[]},C):$.type===u.resetColumnOrder?s({},C,{columnOrder:M.initialState.columnOrder||[]}):$.type===u.setColumnOrder?s({},C,{columnOrder:v($.columnOrder,C.columnOrder)}):void 0}function jy(C,$){var P=$.instance.state.columnOrder;if(!P||!P.length)return C;for(var M=[].concat(P),X=[].concat(C),W=[],J=function(){var ce=M.shift(),fe=X.findIndex(function(ve){return ve.id===ce});fe>-1&&W.push(X.splice(fe,1)[0])};X.length&&M.length;)J();return[].concat(W,X)}function Uy(C){var $=C.dispatch;C.setColumnOrder=r.useCallback(function(P){return $({type:u.setColumnOrder,columnOrder:P})},[$])}Vf.pluginName="useColumnOrder",h.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var Wu=function(C){C.getResizerProps=[_i],C.getHeaderProps.push({style:{position:"relative"}}),C.stateReducers.push(Wy),C.useInstance.push(Hy),C.useInstanceBeforeDimensions.push(Gf)},_i=function(C,$){var P=$.instance,M=$.header,X=P.dispatch,W=function(J,ce){var fe=!1;if(J.type==="touchstart"){if(J.touches&&J.touches.length>1)return;fe=!0}var ve,Be,Oe=function(dt){var ze=[];return function Pt(rt){rt.columns&&rt.columns.length&&rt.columns.map(Pt),ze.push(rt)}(dt),ze}(ce).map(function(dt){return[dt.id,dt.totalWidth]}),De=fe?Math.round(J.touches[0].clientX):J.clientX,Ae=function(){window.cancelAnimationFrame(ve),ve=null,X({type:u.columnDoneResizing})},Le=function(){window.cancelAnimationFrame(ve),ve=null,X({type:u.columnResizing,clientX:Be})},qe=function(dt){Be=dt,ve||(ve=window.requestAnimationFrame(Le))},Ze={mouse:{moveEvent:"mousemove",moveHandler:function(dt){return qe(dt.clientX)},upEvent:"mouseup",upHandler:function(dt){document.removeEventListener("mousemove",Ze.mouse.moveHandler),document.removeEventListener("mouseup",Ze.mouse.upHandler),Ae()}},touch:{moveEvent:"touchmove",moveHandler:function(dt){return dt.cancelable&&(dt.preventDefault(),dt.stopPropagation()),qe(dt.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(dt){document.removeEventListener(Ze.touch.moveEvent,Ze.touch.moveHandler),document.removeEventListener(Ze.touch.upEvent,Ze.touch.moveHandler),Ae()}}},ft=fe?Ze.touch:Ze.mouse,jt=!!function(){if(typeof K=="boolean")return K;var dt=!1;try{var ze={get passive(){return dt=!0,!1}};window.addEventListener("test",null,ze),window.removeEventListener("test",null,ze)}catch{dt=!1}return K=dt}()&&{passive:!1};document.addEventListener(ft.moveEvent,ft.moveHandler,jt),document.addEventListener(ft.upEvent,ft.upHandler,jt),X({type:u.columnStartResizing,columnId:ce.id,columnWidth:ce.totalWidth,headerIdWidths:Oe,clientX:De})};return[C,{onMouseDown:function(J){return J.persist()||W(J,M)},onTouchStart:function(J){return J.persist()||W(J,M)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Wy(C,$){if($.type===u.init)return s({columnResizing:{columnWidths:{}}},C);if($.type===u.resetResize)return s({},C,{columnResizing:{columnWidths:{}}});if($.type===u.columnStartResizing){var P=$.clientX,M=$.columnId,X=$.columnWidth,W=$.headerIdWidths;return s({},C,{columnResizing:s({},C.columnResizing,{startX:P,headerIdWidths:W,columnWidth:X,isResizingColumn:M})})}if($.type===u.columnResizing){var J=$.clientX,ce=C.columnResizing,fe=ce.startX,ve=ce.columnWidth,Be=ce.headerIdWidths,Oe=(J-fe)/ve,De={};return(Be===void 0?[]:Be).forEach(function(Ae){var Le=Ae[0],qe=Ae[1];De[Le]=Math.max(qe+qe*Oe,0)}),s({},C,{columnResizing:s({},C.columnResizing,{columnWidths:s({},C.columnResizing.columnWidths,{},De)})})}return $.type===u.columnDoneResizing?s({},C,{columnResizing:s({},C.columnResizing,{startX:null,isResizingColumn:null})}):void 0}Wu.pluginName="useResizeColumns";var Gf=function(C){var $=C.flatHeaders,P=C.disableResizing,M=C.getHooks,X=C.state.columnResizing,W=S(C);$.forEach(function(J){var ce=D(J.disableResizing!==!0&&void 0,P!==!0&&void 0,!0);J.canResize=ce,J.width=X.columnWidths[J.id]||J.originalWidth||J.width,J.isResizing=X.isResizingColumn===J.id,ce&&(J.getResizerProps=b(M().getResizerProps,{instance:W(),header:J}))})};function Hy(C){var $=C.plugins,P=C.dispatch,M=C.autoResetResize,X=M===void 0||M,W=C.columns;x($,["useAbsoluteLayout"],"useResizeColumns");var J=S(X);R(function(){J()&&P({type:u.resetResize})},[W]);var ce=r.useCallback(function(){return P({type:u.resetResize})},[P]);Object.assign(C,{resetResizing:ce})}var Js={position:"absolute",top:0},Hu=function(C){C.getTableBodyProps.push(cc),C.getRowProps.push(cc),C.getHeaderGroupProps.push(cc),C.getFooterGroupProps.push(cc),C.getHeaderProps.push(function($,P){var M=P.column;return[$,{style:s({},Js,{left:M.totalLeft+"px",width:M.totalWidth+"px"})}]}),C.getCellProps.push(function($,P){var M=P.cell;return[$,{style:s({},Js,{left:M.column.totalLeft+"px",width:M.column.totalWidth+"px"})}]}),C.getFooterProps.push(function($,P){var M=P.column;return[$,{style:s({},Js,{left:M.totalLeft+"px",width:M.totalWidth+"px"})}]})};Hu.pluginName="useAbsoluteLayout";var cc=function(C,$){return[C,{style:{position:"relative",width:$.instance.totalColumnsWidth+"px"}}]},Vu={display:"inline-block",boxSizing:"border-box"},uc=function(C,$){return[C,{style:{display:"flex",width:$.instance.totalColumnsWidth+"px"}}]},qf=function(C){C.getRowProps.push(uc),C.getHeaderGroupProps.push(uc),C.getFooterGroupProps.push(uc),C.getHeaderProps.push(function($,P){var M=P.column;return[$,{style:s({},Vu,{width:M.totalWidth+"px"})}]}),C.getCellProps.push(function($,P){var M=P.cell;return[$,{style:s({},Vu,{width:M.column.totalWidth+"px"})}]}),C.getFooterProps.push(function($,P){var M=P.column;return[$,{style:s({},Vu,{width:M.totalWidth+"px"})}]})};function Qs(C){C.getTableProps.push(Vy),C.getRowProps.push(Zs),C.getHeaderGroupProps.push(Zs),C.getFooterGroupProps.push(Zs),C.getHeaderProps.push(Gy),C.getCellProps.push(qy),C.getFooterProps.push(j)}qf.pluginName="useBlockLayout",Qs.pluginName="useFlexLayout";var Vy=function(C,$){return[C,{style:{minWidth:$.instance.totalColumnsMinWidth+"px"}}]},Zs=function(C,$){return[C,{style:{display:"flex",flex:"1 0 auto",minWidth:$.instance.totalColumnsMinWidth+"px"}}]},Gy=function(C,$){var P=$.column;return[C,{style:{boxSizing:"border-box",flex:P.totalFlexWidth?P.totalFlexWidth+" 0 auto":void 0,minWidth:P.totalMinWidth+"px",width:P.totalWidth+"px"}}]},qy=function(C,$){var P=$.cell;return[C,{style:{boxSizing:"border-box",flex:P.column.totalFlexWidth+" 0 auto",minWidth:P.column.totalMinWidth+"px",width:P.column.totalWidth+"px"}}]},j=function(C,$){var P=$.column;return[C,{style:{boxSizing:"border-box",flex:P.totalFlexWidth?P.totalFlexWidth+" 0 auto":void 0,minWidth:P.totalMinWidth+"px",width:P.totalWidth+"px"}}]};function ie(C){C.stateReducers.push(Br),C.getTableProps.push(Se),C.getHeaderProps.push(lt),C.getRowProps.push(br)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",ie.pluginName="useGridLayout";var Se=function(C,$){var P=$.instance;return[C,{style:{display:"grid",gridTemplateColumns:P.visibleColumns.map(function(M){var X;return P.state.gridLayout.columnWidths[M.id]?P.state.gridLayout.columnWidths[M.id]+"px":(X=P.state.columnResizing)!=null&&X.isResizingColumn?P.state.gridLayout.startWidths[M.id]+"px":typeof M.width=="number"?M.width+"px":M.width}).join(" ")}}]},lt=function(C,$){var P=$.column;return[C,{id:"header-cell-"+P.id,style:{position:"sticky",gridColumn:"span "+P.totalVisibleHeaderCount}}]},br=function(C,$){var P=$.row;return P.isExpanded?[C,{style:{gridColumn:"1 / "+(P.cells.length+1)}}]:[C,{}]};function Br(C,$,P,M){if($.type===u.init)return s({gridLayout:{columnWidths:{}}},C);if($.type===u.resetResize)return s({},C,{gridLayout:{columnWidths:{}}});if($.type===u.columnStartResizing){var X=$.columnId,W=$.headerIdWidths,J=Yr(X);if(J!==void 0){var ce=M.visibleColumns.reduce(function(ze,Pt){var rt;return s({},ze,((rt={})[Pt.id]=Yr(Pt.id),rt))},{}),fe=M.visibleColumns.reduce(function(ze,Pt){var rt;return s({},ze,((rt={})[Pt.id]=Pt.minWidth,rt))},{}),ve=M.visibleColumns.reduce(function(ze,Pt){var rt;return s({},ze,((rt={})[Pt.id]=Pt.maxWidth,rt))},{}),Be=W.map(function(ze){var Pt=ze[0];return[Pt,Yr(Pt)]});return s({},C,{gridLayout:s({},C.gridLayout,{startWidths:ce,minWidths:fe,maxWidths:ve,headerIdGridWidths:Be,columnWidth:J})})}return C}if($.type===u.columnResizing){var Oe=$.clientX,De=C.columnResizing.startX,Ae=C.gridLayout,Le=Ae.columnWidth,qe=Ae.minWidths,Ze=Ae.maxWidths,ft=Ae.headerIdGridWidths,jt=(Oe-De)/Le,dt={};return(ft===void 0?[]:ft).forEach(function(ze){var Pt=ze[0],rt=ze[1];dt[Pt]=Math.min(Math.max(qe[Pt],rt+rt*jt),Ze[Pt])}),s({},C,{gridLayout:s({},C.gridLayout,{columnWidths:s({},C.gridLayout.columnWidths,{},dt)})})}return $.type===u.columnDoneResizing?s({},C,{gridLayout:s({},C.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function Yr(C){var $,P=($=document.getElementById("header-cell-"+C))==null?void 0:$.offsetWidth;if(P!==void 0)return P}n._UNSTABLE_usePivotColumns=Ks,n.actions=u,n.defaultColumn=h,n.defaultGroupByFn=Mn,n.defaultOrderByFn=Ff,n.defaultRenderer=d,n.emptyRenderer=p,n.ensurePluginOrder=x,n.flexRender=_,n.functionalUpdate=v,n.loopHooks=g,n.makePropGetter=b,n.makeRenderer=A,n.reduceHooks=y,n.safeUseLayoutEffect=E,n.useAbsoluteLayout=Hu,n.useAsyncDebounce=function(C,$){$===void 0&&($=0);var P=r.useRef({}),M=S(C),X=S($);return r.useCallback(function(){var W=a(regeneratorRuntime.mark(function J(){var ce,fe,ve,Be=arguments;return regeneratorRuntime.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:for(ce=Be.length,fe=new Array(ce),ve=0;ve<ce;ve++)fe[ve]=Be[ve];return P.current.promise||(P.current.promise=new Promise(function(De,Ae){P.current.resolve=De,P.current.reject=Ae})),P.current.timeout&&clearTimeout(P.current.timeout),P.current.timeout=setTimeout(a(regeneratorRuntime.mark(function De(){return regeneratorRuntime.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return delete P.current.timeout,Ae.prev=1,Ae.t0=P.current,Ae.next=5,M().apply(void 0,fe);case 5:Ae.t1=Ae.sent,Ae.t0.resolve.call(Ae.t0,Ae.t1),Ae.next=12;break;case 9:Ae.prev=9,Ae.t2=Ae.catch(1),P.current.reject(Ae.t2);case 12:return Ae.prev=12,delete P.current.promise,Ae.finish(12);case 15:case"end":return Ae.stop()}},De,null,[[1,9,12,15]])})),X()),Oe.abrupt("return",P.current.promise);case 5:case"end":return Oe.stop()}},J)}));return function(){return W.apply(this,arguments)}}(),[M,X])},n.useBlockLayout=qf,n.useColumnOrder=Vf,n.useExpanded=te,n.useFilters=Co,n.useFlexLayout=Qs,n.useGetLatest=S,n.useGlobalFilter=qt,n.useGridLayout=ie,n.useGroupBy=Lt,n.useMountedLayoutEffect=R,n.usePagination=zf,n.useResizeColumns=Wu,n.useRowSelect=Wf,n.useRowState=Uu,n.useSortBy=Ti,n.useTable=function(C){for(var $=arguments.length,P=new Array($>1?$-1:0),M=1;M<$;M++)P[M-1]=arguments[M];C=Fe(C),P=[he].concat(P);var X=r.useRef({}),W=S(X.current);Object.assign(W(),s({},C,{plugins:P,hooks:be()})),P.filter(Boolean).forEach(function(Rt){Rt(W().hooks)});var J=S(W().hooks);W().getHooks=J,delete W().hooks,Object.assign(W(),y(J().useOptions,Fe(C)));var ce=W(),fe=ce.data,ve=ce.columns,Be=ce.initialState,Oe=ce.defaultColumn,De=ce.getSubRows,Ae=ce.getRowId,Le=ce.stateReducer,qe=ce.useControlledState,Ze=S(Le),ft=r.useCallback(function(Rt,Jn){if(!Jn.type)throw console.info({action:Jn}),new Error("Unknown Action \u{1F446}");return[].concat(J().stateReducers,Array.isArray(Ze())?Ze():[Ze()]).reduce(function(xr,co){return co(xr,Jn,Rt,W())||xr},Rt)},[J,Ze,W]),jt=r.useReducer(ft,void 0,function(){return ft(Be,{type:u.init})}),dt=jt[0],ze=jt[1],Pt=y([].concat(J().useControlledState,[qe]),dt,{instance:W()});Object.assign(W(),{state:Pt,dispatch:ze});var rt=r.useMemo(function(){return N(y(J().columns,ve,{instance:W()}))},[J,W,ve].concat(y(J().columnsDeps,[],{instance:W()})));W().columns=rt;var It=r.useMemo(function(){return y(J().allColumns,k(rt),{instance:W()}).map(I)},[rt,J,W].concat(y(J().allColumnsDeps,[],{instance:W()})));W().allColumns=It;var Yt=r.useMemo(function(){for(var Rt=[],Jn=[],xr={},co=[].concat(It);co.length;){var $r=co.shift();$e({data:fe,rows:Rt,flatRows:Jn,rowsById:xr,column:$r,getRowId:Ae,getSubRows:De,accessValueHooks:J().accessValue,getInstance:W})}return[Rt,Jn,xr]},[It,fe,Ae,De,J,W]),Tt=Yt[0],_t=Yt[1],hn=Yt[2];Object.assign(W(),{rows:Tt,initialRows:[].concat(Tt),flatRows:_t,rowsById:hn}),g(J().useInstanceAfterData,W());var Nt=r.useMemo(function(){return y(J().visibleColumns,It,{instance:W()}).map(function(Rt){return O(Rt,Oe)})},[J,It,W,Oe].concat(y(J().visibleColumnsDeps,[],{instance:W()})));It=r.useMemo(function(){var Rt=[].concat(Nt);return It.forEach(function(Jn){Rt.find(function(xr){return xr.id===Jn.id})||Rt.push(Jn)}),Rt},[It,Nt]),W().allColumns=It;var un=r.useMemo(function(){return y(J().headerGroups,L(Nt,Oe),W())},[J,Nt,Oe,W].concat(y(J().headerGroupsDeps,[],{instance:W()})));W().headerGroups=un;var Zt=r.useMemo(function(){return un.length?un[0].headers:[]},[un]);W().headers=Zt,W().flatHeaders=un.reduce(function(Rt,Jn){return[].concat(Rt,Jn.headers)},[]),g(J().useInstanceBeforeDimensions,W());var Dn=Nt.filter(function(Rt){return Rt.isVisible}).map(function(Rt){return Rt.id}).sort().join("_");Nt=r.useMemo(function(){return Nt.filter(function(Rt){return Rt.isVisible})},[Nt,Dn]),W().visibleColumns=Nt;var ht=Ge(Zt),Kt=ht[0],sr=ht[1],lo=ht[2];return W().totalColumnsMinWidth=Kt,W().totalColumnsWidth=sr,W().totalColumnsMaxWidth=lo,g(J().useInstance,W()),[].concat(W().flatHeaders,W().allColumns).forEach(function(Rt){Rt.render=A(W(),Rt),Rt.getHeaderProps=b(J().getHeaderProps,{instance:W(),column:Rt}),Rt.getFooterProps=b(J().getFooterProps,{instance:W(),column:Rt})}),W().headerGroups=r.useMemo(function(){return un.filter(function(Rt,Jn){return Rt.headers=Rt.headers.filter(function(xr){return xr.headers?function co($r){return $r.filter(function(es){return es.headers?co(es.headers):es.isVisible}).length}(xr.headers):xr.isVisible}),!!Rt.headers.length&&(Rt.getHeaderGroupProps=b(J().getHeaderGroupProps,{instance:W(),headerGroup:Rt,index:Jn}),Rt.getFooterGroupProps=b(J().getFooterGroupProps,{instance:W(),headerGroup:Rt,index:Jn}),!0)})},[un,W,J]),W().footerGroups=[].concat(W().headerGroups).reverse(),W().prepareRow=r.useCallback(function(Rt){Rt.getRowProps=b(J().getRowProps,{instance:W(),row:Rt}),Rt.allCells=It.map(function(Jn){var xr=Rt.values[Jn.id],co={column:Jn,row:Rt,value:xr};return co.getCellProps=b(J().getCellProps,{instance:W(),cell:co}),co.render=A(W(),Jn,{row:Rt,cell:co,value:xr}),co}),Rt.cells=Nt.map(function(Jn){return Rt.allCells.find(function(xr){return xr.column.id===Jn.id})}),g(J().prepareRow,Rt,{instance:W()})},[J,W,It,Nt]),W().getTableProps=b(J().getTableProps,{instance:W()}),W().getTableBodyProps=b(J().getTableBodyProps,{instance:W()}),g(J().useFinalInstance,W()),W()},Object.defineProperty(n,"__esModule",{value:!0})})})($b,$b.exports);ct.exports=$b.exports;const woe=le()(e=>({tableHeader:{"& > th":{height:e.shape.tableRowHeightCompact,border:0,backgroundColor:e.palette.tableHeaderBackground,color:e.palette.tableHeaderColor,"&:first-of-type":{borderTopLeftRadius:e.shape.borderRadiusMedium,borderBottomLeftRadius:e.shape.borderRadiusMedium},"&:last-of-type":{borderTopRightRadius:e.shape.borderRadiusMedium,borderBottomRightRadius:e.shape.borderRadiusMedium}}}})),Soe=le()(e=>({header:{position:"relative",fontWeight:e.fontWeight.medium},flex:{justifyContent:"stretch",alignItems:"center",display:"flex",flexShrink:0,"& > *":{flexGrow:1}},flexGrow:{flexGrow:1},sortable:{padding:0,"&:hover, &:focus":{backgroundColor:e.palette.tableHeaderHover,"& svg":{color:"inherit"}}},sortButton:{all:"unset",whiteSpace:"nowrap",width:"100%",position:"relative",zIndex:1,":hover, :focus, &:focus-visible, &:active":{outline:"revert",".hover-only":{display:"inline-block"}},display:"flex",boxSizing:"inherit",cursor:"pointer"},sortedButton:{fontWeight:e.fontWeight.bold},label:{display:"flex",flexDirection:"column",flexShrink:1,minWidth:0,"::after":{fontWeight:"bold",display:"inline-block",height:0,content:"attr(data-text)",visibility:"hidden",overflow:"hidden"}},alignLeft:{justifyContent:"flex-start",textAlign:"left"},alignRight:{justifyContent:"flex-end",textAlign:"right"},alignCenter:{justifyContent:"center",textAlign:"center"},hiddenMeasurementLayer:{padding:e.spacing(2),visibility:"hidden",display:"flex",alignItems:"center",width:"100%"},visibleAbsoluteLayer:{padding:e.spacing(2),position:"absolute",display:"flex",alignItems:"center",width:"100%",height:"100%",".hover-only":{display:"none"},"& > span":{minWidth:0,whiteSpace:"nowrap",textOverflow:"ellipsis",overflowX:"hidden",overflowY:"visible"}}})),Coe=()=>{throw new Error("setAnnouncement called outside AnnouncerContext")},HS=hr.createContext({setAnnouncement:Coe}),Eoe=le()(e=>({icon:{marginLeft:e.spacing(.25),marginRight:e.spacing(-.5),color:e.palette.grey[700],fontSize:e.fontSizes.mainHeader,verticalAlign:"middle"},sorted:{color:e.palette.grey[900]}})),Mk=({isSorted:e,isDesc:t=!1,className:n})=>{const{classes:r}=Eoe();return i(F,{condition:Boolean(e),show:i(F,{condition:Boolean(t),show:i(Ab,{className:it(r.icon,r.sorted,n),fontSize:"inherit"}),elseShow:i(_te,{className:it(r.icon,r.sorted,n),fontSize:"inherit"})}),elseShow:i(jte,{className:it(r.icon,n,"hover-only"),fontSize:"inherit"})})},Toe=({children:e,isSortable:t=!0,isSorted:n=!1,isDescending:r,width:o,minWidth:a,maxWidth:s,align:l,ariaTitle:c,isFlex:u,isFlexGrow:d,onClick:p=()=>{}})=>{const{setAnnouncement:h}=f.exports.useContext(HS),[m,b]=f.exports.useState(""),y=f.exports.useRef(null),{classes:g}=Soe(),x=n?r?"descending":"ascending":void 0,v=E=>{p(E),h(`Sorted${c?` by ${c} `:""}, ${r?"ascending":"descending"}`)},S=f.exports.useMemo(()=>{switch(l){case"left":return g.alignLeft;case"center":return g.alignCenter;case"right":return g.alignRight;default:return}},[l,g]);return f.exports.useEffect(()=>{(()=>{var A,_;const R=c&&y.current&&((A=y==null?void 0:y.current)==null?void 0:A.offsetWidth)<((_=y==null?void 0:y.current)==null?void 0:_.scrollWidth)?`${e}`:"";R!==m&&b(R)})()},[b,c]),i(jo,{component:"th","aria-sort":x,className:it(g.header,t&&g.sortable,u&&g.flex,d&&g.flexGrow),style:{width:o,minWidth:a,maxWidth:s},children:i(F,{condition:t,show:i(wt,{title:m,arrow:!0,children:w("button",{type:"button",className:it(n&&g.sortedButton,g.sortButton,S),onClick:v,children:[w("span",{className:it(g.hiddenMeasurementLayer,S),"aria-hidden":!0,children:[i("span",{className:g.label,tabIndex:-1,"data-text":e,children:e}),i(Mk,{isSorted:n,isDesc:r})]}),w("span",{className:it(g.visibleAbsoluteLayer,S),children:[i("span",{ref:y,tabIndex:-1,children:i("span",{children:e})}),i(Mk,{isSorted:n,isDesc:r,className:"sort-arrow"})]})]})}),elseShow:i("div",{className:S,children:e})})})},Mo=({headerGroups:e,className:t,flex:n})=>{const{classes:r}=woe();return i(L4,{className:t,children:e.map(o=>i(Vr,ee(V({},o.getHeaderGroupProps()),{className:r.tableHeader,children:o.headers.map(a=>{const s=a.render("Header");return i(Toe,ee(V({},a.getHeaderProps(a.canSort?a.getSortByToggleProps():void 0)),{ariaTitle:typeof s=="string"?s:void 0,isSortable:Boolean(a.canSort),isSorted:a.isSorted,isDescending:a.isSortedDesc,maxWidth:a.maxWidth,minWidth:a.minWidth,width:a.width,isFlex:n,isFlexGrow:Boolean(a.minWidth),align:a.align,children:s}))})})))})},Roe=le()((e,{rowHeight:t})=>{var n;return{table:{position:"relative","& tbody tr":{height:(n={auto:"auto",standard:e.shape.tableRowHeight,compact:e.shape.tableRowHeightCompact,dense:e.shape.tableRowHeightDense}[t])!=null?n:t}}}}),xa=r=>{var o=r,{rowHeight:e="auto",className:t}=o,n=en(o,["rowHeight","className"]);const{classes:a}=Roe({rowHeight:e});return i(vv,V({className:it(a.table,t)},n))},koe=le()(e=>({tableCell:{padding:0}})),Zo=n=>{var r=n,{className:e}=r,t=en(r,["className"]);const{classes:o}=koe();return i(jo,V({className:it(o.tableCell,e)},t))},_oe=le()(e=>({emptyStateListItem:{border:`2px dashed ${e.palette.neutral.light}`,padding:"0.8rem",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",marginTop:e.spacing(2),width:"100%"}})),Vt=({children:e})=>{const{classes:t}=_oe();return i(mt,{className:t.emptyStateListItem,children:e})},Ioe=(e,t=40,n=5)=>{const[r,o]=f.exports.useState(Math.floor(window.pageYOffset/e));return f.exports.useEffect(()=>{const a=()=>{requestAnimationFrame(()=>{o(Math.floor(window.pageYOffset/(e*n))*n)})};return window.addEventListener("scroll",a,{passive:!0}),()=>{window.removeEventListener("scroll",a)}},[e,n]),[r-t,r+t]},Aoe=le()(()=>({row:{position:"absolute",width:"100%"},cell:{alignItems:"center",display:"flex",flexShrink:0,"& > *":{flexGrow:1}}})),Hs=({rowHeight:e,headerGroups:t,rows:n,prepareRow:r})=>{const{classes:o}=Aoe(),a=pn(),s=f.exports.useMemo(()=>e||a.shape.tableRowHeight,[e,a.shape.tableRowHeight]),[l,c]=Ioe(s),u=f.exports.useMemo(()=>s*n.length+a.shape.tableRowHeightCompact,[s,n.length,a.shape.tableRowHeightCompact]);return w(xa,{role:"table",rowHeight:s,style:{height:u},children:[i(Mo,{headerGroups:t,flex:!0}),i(bo,{role:"rowgroup",children:n.map((d,p)=>{const h=p*s+a.shape.tableRowHeightCompact;return p<l||p>c?null:(r(d),f.exports.createElement(Vr,ee(V({hover:!0},d.getRowProps()),{key:d.id,className:o.row,style:{display:"flex",top:h}}),d.cells.map(b=>i(Zo,ee(V({},b.getCellProps({style:{flex:b.column.minWidth?"1 0 auto":void 0}})),{className:o.cell,children:b.render("Cell")})))))})})]})},Noe="http://localhost:4242".replace(/\/+$/,"");class U${constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:Noe}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||W$}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const $oe=new U$;class Poe{constructor(t=$oe){this.configuration=t,this.fetchApi=async(n,r)=>{let o={url:n,init:r};for(const s of this.middleware)s.pre&&(o=await s.pre(V({fetch:this.fetchApi},o))||o);let a=await(this.configuration.fetchApi||fetch)(o.url,o.init);for(const s of this.middleware)s.post&&(a=await s.post({fetch:this.fetchApi,url:o.url,init:o.init,response:a.clone()})||a);return a},this.middleware=t.middleware}withMiddleware(...t){const n=this.clone();return n.middleware=n.middleware.concat(...t),n}withPreMiddleware(...t){const n=t.map(r=>({pre:r}));return this.withMiddleware(...n)}withPostMiddleware(...t){const n=t.map(r=>({post:r}));return this.withMiddleware(...n)}async request(t,n){const{url:r,init:o}=await this.createFetchParams(t,n),a=await this.fetchApi(r,o);if(a.status>=200&&a.status<300)return a;throw new Loe(a,"Response returned an error code")}async createFetchParams(t,n){let r=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(r+="?"+this.configuration.queryParamsStringify(t.query));const o=Object.assign({},this.configuration.headers,t.headers);Object.keys(o).forEach(u=>o[u]===void 0?delete o[u]:{});const a=typeof n=="function"?n:async()=>n,s={method:t.method,headers:o,body:t.body,credentials:this.configuration.credentials},l=V(V({},s),await a({init:s,context:t})),c=ee(V({},l),{body:Doe(l.body)||l.body instanceof URLSearchParams||Ooe(l.body)?l.body:JSON.stringify(l.body)});return{url:r,init:c}}clone(){const t=this.constructor,n=new t(this.configuration);return n.middleware=this.middleware.slice(),n}}function Ooe(e){return typeof Blob!="undefined"&&e instanceof Blob}function Doe(e){return typeof FormData!="undefined"&&e instanceof FormData}class Loe extends Error{constructor(t,n){super(n),this.response=t,this.name="ResponseError"}}class vt extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}function kn(e,t){const n=e[t];return n!=null}function W$(e,t=""){return Object.keys(e).map(n=>H$(n,e[n],t)).filter(n=>n.length>0).join("&")}function H$(e,t,n=""){const r=n+(n.length?`[${e}]`:e);if(t instanceof Array){const o=t.map(a=>encodeURIComponent(String(a))).join(`&${encodeURIComponent(r)}=`);return`${encodeURIComponent(r)}=${o}`}if(t instanceof Set){const o=Array.from(t);return H$(e,o,n)}return t instanceof Date?`${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?W$(t,r):`${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`}class nr{constructor(t,n=r=>r){this.raw=t,this.transformer=n}async value(){return this.transformer(await this.raw.json())}}function Moe(e){if(e!==void 0)return e===null?null:{name:e.name,replaceGroupId:e.replaceGroupId}}function V$(e){return Boe(e)}function Boe(e,t){return e==null?e:{contextName:e.contextName,operator:e.operator,caseInsensitive:kn(e,"caseInsensitive")?e.caseInsensitive:void 0,inverted:kn(e,"inverted")?e.inverted:void 0,values:kn(e,"values")?e.values:void 0,value:kn(e,"value")?e.value:void 0}}function VS(e){if(e!==void 0)return e===null?null:{contextName:e.contextName,operator:e.operator,caseInsensitive:e.caseInsensitive,inverted:e.inverted,values:e.values,value:e.value}}function Foe(e){if(e!==void 0)return e===null?null:{name:e.name,type:e.type,description:e.description,impressionData:e.impressionData}}function zoe(e){if(e!==void 0)return e===null?null:{name:e.name,sortOrder:e.sortOrder,constraints:e.constraints===void 0?void 0:e.constraints.map(VS),parameters:e.parameters}}function Pd(e){return joe(e)}function joe(e,t){return e==null?e:{id:e.id,name:kn(e,"name")?e.name:void 0,createdAt:kn(e,"createdAt")?e.createdAt===null?null:new Date(e.createdAt):void 0,featureName:e.featureName,projectId:kn(e,"projectId")?e.projectId:void 0,environment:e.environment,strategyName:e.strategyName,sortOrder:kn(e,"sortOrder")?e.sortOrder:void 0,constraints:e.constraints.map(V$),parameters:e.parameters}}function G$(e){return Uoe(e)}function Uoe(e,t){return e==null?e:{name:e.name,environment:kn(e,"environment")?e.environment:void 0,type:kn(e,"type")?e.type:void 0,enabled:e.enabled,strategies:kn(e,"strategies")?e.strategies.map(Pd):void 0}}function q$(e){return Woe(e)}function Woe(e,t){return e==null?e:{id:kn(e,"id")?e.id:void 0,name:e.name,sortOrder:kn(e,"sortOrder")?e.sortOrder:void 0,constraints:kn(e,"constraints")?e.constraints.map(V$):void 0,parameters:kn(e,"parameters")?e.parameters:void 0}}function Hoe(e){return Voe(e)}function Voe(e,t){return e==null?e:{contextName:e.contextName,values:e.values}}function Goe(e){return qoe(e)}function qoe(e,t){return e==null?e:{type:e.type,value:e.value}}function Yoe(e){return Koe(e)}function Koe(e,t){return e==null?e:{name:e.name,weight:e.weight,weightType:e.weightType,stickiness:e.stickiness,payload:kn(e,"payload")?Goe(e.payload):void 0,overrides:kn(e,"overrides")?e.overrides.map(Hoe):void 0}}function as(e){return Xoe(e)}function Xoe(e,t){return e==null?e:{name:e.name,type:kn(e,"type")?e.type:void 0,description:kn(e,"description")?e.description:void 0,archived:kn(e,"archived")?e.archived:void 0,project:kn(e,"project")?e.project:void 0,enabled:kn(e,"enabled")?e.enabled:void 0,stale:kn(e,"stale")?e.stale:void 0,impressionData:kn(e,"impressionData")?e.impressionData:void 0,createdAt:kn(e,"createdAt")?e.createdAt===null?null:new Date(e.createdAt):void 0,archivedAt:kn(e,"archivedAt")?e.archivedAt===null?null:new Date(e.archivedAt):void 0,lastSeenAt:kn(e,"lastSeenAt")?e.lastSeenAt===null?null:new Date(e.lastSeenAt):void 0,environments:kn(e,"environments")?e.environments.map(G$):void 0,strategies:kn(e,"strategies")?e.strategies.map(q$):void 0,variants:kn(e,"variants")?e.variants.map(Yoe):void 0}}function $h(e){return Joe(e)}function Joe(e,t){return e==null?e:{version:e.version,features:e.features.map(as)}}function Bk(e){if(e!==void 0)return e===null?null:{path:e.path,op:e.op,from:e.from,value:e.value}}function Y$(e){return Qoe(e)}function Qoe(e,t){return e==null?e:{value:e.value,type:e.type}}function Zoe(e){if(e!==void 0)return e===null?null:{value:e.value,type:e.type}}function eae(e){return tae(e)}function tae(e,t){return e==null?e:{version:e.version,tags:e.tags.map(Y$)}}function nae(e){if(e!==void 0)return e===null?null:{name:e.name,description:e.description,type:e.type,stale:e.stale,archived:e.archived,createdAt:e.createdAt===void 0?void 0:e.createdAt.toISOString().substr(0,10),impressionData:e.impressionData,constraints:e.constraints===void 0?void 0:e.constraints.map(VS)}}function rae(e){if(e!==void 0)return e===null?null:{id:e.id,name:e.name,sortOrder:e.sortOrder,constraints:e.constraints===void 0?void 0:e.constraints.map(VS),parameters:e.parameters}}class oae extends Poe{async addStrategyRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling addStrategy.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling addStrategy.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling addStrategy.");if(t.createStrategySchema===null||t.createStrategySchema===void 0)throw new vt("createStrategySchema","Required parameter requestParameters.createStrategySchema was null or undefined when calling addStrategy.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))),method:"POST",headers:o,query:r,body:zoe(t.createStrategySchema)},n);return new nr(a,s=>Pd(s))}async addStrategy(t,n){return await(await this.addStrategyRaw(t,n)).value()}async addTagRaw(t,n){if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling addTag.");if(t.tagSchema===null||t.tagSchema===void 0)throw new vt("tagSchema","Required parameter requestParameters.tagSchema was null or undefined when calling addTag.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/features/{featureName}/tags".replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"POST",headers:o,query:r,body:Zoe(t.tagSchema)},n);return new nr(a,s=>Y$(s))}async addTag(t,n){return await(await this.addTagRaw(t,n)).value()}async apiAdminArchiveFeaturesGetRaw(t){const n={},r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const o=await this.request({path:"/api/admin/archive/features",method:"GET",headers:r,query:n},t);return new nr(o,a=>$h(a))}async apiAdminArchiveFeaturesGet(t){return await(await this.apiAdminArchiveFeaturesGetRaw(t)).value()}async apiAdminArchiveFeaturesProjectIdGetRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling apiAdminArchiveFeaturesProjectIdGet.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/archive/features/{projectId}".replace("{projectId}",encodeURIComponent(String(t.projectId))),method:"GET",headers:o,query:r},n);return new nr(a,s=>$h(s))}async apiAdminArchiveFeaturesProjectIdGet(t,n){return await(await this.apiAdminArchiveFeaturesProjectIdGetRaw(t,n)).value()}async archiveFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling archiveFeature.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling archiveFeature.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"DELETE",headers:o,query:r},n);return new nr(a)}async archiveFeature(t,n){return await(await this.archiveFeatureRaw(t,n)).value()}async cloneFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling cloneFeature.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling cloneFeature.");if(t.cloneFeatureSchema===null||t.cloneFeatureSchema===void 0)throw new vt("cloneFeatureSchema","Required parameter requestParameters.cloneFeatureSchema was null or undefined when calling cloneFeature.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/clone".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"POST",headers:o,query:r,body:Moe(t.cloneFeatureSchema)},n);return new nr(a,s=>as(s))}async cloneFeature(t,n){return await(await this.cloneFeatureRaw(t,n)).value()}async createFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling createFeature.");if(t.createFeatureSchema===null||t.createFeatureSchema===void 0)throw new vt("createFeatureSchema","Required parameter requestParameters.createFeatureSchema was null or undefined when calling createFeature.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features".replace("{projectId}",encodeURIComponent(String(t.projectId))),method:"POST",headers:o,query:r,body:Foe(t.createFeatureSchema)},n);return new nr(a,s=>as(s))}async createFeature(t,n){return await(await this.createFeatureRaw(t,n)).value()}async deleteStrategyRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling deleteStrategy.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling deleteStrategy.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling deleteStrategy.");if(t.strategyId===null||t.strategyId===void 0)throw new vt("strategyId","Required parameter requestParameters.strategyId was null or undefined when calling deleteStrategy.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))).replace("{strategyId}",encodeURIComponent(String(t.strategyId))),method:"DELETE",headers:o,query:r},n);return new nr(a)}async deleteStrategy(t,n){return await(await this.deleteStrategyRaw(t,n)).value()}async getAllTogglesRaw(t){const n={},r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const o=await this.request({path:"/api/admin/features",method:"GET",headers:r,query:n},t);return new nr(o,a=>$h(a))}async getAllToggles(t){return await(await this.getAllTogglesRaw(t)).value()}async getEnvironmentRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling getEnvironment.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling getEnvironment.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling getEnvironment.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))),method:"GET",headers:o,query:r},n);return new nr(a,s=>G$(s))}async getEnvironment(t,n){return await(await this.getEnvironmentRaw(t,n)).value()}async getFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling getFeature.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling getFeature.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"GET",headers:o,query:r},n);return new nr(a,s=>as(s))}async getFeature(t,n){return await(await this.getFeatureRaw(t,n)).value()}async getFeaturesRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling getFeatures.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features".replace("{projectId}",encodeURIComponent(String(t.projectId))),method:"GET",headers:o,query:r},n);return new nr(a,s=>$h(s))}async getFeatures(t,n){return await(await this.getFeaturesRaw(t,n)).value()}async getStrategiesRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling getStrategies.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling getStrategies.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling getStrategies.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))),method:"GET",headers:o,query:r},n);return new nr(a,s=>s.map(q$))}async getStrategies(t,n){return await(await this.getStrategiesRaw(t,n)).value()}async getStrategyRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling getStrategy.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling getStrategy.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling getStrategy.");if(t.strategyId===null||t.strategyId===void 0)throw new vt("strategyId","Required parameter requestParameters.strategyId was null or undefined when calling getStrategy.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))).replace("{strategyId}",encodeURIComponent(String(t.strategyId))),method:"GET",headers:o,query:r},n);return new nr(a,s=>Pd(s))}async getStrategy(t,n){return await(await this.getStrategyRaw(t,n)).value()}async listTagsRaw(t,n){if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling listTags.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/features/{featureName}/tags".replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"GET",headers:o,query:r},n);return new nr(a,s=>eae(s))}async listTags(t,n){return await(await this.listTagsRaw(t,n)).value()}async patchFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling patchFeature.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling patchFeature.");if(t.patchOperationSchema===null||t.patchOperationSchema===void 0)throw new vt("patchOperationSchema","Required parameter requestParameters.patchOperationSchema was null or undefined when calling patchFeature.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"PATCH",headers:o,query:r,body:t.patchOperationSchema.map(Bk)},n);return new nr(a,s=>as(s))}async patchFeature(t,n){return await(await this.patchFeatureRaw(t,n)).value()}async patchStrategyRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling patchStrategy.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling patchStrategy.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling patchStrategy.");if(t.strategyId===null||t.strategyId===void 0)throw new vt("strategyId","Required parameter requestParameters.strategyId was null or undefined when calling patchStrategy.");if(t.patchOperationSchema===null||t.patchOperationSchema===void 0)throw new vt("patchOperationSchema","Required parameter requestParameters.patchOperationSchema was null or undefined when calling patchStrategy.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))).replace("{strategyId}",encodeURIComponent(String(t.strategyId))),method:"PATCH",headers:o,query:r,body:t.patchOperationSchema.map(Bk)},n);return new nr(a,s=>Pd(s))}async patchStrategy(t,n){return await(await this.patchStrategyRaw(t,n)).value()}async removeTagRaw(t,n){if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling removeTag.");if(t.type===null||t.type===void 0)throw new vt("type","Required parameter requestParameters.type was null or undefined when calling removeTag.");if(t.value===null||t.value===void 0)throw new vt("value","Required parameter requestParameters.value was null or undefined when calling removeTag.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/features/{featureName}/tags/{type}/{value}".replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{type}",encodeURIComponent(String(t.type))).replace("{value}",encodeURIComponent(String(t.value))),method:"DELETE",headers:o,query:r},n);return new nr(a)}async removeTag(t,n){return await(await this.removeTagRaw(t,n)).value()}async toggleEnvironmentOffRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling toggleEnvironmentOff.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling toggleEnvironmentOff.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling toggleEnvironmentOff.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))),method:"POST",headers:o,query:r},n);return new nr(a,s=>as(s))}async toggleEnvironmentOff(t,n){return await(await this.toggleEnvironmentOffRaw(t,n)).value()}async toggleEnvironmentOnRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling toggleEnvironmentOn.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling toggleEnvironmentOn.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling toggleEnvironmentOn.");const r={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))),method:"POST",headers:o,query:r},n);return new nr(a,s=>as(s))}async toggleEnvironmentOn(t,n){return await(await this.toggleEnvironmentOnRaw(t,n)).value()}async updateFeatureRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling updateFeature.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling updateFeature.");if(t.updateFeatureSchema===null||t.updateFeatureSchema===void 0)throw new vt("updateFeatureSchema","Required parameter requestParameters.updateFeatureSchema was null or undefined when calling updateFeature.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))),method:"PUT",headers:o,query:r,body:nae(t.updateFeatureSchema)},n);return new nr(a,s=>as(s))}async updateFeature(t,n){return await(await this.updateFeatureRaw(t,n)).value()}async updateStrategyRaw(t,n){if(t.projectId===null||t.projectId===void 0)throw new vt("projectId","Required parameter requestParameters.projectId was null or undefined when calling updateStrategy.");if(t.featureName===null||t.featureName===void 0)throw new vt("featureName","Required parameter requestParameters.featureName was null or undefined when calling updateStrategy.");if(t.environment===null||t.environment===void 0)throw new vt("environment","Required parameter requestParameters.environment was null or undefined when calling updateStrategy.");if(t.strategyId===null||t.strategyId===void 0)throw new vt("strategyId","Required parameter requestParameters.strategyId was null or undefined when calling updateStrategy.");if(t.updateStrategySchema===null||t.updateStrategySchema===void 0)throw new vt("updateStrategySchema","Required parameter requestParameters.updateStrategySchema was null or undefined when calling updateStrategy.");const r={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.Authorization=this.configuration.apiKey("Authorization"));const a=await this.request({path:"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}".replace("{projectId}",encodeURIComponent(String(t.projectId))).replace("{featureName}",encodeURIComponent(String(t.featureName))).replace("{environment}",encodeURIComponent(String(t.environment))).replace("{strategyId}",encodeURIComponent(String(t.strategyId))),method:"PUT",headers:o,query:r,body:rae(t.updateStrategySchema)},n);return new nr(a,s=>Pd(s))}async updateStrategy(t,n){return await(await this.updateStrategyRaw(t,n)).value()}async validateFeatureRaw(t){const n={},r={};this.configuration&&this.configuration.apiKey&&(r.Authorization=this.configuration.apiKey("Authorization"));const o=await this.request({path:"/api/admin/features/validate",method:"POST",headers:r,query:n},t);return new nr(o)}async validateFeature(t){return await(await this.validateFeatureRaw(t)).value()}}const aae=()=>new oae(new U$({basePath:Xi})),Fp=aae(),Fv=(e,t,n)=>{const{data:r,error:o,mutate:a}=Wt(e,t,n),s=f.exports.useCallback(()=>{a().catch(console.warn)},[a]);return{data:r,error:o,refetch:s,loading:!o&&!r}},GS=()=>{const{data:e,refetch:t,loading:n,error:r}=Fv("apiAdminFeaturesGet",()=>Fp.getAllToggles(),{refreshInterval:15e3});return{features:e==null?void 0:e.features,refetchFeatures:t,loading:n,error:r}},K$=f.exports.createContext(""),so=K$.Provider,$u=()=>({searchQuery:f.exports.useContext(K$)}),qS=(e,t)=>new Date(e).toLocaleString(t,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),uu=(e,t)=>new Date(e).toLocaleString(t,{day:"2-digit",month:"2-digit",year:"numeric"}),Q2e=(e,t)=>new Date(e).toLocaleString(t,{hour:"2-digit",minute:"2-digit"});function fi(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function iae(e,t){Kn(2,arguments);var n=mr(e),r=fi(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function sae(e,t){Kn(2,arguments);var n=mr(e).getTime(),r=fi(t);return new Date(n+r)}var lae={};function Rf(){return lae}function cae(e,t){Kn(2,arguments);var n=mr(e),r=mr(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}var X$=6e4,J$=36e5,Z2e=1e3;function uae(e){return Kn(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function YS(e){if(Kn(1,arguments),!uae(e)&&typeof e!="number")return!1;var t=mr(e);return!isNaN(Number(t))}function dae(e,t){Kn(2,arguments);var n=fi(t);return sae(e,-n)}var pae=864e5;function fae(e){Kn(1,arguments);var t=mr(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/pae)+1}function Jm(e){Kn(1,arguments);var t=1,n=mr(e),r=n.getUTCDay(),o=(r<t?7:0)+r-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function Q$(e){Kn(1,arguments);var t=mr(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Jm(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var s=Jm(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function hae(e){Kn(1,arguments);var t=Q$(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Jm(n);return r}var mae=6048e5;function gae(e){Kn(1,arguments);var t=mr(e),n=Jm(t).getTime()-hae(t).getTime();return Math.round(n/mae)+1}function Qm(e,t){var n,r,o,a,s,l,c,u;Kn(1,arguments);var d=Rf(),p=fi((n=(r=(o=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=mr(e),m=h.getUTCDay(),b=(m<p?7:0)+m-p;return h.setUTCDate(h.getUTCDate()-b),h.setUTCHours(0,0,0,0),h}function Z$(e,t){var n,r,o,a,s,l,c,u;Kn(1,arguments);var d=mr(e),p=d.getUTCFullYear(),h=Rf(),m=fi((n=(r=(o=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&o!==void 0?o:h.firstWeekContainsDate)!==null&&r!==void 0?r:(c=h.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(p+1,0,m),b.setUTCHours(0,0,0,0);var y=Qm(b,t),g=new Date(0);g.setUTCFullYear(p,0,m),g.setUTCHours(0,0,0,0);var x=Qm(g,t);return d.getTime()>=y.getTime()?p+1:d.getTime()>=x.getTime()?p:p-1}function vae(e,t){var n,r,o,a,s,l,c,u;Kn(1,arguments);var d=Rf(),p=fi((n=(r=(o=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&o!==void 0?o:d.firstWeekContainsDate)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=Z$(e,t),m=new Date(0);m.setUTCFullYear(h,0,p),m.setUTCHours(0,0,0,0);var b=Qm(m,t);return b}var yae=6048e5;function bae(e,t){Kn(1,arguments);var n=mr(e),r=Qm(n,t).getTime()-vae(n,t).getTime();return Math.round(r/yae)+1}function Nn(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var xae={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Nn(t==="yy"?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Nn(n+1,2)},d:function(e,t){return Nn(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return Nn(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Nn(e.getUTCHours(),t.length)},m:function(e,t){return Nn(e.getUTCMinutes(),t.length)},s:function(e,t){return Nn(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),o=Math.floor(r*Math.pow(10,n-3));return Nn(o,t.length)}},ns=xae,bc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wae={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ns.y(e,t)},Y:function(e,t,n,r){var o=Z$(e,r),a=o>0?o:1-o;if(t==="YY"){var s=a%100;return Nn(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Nn(a,t.length)},R:function(e,t){var n=Q$(e);return Nn(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Nn(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Nn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Nn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return ns.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Nn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=bae(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Nn(o,t.length)},I:function(e,t,n){var r=gae(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Nn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ns.d(e,t)},D:function(e,t,n){var r=fae(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Nn(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Nn(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Nn(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Nn(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours(),o=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r=e.getUTCHours(),o;switch(r===12?o=bc.noon:r===0?o=bc.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r=e.getUTCHours(),o;switch(r>=17?o=bc.evening:r>=12?o=bc.afternoon:r>=4?o=bc.morning:o=bc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ns.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ns.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Nn(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Nn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ns.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ns.s(e,t)},S:function(e,t){return ns.S(e,t)},X:function(e,t,n,r){var o=r._originalDate||e,a=o.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return zk(a);case"XXXX":case"XX":return il(a);case"XXXXX":case"XXX":default:return il(a,":")}},x:function(e,t,n,r){var o=r._originalDate||e,a=o.getTimezoneOffset();switch(t){case"x":return zk(a);case"xxxx":case"xx":return il(a);case"xxxxx":case"xxx":default:return il(a,":")}},O:function(e,t,n,r){var o=r._originalDate||e,a=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Fk(a,":");case"OOOO":default:return"GMT"+il(a,":")}},z:function(e,t,n,r){var o=r._originalDate||e,a=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Fk(a,":");case"zzzz":default:return"GMT"+il(a,":")}},t:function(e,t,n,r){var o=r._originalDate||e,a=Math.floor(o.getTime()/1e3);return Nn(a,t.length)},T:function(e,t,n,r){var o=r._originalDate||e,a=o.getTime();return Nn(a,t.length)}};function Fk(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(a===0)return n+String(o);var s=t||"";return n+String(o)+s+Nn(a,2)}function zk(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Nn(Math.abs(e)/60,2)}return il(e,t)}function il(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e),a=Nn(Math.floor(o/60),2),s=Nn(o%60,2);return r+a+n+s}var Sae=wae,jk=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},e3=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Cae=function(e,t){var n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return jk(e,t);var a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",jk(r,t)).replace("{{time}}",e3(o,t))},Eae={p:e3,P:Cae},Tae=Eae,Rae=["D","DD"],kae=["YY","YYYY"];function _ae(e){return Rae.indexOf(e)!==-1}function Iae(e){return kae.indexOf(e)!==-1}function Uk(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Aae={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nae=function(e,t,n){var r,o=Aae[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},$ae=Nae;function W0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var Pae={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Oae={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Dae={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Lae={date:W0({formats:Pae,defaultWidth:"full"}),time:W0({formats:Oae,defaultWidth:"full"}),dateTime:W0({formats:Dae,defaultWidth:"full"})},Mae=Lae,Bae={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fae=function(e,t,n,r){return Bae[e]},zae=Fae;function pd(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",o;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{var l=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[l]}var u=e.argumentCallback?e.argumentCallback(t):t;return o[u]}}var jae={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Uae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Wae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hae={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Gae={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qae=function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Yae={ordinalNumber:qae,era:pd({values:jae,defaultWidth:"wide"}),quarter:pd({values:Uae,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:pd({values:Wae,defaultWidth:"wide"}),day:pd({values:Hae,defaultWidth:"wide"}),dayPeriod:pd({values:Vae,defaultWidth:"wide",formattingValues:Gae,defaultFormattingWidth:"wide"})},Kae=Yae;function fd(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;var s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Jae(l,function(p){return p.test(s)}):Xae(l,function(p){return p.test(s)}),u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(s.length);return{value:u,rest:d}}}function Xae(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Jae(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Qae(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var o=r[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;var l=t.slice(o.length);return{value:s,rest:l}}}var Zae=/^(\d+)(th|st|nd|rd)?/i,eie=/\d+/i,tie={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nie={any:[/^b/i,/^(a|c)/i]},rie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oie={any:[/1/i,/2/i,/3/i,/4/i]},aie={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},iie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sie={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uie={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},die={ordinalNumber:Qae({matchPattern:Zae,parsePattern:eie,valueCallback:function(e){return parseInt(e,10)}}),era:fd({matchPatterns:tie,defaultMatchWidth:"wide",parsePatterns:nie,defaultParseWidth:"any"}),quarter:fd({matchPatterns:rie,defaultMatchWidth:"wide",parsePatterns:oie,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:fd({matchPatterns:aie,defaultMatchWidth:"wide",parsePatterns:iie,defaultParseWidth:"any"}),day:fd({matchPatterns:sie,defaultMatchWidth:"wide",parsePatterns:lie,defaultParseWidth:"any"}),dayPeriod:fd({matchPatterns:cie,defaultMatchWidth:"any",parsePatterns:uie,defaultParseWidth:"any"})},pie=die,fie={code:"en-US",formatDistance:$ae,formatLong:Mae,formatRelative:zae,localize:Kae,match:pie,options:{weekStartsOn:0,firstWeekContainsDate:1}},t3=fie,hie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gie=/^'([^]*?)'?$/,vie=/''/g,yie=/[a-zA-Z]/;function Wk(e,t,n){var r,o,a,s,l,c,u,d,p,h,m,b,y,g,x,v,S,E;Kn(2,arguments);var R=String(t),A=Rf(),_=(r=(o=n==null?void 0:n.locale)!==null&&o!==void 0?o:A.locale)!==null&&r!==void 0?r:t3,N=fi((a=(s=(l=(c=n==null?void 0:n.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(u=n.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:A.firstWeekContainsDate)!==null&&s!==void 0?s:(p=A.locale)===null||p===void 0||(h=p.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var k=fi((m=(b=(y=(g=n==null?void 0:n.weekStartsOn)!==null&&g!==void 0?g:n==null||(x=n.locale)===null||x===void 0||(v=x.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&y!==void 0?y:A.weekStartsOn)!==null&&b!==void 0?b:(S=A.locale)===null||S===void 0||(E=S.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&m!==void 0?m:0);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var I=mr(e);if(!YS(I))throw new RangeError("Invalid time value");var O=Op(I),L=dae(I,O),q={firstWeekContainsDate:N,weekStartsOn:k,locale:_,_originalDate:I},D=R.match(mie).map(function(H){var U=H[0];if(U==="p"||U==="P"){var Z=Tae[U];return Z(H,_.formatLong)}return H}).join("").match(hie).map(function(H){if(H==="''")return"'";var U=H[0];if(U==="'")return bie(H);var Z=Sae[U];if(Z)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Iae(H)&&Uk(H,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&_ae(H)&&Uk(H,t,String(e)),Z(L,H,_.localize,q);if(U.match(yie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+U+"`");return H}).join("");return D}function bie(e){var t=e.match(gie);return t?t[1].replace(vie,"'"):e}function n3(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function xie(e){return n3({},e)}var Hk=1e3*60,Zm=60*24,Vk=Zm*30,Gk=Zm*365;function wie(e,t,n){var r,o,a;Kn(2,arguments);var s=Rf(),l=(r=(o=n==null?void 0:n.locale)!==null&&o!==void 0?o:s.locale)!==null&&r!==void 0?r:t3;if(!l.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var c=cae(e,t);if(isNaN(c))throw new RangeError("Invalid time value");var u=n3(xie(n),{addSuffix:Boolean(n==null?void 0:n.addSuffix),comparison:c}),d,p;c>0?(d=mr(t),p=mr(e)):(d=mr(e),p=mr(t));var h=String((a=n==null?void 0:n.roundingMethod)!==null&&a!==void 0?a:"round"),m;if(h==="floor")m=Math.floor;else if(h==="ceil")m=Math.ceil;else if(h==="round")m=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var b=p.getTime()-d.getTime(),y=b/Hk,g=Op(p)-Op(d),x=(b-g)/Hk,v=n==null?void 0:n.unit,S;if(v?S=String(v):y<1?S="second":y<60?S="minute":y<Zm?S="hour":x<Vk?S="day":x<Gk?S="month":S="year",S==="second"){var E=m(b/1e3);return l.formatDistance("xSeconds",E,u)}else if(S==="minute"){var R=m(y);return l.formatDistance("xMinutes",R,u)}else if(S==="hour"){var A=m(y/60);return l.formatDistance("xHours",A,u)}else if(S==="day"){var _=m(x/Zm);return l.formatDistance("xDays",_,u)}else if(S==="month"){var N=m(x/Vk);return N===12&&v!=="month"?l.formatDistance("xYears",1,u):l.formatDistance("xMonths",N,u)}else if(S==="year"){var k=m(x/Gk);return l.formatDistance("xYears",k,u)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function Sie(e,t){return Kn(1,arguments),wie(e,Date.now(),t)}function Cie(e){return Kn(1,arguments),mr(e).getTime()<Date.now()}function Eie(e,t){Kn(2,arguments);var n=fi(t);return iae(e,-n)}function Ql(e,t){var n;Kn(1,arguments);var r=fi((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var o=_ie(e),a;if(o.date){var s=Iie(o.date,r);a=Aie(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var l=a.getTime(),c=0,u;if(o.time&&(c=Nie(o.time),isNaN(c)))return new Date(NaN);if(o.timezone){if(u=$ie(o.timezone),isNaN(u))return new Date(NaN)}else{var d=new Date(l+c),p=new Date(0);return p.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),p.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),p}return new Date(l+c+u)}var Ph={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Tie=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rie=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,kie=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _ie(e){var t={},n=e.split(Ph.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Ph.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ph.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var o=Ph.timezone.exec(r);o?(t.time=r.replace(o[1],""),t.timezone=o[1]):t.time=r}return t}function Iie(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?o:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function Aie(e,t){if(t===null)return new Date(NaN);var n=e.match(Tie);if(!n)return new Date(NaN);var r=!!n[4],o=hd(n[1]),a=hd(n[2])-1,s=hd(n[3]),l=hd(n[4]),c=hd(n[5])-1;if(r)return Mie(t,l,c)?Pie(t,l,c):new Date(NaN);var u=new Date(0);return!Die(t,a,s)||!Lie(t,o)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(o,s)),u)}function hd(e){return e?parseInt(e):1}function Nie(e){var t=e.match(Rie);if(!t)return NaN;var n=H0(t[1]),r=H0(t[2]),o=H0(t[3]);return Bie(n,r,o)?n*J$+r*X$+o*1e3:NaN}function H0(e){return e&&parseFloat(e.replace(",","."))||0}function $ie(e){if(e==="Z")return 0;var t=e.match(kie);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return Fie(r,o)?n*(r*J$+o*X$):NaN}function Pie(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=(t-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}var Oie=[31,null,31,30,31,30,31,31,30,31,30,31];function r3(e){return e%400===0||e%4===0&&e%100!==0}function Die(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Oie[t]||(r3(e)?29:28))}function Lie(e,t){return t>=1&&t<=(r3(e)?366:365)}function Mie(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Bie(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Fie(e,t){return t>=0&&t<=59}const zie=le()((e,{lineClamp:t})=>({wrapper:{padding:e.spacing(1,2),display:"-webkit-box",overflow:t?"hidden":"auto",WebkitLineClamp:t||"none",WebkitBoxOrient:"vertical",wordBreak:"break-all"}})),Bn=({value:e,children:t,lineClamp:n,"data-testid":r})=>{const{classes:o}=zie({lineClamp:n});return i(mt,{className:o.wrapper,children:i("span",{"data-loading":"true","data-testid":r,children:t!=null?t:e})})},wa=({value:e})=>{const{locationSettings:t}=vi(),n=e?e instanceof Date?uu(e,t.locale):uu(Ql(e),t.locale):void 0;return i(Bn,{lineClamp:1,children:n})},jie=le()(e=>({wrapper:{paddingTop:e.spacing(1.5),paddingBottom:e.spacing(1.5),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"flex",alignItems:"center",minHeight:"62px"},link:{"&:hover, &:focus":{textDecoration:"none","& > div > span:first-of-type":{textDecoration:"underline"}}},container:{display:"flex",flexDirection:"column",justifyContent:"center",wordBreak:"break-all"},title:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical"},description:{color:e.palette.text.secondary,textDecoration:"none",fontSize:"inherit",WebkitLineClamp:1,lineClamp:1,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical"}})),Uie=le()(e=>({highlighter:{"&>mark":{backgroundColor:e.palette.highlight}}})),Wie=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ts=({search:e,children:t,caseSensitive:n})=>{const{classes:r}=Uie();if(!t)return null;if(!e)return i(Ne,{children:t});const o=new RegExp(Wie(e),n?"g":"gi");return i("span",{className:r.highlighter,dangerouslySetInnerHTML:{__html:(t==null?void 0:t.replaceAll(o,"<mark>$&</mark>"))||""}})},bi=({title:e,to:t,onClick:n,subtitle:r,children:o})=>{const{classes:a}=jie(),{searchQuery:s}=$u(),l=w("div",{className:a.container,children:[w("span",{"data-loading":!0,className:a.title,style:{WebkitLineClamp:Boolean(r)?1:2,lineClamp:Boolean(r)?1:2},children:[i(Ts,{search:s,children:e}),o]}),i(F,{condition:Boolean(r),show:i(Ne,{children:i(Te,{className:a.description,component:"span","data-loading":!0,children:i(Ts,{search:s,children:r})})})})]});return t?i(Fl,{component:Ct,to:t,underline:"hover",className:it(a.wrapper,a.link),children:l}):n?i(Fl,{onClick:n,underline:"hover",className:it(a.wrapper,a.link),children:l}):i("span",{className:a.wrapper,children:l})};function Oh(e){const t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;const n=String(e).match(/\d+/g);if(n==null||n.length<=2)return t;{const[r,o,...a]=n.map(c=>parseInt(c)),s=[r,o-1,...a];return new Date(Date.UTC(...s))}}function qk(e,t,n){const r=e!==1?t+"s":t;return e+" "+r+" "+n}function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pb.apply(this,arguments)}const Od=60,Dd=Od*60,qc=Dd*24,Dh=qc*7,Yk=qc*30,Kk=qc*365;function zv(u){var d=u,{date:e,formatter:t=qk,component:n="time",live:r=!0,minPeriod:o=0,maxPeriod:a=Dh,title:s,now:l=()=>Date.now()}=d,c=en(d,["date","formatter","component","live","minPeriod","maxPeriod","title","now"]);const[p,h]=f.exports.useState(l());f.exports.useEffect(()=>{if(!r)return;const _=(()=>{const N=Oh(e).valueOf();if(!N)return console.warn("[react-timeago] Invalid Date provided"),0;const k=Math.round(Math.abs(p-N)/1e3),I=k<Od?1e3:k<Dd?1e3*Od:k<qc?1e3*Dd:1e3*Dh,O=Math.min(Math.max(I,o*1e3),a*1e3);return O?setTimeout(()=>{h(l())},O):0})();return()=>{_&&clearTimeout(_)}},[e,r,a,o,l,p]);const m=n,b=Oh(e).valueOf();if(!b)return null;const y=Math.round(Math.abs(p-b)/1e3),g=b<p?"ago":"from now",[x,v]=y<Od?[Math.round(y),"second"]:y<Dd?[Math.round(y/Od),"minute"]:y<qc?[Math.round(y/Dd),"hour"]:y<Dh?[Math.round(y/qc),"day"]:y<Yk?[Math.round(y/Dh),"week"]:y<Kk?[Math.round(y/Yk),"month"]:[Math.round(y/Kk),"year"],S=typeof s=="undefined"?typeof e=="string"?e:Oh(e).toISOString().substr(0,16).replace("T"," "):s,E=m==="time"?ee(V({},c),{dateTime:Oh(e).toISOString()}):c,R=qk.bind(null,x,v,g);return f.exports.createElement(m,Pb({},E,{title:S}),t(x,v,g,b,R,l))}const Hie=le()(e=>({container:{display:"flex",padding:e.spacing(1.5)},box:{width:"38px",height:"38px",background:"gray",borderRadius:"4px",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",fontSize:e.fontSizes.smallerBody,margin:"0 auto"}}));function Vie(e){switch(e){case"second":return"s";case"minute":return"m";case"hour":return"h";case"day":return"D";case"week":return"W";case"month":return"M";case"year":return"Y";default:return""}}const Gie=()=>{const e=pn();return t=>{switch(t){case"second":return e.palette.activityIndicators.recent;case"minute":return e.palette.activityIndicators.recent;case"hour":return e.palette.activityIndicators.recent;case"day":return e.palette.activityIndicators.recent;case"week":return e.palette.activityIndicators.inactive;case"month":return e.palette.activityIndicators.abandoned;case"year":return e.palette.activityIndicators.abandoned;default:return e.palette.activityIndicators.unknown}}},Xk=({unit:e,tooltip:t,children:n})=>{const{classes:r}=Hie(),o=Gie();return i("div",{className:r.container,children:i(wt,{title:t,arrow:!0,describeChild:!0,children:i("div",{className:r.box,style:{background:o(e)},"data-loading":!0,children:n})})})},jv=({value:e})=>i(F,{condition:Boolean(e),show:i(zv,{date:e,title:"",live:!1,formatter:(t,n,r)=>w(Xk,{tooltip:`Last usage reported ${t} ${n}${t!==1?"s":""} ${r}`,unit:n,children:[t,Vie(n)]})}),elseShow:i(Xk,{tooltip:"No usage reported from connected applications",children:"\u2013"})}),o3="experiment",a3="release",i3="operational",KS="kill-switch",XS="permission";var JS={},qie=yn.exports;Object.defineProperty(JS,"__esModule",{value:!0});var Ob=JS.default=void 0,Yie=qie(bn),Kie=Cn,Xie=(0,Yie.default)((0,Kie.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Loop");Ob=JS.default=Xie;var QS={},Jie=yn.exports;Object.defineProperty(QS,"__esModule",{value:!0});var s3=QS.default=void 0,Qie=Jie(bn),Zie=Cn,ese=(0,Qie.default)((0,Zie.jsx)("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline");s3=QS.default=ese;var ZS={},tse=yn.exports;Object.defineProperty(ZS,"__esModule",{value:!0});var eC=ZS.default=void 0,nse=tse(bn),rse=Cn,ose=(0,nse.default)((0,rse.jsx)("path",{d:"M13 3h-2v10h2V3zm4.83 2.17-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"}),"PowerSettingsNew");eC=ZS.default=ose;var tC={},ase=yn.exports;Object.defineProperty(tC,"__esModule",{value:!0});var l3=tC.default=void 0,ise=ase(bn),sse=Cn,lse=(0,ise.default)((0,sse.jsx)("path",{d:"M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"}),"PanTool");l3=tC.default=lse;var nC={},cse=yn.exports;Object.defineProperty(nC,"__esModule",{value:!0});var c3=nC.default=void 0,use=cse(bn),dse=Cn,pse=(0,use.default)((0,dse.jsx)("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"}),"Build");c3=nC.default=pse;const u3=e=>{switch(e){case a3:return Ob;case o3:return s3;case KS:return eC;case i3:return c3;case XS:return l3;default:return Ob}},rC=(e={})=>{const t=async()=>{const c=bt("api/admin/feature-types");return(await fetch(c,{method:"GET"}).then(rn("Feature types"))).json()},n="api/admin/feature-types",{data:r,error:o}=Wt(n,t,e),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(n)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{featureTypes:(r==null?void 0:r.types)||[],error:o,loading:a,refetch:l}},fse=le()(e=>({container:{padding:e.spacing(1.5),display:"flex",justifyContent:"center",alignItems:"center"},icon:{color:e.palette.inactiveIcon}})),Uv=({value:e})=>{const{classes:t}=fse(),{featureTypes:n}=rC(),r=u3(e),a=`This is a "${n.filter(s=>s.id===e).map(s=>s.name)||e}" toggle`;return i("div",{className:t.container,children:i(wt,{arrow:!0,title:a,describeChild:!0,children:i(r,{"data-loading":!0,className:t.icon})})})},d3=({row:e})=>i(bi,{title:e.original.name,subtitle:e.original.description,to:`/projects/${e.original.project}/features/${e.original.name}`}),hse=le()(e=>({headerContainer:{display:"flex",flexDirection:"column"},topContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative"},header:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:e.spacing(2)},headerTitle:{fontSize:e.fontSizes.mainHeader,fontWeight:"normal"},headerActions:{display:"flex",flexGrow:1,justifyContent:"flex-end",alignItems:"center",gap:e.spacing(1)}})),Sa=e=>{const{setAnnouncement:t}=f.exports.useContext(HS);f.exports.useEffect(()=>{if(e)return document.title=e,()=>{document.title=Jk}},[e]),f.exports.useEffect(()=>{e&&e!==Jk&&t(`Navigated to ${e}`)},[t,e])},Jk="Unleash",mse=z(Ur)(({theme:e})=>({height:"100%",borderColor:e.palette.dividerAlternative,width:"1px",display:"inline-block",marginLeft:e.spacing(2),marginRight:e.spacing(2),padding:"10px 0",verticalAlign:"middle"})),p3=({title:e,titleElement:t,actions:n,subtitle:r,variant:o,loading:a,className:s="",secondary:l,children:c})=>{const{classes:u}=hse(),d=it({skeleton:a});return Sa(l?"":e),w("div",{className:u.headerContainer,children:[w("div",{className:u.topContainer,children:[w("div",{className:it(u.header,d),"data-loading":!0,children:[i(Te,{variant:o||l?"h2":"h1",className:it(u.headerTitle,s),children:t||e}),r&&i("small",{children:r})]}),i(F,{condition:Boolean(n),show:i("div",{className:u.headerActions,children:n})})]}),c]})},gse=({sx:e})=>i(mse,{orientation:"vertical",variant:"middle",sx:e});p3.Divider=gse;const Dt=p3,vse=le()(e=>({container:{borderRadius:e.shape.borderRadiusLarge,boxShadow:"none"},headerContainer:{padding:e.spacing(2,4),borderBottomStyle:"solid",borderBottomWidth:1,borderBottomColor:e.palette.divider,[e.breakpoints.down("md")]:{padding:"1.5rem 1rem"}},bodyContainer:{padding:e.spacing(4),[e.breakpoints.down("md")]:{padding:e.spacing(2)}},paddingDisabled:{padding:"0"},borderDisabled:{border:"none"}})),yse=({children:e,isLoading:t})=>{const n=Ji(t);return i("div",{ref:n,"aria-busy":t,"aria-live":"polite",children:e})},Gt=u=>{var d=u,{children:e,header:t,disablePadding:n=!1,disableBorder:r=!1,bodyClass:o="",isLoading:a=!1,disableLoading:s=!1,className:l}=d,c=en(d,["children","header","disablePadding","disableBorder","bodyClass","isLoading","disableLoading","className"]);const{classes:p}=vse(),h=it("header",p.headerContainer,{[p.paddingDisabled]:n,[p.borderDisabled]:r}),m=it("body",o||p.bodyContainer,{[p.paddingDisabled]:n,[p.borderDisabled]:r}),b=r?{elevation:0}:{},y=w(yr,ee(V(V({},c),b),{className:it(p.container,l),children:[i(F,{condition:Boolean(t),show:i("div",{className:h,children:i(F,{condition:typeof t=="string",show:i(Dt,{title:t}),elseShow:t})})}),i("div",{className:m,children:e})]}));return s?y:i(yse,{isLoading:a,children:y})},Ar={date:(e,t,n)=>{var a,s;const r=new Date(((a=e==null?void 0:e.values)==null?void 0:a[n])||0),o=new Date(((s=t==null?void 0:t.values)==null?void 0:s[n])||0);return(o==null?void 0:o.getTime())-(r==null?void 0:r.getTime())},boolean:(e,t,n)=>{var a,s;const r=(a=e==null?void 0:e.values)==null?void 0:a[n],o=(s=t==null?void 0:t.values)==null?void 0:s[n];return r===o?0:r?1:-1},alphanumeric:(e,t,n)=>{var r,o,a,s;return(s=((r=e==null?void 0:e.values)==null?void 0:r[n])||"")==null?void 0:s.toLowerCase().localeCompare(((a=(o=t==null?void 0:t.values)==null?void 0:o[n])==null?void 0:a.toLowerCase())||"")},playgroundResultState:(e,t,n)=>{var a,s;const r=(a=e==null?void 0:e.values)==null?void 0:a[n],o=(s=t==null?void 0:t.values)==null?void 0:s[n];return r===o?0:r==="true"?1:o==="true"||r==="false"?-1:o==="false"?1:0}},Pu=(e,t)=>{const n=`${Xi}:${e}:localStorage:v2`;return{value:(()=>{const a=Wm(n);return a===void 0?t:a})(),setValue:a=>{if(a instanceof Function){const s=Wm(n),l=a(s!=null?s:t);return $p(n,l),l}return $p(n,a),a}}},Zl=(e={})=>{const t=()=>{const c=bt("api/admin/projects");return fetch(c,{method:"GET"}).then(rn("Projects")).then(u=>u.json())},n="api/admin/projects",{data:r,error:o}=Wt(n,t,e),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(n)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{projects:(r==null?void 0:r.projects)||[],error:o,loading:a,refetch:l}},Db="default",bse=()=>{var n;const{projects:e=[]}=Zl(),t=e.find(r=>r.id===Db);return(t==null?void 0:t.id)||((n=e[0])==null?void 0:n.id)},eg=(e,t)=>`/projects/${e}/features/${t}`,oC=(e,t=!1,n)=>{const r=`/projects/${e}/create-toggle`;let o;return n&&(o=Object.keys(n).reduce((a,s)=>(a+=`${s}=${n[s]}`,a),"")),o?`${r}?${o}`:r},xse=e=>`/projects/${e}/edit`,wse=()=>{throw new Error("hasAccess called outside AccessContext")},Jt=hr.createContext({isAdmin:!1,hasAccess:wse}),Sse=e=>{const{hasAccess:t}=f.exports.useContext(Jt),n=bse(),{uiConfig:r}=st(),o=e.project==="*"||!e.project?n:e.project;if(!!o)return{path:oC(o,r.flags.E),access:t(Jl,o)}},Cse=({loading:e,filter:t})=>{const n=an("(max-width:800px)"),r=Sse(t);return r?i(F,{condition:n,show:i(wt,{title:"Create feature toggle",arrow:!0,children:i(Ht,{component:Ct,to:r.path,"data-testid":Ek,disabled:!r.access,size:"large",children:i(io,{})})}),elseShow:i(nt,{to:r.path,color:"primary",variant:"contained",component:Ct,"data-testid":Ek,disabled:!r.access,className:it({skeleton:e}),children:"New feature toggle"})}):null},Ese=le()(e=>({status:{color:e.palette.success.dark,fontSize:"inherit"},stale:{color:e.palette.error.dark}})),aC=({value:e})=>{const{classes:t}=Ese();return i(mt,{sx:{py:1.5,px:2},children:i(Te,{component:"span",className:it(t.status,e&&t.stale),"data-loading":!0,children:e?"Stale":"Active"})})},Ou=(e,t,n)=>{const r=f3(e),o=()=>({data:n,searchValue:t,columns:e});return t?{data:(()=>{const s=Tse(e,t,n);return Rse(e,r(t),s)})(),getSearchText:r,getSearchContext:o}:{data:n,getSearchText:r,getSearchContext:o}},Tse=(e,t,n)=>{let r=n;return m3(e).filter(o=>h3(t,o.filterName)).forEach(o=>{const a=g3(o.filterName,t);r=r.filter(s=>o.filterBy?o.filterBy(s,a):kse(tg(o,s),a))}),r},Rse=(e,t,n)=>{const r=e.filter(o=>o.searchable&&o.accessor);return n.filter(o=>r.some(a=>a.searchBy?a.searchBy(o,t):_se(tg(a,o),t)))},kse=(e,t)=>t.some(n=>(e==null?void 0:e.toLowerCase())===(n==null?void 0:n.toLowerCase())),_se=(e,t)=>e==null?void 0:e.toLowerCase().includes(t==null?void 0:t.toLowerCase()),f3=e=>{const t=e.filter(r=>r.filterName).map(r=>r.filterName),n=r=>t.some(o=>h3(r,o));return r=>r.split(" ").filter(o=>!n(o)).join(" ")},h3=(e,t)=>new RegExp(`${t}:\\w+`).test(e),m3=e=>e.filter(t=>t.filterName&&t.accessor),tg=(e,t)=>{const n=typeof e.accessor=="function"?e.accessor(t):e.accessor.includes(".")?e.accessor.split(".").reduce((r,o)=>r==null?void 0:r[o],t):t[e.accessor];return e.filterParsing?e.filterParsing(n):n},g3=(e,t)=>{var n,r,o;return(o=(r=(n=t==null?void 0:t.split(`${e}:`)[1])==null?void 0:n.split(" ")[0])==null?void 0:r.split(",").filter(a=>a))!=null?o:[]},Ise=le()(e=>({container:{display:"flex",flexGrow:1,alignItems:"center",position:"relative",backgroundColor:e.palette.background.paper,maxWidth:"400px",[e.breakpoints.down("md")]:{marginTop:e.spacing(1),maxWidth:"100%"}},search:{display:"flex",alignItems:"center",backgroundColor:e.palette.background.paper,border:`1px solid ${e.palette.grey[500]}`,borderRadius:e.shape.borderRadiusExtraLarge,padding:"3px 5px 3px 12px",width:"100%",zIndex:3,"&.search-container:focus-within":{borderColor:e.palette.primary.light,boxShadow:e.boxShadows.main}},searchIcon:{marginRight:8,color:e.palette.inactiveIcon},clearContainer:{width:"30px","& > button":{padding:"7px"}},clearIcon:{color:e.palette.grey[700],fontSize:"18px"},inputRoot:{width:"100%"}})),Qk=z("span")(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.text.primary})),Zk=z("span")(({theme:e})=>({backgroundColor:e.palette.secondaryContainer,color:e.palette.text.primary,padding:e.spacing(0,.5),borderRadius:e.spacing(.5)})),Ase=({filters:e,getSearchContext:t,searchableColumnsString:n})=>{const r=t(),a=f3(r.columns)(r.searchValue),s=e.filter(l=>l.values.length>0);return w(Ne,{children:[i(F,{condition:Boolean(a),show:w(Ne,{children:[i(Qk,{children:"Searching for:"}),w("p",{children:[i(Zk,{children:a})," ",n?` in ${n}`:""]})]})}),i(F,{condition:s.length>0,show:w(Ne,{children:[i(Qk,{children:"Filtering by:"}),s.map(l=>w("p",{children:[i(Zk,{children:l.values.join(",")})," ","in ",l.header,". Options:"," ",l.options.join(", ")]},l.name))]})})]})},Nse=z("span")(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.text.primary})),e5=z("span")(({theme:e})=>({backgroundColor:e.palette.secondaryContainer,color:e.palette.text.primary,padding:e.spacing(0,.5),borderRadius:e.spacing(.5)})),$se=({filters:e,getSearchContext:t,searchableColumnsString:n})=>w(Ne,{children:[i(Nse,{children:e.length>0?"Filter your search with operators like:":`Start typing to search${n?` in ${n}`:"..."}`}),e.map(r=>w("p",{children:["Filter by ",r.header,":"," ",w(e5,{children:[r.name,":",r.options[0]]}),i(F,{condition:r.options.length>1,show:w(Ne,{children:[" or ",w(e5,{children:[r.name,":",r.options.slice(0,2).join(",")]})]})})]},r.name))]}),Pse=e=>Math.floor(Math.random()*e.length),Ose=z(yr)(({theme:e})=>({position:"absolute",width:"100%",left:0,top:"20px",zIndex:2,padding:e.spacing(4,1.5,1.5),borderBottomLeftRadius:e.spacing(1),borderBottomRightRadius:e.spacing(1),boxShadow:"0px 8px 20px rgba(33, 33, 33, 0.15)",fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary,wordBreak:"break-word"})),Dse=z(mt)(({theme:e})=>({display:"flex",gap:e.spacing(2)})),Lse=z(Ste)(({theme:e})=>({color:e.palette.text.secondary})),Mse=z(Ur)(({theme:e})=>({border:`1px dashed ${e.palette.dividerAlternative}`,margin:e.spacing(1.5,0)})),Bse=z("span")(({theme:e})=>({backgroundColor:e.palette.secondaryContainer,color:e.palette.text.primary,padding:e.spacing(0,.5),borderRadius:e.spacing(.5)})),Fse=({getSearchContext:e})=>{const t=e(),n=f.exports.useMemo(()=>Pse(t.data),[t.data]),r=m3(t.columns).map(l=>{var u,d;const c=t.data.map(p=>tg(l,p));return{name:l.filterName,header:(u=l.Header)!=null?u:l.filterName,options:[...new Set(c)].sort((p,h)=>p.localeCompare(h)),suggestedOption:(d=c[n])!=null?d:`example-${l.filterName}`,values:g3(l.filterName,t.searchValue)}}).sort((l,c)=>l.name.localeCompare(c.name)),o=t.columns.filter(l=>l.searchable&&l.accessor),a=o.map(l=>{var c;return(c=l.Header)!=null?c:l.accessor}).join(", "),s=t.data.length&&o.length?tg(o[0],t.data[n]):"example-search-text";return w(Ose,{children:[w(Dse,{children:[i(Lse,{}),i(mt,{children:i(F,{condition:Boolean(t.searchValue),show:i(Ase,{filters:r,getSearchContext:e,searchableColumnsString:a}),elseShow:i($se,{filters:r,getSearchContext:e,searchableColumnsString:a})})})]}),i(Mse,{}),i(F,{condition:r.length>0,show:"Combine filters and search."}),w("p",{children:["Example:"," ",w(Bse,{children:[r.map(l=>w("span",{children:[l.name,":",l.suggestedOption," "]},l.name)),i("span",{children:s})]})]})]})},zse=()=>{const[e,t]=f.exports.useState();return f.exports.useEffect(()=>{var r;const n=((r=navigator==null?void 0:navigator.userAgentData)==null?void 0:r.platform)||(navigator==null?void 0:navigator.platform)||"unknown";t(n.toLowerCase().includes("mac")||n==="iPhone"||n==="iPad")},[]),e},t5=({key:e,modifiers:t=[],preventDefault:n=!1},r)=>{const o=zse();f.exports.useEffect(()=>{const l=c=>{if(e===c.key){if(t.includes("ctrl")){if(o){if(!c.metaKey)return}else if(!c.ctrlKey)return}t.includes("alt")&&!c.altKey||t.includes("shift")&&!c.shiftKey||(n&&c.preventDefault(),r())}};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[o,e,t,n,r]);const a=f.exports.useMemo(()=>t.map(l=>({ctrl:o?"\u2318":"Ctrl",alt:"Alt",shift:"Shift"})[l]),[o,t]);return f.exports.useMemo(()=>[...a,`${e[0].toUpperCase()}${e.slice(1)}`].join("+"),[a,e])},jn=({initialValue:e="",onChange:t,className:n,placeholder:r,hasFilters:o,disabled:a,getSearchContext:s,containerStyles:l,debounceTime:c=200})=>{const u=f.exports.useRef(),{classes:d}=Ise(),[p,h]=f.exports.useState(!1),[m,b]=f.exports.useState(e),y=ct.exports.useAsyncDebounce(t,c),g=S=>{y(S),b(S)},x=t5({modifiers:["ctrl"],key:"k",preventDefault:!0},()=>{var S,E;document.activeElement===u.current?(S=u.current)==null||S.blur():(E=u.current)==null||E.focus()});t5({key:"Escape"},()=>{var S;document.activeElement===u.current&&((S=u.current)==null||S.blur())});const v=`${r!=null?r:"Search"} (${x})`;return w("div",{className:d.container,style:l,children:[w("div",{className:it(d.search,n,"search-container"),children:[i(kS,{className:it(d.searchIcon,"search-icon")}),i(fv,{inputRef:u,placeholder:v,classes:{root:it(d.inputRoot,"input-container")},inputProps:{"aria-label":v},value:m,onChange:S=>g(S.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),disabled:a}),i("div",{className:it(d.clearContainer,"clear-container"),children:i(F,{condition:Boolean(m),show:i(wt,{title:"Clear search query",arrow:!0,children:i(Ht,{size:"small",onClick:()=>{var S;g(""),(S=u.current)==null||S.focus()},children:i(ES,{className:d.clearIcon})})})})})]}),i(F,{condition:Boolean(o)&&p,show:i(Fse,{getSearchContext:s})})]})},v3=Array(15).fill({name:"Name of the feature",description:"Short description of the feature",type:"-",createdAt:new Date(2022,1,1),project:"projectID"}),n5=[{Header:"Seen",accessor:"lastSeenAt",Cell:jv,sortType:"date",align:"center",maxWidth:85},{Header:"Type",accessor:"type",Cell:Uv,align:"center",maxWidth:85},{Header:"Name",accessor:"name",minWidth:150,Cell:d3,sortType:"alphanumeric",searchable:!0},{Header:"Created",accessor:"createdAt",Cell:wa,sortType:"date",maxWidth:150},{Header:"Project ID",accessor:"project",Cell:({value:e})=>i(bi,{title:e,to:`/projects/${e}`}),sortType:"alphanumeric",maxWidth:150,filterName:"project",searchable:!0},{Header:"State",accessor:"stale",Cell:aC,sortType:"boolean",maxWidth:120,filterName:"state",filterParsing:e=>e?"stale":"active"},{accessor:"description"}],jse={id:"createdAt"},{value:r5,setValue:Use}=Pu("FeatureToggleListTable:v1",jse),Wse=()=>{const e=pn(),t=an(e.breakpoints.down("md")),n=an(e.breakpoints.down("lg")),{features:r=[],loading:o}=GS(),[a,s]=Ls(),[l]=f.exports.useState(()=>({sortBy:[{id:a.get("sort")||r5.id,desc:a.has("order")?a.get("order")==="desc":r5.desc}],hiddenColumns:["description"],globalFilter:a.get("search")||""})),[c,u]=f.exports.useState(l.globalFilter),{data:d,getSearchText:p,getSearchContext:h}=Ou(n5,c,r),m=f.exports.useMemo(()=>(d==null?void 0:d.length)===0&&o?v3:d,[d,o]),{headerGroups:b,rows:y,prepareRow:g,state:{sortBy:x},setHiddenColumns:v}=ct.exports.useTable({columns:n5,data:m,initialState:l,sortTypes:Ar,autoResetSortBy:!1,disableSortRemove:!0,disableMultiSort:!0},ct.exports.useSortBy,ct.exports.useFlexLayout);return f.exports.useEffect(()=>{const S=["description"];n&&S.push("lastSeenAt","stale"),t&&S.push("type","createdAt"),v(S)},[v,t,n]),f.exports.useEffect(()=>{const S={};S.sort=x[0].id,x[0].desc&&(S.order="desc"),c&&(S.search=c),s(S,{replace:!0}),Use({id:x[0].id,desc:x[0].desc||!1})},[x,c,s]),w(Gt,{isLoading:o,header:i(Dt,{title:`Feature toggles (${y.length<m.length?`${y.length} of ${m.length}`:m.length})`,actions:w(Ne,{children:[i(F,{condition:!t,show:w(Ne,{children:[i(jn,{initialValue:c,onChange:u,hasFilters:!0,getSearchContext:h}),i(Dt.Divider,{})]})}),i(Fl,{component:Ct,to:"/archive",underline:"always",sx:{marginRight:2},children:"View archive"}),i(Cse,{loading:!1,filter:{query:"",project:"default"}})]}),children:i(F,{condition:t,show:i(jn,{initialValue:c,onChange:u,hasFilters:!0,getSearchContext:h})})}),children:[i(so,{value:p(c),children:i(Hs,{rows:y,headerGroups:b,prepareRow:g})}),i(F,{condition:y.length===0,show:i(F,{condition:(c==null?void 0:c.length)>0,show:w(Vt,{children:["No feature toggles found matching \u201C",c,"\u201D"]}),elseShow:i(Vt,{children:"No feature toggles available. Get started by adding a new feature toggle."})})})]})},ec=()=>{const{data:e,error:t}=Wt(Lb,Hse),n=f.exports.useCallback(()=>{Fn(Lb).catch(console.warn)},[]);return{strategies:(e==null?void 0:e.strategies)||Gse,refetchStrategies:n,loading:!t&&!e,error:t}},Hse=()=>fetch(Lb).then(rn("Strategies")).then(e=>e.json()),Vse={deprecated:!1,name:"flexibleRollout",displayName:"Gradual rollout",editable:!1,description:"Roll out to a percentage of your userbase, and ensure that the experience is the same for the user on each visit.",parameters:[{name:"rollout",type:"percentage",description:"",required:!1},{name:"stickiness",type:"string",description:"Used to defined stickiness",required:!0},{name:"groupId",type:"string",description:"",required:!0}]},Gse=[Vse],Lb=bt("api/admin/strategies"),qse=bt("api/admin/metrics/applications"),y3=(e={})=>{const t=async()=>fetch(qse,{method:"GET"}).then(rn("Applications data")).then(c=>c.json()),n="api/admin/metrics/applications",{data:r,error:o}=Wt(n,t,V({},e)),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(n)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{applications:(r==null?void 0:r.applications)||[],error:o,loading:a,refetchApplications:l,APPLICATIONS_CACHE_KEY:n}},Yse="_truncate_h6uff_2",Kse="_fullwidth_h6uff_8",Xse="_sectionPadding_h6uff_12",Jse="_horisontalScroll_h6uff_16",Qse="_listLink_h6uff_25",Zse="_hideLt920_h6uff_37",ele="_hideLt600_h6uff_42",tle="_dataTableHeader_h6uff_46",nle="_titleText_h6uff_51",rle="_actions_h6uff_56",ole="_switchWithLabel_h6uff_60",ale="_label_h6uff_63",ile="_emptyState_h6uff_72",sle="_toggleName_h6uff_80",lle="_toolbar_h6uff_85",cle="_toolbarButton_h6uff_91",ule="_error_h6uff_98",dle="_headerTitle_h6uff_102",ple="_listItem_h6uff_107",fle="_section_h6uff_12",hle="_contentPadding_h6uff_115",mle="_contentSpacing_h6uff_119",gle="_searchField_h6uff_123";var Il={truncate:Yse,fullwidth:Kse,sectionPadding:Xse,horisontalScroll:Jse,listLink:Qse,hideLt920:Zse,hideLt600:ele,dataTableHeader:tle,titleText:nle,actions:rle,switchWithLabel:ole,label:ale,switch:"_switch_h6uff_60",emptyState:ile,toggleName:sle,toolbar:lle,toolbarButton:cle,error:ule,headerTitle:dle,listItem:ple,section:fle,contentPadding:hle,contentSpacing:mle,searchField:gle};const iC=({apps:e})=>i(Po,{children:i(F,{condition:e.length>0,show:e.map(({appName:t,description:n,icon:r})=>w(Rn,{className:Il.listItem,children:[i(ps,{children:i(_u,{children:i(F,{condition:r,show:i(S4,{children:r}),elseShow:i(hte,{})},`avatar_conditional_${t}`)})}),i(dn,{primary:i(Ct,{to:`/applications/${t}`,className:[Il.listLink,Il.truncate].join(" "),children:t}),secondary:n||"No description"})]},t))})});iC.propTypes={apps:Vo.array.isRequired};Vo.string,Vo.any;Vo.string,Vo.func.isRequired,Vo.string;Vo.string,Vo.object;const vle=hr.forwardRef((a,o)=>{var s=a,{icon:e,label:t,disabled:n}=s,r=en(s,["icon","label","disabled"]);return w(_r,ee(V({disabled:n,style:{display:"flex",alignItems:"center"}},r),{children:[i(e,{}),t]}))});vle.propTypes={icon:Vo.object,label:Vo.string,disabled:Vo.bool};const yle="_deprecated_nqviu_10",ble="_formButtons_nqviu_14",xle="_header_nqviu_18",wle="_formContainer_nqviu_32",Sle="_inset_nqviu_38",Cle="_parameter_menu_nqviu_42",Ele="_listcontainer_nqviu_52",Tle="_listItem_nqviu_56";var Rle={"non-style-button":"_non-style-button_nqviu_1",deprecated:yle,formButtons:ble,header:xle,formContainer:wle,inset:Sle,parameter_menu:Cle,listcontainer:Ele,listItem:Tle};const kle=({toggles:e})=>i(Po,{style:{textAlign:"left"},className:Il.truncate,children:i(F,{condition:e.length>0,show:e.map(({name:t,description:n="-",enabled:r})=>w(Rn,{children:[i(ps,{children:i(F,{condition:Boolean(r),show:i(wt,{title:"Enabled",arrow:!0,children:i(Ote,{"aria-hidden":!1})}),elseShow:i(wt,{title:"Disabled",arrow:!0,children:i(Pte,{"aria-hidden":!1})})})}),i(dn,{primary:i(Ct,{to:`/features/view/${t}`,children:t},t),secondary:n})]},t))})}),_le=({strategy:e,applications:t,toggles:n})=>{const r=pn(),{parameters:o=[]}=e,a=s=>s.length>0?s.map(({name:l,type:c,description:u,required:d},p)=>w(Rn,{children:[i(F,{condition:d,show:i(ps,{children:i(wt,{title:"Required parameter",arrow:!0,children:i(io,{"aria-hidden":!1})})}),elseShow:i(ps,{children:i(wt,{title:"Optional parameter",arrow:!0,children:i(Dte,{"aria-hidden":!1})})})}),i(dn,{primary:w("div",{children:[l," ",w("small",{children:["(",c,")"]})]}),secondary:u})]},`${l}-${p}`)):i(Rn,{children:"No params"});return i("div",{className:Rle.listcontainer,children:w(de,{container:!0,children:[i(F,{condition:e.deprecated,show:i(de,{item:!0,children:i("h5",{style:{color:r.palette.error.main},children:"Deprecated"})})}),w(de,{item:!0,sm:12,md:12,children:[i("h6",{children:"Parameters"}),i("hr",{}),i(Po,{children:a(o)})]}),w(de,{item:!0,sm:12,md:6,children:[i("h6",{children:"Applications using this strategy"}),i("hr",{}),i(iC,{apps:t})]}),w(de,{item:!0,sm:12,md:6,children:[i("h6",{children:"Toggles using this strategy"}),i("hr",{}),i(kle,{toggles:n})]})]})})},Wv=r=>{var o=r,{title:e,children:t}=o,n=en(o,["title","children"]);return e?i(wt,ee(V({},n),{title:e,arrow:!0,children:t})):t},Mb="Access denied",Hv=(e,t)=>e?t:t?`${t} (${Mb})`:Mb,Ft=l=>{var c=l,{permission:e,projectId:t,children:n,environmentId:r,tooltipProps:o,disabled:a}=c,s=en(c,["permission","projectId","children","environmentId","tooltipProps","disabled"]);const{hasAccess:u}=f.exports.useContext(Jt),d=ga();let p;return t&&r?p=u(e,t,r):t?p=u(e,t):p=u(e),i(Wv,ee(V({},o),{title:Hv(p,o==null?void 0:o.title),arrow:!0,onClick:h=>h.preventDefault(),children:i("div",{id:d,children:i(Ht,ee(V({},s),{disabled:!p||a,"aria-labelledby":d,size:"large",children:n}))})}))},Ile=e=>tL()[e],Ve=e=>{const t=Ile(e);if(!t)throw new Error(`Missing required path param: ${e}`);return t},Ale=()=>{const e=Ve("name"),{strategies:t}=ec(),{features:n=[]}=GS(),{applications:r}=y3(),o=Ye(),a=n.filter(c=>{var u;return(u=c==null?void 0:c.strategies)==null?void 0:u.find(d=>d.name===e)}),s=t.find(c=>c.name===e),l=()=>{o(`/strategies/${e}/edit`)};return s?i(Gt,{header:i(Dt,{title:s==null?void 0:s.name,subtitle:s==null?void 0:s.description,actions:i(F,{condition:s.editable,show:i(Ft,{permission:Bv,"data-loading":!0,onClick:l,tooltipProps:{title:"Edit strategy"},children:i(ar,{})})})}),children:i(de,{container:!0,children:i(de,{item:!0,xs:12,sm:12,children:i(_le,{strategy:s,toggles:a,applications:r})})})}):null},b3=le()(e=>({container:{display:"flex",justifyContent:"center",alignItems:"center",padding:e.spacing(0,1.5)},divider:{borderColor:e.palette.dividerAlternative,height:e.spacing(3),margin:e.spacing(0,2)}})),Nle=()=>{const{classes:e}=b3();return i(Ur,{className:e.divider,orientation:"vertical",variant:"middle"})},x3=({children:e})=>{const{classes:t}=b3();return i(mt,{className:t.container,children:e})};x3.Divider=Nle;const Lo=x3,$le=le()(e=>({dialogTitle:{backgroundColor:e.palette.dialogHeaderBackground,color:e.palette.dialogHeaderText,height:"150px",padding:"2rem 3rem",clipPath:" ellipse(130% 115px at 120% 20%)"},dialogContentPadding:{padding:"2rem 3rem"}})),ln=({children:e,open:t,onClick:n,onClose:r,title:o,primaryButtonText:a,disabledPrimaryButton:s=!1,secondaryButtonText:l,maxWidth:c="sm",fullWidth:u=!1,formId:d,permissionButton:p})=>{const{classes:h}=$le(),m=d?b=>{b.preventDefault(),n&&n(b)}:n;return w(AG,{open:t,onClose:r,fullWidth:u,"aria-labelledby":"simple-modal-title","aria-describedby":"simple-modal-description",maxWidth:c,children:[i(XG,{className:h.dialogTitle,children:o}),i(F,{condition:Boolean(e),show:i(VG,{className:h.dialogContentPadding,children:e})}),w(LG,{children:[i(F,{condition:Boolean(p),show:p,elseShow:i(F,{condition:Boolean(n),show:i(nt,{form:d,color:"primary",variant:"contained",onClick:m,autoFocus:!d,disabled:s,"data-testid":qne,type:d?"submit":"button",children:a||"Yes, I'm sure"})})}),i(F,{condition:Boolean(r),show:i(nt,{onClick:r,children:l||"No, take me back"})})]})]})};var sC={},Ple=yn.exports;Object.defineProperty(sC,"__esModule",{value:!0});var w3=sC.default=void 0,Ole=Ple(bn),Dle=Cn,Lle=(0,Ole.default)((0,Dle.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}),"LocationOn");w3=sC.default=Lle;var lC={},Mle=yn.exports;Object.defineProperty(lC,"__esModule",{value:!0});var S3=lC.default=void 0,Ble=Mle(bn),Fle=Cn,zle=(0,Ble.default)((0,Fle.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"}),"People");S3=lC.default=zle;var cC={},jle=yn.exports;Object.defineProperty(cC,"__esModule",{value:!0});var C3=cC.default=void 0,Ule=jle(bn),Wle=Cn,Hle=(0,Ule.default)((0,Wle.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");C3=cC.default=Hle;var uC={},Vle=yn.exports;Object.defineProperty(uC,"__esModule",{value:!0});var E3=uC.default=void 0,Gle=Vle(bn),qle=Cn,Yle=(0,Gle.default)((0,qle.jsx)("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}),"Code");E3=uC.default=Yle;const Kle=e=>f.exports.createElement("svg",V({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.584 10H22a2 2 0 1 1 0 4h-5.416a5.001 5.001 0 0 1-9.168 0H2a2 2 0 1 1 0-4h5.416a5.001 5.001 0 0 1 9.168 0Z"})),tc=e=>{var t;return(t=Jle[e])!=null?t:e},Xle=e=>i(yb,ee(V({},e),{component:t=>i(Kle,V({},t)),inheritViewBox:!0})),zp=e=>{switch(e){case"default":return eC;case"remoteAddress":return C3;case"flexibleRollout":return Xle;case"userWithId":return S3;case"applicationHostname":return w3;default:return E3}},Jle={applicationHostname:"Hosts",default:"Standard",flexibleRollout:"Gradual rollout",gradualRolloutRandom:"Randomized",gradualRolloutSessionId:"Sessions",gradualRolloutUserId:"Users",remoteAddress:"IPs",userWithId:"UserIDs"},Cr=({handleBadRequest:e,handleNotFound:t,handleForbidden:n,handleUnauthorized:r,propagateErrors:o=!1})=>{const[a,s]=f.exports.useState({}),[l,c]=f.exports.useState(!1),u=f.exports.useCallback(async(h,m)=>{var b;if(h.status===Iv){if(e)return e(s,h,m);if(s(y=>ee(V({},y),{badRequest:"Bad request format"})),o){const y=await h.json();throw new $S(h.status,y)}}if(h.status===SS){if(t)return t(s,h,m);if(s(y=>ee(V({},y),{notFound:"Could not find the requested resource"})),o)throw new Ov(h.status)}if(h.status===CS){if(r)return r(s,h,m);if(s(y=>ee(V({},y),{unauthorized:Mb})),o)throw new NS(h.status)}if(h.status===h$){if(n)return n(s,h,m);if(s(y=>ee(V({},y),{forbidden:"This operation is forbidden"})),o){const y=await h.json();throw new T$(h.status,y)}}if(h.status>399){const y=await h.json();if(((b=y==null?void 0:y.details)==null?void 0:b.length)>0&&o){const g=y.details[0];if(o)throw new Error(g.message||g.msg);return g}if((y==null?void 0:y.length)>0&&o){const g=y[0];throw new Error(g.message||g.msg)}if(o)throw new Error("Action could not be performed")}},[e,n,t,r,o]),d=f.exports.useCallback(async(h,m,b=!0)=>{b&&c(!0);try{const y=await h();return c(!1),y.status>299&&await u(y,m),y.status===Av&&s({}),y}catch(y){throw c(!1),y}},[u]),p=f.exports.useCallback((h,m,b="")=>{const y={headers:qm,credentials:"include"};return{caller:()=>fetch(bt(h),V(V({},y),m)),id:b}},[]);return{loading:l,makeRequest:d,createRequest:p,errors:a}},md="api/admin/strategies",dC=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0}),o=f.exports.useCallback(async u=>{const d=t(md,{method:"POST",body:JSON.stringify(u)});return e(d.caller,d.id)},[t,e]),a=f.exports.useCallback(async u=>{const d=`${md}/${u.name}`,p=t(d,{method:"PUT",body:JSON.stringify(u)});try{return await e(p.caller,p.id)}catch(h){throw h}},[t,e]),s=f.exports.useCallback(async u=>{const d=`${md}/${u.name}`,p=t(d,{method:"DELETE"});try{return await e(p.caller,p.id)}catch(h){throw h}},[t,e]),l=f.exports.useCallback(async u=>{const d=`${md}/${u.name}/deprecate`,p=t(d,{method:"POST"});try{return await e(p.caller,p.id)}catch(h){throw h}},[t,e]),c=f.exports.useCallback(async u=>{const d=`${md}/${u.name}/reactivate`,p=t(d,{method:"POST"});try{return await e(p.caller,p.id)}catch(h){throw h}},[t,e]);return{createStrategy:o,updateStrategy:a,removeStrategy:s,deprecateStrategy:l,reactivateStrategy:c,errors:n,loading:r}},tt=()=>{const{setToast:e}=f.exports.useContext(Ws),t=()=>e(o=>ee(V({},o),{show:!1})),n=f.exports.useCallback((o,a)=>{e(V({title:"Something went wrong",text:o,type:"error",show:!0,autoHideDuration:12e3},a))},[e]);return{setToastData:f.exports.useCallback(o=>{o.persist?e(ee(V({},o),{show:!0})):e(ee(V({},o),{show:!0,autoHideDuration:6e3}))},[e]),setToastApiError:n,hideToast:t}},Mr=d=>{var p=d,{permission:e,variant:t="contained",color:n="primary",onClick:r,children:o,disabled:a,projectId:s,environmentId:l,tooltipProps:c}=p,u=en(p,["permission","variant","color","onClick","children","disabled","projectId","environmentId","tooltipProps"]);const{hasAccess:h}=f.exports.useContext(Jt),m=ga();let b;return b=(()=>{let g;return Array.isArray(e)?g=e.some(x=>s&&l?h(x,s,l):s?h(x,s):h(x)):s&&l?g=h(e,s,l):s?g=h(e,s):g=h(e),g})(),i(Wv,ee(V({},c),{title:Hv(b,c==null?void 0:c.title),arrow:!0,children:i("span",{id:m,children:i(nt,ee(V({onClick:r,disabled:a||!b,"aria-labelledby":m,variant:t,color:n},u),{endIcon:i(F,{condition:!b,show:i($v,{titleAccess:"Locked"})}),children:o}))})}))},Qle=()=>{const e=an("(max-width:700px)"),t=Ye();return i(F,{condition:e,show:i(Ft,{"data-testid":Tk,onClick:()=>t("/strategies/create"),permission:Ym,size:"large",tooltipProps:{title:"New strategy"},children:i(io,{})}),elseShow:i(Mr,{onClick:()=>t("/strategies/create"),color:"primary",permission:Ym,"data-testid":Tk,children:"New strategy"})})},nc=hr.forwardRef((e,t)=>{const h=e,{permission:n,tooltip:r,disabled:o,projectId:a,environmentId:s,checked:l,onChange:c}=h,u=en(h,["permission","tooltip","disabled","projectId","environmentId","checked","onChange"]),{hasAccess:d}=f.exports.useContext(Jt);let p;return a&&s?p=d(n,a,s):a?p=d(n,a):p=d(n),i(Wv,{title:Hv(p,r),arrow:!0,children:i("span",{"data-loading":!0,children:i(ro,V({onChange:c,disabled:o||!p,checked:l,ref:t},u))})})}),Zle=({deprecated:e,disabled:t,onToggle:n})=>{const r=()=>{n(e)},o=ga();return i(wt,{title:t?"You cannot disable default strategy":e?"Excluded from strategy list":"Included in strategy list",describeChild:!0,arrow:!0,children:i("div",{id:o,children:i(nc,{checked:!e,permission:Bv,onClick:r,disabled:t,inputProps:{"aria-labelledby":o}})})})},ece=({strategy:e,onClick:t})=>{const n=ga();return i(F,{condition:e==null?void 0:e.editable,show:i(Ft,{onClick:t,permission:Bv,tooltipProps:{title:"Edit strategy"},children:i(ar,{})}),elseShow:i(wt,{title:"You cannot edit a built-in strategy",arrow:!0,children:i("div",{id:n,children:i(Ht,{disabled:!0,size:"large",children:i(ar,{"aria-labelledby":n})})})})})},tce=({strategy:e,onClick:t})=>{const n=ga();return i(F,{condition:e==null?void 0:e.editable,show:i(Ft,{onClick:t,permission:doe,tooltipProps:{title:"Delete strategy"},children:i(er,{})}),elseShow:i(wt,{title:"You cannot delete a built-in strategy",arrow:!0,children:i("div",{id:n,children:i(Ht,{disabled:!0,size:"large",children:i(er,{"aria-labelledby":n})})})})})},nce=z("div")(({theme:e,color:t="neutral",icon:n})=>({display:"inline-flex",alignItems:"center",padding:e.spacing(n?.375:.625,1),borderRadius:e.shape.borderRadius,fontSize:e.fontSizes.smallerBody,fontWeight:e.fontWeight.bold,lineHeight:1,backgroundColor:e.palette[t].light,color:e.palette[t].dark,border:`1px solid ${e.palette[t].border}`})),rce=z("div")(({theme:e,color:t="neutral"})=>({display:"flex",color:e.palette[t].main,marginRight:e.spacing(.5)})),kf=f.exports.forwardRef((l,s)=>{var c=l,{color:e="neutral",icon:t,className:n,sx:r,children:o}=c,a=en(c,["color","icon","className","sx","children"]);return w(nce,ee(V({color:e,icon:t,className:n,sx:r},a),{ref:s,children:[i(F,{condition:Boolean(t),show:i(rce,{color:e,children:i(F,{condition:Boolean(t==null?void 0:t.props.sx),show:t,elseShow:()=>f.exports.cloneElement(t,{sx:{fontSize:"16px"}})})})}),o]}))}),oce=z(kf)(({theme:e})=>({marginLeft:e.spacing(1),display:"inline-block"})),ace=()=>{const e=Ye(),[t,n]=f.exports.useState({show:!1,title:"",onConfirm:()=>{}}),{strategies:r,refetchStrategies:o,loading:a}=ec(),{removeStrategy:s,deprecateStrategy:l,reactivateStrategy:c}=dC(),{setToastData:u,setToastApiError:d}=tt(),p=f.exports.useMemo(()=>a?Array(5).fill({name:"Context name",description:"Context description when loading"}):r.map(({name:k,description:I,editable:O,deprecated:L})=>({name:k,description:I,editable:O,deprecated:L})),[r,a]),h=f.exports.useCallback(k=>I=>{n(I?{show:!0,title:"Really reactivate strategy?",onConfirm:async()=>{try{await c(k),o(),u({type:"success",title:"Success",text:"Strategy reactivated successfully"})}catch(O){d(Ue(O))}}}:{show:!0,title:"Really deprecate strategy?",onConfirm:async()=>{try{await l(k),o(),u({type:"success",title:"Success",text:"Strategy deprecated successfully"})}catch(O){d(Ue(O))}}})},[l,c,o,d,u]),m=f.exports.useCallback(k=>{n({show:!0,title:"Really delete strategy?",onConfirm:async()=>{try{await s(k),o(),u({type:"success",title:"Success",text:"Strategy deleted successfully"})}catch(I){d(Ue(I))}}})},[s,o,d,u]),b=f.exports.useCallback(k=>{e(`/strategies/${k.name}/edit`)},[e]),y=f.exports.useMemo(()=>[{id:"Icon",Cell:()=>i(mt,{"data-loading":!0,sx:{pl:3,pr:1,display:"flex",alignItems:"center"},children:i(x$,{color:"disabled"})}),disableGlobalFilter:!0},{Header:"Name",accessor:"name",width:"90%",Cell:({row:{original:{name:k,description:I,deprecated:O,editable:L}}})=>{const q=O?`${I} (deprecated)`:I;return i(bi,{"data-loading":!0,title:tc(k),subtitle:q,to:`/strategies/${k}`,children:i(F,{condition:!L,show:()=>i(oce,{color:"success",children:"Predefined"})})})},sortType:"alphanumeric"},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:k}})=>w(Lo,{children:[i(Zle,{deprecated:k.deprecated,onToggle:h(k),disabled:k.name==="default"}),i(Lo.Divider,{}),i(ece,{strategy:k,onClick:()=>b(k)}),i(tce,{strategy:k,onClick:()=>m(k)})]}),width:150,disableGlobalFilter:!0,disableSortBy:!0},{accessor:"description",disableSortBy:!0},{accessor:"sortOrder",disableGlobalFilter:!0,sortType:"number"}],[h,b,m]),g=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}],hiddenColumns:["description","sortOrder"]}),[]),{getTableProps:x,getTableBodyProps:v,headerGroups:S,rows:E,prepareRow:R,state:{globalFilter:A},setGlobalFilter:_}=ct.exports.useTable({columns:y,data:p,initialState:g,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useSortBy),N=()=>{t==null||t.onConfirm(),n(k=>ee(V({},k),{show:!1}))};return w(Gt,{isLoading:a,header:i(Dt,{title:"Strategies",actions:w(Ne,{children:[i(jn,{initialValue:A,onChange:_}),i(Dt.Divider,{}),i(Qle,{})]})}),children:[i(so,{value:A,children:w(xa,ee(V({},x()),{children:[i(Mo,{headerGroups:S}),i(bo,ee(V({},v()),{children:E.map(k=>(R(k),i(Vr,ee(V({hover:!0},k.getRowProps()),{children:k.cells.map(I=>i(Zo,ee(V({},I.getCellProps()),{children:I.render("Cell")})))}))))}))]}))}),i(F,{condition:E.length===0,show:i(F,{condition:(A==null?void 0:A.length)>0,show:w(Vt,{children:["No strategies found matching \u201C",A,"\u201D"]}),elseShow:i(Vt,{children:"No strategies available. Get started by adding one."})})}),i(ln,{open:t.show,onClick:N,title:t==null?void 0:t.title,onClose:()=>n(k=>ee(V({},k),{show:!1}))})]})},Vv=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{createTag:async c=>{const d=t("api/admin/tag-types",{method:"POST",body:JSON.stringify(c)});try{return await e(d.caller,d.id)}catch(p){throw p}},validateTagName:async c=>{const d=t("api/admin/tag-types/validate",{method:"POST",body:JSON.stringify({name:c})});try{return await e(d.caller,d.id)}catch(p){throw p}},updateTagType:async(c,u)=>{const d=`api/admin/tag-types/${c}`,p=t(d,{method:"PUT",body:JSON.stringify(u)});try{return await e(p.caller,p.id)}catch(h){throw h}},deleteTagType:async c=>{const u=`api/admin/tag-types/${c}`,d=t(u,{method:"DELETE"});try{return await e(d.caller,d.id)}catch(p){throw p}},errors:n,loading:r}},pC=(e={})=>{const t=async()=>{const c=bt("api/admin/tag-types");return(await fetch(c,{method:"GET"}).then(rn("Tag types"))).json()},n="api/admin/tag-types",{data:r,error:o}=Wt(n,t,e),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(n)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{tagTypes:(r==null?void 0:r.tagTypes)||[],error:o,loading:a,refetch:l}},ice=()=>{const e=Ye(),t=an("(max-width:700px)");return i(F,{condition:t,show:i(Ft,{onClick:()=>e("/tag-types/create"),size:"large",permission:Mp,children:i(io,{})}),elseShow:i(Mr,{permission:Mp,onClick:()=>e("/tag-types/create"),children:"New tag type"})})},sce=()=>{const[e,t]=f.exports.useState({open:!1}),n=Ye(),{deleteTagType:r}=Vv(),{tagTypes:o,refetch:a,loading:s}=pC(),{setToastData:l,setToastApiError:c}=tt(),u=f.exports.useMemo(()=>s?Array(5).fill({name:"Tag type name",description:"Tag type description when loading"}):o.map(({name:E,description:R})=>({name:E,description:R})),[o,s]),d=f.exports.useMemo(()=>[{id:"Icon",Cell:()=>i(mt,{"data-loading":!0,sx:{pl:2,pr:1,display:"flex",alignItems:"center"},children:i(RS,{color:"disabled"})}),disableGlobalFilter:!0},{Header:"Name",accessor:"name",width:"90%",Cell:({row:{original:{name:E,description:R}}})=>i(bi,{"data-loading":!0,title:E,subtitle:R}),sortType:"alphanumeric"},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:E}})=>w(mt,{sx:{display:"flex",justifyContent:"flex-end"},"data-loading":!0,children:[i(Ft,{onClick:()=>n(`/tag-types/edit/${E.name}`),permission:Mp,tooltipProps:{title:"Edit tag type"},children:i(ar,{})}),i(Ft,{permission:foe,tooltipProps:{title:"Delete tag type"},onClick:()=>t({open:!0,name:E.name}),children:i(er,{})})]}),width:150,disableGlobalFilter:!0,disableSortBy:!0},{accessor:"description",disableSortBy:!0}],[n]),p=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}],hiddenColumns:["description"]}),[]),{getTableProps:h,getTableBodyProps:m,headerGroups:b,rows:y,prepareRow:g,state:{globalFilter:x},setGlobalFilter:v}=ct.exports.useTable({columns:d,data:u,initialState:p,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useSortBy),S=async()=>{try{e.name&&(await r(e.name),a(),t({open:!1}),l({type:"success",show:!0,title:"Successfully deleted tag type."}))}catch(E){c(Ue(E))}};return w(Gt,{isLoading:s,header:i(Dt,{title:"Tag types",actions:w(Ne,{children:[i(jn,{initialValue:x,onChange:v}),i(Dt.Divider,{}),i(ice,{})]})}),children:[i(so,{value:x,children:w(xa,ee(V({},h()),{children:[i(Mo,{headerGroups:b}),i(bo,ee(V({},m()),{children:y.map(E=>(g(E),i(Vr,ee(V({hover:!0},E.getRowProps()),{children:E.cells.map(R=>i(Zo,ee(V({},R.getCellProps()),{children:R.render("Cell")})))}))))}))]}))}),i(F,{condition:y.length===0,show:i(F,{condition:(x==null?void 0:x.length)>0,show:w(Vt,{children:["No tags found matching \u201C",x,"\u201D"]}),elseShow:i(Vt,{children:"No tags available. Get started by adding one."})})}),i(ln,{title:"Really delete Tag type?",open:e.open,onClick:S,onClose:()=>{t({open:!1})}})]})},Gv=(e={})=>{const t=async()=>{const c=bt("api/admin/addons");return(await fetch(c,{method:"GET"}).then(rn("Addons"))).json()},n="api/admin/addons",{data:r,error:o}=Wt(n,t,e),[a,s]=f.exports.useState(!o&&!r),l=f.exports.useCallback(()=>{Fn(n)},[n]);return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{addons:(r==null?void 0:r.addons)||[],providers:(r==null?void 0:r.providers)||[],error:o,loading:a,refetchAddons:l}},T3=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0}),o="api/admin/addons",a=async c=>{const d=t(o,{method:"POST",body:JSON.stringify(c)});return e(d.caller,d.id)},s=async c=>{const u=`${o}/${c}`,d=t(u,{method:"DELETE"});return await e(d.caller,d.id)},l=f.exports.useCallback(async c=>{const u=`${o}/${c.id}`,d=t(u,{method:"PUT",body:JSON.stringify(c)});return e(d.caller,d.id)},[t,e]);return{createAddon:a,updateAddon:l,removeAddon:s,errors:n,loading:r}},rc=({icon:e})=>i(mt,{sx:{pl:2,pr:1,display:"flex",alignItems:"center"},children:e});var R3="/static/slack.c0af31c6.svg",k3="/static/jira.d9eb9af9.svg",_3="/static/webhooks.ffa904ac.svg",lce="/static/teams.62e72076.svg",cce="/static/datadog.591b6a73.svg";const gd={width:"32.5px",height:"32.5px",marginRight:"16px"},I3=({name:e})=>{switch(e){case"slack":return i("img",{style:gd,alt:"Slack logo",src:Xa(R3)});case"jira-comment":return i("img",{style:gd,alt:"JIRA logo",src:Xa(k3)});case"webhook":return i("img",{style:gd,alt:"Generic Webhook logo",src:Xa(_3)});case"teams":return i("img",{style:gd,alt:"Microsoft Teams logo",src:Xa(lce)});case"datadog":return i("img",{style:gd,alt:"Datadog logo",src:Xa(cce)});default:return i(_u,{children:i(wte,{})})}},A3=e=>{const[t,n]=f.exports.useState(e),r=f.exports.useCallback(()=>n(e),[e]);return f.exports.useEffect(()=>{n(e)},[e]),[t,n,r]},uce=({toggleAddon:e,setShowDelete:t,setDeletedAddon:n,original:r})=>{const o=Ye(),[a,s,l]=A3(r.enabled),c=()=>{s(!a),e(r).catch(l)};return w(Lo,{children:[i(wt,{title:a?`Disable addon ${r.provider}`:`Enable addon ${r.provider}`,arrow:!0,describeChild:!0,children:i(nc,{permission:Pk,checked:a,onClick:c})}),i(Lo.Divider,{}),i(Ft,{permission:Pk,tooltipProps:{title:"Edit Addon"},onClick:()=>o(`/addons/edit/${r.id}`),children:i(ar,{})}),i(Ft,{permission:moe,tooltipProps:{title:"Remove Addon"},onClick:()=>{n(r),t(!0)},children:i(er,{})})]})},dce=()=>{const{refetchAddons:e,addons:t,loading:n}=Gv(),{updateAddon:r,removeAddon:o}=T3(),{setToastData:a,setToastApiError:s}=tt(),[l,c]=f.exports.useState(!1),[u,d]=f.exports.useState({id:0,provider:"",description:"",enabled:!1,events:[],parameters:{}}),p=f.exports.useMemo(()=>n?Array(5).fill({name:"Addon name",description:"Addon description when loading"}):t.map(A=>V({},A)),[t,n]),h=f.exports.useCallback(async A=>{try{await r(ee(V({},A),{enabled:!A.enabled})),e(),a({type:"success",title:"Success",text:A.enabled?"Addon is now disabled":"Addon is now enabled"})}catch(_){throw s(Ue(_)),_}},[s,e,a,r]),m=f.exports.useMemo(()=>[{id:"Icon",Cell:({row:{original:{provider:A}}})=>i(rc,{icon:i(I3,{name:A})})},{Header:"Name",accessor:"provider",width:"90%",Cell:({row:{original:{provider:A,description:_}}})=>i(bi,{"data-loading":!0,title:A,subtitle:_}),sortType:"alphanumeric"},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:A}})=>i(uce,{setShowDelete:c,toggleAddon:h,setDeletedAddon:d,original:A}),width:150,disableSortBy:!0},{accessor:"description",disableSortBy:!0}],[h]),b=f.exports.useMemo(()=>({sortBy:[{id:"provider",desc:!1}],hiddenColumns:["description"]}),[]),{getTableProps:y,getTableBodyProps:g,headerGroups:x,rows:v,prepareRow:S,state:{globalFilter:E}}=ct.exports.useTable({columns:m,data:p,initialState:b,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useSortBy),R=async A=>{try{await o(A.id),e(),a({type:"success",title:"Success",text:"Deleted addon successfully"})}catch(_){s(Ue(_))}};return w(Gt,{isLoading:n,header:i(Dt,{title:"Configured addons"}),sx:A=>({marginBottom:A.spacing(2)}),children:[w(xa,ee(V({},y()),{children:[i(Mo,{headerGroups:x}),i(bo,ee(V({},g()),{children:v.map(A=>(S(A),i(Vr,ee(V({hover:!0},A.getRowProps()),{children:A.cells.map(_=>i(Zo,ee(V({},_.getCellProps()),{padding:"none",children:_.render("Cell")})))}))))}))]})),i(F,{condition:v.length===0,show:i(F,{condition:(E==null?void 0:E.length)>0,show:w(Vt,{children:["No addons found matching \u201C",E,"\u201D"]}),elseShow:i(Vt,{children:"No addons configured"})})}),i(ln,{open:l,onClick:()=>{R(u),c(!1)},onClose:()=>{c(!1)},title:"Confirm deletion",children:i("div",{children:"Are you sure you want to delete this Addon?"})})]})},pce=({name:e})=>{const t=Ye();return i(Mr,{permission:hoe,variant:"outlined",onClick:()=>t(`/addons/create/${e}`),children:"Configure"})},fce=({providers:e,loading:t})=>{const n=f.exports.useMemo(()=>t?Array(5).fill({name:"Provider name",description:"Provider description when loading"}):e.map(({name:p,displayName:h,description:m})=>({name:p,displayName:h,description:m})),[e,t]),r=f.exports.useMemo(()=>[{id:"Icon",Cell:({row:{original:{name:p}}})=>i(rc,{icon:i(I3,{name:p})})},{Header:"Name",accessor:"name",width:"90%",Cell:({row:{original:{name:p,description:h}}})=>i(bi,{"data-loading":!0,title:p,subtitle:h}),sortType:"alphanumeric"},{id:"Actions",align:"center",Cell:({row:{original:p}})=>i(Lo,{children:i(pce,{name:p.name})}),width:150,disableSortBy:!0},{accessor:"description",disableSortBy:!0}],[]),o=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}],hiddenColumns:["description"]}),[]),{getTableProps:a,getTableBodyProps:s,headerGroups:l,rows:c,prepareRow:u,state:{globalFilter:d}}=ct.exports.useTable({columns:r,data:n,initialState:o,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useSortBy);return w(Gt,{isLoading:t,header:i(Dt,{title:"Available addons"}),children:[w(xa,ee(V({},a()),{children:[i(Mo,{headerGroups:l}),i(bo,ee(V({},s()),{children:c.map(p=>(u(p),i(Vr,ee(V({hover:!0},p.getRowProps()),{children:p.cells.map(h=>i(Zo,ee(V({},h.getCellProps()),{children:h.render("Cell")})))}))))}))]})),i(F,{condition:c.length===0,show:i(F,{condition:(d==null?void 0:d.length)>0,show:w(Vt,{children:["No providers found matching \u201C",d,"\u201D"]}),elseShow:i(Vt,{children:"No providers available."})})})]})},hce=()=>{const{providers:e,addons:t,loading:n}=Gv();return w(Ne,{children:[i(F,{condition:t.length>0,show:i(dce,{})}),i(fce,{loading:n,providers:e})]})},N3=()=>i(Yi,{to:"/admin/users",replace:!0});N3.propTypes={match:Vo.object.isRequired,history:Vo.object.isRequired};const Du=()=>i(yt,{severity:"error",children:"You need instance admin to access this section."}),$3=(e={})=>{const t=bt("api/admin/api-tokens"),{data:n,error:r,mutate:o}=Wt(t,mce,e),a=f.exports.useMemo(()=>n!=null?n:[],[n]),s=f.exports.useCallback(()=>{o().catch(console.warn)},[o]);return{tokens:a,error:r,loading:!r&&!n,refetch:s}},mce=async e=>(await(await fetch(e).then(rn("Api tokens"))).json()).tokens,gce=()=>{const{uiConfig:e}=st();return w(yt,{severity:"info",children:[w("p",{children:["Read the"," ",i("a",{href:"https://docs.getunleash.io/sdks",target:"_blank",rel:"noreferrer",children:"SDK overview"})," ","to connect Unleash to your application. Please note it can take up to ",i("strong",{children:"1 minute"})," before a new API key is activated."]}),i("br",{}),i("strong",{children:"API URL: "})," ",w("pre",{style:{display:"inline"},children:[e.unleashUrl,"/api/"]})]})},oc=u=>{var d=u,{Icon:e,onClick:t,maxWidth:n,disabled:r=!1,children:o,permission:a,environmentId:s,projectId:l}=d,c=en(d,["Icon","onClick","maxWidth","disabled","children","permission","environmentId","projectId"]);const p=an(`(max-width:${n})`);return i(F,{condition:p,show:i(Ft,ee(V({disabled:r,onClick:t,permission:a,projectId:l,environmentId:s,"data-loading":!0},c),{children:i(e,{})})),elseShow:i(Mr,ee(V({onClick:t,permission:a,projectId:l,color:"primary",variant:"contained",disabled:r,environmentId:s,"data-loading":!0},c),{children:o}))})},vce=()=>{const e=Ye();return i(oc,{Icon:io,onClick:()=>e("/admin/api/create-token"),"data-testid":mne,permission:goe,maxWidth:"700px",children:"New API token"})};var yce=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},bce=yce,o5={"text/plain":"Text","text/html":"Url",default:"Text"},xce="Copy to clipboard: #{key}, Enter";function wce(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Sce(e,t){var n,r,o,a,s,l,c=!1;t||(t={}),n=t.debug||!1;try{o=bce(),a=document.createRange(),s=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(d){if(d.stopPropagation(),t.format)if(d.preventDefault(),typeof d.clipboardData=="undefined"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=o5[t.format]||o5.default;window.clipboardData.setData(p,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),s.addRange(a);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=wce("message"in t?t.message:xce),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(a):s.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var fC=Sce;const Cce=({token:e})=>{const{setToastData:t}=tt(),n=r=>{fC(r)&&t({type:"success",title:"Token copied to clipboard"})};return i(wt,{title:"Copy token",arrow:!0,children:i(Ht,{onClick:()=>n(e.secret),size:"large",children:i(Nv,{})})})},P3=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{deleteToken:async s=>{const l=`api/admin/api-tokens/${s}`,c=t(l,{method:"DELETE"});try{return await e(c.caller,c.id)}catch(u){throw u}},createToken:async s=>{const c=t("api/admin/api-tokens",{method:"POST",body:JSON.stringify(s)});try{return await e(c.caller,c.id)}catch(u){throw u}},errors:n,loading:r}},Ece=({token:e})=>{const{hasAccess:t}=f.exports.useContext(Jt),{deleteToken:n}=P3(),[r,o]=f.exports.useState(!1),{setToastData:a}=tt(),{refetch:s}=$3(),l=async()=>{await n(e.secret),o(!1),s(),a({type:"success",title:"API token removed"})};return w(Ne,{children:[i(F,{condition:t(voe),show:i(wt,{title:"Delete token",arrow:!0,children:i(Ht,{onClick:()=>o(!0),size:"large",children:i(er,{})})})}),i(ln,{open:r,onClick:l,onClose:()=>o(!1),title:"Confirm deletion",children:w("div",{children:["Are you sure you want to delete the following API token?",i("br",{}),w("ul",{children:[w("li",{children:[i("strong",{children:"username"}),":"," ",i("code",{children:e.username})]}),w("li",{children:[i("strong",{children:"type"}),": ",i("code",{children:e.type})]})]})]})})]})},Tce=z(Ct)(()=>({textDecoration:"none","&:hover, &:focus":{textDecoration:"underline"}})),Rce=({projects:e,project:t})=>{const{searchQuery:n}=$u();let r=e&&Array.isArray(e)?e:t?[t]:[];return r.length===0?i(Bn,{children:i(Ts,{search:n,children:"*"})}):i(Bn,{children:r.map((o,a)=>w(f.exports.Fragment,{children:[a>0&&", ",!o||o==="*"?i(Ts,{search:n,children:"*"}):i(Tce,{to:`/projects/${o}`,children:i(Ts,{search:n,children:o})})]},o))})},kce=le()(e=>({container:{display:"flex",flexDirection:"column",justifyContent:"center",wordBreak:"break-word",padding:e.spacing(1,2)},title:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"1",lineClamp:"1"},subtitle:{color:e.palette.text.secondary,overflow:"hidden",textOverflow:"ellipsis",fontSize:"inherit",WebkitLineClamp:"1",lineClamp:"1",display:"-webkit-box",WebkitBoxOrient:"vertical"}})),Wr=({value:e,subtitle:t})=>{const{searchQuery:n}=$u(),{classes:r}=kce();return w(mt,{className:r.container,children:[i("span",{className:r.title,style:{WebkitLineClamp:Boolean(t)?1:2,lineClamp:Boolean(t)?1:2},"data-loading":!0,children:i(Ts,{search:n,children:e})}),i(F,{condition:Boolean(t),show:()=>i(Te,{component:"span",className:r.subtitle,"data-loading":!0,children:i(Ts,{search:n,children:t})})})]})},jp=(e,t,n)=>{f.exports.useEffect(()=>{e(n?t:[])},[e,t,n])},_ce=["Icon","createdAt"],Ice=["projects","environment"],Ace=()=>{const{tokens:e,loading:t}=$3(),n=f.exports.useMemo(()=>({sortBy:[{id:"createdAt"}]}),[]),{uiConfig:r}=st(),o=an(oo.breakpoints.down("md")),{getTableProps:a,getTableBodyProps:s,headerGroups:l,rows:c,prepareRow:u,state:{globalFilter:d},setGlobalFilter:p,setHiddenColumns:h}=ct.exports.useTable({columns:Nce,data:e,initialState:n,sortTypes:Ar,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useSortBy);return jp(h,_ce,o),jp(h,Ice,!r.flags.E),w(Gt,{header:i(Dt,{title:`API access (${c.length})`,actions:w(Ne,{children:[i(jn,{initialValue:d,onChange:p}),i(Dt.Divider,{}),i(vce,{})]})}),children:[i(F,{condition:c.length>0,show:i(mt,{sx:{mb:4},children:i(gce,{})})}),i(mt,{sx:{overflowX:"auto"},children:i(so,{value:d,children:w(vv,ee(V({},a()),{children:[i(Mo,{headerGroups:l}),i(bo,ee(V({},s()),{children:c.map(m=>(u(m),i(Vr,ee(V({hover:!0},m.getRowProps()),{children:m.cells.map(b=>i(Zo,ee(V({},b.getCellProps()),{children:b.render("Cell")})))}))))}))]}))})}),i(F,{condition:c.length===0&&!t,show:i(F,{condition:(d==null?void 0:d.length)>0,show:w(Vt,{children:["No tokens found matching \u201C",d,"\u201D"]}),elseShow:i(Vt,{children:w("span",{children:["No tokens available. Read ",i("a",{href:"https://docs.getunleash.io/how-to/api",target:"_blank",rel:"noreferrer",children:"API How-to guides"})," "," to learn more."]})})})})]})},a5={client:{label:"CLIENT",title:"Connect server-side SDK or Unleash Proxy"},frontend:{label:"FRONTEND",title:"Connect web and mobile SDK"},admin:{label:"ADMIN",title:"Full access for managing Unleash"}},Nce=[{id:"Icon",width:"1%",Cell:()=>i(rc,{icon:i(kte,{color:"disabled"})}),disableSortBy:!0,disableGlobalFilter:!0},{Header:"Username",accessor:"username",Cell:Wr},{Header:"Type",accessor:"type",Cell:({value:e})=>i(Wr,{value:a5[e].label,subtitle:a5[e].title}),minWidth:280},{Header:"Project",accessor:"project",Cell:e=>i(Rce,{project:e.row.original.project,projects:e.row.original.projects}),minWidth:120},{Header:"Environment",accessor:"environment",Cell:Wr,minWidth:120},{Header:"Created",accessor:"createdAt",Cell:wa,minWidth:150,disableGlobalFilter:!0},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:e=>w(Lo,{children:[i(Cce,{token:e.row.original}),i(Ece,{token:e.row.original})]})}],$ce=()=>{const{hasAccess:e}=f.exports.useContext(Jt);return i(F,{condition:e(yoe),show:()=>i(Ace,{}),elseShow:()=>i(Du,{})})};var Da=(e=>(e.UNASSIGNED="UNASSIGNED",e.TRIAL="TRIAL",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.CHURNED="CHURNED",e))(Da||{}),ni=(e=>(e.PRO="Pro",e.COMPANY="Company",e.TEAM="Team",e.UNKNOWN="Unknown",e))(ni||{});const qv=()=>{var c;const{uiConfig:e}=st(),{flags:{UNLEASH_CLOUD:t}}=e,{data:n,refetch:r,loading:o,error:a}=Fv("useInstanceStatus",()=>Pce(t));f.exports.useEffect(()=>{r()},[r,t]);const s=[ni.PRO,ni.COMPANY,ni.TEAM];return{instanceStatus:n,refetchInstanceStatus:r,refresh:async()=>{await fetch(bt("api/instance/refresh"))},isBilling:s.includes((c=n==null?void 0:n.plan)!=null?c:ni.UNKNOWN),loading:o,error:a}},Pce=async e=>{if(!e)return i5;const t=await fetch(bt("api/instance/status"));return t.ok?t.json():i5},i5={plan:ni.UNKNOWN},s5={display:"flex",justifyContent:"center",alignItems:"center",width:"100%",textDecoration:"none",color:"inherit",padding:"0.8rem 1.5rem"},Oce={fontWeight:"bold",borderRadius:"3px",padding:"0.8rem 1.5rem"},nl=e=>e.isActive?V(V({},s5),Oce):s5;function ac(){const{uiConfig:e}=st(),{pathname:t}=Gr(),{isBilling:n}=qv(),{flags:r}=e;return i(yr,{style:{marginBottom:"1rem",borderRadius:"12.5px",boxShadow:"none"},children:w(bv,{centered:!0,value:t,children:[i(Ha,{value:"/admin/users",label:i(el,{to:"/admin/users",style:nl,children:i("span",{children:"Users"})})}),r.UG&&i(Ha,{value:"/admin/groups",label:i(el,{to:"/admin/groups",style:nl,children:i("span",{children:"Groups"})})}),r.RE&&i(Ha,{value:"/admin/roles",label:i(el,{to:"/admin/roles",style:nl,children:i("span",{children:"Project roles"})})}),i(Ha,{value:"/admin/api",label:i(el,{to:"/admin/api",style:nl,children:"API access"})}),e.embedProxy&&i(Ha,{value:"/admin/cors",label:i(el,{to:"/admin/cors",style:nl,children:"CORS origins"})}),i(Ha,{value:"/admin/auth",label:i(el,{to:"/admin/auth",style:nl,children:"Single sign-on"})}),n&&i(Ha,{value:"/admin/billing",label:i(el,{to:"/admin/billing",style:nl,children:"Billing"})})]})})}const Dce=()=>{const{pathname:e}=Gr(),t=e.includes("/admin/");return w("div",{children:[i(F,{condition:t,show:i(ac,{})}),i($ce,{})]})},ul={FIX:"fix",VARIABLE:"variable"},V0=e=>t=>{if(t.flag){const n=e.flags;return Boolean(n[t.flag])}return t.configFlag?Boolean(e[t.configFlag]):!0},Yv=()=>{window.scrollTo(0,0)},xi=e=>e&&e.trim?e.trim():e,Lce=e=>{const t=new Date(e);return Wk(t,"yyyy-MM-dd")+"T"+Wk(t,"HH:mm")},Mce=e=>{const t=new Date(e);if(YS(t))return t},Bce=e=>e/10;function Fce(e,t){if(e.length===0)return[];const n=e.reduce(({remainingPercentage:s,variableVariantCount:l},c)=>(c.weight&&c.weightType===ul.FIX?s-=Number(c.weight):l+=1,{remainingPercentage:s,variableVariantCount:l}),{remainingPercentage:t,variableVariantCount:0}),{remainingPercentage:r,variableVariantCount:o}=n;if(r<0)throw new Error("The traffic distribution total must equal 100%");if(!o)throw new Error("There must be at least one variable variant");const a=parseInt(String(r/o));return e.map(s=>(s.weightType!==ul.FIX&&(s.weight=a),s))}const zce={overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.25)",zIndex:5},content:{width:"500px",maxWidth:"90%",margin:"0",top:"50%",left:"50%",right:"auto",bottom:"auto",transform:"translate(-50%, -50%)"}},jce={overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.25)",zIndex:5},content:{width:"500px",maxWidth:"90%",margin:"0",top:"50%",left:"50%",right:"auto",bottom:"auto",transform:"translate(-50%, -50%)"}},Uce=async(e,t,n)=>{const r=await t.json(),o=r.isJoi?r.details[0].message:r[0].msg;throw e(a=>ee(V({},a),{[n]:o})),new Error},Wce=(e,t,n)=>{throw e(r=>ee(V({},r),{[n]:"Could not find the requested resource."})),new Ov(t.status)},Hce=async(e,t,n)=>{const r=await t.json(),o=r.isJoi?r.details[0].message:r[0].msg;throw e(a=>ee(V({},a),{[n]:o})),new NS(t.status)},Vce=async(e,t,n)=>{const r=await t.json(),o=r.isJoi?r.details[0].message:r[0].msg;throw e(a=>ee(V({},a),{[n]:o})),new T$(t.status)},l5="removeUser",Kv=()=>{const{loading:e,makeRequest:t,createRequest:n,errors:r}=Cr({handleBadRequest:Uce,handleNotFound:Wce,handleUnauthorized:Hce,handleForbidden:Vce});return{addUser:async u=>{const d="addUser",p=n("api/admin/user-admin",{method:"POST",body:JSON.stringify(u)},d);return t(p.caller,p.id)},updateUser:async u=>{const d="updateUser",p=n(`api/admin/user-admin/${u.id}`,{method:"PUT",body:JSON.stringify(u)},d);return t(p.caller,p.id)},removeUser:async u=>{const d="removeUser",p=n(`api/admin/user-admin/${u}`,{method:"DELETE"},d);return t(p.caller,p.id)},changePassword:async(u,d)=>{const p="changePassword",h=n(`api/admin/user-admin/${u}/change-password`,{method:"POST",body:JSON.stringify({password:d})},p);return t(h.caller,h.id)},validatePassword:async u=>{const d="validatePassword",p=n("api/admin/user-admin/validate-password",{method:"POST",body:JSON.stringify({password:u})},d);return t(p.caller,p.id)},userApiErrors:r,userLoading:e}},Gce=z(_u)(({theme:e})=>({width:e.spacing(3.5),height:e.spacing(3.5),margin:"auto",backgroundColor:e.palette.secondary.light,color:e.palette.text.primary,fontSize:e.fontSizes.smallerBody,fontWeight:e.fontWeight.bold})),Qi=u=>{var d=u,{user:e,src:t,title:n,onMouseEnter:r,onMouseLeave:o,className:a,sx:s,children:l}=d,c=en(d,["user","src","title","onMouseEnter","onMouseLeave","className","sx","children"]);!n&&!r&&e&&(n=`${(e==null?void 0:e.name)||(e==null?void 0:e.email)||(e==null?void 0:e.username)} (id: ${e==null?void 0:e.id})`),!t&&e&&(t=e==null?void 0:e.imageUrl);let p;return!l&&e&&(p=(e==null?void 0:e.name)||(e==null?void 0:e.email)||(e==null?void 0:e.username),p&&p.includes(" ")?p=`${p.split(" ")[0][0]}${p.split(" ")[1][0]}`.toUpperCase():p&&(p=p[0].toUpperCase())),i(Gce,ee(V({className:a,sx:s},c),{"data-loading":!0,alt:"Gravatar",src:t,title:n,onMouseEnter:r,onMouseLeave:o,children:i(F,{condition:Boolean(p),show:p,elseShow:l})}))},qce=z(Qi)(({theme:e})=>({width:e.spacing(5),height:e.spacing(5),margin:0})),Yce=({showDialog:e,closeDialog:t,user:n})=>{const[r,o]=f.exports.useState({}),[a,s]=f.exports.useState(),[l,c]=f.exports.useState(!1),{classes:u}=Yn(),{changePassword:d}=Kv(),p=b=>{s(void 0),o(ee(V({},r),{[b.target.name]:xi(b.target.value)}))},h=async b=>{if(b.preventDefault(),r.password===r.confirm){if(!l){s(Lp);return}try{await d(n.id,r.password),o({}),t()}catch(y){console.warn(y),s(Lp)}}};return i(ln,{open:e,onClick:h,style:jce,onClose:b=>{b.preventDefault(),o({}),s(void 0),t()},primaryButtonText:"Save",title:"Update password",secondaryButtonText:"Cancel",maxWidth:"xs",children:w("form",{onSubmit:h,className:it(u.contentSpacingY,u.flexColumn),children:[i(Te,{variant:"subtitle1",children:"Changing password for user"}),w("div",{className:u.flexRow,children:[i(qce,{user:n,variant:"rounded"}),i(Te,{variant:"subtitle1",style:{marginLeft:"1rem"},children:n.username||n.email})]}),i(_S,{password:r.password,callback:c}),i(At,{label:"New password",name:"password",type:"password",value:r.password,error:Boolean(a),helperText:a,onChange:p,variant:"outlined",size:"small"}),i(At,{label:"Confirm password",name:"confirm",type:"password",value:r.confirm,onChange:p,variant:"outlined",size:"small"}),i(AS,{started:Boolean(r.password&&r.confirm),matchingPasswords:r.password===r.confirm})]})})},Kce=z(Qi)(({theme:e})=>({width:e.spacing(5),height:e.spacing(5),margin:0})),Xce=({showDialog:e,closeDialog:t,user:n,userLoading:r,removeUser:o,userApiErrors:a})=>{const s=Ji(r),{classes:l}=Yn();return i(ln,{open:e,title:"Really delete user?",onClose:t,onClick:o,primaryButtonText:"Delete user",secondaryButtonText:"Cancel",children:w("div",{ref:s,children:[i(F,{condition:Boolean(a[l5]),show:i(yt,{"data-loading":!0,severity:"error",style:{margin:"1rem 0"},children:a[l5]})}),w("div",{"data-loading":!0,className:l.flexRow,children:[i(Kce,{user:n,variant:"rounded"}),i(Te,{variant:"subtitle1",style:{marginLeft:"1rem"},children:n.username||n.email})]}),w(Te,{"data-loading":!0,variant:"body1",style:{marginTop:"1rem"},children:["Are you sure you want to delete"," ",n?`${n.name||"user"} (${n.email||n.username})`:"","?"]})]})})},Jce=e=>f.exports.createElement("svg",V({width:197,height:177,viewBox:"0 0 197 177",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("g",{clipPath:"url(#clip0)"},f.exports.createElement("path",{d:"M195.272 67.6884C195.201 67.6884 195.132 67.6668 195.074 67.6264L99.4918 1.00044C99.2009 0.798626 98.8553 0.690774 98.5013 0.691378C98.1474 0.691982 97.8021 0.801012 97.5119 1.00382L2.61779 67.6257C2.54273 67.6784 2.44984 67.6991 2.35954 67.6832C2.26924 67.6674 2.18893 67.6163 2.13629 67.5411C2.08364 67.466 2.06297 67.373 2.07881 67.2826C2.09466 67.1923 2.14573 67.1119 2.22079 67.0592L97.115 0.437299C97.5213 0.153417 98.0047 0.000817369 98.5002 2.3283e-06C98.9957 -0.000812712 99.4796 0.150195 99.8868 0.432738L195.469 67.0585C195.53 67.1006 195.575 67.1609 195.599 67.2306C195.623 67.3004 195.624 67.3758 195.602 67.4461C195.58 67.5164 195.536 67.5778 195.476 67.6214C195.417 67.6649 195.345 67.6884 195.272 67.6884L195.272 67.6884Z",fill:"#3F3D56"}),f.exports.createElement("path",{d:"M8.04028 70.0501L98.5953 2.87773L189.837 74.8297L103.261 126.199L56.2576 115.476L8.04028 70.0501Z",fill:"#E6E6E6"}),f.exports.createElement("path",{d:"M60.2251 157.928H15.4887C15.214 157.928 14.942 157.875 14.6881 157.77C14.4342 157.665 14.2035 157.511 14.0091 157.316C13.8147 157.122 13.6606 156.891 13.5554 156.637C13.4502 156.383 13.396 156.111 13.396 155.836C13.396 155.561 13.4502 155.289 13.5554 155.035C13.6606 154.781 13.8147 154.55 14.0091 154.356C14.2035 154.162 14.4342 154.008 14.6881 153.903C14.942 153.798 15.214 153.744 15.4887 153.744H60.2251C60.4998 153.744 60.7719 153.798 61.0258 153.903C61.2797 154.008 61.5104 154.162 61.7048 154.356C61.8991 154.55 62.0533 154.781 62.1585 155.035C62.2637 155.289 62.3179 155.561 62.3179 155.836C62.3179 156.111 62.2637 156.383 62.1585 156.637C62.0533 156.891 61.8991 157.122 61.7048 157.316C61.5104 157.511 61.2797 157.665 61.0258 157.77C60.7719 157.875 60.4998 157.928 60.2251 157.928Z",fill:"#607D8B"}),f.exports.createElement("path",{d:"M31.5392 148.934H15.4887C15.214 148.934 14.942 148.88 14.6881 148.776C14.4342 148.671 14.2035 148.516 14.0091 148.322C13.8147 148.128 13.6606 147.897 13.5554 147.643C13.4502 147.389 13.396 147.117 13.396 146.842C13.396 146.567 13.4502 146.295 13.5554 146.041C13.6606 145.787 13.8147 145.556 14.0091 145.362C14.2035 145.168 14.4342 145.014 14.6881 144.909C14.942 144.804 15.214 144.75 15.4887 144.75H31.5392C31.8139 144.75 32.0859 144.804 32.3398 144.909C32.5937 145.014 32.8244 145.168 33.0188 145.362C33.2132 145.556 33.3674 145.787 33.4726 146.041C33.5778 146.295 33.6319 146.567 33.6319 146.842C33.6319 147.117 33.5778 147.389 33.4726 147.643C33.3674 147.897 33.2132 148.128 33.0188 148.322C32.8244 148.516 32.5937 148.671 32.3398 148.776C32.0859 148.88 31.8139 148.934 31.5392 148.934Z",fill:"#607D8B"}),f.exports.createElement("path",{d:"M99.8687 107.464C99.5287 107.465 99.1918 107.399 98.8771 107.27L43.0291 84.0761V11.4759C43.0298 10.8339 43.2849 10.2184 43.7385 9.76446C44.192 9.31051 44.8069 9.05515 45.4484 9.0544H152.589C153.23 9.05515 153.845 9.31051 154.299 9.76446C154.752 10.2184 155.007 10.8339 155.008 11.4759V84.1267L154.903 84.1717L100.89 107.258C100.567 107.394 100.22 107.464 99.8687 107.464Z",fill:"white"}),f.exports.createElement("path",{d:"M99.8687 107.637C99.5061 107.637 99.1469 107.567 98.8112 107.43L42.8562 84.1916V11.4759C42.857 10.788 43.1303 10.1286 43.6163 9.64218C44.1022 9.1558 44.7611 8.88221 45.4483 8.88143H152.589C153.276 8.88221 153.935 9.1558 154.421 9.64218C154.907 10.1286 155.18 10.788 155.181 11.4759V84.2409L100.958 107.417C100.613 107.563 100.243 107.637 99.8687 107.637ZM43.5474 83.7295L99.0748 106.79C99.5928 107.001 100.173 106.997 100.688 106.781L154.49 83.7842V11.4759C154.489 10.9714 154.288 10.4879 153.932 10.1312C153.576 9.77452 153.093 9.57387 152.589 9.57328H45.4483C44.9444 9.57387 44.4612 9.77452 44.1049 10.1312C43.7485 10.4879 43.548 10.9714 43.5474 11.4759L43.5474 83.7295Z",fill:"#3F3D56"}),f.exports.createElement("path",{d:"M194.581 66.9965H194.512L154.835 83.9537L100.55 107.155C100.337 107.244 100.11 107.291 99.8797 107.292C99.6496 107.293 99.4215 107.249 99.2084 107.162L43.2018 83.9052L2.55059 67.0242L2.48849 66.9965H2.4193C1.77788 66.9972 1.16293 67.2526 0.70938 67.7066C0.255828 68.1605 0.000711706 68.776 0 69.418V174.579C0.000712619 175.221 0.255828 175.836 0.70938 176.29C1.16293 176.744 1.77788 176.999 2.4193 177H194.581C195.222 176.999 195.837 176.744 196.291 176.29C196.744 175.836 196.999 175.221 197 174.579V69.418C196.999 68.776 196.744 68.1605 196.291 67.7066C195.837 67.2526 195.222 66.9972 194.581 66.9965ZM196.309 174.579C196.309 175.037 196.126 175.477 195.802 175.801C195.478 176.126 195.039 176.308 194.581 176.308H2.4193C1.96104 176.308 1.52161 176.126 1.19757 175.801C0.873536 175.477 0.691411 175.037 0.691228 174.579V69.418C0.691855 68.9707 0.865197 68.541 1.17501 68.2187C1.48483 67.8963 1.90713 67.7063 2.35365 67.6884L43.2018 84.6524L98.9425 107.802C99.5459 108.047 100.222 108.044 100.823 107.791L154.835 84.7043L194.65 67.6884C195.096 67.7076 195.517 67.8982 195.826 68.2203C196.135 68.5425 196.308 68.9714 196.309 69.418V174.579Z",fill:"#3F3D56"}),f.exports.createElement("path",{d:"M99.3104 86.8775C97.2487 86.8813 95.2416 86.214 93.5919 84.9762L93.4896 84.8994L71.9541 68.3963C70.9567 67.6314 70.1197 66.6774 69.4907 65.5888C68.8617 64.5001 68.4531 63.2981 68.2882 62.0514C68.1233 60.8047 68.2054 59.5377 68.5297 58.3228C68.8541 57.1078 69.4143 55.9687 70.1785 54.9704C70.9426 53.9722 71.8958 53.1344 72.9835 52.5048C74.0711 51.8753 75.2721 51.4663 76.5177 51.3013C77.7632 51.1362 79.0291 51.2184 80.243 51.543C81.4569 51.8676 82.595 52.4284 83.5923 53.1932L97.5414 63.8988L130.505 20.8706C131.27 19.8726 132.223 19.0351 133.311 18.4059C134.399 17.7767 135.6 17.3682 136.846 17.2036C138.091 17.039 139.357 17.1216 140.571 17.4467C141.785 17.7718 142.923 18.333 143.92 19.0982L143.715 19.3767L143.925 19.1023C145.936 20.6494 147.252 22.9319 147.584 25.449C147.916 27.9661 147.237 30.5122 145.696 32.5287L106.922 83.1402C106.026 84.3065 104.872 85.2503 103.552 85.8984C102.232 86.5466 100.781 86.8816 99.3104 86.8775Z",fill:"#607D8B"})),f.exports.createElement("defs",null,f.exports.createElement("clipPath",{id:"clip0"},f.exports.createElement("rect",{width:197,height:177,fill:"white"})))),Qce=le()({iconContainer:{width:"100%",textAlign:"center"},emailIcon:{margin:"2rem auto"}});var hC={},Zce=yn.exports;Object.defineProperty(hC,"__esModule",{value:!0});var Xv=hC.default=void 0,eue=Zce(bn),tue=Cn,nue=(0,eue.default)((0,tue.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}),"FileCopy");Xv=hC.default=nue;const O3=({inviteLink:e})=>{const{setToastData:t}=tt(),n=()=>{try{return navigator.clipboard.writeText(e).then(()=>{t({type:"success",title:"Successfully copied invite link."})}).catch(()=>{r()})}catch{r()}},r=()=>t({type:"error",title:"Could not copy invite link."});return w("div",{style:{backgroundColor:"#efefef",padding:"2rem",borderRadius:"3px",margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center",wordBreak:"break-all"},children:[e,i(wt,{title:"Copy link",arrow:!0,children:i(Ht,{onClick:n,size:"large",children:i(Xv,{})})})]})},rue=({open:e,closeConfirm:t,inviteLink:n})=>{const{classes:r}=Qce();return w(ln,{open:e,title:"Team member added",primaryButtonText:"Close",onClick:t,children:[i(Te,{children:"A new team member has been added. We\u2019ve sent an email on your behalf to inform them of their new account and role. No further steps are required."}),i("div",{className:r.iconContainer,children:i(Jce,{className:r.emailIcon})}),i(Te,{style:{fontWeight:"bold"},variant:"subtitle1",children:"In a rush?"}),i(Te,{children:"You may also copy the invite link and send it to the user."}),i(O3,{inviteLink:n})]})},oue=({open:e,closeConfirm:t,inviteLink:n})=>{const{classes:r}=Yn();return i(ln,{open:e,onClick:t,primaryButtonText:"Close",title:"Team member added",children:w("div",{className:r.contentSpacingYLarge,children:[i(Te,{variant:"body1",children:"A new team member has been added. Please provide them with the following link to get started:"}),i(O3,{inviteLink:n}),i(Te,{variant:"body1",children:"Copy the link and send it to the user. This will allow them to set up their password and get started with their Unleash account."}),i(yt,{severity:"info",children:w(Te,{variant:"body2",children:["Want to avoid this step in the future?"," ",i("a",{href:"https://docs.getunleash.io/docs/deploy/email",target:"_blank",rel:"noopener noreferrer",children:"If you configure an email server for Unleash"})," ","we'll automatically send informational getting started emails to new users once you add them."]})})]})})},D3=({open:e,closeConfirm:t,emailSent:n,inviteLink:r})=>n?i(rue,{open:e,closeConfirm:t,inviteLink:r}):i(oue,{open:e,closeConfirm:t,inviteLink:r}),_f=()=>{const{data:e,error:t,mutate:n}=Wt(bt("api/admin/user-admin"),aue);return f.exports.useMemo(()=>{var r,o;return{users:(r=e==null?void 0:e.users)!=null?r:[],roles:(o=e==null?void 0:e.rootRoles)!=null?o:[],loading:!t&&!e,refetch:()=>n(),error:t}},[e,t,n])},aue=e=>fetch(e).then(rn("Users")).then(t=>t.json()),L3=!1,iue=e=>{var a;const{instanceStatus:t}=qv(),n=L3,r=(a=t==null?void 0:t.seats)!=null?a:5;return{planUsers:f.exports.useMemo(()=>sue(e,n,r),[e,n,r]),isBillingUsers:n}},sue=(e,t,n=0)=>(!t||!n||e.sort((r,o)=>r.createdAt.localeCompare(o.createdAt)).forEach((r,o)=>{r.paid=!1,o>=n&&(r.paid=!0)}),e),lue=z(Nte)(({theme:e})=>({color:e.palette.primary.light,fontSize:"1.75rem"})),cue=({value:e})=>i(Bn,{children:i(F,{condition:e,show:i(wt,{title:"Paid user",arrow:!0,children:i(lue,{})}),elseShow:"Free"})}),Up=({value:e,live:t=!1,emptyText:n})=>{const{locationSettings:r}=vi();return e?i(Bn,{children:i(wt,{title:`Last login: ${uu(e,r.locale)}`,arrow:!0,children:i(Te,{noWrap:!0,variant:"body2","data-loading":!0,children:i(zv,{date:new Date(e),live:t,title:""})})})}):i(Bn,{children:n})},uue=z(mt)(()=>({display:"flex",justifyContent:"center"})),due=({onEdit:e,onChangePassword:t,onDelete:n})=>w(uue,{children:[i(Ft,{"data-loading":!0,onClick:e,permission:sn,tooltipProps:{title:"Edit user"},children:i(ar,{})}),i(Ft,{"data-loading":!0,onClick:t,permission:sn,tooltipProps:{title:"Change password"},children:i($v,{})}),i(Ft,{"data-loading":!0,onClick:n,permission:sn,tooltipProps:{title:"Remove user"},children:i(er,{})})]}),pue=()=>{const e=Ye(),{users:t,roles:n,refetch:r,loading:o}=_f(),{setToastData:a,setToastApiError:s}=tt(),{removeUser:l,userLoading:c,userApiErrors:u}=Kv(),[d,p]=f.exports.useState({open:!1}),[h,m]=f.exports.useState(!1),[b,y]=f.exports.useState(!1),[g,x]=f.exports.useState(!1),[v,S]=f.exports.useState(""),[E,R]=f.exports.useState(),{planUsers:A,isBillingUsers:_}=iue(t),N=an(oo.breakpoints.down("sm")),k=an(oo.breakpoints.down("md")),I=()=>{m(!1),R(void 0)},O=oe=>ue=>{ue.preventDefault(),m(!0),R(oe)},L=oe=>ue=>{ue.preventDefault(),p({open:!0,user:oe})},q=()=>{p({open:!1})},D=async oe=>{try{await l(oe.id),a({title:`${oe.name} has been deleted`,type:"success"}),r(),I()}catch(ue){s(Ue(ue))}},H=()=>{y(!1),x(!1),S("")},U=f.exports.useMemo(()=>[{id:"type",Header:"Type",accessor:"paid",Cell:({row:{original:oe}})=>i(cue,{value:_&&oe.paid}),disableGlobalFilter:!0,sortType:"boolean"},{Header:"Created",accessor:"createdAt",Cell:wa,disableGlobalFilter:!0,sortType:"date",minWidth:120},{Header:"Avatar",accessor:"imageUrl",Cell:({row:{original:oe}})=>i(Bn,{children:i(Qi,{user:oe})}),disableGlobalFilter:!0,disableSortBy:!0},{id:"name",Header:"Name",accessor:oe=>oe.name||"",width:"40%",Cell:Wr},{id:"username",Header:"Username",accessor:oe=>oe.username||oe.email,width:"40%",Cell:Wr},{id:"role",Header:"Role",accessor:oe=>{var ue;return((ue=n.find(ge=>ge.id===oe.rootRole))==null?void 0:ue.name)||""},disableGlobalFilter:!0},{id:"last-login",Header:"Last login",accessor:oe=>oe.seenAt||"",Cell:({row:{original:oe}})=>i(Up,{value:oe.seenAt,emptyText:"Never logged"}),disableGlobalFilter:!0,sortType:"date",minWidth:150},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:oe}})=>i(due,{onEdit:()=>{e(`/admin/users/${oe.id}/edit`)},onChangePassword:L(oe),onDelete:O(oe)}),width:100,disableGlobalFilter:!0,disableSortBy:!0}],[n,e,_]),Z=f.exports.useMemo(()=>({sortBy:[{id:"createdAt"}],hiddenColumns:_?[]:["type"]}),[_]),G=_?A:t,{getTableProps:B,getTableBodyProps:Y,headerGroups:K,rows:Q,prepareRow:re,state:{globalFilter:pe},setGlobalFilter:ye,setHiddenColumns:ae}=ct.exports.useTable({columns:U,data:G,initialState:Z,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0,defaultColumn:{Cell:Bn}},ct.exports.useGlobalFilter,ct.exports.useSortBy);return f.exports.useEffect(()=>{const oe=[];(!_||k)&&oe.push("type"),k&&oe.push("createdAt","username"),N&&oe.push("imageUrl","role","last-login"),ae(oe)},[ae,N,k,_]),w(Gt,{isLoading:o,header:i(Dt,{title:"Users",actions:w(Ne,{children:[i(jn,{initialValue:pe,onChange:ye}),i(Dt.Divider,{}),i(nt,{variant:"contained",color:"primary",onClick:()=>e("/admin/create-user"),children:"New user"})]})}),children:[i(so,{value:pe,children:w(xa,ee(V({},B()),{children:[i(Mo,{headerGroups:K}),i(bo,ee(V({},Y()),{children:Q.map(oe=>(re(oe),i(Vr,ee(V({hover:!0},oe.getRowProps()),{children:oe.cells.map(ue=>i(Zo,ee(V({},ue.getCellProps()),{children:ue.render("Cell")})))}))))}))]}))}),i(F,{condition:Q.length===0,show:i(F,{condition:(pe==null?void 0:pe.length)>0,show:w(Vt,{children:["No users found matching \u201C",pe,"\u201D"]}),elseShow:i(Vt,{children:"No users available. Get started by adding one."})})}),i(D3,{open:b,closeConfirm:H,emailSent:g,inviteLink:v}),i(F,{condition:Boolean(d.user),show:()=>i(Yce,{showDialog:d.open,closeDialog:q,user:d.user})}),i(F,{condition:Boolean(E),show:i(Xce,{showDialog:h,closeDialog:I,user:E,removeUser:()=>D(E),userLoading:c,userApiErrors:u})})]})},fue=()=>{const{hasAccess:e}=f.exports.useContext(Jt);return w("div",{children:[i(ac,{}),i(F,{condition:e(sn),show:i(pue,{}),elseShow:i(Du,{})})]})},mC=e=>e.map(t=>ee(V({},t.user),{joinedAt:new Date(t.joinedAt)})),Jv=e=>{const{data:t,error:n,mutate:r}=Wt(bt(`api/admin/groups/${e}`),hue);return f.exports.useMemo(()=>{var o;return{group:t&&ee(V({},t),{users:mC((o=t==null?void 0:t.users)!=null?o:[])}),loading:!n&&!t,refetchGroup:()=>r(),error:n}},[t,n,r])},hue=e=>fetch(e).then(rn("Group")).then(t=>t.json()),du=()=>{const{data:e,error:t,mutate:n}=Wt(bt("api/admin/groups"),mue);return f.exports.useMemo(()=>{var r;return{groups:(r=e==null?void 0:e.groups.map(o=>{var a;return ee(V({},o),{users:mC((a=o.users)!=null?a:[])})}))!=null?r:[],loading:!t&&!e,refetchGroups:()=>n(),error:t}},[e,t,n])},mue=e=>fetch(e).then(rn("Groups")).then(t=>t.json()),gue=z(Xl)(({theme:e})=>({pointerEvents:"none",".MuiPaper-root":{padding:e.spacing(2)}})),vue=z("div")(({theme:e})=>({color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody,marginTop:e.spacing(1)})),yue=({user:e,open:t,anchorEl:n,onPopoverClose:r})=>w(gue,{open:t,anchorEl:n,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:[i(vue,{children:(e==null?void 0:e.name)||(e==null?void 0:e.username)}),i("div",{children:e==null?void 0:e.email})]}),bue=z("div")(({theme:e})=>({display:"inline-flex",alignItems:"center",flexWrap:"wrap",marginLeft:e.spacing(1)})),c5=z(Qi)(({theme:e})=>({outline:`${e.spacing(.25)} solid ${e.palette.background.paper}`,marginLeft:e.spacing(-1),"&:hover":{outlineColor:e.palette.primary.main}})),xue=({users:e})=>{const t=f.exports.useMemo(()=>e.sort((u,d)=>(d==null?void 0:d.joinedAt.getTime())-(u==null?void 0:u.joinedAt.getTime())).slice(0,9),[e]),[n,r]=f.exports.useState(null),[o,a]=f.exports.useState(),s=u=>{r(u.currentTarget)},l=()=>{r(null)},c=Boolean(n);return w(bue,{children:[t.map(u=>i(c5,{user:u,onMouseEnter:d=>{s(d),a(u)},onMouseLeave:l},u.id)),i(F,{condition:e.length>9,show:w(c5,{children:["+",e.length-t.length]})}),i(yue,{open:c,user:o,anchorEl:n,onPopoverClose:l})]})},wue=z("div")(({theme:e})=>({display:"flex",justifyContent:"center"})),Sue=z(Xl)(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(1,1.5)})),Cue=({groupId:e,onEditUsers:t,onRemove:n})=>{const[r,o]=f.exports.useState(null),a=Boolean(r),s=d=>{o(d.currentTarget)},l=()=>{o(null)},c=`feature-${e}-actions`,u=`${c}-menu`;return w(wue,{onClick:d=>{d.preventDefault(),d.stopPropagation()},children:[i(wt,{title:"Group actions",arrow:!0,describeChild:!0,children:i(Ht,{id:c,"aria-controls":a?u:void 0,"aria-haspopup":"true","aria-expanded":a?"true":void 0,onClick:s,type:"button",children:i($te,{})})}),i(Sue,{id:u,anchorEl:r,open:a,onClose:l,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},disableScrollLock:!0,children:w(mv,{"aria-labelledby":c,children:[w(_r,{onClick:l,component:Ct,to:`/admin/groups/${e}/edit`,children:[i(Mi,{children:i(ar,{})}),i(dn,{children:i(Te,{variant:"body2",children:"Edit group"})})]}),w(_r,{onClick:()=>{t(),l()},children:[i(Mi,{children:i(Ete,{})}),i(dn,{children:i(Te,{variant:"body2",children:"Edit group users"})})]}),w(_r,{onClick:()=>{n(),l()},children:[i(Mi,{children:i(er,{})}),i(dn,{children:i(Te,{variant:"body2",children:"Delete group"})})]})]})})]})},If=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{createGroup:async l=>{const u=t("api/admin/groups",{method:"POST",body:JSON.stringify(l)});try{return await(await e(u.caller,u.id)).json()}catch(d){throw d}},updateGroup:async(l,c)=>{const u=`api/admin/groups/${l}`,d=t(u,{method:"PUT",body:JSON.stringify(c)});try{await e(d.caller,d.id)}catch(p){throw p}},removeGroup:async l=>{const c=`api/admin/groups/${l}`,u=t(c,{method:"DELETE"});try{await e(u.caller,u.id)}catch(d){throw d}},errors:n,loading:r}},M3=({open:e,setOpen:t,group:n})=>{const{refetchGroups:r}=du(),{removeGroup:o}=If(),{setToastData:a,setToastApiError:s}=tt(),l=Ye();return i(ln,{open:e,primaryButtonText:"Delete group",secondaryButtonText:"Cancel",onClick:async()=>{try{await o(n.id),r(),t(!1),l("/admin/groups"),a({title:"Group removed successfully",type:"success"})}catch(u){s(Ue(u))}},onClose:()=>{t(!1)},title:"Delete group?",children:w(Te,{children:["Do you really want to delete ",i("strong",{children:n.name}),"? Users who are granted access to projects only via this group will lose access to those projects."]})})};var gC={},Eue=yn.exports;Object.defineProperty(gC,"__esModule",{value:!0});var B3=gC.default=void 0,Tue=Eue(bn),Rue=Cn,kue=(0,Tue.default)((0,Rue.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16.77c.68 0 1.23-.56 1.23-1.23V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-2-6H6v-2h12v2zm-4 4H6v-2h8v2z"}),"TopicOutlined");B3=gC.default=kue;const F3="27.5rem",vC=le()(e=>({container:{minHeight:"80vh",width:"100%",display:"flex",margin:"0 auto",borderRadius:"1rem",overflow:"hidden",[e.breakpoints.down(1100)]:{flexDirection:"column",minHeight:0}},modal:{minHeight:"100vh",borderRadius:0},sidebar:{backgroundColor:e.palette.formSidebar,padding:"2rem",flexGrow:0,flexShrink:0,width:F3,[e.breakpoints.down(1100)]:{width:"100%",color:"red"},[e.breakpoints.down(500)]:{padding:"2rem 1rem"}},sidebarDivider:{opacity:.3,marginBottom:"8px"},title:{marginBottom:"1.5rem",fontWeight:"normal"},subtitle:{color:e.palette.formSidebarTextColor,marginBottom:"1rem",display:"flex",justifyContent:"space-between",alignItems:"center",fontWeight:e.fontWeight.bold,fontSize:e.fontSizes.bodySize},description:{color:e.palette.formSidebarTextColor,zIndex:1,position:"relative"},linkContainer:{margin:"1.5rem 0",display:"flex",alignItems:"center"},linkIcon:{marginRight:"0.5rem",color:"#fff"},documentationLink:{color:"#fff",display:"block","&:hover":{textDecoration:"none"}},formContent:{backgroundColor:e.palette.formBackground,display:"flex",flexDirection:"column",padding:"3rem",flexGrow:1,[e.breakpoints.down(1200)]:{padding:"2rem"},[e.breakpoints.down(1100)]:{width:"100%"},[e.breakpoints.down(500)]:{padding:"2rem 1rem"}},icon:{fill:"#fff"},mobileGuidanceBgContainer:{zIndex:1,position:"absolute",right:-3,top:-3},mobileGuidanceBackground:{width:"75px",height:"75px"},mobileGuidanceButton:{position:"absolute",zIndex:400,right:0},infoIcon:{fill:"#fff"}})),_ue=le()(e=>({container:{backgroundColor:e.palette.codebox,padding:"1rem",borderRadius:e.shape.borderRadiusMedium,position:"relative",maxHeight:"500px",overflow:"auto"},code:{margin:0,wordBreak:"break-all",whiteSpace:"pre-wrap",color:e.palette.formSidebarTextColor,fontSize:14},icon:{fill:"#fff"},iconButton:{position:"absolute",bottom:"10px",right:"20px"}})),Iue=({text:e})=>{const{classes:t}=_ue();return i("div",{className:t.container,children:i("pre",{className:t.code,children:e})})};var Aue="/static/unleashLogoIconDarkAlpha.de056a82.gif";const Nue=le()(e=>({loader:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",backgroundColor:e.palette.background.paper},img:{width:"100px",height:"100px"}})),Bb=()=>{const{classes:e}=Nue();return i("div",{className:e.loader,role:"alert","aria-label":"Loading",children:i("img",{className:e.img,src:Xa(Aue),alt:""})})},$ue=e=>f.exports.createElement("svg",V({width:48,height:50,viewBox:"0 0 48 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{d:"M0.5 0.000193412C11 2.00019 17 9 18 18C19 27 23.5 31.5 30.5 34C37.5 36.5 47.34 41.4 48 49.5L48 12.0012C48 5.37332 42.6309 0.000381623 36.003 0.000366343C24.1359 0.000338986 8.66406 -0.000263908 0.5 0.000193412Z",fill:"#6C65E5"})),Un=({title:e,description:t,children:n,documentationLink:r,documentationLinkLabel:o,loading:a,modal:s,formatApiCode:l})=>{const{setToastData:c}=tt(),{classes:u}=vC(),{classes:d}=Yn(),p=an(`(max-width:${1099}px)`),h=()=>{fC(l())?c({title:"Successfully copied the command",text:"The command should now be automatically copied to your clipboard",autoHideDuration:6e3,type:"success",show:!0}):c({title:"Could not copy the command",text:"Sorry, but we could not copy the command.",autoHideDuration:6e3,type:"error",show:!0})};return w("section",{className:it(u.container,s&&u.modal),children:[i(F,{condition:p,show:i("div",{className:d.relative,children:i(Pue,{description:t,documentationLink:r,documentationLinkLabel:o})})}),w("div",{className:u.formContent,children:[i(F,{condition:a||!1,show:i(Bb,{}),elseShow:w(Ne,{children:[i("h1",{className:u.title,children:e}),n]})})," "]}),i(F,{condition:!p,show:w(z3,{description:t,documentationLink:r,documentationLinkLabel:o,children:[i(Ur,{className:u.sidebarDivider}),w("h2",{className:u.subtitle,children:["API Command"," ",i(wt,{title:"Copy command",arrow:!0,children:i(Ht,{onClick:h,size:"large",children:i(Nv,{className:u.icon})})})]}),i(Iue,{text:l()})]})})]})},Pue=({description:e,documentationLink:t,documentationLinkLabel:n})=>{const[r,o]=f.exports.useState(!1),{classes:a}=vC();return w(Ne,{children:[i("div",{className:a.mobileGuidanceBgContainer,children:i($ue,{className:a.mobileGuidanceBackground})}),i(wt,{title:"Toggle help",arrow:!0,children:i(Ht,{className:a.mobileGuidanceButton,onClick:()=>o(s=>!s),size:"large",children:i(S$,{className:a.infoIcon})})}),i(a4,{in:r,timeout:500,children:i(z3,{description:e,documentationLink:t,documentationLinkLabel:n})})]})},z3=({description:e,children:t,documentationLink:n,documentationLinkLabel:r="Learn more"})=>{const{classes:o}=vC();return w("aside",{className:o.sidebar,children:[i("p",{className:o.description,children:e}),w("div",{className:o.linkContainer,children:[i(LS,{className:o.linkIcon}),i("a",{className:o.documentationLink,href:n,rel:"noopener noreferrer",target:"_blank",children:r})]}),t]})},Oue=le()(()=>({modal:{position:"absolute",top:0,right:0,bottom:0,height:"100vh",maxWidth:"98vw",width:1300,overflow:"auto",boxShadow:"0 0 1rem rgba(0, 0, 0, 0.25)"}})),u5=250,pu=({open:e,onClose:t,label:n,children:r})=>{const{classes:o}=Oue();return i(yf,{open:e,onClose:t,closeAfterTransition:!0,"aria-label":n,BackdropComponent:aS,BackdropProps:{timeout:u5},"data-testid":tre,children:i(oS,{timeout:u5,in:e,children:i("div",{className:o.modal,children:r})})})};var yC={},Due=yn.exports;Object.defineProperty(yC,"__esModule",{value:!0});var Af=yC.default=void 0,Lue=Due(bn),Mue=Cn,Bue=(0,Lue.default)((0,Mue.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");Af=yC.default=Bue;var bC={},Fue=yn.exports;Object.defineProperty(bC,"__esModule",{value:!0});var Nf=bC.default=void 0,zue=Fue(bn),jue=Cn,Uue=(0,zue.default)((0,jue.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");Nf=bC.default=Uue;const Wue=z("div")(({theme:e})=>({display:"flex",flexDirection:"column","& > span:first-of-type":{color:e.palette.text.secondary}})),Hue=z("div")(({theme:e})=>({paddingLeft:e.spacing(1)})),Vue=z("div")(({theme:e})=>({display:"flex",marginBottom:e.spacing(3),"& > div:first-of-type":{width:"100%",maxWidth:e.spacing(50),marginRight:e.spacing(1)}})),Gue=(e,t,n)=>w("li",ee(V({},e),{children:[i(Do,{icon:i(Af,{fontSize:"small"}),checkedIcon:i(Nf,{fontSize:"small"}),style:{marginRight:8},checked:n}),w(Wue,{children:[i("span",{children:t.name||t.username}),i("span",{children:t.email})]})]})),que=e=>i(Hue,{children:e.length>1?`${e.length} users selected`:e[0].name||e[0].username||e[0].email}),j3=({users:e,setUsers:t})=>{const{users:n}=_f();return i(Vue,{children:i(Bl,{"data-testid":Sne,size:"small",multiple:!0,limitTags:1,openOnFocus:!0,disableCloseOnSelect:!0,value:e,onChange:(r,o,a)=>{r.type==="keydown"&&r.key==="Backspace"&&a==="removeOption"||t(o)},options:[...n].sort((r,o)=>{const a=r.name||r.username||"",s=o.name||o.username||"";return a.localeCompare(s)}),renderOption:(r,o,{selected:a})=>Gue(r,o,a),isOptionEqualToValue:(r,o)=>r.id===o.id,getOptionLabel:r=>r.email||r.name||r.username||"",renderInput:r=>i(At,ee(V({},r),{label:"Select users"})),renderTags:r=>que(r)})})},Yue=["imageUrl","name"],U3=({users:e,setUsers:t})=>{const n=an(oo.breakpoints.down("md")),r=f.exports.useMemo(()=>[{Header:"Avatar",accessor:"imageUrl",Cell:({row:{original:c}})=>i(Bn,{children:i(Qi,{user:c})}),maxWidth:85,disableSortBy:!0},{id:"name",Header:"Name",accessor:c=>c.name||"",Cell:Wr,minWidth:100,searchable:!0},{id:"username",Header:"Username",accessor:c=>c.username||c.email,Cell:Wr,minWidth:100,searchable:!0},{Header:"Action",id:"Action",align:"center",Cell:({row:{original:c}})=>i(Lo,{children:i(wt,{title:"Remove user from group",arrow:!0,describeChild:!0,children:i(Ht,{onClick:()=>t(u=>u.filter(d=>d.id!==c.id)),children:i(er,{})})})}),maxWidth:100,disableSortBy:!0}],[t]),{headerGroups:o,rows:a,prepareRow:s,setHiddenColumns:l}=ct.exports.useTable({columns:r,data:e,sortTypes:Ar,autoResetSortBy:!1,disableSortRemove:!0,disableMultiSort:!0},ct.exports.useSortBy,ct.exports.useFlexLayout);return jp(l,Yue,n),i(F,{condition:a.length>0,show:i(Hs,{rows:a,headerGroups:o,prepareRow:s})})},Vs=()=>new URLSearchParams(Gr().search),xC=(e="",t="",n=[])=>{const o=Vs().get("name"),[a,s]=f.exports.useState(o||e),[l,c]=f.exports.useState(t),[u,d]=f.exports.useState(n),[p,h]=f.exports.useState({});return{name:a,setName:s,description:l,setDescription:c,users:u,setUsers:d,getGroupPayload:()=>({name:a,description:l,users:u.map(({id:y})=>({user:{id:y}}))}),clearErrors:()=>{h({})},errors:p,setErrors:h}},Kue=z("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),Xue=z("p")(({theme:e})=>({color:e.palette.text.secondary,marginBottom:e.spacing(1)})),Jue=z("div")(()=>({marginTop:"auto",display:"flex",justifyContent:"flex-end"})),Que=z(nt)(({theme:e})=>({marginLeft:e.spacing(3)})),W3=({open:e,setOpen:t,group:n})=>{const{refetchGroup:r}=Jv(n.id),{refetchGroups:o}=du(),{updateGroup:a,loading:s}=If(),{setToastData:l,setToastApiError:c}=tt(),{uiConfig:u}=st(),{users:d,setUsers:p,getGroupPayload:h}=xC(n.name,n.description,n.users);return f.exports.useEffect(()=>{p(n.users)},[n.users,e,p]),i(pu,{open:e,onClose:()=>{t(!1)},label:"Edit users",children:i(Un,{loading:s,modal:!0,title:"Edit users",description:"Groups is the best and easiest way to organize users and then use them in projects to assign a specific role in one go to all the users in a group.",documentationLink:"https://docs.getunleash.io/advanced/groups",documentationLinkLabel:"Groups documentation",formatApiCode:()=>`curl --location --request PUT '${u.unleashUrl}/api/admin/groups/${n.id}' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${JSON.stringify(h(),void 0,2)}'`,children:w(Kue,{onSubmit:async y=>{y.preventDefault();try{await a(n.id,h()),r(),o(),t(!1),l({title:"Group users saved successfully",type:"success"})}catch(g){c(Ue(g))}},children:[w("div",{children:[i(Xue,{children:"Edit users in this group"}),i(j3,{users:d,setUsers:p}),i(U3,{users:d,setUsers:p})]}),w(Jue,{children:[i(nt,{type:"submit",variant:"contained",color:"primary","data-testid":R$,children:"Save"}),i(Que,{onClick:()=>{t(!1)},children:"Cancel"})]})]})})})},Zue=z(Ct)(({theme:e})=>({textDecoration:"none",color:e.palette.text.primary})),ede=z("aside")(({theme:e})=>({padding:e.spacing(2.5),height:"100%",border:`1px solid ${e.palette.dividerAlternative}`,borderRadius:e.shape.borderRadiusLarge,boxShadow:e.boxShadows.card,display:"flex",flexDirection:"column",[e.breakpoints.up("md")]:{padding:e.spacing(4)},"&:hover":{transition:"background-color 0.2s ease-in-out",backgroundColor:e.palette.neutral.light}})),H3=z("div")(()=>({display:"flex",alignItems:"center",justifyContent:"space-between"})),tde=z(H3)(()=>({alignItems:"flex-start"})),nde=z(H3)(()=>({marginTop:"auto"})),rde=z("h2")(({theme:e})=>({fontSize:e.fontSizes.mainHeader,fontWeight:e.fontWeight.medium})),ode=z("div")(({theme:e})=>({display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody})),ade=z("p")(({theme:e})=>({color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody,marginTop:e.spacing(1),marginBottom:e.spacing(4)})),ide=z("span")(({theme:e})=>({color:e.palette.text.secondary,marginLeft:e.spacing(1)})),sde=z("div")(()=>({maxWidth:"50%"})),lde=z(kf)(()=>({marginRight:.5})),cde=({group:e})=>{var s;const[t,n]=f.exports.useState(!1),[r,o]=f.exports.useState(!1),a=Ye();return w(Ne,{children:[i(Zue,{to:`/admin/groups/${e.id}`,children:w(ede,{children:[w(tde,{children:[i(rde,{children:e.name}),i(ode,{children:i(Cue,{groupId:e.id,onEditUsers:()=>n(!0),onRemove:()=>o(!0)})})]}),i(ade,{children:e.description}),w(nde,{children:[i(F,{condition:((s=e.users)==null?void 0:s.length)>0,show:i(xue,{users:e.users}),elseShow:i(ide,{children:"This group has no users."})}),i(sde,{children:i(F,{condition:e.projects.length>0,show:e.projects.map(l=>i(wt,{title:"View project",arrow:!0,placement:"bottom-end",describeChild:!0,children:i(lde,{onClick:c=>{c.preventDefault(),a(`/projects/${l}/access`)},color:"secondary",icon:i(B3,{}),children:l})},l)),elseShow:i(wt,{title:"This group is not used in any project",arrow:!0,describeChild:!0,children:i(kf,{children:"Not used"})})})})]})]})},e.id),i(W3,{open:t,setOpen:n,group:e}),i(M3,{open:r,setOpen:o,group:e})]})},ude=()=>{const e=z("div")(({theme:n})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:n.spacing(6),marginLeft:"auto",marginRight:"auto"})),t=z(Te)(({theme:n})=>({fontSize:n.fontSizes.bodySize,marginBottom:n.spacing(2.5)}));return w(e,{children:[i(t,{children:"No groups available. Get started by adding a new group."}),i(nt,{to:"/admin/groups/create-group",component:Ct,variant:"outlined",color:"secondary",children:"Create your first group"})]})},dde=(e,t)=>{var o,a,s,l,c,u;const n=t.toLowerCase(),r={names:(o=e.users)==null?void 0:o.map(d=>{var p;return((p=d.name)==null?void 0:p.toLowerCase())||""}),usernames:(a=e.users)==null?void 0:a.map(d=>{var p;return((p=d.username)==null?void 0:p.toLowerCase())||""}),emails:(s=e.users)==null?void 0:s.map(d=>{var p;return((p=d.email)==null?void 0:p.toLowerCase())||""})};return e.name.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)||((l=r.names)==null?void 0:l.some(d=>d.includes(n)))||((c=r.usernames)==null?void 0:c.some(d=>d.includes(n)))||((u=r.emails)==null?void 0:u.some(d=>d.includes(n)))},pde=()=>{const e=Ye(),{groups:t=[],loading:n}=du(),[r,o]=Ls(),[a,s]=f.exports.useState(r.get("search")||""),l=an(oo.breakpoints.down("md"));f.exports.useEffect(()=>{const u={};a&&(u.search=a),o(u,{replace:!0})},[a,o]);const c=f.exports.useMemo(()=>{const u=t.sort((d,p)=>d.name.localeCompare(p.name));return a?u.filter(d=>dde(d,a)):u},[t,a]);return w(Gt,{isLoading:n,header:i(Dt,{title:`Groups (${c.length})`,actions:w(Ne,{children:[i(F,{condition:!l,show:w(Ne,{children:[i(jn,{initialValue:a,onChange:s}),i(Dt.Divider,{})]})}),i(oc,{onClick:()=>e("/admin/groups/create-group"),maxWidth:"700px",Icon:io,permission:sn,"data-testid":fne,children:"New group"})]}),children:i(F,{condition:l,show:i(jn,{initialValue:a,onChange:s})})}),children:[i(so,{value:a,children:i(de,{container:!0,spacing:2,children:c.map(u=>i(de,{item:!0,xs:12,md:6,children:i(cde,{group:u})},u.id))})}),i(F,{condition:!n&&c.length===0,show:i(F,{condition:(a==null?void 0:a.length)>0,show:w(Vt,{children:["No groups found matching \u201C",a,"\u201D"]}),elseShow:i(ude,{})})})]})},fde=()=>w("div",{children:[i(ac,{}),i(pde,{})]}),V3=({data:e={enabled:!1,autoCreate:!1},setValue:t})=>{const n=()=>{t("autoCreate",!e.autoCreate)},r=a=>{t("defaultRootRole",a.target.value)},o=a=>{t(a.target.name,a.target.value)};return w(f.exports.Fragment,{children:[w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Auto-create users"}),i("p",{children:"Enable automatic creation of new users when signing in."})]}),i(de,{item:!0,md:6,style:{padding:"20px"},children:i($n,{control:i(ro,{onChange:n,name:"enabled",checked:e.autoCreate,disabled:!e.enabled}),label:"Auto-create users"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Default Root Role"}),i("p",{children:"Choose which root role the user should get when no explicit role mapping exists."})]}),i(de,{item:!0,md:6,children:w(qo,{style:{minWidth:"200px"},children:[i(Iu,{id:"defaultRootRole-label",children:"Default Role"}),w(Nu,{label:"Default Role",labelId:"defaultRootRole-label",id:"defaultRootRole",name:"defaultRootRole",disabled:!e.autoCreate||!e.enabled,value:e.defaultRootRole||"Editor",onChange:r,children:[i(_r,{value:"Viewer",children:"Viewer"}),i(_r,{value:"Editor",children:"Editor"}),i(_r,{value:"Admin",children:"Admin"})]})]})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Email domains"}),i("p",{children:"Comma separated list of email domains that should be allowed to sign in."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:o,label:"Email domains",name:"emailDomains",disabled:!e.autoCreate||!e.enabled,required:Boolean(e.autoCreate),value:e.emailDomains||"",placeholder:"@company.com, @anotherCompany.com",style:{width:"400px"},rows:2,variant:"outlined",size:"small"})})]})]})},hde=async(e,t)=>{if(!!e){if(t){const n=await t.json();throw e({message:n.message}),new Error(n.message)}throw new Error}},Qv=e=>{const{makeRequest:t,createRequest:n,errors:r,loading:o}=Cr({propagateErrors:!0,handleBadRequest:hde});return{updateSettings:async s=>{const l=`api/admin/auth/${e}/settings`,c=n(l,{method:"POST",body:JSON.stringify(s)});try{await t(c.caller,c.id)}catch(u){throw u}},errors:r,loading:o}},Zv=(e,t={})=>{const n=async()=>{const u=bt(`api/admin/auth/${e}/settings`);return(await fetch(u,{method:"GET"}).then(rn("Auth settings"))).json()},r=`api/admin/auth/${e}/settings`,{data:o,error:a}=Wt(r,n,t),[s,l]=f.exports.useState(!a&&!o),c=()=>{Fn(r)};return f.exports.useEffect(()=>{l(!a&&!o)},[o,a]),{config:o||{},error:a,loading:s,refetch:c}},wC=e=>{const n=Object.entries(e).filter(([,r])=>r!=="");return Object.fromEntries(n)},mde={enabled:!1,enableSingleSignOut:!1,autoCreate:!1,unleashHostname:location.hostname,clientId:"",discoverUrl:"",secret:"",acrValues:""},gde=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),[r,o]=f.exports.useState(mde),{hasAccess:a}=f.exports.useContext(Jt),{config:s}=Zv("oidc"),{updateSettings:l,errors:c,loading:u}=Qv("oidc");if(f.exports.useEffect(()=>{s.discoverUrl&&o(s)},[s]),!a(sn))return i(yt,{severity:"error",children:"You need to be a root admin to access this section."});const d=y=>{m(y.target.name,y.target.value)},p=()=>{o(ee(V({},r),{enabled:!r.enabled}))},h=()=>{o(ee(V({},r),{enableSingleSignOut:!r.enableSingleSignOut}))},m=(y,g)=>{o(ee(V({},r),{[y]:g}))},b=async y=>{y.preventDefault();try{await l(wC(r)),e({title:"Settings stored",type:"success"})}catch(g){t(Ue(g))}};return w(Gt,{children:[i(de,{container:!0,style:{marginBottom:"1rem"},children:i(de,{item:!0,md:12,children:w(yt,{severity:"info",children:["Please read the"," ",i("a",{href:"https://www.unleash-hosted.com/docs/enterprise-authentication",target:"_blank",rel:"noreferrer",children:"documentation"})," ","to learn how to integrate with specific Open Id Connect providers (Okta, Keycloak, Google, etc). ",i("br",{}),"Callback URL:"," ",w("code",{children:[n.unleashUrl,"/auth/oidc/callback"]})]})})}),w("form",{onSubmit:b,children:[w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Enable"}),i("p",{children:"Enable Open Id Connect Authentication."})]}),i(de,{item:!0,md:6,style:{padding:"20px"},children:i($n,{control:i(ro,{onChange:p,value:r.enabled,name:"enabled",checked:r.enabled}),label:r.enabled?"Enabled":"Disabled"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Discover URL"}),i("p",{children:"(Required) Issuer discover metadata URL"})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Discover URL",name:"discoverUrl",value:r.discoverUrl,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Client ID"}),i("p",{children:"(Required) Client ID of your OpenID application"})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Client ID",name:"clientId",value:r.clientId,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),w(de,{container:!0,spacing:3,mb:4,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Client secret"}),w("p",{children:["(Required) Client secret of your OpenID application."," "]})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Client Secret",name:"secret",value:r.secret,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),i("h3",{children:"Optional Configuration"}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Enable Single Sign-Out"}),i("p",{children:"If you enable Single Sign-Out Unleash will redirect the user to the IDP as part of the Sign-out process."})]}),i(de,{item:!0,md:6,style:{padding:"20px"},children:i($n,{control:i(ro,{onChange:h,value:r.enableSingleSignOut,disabled:!r.enabled,name:"enableSingleSignOut",checked:r.enableSingleSignOut}),label:r.enableSingleSignOut?"Enabled":"Disabled"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"ACR Values"}),i("p",{children:'Requested Authentication Context Class Reference values. If multiple values are specified they should be "space" separated. Will be sent as "acr_values" as part of the authentication request. Unleash will validate the acr value in the id token claims against the list of acr values.'})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"ACR Values",name:"acrValues",value:r.acrValues,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small"})})]}),i(V3,{data:r,setValue:m}),i(de,{container:!0,spacing:3,children:w(de,{item:!0,md:12,children:[i(nt,{variant:"contained",color:"primary",type:"submit",disabled:u,children:"Save"})," ",i("p",{children:i("small",{style:{color:"red"},children:c==null?void 0:c.message})})]})})]})]})},vde={enabled:!1,autoCreate:!1,unleashHostname:location.hostname,entityId:"",signOnUrl:"",certificate:"",signOutUrl:"",spCertificate:""},yde=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),[r,o]=f.exports.useState(vde),{hasAccess:a}=f.exports.useContext(Jt),{config:s}=Zv("saml"),{updateSettings:l,errors:c,loading:u}=Qv("saml");if(f.exports.useEffect(()=>{s.entityId&&o(s)},[s]),!a(sn))return i(yt,{severity:"error",children:"You need to be a root admin to access this section."});const d=b=>{h(b.target.name,b.target.value)},p=()=>{o(ee(V({},r),{enabled:!r.enabled}))},h=(b,y)=>{o(ee(V({},r),{[b]:y}))},m=async b=>{b.preventDefault();try{await l(wC(r)),e({title:"Settings stored",type:"success"})}catch(y){t(Ue(y))}};return w(Gt,{children:[i(de,{container:!0,style:{marginBottom:"1rem"},children:i(de,{item:!0,md:12,children:w(yt,{severity:"info",children:["Please read the"," ",i("a",{href:"https://www.unleash-hosted.com/docs/enterprise-authentication",target:"_blank",rel:"noreferrer",children:"documentation"})," ","to learn how to integrate with specific SAML 2.0 providers (Okta, Keycloak, etc). ",i("br",{}),"Callback URL:"," ",w("code",{children:[n.unleashUrl,"/auth/saml/callback"]})]})})}),w("form",{onSubmit:m,children:[w(de,{container:!0,spacing:3,children:[w(de,{item:!0,md:5,mb:2,children:[i("strong",{children:"Enable"}),i("p",{children:"Enable SAML 2.0 Authentication."})]}),i(de,{item:!0,md:6,children:i($n,{control:i(ro,{onChange:p,value:r.enabled,name:"enabled",checked:r.enabled}),label:r.enabled?"Enabled":"Disabled"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Entity ID"}),i("p",{children:"(Required) The Entity Identity provider issuer."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Entity ID",name:"entityId",value:r.entityId,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Single Sign-On URL"}),i("p",{children:"(Required) The url to redirect the user to for signing in."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Single Sign-On URL",name:"signOnUrl",value:r.signOnUrl,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),w(de,{container:!0,spacing:3,mb:4,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"X.509 Certificate"}),i("p",{children:"(Required) The certificate used to sign the SAML 2.0 request."})]}),i(de,{item:!0,md:7,children:i(At,{onChange:d,label:"X.509 Certificate",name:"certificate",value:r.certificate,disabled:!r.enabled,style:{width:"100%"},InputProps:{style:{fontSize:"0.6em",fontFamily:"monospace"}},multiline:!0,rows:14,maxRows:14,variant:"outlined",size:"small",required:!0})})]}),i("h3",{children:"Optional Configuration"}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Single Sign-out URL"}),i("p",{children:"(Optional) The url to redirect the user to for signing out of the IDP."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Single Sign-out URL",name:"signOutUrl",value:r.signOutUrl,disabled:!r.enabled,style:{width:"400px"},variant:"outlined",size:"small"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Service Provider X.509 Certificate"}),i("p",{children:"(Optional) The private certificate used by the Service Provider used to sign the SAML 2.0 request towards the IDP. E.g. used to sign single logout requests (SLO)."})]}),i(de,{item:!0,md:7,children:i(At,{onChange:d,label:"X.509 Certificate",name:"spCertificate",value:r.spCertificate,disabled:!r.enabled,style:{width:"100%"},InputProps:{style:{fontSize:"0.6em",fontFamily:"monospace"}},multiline:!0,rows:14,maxRows:14,variant:"outlined",size:"small"})})]}),i(V3,{data:r,setValue:h}),i(de,{container:!0,spacing:3,children:w(de,{item:!0,md:5,children:[i(nt,{variant:"contained",color:"primary",type:"submit",disabled:u,children:"Save"})," ",i("p",{children:i("small",{style:{color:"red"},children:c==null?void 0:c.message})})]})})]})]})},bde=()=>{const{setToastData:e,setToastApiError:t}=tt(),{config:n}=Zv("simple"),[r,o]=f.exports.useState(!1),{updateSettings:a,errors:s,loading:l}=Qv("simple"),{hasAccess:c}=f.exports.useContext(Jt);return f.exports.useEffect(()=>{o(!!n.disabled)},[n.disabled]),c(sn)?i(Gt,{children:w("form",{onSubmit:async p=>{p.preventDefault();try{await a({disabled:r}),e({title:"Successfully saved",text:"Password authentication settings stored.",autoHideDuration:4e3,type:"success",show:!0})}catch(h){t(Ue(h)),o(n.disabled)}},children:[w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Password based login"}),i("p",{children:"Allow users to login with username & password"})]}),i(de,{item:!0,md:6,style:{padding:"20px"},children:i($n,{control:i(ro,{onChange:()=>{o(!r)},value:!r,name:"disabled",checked:!r}),label:r?"Disabled":"Enabled"})})]}),i(de,{container:!0,spacing:3,children:w(de,{item:!0,md:12,children:[i(nt,{variant:"contained",color:"primary",type:"submit",disabled:l,children:"Save"})," ",i("p",{children:i("small",{style:{color:"red"},children:s==null?void 0:s.message})})]})})]})}):i(yt,{severity:"error",children:"You need to be a root admin to access this section."})},xde={enabled:!1,autoCreate:!1,unleashHostname:location.hostname,clientId:"",clientSecret:"",emailDomains:""},wde=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),[r,o]=f.exports.useState(xde),{hasAccess:a}=f.exports.useContext(Jt),{config:s}=Zv("google"),{updateSettings:l,errors:c,loading:u}=Qv("google");if(f.exports.useEffect(()=>{s.clientId&&o(s)},[s]),!a(sn))return i("span",{children:"You need admin privileges to access this section."});const d=b=>{o(ee(V({},r),{[b.target.name]:b.target.value}))},p=()=>{o(ee(V({},r),{enabled:!r.enabled}))},h=()=>{o(ee(V({},r),{autoCreate:!r.autoCreate}))},m=async b=>{b.preventDefault();try{await l(wC(r)),e({title:"Settings stored",type:"success"})}catch(y){t(Ue(y))}};return w(Gt,{children:[i(de,{container:!0,style:{marginBottom:"1rem"},children:i(de,{item:!0,xs:12,children:w(yt,{severity:"info",children:["Please read the"," ",i("a",{href:"https://www.unleash-hosted.com/docs/enterprise-authentication/google",target:"_blank",rel:"noreferrer",children:"documentation"})," ","to learn how to integrate with Google OAuth 2.0. ",i("br",{}),"Callback URL:"," ",w("code",{children:[n.unleashUrl,"/auth/google/callback"]})]})})}),w("form",{onSubmit:m,children:[w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,xs:5,children:[i("strong",{children:"Enable"}),i("p",{children:"Enable Google users to login. Value is ignored if Client ID and Client Secret are not defined."})]}),i(de,{item:!0,xs:6,style:{padding:"20px"},children:i($n,{control:i(ro,{onChange:p,value:r.enabled,name:"enabled",checked:r.enabled}),label:r.enabled?"Enabled":"Disabled"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,xs:5,children:[i("strong",{children:"Client ID"}),i("p",{children:"(Required) The Client ID provided by Google when registering the application."})]}),i(de,{item:!0,xs:6,children:i(At,{onChange:d,label:"Client ID",name:"clientId",placeholder:"",value:r.clientId,style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Client Secret"}),i("p",{children:"(Required) Client Secret provided by Google when registering the application."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Client Secret",name:"clientSecret",value:r.clientSecret,placeholder:"",style:{width:"400px"},variant:"outlined",size:"small",required:!0})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Unleash hostname"}),w("p",{children:["(Required) The hostname you are running Unleash on that Google should send the user back to. The final callback URL will be"," ",i("small",{children:i("code",{children:"https://[unleash.hostname.com]/auth/google/callback"})})]})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Unleash Hostname",name:"unleashHostname",placeholder:"",value:r.unleashHostname||"",style:{width:"400px"},variant:"outlined",size:"small"})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Auto-create users"}),i("p",{children:"Enable automatic creation of new users when signing in with Google."})]}),i(de,{item:!0,md:6,style:{padding:"20px"},children:i(ro,{onChange:h,name:"enabled",checked:r.autoCreate})})]}),w(de,{container:!0,spacing:3,mb:2,children:[w(de,{item:!0,md:5,children:[i("strong",{children:"Email domains"}),i("p",{children:"(Optional) Comma separated list of email domains that should be allowed to sign in."})]}),i(de,{item:!0,md:6,children:i(At,{onChange:d,label:"Email domains",name:"emailDomains",value:r.emailDomains,placeholder:"@company.com, @anotherCompany.com",style:{width:"400px"},rows:2,multiline:!0,variant:"outlined",size:"small"})})]}),i(de,{container:!0,spacing:3,children:w(de,{item:!0,md:5,children:[i(nt,{variant:"contained",color:"primary",type:"submit",disabled:u,children:"Save"})," ",i("p",{children:i("small",{style:{color:"red"},children:c==null?void 0:c.message})})]})})]})]})},Sde=le()(e=>({tabNav:{backgroundColor:e.palette.background.paper,borderBottom:"1px solid",borderBottomColor:e.palette.grey[300],borderRadius:0},tab:{[e.breakpoints.up("lg")]:{minWidth:160}}})),Cde=({children:e,value:t,index:n})=>i("div",{role:"tabpanel",hidden:t!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,children:t===n&&e}),G3=({tabData:e,className:t="",navClass:n="",startingTab:r=0})=>{const{classes:o}=Sde(),[a,s]=f.exports.useState(r),l=()=>e.map((u,d)=>i(Ha,{label:u.label,id:`tab-${d}`,"aria-controls":`tabpanel-${d}`,className:o.tab},`${u.label}_${d}`)),c=()=>e.map((u,d)=>i(Cde,{value:a,index:d,children:u.component},d));return w(Ne,{children:[i(yr,{className:it(o.tabNav,n),elevation:0,children:i(bv,{value:a,onChange:(u,d)=>{s(d)},indicatorColor:"primary",textColor:"primary",centered:!0,children:l()})}),i("div",{className:t,children:c()})]})},Ede=()=>{const{authenticationType:e}=st().uiConfig;return w("div",{children:[i(ac,{}),w(Gt,{header:"Single Sign-On",children:[i(F,{condition:e==="enterprise",show:i(G3,{tabData:[{label:"OpenID Connect",component:i(gde,{})},{label:"SAML 2.0",component:i(yde,{})},{label:"Password",component:i(bde,{})},{label:"Google",component:i(wde,{})}]})}),i(F,{condition:e==="open-source",show:i(yt,{severity:"warning",children:"You are running the open-source version of Unleash. You have to use the Enterprise edition in order configure Single Sign-on."})}),i(F,{condition:e==="demo",show:i(yt,{severity:"warning",children:"You are running Unleash in demo mode. You have to use the Enterprise edition in order configure Single Sign-on."})}),i(F,{condition:e==="custom",show:i(yt,{severity:"warning",children:"You have decided to use custom authentication type. You have to use the Enterprise edition in order configure Single Sign-on from the user interface."})}),i(F,{condition:e==="hosted",show:i(yt,{severity:"info",children:"Your Unleash instance is managed by the Unleash team."})})]})]})},Tde=le()(e=>({login:{width:"350px",maxWidth:"350px",[e.breakpoints.down("sm")]:{width:"100%"}},loginContainer:{minHeight:"100vh",width:"100%"},container:{display:"flex",height:"100%",flexWrap:"wrap"},contentContainer:{width:"50%",padding:"4rem 3rem",minHeight:"100vh",[e.breakpoints.down("md")]:{width:"100%",minHeight:"auto"}},title:{fontSize:e.fontSizes.mainHeader,marginBottom:"1rem",textAlign:"center"},logo:{marginRight:"10px",width:"40px",height:"30px"},subTitle:{fontSize:"1.25rem"},loginFormContainer:{display:"flex",flexDirection:"column"},imageContainer:{display:"flex",justifyContent:"center",marginTop:"8rem"}})),Rde=()=>w(yt,{severity:"success",children:[i(nS,{children:"Success"}),"You successfully reset your password."]}),kde=a=>{var s=a,{children:e,from:t,to:n,style:r}=s,o=en(s,["children","from","to","style"]);return i("div",ee(V({style:V({background:`linear-gradient(${t}, ${n})`,height:"100%",width:"100%",position:"relative"},r)},o),{children:e}))},_de=e=>f.exports.createElement("svg",V({width:334,height:334,viewBox:"0 0 334 334",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("circle",{cx:167,cy:167,r:167,fill:"white"}),f.exports.createElement("rect",{x:96.3462,y:96.3457,width:44.9615,height:141.308,fill:"#1A4049"}),f.exports.createElement("rect",{x:192.692,y:96.3457,width:44.9615,height:141.308,fill:"#1A4049"}),f.exports.createElement("path",{d:"M237.654 192.693L237.654 237.655L96.3461 237.655L96.3461 192.693L237.654 192.693Z",fill:"#1A4049"}),f.exports.createElement("rect",{x:192.692,y:192.693,width:44.9615,height:44.9615,fill:"#817AFE"})),Ide=e=>f.exports.createElement("svg",V({id:"bg",width:"100%",height:"100%",viewBox:"0 0 622 318",fill:"none"},e),f.exports.createElement("defs",null,f.exports.createElement("style",null,".cls-1{fill:#fff;}.cls-2{fill:#1a4049;}.cls-3{fill:#817afe;}")),f.exports.createElement("circle",{className:"cls-1",cx:125.62,cy:125.62,r:80}),f.exports.createElement("polygon",{className:"cls-1",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-1",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("polygon",{className:"cls-2",points:"137.05 91.33 137.05 114.19 137.05 137.05 159.9 137.05 159.9 114.19 159.9 91.33 137.05 91.33"}),f.exports.createElement("polygon",{className:"cls-2",points:"114.19 114.19 114.19 91.33 91.33 91.33 91.33 114.19 91.33 137.05 91.33 159.9 114.19 159.9 137.05 159.9 137.05 137.05 114.19 137.05 114.19 114.19"}),f.exports.createElement("rect",{className:"cls-3",x:137.05,y:137.05,width:22.86,height:22.86}),f.exports.createElement("path",{className:"cls-1",d:"M251.58,139.13V112.77h11.93v25.06c0,7.36,3.91,12.2,11.27,12.2s11.27-4.84,11.27-12.2V112.77h12v26.36c0,12.67-8.48,21.8-23.1,21.8C260.06,160.93,251.58,151.8,251.58,139.13Z"}),f.exports.createElement("path",{className:"cls-1",d:"M321.91,159.9H310.08V112.77h11.83v7.92a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"}),f.exports.createElement("path",{className:"cls-1",d:"M369.42,91.34h11.92V159.9H369.42Z"}),f.exports.createElement("path",{className:"cls-1",d:"M441.24,137v1.3H403.79c.47,7.36,5.87,13,13.69,13,7.55,0,10.62-3.82,11.46-5.12h11.74c-.75,4.84-7.17,15-23.2,15-15.27,0-25.61-10.61-25.61-24.77,0-14.63,10.24-24.78,24.68-24.78S441.24,121.62,441.24,137Zm-37.08-6.9h24.6c-1.77-6-6.15-9.31-12.21-9.31C410.12,120.78,405.65,124.23,404.16,130.09Z"}),f.exports.createElement("path",{className:"cls-1",d:"M467.78,130.37h15.47c0-5.68-4.29-9.31-11.27-9.31-6.62,0-9,3.54-9.78,4.75h-12c1-4.94,6.89-14.25,21.8-14.25,14.62,0,22.73,7.64,22.73,18.81V146.3c0,2.89,1,4,3.72,4.29v9.59h-3.72c-6.06-.09-9.69-2.33-11-6.52-2.23,3.45-7.26,7.27-15.27,7.27-11.09,0-19.47-6.24-19.47-15.93S456.14,130.37,467.78,130.37Zm15.47,12.11v-4H469.74c-5.59,0-9,2-9,6.33,0,4.57,4.29,7.27,10.25,7.27C477.66,152.08,483.25,148.82,483.25,142.48Z"}),f.exports.createElement("path",{className:"cls-1",d:"M523.12,140.62c-10.34-.74-17.33-5.59-17.33-14.72,0-8.85,8.1-14.44,20.77-14.44,17,0,21.8,8.76,23.1,13.32H537.09c-.84-1-3.54-4.28-10.62-4.28-5.68,0-8.66,1.86-8.66,4.75,0,2.61,2,4.29,6.7,4.94l8,.84c12.77,1.11,18,6,18,15.27,0,8.85-7.36,14.91-21.8,14.91-17.51,0-23.19-10.16-24.12-14.53h12.76c.47,1.11,3.35,5.31,11.36,5.31,6.62,0,9.69-2.24,9.69-5.22s-1.67-4.66-7-5.31C528.05,141.18,526.38,141,523.12,140.62Z"}),f.exports.createElement("path",{className:"cls-1",d:"M571.55,159.9H559.72V91.34h11.83v29.35a17.93,17.93,0,0,1,15.65-9c11.83,0,19.66,8.67,19.66,20.68V159.9h-12V134.75c0-7.45-4.38-12.39-11.46-12.39s-11.83,5-11.83,12.39Z"})),Ade=le()(e=>({gradient:{display:"flex",justifyContent:"center",[e.breakpoints.up("sm")]:{borderBottomLeftRadius:"3px",borderTopLeftRadius:"3px"}},title:{color:"#fff",marginBottom:"1rem",fontSize:"2rem",marginTop:"5rem",[e.breakpoints.down("md")]:{display:"none"}},container:{padding:"6rem 4rem",color:"#fff",position:"relative",borderTopLeftRadius:"3px",borderBottomLeftRadius:"3px",textAlign:"right",[e.breakpoints.down("md")]:{padding:"3rem 2rem"},[e.breakpoints.down("sm")]:{padding:"3rem 1rem"}},bannerSubtitle:{[e.breakpoints.down("md")]:{display:"none"},[e.breakpoints.down("sm")]:{display:"none"},fontSize:"2rem",fontWeight:"normal"},logoContainer:{position:"absolute",[e.breakpoints.up("md")]:{bottom:"-50px",left:"-50px",display:"flex",flexDirection:"column"}},logo:{width:"200px",[e.breakpoints.up("md")]:{width:"240px",height:"200px"}}})),q3=({title:e,children:t})=>{const n=pn(),{classes:r}=Ade(),o=an(n.breakpoints.down("md"));return w(kde,{from:n.palette.standaloneBannerGradient.from,to:n.palette.standaloneBannerGradient.to,className:r.gradient,children:[w("div",{className:r.container,children:[i(Te,{variant:"h1",className:r.title,children:e}),i(Te,{className:r.bannerSubtitle,children:"Committed to creating new ways of developing software"})]}),i("div",{className:r.logoContainer,children:i(F,{condition:o,show:i(Ide,{className:r.logo,"aria-label":"Unleash logo"}),elseShow:i(_de,{className:r.logo,"aria-label":"Unleash logo"})})})]})},Nde=le()(e=>({container:{padding:"5.5rem",background:e.palette.standaloneBackground,display:"flex",[e.breakpoints.down("md")]:{flexDirection:"column"},[e.breakpoints.down("sm")]:{padding:"0"},minHeight:"100vh"},leftContainer:{width:"40%",borderRadius:e.shape.borderRadius,[e.breakpoints.down("md")]:{borderRadius:"0",width:"100%",minHeight:"auto"}},rightContainer:{width:"60%",flex:"1",borderTopRightRadius:"3px",borderBottomRightRadius:"3px",backgroundColor:e.palette.background.paper,position:"relative",[e.breakpoints.down("md")]:{borderRadius:"0",width:"100%",position:"static",minHeight:"auto"}},title:{fontWeight:"bold",fontSize:"1.2rem",marginBottom:"1rem"},innerRightContainer:{display:"flex",justifyContent:"center",height:"100%",padding:"6rem 3rem",[e.breakpoints.down("md")]:{padding:"2rem 2rem"},[e.breakpoints.down("sm")]:{padding:"2rem 1rem"}}})),ey=({children:e,BannerComponent:t})=>{const{classes:n}=Nde();let r=i(q3,{title:"Unleash"});return t&&(r=t),w("div",{className:n.container,children:[i("header",{className:n.leftContainer,children:r}),i("main",{className:n.rightContainer,children:i("div",{className:n.innerRightContainer,children:e})})]})},$de="unsecure",Y3="demo",Pde="password",Ode="enterprise-hosted",Dde="_container_wn392_1",Lde="_button_wn392_10";var d5={container:Dde,button:Lde};const ty=()=>{const{makeRequest:e,errors:t,loading:n}=Cr({propagateErrors:!0});return{passwordAuth:(a,s,l)=>{const c={caller:()=>fetch(a,{headers:qm,method:"POST",body:JSON.stringify({username:s,password:l})}),id:"passwordAuth"};return e(c.caller,c.id)},emailAuth:(a,s)=>{const l={caller:()=>fetch(a,{headers:qm,method:"POST",body:JSON.stringify({email:s})}),id:"emailAuth"};return e(l.caller,l.id)},errors:t,loading:n}},Mde=({authDetails:e,redirect:t})=>{const[n,r]=f.exports.useState(""),{refetchUser:o}=yi(),{emailAuth:a}=ty(),s=Ye(),{setToastApiError:l}=tt(),c=async d=>{d.preventDefault();try{await a(e.path,n),o(),s(t)}catch(p){l(Ue(p))}},u=d=>{const p=d.target.value;r(p)};return i("form",{onSubmit:c,children:w("div",{className:d5.container,children:[i("p",{children:e.message}),w("p",{children:["This instance of Unleash is not set up with a secure authentication provider. You can read more about"," ",i("a",{href:"https://github.com/Unleash/unleash/blob/master/docs/securing-unleash.md",target:"_blank",rel:"noreferrer",children:"securing Unleash on GitHub"})]}),i(At,{value:n,onChange:u,inputProps:{"data-testid":"email-input-field"},size:"small",variant:"outlined",label:"Email",name:"email",id:"email",required:!0,type:"email","data-testid":Dv,autoFocus:!0}),i("br",{}),i("div",{children:i(nt,{type:"submit",variant:"contained",color:"primary",className:d5.button,"data-testid":Lv,children:"Sign in"})})]})})},Bde=({authDetails:e})=>w("div",{children:[i("p",{children:e.message}),i(IV,{style:{textAlign:"center"},children:i("a",{href:e.path,style:{width:"100%"},children:i(nt,{variant:"contained",color:"primary",style:{width:"150px",margin:"0 auto"},children:"Sign In"})})})]}),Fde=le()(e=>({loginContainer:{minWidth:"350px",[e.breakpoints.down("sm")]:{width:"100%",minWidth:"auto"}},contentContainer:{display:"flex",flexDirection:"column"},apiError:{color:e.palette.error.main,marginBottom:"0.5rem"}})),zde=e=>f.exports.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",width:"46px",height:"46px",viewBox:"0 0 46 46"},e),f.exports.createElement("defs",null,f.exports.createElement("filter",{x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"objectBoundingBox",id:"filter-1"},f.exports.createElement("feOffset",{dx:0,dy:1,in:"SourceAlpha",result:"shadowOffsetOuter1"}),f.exports.createElement("feGaussianBlur",{stdDeviation:.5,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),f.exports.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.168 0",in:"shadowBlurOuter1",type:"matrix",result:"shadowMatrixOuter1"}),f.exports.createElement("feOffset",{dx:0,dy:0,in:"SourceAlpha",result:"shadowOffsetOuter2"}),f.exports.createElement("feGaussianBlur",{stdDeviation:.5,in:"shadowOffsetOuter2",result:"shadowBlurOuter2"}),f.exports.createElement("feColorMatrix",{values:"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.084 0",in:"shadowBlurOuter2",type:"matrix",result:"shadowMatrixOuter2"}),f.exports.createElement("feMerge",null,f.exports.createElement("feMergeNode",{in:"shadowMatrixOuter1"}),f.exports.createElement("feMergeNode",{in:"shadowMatrixOuter2"}),f.exports.createElement("feMergeNode",{in:"SourceGraphic"}))),f.exports.createElement("rect",{id:"path-2",x:0,y:0,width:40,height:40,rx:2})),f.exports.createElement("g",{id:"Google-Button",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},f.exports.createElement("g",{id:"9-PATCH",transform:"translate(-608.000000, -160.000000)"}),f.exports.createElement("g",{id:"btn_google_light_normal",transform:"translate(-1.000000, -1.000000)"},f.exports.createElement("g",{id:"button",transform:"translate(4.000000, 4.000000)",filter:"url(#filter-1)"},f.exports.createElement("g",{id:"button-bg"},f.exports.createElement("use",{fill:"#FFFFFF",fillRule:"evenodd"}),f.exports.createElement("use",{fill:"none"}),f.exports.createElement("use",{fill:"none"}),f.exports.createElement("use",{fill:"none"}))),f.exports.createElement("g",{id:"logo_googleg_48dp",transform:"translate(15.000000, 15.000000)"},f.exports.createElement("path",{d:"M17.64,9.20454545 C17.64,8.56636364 17.5827273,7.95272727 17.4763636,7.36363636 L9,7.36363636 L9,10.845 L13.8436364,10.845 C13.635,11.97 13.0009091,12.9231818 12.0477273,13.5613636 L12.0477273,15.8195455 L14.9563636,15.8195455 C16.6581818,14.2527273 17.64,11.9454545 17.64,9.20454545 L17.64,9.20454545 Z",id:"Shape",fill:"#000"}),f.exports.createElement("path",{d:"M9,18 C11.43,18 13.4672727,17.1940909 14.9563636,15.8195455 L12.0477273,13.5613636 C11.2418182,14.1013636 10.2109091,14.4204545 9,14.4204545 C6.65590909,14.4204545 4.67181818,12.8372727 3.96409091,10.71 L0.957272727,10.71 L0.957272727,13.0418182 C2.43818182,15.9831818 5.48181818,18 9,18 L9,18 Z",id:"Shape",fill:"#000"}),f.exports.createElement("path",{d:"M3.96409091,10.71 C3.78409091,10.17 3.68181818,9.59318182 3.68181818,9 C3.68181818,8.40681818 3.78409091,7.83 3.96409091,7.29 L3.96409091,4.95818182 L0.957272727,4.95818182 C0.347727273,6.17318182 0,7.54772727 0,9 C0,10.4522727 0.347727273,11.8268182 0.957272727,13.0418182 L3.96409091,10.71 L3.96409091,10.71 Z",id:"Shape",fill:"#000"}),f.exports.createElement("path",{d:"M9,3.57954545 C10.3213636,3.57954545 11.5077273,4.03363636 12.4404545,4.92545455 L15.0218182,2.34409091 C13.4631818,0.891818182 11.4259091,0 9,0 C5.48181818,0 2.43818182,2.01681818 0.957272727,4.95818182 L3.96409091,7.29 C4.67181818,5.16272727 6.65590909,3.57954545 9,3.57954545 L9,3.57954545 Z",id:"Shape",fill:"#000"}),f.exports.createElement("path",{d:"M0,0 L18,0 L18,18 L0,18 L0,0 Z",id:"Shape"})),f.exports.createElement("g",{id:"handles_square"}))));var SC={},jde=yn.exports;Object.defineProperty(SC,"__esModule",{value:!0});var K3=SC.default=void 0,Ude=jde(bn),Wde=Cn,Hde=(0,Ude.default)((0,Wde.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z"}),"LockRounded");K3=SC.default=Hde;const CC=({options:e})=>{const{classes:t}=Yn();return i(Ne,{children:e==null?void 0:e.map(n=>i("div",{className:it(t.flexColumn,t.contentSpacingY),children:i(nt,{color:"primary","data-loading":!0,variant:"outlined",href:n.path,size:"small","data-testid":`${Une}-${n.type}`,style:{height:"40px",color:"#000"},startIcon:i(F,{condition:n.type==="google",show:i(zde,{style:{height:"35px",width:"35px"}}),elseShow:i(K3,{style:{height:"25px",width:"25px"}})}),children:n.message})},n.type))})},Vde=le()(e=>({container:{display:"flex",alignItems:"center",justifyContent:"center",margin:"1rem auto"},wing:{width:"80px",height:"3px",backgroundColor:e.palette.divider,borderRadius:e.shape.borderRadius},text:{textAlign:"center",display:"block",margin:"0 1rem"}})),Wp=n=>{var r=n,{text:e}=r,t=en(r,["text"]);const{classes:o}=Vde();return w("div",ee(V({className:o.container},t),{children:[i("span",{className:o.wing}),i(Te,{variant:"body2",className:o.text,children:e}),i("span",{className:o.wing})]}))},Gde=({authDetails:e,redirect:t})=>{const{classes:n}=Yn(),{classes:r}=Fde(),o=Ye(),{refetchUser:a}=yi(),s=Vs(),[l,c]=f.exports.useState(s.get("email")||""),[u,d]=f.exports.useState(""),{passwordAuth:p}=ty(),[h,m]=f.exports.useState({}),b=async x=>{if(x.preventDefault(),l||m(v=>ee(V({},v),{usernameError:"This is a required field"})),u||m(v=>ee(V({},v),{passwordError:"This is a required field"})),!(!u||!l))try{await p(e.path,l,u),a(),o(t)}catch(v){v instanceof Ov||v instanceof $S?(m(S=>ee(V({},S),{apiError:"Invalid login details"})),d(""),c("")):v instanceof NS?m({apiError:"Invalid password and username combination."}):m({apiError:"Unknown error while trying to authenticate."})}},y=()=>{const{usernameError:x,passwordError:v,apiError:S}=h;return i(F,{condition:!e.defaultHidden,show:w("form",{onSubmit:b,children:[i(F,{condition:Boolean(S),show:i(yt,{severity:"error",className:r.apiError,children:S})}),w("div",{className:it(r.contentContainer,n.contentSpacingY),children:[i(At,{label:"Username or email",name:"username",id:"username",type:"text",onChange:E=>c(E.target.value),value:l,error:Boolean(x),helperText:x,autoComplete:"username","data-testid":Dv,variant:"outlined",size:"small",autoFocus:!0}),i(lu,{label:"Password",onChange:E=>d(E.target.value),name:"password",id:"password",value:u,error:Boolean(v),helperText:v,autoComplete:"current-password","data-testid":k$}),i(nt,{variant:"contained",color:"primary",type:"submit",style:{width:"150px",margin:"1rem auto"},"data-testid":Lv,children:"Sign in"})]})]})})},{options:g=[]}=e;return i(Ne,{children:i(F,{condition:g.length>0,show:w(Ne,{children:[i(CC,{options:g}),i(F,{condition:!e.defaultHidden,show:i(Wp,{text:"Or sign in with username"})}),y()]}),elseShow:y()})})},qde=le()(e=>({loginContainer:{minWidth:"350px",[e.breakpoints.down("sm")]:{width:"100%",minWidth:"auto"}},contentContainer:{display:"flex",flexDirection:"column"},apiError:{color:e.palette.error.main},button:{width:"150px",margin:"1rem auto 0 auto",display:"block",textAlign:"center"}})),Yde=({authDetails:e,redirect:t})=>{const{classes:n}=Yn(),{classes:r}=qde(),{refetchUser:o}=yi(),a=Ye(),s=Vs(),{passwordAuth:l}=ty(),[c,u]=f.exports.useState(s.get("email")||""),[d,p]=f.exports.useState(""),[h,m]=f.exports.useState({}),b=async S=>{if(S.preventDefault(),c||m(E=>ee(V({},E),{usernameError:"This is a required field"})),d||m(E=>ee(V({},E),{passwordError:"This is a required field"})),!(!d||!c))try{await l(e.path,c,d),o(),a(t)}catch(E){E instanceof Ov||E instanceof $S?(m(R=>ee(V({},R),{apiError:"Invalid login details"})),p(""),u("")):m({apiError:"Unknown error while trying to authenticate."})}},{usernameError:y,passwordError:g,apiError:x}=h,{options:v=[]}=e;return w(Ne,{children:[i(F,{condition:v.length>0,show:w(Ne,{children:[i(CC,{options:v}),i(Wp,{text:"or signin with username"})]})}),i(F,{condition:!e.defaultHidden,show:w("form",{onSubmit:b,children:[i(Te,{variant:"subtitle2",className:r.apiError,children:x}),w("div",{className:it(r.contentContainer,n.contentSpacingY),children:[i(At,{label:"Username or email",name:"username",id:"username",type:"text",onChange:S=>u(S.target.value),value:c,error:Boolean(y),helperText:y,variant:"outlined",size:"small","data-testid":Dv}),i(lu,{label:"Password",onChange:S=>p(S.target.value),name:"password",id:"password",value:d,error:Boolean(g),helperText:g,autoComplete:"current-password","data-testid":k$}),i(de,{container:!0,children:i(nt,{variant:"contained",color:"primary",type:"submit",className:r.button,"data-testid":Lv,children:"Sign in"})})]})]})})]})},Kde="_container_abcn7_1",Xde="_emailField_abcn7_9",Jde="_form_abcn7_13",Qde="_logo_abcn7_17",Zde="_button_abcn7_24";var vd={container:Kde,emailField:Xde,form:Jde,logo:Qde,button:Zde};const epe=e=>f.exports.createElement("svg",V({width:52,height:52,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("circle",{cx:26,cy:26,r:26,fill:"white"}),f.exports.createElement("rect",{x:15,y:15,width:7,height:22,fill:"#1A4049"}),f.exports.createElement("rect",{x:30,y:15,width:7,height:22,fill:"#1A4049"}),f.exports.createElement("path",{d:"M37 30L37 37L15 37L15 30L37 30Z",fill:"#1A4049"}),f.exports.createElement("rect",{x:30,y:30,width:7,height:7,fill:"#817AFE"})),tpe=({authDetails:e,redirect:t})=>{const[n,r]=f.exports.useState(""),o=Ye(),{refetchUser:a}=yi(),{emailAuth:s}=ty(),{setToastApiError:l}=tt(),c=async d=>{d.preventDefault();try{await s(e.path,n),a(),o(t)}catch(p){l(Ue(p))}},u=d=>{const p=d.target.value;r(p)};return w("form",{onSubmit:c,children:[i(epe,{className:vd.logo,"aria-label":"Unleash logo"}),w("div",{className:vd.container,children:[i("h2",{children:"Access the Unleash demo instance"}),i("p",{children:"No further data or Credit Card required"}),w("div",{className:vd.form,children:[i(At,{value:n,className:vd.emailField,onChange:u,inputProps:{"data-testid":"email-input-field"},size:"small",variant:"outlined",label:"Email",name:"email",id:"email","data-testid":Dv,required:!0,type:"email"}),i(nt,{type:"submit",variant:"contained",color:"primary",className:vd.button,"data-testid":Lv,children:"Sign in"})]}),w("p",{children:["By accessing our demo instance, you agree to the Unleash\xA0",i("a",{href:"https://www.unleash-hosted.com/tos/",target:"_blank",rel:"noreferrer",children:"Customer Terms of Service"})," ","and\xA0",i("a",{href:"https://www.unleash-hosted.com/privacy-policy/",target:"_blank",rel:"noreferrer",children:"Privacy Policy"})]})]})]})},npe=le()(e=>({container:{margin:"auto auto 0 auto",width:"230px",[e.breakpoints.down("md")]:{marginTop:"1rem"}},link:{fontWeight:"bold",textAlign:"center"},text:{fontWeight:"bold",marginBottom:"0.5rem"}})),p5=()=>{const{classes:e}=npe();return w("div",{className:e.container,children:[i(Ct,{to:"/forgotten-password",className:e.link,children:i(Te,{variant:"body2",className:e.text,children:"Forgot password?"})}),w(Te,{variant:"body2",children:["Don't have an account?"," ",i("a",{href:"https://www.getunleash.io/plans",target:"_blank",rel:"noopener noreferrer",className:e.link,children:"Sign up"})]})]})},ny=()=>{const e=Tf();return{authDetails:e.data&&"type"in e.data?e.data:void 0,refetchAuthDetails:e.refetchAuth,loading:e.loading,error:e.error}},rpe=({redirect:e})=>{const{authDetails:t}=ny(),r=Vs().get("errorMsg");if(!t)return null;let o;return t.type===Pde?o=w(Ne,{children:[i(Gde,{authDetails:t,redirect:e}),i(F,{condition:!t.defaultHidden,show:i(p5,{})})]}):t.type===$de?o=i(Mde,{authDetails:t,redirect:e}):t.type===Y3?o=i(tpe,{authDetails:t,redirect:e}):t.type===Ode?o=w(Ne,{children:[i(Yde,{authDetails:t,redirect:e}),i(F,{condition:!t.defaultHidden,show:i(p5,{})})]}):o=i(Bde,{authDetails:t}),w(Ne,{children:[i("div",{style:{maxWidth:"350px"},"data-testid":nre,children:i(F,{condition:Boolean(r),show:i(yt,{severity:"error",children:r})})}),o]})},ope=e=>{const t=new URL(decodeURIComponent(e),window.location.protocol+"//"+window.location.host);return{pathname:t.pathname,search:t.search}},ape=()=>{const{classes:e}=Tde(),{authDetails:t}=ny(),{user:n}=yi(),r=Vs(),o=r.get("reset")==="true",a=r.get("redirect")||"/";return n?i(Yi,{to:ope(a),replace:!0}):i(ey,{children:w("div",{className:e.loginFormContainer,children:[i(F,{condition:(t==null?void 0:t.type)!==Y3,show:i("h2",{className:e.title,children:"Login to continue the great work"})}),i(F,{condition:o,show:i(Rde,{})}),i(rpe,{redirect:a})]})})},ipe="P",G0="C",spe="EEA",q0="RE",Y0="SE",Lh="UG",lpe=()=>w(yt,{severity:"error","data-loading":!0,children:[i(nS,{children:"Unable to reset password"}),"Something went wrong when attempting to update your password. This could be due to unstable internet connectivity. If retrying the request does not work, please try again later."]}),cpe=le()(e=>({container:{display:"flex",flexDirection:"column",position:"relative"},button:{width:"150px",margin:"1rem auto",display:"block"}})),upe=({token:e,setLoading:t})=>{const{classes:n}=cpe(),{classes:r}=Yn(),[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState(""),[c,u]=f.exports.useState(!1),[d,p]=f.exports.useState(""),[h,m]=f.exports.useState(!1),[b,y]=f.exports.useState(!1),g=Ye(),x=h&&b,v=f.exports.useCallback(y,[y]);f.exports.useEffect(()=>{s||y(!1),m(s===d)},[s,d]);const S=()=>{const _=bt("auth/reset/password");return fetch(_,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({token:e,password:s})})},E=async()=>{t(!0);try{const _=await S();t(!1),_.status===Av?(g("login?reset=true"),a(!1)):a(!0)}catch{a(!0),t(!1)}},R=_=>{_.preventDefault(),x&&E()},A=Boolean(s&&d);return w(Ne,{children:[i(F,{condition:o,show:i(lpe,{})}),w("form",{onSubmit:R,className:it(r.contentSpacingY,n.container),children:[i(lu,{placeholder:"Password",value:s||"",onChange:_=>l(_.target.value),onFocus:()=>u(!0),autoComplete:"new-password","data-loading":!0}),i(lu,{value:d||"",placeholder:"Confirm password",onChange:_=>p(_.target.value),autoComplete:"new-password","data-loading":!0}),i(F,{condition:c,show:i(_S,{password:s,callback:v,style:{marginBottom:"1rem"}})}),i(AS,{started:A,matchingPasswords:h}),i(nt,{variant:"contained",color:"primary",type:"submit",className:n.button,"data-loading":!0,disabled:!x,children:"Submit"})]})]})},X3=({children:e,token:t,setLoading:n})=>w("div",{style:{width:"100%"},children:[e,i(upe,{token:t,setLoading:n})]}),dpe=le()(e=>({newUser:{width:"350px",[e.breakpoints.down("sm")]:{width:"100%"}},title:{fontSize:e.fontSizes.mainHeader,marginBottom:"1.25rem",textAlign:"center"},inviteText:{marginBottom:"1rem",textAlign:"center"},container:{display:"flex"},roleContainer:{marginTop:"2rem"},innerContainer:{width:"60%",padding:"4rem 3rem"},buttonContainer:{display:"flex",marginTop:"1rem"},primaryBtn:{marginRight:"8px"},subtitle:{margin:"0.5rem 0"},passwordHeader:{marginTop:"2rem"},emailField:{minWidth:"300px",width:"100%",[e.breakpoints.down("sm")]:{minWidth:"100%"}}})),ppe=e=>()=>{const t=bt(`auth/reset/validate?token=${e}`);return fetch(t,{method:"GET"}).then(n=>n.json())},fpe="InvalidTokenError",hpe="UsedTokenError",J3=(e={})=>{const t=Vs(),n=t.get("token")||"",[r,o]=f.exports.useState(n),a=ppe(r),s=`auth/reset/validate?token=${r}`,{data:l,error:c}=Wt(s,a,e),[u,d]=f.exports.useState(!c&&!l),p=()=>{const m=t.get("token")||"";o(m)};f.exports.useEffect(()=>{d(!c&&!l)},[l,c]);const h=!u&&(l==null?void 0:l.name)===fpe||(l==null?void 0:l.name)===hpe;return{token:r,data:l,error:c,loading:u,setLoading:d,invalidToken:h,retry:p}},Q3=()=>{const{classes:e}=Yn();return w("div",{className:it(e.contentSpacingY,e.flexColumn,e.itemsCenter),children:[i(Te,{variant:"h2",className:e.title,children:"Invalid token"}),i(Te,{variant:"subtitle1",children:"Your token has either been used to reset your password, or it has expired. Please request a new reset password URL in order to reset your password."}),i(nt,{variant:"contained",color:"primary",component:Ct,to:"forgotten-password","data-testid":Hne,children:"Reset password"})]})},mpe=()=>{var c;const{authDetails:e}=ny(),{token:t,data:n,loading:r,setLoading:o,invalidToken:a}=J3(),s=Ji(r),{classes:l}=dpe();return i("div",{ref:s,children:i(ey,{showMenu:!1,BannerComponent:i(q3,{title:"Unleash"}),children:i("div",{className:l.newUser,children:i(F,{condition:a,show:i(Q3,{}),elseShow:w(X3,{token:t,setLoading:o,children:[i("h2",{className:l.title,children:"Enter your personal details and start your journey"}),i(F,{condition:n==null?void 0:n.createdBy,show:w(Te,{variant:"body1","data-loading":!0,className:l.inviteText,children:[n==null?void 0:n.createdBy,i("br",{})," has invited you to join Unleash."]})}),i(Te,{"data-loading":!0,variant:"body1",className:l.subtitle,children:"Your username is"}),i(At,{"data-loading":!0,value:(n==null?void 0:n.email)||"",id:"username",label:"Username",variant:"outlined",size:"small",className:l.emailField,disabled:!0}),i("div",{className:l.roleContainer,children:i(F,{condition:Boolean((c=e==null?void 0:e.options)==null?void 0:c.length),show:w(Ne,{children:[i(Wp,{text:"sign in with","data-loading":!0}),i(CC,{options:e==null?void 0:e.options}),i(Wp,{text:"or set a new password for your account","data-loading":!0})]}),elseShow:i(Te,{variant:"body1","data-loading":!0,children:"Set a password for your account."})})})]})})})})})},gpe=le()(e=>({resetPassword:{width:"350px",maxWidth:"350px",[e.breakpoints.down("sm")]:{width:"100%"}},container:{display:"flex"},innerContainer:{width:"40%",minHeight:"100vh"},title:{fontWeight:"bold",fontSize:"1.2rem",marginBottom:"1rem"}})),vpe=()=>{const{classes:e}=gpe(),{token:t,loading:n,setLoading:r,invalidToken:o}=J3(),a=Ji(n);return i("div",{ref:a,children:i(ey,{children:i("div",{className:e.resetPassword,children:i(F,{condition:o,show:i(Q3,{}),elseShow:i(X3,{token:t,setLoading:r,children:i(Te,{variant:"h2",className:e.title,"data-loading":!0,children:"Reset password"})})})})})})},ype=le()(e=>({forgottenPassword:{width:"350px",[e.breakpoints.down("sm")]:{width:"100%"}},button:{width:"150px",margin:"1rem auto"},email:{display:"block",margin:"0.5rem 0"},loginText:{textAlign:"center"}})),bpe=()=>{const[e,t]=f.exports.useState(""),[n,r]=f.exports.useState(!1),[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState(""),{classes:c}=Yn(),{classes:u}=ype(),d=Ji(o),p=async h=>{h.preventDefault(),a(!0),l(e);const m=bt("auth/reset/password-email");await fetch(m,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({email:e})}),r(!0),a(!1)};return i(ey,{children:w("div",{className:it(c.contentSpacingY,c.flexColumn,u.forgottenPassword),ref:d,children:[i("h2",{className:it(c.title,c.textCenter),"data-loading":!0,children:"Forgotten password"}),i(F,{condition:n,show:w(yt,{severity:"success","data-loading":!0,children:[i(nS,{children:"Attempted to send email"}),"We've attempted to send a reset password email to:",i("strong",{className:u.email,children:s}),"If you did not receive an email, please verify that you typed in the correct email, and contact your administrator to make sure that you are in the system."]})}),w("form",{onSubmit:p,className:it(c.contentSpacingY,c.flexColumn),children:[i(Te,{variant:"body1","data-loading":!0,className:c.textCenter,children:"Please provide your email address. If it exists in the system we'll send a new reset link."}),i(At,{variant:"outlined",size:"small",placeholder:"email",type:"email","data-loading":!0,"data-testid":Wne,value:e,onChange:h=>{t(h.target.value)}}),i(nt,{variant:"contained",type:"submit","data-loading":!0,color:"primary",className:u.button,disabled:o,children:i(F,{condition:!n,show:i("span",{children:"Submit"}),elseShow:i("span",{children:"Try again"})})}),i(Wp,{text:"Or log in"}),i(nt,{type:"submit","data-loading":!0,variant:"outlined",className:u.button,disabled:o,component:Ct,to:"/login",children:"Log in"})]})]})})},Z3=e=>{const t=()=>{const r=bt(`api/admin/projects/${e}`);return fetch(r,{method:"GET"}).then(rn("Project overview")).then(o=>o.json())},n=`api/admin/projects/${e}`;return{fetcher:t,KEY:n}},xpe=le()(e=>({projectCard:{padding:"1rem",width:"220px",height:"204px",display:"flex",flexDirection:"column",justifyContent:"space-between",margin:"0.5rem",boxShadow:"none",border:"1px solid #efefef",[e.breakpoints.down("sm")]:{justifyContent:"center"},"&:hover":{transition:"background-color 0.2s ease-in-out",backgroundColor:e.palette.projectCard.hover}},header:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"normal",fontSize:"1rem",lineClamp:2,display:"-webkit-box",boxOrient:"vertical",textOverflow:"ellipsis",overflow:"hidden",alignItems:"flex-start"},projectIcon:{margin:"1rem auto",width:"80px",display:"block"},info:{display:"flex",justifyContent:"space-between",fontSize:"0.8rem"},infoBox:{textAlign:"center"},infoStats:{color:e.palette.projectCard.textColor,fontWeight:"bold"},actionsBtn:{transform:"translateX(15px)"},icon:{color:e.palette.grey[700],marginRight:"0.5rem"}}));var EC={},wpe=yn.exports;Object.defineProperty(EC,"__esModule",{value:!0});var TC=EC.default=void 0,Spe=wpe(bn),Cpe=Cn,Epe=(0,Spe.default)((0,Cpe.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");TC=EC.default=Epe;const Tpe=e=>f.exports.createElement("svg",V({width:88,height:40,viewBox:"0 0 88 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("rect",{width:9,height:39,fill:"#635DC5"}),f.exports.createElement("rect",{x:13,width:10,height:39,fill:"#635DC5"}),f.exports.createElement("rect",{x:27,y:6,width:9,height:33,fill:"#635DC5"}),f.exports.createElement("rect",{x:40,y:12,width:9,height:27,fill:"#635DC5"}),f.exports.createElement("rect",{x:52,y:15,width:9,height:24,fill:"#635DC5"}),f.exports.createElement("rect",{x:65.0752,y:15.2578,width:9.2957,height:23.9101,fill:"#635DC5"}),f.exports.createElement("rect",{x:78.355,y:19.0352,width:9.2957,height:20.1348,fill:"#635DC5"})),ic=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{createProject:async g=>{const v=t("api/admin/projects",{method:"POST",body:JSON.stringify(g)});try{return await e(v.caller,v.id)}catch(S){throw S}},validateId:async g=>{const v=t("api/admin/projects/validate",{method:"POST",body:JSON.stringify(g)});try{return await e(v.caller,v.id)}catch(S){throw S}},editProject:async(g,x)=>{const v=`api/admin/projects/${g}`,S=t(v,{method:"PUT",body:JSON.stringify(x)});try{return await e(S.caller,S.id)}catch(E){throw E}},deleteProject:async g=>{const x=`api/admin/projects/${g}`,v=t(x,{method:"DELETE"});try{return await e(v.caller,v.id)}catch(S){throw S}},addEnvironmentToProject:async(g,x)=>{const v=`api/admin/projects/${g}/environments`,S=t(v,{method:"POST",body:JSON.stringify({environment:x})});try{return await e(S.caller,S.id)}catch(E){throw E}},removeEnvironmentFromProject:async(g,x)=>{const v=`api/admin/projects/${g}/environments/${x}`,S=t(v,{method:"DELETE"});try{return await e(S.caller,S.id)}catch(E){throw E}},addAccessToProject:async(g,x,v)=>{const S=`api/admin/projects/${g}/role/${x}/access`,E=t(S,{method:"POST",body:JSON.stringify(v)});try{return await e(E.caller,E.id)}catch(R){throw R}},removeUserFromRole:async(g,x,v)=>{const S=`api/admin/projects/${g}/users/${v}/roles/${x}`,E=t(S,{method:"DELETE"});try{return await e(E.caller,E.id)}catch(R){throw R}},removeGroupFromRole:async(g,x,v)=>{const S=`api/admin/projects/${g}/groups/${v}/roles/${x}`,E=t(S,{method:"DELETE"});try{return await e(E.caller,E.id)}catch(R){throw R}},changeUserRole:(g,x,v)=>{const S=`api/admin/projects/${g}/users/${v}/roles/${x}`,E=t(S,{method:"PUT"});return e(E.caller,E.id)},changeGroupRole:(g,x,v)=>{const S=`api/admin/projects/${g}/groups/${v}/roles/${x}`,E=t(S,{method:"PUT"});return e(E.caller,E.id)},errors:n,loading:r,searchProjectUser:async g=>{const x=`api/admin/user-admin/search?q=${g}`,v=t(x,{method:"GET"});try{return await e(v.caller,v.id)}catch(S){throw S}}}},eP=({open:e,onClose:t,project:n,onSuccess:r})=>{const{deleteProject:o}=ic(),{refetch:a}=Zl(),{setToastData:s,setToastApiError:l}=tt();return i(ln,{open:e,onClick:async u=>{u.preventDefault();try{await o(n),a(),s({title:"Deleted project",type:"success",text:"Successfully deleted project"}),r==null||r()}catch(d){l(Ue(d))}t==null||t()},onClose:t,title:"Really delete project"})},f5=({name:e,featureCount:t,health:n,memberCount:r,onHover:o,id:a})=>{const{classes:s}=xpe(),{hasAccess:l}=f.exports.useContext(Jt),{isOss:c}=st(),[u,d]=f.exports.useState(null),[p,h]=f.exports.useState(!1),m=Ye(),b=g=>{g.preventDefault(),d(g.currentTarget)},y=l(z$,a)&&a!==Db;return w(d4,{className:s.projectCard,onMouseEnter:o,children:[w("div",{className:s.header,"data-loading":!0,children:[i("h2",{className:s.title,children:e}),i(Ft,{permission:ca,hidden:c(),projectId:a,"data-loading":!0,onClick:b,tooltipProps:{title:"Options",className:s.actionsBtn},children:i(TC,{})}),w(bf,{id:"project-card-menu",open:Boolean(u),anchorEl:u,style:{top:0,left:-100},onClick:g=>{g.preventDefault()},onClose:g=>{g.preventDefault(),d(null)},children:[w(_r,{onClick:g=>{g.preventDefault(),m(xse(a))},children:[i(ar,{className:s.icon}),"Edit project"]}),w(_r,{onClick:g=>{g.preventDefault(),h(!0)},disabled:!y,children:[i(er,{className:s.icon}),a===Db&&!y?"You can't delete the default project":"Delete project"]})]})]}),i("div",{"data-loading":!0,children:i(Tpe,{className:s.projectIcon})}),w("div",{className:s.info,children:[w("div",{className:s.infoBox,children:[i("p",{className:s.infoStats,"data-loading":!0,children:t}),i("p",{"data-loading":!0,children:"toggles"})]}),w("div",{className:s.infoBox,children:[w("p",{className:s.infoStats,"data-loading":!0,children:[n,"%"]}),i("p",{"data-loading":!0,children:"health"})]}),w("div",{className:s.infoBox,children:[i("p",{className:s.infoStats,"data-loading":!0,children:r}),i("p",{"data-loading":!0,children:"members"})]})]}),i(eP,{project:a,open:p,onClose:()=>{d(null),h(!1)}})]})},Rpe=le()(e=>({container:{display:"flex",flexWrap:"wrap",[e.breakpoints.down("sm")]:{justifyContent:"center"}},apiError:{maxWidth:"400px",marginBottom:"1rem"},cardLink:{color:"inherit",textDecoration:"none",border:"none",padding:"0",background:"transparent",fontFamily:e.typography.fontFamily,pointer:"cursor"}})),kpe=[{id:"loading1",name:"loading1",memberCount:1,health:95,featureCount:4,createdAt:"",description:""},{id:"loading2",name:"loading2",memberCount:1,health:95,featureCount:4,createdAt:"",description:""},{id:"loading3",name:"loading3",memberCount:1,health:95,featureCount:4,createdAt:"",description:""},{id:"loading4",name:"loading4",memberCount:1,health:95,featureCount:4,createdAt:"",description:""}],ry=o=>{var a=o,{className:e,onClick:t,text:n}=a,r=en(a,["className","onClick","text"]);return i(yt,ee(V({className:e||"",action:i(nt,{color:"inherit",size:"small",onClick:t,children:"TRY AGAIN"}),severity:"error"},r),{children:n}))};function _pe(e,t){return e?{title:"You must be on a paid subscription to create new projects",disabled:!0}:t?{title:"Click to create a new project",disabled:!1}:{title:"You do not have permission to create new projects",disabled:!0}}const Ipe=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=Ye(),{classes:n}=Rpe(),{projects:r,loading:o,error:a,refetch:s}=Zl(),[l,c]=f.exports.useState({}),u=Ji(o),{isOss:d}=st(),p=an(oo.breakpoints.down("md")),[h,m]=Ls(),[b,y]=f.exports.useState(h.get("search")||"");f.exports.useEffect(()=>{const A={};b&&(A.search=b),m(A,{replace:!0})},[b,m]);const g=f.exports.useMemo(()=>{const A=new RegExp(b,"i");return b?r.filter(_=>A.test(_.name)):r},[r,b]),x=A=>{if(l[A])return;const{KEY:_,fetcher:N}=Z3(A);Fn(_,N),c(k=>ee(V({},k),{[A]:!0}))},v=_pe(d(),e(Nb)),S=()=>i(ry,{onClick:s,className:n.apiError,text:"Error fetching projects"}),E=()=>o?R():g.map(A=>{var _;return i(Ct,{to:`/projects/${A.id}`,className:n.cardLink,children:i(f5,{onHover:()=>x(A.id),name:A.name,memberCount:(_=A.memberCount)!=null?_:0,health:A.health,id:A.id,featureCount:A.featureCount})},A.id)}),R=()=>kpe.map(A=>i(f5,{"data-loading":!0,onHover:()=>{},name:A.name,id:A.id,memberCount:2,health:95,featureCount:4},A.id));return i("div",{ref:u,children:w(Gt,{header:i(Dt,{title:"Projects",actions:w(Ne,{children:[i(F,{condition:!p,show:w(Ne,{children:[i(jn,{initialValue:b,onChange:y}),i(Dt.Divider,{})]})}),i(oc,{Icon:io,onClick:()=>t("/projects/create"),maxWidth:"700px",permission:Nb,disabled:v.disabled,children:"New project"})]}),children:i(F,{condition:p,show:i(jn,{initialValue:b,onChange:y})})}),children:[i(F,{condition:a,show:S()}),i("div",{className:n.container,children:i(F,{condition:g.length<1&&!o,show:i(F,{condition:(b==null?void 0:b.length)>0,show:w(Vt,{children:["No projects found matching \u201C",b,"\u201D"]}),elseShow:i(Vt,{children:"No projects available."})}),elseShow:E()})})]})})},Ape={features:[],environments:[],name:"",health:0,members:0,version:"1",description:"Default"},Gi=(e,t={})=>{const{KEY:n,fetcher:r}=Z3(e),{data:o,error:a,mutate:s}=Wt(n,r,t),l=f.exports.useCallback(()=>{s()},[s]);return{project:o||Ape,loading:!a&&!o,error:a,refetch:l}},$f=e=>Gi(e).project.name||e,tP=le()(e=>({containerStyles:{marginTop:"1.5rem",display:"flex",[e.breakpoints.down("md")]:{flexDirection:"column"}},projectToggles:{width:"100%",minWidth:0},header:{backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadiusLarge,marginBottom:"1rem"},innerContainer:{padding:"1.25rem 2rem",display:"flex",alignItems:"center"},separator:{width:"100%",backgroundColor:e.palette.grey[200],height:"1px"},tabContainer:{padding:"0 2rem"},tabButton:{textTransform:"none",width:"auto",fontSize:"1rem",[e.breakpoints.up("md")]:{minWidth:160}},title:{margin:0,width:"100%",fontSize:e.fontSizes.mainHeader,fontWeight:"bold",marginBottom:"0.5rem",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1rem"},titleText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));var lr=(e=>(e.USER="USERS",e.GROUP="GROUPS",e))(lr||{});const Pf=(e,t={})=>{const n=bt(`api/admin/projects/${e}/access`),r=()=>fetch(n,{method:"GET"}).then(rn("project access")).then(p=>p.json()),o=`api/admin/projects/${e}/users`,{data:a,error:s}=Wt(o,r,t),[l,c]=f.exports.useState(!s&&!a),u=()=>{Fn(o)};return f.exports.useEffect(()=>{c(!s&&!a)},[a,s]),{access:f.exports.useMemo(()=>{var p;if(a)return Npe({roles:a.roles,users:a.users,groups:(p=a==null?void 0:a.groups.map(h=>{var m;return ee(V({},h),{users:mC((m=h.users)!=null?m:[])})}))!=null?p:[]})},[a]),error:s,loading:l,refetchProjectAccess:u}},Npe=e=>{const t=e.users||[],n=e.groups||[];return ee(V({},e),{rows:[...t.map(r=>({entity:r,type:"USERS"})),...n.map(r=>({entity:r,type:"GROUPS"}))]})},$pe=z(Gt)(({theme:e})=>({height:"100vh",overflow:"auto",padding:e.spacing(7.5,6),[e.breakpoints.down("md")]:{padding:e.spacing(4,2)},"& .header":{padding:e.spacing(0,0,2,0)},"& .body":{padding:e.spacing(3,0,0,0)},borderRadius:`${e.spacing(1.5,0,0,1.5)} !important`})),Ppe=z("div")(({theme:e})=>({display:"flex",flexDirection:"column","& > span":{color:e.palette.text.secondary,fontSize:e.fontSizes.bodySize}})),h5={id:"joinedAt"},m5=[{Header:"Avatar",accessor:"imageUrl",Cell:({row:{original:e}})=>i(Bn,{children:i(Qi,{user:e})}),maxWidth:85,disableSortBy:!0},{id:"name",Header:"Name",accessor:e=>e.name||"",Cell:Wr,minWidth:100,searchable:!0},{id:"username",Header:"Username",accessor:e=>e.username||e.email,Cell:Wr,minWidth:100,searchable:!0},{id:"joined",Header:"Joined",accessor:"joinedAt",Cell:wa,sortType:"date",maxWidth:150},{id:"lastLogin",Header:"Last login",accessor:e=>e.seenAt||"",Cell:({row:{original:e}})=>i(Up,{value:e.seenAt,emptyText:"Never logged"}),sortType:"date",maxWidth:150}],Ope=["imageUrl","name","joined","lastLogin"],Dpe=({open:e,setOpen:t,group:n,projectId:r,subtitle:o,onEdit:a,onRemove:s})=>{var S;const l=pn(),c=an(l.breakpoints.down("md")),[u]=f.exports.useState(()=>({sortBy:[{id:h5.id,desc:h5.desc}]})),[d,p]=f.exports.useState(""),{data:h,getSearchText:m,getSearchContext:b}=Ou(m5,d,(S=n==null?void 0:n.users)!=null?S:[]),{headerGroups:y,rows:g,prepareRow:x,setHiddenColumns:v}=ct.exports.useTable({columns:m5,data:h,initialState:u,sortTypes:Ar,autoResetSortBy:!1,disableSortRemove:!0,disableMultiSort:!0},ct.exports.useSortBy,ct.exports.useFlexLayout);return jp(v,Ope,c),i(pu,{open:e,onClose:()=>{t(!1)},label:(n==null?void 0:n.name)||"Group",children:w($pe,{header:i(Dt,{secondary:!0,titleElement:w(Ppe,{children:[n==null?void 0:n.name," (",g.length<h.length?`${g.length} of ${h.length}`:h.length,")",i("span",{children:o})]}),actions:w(Ne,{children:[i(F,{condition:!c,show:w(Ne,{children:[i(jn,{initialValue:d,onChange:p,hasFilters:!0,getSearchContext:b}),i(Dt.Divider,{})]})}),i(Ft,{permission:ca,projectId:r,tooltipProps:{title:"Edit group access"},onClick:a,children:i(ar,{})}),i(Ft,{permission:ca,projectId:r,tooltipProps:{title:"Remove group access"},onClick:s,children:i(er,{})})]}),children:i(F,{condition:c,show:i(jn,{initialValue:d,onChange:p,hasFilters:!0,getSearchContext:b})})}),children:[i(so,{value:m(d),children:i(Hs,{rows:g,headerGroups:y,prepareRow:x})}),i(F,{condition:g.length===0,show:i(F,{condition:(d==null?void 0:d.length)>0,show:w(Vt,{children:["No users found matching \u201C",d,"\u201D in this group."]}),elseShow:i(Vt,{children:"This group is empty. Get started by adding a user to the group."})})})]})})},Fb=(e,t={})=>{const n=()=>{const c=bt(`api/admin/roles/${e}`);return fetch(c,{method:"GET"}).then(rn("project role")).then(u=>u.json())},{data:r,error:o}=Wt(`api/admin/roles/${e}`,n,t),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(`api/admin/roles/${e}`)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{role:r||{},error:o,loading:a,refetch:l}},Lpe=z("div",{shouldForwardProp:e=>e!=="roleId"&&e!=="popover"&&e!=="sx"})(({theme:e,popover:t})=>({width:"100%",maxWidth:e.spacing(50),padding:e.spacing(3),backgroundColor:t?e.palette.background.paper:e.palette.neutral.light,color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody,borderRadius:e.shape.borderRadiusMedium})),g5=z("div")(({theme:e})=>({"& p:last-child":{marginBottom:e.spacing(2)}})),v5=z("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:e.fontSizes.smallBody,fontWeight:e.fontWeight.bold,marginBottom:e.spacing(2)})),Mpe=z("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:e.fontSizes.smallBody,marginBottom:e.spacing(1)})),nP=f.exports.forwardRef((a,o)=>{var s=a,{roleId:e,className:t,sx:n}=s,r=en(s,["roleId","className","sx"]);var d;const{role:l}=Fb(e.toString()),c=f.exports.useMemo(()=>{var h;const p=new Set;return(h=l.permissions)==null||h.filter(m=>m.environment).forEach(m=>{p.add(m.environment)}),[...p].sort()},[l]),u=f.exports.useMemo(()=>{var p;return(p=l.permissions)==null?void 0:p.filter(h=>!h.environment)},[l]);return w(Lpe,ee(V({className:t,sx:n},r),{ref:o,children:[i(F,{condition:Boolean(u==null?void 0:u.length),show:w(Ne,{children:[i(v5,{children:"Project permissions"}),i(g5,{children:(d=l.permissions)==null?void 0:d.filter(p=>!p.environment).map(p=>p.displayName).sort().map(p=>i("p",{children:p},p))})]})}),i(F,{condition:Boolean(c.length),show:w(Ne,{children:[i(v5,{children:"Environment permissions"}),c.map(p=>w("div",{children:[i(Mpe,{children:p}),i(g5,{children:l.permissions.filter(h=>h.environment===p).map(h=>h.displayName).sort().map(h=>i("p",{children:h},h))})]},p))]})})]}))}),qn=-1,Bpe=z("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),y5=z("p")(({theme:e})=>({color:e.palette.text.secondary,marginBottom:e.spacing(1)})),b5=z("div")(({theme:e})=>({"& > div:first-of-type":{width:"100%",maxWidth:e.spacing(50),marginBottom:e.spacing(2)}})),Fpe=z("div")(({theme:e})=>({marginTop:e.spacing(6),display:"flex",justifyContent:"flex-end"})),zpe=z(nt)(({theme:e})=>({marginLeft:e.spacing(3)})),jpe=z("div")(({theme:e})=>({display:"flex",flexDirection:"column","& > span:last-of-type":{color:e.palette.text.secondary}})),Upe=z("div")(({theme:e})=>({display:"flex",flexDirection:"column","& > span:first-of-type":{color:e.palette.text.secondary}})),Wpe=z("div")(({theme:e})=>({display:"flex",flexDirection:"column","& > span:last-of-type":{fontSize:e.fontSizes.smallerBody,color:e.palette.text.secondary}})),RC=({selected:e,accesses:t,users:n,groups:r,roles:o})=>{var q;const{uiConfig:a}=st(),{flags:s}=a,l=s.UG?"user / group":"user",c=Ve("projectId"),{refetchProjectAccess:u}=Pf(c),{addAccessToProject:d,changeUserRole:p,changeGroupRole:h,loading:m}=ic(),b=Boolean(e),{setToastData:y,setToastApiError:g}=tt(),x=Ye(),v=[...r.filter(D=>b||!t.some(({entity:{id:H},type:U})=>D.id===H&&U===lr.GROUP)).map(D=>({id:D.id,entity:D,type:lr.GROUP})),...n.filter(D=>b||!t.some(({entity:{id:H},type:U})=>D.id===H&&U===lr.USER)).map(D=>({id:D.id,entity:D,type:lr.USER}))],[S,E]=f.exports.useState(()=>v.filter(({id:D,type:H})=>D===(e==null?void 0:e.entity.id)&&H===(e==null?void 0:e.type))),[R,A]=f.exports.useState((q=o.find(({id:D})=>D===(e==null?void 0:e.entity.roleId)))!=null?q:null),_={users:S==null?void 0:S.filter(({type:D})=>D===lr.USER).map(({id:D})=>({id:D})),groups:S==null?void 0:S.filter(({type:D})=>D===lr.GROUP).map(({id:D})=>({id:D}))},N=async D=>{if(D.preventDefault(),!!L)try{b?(e==null?void 0:e.type)===lr.USER?await p(c,R.id,e.entity.id):(e==null?void 0:e.type)===lr.GROUP&&await h(c,R.id,e.entity.id):await d(c,R.id,_),u(),x(qn),y({title:`${S.length} ${S.length===1?"access":"accesses"} ${b?"edited":"assigned"} successfully`,type:"success"})}catch(H){g(Ue(H))}},k=()=>b?`curl --location --request ${b?"PUT":"POST"} '${a.unleashUrl}/api/admin/projects/${c}/${(e==null?void 0:e.type)===lr.USER?"users":"groups"}/${e==null?void 0:e.entity.id}/roles/${R==null?void 0:R.id}' \\
            --header 'Authorization: INSERT_API_KEY'`:`curl --location --request ${b?"PUT":"POST"} '${a.unleashUrl}/api/admin/projects/${c}/role/${R==null?void 0:R.id}/access' \\
        --header 'Authorization: INSERT_API_KEY' \\
        --header 'Content-Type: application/json' \\
        --data-raw '${JSON.stringify(_,void 0,2)}'`,I=(D,H,U)=>{let Z,G;return H.type===lr.GROUP?Z=H.entity:G=H.entity,w("li",ee(V({},D),{children:[i(Do,{icon:i(Af,{fontSize:"small"}),checkedIcon:i(Nf,{fontSize:"small"}),style:{marginRight:8},checked:U}),i(F,{condition:H.type===lr.GROUP,show:w(jpe,{children:[i("span",{children:Z==null?void 0:Z.name}),w("span",{children:[Z==null?void 0:Z.userCount," users"]})]}),elseShow:w(Upe,{children:[i("span",{children:(G==null?void 0:G.name)||(G==null?void 0:G.username)}),i("span",{children:G==null?void 0:G.email})]})})]}))},O=(D,H)=>i("li",ee(V({},D),{children:w(Wpe,{children:[i("span",{children:H.name}),i("span",{children:H.description})]})})),L=S.length>0&&R;return i(pu,{open:!0,onClose:()=>x(qn),label:`${b?"Edit":"Assign"} ${l} access`,children:i(Un,{loading:m,modal:!0,title:`${b?"Edit":"Assign"} ${l} access`,description:"Custom project roles allow you to fine-tune access rights and permissions within your projects.",documentationLink:"https://docs.getunleash.io/how-to/how-to-create-and-assign-custom-project-roles",documentationLinkLabel:"Project access documentation",formatApiCode:k,children:w(Bpe,{onSubmit:N,children:[w("div",{children:[w(y5,{"data-testid":$ne,children:["Select the ",l]}),i(b5,{children:i(Bl,{"data-testid":Ine,size:"small",multiple:!0,openOnFocus:!0,limitTags:10,disableCloseOnSelect:!0,disabled:b,value:S,onChange:(D,H,U)=>{D.type==="keydown"&&D.key==="Backspace"&&U==="removeOption"||E(H)},options:v,groupBy:D=>D.type,renderOption:(D,H,{selected:U})=>I(D,H,U),getOptionLabel:D=>{if(D.type===lr.USER){const H=D.entity;return H.email||H.name||H.username||""}else return D.entity.name},isOptionEqualToValue:(D,H)=>D.type===H.type&&D.entity.id===H.entity.id,renderInput:D=>i(At,ee(V({},D),{label:se(l)}))})}),i(y5,{children:"Select the role to assign for this project"}),i(b5,{children:i(Bl,{"data-testid":Ane,size:"small",openOnFocus:!0,value:R,onChange:(D,H)=>A(H),options:o,renderOption:O,getOptionLabel:D=>D.name,renderInput:D=>i(At,ee(V({},D),{label:"Role"}))})}),i(F,{condition:Boolean(R==null?void 0:R.id),show:i(nP,{roleId:R==null?void 0:R.id})})]}),w(Fpe,{children:[w(nt,{"data-testid":Nne,type:"submit",variant:"contained",color:"primary",disabled:!L,children:["Assign ",l]}),i(zpe,{onClick:()=>x(qn),children:"Cancel"})]})]})})})},kC=()=>{const{data:e,error:t,mutate:n}=Wt(bt("api/admin/user-admin/access"),Hpe);return{users:e==null?void 0:e.users,groups:e==null?void 0:e.groups,loading:!t&&!e,refetch:()=>n(),error:t}},Hpe=e=>fetch(e).then(rn("Access")).then(t=>t.json()),Vpe=()=>{const e=Ve("projectId"),{access:t}=Pf(e),{users:n,groups:r}=kC();return!t||!n||!r?null:i(RC,{accesses:t.rows,users:n,groups:r,roles:t.roles})},Gpe=()=>{const e=Ve("projectId"),t=Ve("userId"),{access:n}=Pf(e),{users:r,groups:o}=kC();if(!n||!r||!o)return null;const a=n.rows.find(s=>s.entity.id===Number(t)&&s.type===lr.USER);return i(RC,{accesses:n.rows,selected:a,users:r,groups:o,roles:n.roles})},qpe=()=>{const e=Ve("projectId"),t=Ve("groupId"),{access:n}=Pf(e),{users:r,groups:o}=kC();if(!n||!r||!o)return null;const a=n.rows.find(s=>s.entity.id===Number(t)&&s.type===lr.GROUP);return i(RC,{accesses:n.rows,selected:a,users:r,groups:o,roles:n.roles})},Ype=z(Fl)(()=>({textDecoration:"none","&:hover, &:focus":{textDecoration:"underline"}})),Kpe=z(Xl)(()=>({pointerEvents:"none"})),Xpe=({roleId:e,value:t,emptyText:n})=>{const[r,o]=hr.useState(null),a=l=>{o(l.currentTarget)},s=()=>{o(null)};return t?w(Ne,{children:[i(Bn,{children:i(Ype,{onMouseEnter:l=>{a(l)},onMouseLeave:s,children:t})}),i(Kpe,{open:Boolean(r),anchorEl:r,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:i(nP,{roleId:e,popover:!0})})]}):i(Bn,{children:n})},Jpe={id:"added"},{value:x5,setValue:Qpe}=Pu("ProjectAccess:v1",Jpe),Zpe=z("div")(({theme:e})=>({display:"inline-flex",alignItems:"center",flexWrap:"wrap",marginLeft:e.spacing(1)})),efe=z(Qi)(({theme:e})=>({marginRight:e.spacing(-3.5)})),tfe=z(Qi)(({theme:e})=>({outline:`${e.spacing(.25)} solid ${e.palette.background.paper}`})),nfe=["imageUrl","username","role","added","lastLogin"],rfe=()=>{var Z,G;const e=Ve("projectId"),{uiConfig:t}=st(),{flags:n}=t,r=n.UG?"user / group":"user",o=Ye(),a=pn(),s=an(a.breakpoints.down("md")),{setToastData:l}=tt(),{access:c,refetchProjectAccess:u}=Pf(e),{removeUserFromRole:d,removeGroupFromRole:p}=ic(),[h,m]=f.exports.useState(!1),[b,y]=f.exports.useState(!1),[g,x]=f.exports.useState(),v=f.exports.useMemo(()=>[{Header:"Avatar",accessor:"imageUrl",Cell:({row:{original:B}})=>{var Y;return w(Zpe,{children:[i(F,{condition:B.type===lr.GROUP,show:i(efe,{})}),i(tfe,{user:B.entity,children:(Y=B.entity.users)==null?void 0:Y.length})]})},maxWidth:85,disableSortBy:!0},{id:"name",Header:"Name",accessor:B=>B.entity.name||"",Cell:({value:B,row:{original:Y}})=>{var K;return i(F,{condition:Y.type===lr.GROUP,show:i(bi,{onClick:()=>{x(Y),y(!0)},title:B,subtitle:`${(K=Y.entity.users)==null?void 0:K.length} users`}),elseShow:i(Wr,{value:B})})},minWidth:100,searchable:!0},{id:"username",Header:"Username",accessor:B=>{if(B.type===lr.USER){const Y=B.entity;return Y.username||Y.email}return""},Cell:Wr,minWidth:100,searchable:!0},{id:"role",Header:"Role",accessor:B=>{var Y;return(Y=c==null?void 0:c.roles.find(({id:K})=>K===B.entity.roleId))==null?void 0:Y.name},Cell:({value:B,row:{original:Y}})=>i(Xpe,{roleId:Y.entity.roleId,value:B}),minWidth:120,filterName:"role"},{id:"added",Header:"Added",accessor:B=>B.entity.addedAt||"",Cell:({value:B})=>i(Up,{value:B,emptyText:"Never logged"}),sortType:"date",maxWidth:150},{id:"lastLogin",Header:"Last login",accessor:B=>B.type===lr.USER?B.entity.seenAt||"":B.entity.users.map(({seenAt:K})=>K).sort().reverse()[0],Cell:({value:B})=>i(Up,{value:B,emptyText:"Never logged"}),sortType:"date",maxWidth:150},{id:"actions",Header:"Actions",disableSortBy:!0,align:"center",maxWidth:200,Cell:({row:{original:B}})=>w(Lo,{children:[i(Ft,{"data-testid":Pne,component:Ct,permission:ca,projectId:e,to:`edit/${B.type===lr.USER?"user":"group"}/${B.entity.id}`,disabled:(c==null?void 0:c.rows.length)===1,tooltipProps:{title:(c==null?void 0:c.rows.length)===1?"Cannot edit access. A project must have at least one owner":"Edit access"},children:i(ar,{})}),i(Ft,{"data-testid":One,permission:ca,projectId:e,onClick:()=>{x(B),m(!0)},disabled:(c==null?void 0:c.rows.length)===1,tooltipProps:{title:(c==null?void 0:c.rows.length)===1?"Cannot remove access. A project must have at least one owner":"Remove access"},children:i(er,{})})]})}],[c,e]),[S,E]=Ls(),[R]=f.exports.useState(()=>({sortBy:[{id:S.get("sort")||x5.id,desc:S.has("order")?S.get("order")==="desc":x5.desc}],globalFilter:S.get("search")||""})),[A,_]=f.exports.useState(R.globalFilter),{data:N,getSearchText:k,getSearchContext:I}=Ou(v,A,(Z=c==null?void 0:c.rows)!=null?Z:[]),{headerGroups:O,rows:L,prepareRow:q,setHiddenColumns:D,state:{sortBy:H}}=ct.exports.useTable({columns:v,data:N,initialState:R,sortTypes:Ar,autoResetSortBy:!1,disableSortRemove:!0,disableMultiSort:!0,defaultColumn:{Cell:Bn}},ct.exports.useSortBy,ct.exports.useFlexLayout);jp(D,nfe,s),f.exports.useEffect(()=>{const B={};B.sort=H[0].id,H[0].desc&&(B.order="desc"),A&&(B.search=A),E(B,{replace:!0}),Qpe({id:H[0].id,desc:H[0].desc||!1})},[H,A,E]);const U=async B=>{if(!B)return;const{id:Y,roleId:K}=B.entity;let Q=B.entity.name;if(B.type===lr.USER){const re=B.entity;Q=Q||re.email||re.username||""}try{B.type===lr.USER?await d(e,K,Y):await p(e,K,Y),u(),l({type:"success",title:`${Q||`The ${r}`} has been removed from project`})}catch(re){l({type:"error",title:re.message||`Server problems when removing ${r}.`})}m(!1)};return w(Gt,{header:i(Dt,{secondary:!0,title:`Access (${L.length<N.length?`${L.length} of ${N.length}`:N.length})`,actions:w(Ne,{children:[i(F,{condition:!s,show:w(Ne,{children:[i(jn,{initialValue:A,onChange:_,hasFilters:!0,getSearchContext:I}),i(Dt.Divider,{})]})}),w(oc,{onClick:()=>o("create"),maxWidth:"700px",Icon:io,permission:ca,projectId:e,"data-testid":_ne,children:["Assign ",r]})]}),children:i(F,{condition:s,show:i(jn,{initialValue:A,onChange:_,hasFilters:!0,getSearchContext:I})})}),children:[i(so,{value:k(A),children:i(Hs,{rows:L,headerGroups:O,prepareRow:q})}),i(F,{condition:L.length===0,show:i(F,{condition:(A==null?void 0:A.length)>0,show:w(Vt,{children:["No access found matching \u201C",A,"\u201D"]}),elseShow:w(Vt,{children:["No access available. Get started by assigning a"," ",r,"."]})})}),w(of,{children:[i(Er,{path:"create",element:i(Vpe,{})}),i(Er,{path:"edit/group/:groupId",element:i(qpe,{})}),i(Er,{path:"edit/user/:userId",element:i(Gpe,{})})]}),i(ln,{open:h,onClick:()=>U(g),onClose:()=>{m(!1)},title:`Really remove ${r} from this project?`}),i(Dpe,{open:b,setOpen:y,group:g==null?void 0:g.entity,projectId:e,subtitle:`Role: ${(G=c==null?void 0:c.roles.find(({id:B})=>B===(g==null?void 0:g.entity.roleId)))==null?void 0:G.name}`,onEdit:()=>{o(`edit/group/${g==null?void 0:g.entity.id}`)},onRemove:()=>{y(!1),m(!0)}})]})},ofe=()=>{const e=Ve("projectId"),t=$f(e),{hasAccess:n}=f.exports.useContext(Jt),{isOss:r}=st();return Sa(`Project access \u2013 ${t}`),r()?i(Gt,{header:i(Dt,{title:"Project access"}),children:w(yt,{severity:"error",children:["Controlling access to projects requires a paid version of Unleash. Check out"," ",i("a",{href:"https://www.getunleash.io",target:"_blank",rel:"noreferrer",children:"getunleash.io"})," ","to find out more."]})}):n(ca,e)?i(rfe,{}):i(Gt,{header:i(Dt,{title:"Project access"}),children:i(yt,{severity:"error",children:"You need project owner permissions to access this section."})})},afe=le()(e=>({container:{display:"flex",flexWrap:"wrap",[e.breakpoints.down("sm")]:{justifyContent:"center"}},apiError:{maxWidth:"400px",marginBottom:"1rem"},cardLink:{color:"inherit",textDecoration:"none",border:"none",padding:"0",background:"transparent",fontFamily:e.typography.fontFamily,pointer:"cursor"}})),sc=()=>{const{data:e,error:t,mutate:n}=Wt(bt("api/admin/environments"),ife),r=f.exports.useMemo(()=>e||[],[e]),o=f.exports.useCallback(async()=>{await n()},[n]),a=f.exports.useCallback(async s=>{await n(s,!1)},[n]);return{environments:r,refetchEnvironments:o,mutateEnvironments:a,loading:!t&&!e,error:t}},ife=async e=>(await fetch(e).then(rn("Environments")).then(n=>n.json())).environments.sort((n,r)=>n.sortOrder-r.sortOrder),sfe=le()(e=>({helperText:{position:"absolute",top:"35px"},inputContainer:{width:"100%",position:"relative"}})),Sn=d=>{var p=d,{label:e,placeholder:t,error:n,errorText:r,style:o,className:a,value:s,onChange:l,InputProps:c}=p,u=en(p,["label","placeholder","error","errorText","style","className","value","onChange","InputProps"]);const{classes:h}=sfe();return i("div",{className:h.inputContainer,"data-loading":!0,children:i(At,V({size:"small",variant:"outlined",label:e,placeholder:t,error:n,helperText:r,style:o,className:a||"",value:s,onChange:l,FormHelperTextProps:{["data-testid"]:Zne,classes:{root:h.helperText}}},u))})},lfe=le()(e=>({deleteParagraph:{marginTop:"2rem"},environmentDeleteInput:{marginTop:"1rem"}})),cfe=({env:e,open:t,handleDisableEnvironment:n,handleCancelDisableEnvironment:r,confirmName:o,setConfirmName:a})=>{const{classes:s}=lfe(),l=u=>a(u.currentTarget.value),c="disable-environment-confirmation-form";return w(ln,{title:"Are you sure you want to disable this environment?",open:t,primaryButtonText:"Disable environment",secondaryButtonText:"Cancel",onClick:()=>n(),disabledPrimaryButton:(e==null?void 0:e.name)!==o,onClose:r,formId:c,children:[i(yt,{severity:"error",children:"Danger. Disabling an environment can impact client applications connected to the environment and result in feature toggles being disabled."}),w("p",{className:s.deleteParagraph,children:["In order to disable this environment, please enter the id of the environment in the textfield below: ",i("strong",{children:e==null?void 0:e.name})]}),i("form",{id:c,children:i(Sn,{autoFocus:!0,onChange:l,value:o,label:"Environment name",className:s.environmentDeleteInput})})]})},ufe=e=>e.reduce((t,n)=>n.enabled?t+1:t,0),Tr=a=>{var s=a,{text:e,maxWidth:t,maxLength:n,className:r}=s,o=en(s,["text","maxWidth","maxLength","className"]);var l;return i(F,{condition:((l=e==null?void 0:e.length)!=null?l:0)>n,show:i(wt,{title:e,arrow:!0,children:i("span",ee(V({"data-loading":!0,className:r,style:{maxWidth:`${t}px`,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"}},o),{children:e}))}),elseShow:i("span",{className:r,children:e})})},dfe=()=>{const e=Ve("projectId"),t=$f(e);Sa(`Project environments \u2013 ${t}`);const[n,r]=f.exports.useState([]),{setToastData:o,setToastApiError:a}=tt(),{uiConfig:s}=st(),{environments:l,loading:c,error:u,refetchEnvironments:d}=sc(),{project:p,refetch:h}=Gi(e),{removeEnvironmentFromProject:m,addEnvironmentToProject:b}=ic(),{classes:y}=Yn(),[g,x]=f.exports.useState(),[v,S]=f.exports.useState(""),{classes:E}=afe(),{isOss:R}=st();f.exports.useEffect(()=>{const H=l.map(U=>({name:U.name,enabled:p==null?void 0:p.environments.includes(U.name)}));r(H)},[l,p==null?void 0:p.environments]);const A=()=>{d(),h()},_=()=>i(ry,{onClick:A,className:E.apiError,text:"Error fetching environments"}),N=H=>`Got an API error when trying to ${H?"enable":"disable"} the environment.`,k=async H=>{if(H.enabled){if(ufe(n)>1){x(H);return}o({title:"One environment must be active",text:"You must always have at least one active environment per project",type:"error"})}else try{await b(e,H.name),o({title:"Environment enabled",text:"Environment successfully enabled. You can now use it to segment strategies in your feature toggles.",type:"success"})}catch{a(N(!0))}A()},I=async()=>{if(g&&v===g.name){try{await m(e,g.name),x(void 0),S(""),o({title:"Environment disabled",text:"Environment successfully disabled.",type:"success"})}catch{a(N(!1))}A()}},O=()=>{x(void 0),S("")},L=H=>w("div",{className:y.flexRow,children:[i("code",{children:i(Tr,{text:H.name,maxLength:50,maxWidth:"150"})}),w("p",{children:["\xA0 environment is"," ",i("strong",{children:H.enabled?"enabled":"disabled"})]})]}),q=H=>R()&&H==="default",D=()=>i(v4,{children:n.map(H=>i($n,{label:L(H),control:i(nc,{tooltip:`${H.enabled?"Disable":"Enable"} environment`,size:"medium",disabled:q(H.name),projectId:e,permission:ca,checked:H.enabled,onChange:()=>k(H)})},H.name))});return i(Gt,{header:i(Dt,{titleElement:`Configure environments for "${p==null?void 0:p.name}" project`}),isLoading:c,children:i(F,{condition:s.flags.E,show:w("div",{className:E.container,children:[i(F,{condition:Boolean(u),show:_()}),w(yt,{severity:"info",style:{marginBottom:"20px"},children:[i("b",{children:"Important!"})," In order for your application to retrieve configured activation strategies for a specific environment, the application",i("br",{})," must use an environment specific API key. You can look up the environment-specific API keys"," ",i(Ct,{to:"/admin/api",children:"here."}),i("br",{}),i("br",{}),"Your administrator can configure an environment-specific API key to be used in the SDK. If you are an administrator you can"," ",i(Ct,{to:"/admin/api",children:"create a new API key."})]}),i(F,{condition:l.length<1&&!c,show:i("div",{children:"No environments available."}),elseShow:D()}),i(cfe,{env:g,open:Boolean(g),handleDisableEnvironment:I,handleCancelDisableEnvironment:O,confirmName:v,setConfirmName:S})]}),elseShow:i(yt,{security:"success",children:"This feature has not been Unleashed for you yet."})})})},pfe=({onRevive:e,onDelete:t,project:n})=>w(Lo,{children:[i(Ft,{onClick:e,projectId:n,permission:Hi,tooltipProps:{title:"Revive feature toggle"},children:i(zte,{})}),i(Ft,{permission:zS,projectId:n,tooltipProps:{title:"Delete feature toggle"},onClick:t,children:i(er,{})})]}),rP=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{reviveFeature:async s=>{const l=`api/admin/archive/revive/${s}`,c=t(l,{method:"POST"});return e(c.caller,c.id)},deleteFeature:async s=>{const l=`api/admin/archive/${s}`,c=t(l,{method:"DELETE"});return e(c.caller,c.id)},errors:n,loading:r}},ffe=({value:e})=>{const{locationSettings:t}=vi(),n=pn();return e?i(Bn,{children:i(wt,{title:`Archived on: ${uu(e,t.locale)}`,arrow:!0,children:i(Te,{noWrap:!0,variant:"body2","data-loading":!0,children:i(zv,{date:new Date(e),title:"",live:!1})})})}):i(Bn,{children:i(Te,{variant:"body2",color:n.palette.text.secondary,children:"not available"})})},hfe=z("p")(({theme:e})=>({marginTop:e.spacing(4)})),mfe=z(Sn)(({theme:e})=>({marginTop:e.spacing(2),width:"100%"})),gfe=({deletedFeature:e,open:t,setOpen:n,refetch:r})=>{const[o,a]=f.exports.useState(""),{setToastData:s,setToastApiError:l}=tt(),{deleteFeature:c}=rP(),u=async()=>{try{if(!e)return;await c(e.name),await r(),s({type:"success",title:"Feature toggle deleted",text:`You have successfully deleted the ${e.name} feature toggle.`})}catch(h){l(Ue(h))}finally{d()}},d=()=>{n(!1),a("")},p="delete-feature-toggle-confirmation-form";return w(ln,{title:"Delete feature toggle?",open:t,primaryButtonText:"Delete feature toggle",secondaryButtonText:"Cancel",onClick:u,onClose:d,disabledPrimaryButton:(e==null?void 0:e.name)!==o,formId:p,children:[w(yt,{severity:"warning",children:[i("b",{children:"Warning!"})," Before you delete a feature toggle, make sure all in-code references to that feature toggle have been removed. Otherwise, a new feature toggle with the same name could activate the old code paths."]}),w(hfe,{children:["In order to delete this feature toggle, please enter its name in the text field below:",i("br",{}),i("strong",{children:e==null?void 0:e.name})]}),i("form",{id:p,children:i(mfe,{autoFocus:!0,onChange:h=>{a(h.currentTarget.value)},value:o,placeholder:"<feature toggle name>",label:"Feature toggle name"})})]})},oP=({archivedFeatures:e=[],loading:t,refetch:n,storedParams:r,setStoredParams:o,title:a,projectId:s})=>{const l=an(oo.breakpoints.down("md")),c=an(oo.breakpoints.down("lg")),{setToastData:u,setToastApiError:d}=tt(),[p,h]=f.exports.useState(!1),[m,b]=f.exports.useState(),[y,g]=Ls(),{reviveFeature:x}=rP(),[v,S]=f.exports.useState(y.get("search")||""),E=f.exports.useCallback(async U=>{try{await x(U),await n(),u({type:"success",title:"And we're back!",text:"The feature toggle has been revived."})}catch(Z){d(Ue(Z))}},[n,x,d,u]),R=f.exports.useMemo(()=>[{id:"Seen",Header:"Seen",width:85,canSort:!0,Cell:jv,accessor:"lastSeenAt",align:"center"},{Header:"Type",accessor:"type",width:85,canSort:!0,Cell:Uv,align:"center"},{Header:"Name",accessor:"name",searchable:!0,minWidth:100,Cell:({value:U,row:{original:Z}})=>i(Wr,{value:U,subtitle:Z.description}),sortType:"alphanumeric"},{Header:"Created",accessor:"createdAt",width:150,Cell:wa,sortType:"date"},{Header:"Archived",accessor:"archivedAt",width:150,Cell:ffe,sortType:"date"},...s?[]:[{Header:"Project ID",accessor:"project",sortType:"alphanumeric",filterName:"project",searchable:!0,maxWidth:170,Cell:({value:U})=>i(bi,{title:U,to:`/projects/${U}`})}],{Header:"State",accessor:"stale",Cell:aC,sortType:"boolean",maxWidth:120,filterName:"state",filterParsing:U=>U?"stale":"active"},{Header:"Actions",id:"Actions",align:"center",maxWidth:120,canSort:!1,Cell:({row:{original:U}})=>i(pfe,{project:U.project,onRevive:()=>E(U.name),onDelete:()=>{b(U),h(!0)}})},{accessor:"description"}],[s]),{data:A,getSearchText:_,getSearchContext:N}=Ou(R,v,e),k=f.exports.useMemo(()=>t?v3:A,[A,t]),[I]=f.exports.useState(()=>({sortBy:[{id:y.get("sort")||r.id,desc:y.has("order")?y.get("order")==="desc":r.desc}],hiddenColumns:["description"]})),{headerGroups:O,rows:L,state:{sortBy:q},prepareRow:D,setHiddenColumns:H}=ct.exports.useTable({columns:R,data:k,initialState:I,sortTypes:Ar,disableSortRemove:!0,autoResetSortBy:!1},ct.exports.useFlexLayout,ct.exports.useSortBy);return f.exports.useEffect(()=>{const U=["description"];c&&U.push("lastSeenAt","status"),l&&U.push("type","createdAt"),H(U)},[H,l,c]),f.exports.useEffect(()=>{if(t)return;const U={};U.sort=q[0].id,q[0].desc&&(U.order="desc"),v&&(U.search=v),g(U,{replace:!0}),o({id:q[0].id,desc:q[0].desc||!1})},[t,q,v]),w(Gt,{isLoading:t,header:i(Dt,{titleElement:`${a} (${L.length<k.length?`${L.length} of ${k.length}`:k.length})`,actions:i(jn,{initialValue:v,onChange:S,hasFilters:!0,getSearchContext:N})}),children:[i(so,{value:_(v),children:i(Hs,{rows:L,headerGroups:O,prepareRow:D})}),i(F,{condition:L.length===0,show:()=>i(F,{condition:(v==null?void 0:v.length)>0,show:w(Vt,{children:["No feature toggles found matching \u201C",v,"\u201D"]}),elseShow:i(Vt,{children:"None of the feature toggles were archived yet."})})}),i(gfe,{deletedFeature:m,open:p,setOpen:h,refetch:n})]})},vfe=e=>{const{data:t,refetch:n,loading:r,error:o}=Fv(["apiAdminArchiveFeaturesGet",e],()=>e?Fp.apiAdminArchiveFeaturesProjectIdGet({projectId:e}):Fp.apiAdminArchiveFeaturesGet());return{archivedFeatures:t==null?void 0:t.features,refetchArchived:n,loading:r,error:o}},yfe={id:"archivedAt"},bfe=({projectId:e})=>{const{archivedFeatures:t=[],refetchArchived:n,loading:r}=vfe(e),{value:o,setValue:a}=Pu(`${e}:ProjectFeaturesArchiveTable`,yfe);return i(oP,{title:"Project archive",archivedFeatures:t,loading:r,storedParams:o,setStoredParams:a,refetch:n,projectId:e})},xfe=()=>{const e=Ve("projectId"),t=$f(e);return Sa(`Project archive \u2013 ${t}`),i(bfe,{projectId:e})},aP="You can not enable the environment before it has strategies",wfe=le()(e=>({infoText:{marginBottom:"10px",fontSize:e.fontSizes.bodySize}})),ng=e=>{const t=new URLSearchParams(window.location.search).get(e);if(!t)throw new Error(`Missing required query param: ${e}`);return t},Sfe=({strategyDefinition:e})=>i("p",{children:e==null?void 0:e.description}),Cfe=pS(SJ,e=>({root:{height:8},thumb:{height:24,width:24,backgroundColor:"#fff",border:"2px solid currentColor"},active:{},valueLabel:{},track:{height:8,borderRadius:e.shape.borderRadius},rail:{height:8,borderRadius:e.shape.borderRadius}})),Efe=le()(e=>({slider:{width:"100%",maxWidth:"100%"},margin:{height:e.spacing(3)}})),Tfe=[{value:0,label:"0%"},{value:25,label:"25%"},{value:50,label:"50%"},{value:75,label:"75%"},{value:100,label:"100%"}],iP=({name:e,value:t,onChange:n,disabled:r=!1})=>{const{classes:o}=Efe(),a=s=>`${s}%`;return w("div",{className:o.slider,children:[i(Te,{id:"discrete-slider-always",variant:"h3",gutterBottom:!0,component:"h3",children:e}),i(Cfe,{min:0,max:100,value:t,getAriaValueText:a,"aria-labelledby":"discrete-slider-always",step:1,"data-testid":Gne,marks:Tfe,onChange:n,valueLabelDisplay:"on",disabled:r})]})},Rfe=d=>{var p=d,{name:e,value:t="",label:n="",options:r,onChange:o,id:a,disabled:s=!1,className:l,classes:c}=p,u=en(p,["name","value","label","options","onChange","id","disabled","className","classes"]);const h=()=>r.map(m=>i(_r,{value:m.key,title:m.title||"","data-testid":`${_$}-${m.label}`,children:m.label},m.key));return w(qo,{variant:"outlined",size:"small",classes:c,children:[i(Iu,{htmlFor:a,children:n}),i(Nu,ee(V({name:e,disabled:s,onChange:o,className:l,label:n,id:a,value:t},u),{children:h()}))]})},ip=e=>{const t=Number(jl(e));return Number.isFinite(t)?t:0},jl=e=>String(e!=null?e:"").trim(),Cl=e=>jl(e).split(",").map(t=>t.trim()).filter(Boolean),w5=[{key:"default",label:"default"},{key:"userId",label:"userId"},{key:"sessionId",label:"sessionId"},{key:"random",label:"random"}],kfe=({updateParameter:e,parameters:t,context:n,editable:r=!0})=>{const o=u=>d=>{e(u,d)},a=(u,d)=>{e("rollout",d.toString())},l=(()=>w5.concat(n.filter(u=>u.stickiness).filter(u=>!w5.find(d=>d.key===u.name)).map(u=>({key:u.name,label:u.name}))))(),c=t.rollout!==void 0?ip(t.rollout):100;return w("div",{children:[i(iP,{name:"Rollout",value:c,disabled:!r,onChange:a}),i("br",{}),w("div",{children:[w(Te,{variant:"subtitle2",style:{marginBottom:"1rem",display:"flex",gap:"1ch"},component:"h2",children:["Stickiness",i(su,{tooltip:"Stickiness defines what parameter should be used to ensure that your users get consistency in features. By default unleash will use the first value present in the context in the order of userId, sessionId and random."})]}),i(Rfe,{id:"stickiness-select",name:"stickiness",label:"Stickiness",options:l,value:jl(t.stickiness),disabled:!r,"data-testid":Yne,onChange:u=>o("stickiness")(u.target.value)}),"\xA0",i("br",{}),i("br",{}),w(Te,{variant:"subtitle2",style:{marginBottom:"1rem",display:"flex",gap:"1ch"},component:"h2",children:["GroupId",i(su,{tooltip:"GroupId is used to ensure that different toggles will hash differently for the same user. The groupId defaults to feature toggle name, but you can override it to correlate rollout of multiple feature toggles."})]}),i(Sn,{label:"groupId",id:"groupId-input",value:jl(t.groupId),disabled:!r,onChange:u=>o("groupId")(u.target.value),"data-testid":Kne})]})]})},_fe=z("div")(({theme:e})=>({display:"grid",gap:e.spacing(1)})),Ife=z("div")(({theme:e})=>({display:"flex",gap:e.spacing(1),flexWrap:"wrap"})),Afe=z("div")(({theme:e})=>({display:"flex",gap:e.spacing(1),alignItems:"start"})),sP=({name:e,list:t,setConfig:n,disabled:r,errors:o})=>{const[a,s]=f.exports.useState(""),l="Enter",c=m=>{d(m)},u=m=>{(m==null?void 0:m.key)===l&&(d(m),m.preventDefault(),m.stopPropagation())},d=m=>{m.preventDefault();const b=m.target.value;if(b){const y=b.split(/,\s*/).filter(g=>!t.includes(g));if(y.length>0){const g=t.concat(y).filter(x=>x);n(e,g.join(","))}s("")}},p=m=>{t[m]=null,n(e,t.length===1?"":t.filter(Boolean).join(","))},h=m=>{s(m.currentTarget.value)};return w(_fe,{children:[w(Te,{variant:"subtitle2",component:"h2",children:["List of ",e]}),i(F,{condition:t.length>0,show:i(Ife,{children:t.map((m,b)=>i(jr,{label:i(Tr,{maxWidth:"300",text:m,maxLength:50}),onDelete:r?void 0:()=>p(b),title:"Remove value"},b+m))})}),i(F,{condition:!r,show:w(Afe,{children:[i(At,{error:Boolean(o.getFormError(e)),helperText:o.getFormError(e),name:"input_field",variant:"outlined",label:"Add items",id:"input-add-items",value:a,size:"small",placeholder:"",onBlur:c,onChange:h,onKeyDown:u,"data-testid":Xne}),i(nt,{onClick:d,"data-testid":Jne,variant:"outlined",color:"secondary",startIcon:i(io,{}),children:"Add"})]})})]})},Nfe=({editable:e,parameters:t,updateParameter:n,errors:r})=>i("div",{children:i(sP,{name:"userIds",list:Cl(t.userIds),disabled:!e,setConfig:n,errors:r})}),yd=({text:e})=>e?i(mt,{sx:t=>({color:t.palette.text.secondary,fontSize:t.fontSizes.smallerBody,marginTop:t.spacing(1)}),children:e}):null,$fe=({definition:e,parameters:t,updateParameter:n,editable:r,errors:o})=>{const{type:a,name:s,description:l,required:c}=e,u=t[s],d=o.getFormError(s),p=c?`${s} * `:s,h=y=>{n(s,y.target.value)},m=(y,g)=>{n(s,g.toString())},b=(y,g)=>{n(s,String(g))};if(a==="percentage")return w("div",{children:[i(iP,{name:s,onChange:m,disabled:!r,value:ip(t[s]),minLabel:"off",maxLabel:"on"}),i(yd,{text:l})]});if(a==="list")return w("div",{children:[i(sP,{name:s,list:Cl(t[s]),disabled:!r,setConfig:n,errors:o}),i(yd,{text:l})]});if(a==="number")return w("div",{children:[i(At,{error:Boolean(d),helperText:d,variant:"outlined",size:"small","aria-required":c,style:{width:"100%"},disabled:!r,label:p,onChange:h,value:u}),i(yd,{text:l})]});if(a==="boolean"){const g=jl(t[s])==="true";return w("div",{children:[i($n,{label:s,control:i(ro,{name:s,onChange:b,checked:g})}),i(yd,{text:l})]})}return w("div",{children:[i(At,{rows:1,placeholder:"",variant:"outlined",size:"small",style:{width:"100%"},"aria-required":c,disabled:!r,error:Boolean(d),helperText:d,name:s,label:p,onChange:h,value:jl(t[s])}),i(yd,{text:l})]})},Pfe=ao("div")(({theme:e})=>({display:"grid",gap:e.spacing(4)})),Ofe=({parameters:e,strategyDefinition:t,updateParameter:n,editable:r,errors:o})=>!t||t.parameters.length===0?null:i(Pfe,{children:t.parameters.map((a,s)=>i("div",{children:i($fe,{definition:a,parameters:e,updateParameter:n,editable:r,errors:o})},s))}),wi=(e={revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0})=>{const t=()=>{const l=bt("api/admin/context");return fetch(l,{method:"GET"}).then(rn("Context variables")).then(c=>c.json())},n="api/admin/context",{data:r,mutate:o,error:a,isValidating:s}=Wt(n,t,e);return{context:r||[],error:a,loading:s&&!a&&!r,refetchUnleashContext:o}};function $a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(o){return"'"+o+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function fu(e){return!!e&&!!e[Yo]}function Ul(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===Ufe}(e)||Array.isArray(e)||!!e[I5]||!!e.constructor[I5]||_C(e)||IC(e))}function Hp(e,t,n){n===void 0&&(n=!1),Lu(e)===0?(n?Object.keys:OC)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Lu(e){var t=e[Yo];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_C(e)?2:IC(e)?3:0}function zb(e,t){return Lu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Dfe(e,t){return Lu(e)===2?e.get(t):e[t]}function lP(e,t,n){var r=Lu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function Lfe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _C(e){return zfe&&e instanceof Map}function IC(e){return jfe&&e instanceof Set}function sl(e){return e.o||e.t}function AC(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Wfe(e);delete t[Yo];for(var n=OC(t),r=0;r<n.length;r++){var o=n[r],a=t[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function NC(e,t){return t===void 0&&(t=!1),$C(e)||fu(e)||!Ul(e)||(Lu(e)>1&&(e.set=e.add=e.clear=e.delete=Mfe),Object.freeze(e),t&&Hp(e,function(n,r){return NC(r,!0)},!0)),e}function Mfe(){$a(2)}function $C(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function li(e){var t=Hfe[e];return t||$a(18,e),t}function S5(){return Vp}function K0(e,t){t&&(li("Patches"),e.u=[],e.s=[],e.v=t)}function rg(e){jb(e),e.p.forEach(Bfe),e.p=null}function jb(e){e===Vp&&(Vp=e.l)}function C5(e){return Vp={p:[],l:Vp,h:e,m:!0,_:0}}function Bfe(e){var t=e[Yo];t.i===0||t.i===1?t.j():t.O=!0}function X0(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||li("ES5").S(t,e,r),r?(n[Yo].P&&(rg(t),$a(4)),Ul(e)&&(e=og(t,e),t.l||ag(t,e)),t.u&&li("Patches").M(n[Yo].t,e,t.u,t.s)):e=og(t,n,[]),rg(t),t.u&&t.v(t.u,t.s),e!==cP?e:void 0}function og(e,t,n){if($C(t))return t;var r=t[Yo];if(!r)return Hp(t,function(a,s){return E5(e,r,t,a,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ag(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=AC(r.k):r.o;Hp(r.i===3?new Set(o):o,function(a,s){return E5(e,r,o,a,s,n)}),ag(e,o,!1),n&&e.u&&li("Patches").R(r,n,e.u,e.s)}return r.o}function E5(e,t,n,r,o,a){if(fu(o)){var s=og(e,o,a&&t&&t.i!==3&&!zb(t.D,r)?a.concat(r):void 0);if(lP(n,r,s),!fu(s))return;e.m=!1}if(Ul(o)&&!$C(o)){if(!e.h.F&&e._<1)return;og(e,o),t&&t.A.l||ag(e,o)}}function ag(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&NC(t,n)}function J0(e,t){var n=e[Yo];return(n?sl(n):e)[t]}function T5(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ub(e){e.P||(e.P=!0,e.l&&Ub(e.l))}function Q0(e){e.o||(e.o=AC(e.t))}function Wb(e,t,n){var r=_C(t)?li("MapSet").N(t,n):IC(t)?li("MapSet").T(t,n):e.g?function(o,a){var s=Array.isArray(o),l={i:s?1:0,A:a?a.A:S5(),P:!1,I:!1,D:{},l:a,t:o,k:null,o:null,j:null,C:!1},c=l,u=Hb;s&&(c=[l],u=Ld);var d=Proxy.revocable(c,u),p=d.revoke,h=d.proxy;return l.k=h,l.j=p,h}(t,n):li("ES5").J(t,n);return(n?n.A:S5()).p.push(r),r}function Ffe(e){return fu(e)||$a(22,e),function t(n){if(!Ul(n))return n;var r,o=n[Yo],a=Lu(n);if(o){if(!o.P&&(o.i<4||!li("ES5").K(o)))return o.t;o.I=!0,r=R5(n,a),o.I=!1}else r=R5(n,a);return Hp(r,function(s,l){o&&Dfe(o.t,s)===l||lP(r,s,t(l))}),a===3?new Set(r):r}(e)}function R5(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return AC(e)}var k5,Vp,PC=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",zfe=typeof Map!="undefined",jfe=typeof Set!="undefined",_5=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",cP=PC?Symbol.for("immer-nothing"):((k5={})["immer-nothing"]=!0,k5),I5=PC?Symbol.for("immer-draftable"):"__$immer_draftable",Yo=PC?Symbol.for("immer-state"):"__$immer_state",Ufe=""+Object.prototype.constructor,OC=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Wfe=Object.getOwnPropertyDescriptors||function(e){var t={};return OC(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Hfe={},Hb={get:function(e,t){if(t===Yo)return e;var n=sl(e);if(!zb(n,t))return function(o,a,s){var l,c=T5(a,s);return c?"value"in c?c.value:(l=c.get)===null||l===void 0?void 0:l.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Ul(r)?r:r===J0(e.t,t)?(Q0(e),e.o[t]=Wb(e.A.h,r,e)):r},has:function(e,t){return t in sl(e)},ownKeys:function(e){return Reflect.ownKeys(sl(e))},set:function(e,t,n){var r=T5(sl(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=J0(sl(e),t),a=o==null?void 0:o[Yo];if(a&&a.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(Lfe(n,o)&&(n!==void 0||zb(e.t,t)))return!0;Q0(e),Ub(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return J0(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,Q0(e),Ub(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=sl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){$a(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){$a(12)}},Ld={};Hp(Hb,function(e,t){Ld[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ld.deleteProperty=function(e,t){return Ld.set.call(this,e,t,void 0)},Ld.set=function(e,t,n){return Hb.set.call(this,e[0],t,n,e[0])};var Vfe=function(){function e(n){var r=this;this.g=_5,this.F=!0,this.produce=function(o,a,s){if(typeof o=="function"&&typeof a!="function"){var l=a;a=o;var c=r;return function(y){var g=this;y===void 0&&(y=l);for(var x=arguments.length,v=Array(x>1?x-1:0),S=1;S<x;S++)v[S-1]=arguments[S];return c.produce(y,function(E){var R;return(R=a).call.apply(R,[g,E].concat(v))})}}var u;if(typeof a!="function"&&$a(6),s!==void 0&&typeof s!="function"&&$a(7),Ul(o)){var d=C5(r),p=Wb(r,o,void 0),h=!0;try{u=a(p),h=!1}finally{h?rg(d):jb(d)}return typeof Promise!="undefined"&&u instanceof Promise?u.then(function(y){return K0(d,s),X0(y,d)},function(y){throw rg(d),y}):(K0(d,s),X0(u,d))}if(!o||typeof o!="object"){if((u=a(o))===void 0&&(u=o),u===cP&&(u=void 0),r.F&&NC(u,!0),s){var m=[],b=[];li("Patches").M(o,u,m,b),s(m,b)}return u}$a(21,o)},this.produceWithPatches=function(o,a){if(typeof o=="function")return function(u){for(var d=arguments.length,p=Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];return r.produceWithPatches(u,function(m){return o.apply(void 0,[m].concat(p))})};var s,l,c=r.produce(o,a,function(u,d){s=u,l=d});return typeof Promise!="undefined"&&c instanceof Promise?c.then(function(u){return[u,s,l]}):[c,s,l]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Ul(n)||$a(8),fu(n)&&(n=Ffe(n));var r=C5(this),o=Wb(this,n,void 0);return o[Yo].C=!0,jb(r),o},t.finishDraft=function(n,r){var o=n&&n[Yo],a=o.A;return K0(a,r),X0(void 0,a)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!_5&&$a(20),this.g=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var a=r[o];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}o>-1&&(r=r.slice(o+1));var s=li("Patches").$;return fu(n)?s(n,r):this.produce(n,function(l){return s(l,r)})},e}(),Ko=new Vfe,Gfe=Ko.produce;Ko.produceWithPatches.bind(Ko);Ko.setAutoFreeze.bind(Ko);Ko.setUseProxies.bind(Ko);Ko.applyPatches.bind(Ko);Ko.createDraft.bind(Ko);Ko.finishDraft.bind(Ko);var ia=Gfe;const qfe=({hasAccess:e,strategy:t,strategyDefinition:n,setStrategy:r,validateParameter:o,errors:a})=>{var c,u,d;const{context:s}=wi(),l=(p,h)=>{r(ia(m=>{var b;m.parameters=(b=m.parameters)!=null?b:{},m.parameters[p]=h})),o(p,h)};switch(t.name){case"default":return i(Sfe,{strategyDefinition:n});case"flexibleRollout":return i(kfe,{context:s,parameters:(c=t.parameters)!=null?c:{},updateParameter:l,editable:e});case"userWithId":return i(Nfe,{parameters:(u=t.parameters)!=null?u:{},updateParameter:l,editable:e,errors:a});default:return i(Ofe,{strategyDefinition:n,parameters:(d=t.parameters)!=null?d:{},updateParameter:l,editable:e,errors:a})}},Mu=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{addStrategyToFeature:async(c,u,d,p)=>{const h=`api/admin/projects/${c}/features/${u}/environments/${d}/strategies`,m=t(h,{method:"POST",body:JSON.stringify(p)},"addStrategyToFeature");return(await e(m.caller,m.id)).json()},updateStrategyOnFeature:async(c,u,d,p,h)=>{const m=`api/admin/projects/${c}/features/${u}/environments/${d}/strategies/${p}`,b=t(m,{method:"PUT",body:JSON.stringify(h)},"updateStrategyOnFeature");await e(b.caller,b.id)},deleteStrategyFromFeature:async(c,u,d,p)=>{const h=`api/admin/projects/${c}/features/${u}/environments/${d}/strategies/${p}`,m=t(h,{method:"DELETE"},"deleteStrategyFromFeature");await e(m.caller,m.id)},setStrategiesSortOrder:async(c,u,d,p)=>{const h=`api/admin/projects/${c}/features/${u}/environments/${d}/strategies/set-sort-order`,m=t(h,{method:"POST",body:JSON.stringify(p)},"setStrategiesSortOrderOnFeature");await e(m.caller,m.id)},loading:r,errors:n}},Of=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{createSegment:async c=>{const u=t(DC(),{method:"POST",body:JSON.stringify(c)});return e(u.caller,u.id)},deleteSegment:async c=>{const u=t(A5(c),{method:"DELETE"});return e(u.caller,u.id)},updateSegment:async(c,u)=>{const d=t(A5(c),{method:"PUT",body:JSON.stringify(u)});return e(d.caller,d.id)},setStrategySegments:async c=>{const u=t(Yfe(),{method:"POST",body:JSON.stringify(c)});return e(u.caller,u.id)},errors:n,loading:r}},DC=()=>"api/admin/segments",A5=e=>`${DC()}/${e}`,Yfe=()=>`${DC()}/strategies`,Gs=e=>{const{uiConfig:t}=st(),{data:n,error:r,mutate:o}=Wt([e,t.flags],Kfe,{refreshInterval:15*1e3}),a=f.exports.useCallback(()=>{o().catch(console.warn)},[o]);return{segments:n,refetchSegments:a,loading:!r&&!n,error:r}},Kfe=async(e,t)=>t!=null&&t.SE?fetch(Xfe(e)).then(rn("Segments")).then(n=>n.json()).then(n=>n.segments):[],Xfe=e=>bt(e?`api/admin/segments/strategies/${e}`:"api/admin/segments");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ig=function(){return ig=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ig.apply(this,arguments)},Jfe=function(e){return typeof e=="function"},Qfe=function(e){return Jfe(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},Zfe=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=Qfe(n),a=o[0],s=o[1],l=o[2],c=(l.use||[]).concat(t);return e(a,s,ig(ig({},l),{use:c}))}},ehe=function(e){return function(t,n,r){return r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)}},the=Zfe(Wt,ehe);const uP={environments:[],name:"",type:"",stale:!1,archived:!1,createdAt:"",lastSeenAt:"",project:"",variants:[],description:"",impressionData:!1},vr=(e,t,n)=>{const r=pP(e,t),{data:o,error:a,mutate:s}=Wt(["useFeature",r],()=>dP(r),n),l=f.exports.useCallback(()=>{s().catch(console.warn)},[s]);return{feature:(o==null?void 0:o.body)||uP,refetchFeature:l,loading:!a&&!o,status:o==null?void 0:o.status,error:a}},dP=async e=>{const t=await fetch(e);return t.status===404?{status:404}:(t.ok||await rn("Feature toggle data")(t),{status:t.status,body:await t.json()})},pP=(e,t)=>bt(`api/admin/projects/${e}/features/${t}`),oy=(e,t)=>{const{refetchFeature:n}=vr(e,t),r=pP(e,t),{data:o,error:a,mutate:s}=the(["useFeatureImmutable",r],()=>dP(r)),l=f.exports.useCallback(async()=>{await s(),await n()},[s,n]);return{feature:(o==null?void 0:o.body)||uP,refetchFeature:l,loading:!a&&!o,status:o==null?void 0:o.status,error:a}},fP=()=>{const[e,t]=f.exports.useState({}),n=f.exports.useCallback(s=>e[s],[e]),r=f.exports.useCallback((s,l)=>{t(ia(c=>{c[s]=l}))},[t]),o=f.exports.useCallback(s=>{t(ia(l=>{delete l[s]}))},[t]),a=f.exports.useCallback(()=>Object.values(e).some(Boolean),[e]);return{getFormError:n,setFormError:r,removeFormError:o,hasFormErrors:a}},ay=e=>{const{data:t,error:n,mutate:r}=Wt(e?bt(`api/admin/strategies/${e}`):null,nhe),o=f.exports.useCallback(()=>{r().catch(console.warn)},[r]);return{strategyDefinition:t,refetchStrategy:o,loading:!n&&!t,error:n}},nhe=e=>fetch(e).then(rn("Strategy")).then(t=>t.json()),rhe=(e,t)=>{const n=t.parameters.map(r=>r.name);return Object.fromEntries(Object.entries(e).sort((r,o)=>n.indexOf(r[0])-n.indexOf(o[0])))},ohe=()=>{var _;const e=Ve("projectId"),t=Ve("featureId"),n=ng("environmentId"),r=ng("strategyId"),[o,a]=f.exports.useState({}),[s,l]=f.exports.useState([]),{updateStrategyOnFeature:c,loading:u}=Mu(),{setStrategySegments:d}=Of(),{strategyDefinition:p}=ay(o.name),{setToastData:h,setToastApiError:m}=tt(),b=fP(),{uiConfig:y}=st(),{unleashUrl:g}=y,x=Ye(),{feature:v,refetchFeature:S}=oy(e,t),{segments:E,refetchSegments:R}=Gs(r);f.exports.useEffect(()=>{const N=v.environments.flatMap(k=>k.strategies).find(k=>k.id===r);a(k=>V(V({},k),N))},[r,v]),f.exports.useEffect(()=>{E&&l(E)},[E]);const A=async()=>{try{await c(e,t,n,r,hP(o)),y.flags.SE&&(await d({environmentId:n,projectId:e,strategyId:r,segmentIds:s.map(N=>N.id)}),await R()),h({title:"Strategy updated",type:"success",confetti:!0}),S(),x(Bu(e,t))}catch(N){m(Ue(N))}};return!o.id||!p?null:i(Un,{modal:!0,title:tc((_=o.name)!=null?_:""),description:gP,documentationLink:vP,documentationLinkLabel:yP,formatApiCode:()=>ahe(e,t,n,o,p,g),children:i(eO,{feature:v,strategy:o,setStrategy:a,segments:s,setSegments:l,environmentId:n,onSubmit:A,loading:u,permission:jS,errors:b})})},hP=e=>{var t,n;return{name:e.name,constraints:(t=e.constraints)!=null?t:[],parameters:(n=e.parameters)!=null?n:{}}},Bu=(e,t)=>`/projects/${e}/features/${t}`,mP=(e,t,n,r)=>{const o=new URLSearchParams({environmentId:n,strategyId:r});return`/projects/${e}/features/${t}/strategies/edit?${o}`},ahe=(e,t,n,r,o,a)=>{var u;if(!a)return"";const s=ee(V({},r),{parameters:rhe((u=r.parameters)!=null?u:{},o)}),l=`${a}/api/admin/projects/${e}/features/${t}/environments/${n}/strategies/${r.id}`,c=JSON.stringify(s,void 0,2);return`curl --location --request PUT '${l}' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${c}'`},gP=`
    An activation strategy will only run when a feature toggle is enabled and provides a way to control who will get access to the feature.
    If any of a feature toggle's activation strategies returns true, the user will get access.
`,vP="https://docs.getunleash.io/user_guide/activation_strategy",yP="Strategies documentation",ihe=({feature:e,environmentId:t})=>{const n=Bu(e.project,e.name),r=i(Ct,{to:n,style:{color:"inherit"},children:"feature toggle page"});return i(F,{condition:she(e,t),show:w(yt,{severity:"success",children:["This feature toggle is currently enabled in the"," ",i("strong",{children:t})," environment. Any changes made here will be available to users as soon as you hit"," ",i("strong",{children:"save"}),"."]}),elseShow:w(yt,{severity:"warning",children:["This feature toggle is currently disabled in the"," ",i("strong",{children:t})," environment. Any changes made here will not take effect until the toggle has been enabled on the ",r,"."]})})},she=(e,t)=>{const n=e.environments.find(r=>r.name===t);return n?n.enabled:!1},Si=le()(e=>({constraintIconContainer:{backgroundColor:e.palette.background.paper,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",marginRight:e.spacing(1),[e.breakpoints.down(650)]:{marginBottom:"1rem",marginRight:0}},constraintIcon:{fill:"#fff"},accordion:{border:`1px solid ${e.palette.dividerAlternative}`,borderRadius:e.shape.borderRadiusMedium,backgroundColor:e.palette.constraintAccordion.background,boxShadow:"none",margin:0},accordionRoot:{"&:before":{opacity:"0 !important"}},accordionEdit:{backgroundColor:e.palette.constraintAccordion.editBackground},headerMetaInfo:{display:"flex",alignItems:"stretch",marginLeft:e.spacing(1),[e.breakpoints.down(710)]:{marginLeft:0,flexDirection:"column",alignItems:"center",width:"100%"}},headerContainer:{display:"flex",alignItems:"center",width:"100%",[e.breakpoints.down(710)]:{flexDirection:"column",alignItems:"center",position:"relative"}},headerValuesContainerWrapper:{display:"flex",alignItems:"stretch",margin:"auto 0"},headerValuesContainer:{display:"flex",justifyContent:"stretch",margin:"auto 0",flexDirection:"column",marginLeft:e.spacing(1),[e.breakpoints.down(710)]:{marginLeft:0}},headerValues:{fontSize:e.fontSizes.smallBody},headerValuesExpand:{fontSize:e.fontSizes.smallBody,marginTop:"4px",color:e.palette.primary.dark,[e.breakpoints.down(710)]:{textAlign:"center"}},headerConstraintContainer:{minWidth:"152px",position:"relative",[e.breakpoints.down(710)]:{paddingRight:0}},editingBadge:{borderRadius:e.shape.borderRadiusExtraLarge,padding:"0.25rem 0.5rem",backgroundColor:"#635DC5",color:"#fff",marginLeft:"auto",fontSize:"0.9rem",[e.breakpoints.down(650)]:{position:"absolute",right:0,top:"-10px"}},headerText:{maxWidth:"400px",fontSize:e.fontSizes.smallBody,[e.breakpoints.down("xl")]:{display:"none"}},selectContainer:{display:"flex",alignItems:"center",[e.breakpoints.down(770)]:{flexDirection:"column"}},bottomSelect:{[e.breakpoints.down(770)]:{marginTop:"1rem"},display:"inline-flex"},headerSelect:{marginRight:"1rem",width:"200px",[e.breakpoints.between(1101,1365)]:{width:"170px",marginRight:"8px"}},chip:{margin:"0 0.5rem 0.5rem 0"},chipValue:{whiteSpace:"pre"},headerActions:{marginLeft:"auto",whiteSpace:"nowrap",[e.breakpoints.down(710)]:{display:"none"}},accordionDetails:{borderTop:`1px dashed ${e.palette.grey[300]}`,display:"flex",flexDirection:"column"},valuesContainer:{padding:"1rem 0rem",maxHeight:"400px",overflowY:"auto"},summary:{border:"none",padding:e.spacing(.5,3),"&:hover .valuesExpandLabel":{textDecoration:"underline"}},settingsIcon:{height:"32.5px",width:"32.5px",marginRight:"0.5rem",fill:e.palette.inactiveIcon},form:{padding:0,margin:0,width:"100%"}})),lhe=le()(e=>({inputContainer:{padding:"1rem",backgroundColor:e.palette.neutral.light},buttonContainer:{display:"flex",alignItems:"center",marginTop:"1rem",borderTop:`1px solid ${e.palette.grey[300]}`,width:"100%",padding:"1rem"},innerButtonContainer:{marginLeft:"auto"},leftButton:{marginRight:"0.5rem",minWidth:"125px"},rightButton:{marginLeft:"0.5rem",minWidth:"125px"}})),LC="NOT_IN",iy="IN",MC="STR_ENDS_WITH",BC="STR_STARTS_WITH",FC="STR_CONTAINS",zC="NUM_EQ",jC="NUM_GT",UC="NUM_GTE",WC="NUM_LT",HC="NUM_LTE",sy="DATE_AFTER",VC="DATE_BEFORE",GC="SEMVER_EQ",qC="SEMVER_GT",YC="SEMVER_LT",che=[iy,LC,FC,BC,MC,zC,jC,UC,WC,HC,VC,sy,GC,qC,YC],Bi=[FC,BC,MC],sp=[iy,LC],Yc=[zC,jC,UC,WC,HC],ua=[VC,sy],Kc=[GC,qC,YC],bP=[...Kc,...ua,...Yc];[...Bi,...sp];const uhe=[...Bi,...ua,...bP],Vn=(e,t)=>e.some(n=>n===t),xP=()=>w(yt,{severity:"warning",children:["Remember to update your Unleash client! New operators require new SDK versions. ",i(dhe,{}),"."]}),dhe=()=>i("a",{href:"https://docs.getunleash.io/advanced/strategy_constraints#strategy-constraint-operators",target:"_blank",rel:"noreferrer",style:{color:"inherit"},children:"Read more"}),phe=({localConstraint:e,children:t,triggerTransition:n,setAction:r,onSubmit:o})=>{const{classes:a}=lhe();return w(Ne,{children:[w("div",{className:a.inputContainer,children:[i(F,{condition:Vn(uhe,e.operator),show:i(xP,{})}),t]}),i("div",{className:a.buttonContainer,children:w("div",{className:a.innerButtonContainer,children:[i(nt,{type:"button",onClick:o,variant:"contained",color:"primary",className:a.leftButton,children:"Save"}),i(nt,{onClick:()=>{r(WP),n()},className:a.rightButton,children:"Cancel"})]})})]})},Fa=p=>{var h=p,{name:e,value:t="",label:n="",options:r,onChange:o,id:a,disabled:s=!1,className:l,classes:c,fullWidth:u}=h,d=en(h,["name","value","label","options","onChange","id","disabled","className","classes","fullWidth"]);const m=()=>r.map(y=>i(_r,{value:y.key,title:y.title||"","data-testid":`${_$}-${y.label}`,disabled:y.disabled,children:y.label},y.key));return w(qo,{variant:"outlined",size:"small",classes:c,fullWidth:u,children:[i(Iu,{htmlFor:a,children:n}),i(Nu,ee(V({name:e,disabled:s,onChange:y=>{y.preventDefault(),o(String(y.target.value))},className:l,label:n,id:a,value:t,IconComponent:Gm},d),{children:m()}))]})},wP=({compact:e})=>i(mt,{sx:{backgroundColor:"primary.light",p:e?"1px":"2px",borderRadius:"50%",width:e?"18px":"24px",height:e?"18px":"24px",marginRight:"13px"},children:i(Fte,{sx:{fill:"white",display:"block",width:e?"16px":"20px",height:e?"16px":"20px"}})}),fhe=(e,t)=>{const n=`To satisfy this constraint, values passed into the SDK as ${t} must`;if(e===iy)return`${n} include:`;if(e===LC)return`${n} not include:`;if(e===MC)return`${n} end with:`;if(e===BC)return`${n} start with:`;if(e===FC)return`${n} contain:`;if(e===zC)return`${n} match:`;if(e===jC)return`${n} be greater than:`;if(e===UC)return`${n} be greater than or equal to:`;if(e===WC)return`${n} be less than:`;if(e===HC)return`${n} be less than or equal to:`;if(e===sy)return`${n} be after the following date`;if(e===VC)return`${n} be before the following date:`;if(e===GC)return`${n} match the following version:`;if(e===qC)return`${n} be greater than the following version:`;if(e===YC)return`${n} be less than the following version:`},Vb=e=>hhe[e],hhe={IN:"is one of",NOT_IN:"is not one of",STR_CONTAINS:"is a string that contains",STR_STARTS_WITH:"is a string that starts with",STR_ENDS_WITH:"is a string that ends with",NUM_EQ:"is a number equal to",NUM_GT:"is a number greater than",NUM_GTE:"is a number greater than or equal to",NUM_LT:"is a number less than",NUM_LTE:"is a number less than or equal to",DATE_BEFORE:"is a date before",DATE_AFTER:"is a date after",SEMVER_EQ:"is a SemVer equal to",SEMVER_GT:"is a SemVer greater than",SEMVER_LT:"is a SemVer less than"},mhe=le()(e=>({valueContainer:{lineHeight:1.1,marginTop:-2,marginBottom:-10},optionContainer:{lineHeight:1.2},label:{fontSize:e.fontSizes.smallBody},description:{fontSize:e.fontSizes.smallerBody,color:e.palette.grey[700],overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},separator:{position:"relative",overflow:"visible",marginTop:"1rem","&:before":{content:'""',display:"block",position:"absolute",top:"-0.5rem",left:0,right:0,borderTop:"1px solid",borderTopColor:e.palette.grey[300]}},formInput:{[e.breakpoints.between(1101,1365)]:{width:"170px",marginRight:"8px"}}})),ghe=({options:e,value:t,onChange:n})=>{const{classes:r}=mhe(),[o,a]=f.exports.useState(!1),s=c=>{n(c.target.value)},l=()=>w("div",{className:r.valueContainer,children:[i("div",{className:r.label,children:t}),i("div",{className:r.description,children:Vb(t)})]});return w(qo,{variant:"outlined",size:"small",fullWidth:!0,className:r.formInput,children:[i(Iu,{htmlFor:"operator-select",children:"Operator"}),i(Nu,{id:"operator-select",name:"operator",label:"Operator",value:t,open:o,onOpen:()=>a(!0),onClose:()=>a(!1),onChange:s,renderValue:l,children:e.map(c=>i(_r,{value:c,className:it(vhe(e,c)&&r.separator),children:w("div",{className:r.optionContainer,children:[i("div",{className:r.label,children:c}),i("div",{className:r.description,children:Vb(c)})]})},c))})]})},vhe=(e,t)=>t===e[0]?!1:yhe.some(n=>n[0]===t),yhe=[sp,Bi,Yc,ua,Kc],Gp="currentTime",SP=e=>che.filter(t=>!(Vn(ua,t)&&e!==Gp||!Vn(ua,t)&&e===Gp)),Gb=e=>f.exports.createElement("svg",V({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0033 3C10.6666 3 9.62387 4.15704 9.76236 5.48654L10.6238 13.7567C10.6974 14.4633 11.293 15 12.0033 15C12.7137 15 13.3093 14.4633 13.3829 13.7567L14.2443 5.48655C14.3828 4.15704 13.34 3 12.0033 3ZM12.0033 17C11.0368 17 10.2533 17.7835 10.2533 18.75C10.2533 19.7165 11.0368 20.5 12.0033 20.5C12.9698 20.5 13.7533 19.7165 13.7533 18.75C13.7533 17.7835 12.9698 17 12.0033 17Z"})),N5=e=>f.exports.createElement("svg",V({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.10831 2.60839C3.71687 2.23054 3.09322 2.23475 2.70696 2.62102C2.31643 3.01154 2.31643 3.64471 2.70696 4.03523L10.414 11.7423L10.6238 13.7566C10.6974 14.4631 11.293 14.9998 12.0033 14.9998C12.4551 14.9998 12.8605 14.7827 13.1147 14.4429L19.6775 21.0058C20.068 21.3963 20.7012 21.3963 21.0917 21.0058C21.478 20.6195 21.4822 19.9959 21.1044 19.6044C21.1001 19.6003 21.0958 19.5961 21.0916 19.5919L4.12102 2.62132C4.11674 2.61704 4.1125 2.61273 4.10831 2.60839ZM13.8264 9.4983L14.2443 5.4864C14.3828 4.15689 13.34 2.99985 12.0033 2.99985C10.6859 2.99985 9.65401 4.12375 9.7571 5.42898L13.8264 9.4983ZM12.0033 16.9998C11.0368 16.9998 10.2533 17.7834 10.2533 18.7498C10.2533 19.7163 11.0368 20.4998 12.0033 20.4998C12.9698 20.4998 13.7533 19.7163 13.7533 18.7498C13.7533 17.7834 12.9698 16.9998 12.0033 16.9998Z"})),CP=ao(Ht)(({theme:e})=>({width:"28px",minWidth:"28px",maxWidth:"28px",height:"auto",backgroundColor:e.palette.tertiary.background,borderRadius:e.shape.borderRadius,padding:"0 1px 0",marginRight:"1rem","&:hover":{background:e.palette.tertiary.contrast[300]},[e.breakpoints.between(1101,1365)]:{marginRight:"0.5rem",alignItems:"center"}})),EP=ao(Ht)(({theme:e})=>({width:"28px",minWidth:"28px",maxWidth:"28px",color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,borderRadius:e.shape.borderRadius,marginRight:"1rem",padding:"0 1px 0","&:hover":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main},[e.breakpoints.between(1101,1365)]:{marginRight:"0.5rem",alignItems:"center"}})),qb=({darkmode:e,lightmode:t})=>{const{themeMode:n}=f.exports.useContext(Ws);return i(F,{condition:n==="dark",show:e,elseShow:t})},bhe=({localConstraint:e,setInvertedOperator:t})=>{const n=pn();return i(wt,{title:Boolean(e.inverted)?"Remove negation":"Negate operator",arrow:!0,children:i(mt,{sx:{display:"flex",alignItems:"stretch"},children:i(F,{condition:Boolean(e.inverted),show:i(EP,{onClick:t,disableRipple:!0,children:i(qb,{darkmode:i(Gb,{style:{fill:n.palette.background.paper}}),lightmode:i(Gb,{})})}),elseShow:i(CP,{onClick:t,disableRipple:!0,children:i(qb,{darkmode:i(N5,{style:{fill:n.palette.background.paper}}),lightmode:i(N5,{})})})})})})},TP=e=>f.exports.createElement("svg",V({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{d:"M5 18C5 18.55 5.45 19 6 19H18C18.55 19 19 18.55 19 18C19 17.45 18.55 17 18 17H6C5.45 17 5 17.45 5 18ZM9.5 12.8H14.5L15.16 14.4C15.31 14.76 15.66 15 16.05 15C16.74 15 17.2 14.29 16.93 13.66L13.05 4.69C12.87 4.27 12.46 4 12 4C11.54 4 11.13 4.27 10.95 4.69L7.07 13.66C6.8 14.29 7.27 15 7.96 15C8.35 15 8.7 14.76 8.85 14.4L9.5 12.8ZM12 5.98L13.87 11H10.13L12 5.98Z"})),xhe=e=>f.exports.createElement("svg",V({width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),f.exports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.10831 2.60839C3.71687 2.23054 3.09322 2.23475 2.70696 2.62102C2.31643 3.01154 2.31643 3.64471 2.70696 4.03523L8.65871 9.98698L7.07 13.6598C6.8 14.2898 7.27 14.9998 7.96 14.9998C8.35 14.9998 8.7 14.7598 8.85 14.3998L9.5 12.7998H11.4716L15.6716 16.9998H6C5.45 16.9998 5 17.4498 5 17.9998C5 18.5498 5.45 18.9998 6 18.9998H17.6716L19.6775 21.0058C20.068 21.3963 20.7012 21.3963 21.0917 21.0058C21.478 20.6195 21.4822 19.9959 21.1044 19.6044C21.1001 19.6003 21.0958 19.5961 21.0916 19.5919L4.12102 2.62132C4.11674 2.61704 4.1125 2.61273 4.10831 2.60839ZM16.1235 11.7954L13.05 4.68985C12.87 4.26985 12.46 3.99985 12 3.99985C11.54 3.99985 11.13 4.26985 10.95 4.68985L10.3666 6.03851L11.5408 7.21265L12 5.97985L13.0045 8.67635L16.1235 11.7954Z"})),whe=({localConstraint:e,setCaseInsensitive:t})=>i(wt,{title:Boolean(e.caseInsensitive)?"Make it case sensitive":"Make it case insensitive",arrow:!0,children:i(mt,{sx:{display:"flex",alignItems:"stretch"},children:i(F,{condition:Boolean(e.caseInsensitive),show:i(CP,{onClick:t,disableRipple:!0,children:i(xhe,{})}),elseShow:i(EP,{onClick:t,disableRipple:!0,children:i(TP,{})})})})}),RP=({onEdit:e,onDelete:t,disableDelete:n=!1,disableEdit:r=!1})=>{const{classes:o}=Si(),a=e&&(l=>{l.stopPropagation(),e()}),s=t&&(l=>{l.stopPropagation(),t()});return w("div",{className:o.headerActions,children:[i(F,{condition:Boolean(a)&&!r,show:i(wt,{title:"Edit constraint",arrow:!0,children:i(Ht,{type:"button",onClick:a,disabled:r,children:i(ar,{})})})}),i(F,{condition:Boolean(s)&&!n,show:i(wt,{title:"Delete constraint",arrow:!0,children:i(Ht,{type:"button",onClick:s,disabled:n,children:i(er,{})})})})]})},She=({compact:e,localConstraint:t,setLocalConstraint:n,setContextName:r,setOperator:o,onDelete:a,setInvertedOperator:s,setCaseInsensitive:l})=>{const{classes:c}=Si(),{context:u}=wi(),{contextName:d,operator:p}=t,[h,m]=f.exports.useState(!1);if(f.exports.useEffect(()=>{d===Gp&&!Vn(ua,p)?n(g=>ee(V({},g),{operator:sy,value:new Date().toISOString()})):d!==Gp&&Vn(ua,p)?o(iy):Vn(Bi,p)&&m(!0)},[d,o,p,n]),!u)return null;const b=u.map(g=>({key:g.name,label:g.name})),y=g=>{Vn(ua,g)?n(x=>ee(V({},x),{operator:g,value:new Date().toISOString()})):(Vn(Bi,g)&&m(!0),o(g))};return w("div",{className:c.headerContainer,children:[i(wP,{}),w("div",{className:c.selectContainer,children:[i("div",{children:i(Fa,{id:"context-field-select",name:"contextName",label:"Context Field",autoFocus:!0,options:b,value:d||"",onChange:r,className:c.headerSelect})}),w("div",{className:c.bottomSelect,children:[i(bhe,{localConstraint:t,setInvertedOperator:s}),i("div",{className:c.headerSelect,children:i(ghe,{options:SP(d),value:p,onChange:y})}),i(F,{condition:h,show:i(whe,{localConstraint:t,setCaseInsensitive:l})})]})]}),i(F,{condition:!e,show:i("p",{className:c.headerText,children:fhe(p,d)})}),i(RP,{onDelete:a,disableEdit:!0})]})},$5=e=>ia(e,t=>{Vn(bP,e.operator)?delete t.values:delete t.value}),xo=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0}),o=async g=>{const v=t("api/admin/features/validate",{method:"POST",body:JSON.stringify({name:g})});try{return await e(v.caller,v.id)}catch(S){throw S}},a=async g=>{const v=t("api/admin/constraints/validate",{method:"POST",body:JSON.stringify(g)});await e(v.caller,v.id)},s=async(g,x)=>Fp.createFeature({projectId:g,createFeatureSchema:x}),l=f.exports.useCallback(async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}/environments/${v}/on`,E=t(S,{method:"POST"},"toggleFeatureEnvironmentOn");try{return await e(E.caller,E.id)}catch(R){throw R}},[t,e]),c=f.exports.useCallback(async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}/environments/${v}/off`,E=t(S,{method:"POST"},"toggleFeatureEnvironmentOff");try{return await e(E.caller,E.id)}catch(R){throw R}},[t,e]);return{validateFeatureToggleName:o,validateConstraint:a,createFeatureToggle:s,changeFeatureProject:async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}/changeProject`,E=t(S,{method:"POST",body:JSON.stringify({newProjectId:v})});try{return await e(E.caller,E.id)}catch(R){throw R}},errors:n,toggleFeatureEnvironmentOn:l,toggleFeatureEnvironmentOff:c,addTagToFeature:async(g,x)=>{const v=`api/admin/features/${g}/tags`,S=t(v,{method:"POST",body:JSON.stringify(V({},x))});try{return await e(S.caller,S.id)}catch(E){throw E}},deleteTagFromFeature:async(g,x,v)=>{const S=`api/admin/features/${g}/tags/${x}/${v}`,E=t(S,{method:"DELETE"});try{return await e(E.caller,E.id)}catch(R){throw R}},archiveFeatureToggle:async(g,x)=>{const v=`api/admin/projects/${g}/features/${x}`,S=t(v,{method:"DELETE"});try{return await e(S.caller,S.id)}catch(E){throw E}},patchFeatureToggle:async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}`,E=t(S,{method:"PATCH",body:JSON.stringify(v)});try{return await e(E.caller,E.id)}catch(R){throw R}},patchFeatureVariants:async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}/variants`,E=t(S,{method:"PATCH",body:JSON.stringify(v)});try{return await e(E.caller,E.id)}catch(R){throw R}},cloneFeatureToggle:async(g,x,v)=>{const S=`api/admin/projects/${g}/features/${x}/clone`,E=t(S,{method:"POST",body:JSON.stringify(v)});try{return await e(E.caller,E.id)}catch(R){throw R}},loading:r}};var Ps={exports:{}};const Che="2.0.0",Ehe=256,The=Number.MAX_SAFE_INTEGER||9007199254740991,Rhe=16;var ly={SEMVER_SPEC_VERSION:Che,MAX_LENGTH:Ehe,MAX_SAFE_INTEGER:The,MAX_SAFE_COMPONENT_LENGTH:Rhe};const khe=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var cy=khe;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=ly,r=cy;t=e.exports={};const o=t.re=[],a=t.src=[],s=t.t={};let l=0;const c=(u,d,p)=>{const h=l++;r(u,h,d),s[u]=h,a[h]=d,o[h]=new RegExp(d,p?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),c("FULL",`^${a[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),c("LOOSE",`^${a[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),c("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",a[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ps,Ps.exports);const _he=["includePrerelease","loose","rtl"],Ihe=e=>e?typeof e!="object"?{loose:!0}:_he.filter(t=>e[t]).reduce((t,n)=>(t[n]=!0,t),{}):{};var uy=Ihe;const P5=/^[0-9]+$/,kP=(e,t)=>{const n=P5.test(e),r=P5.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},Ahe=(e,t)=>kP(t,e);var Yb={compareIdentifiers:kP,rcompareIdentifiers:Ahe};const Mh=cy,{MAX_LENGTH:O5,MAX_SAFE_INTEGER:Bh}=ly,{re:D5,t:L5}=Ps.exports,Nhe=uy,{compareIdentifiers:xc}=Yb;class _a{constructor(t,n){if(n=Nhe(n),t instanceof _a){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>O5)throw new TypeError(`version is longer than ${O5} characters`);Mh("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?D5[L5.LOOSE]:D5[L5.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Bh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Bh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Bh||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){const a=+o;if(a>=0&&a<Bh)return a}return o}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Mh("SemVer.compare",this.version,this.options,t),!(t instanceof _a)){if(typeof t=="string"&&t===this.version)return 0;t=new _a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof _a||(t=new _a(t,this.options)),xc(this.major,t.major)||xc(this.minor,t.minor)||xc(this.patch,t.patch)}comparePre(t){if(t instanceof _a||(t=new _a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],o=t.prerelease[n];if(Mh("prerelease compare",n,r,o),r===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(r===void 0)return-1;if(r===o)continue;return xc(r,o)}while(++n)}compareBuild(t){t instanceof _a||(t=new _a(t,this.options));let n=0;do{const r=this.build[n],o=t.build[n];if(Mh("prerelease compare",n,r,o),r===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(r===void 0)return-1;if(r===o)continue;return xc(r,o)}while(++n)}inc(t,n){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n),this.inc("pre",n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n),this.inc("pre",n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}n&&(xc(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=[n,0]):this.prerelease=[n,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}}var wo=_a;const{MAX_LENGTH:$he}=ly,{re:M5,t:B5}=Ps.exports,F5=wo,Phe=uy,Ohe=(e,t)=>{if(t=Phe(t),e instanceof F5)return e;if(typeof e!="string"||e.length>$he||!(t.loose?M5[B5.LOOSE]:M5[B5.FULL]).test(e))return null;try{return new F5(e,t)}catch{return null}};var Fu=Ohe;const Dhe=Fu,Lhe=(e,t)=>{const n=Dhe(e,t);return n?n.version:null};var Mhe=Lhe;const Bhe=Fu,Fhe=(e,t)=>{const n=Bhe(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var zhe=Fhe;const z5=wo,jhe=(e,t,n,r)=>{typeof n=="string"&&(r=n,n=void 0);try{return new z5(e instanceof z5?e.version:e,n).inc(t,r).version}catch{return null}};var Uhe=jhe;const j5=wo,Whe=(e,t,n)=>new j5(e,n).compare(new j5(t,n));var za=Whe;const Hhe=za,Vhe=(e,t,n)=>Hhe(e,t,n)===0;var KC=Vhe;const U5=Fu,Ghe=KC,qhe=(e,t)=>{if(Ghe(e,t))return null;{const n=U5(e),r=U5(t),o=n.prerelease.length||r.prerelease.length,a=o?"pre":"",s=o?"prerelease":"";for(const l in n)if((l==="major"||l==="minor"||l==="patch")&&n[l]!==r[l])return a+l;return s}};var Yhe=qhe;const Khe=wo,Xhe=(e,t)=>new Khe(e,t).major;var Jhe=Xhe;const Qhe=wo,Zhe=(e,t)=>new Qhe(e,t).minor;var eme=Zhe;const tme=wo,nme=(e,t)=>new tme(e,t).patch;var rme=nme;const ome=Fu,ame=(e,t)=>{const n=ome(e,t);return n&&n.prerelease.length?n.prerelease:null};var ime=ame;const sme=za,lme=(e,t,n)=>sme(t,e,n);var cme=lme;const ume=za,dme=(e,t)=>ume(e,t,!0);var pme=dme;const W5=wo,fme=(e,t,n)=>{const r=new W5(e,n),o=new W5(t,n);return r.compare(o)||r.compareBuild(o)};var XC=fme;const hme=XC,mme=(e,t)=>e.sort((n,r)=>hme(n,r,t));var gme=mme;const vme=XC,yme=(e,t)=>e.sort((n,r)=>vme(r,n,t));var bme=yme;const xme=za,wme=(e,t,n)=>xme(e,t,n)>0;var dy=wme;const Sme=za,Cme=(e,t,n)=>Sme(e,t,n)<0;var JC=Cme;const Eme=za,Tme=(e,t,n)=>Eme(e,t,n)!==0;var _P=Tme;const Rme=za,kme=(e,t,n)=>Rme(e,t,n)>=0;var QC=kme;const _me=za,Ime=(e,t,n)=>_me(e,t,n)<=0;var ZC=Ime;const Ame=KC,Nme=_P,$me=dy,Pme=QC,Ome=JC,Dme=ZC,Lme=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return Ame(e,n,r);case"!=":return Nme(e,n,r);case">":return $me(e,n,r);case">=":return Pme(e,n,r);case"<":return Ome(e,n,r);case"<=":return Dme(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var IP=Lme;const Mme=wo,Bme=Fu,{re:Fh,t:zh}=Ps.exports,Fme=(e,t)=>{if(e instanceof Mme)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(Fh[zh.COERCE]);else{let r;for(;(r=Fh[zh.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||r.index+r[0].length!==n.index+n[0].length)&&(n=r),Fh[zh.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;Fh[zh.COERCERTL].lastIndex=-1}return n===null?null:Bme(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};var zme=Fme,jme=vn;vn.Node=Wl;vn.create=vn;function vn(e){var t=this;if(t instanceof vn||(t=new vn),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(o){t.push(o)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}vn.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t};vn.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};vn.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};vn.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)Wme(this,arguments[e]);return this.length};vn.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Hme(this,arguments[e]);return this.length};vn.prototype.pop=function(){if(!!this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};vn.prototype.shift=function(){if(!!this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};vn.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;n!==null;r++)e.call(t,n.value,r,this),n=n.next};vn.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;n!==null;r--)e.call(t,n.value,r,this),n=n.prev};vn.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value};vn.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value};vn.prototype.map=function(e,t){t=t||this;for(var n=new vn,r=this.head;r!==null;)n.push(e.call(t,r.value,this)),r=r.next;return n};vn.prototype.mapReverse=function(e,t){t=t||this;for(var n=new vn,r=this.tail;r!==null;)n.push(e.call(t,r.value,this)),r=r.prev;return n};vn.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;r!==null;o++)n=e(n,r.value,o),r=r.next;return n};vn.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;r!==null;o--)n=e(n,r.value,o),r=r.prev;return n};vn.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};vn.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};vn.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new vn;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(;o!==null&&r<t;r++,o=o.next)n.push(o.value);return n};vn.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new vn;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;o!==null&&r>t;r--)o=o.prev;for(;o!==null&&r>e;r--,o=o.prev)n.push(o.value);return n};vn.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(var a=[],r=0;o&&r<t;r++)a.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var r=0;r<n.length;r++)o=Ume(this,o,n[r]);return a};vn.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};function Ume(e,t,n){var r=t===e.head?new Wl(n,null,t,e):new Wl(n,t,t.next,e);return r.next===null&&(e.tail=r),r.prev===null&&(e.head=r),e.length++,r}function Wme(e,t){e.tail=new Wl(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Hme(e,t){e.head=new Wl(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Wl(e,t,n,r){if(!(this instanceof Wl))return new Wl(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{require("./iterator.js")(vn)}catch{}const Vme=jme,dl=Symbol("max"),$i=Symbol("length"),wc=Symbol("lengthCalculator"),lp=Symbol("allowStale"),El=Symbol("maxAge"),Ai=Symbol("dispose"),H5=Symbol("noDisposeOnSet"),Or=Symbol("lruList"),Ia=Symbol("cache"),AP=Symbol("updateAgeOnGet"),Z0=()=>1;class Gme{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[dl]=t.max||1/0;const n=t.length||Z0;if(this[wc]=typeof n!="function"?Z0:n,this[lp]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[El]=t.maxAge||0,this[Ai]=t.dispose,this[H5]=t.noDisposeOnSet||!1,this[AP]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[dl]=t||1/0,bd(this)}get max(){return this[dl]}set allowStale(t){this[lp]=!!t}get allowStale(){return this[lp]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[El]=t,bd(this)}get maxAge(){return this[El]}set lengthCalculator(t){typeof t!="function"&&(t=Z0),t!==this[wc]&&(this[wc]=t,this[$i]=0,this[Or].forEach(n=>{n.length=this[wc](n.value,n.key),this[$i]+=n.length})),bd(this)}get lengthCalculator(){return this[wc]}get length(){return this[$i]}get itemCount(){return this[Or].length}rforEach(t,n){n=n||this;for(let r=this[Or].tail;r!==null;){const o=r.prev;V5(this,t,r,n),r=o}}forEach(t,n){n=n||this;for(let r=this[Or].head;r!==null;){const o=r.next;V5(this,t,r,n),r=o}}keys(){return this[Or].toArray().map(t=>t.key)}values(){return this[Or].toArray().map(t=>t.value)}reset(){this[Ai]&&this[Or]&&this[Or].length&&this[Or].forEach(t=>this[Ai](t.key,t.value)),this[Ia]=new Map,this[Or]=new Vme,this[$i]=0}dump(){return this[Or].map(t=>sg(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[Or]}set(t,n,r){if(r=r||this[El],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const o=r?Date.now():0,a=this[wc](n,t);if(this[Ia].has(t)){if(a>this[dl])return Xc(this,this[Ia].get(t)),!1;const c=this[Ia].get(t).value;return this[Ai]&&(this[H5]||this[Ai](t,c.value)),c.now=o,c.maxAge=r,c.value=n,this[$i]+=a-c.length,c.length=a,this.get(t),bd(this),!0}const s=new qme(t,n,a,o,r);return s.length>this[dl]?(this[Ai]&&this[Ai](t,n),!1):(this[$i]+=s.length,this[Or].unshift(s),this[Ia].set(t,this[Or].head),bd(this),!0)}has(t){if(!this[Ia].has(t))return!1;const n=this[Ia].get(t).value;return!sg(this,n)}get(t){return e1(this,t,!0)}peek(t){return e1(this,t,!1)}pop(){const t=this[Or].tail;return t?(Xc(this,t),t.value):null}del(t){Xc(this,this[Ia].get(t))}load(t){this.reset();const n=Date.now();for(let r=t.length-1;r>=0;r--){const o=t[r],a=o.e||0;if(a===0)this.set(o.k,o.v);else{const s=a-n;s>0&&this.set(o.k,o.v,s)}}}prune(){this[Ia].forEach((t,n)=>e1(this,n,!1))}}const e1=(e,t,n)=>{const r=e[Ia].get(t);if(r){const o=r.value;if(sg(e,o)){if(Xc(e,r),!e[lp])return}else n&&(e[AP]&&(r.value.now=Date.now()),e[Or].unshiftNode(r));return o.value}},sg=(e,t)=>{if(!t||!t.maxAge&&!e[El])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[El]&&n>e[El]},bd=e=>{if(e[$i]>e[dl])for(let t=e[Or].tail;e[$i]>e[dl]&&t!==null;){const n=t.prev;Xc(e,t),t=n}},Xc=(e,t)=>{if(t){const n=t.value;e[Ai]&&e[Ai](n.key,n.value),e[$i]-=n.length,e[Ia].delete(n.key),e[Or].removeNode(t)}};class qme{constructor(t,n,r,o,a){this.key=t,this.value=n,this.length=r,this.now=o,this.maxAge=a||0}}const V5=(e,t,n,r)=>{let o=n.value;sg(e,o)&&(Xc(e,n),e[lp]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};var Yme=Gme;class cp{constructor(t,n){if(n=Xme(n),t instanceof cp)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new cp(t.raw,n);if(t instanceof Kb)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);if(this.set.length>1){const r=this.set[0];if(this.set=this.set.filter(o=>!q5(o[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(const o of this.set)if(o.length===1&&tge(o[0])){this.set=[o];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){t=t.trim();const r=`parseRange:${Object.keys(this.options).join(",")}:${t}`,o=G5.get(r);if(o)return o;const a=this.options.loose,s=a?_o[fo.HYPHENRANGELOOSE]:_o[fo.HYPHENRANGE];t=t.replace(s,dge(this.options.includePrerelease)),rr("hyphen replace",t),t=t.replace(_o[fo.COMPARATORTRIM],Qme),rr("comparator trim",t),t=t.replace(_o[fo.TILDETRIM],Zme),t=t.replace(_o[fo.CARETTRIM],ege),t=t.split(/\s+/).join(" ");let l=t.split(" ").map(p=>nge(p,this.options)).join(" ").split(/\s+/).map(p=>uge(p,this.options));a&&(l=l.filter(p=>(rr("loose invalid filter",p,this.options),!!p.match(_o[fo.COMPARATORLOOSE])))),rr("range list",l);const c=new Map,u=l.map(p=>new Kb(p,this.options));for(const p of u){if(q5(p))return[p];c.set(p.value,p)}c.size>1&&c.has("")&&c.delete("");const d=[...c.values()];return G5.set(r,d),d}intersects(t,n){if(!(t instanceof cp))throw new TypeError("a Range is required");return this.set.some(r=>Y5(r,n)&&t.set.some(o=>Y5(o,n)&&r.every(a=>o.every(s=>a.intersects(s,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new Jme(t,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(pge(this.set[n],t,this.options))return!0;return!1}}var ja=cp;const Kme=Yme,G5=new Kme({max:1e3}),Xme=uy,Kb=py,rr=cy,Jme=wo,{re:_o,t:fo,comparatorTrimReplace:Qme,tildeTrimReplace:Zme,caretTrimReplace:ege}=Ps.exports,q5=e=>e.value==="<0.0.0-0",tge=e=>e.value==="",Y5=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every(a=>o.intersects(a,t)),o=r.pop();return n},nge=(e,t)=>(rr("comp",e,t),e=age(e,t),rr("caret",e),e=rge(e,t),rr("tildes",e),e=sge(e,t),rr("xrange",e),e=cge(e,t),rr("stars",e),e),ho=e=>!e||e.toLowerCase()==="x"||e==="*",rge=(e,t)=>e.trim().split(/\s+/).map(n=>oge(n,t)).join(" "),oge=(e,t)=>{const n=t.loose?_o[fo.TILDELOOSE]:_o[fo.TILDE];return e.replace(n,(r,o,a,s,l)=>{rr("tilde",e,r,o,a,s,l);let c;return ho(o)?c="":ho(a)?c=`>=${o}.0.0 <${+o+1}.0.0-0`:ho(s)?c=`>=${o}.${a}.0 <${o}.${+a+1}.0-0`:l?(rr("replaceTilde pr",l),c=`>=${o}.${a}.${s}-${l} <${o}.${+a+1}.0-0`):c=`>=${o}.${a}.${s} <${o}.${+a+1}.0-0`,rr("tilde return",c),c})},age=(e,t)=>e.trim().split(/\s+/).map(n=>ige(n,t)).join(" "),ige=(e,t)=>{rr("caret",e,t);const n=t.loose?_o[fo.CARETLOOSE]:_o[fo.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(o,a,s,l,c)=>{rr("caret",e,o,a,s,l,c);let u;return ho(a)?u="":ho(s)?u=`>=${a}.0.0${r} <${+a+1}.0.0-0`:ho(l)?a==="0"?u=`>=${a}.${s}.0${r} <${a}.${+s+1}.0-0`:u=`>=${a}.${s}.0${r} <${+a+1}.0.0-0`:c?(rr("replaceCaret pr",c),a==="0"?s==="0"?u=`>=${a}.${s}.${l}-${c} <${a}.${s}.${+l+1}-0`:u=`>=${a}.${s}.${l}-${c} <${a}.${+s+1}.0-0`:u=`>=${a}.${s}.${l}-${c} <${+a+1}.0.0-0`):(rr("no pr"),a==="0"?s==="0"?u=`>=${a}.${s}.${l}${r} <${a}.${s}.${+l+1}-0`:u=`>=${a}.${s}.${l}${r} <${a}.${+s+1}.0-0`:u=`>=${a}.${s}.${l} <${+a+1}.0.0-0`),rr("caret return",u),u})},sge=(e,t)=>(rr("replaceXRanges",e,t),e.split(/\s+/).map(n=>lge(n,t)).join(" ")),lge=(e,t)=>{e=e.trim();const n=t.loose?_o[fo.XRANGELOOSE]:_o[fo.XRANGE];return e.replace(n,(r,o,a,s,l,c)=>{rr("xRange",e,r,o,a,s,l,c);const u=ho(a),d=u||ho(s),p=d||ho(l),h=p;return o==="="&&h&&(o=""),c=t.includePrerelease?"-0":"",u?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&h?(d&&(s=0),l=0,o===">"?(o=">=",d?(a=+a+1,s=0,l=0):(s=+s+1,l=0)):o==="<="&&(o="<",d?a=+a+1:s=+s+1),o==="<"&&(c="-0"),r=`${o+a}.${s}.${l}${c}`):d?r=`>=${a}.0.0${c} <${+a+1}.0.0-0`:p&&(r=`>=${a}.${s}.0${c} <${a}.${+s+1}.0-0`),rr("xRange return",r),r})},cge=(e,t)=>(rr("replaceStars",e,t),e.trim().replace(_o[fo.STAR],"")),uge=(e,t)=>(rr("replaceGTE0",e,t),e.trim().replace(_o[t.includePrerelease?fo.GTE0PRE:fo.GTE0],"")),dge=e=>(t,n,r,o,a,s,l,c,u,d,p,h,m)=>(ho(r)?n="":ho(o)?n=`>=${r}.0.0${e?"-0":""}`:ho(a)?n=`>=${r}.${o}.0${e?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${e?"-0":""}`,ho(u)?c="":ho(d)?c=`<${+u+1}.0.0-0`:ho(p)?c=`<${u}.${+d+1}.0-0`:h?c=`<=${u}.${d}.${p}-${h}`:e?c=`<${u}.${d}.${+p+1}-0`:c=`<=${c}`,`${n} ${c}`.trim()),pge=(e,t,n)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let r=0;r<e.length;r++)if(rr(e[r].semver),e[r].semver!==Kb.ANY&&e[r].semver.prerelease.length>0){const o=e[r].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0},xd=Symbol("SemVer ANY");class lg{static get ANY(){return xd}constructor(t,n){if(n=fge(n),t instanceof lg){if(t.loose===!!n.loose)return t;t=t.value}n1("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===xd?this.value="":this.value=this.operator+this.semver.version,n1("comp",this)}parse(t){const n=this.options.loose?K5[X5.COMPARATORLOOSE]:K5[X5.COMPARATOR],r=t.match(n);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new J5(r[2],this.options.loose):this.semver=xd}toString(){return this.value}test(t){if(n1("Comparator.test",t,this.options.loose),this.semver===xd||t===xd)return!0;if(typeof t=="string")try{t=new J5(t,this.options)}catch{return!1}return t1(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof lg))throw new TypeError("a Comparator is required");if((!n||typeof n!="object")&&(n={loose:!!n,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Q5(t.value,n).test(this.value);if(t.operator==="")return t.value===""?!0:new Q5(this.value,n).test(t.semver);const r=(this.operator===">="||this.operator===">")&&(t.operator===">="||t.operator===">"),o=(this.operator==="<="||this.operator==="<")&&(t.operator==="<="||t.operator==="<"),a=this.semver.version===t.semver.version,s=(this.operator===">="||this.operator==="<=")&&(t.operator===">="||t.operator==="<="),l=t1(this.semver,"<",t.semver,n)&&(this.operator===">="||this.operator===">")&&(t.operator==="<="||t.operator==="<"),c=t1(this.semver,">",t.semver,n)&&(this.operator==="<="||this.operator==="<")&&(t.operator===">="||t.operator===">");return r||o||a&&s||l||c}}var py=lg;const fge=uy,{re:K5,t:X5}=Ps.exports,t1=IP,n1=cy,J5=wo,Q5=ja,hge=ja,mge=(e,t,n)=>{try{t=new hge(t,n)}catch{return!1}return t.test(e)};var fy=mge;const gge=ja,vge=(e,t)=>new gge(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var yge=vge;const bge=wo,xge=ja,wge=(e,t,n)=>{let r=null,o=null,a=null;try{a=new xge(t,n)}catch{return null}return e.forEach(s=>{a.test(s)&&(!r||o.compare(s)===-1)&&(r=s,o=new bge(r,n))}),r};var Sge=wge;const Cge=wo,Ege=ja,Tge=(e,t,n)=>{let r=null,o=null,a=null;try{a=new Ege(t,n)}catch{return null}return e.forEach(s=>{a.test(s)&&(!r||o.compare(s)===1)&&(r=s,o=new Cge(r,n))}),r};var Rge=Tge;const r1=wo,kge=ja,Z5=dy,_ge=(e,t)=>{e=new kge(e,t);let n=new r1("0.0.0");if(e.test(n)||(n=new r1("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const o=e.set[r];let a=null;o.forEach(s=>{const l=new r1(s.semver.version);switch(s.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!a||Z5(l,a))&&(a=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),a&&(!n||Z5(n,a))&&(n=a)}return n&&e.test(n)?n:null};var Ige=_ge;const Age=ja,Nge=(e,t)=>{try{return new Age(e,t).range||"*"}catch{return null}};var $ge=Nge;const Pge=wo,NP=py,{ANY:Oge}=NP,Dge=ja,Lge=fy,e_=dy,t_=JC,Mge=ZC,Bge=QC,Fge=(e,t,n,r)=>{e=new Pge(e,r),t=new Dge(t,r);let o,a,s,l,c;switch(n){case">":o=e_,a=Mge,s=t_,l=">",c=">=";break;case"<":o=t_,a=Bge,s=e_,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Lge(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const d=t.set[u];let p=null,h=null;if(d.forEach(m=>{m.semver===Oge&&(m=new NP(">=0.0.0")),p=p||m,h=h||m,o(m.semver,p.semver,r)?p=m:s(m.semver,h.semver,r)&&(h=m)}),p.operator===l||p.operator===c||(!h.operator||h.operator===l)&&a(e,h.semver))return!1;if(h.operator===c&&s(e,h.semver))return!1}return!0};var e2=Fge;const zge=e2,jge=(e,t,n)=>zge(e,t,">",n);var Uge=jge;const Wge=e2,Hge=(e,t,n)=>Wge(e,t,"<",n);var Vge=Hge;const n_=ja,Gge=(e,t,n)=>(e=new n_(e,n),t=new n_(t,n),e.intersects(t));var qge=Gge;const Yge=fy,Kge=za;var Xge=(e,t,n)=>{const r=[];let o=null,a=null;const s=e.sort((d,p)=>Kge(d,p,n));for(const d of s)Yge(d,t,n)?(a=d,o||(o=d)):(a&&r.push([o,a]),a=null,o=null);o&&r.push([o,null]);const l=[];for(const[d,p]of r)d===p?l.push(d):!p&&d===s[0]?l.push("*"):p?d===s[0]?l.push(`<=${p}`):l.push(`${d} - ${p}`):l.push(`>=${d}`);const c=l.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t};const r_=ja,um=py,{ANY:o1}=um,wd=fy,t2=za,Jge=(e,t,n={})=>{if(e===t)return!0;e=new r_(e,n),t=new r_(t,n);let r=!1;e:for(const o of e.set){for(const a of t.set){const s=Qge(o,a,n);if(r=r||s!==null,s)continue e}if(r)return!1}return!0},Qge=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===o1){if(t.length===1&&t[0].semver===o1)return!0;n.includePrerelease?e=[new um(">=0.0.0-0")]:e=[new um(">=0.0.0")]}if(t.length===1&&t[0].semver===o1){if(n.includePrerelease)return!0;t=[new um(">=0.0.0")]}const r=new Set;let o,a;for(const m of e)m.operator===">"||m.operator===">="?o=o_(o,m,n):m.operator==="<"||m.operator==="<="?a=a_(a,m,n):r.add(m.semver);if(r.size>1)return null;let s;if(o&&a){if(s=t2(o.semver,a.semver,n),s>0)return null;if(s===0&&(o.operator!==">="||a.operator!=="<="))return null}for(const m of r){if(o&&!wd(m,String(o),n)||a&&!wd(m,String(a),n))return null;for(const b of t)if(!wd(m,String(b),n))return!1;return!0}let l,c,u,d,p=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1,h=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&a.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const m of t){if(d=d||m.operator===">"||m.operator===">=",u=u||m.operator==="<"||m.operator==="<=",o){if(h&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===h.major&&m.semver.minor===h.minor&&m.semver.patch===h.patch&&(h=!1),m.operator===">"||m.operator===">="){if(l=o_(o,m,n),l===m&&l!==o)return!1}else if(o.operator===">="&&!wd(o.semver,String(m),n))return!1}if(a){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(c=a_(a,m,n),c===m&&c!==a)return!1}else if(a.operator==="<="&&!wd(a.semver,String(m),n))return!1}if(!m.operator&&(a||o)&&s!==0)return!1}return!(o&&u&&!a&&s!==0||a&&d&&!o&&s!==0||h||p)},o_=(e,t,n)=>{if(!e)return t;const r=t2(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},a_=(e,t,n)=>{if(!e)return t;const r=t2(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var Zge=Jge;const a1=Ps.exports;var i_={re:a1.re,src:a1.src,tokens:a1.t,SEMVER_SPEC_VERSION:ly.SEMVER_SPEC_VERSION,SemVer:wo,compareIdentifiers:Yb.compareIdentifiers,rcompareIdentifiers:Yb.rcompareIdentifiers,parse:Fu,valid:Mhe,clean:zhe,inc:Uhe,diff:Yhe,major:Jhe,minor:eme,patch:rme,prerelease:ime,compare:za,rcompare:cme,compareLoose:pme,compareBuild:XC,sort:gme,rsort:bme,gt:dy,lt:JC,eq:KC,neq:_P,gte:QC,lte:ZC,cmp:IP,coerce:zme,Comparator:py,Range:ja,satisfies:fy,toComparators:yge,maxSatisfying:Sge,minSatisfying:Rge,minVersion:Ige,validRange:$ge,outside:e2,gtr:Uge,ltr:Vge,intersects:qge,simplifyRange:Xge,subset:Zge};const eve=e=>()=>{const t=Number(e);return typeof t!="number"||Number.isNaN(t)?[!1,"Value must be a number"]:[!0,""]},tve=e=>()=>{const t=[!1,"Values must be a list of strings"];return!Array.isArray(e)||!e.every(n=>typeof n=="string")?t:[!0,""]},nve=e=>()=>{const t=i_.clean(e)===e;return!i_.valid(e)||!t?[!1,"Value is not a valid semver. For example 1.2.4"]:[!0,""]},rve=e=>()=>YS(Ql(e))?[!0,""]:[!1,"Value must be a valid date matching RFC3339"],jh=e=>Boolean(e)&&Array.isArray(e)&&e.length>0,Xb="IN_OPERATORS_LEGAL_VALUES",$P="STRING_OPERATORS_LEGAL_VALUES",PP="NUM_OPERATORS_LEGAL_VALUES",OP="SEMVER_OPERATORS_LEGAL_VALUES",DP="DATE_OPERATORS_SINGLE_VALUE",LP="IN_OPERATORS_FREETEXT",MP="STRING_OPERATORS_FREETEXT",BP="NUM_OPERATORS_SINGLE_VALUE",FP="SEMVER_OPERATORS_SINGLE_VALUE",s_="NUMBER_VALIDATOR",l_="SEMVER_VALIDATOR",i1="STRING_ARRAY_VALIDATOR",c_="DATE_VALIDATOR",ove=({contextDefinition:e,localConstraint:t})=>{const[n,r]=f.exports.useState(Xb),[o,a]=f.exports.useState(i1),[s,l]=f.exports.useState(""),c=f.exports.useCallback(()=>{jh(e.legalValues)&&Vn(sp,t.operator)?r(Xb):jh(e.legalValues)&&Vn(Bi,t.operator)?r($P):jh(e.legalValues)&&Vn(Yc,t.operator)?r(PP):jh(e.legalValues)&&Vn(Kc,t.operator)?r(OP):Vn(ua,t.operator)?r(DP):Vn(sp,t.operator)?r(LP):Vn(Bi,t.operator)?r(MP):Vn(Yc,t.operator)?r(BP):Vn(Kc,t.operator)&&r(FP)},[t,e]),u=()=>{switch(o){case s_:return eve(t.value);case i1:return tve(t.values||[]);case l_:return nve(t.value||"");case c_:return rve(t.value||"")}},d=f.exports.useCallback(p=>{Vn(Yc,p)&&a(s_),Vn([...Bi,...sp],p)&&a(i1),Vn(Kc,p)&&a(l_),Vn(ua,p)&&a(c_)},[a]);return f.exports.useEffect(()=>{d(t.operator)},[t.operator,t.value,t.values,d]),f.exports.useEffect(()=>{c()},[e,t,c]),{input:n,error:s,validator:u(),setError:l}},ave=le()(e=>({header:{fontSize:e.fontSizes.bodySize,fontWeight:"normal",marginTop:"1rem",marginBottom:"0.25rem"}})),Df=n=>{var r=n,{children:e}=r,t=en(r,["children"]);const{classes:o}=ave();return i("h3",ee(V({},t),{className:o.header,children:e}))},ive=({setValue:e,value:t,error:n,setError:r})=>t?w(Ne,{children:[i(Df,{children:"Select a date"}),i(Sn,{id:"date",label:"Date",type:"datetime-local",value:Lce(t),onChange:o=>{r("");const a=Mce(o.target.value),s=a==null?void 0:a.toISOString();s&&e(s)},InputLabelProps:{shrink:!0},error:Boolean(n),errorText:n,required:!0})]}):null,zP=le()(e=>({valueChip:{margin:"0 0.5rem 0.5rem 0"},chipValue:{whiteSpace:"pre"},inputContainer:{display:"flex",alignItems:"center",[e.breakpoints.down(700)]:{flexDirection:"column",alignItems:"flex-start"}},inputInnerContainer:{minWidth:"300px",[e.breakpoints.down(700)]:{minWidth:"100%"}},input:{width:"100%",margin:"1rem 0"},button:{marginLeft:"1rem",[e.breakpoints.down(700)]:{marginLeft:0,marginBottom:"0.5rem"}},valuesContainer:{marginTop:"1rem"}})),sve="Enter",u_=({values:e,removeValue:t,setValues:n,error:r,setError:o})=>{const[a,s]=f.exports.useState(""),{classes:l}=zP(),c=d=>{d.key===sve&&(d.preventDefault(),u())},u=()=>{const d=cve([...e,...Cl(a)]);d.length===0?o("values cannot be empty"):d.some(p=>p.length>100)?o("values cannot be longer than 100 characters"):(o(""),s(""),n(d))};return w("div",{children:[i(Df,{style:{marginBottom:0},children:"Set values (maximum 100 char length per value)"}),w("div",{className:l.inputContainer,children:[i("div",{className:l.inputInnerContainer,children:i(Sn,{onKeyPress:c,label:"Values",name:"values",value:a,onFocus:()=>{o("")},onChange:d=>s(d.target.value),placeholder:"value1, value2, value3...",className:l.input,error:Boolean(r),errorText:r})}),i(nt,{className:l.button,variant:"outlined",color:"secondary",onClick:()=>u(),children:"Add values"})]}),i("div",{className:l.valuesContainer,children:i(lve,{values:e,removeValue:t})})]})},lve=({values:e,removeValue:t})=>{const{classes:n}=zP();return i(Ne,{children:e.map((r,o)=>i(jr,{label:i(Tr,{text:r,maxLength:35,maxWidth:"100",className:n.chipValue}),onDelete:()=>t(o),className:n.valueChip},`${r}-${o}`))})},cve=e=>Array.from(new Set(e)),n2=({filter:e,setFilter:t})=>w("div",{style:{display:"flex",alignItems:"center"},children:[i("div",{style:{width:"300px"},children:i(At,{label:"Search",name:"search",value:e,onChange:n=>t(n.target.value),placeholder:"Filter values",style:{width:"100%",margin:"1rem 0"},variant:"outlined",size:"small",InputProps:{startAdornment:i(sS,{position:"start",children:i(kS,{})})}})}),i(F,{condition:Boolean(e),show:i(jr,{style:{marginLeft:"1rem"},label:`filter active: ${e}`,onDelete:()=>t("")})})]}),uve=le()(e=>({container:{display:"inline-block",wordBreak:"break-word"},value:{lineHeight:1.33,fontSize:e.fontSizes.smallBody},description:{lineHeight:1.33,fontSize:e.fontSizes.smallerBody,color:e.palette.grey[700]}})),jP=({legal:e,control:t})=>{const{classes:n}=uve();return i("div",{className:n.container,children:i($n,{value:e.value,control:t,label:w(Ne,{children:[i("div",{className:n.value,children:e.value}),i("div",{className:n.description,children:e.description})]})})})},UP=(e,t)=>e.filter(n=>n.value.includes(t)),d_=e=>e.reduce((t,n)=>(t[n]||(t[n]=!0),t),{}),p_=({legalValues:e,values:t,setValues:n,error:r,setError:o})=>{const[a,s]=f.exports.useState(""),l=UP(e,a),[c,u]=f.exports.useState(()=>d_(t)),{classes:d}=Yn();f.exports.useEffect(()=>{u(d_(t))},[t,u]);const p=h=>{if(o(""),c[h]){const m=t.findIndex(y=>y===h),b=[...t];b.splice(m,1),n(b);return}n([...t,h])};return w(Ne,{children:[i(Df,{children:"Select values from a predefined set"}),i(F,{condition:e.length>100,show:i(n2,{filter:a,setFilter:s})}),l.map(h=>i(jP,{legal:h,control:i(Do,{checked:Boolean(c[h.value]),onChange:()=>p(h.value),name:h.value,color:"primary"})},h.value)),i(F,{condition:Boolean(r),show:i("p",{className:d.error,children:r})})]})},f_=({setValue:e,value:t,type:n,legalValues:r,error:o,setError:a})=>{const[s,l]=f.exports.useState(""),{classes:c}=Yn(),u=UP(r,s);return w(Ne,{children:[w(Df,{children:["Add a single ",n.toLowerCase()," value"]}),i(F,{condition:Boolean(r.length>100),show:i(n2,{filter:s,setFilter:l})}),i(F,{condition:Boolean(r.length),show:i(qo,{component:"fieldset",children:i(gv,{"aria-label":"selected-value",name:"selected",value:t,onChange:d=>{a(""),e(d.target.value)},children:u.map(d=>i(jP,{legal:d,control:i(wl,{})},d.value))})}),elseShow:i("p",{children:"No valid legal values available for this operator."})}),i(F,{condition:Boolean(o),show:i("p",{className:c.error,children:o})})]})},dve=le()(e=>({singleValueContainer:{maxWidth:"300px",marginTop:"-1rem"},singleValueInput:{width:"100%",margin:"1rem 0"}})),h_=({setValue:e,value:t,type:n,error:r,setError:o})=>{const{classes:a}=dve();return w(Ne,{children:[w(Df,{children:["Add a single ",n.toLowerCase()," value"]}),i("div",{className:a.singleValueContainer,children:i(Sn,{label:n,name:"value",value:t||"",onChange:s=>{o(""),e(s.target.value.trim())},onFocus:()=>o(""),placeholder:`Enter a single ${n} value`,className:a.singleValueInput,error:Boolean(r),errorText:r})})]})},pve=({input:e,contextDefinition:t,localConstraint:n,setValue:r,setValues:o,setError:a,removeValue:s,error:l})=>i(Ne,{children:(()=>{var u;switch(e){case Xb:return i(p_,{legalValues:t.legalValues||[],values:n.values||[],setValues:o,error:l,setError:a});case $P:return i(Ne,{children:i(p_,{legalValues:t.legalValues||[],values:n.values||[],setValues:o,error:l,setError:a})});case PP:return i(Ne,{children:i(f_,{setValue:r,value:n.value,type:"number",legalValues:((u=t.legalValues)==null?void 0:u.filter(d=>Number(d.value)))||[],error:l,setError:a})});case OP:return i(Ne,{children:i(f_,{setValue:r,value:n.value,type:"semver",legalValues:t.legalValues||[],error:l,setError:a})});case DP:return i(ive,{value:n.value,setValue:r,error:l,setError:a});case LP:return i(u_,{values:n.values||[],removeValue:s,setValues:o,error:l,setError:a});case MP:return i(Ne,{children:i(u_,{values:n.values||[],removeValue:s,setValues:o,error:l,setError:a})});case BP:return i(h_,{setValue:r,value:n.value,type:"number",error:l,setError:a});case FP:return i(h_,{setValue:r,value:n.value,type:"semver",error:l,setError:a})}})()}),WP="cancel",m_="save",g_=(e,t)=>e.find(r=>r.name===t)||{name:"",description:"",createdAt:"",sortOrder:1,stickiness:!1},fve=({constraint:e,compact:t,onCancel:n,onSave:r,onDelete:o})=>{const[a,s]=f.exports.useState($5(e)),{context:l}=wi(),[c,u]=f.exports.useState(g_(l,a.contextName)),{validateConstraint:d}=xo(),[p,h]=f.exports.useState(!1),[m,b]=f.exports.useState(""),{classes:y}=Si();f.exports.useEffect(()=>{h(!0)},[]),f.exports.useEffect(()=>{u(g_(l,a.contextName))},[a.contextName,l]);const g=f.exports.useCallback(D=>{s(H=>ee(V({},H),{contextName:D,values:[],value:""}))},[]),x=f.exports.useCallback(D=>{s(H=>ee(V({},H),{operator:D,values:[],value:""}))},[]),v=f.exports.useCallback(D=>{s(H=>ee(V({},H),{values:D}))},[]),S=f.exports.useCallback(D=>{s(H=>ee(V({},H),{value:D}))},[]),E=()=>{s(D=>ee(V({},D),{inverted:!D.inverted}))},R=f.exports.useCallback(()=>{s(D=>ee(V({},D),{caseInsensitive:!D.caseInsensitive}))},[]),A=f.exports.useCallback(D=>{const H=[...a.values];H.splice(D,1),v(H)},[a,v]),_=()=>{h(!1)},N=()=>{const D=Array.isArray(a.values)&&Boolean(a.values.length>0),H=Boolean(a.value);return D||H?(L(""),!0):(L("You must provide a value for the constraint"),!1)},k=async()=>{if(!N())return;const[H,U]=O();if(H||L(U),H)try{await d(a),L(""),b(m_),_();return}catch(Z){L(Ue(Z))}},{input:I,validator:O,setError:L,error:q}=ove({contextDefinition:c,localConstraint:a});return f.exports.useEffect(()=>{L(""),s(D=>$5(D))},[a.operator,a.contextName,L]),i("div",{className:y.form,children:w(Tu,{className:it(y.accordion,y.accordionEdit),classes:{expanded:y.accordionRoot},style:{boxShadow:"none"},expanded:p,TransitionProps:{onExited:()=>{m===WP?(b(""),n()):m===m_&&(b(""),r(a))}},children:[i(ku,{className:y.summary,children:i(She,{localConstraint:a,setLocalConstraint:s,setContextName:g,setOperator:x,action:m,compact:t,setInvertedOperator:E,setCaseInsensitive:R,onDelete:o})}),i(Ru,{className:y.accordionDetails,style:{padding:0},children:i(phe,{localConstraint:a,setValues:v,setValue:S,triggerTransition:_,setAction:b,onSubmit:k,children:i(pve,{setValues:v,setValue:S,setError:L,localConstraint:a,input:I,error:q,contextDefinition:c,removeValue:A})})})]})})},HP=(e,t)=>e.value&&e.contextName===Gp?qS(e.value,t.locale):e.value,VP=le()(e=>({chip:{margin:"0 0.5rem 0.5rem 0"},chipValue:{whiteSpace:"pre"},singleValueView:{display:"flex",alignItems:"center",[e.breakpoints.down(600)]:{flexDirection:"column"}},singleValueText:{marginRight:"0.75rem",[e.breakpoints.down(600)]:{marginBottom:"0.75rem",marginRight:0}},settingsParagraph:{display:"flex",alignItems:"center",padding:"0.5rem 0"}})),hve=({values:e})=>{const[t,n]=f.exports.useState(""),{classes:r}=VP();return!e||e.length===0?null:w(Ne,{children:[i(F,{condition:e.length>20,show:i(n2,{filter:t,setFilter:n})}),e.filter(o=>o.includes(t)).map((o,a)=>i(jr,{label:i(Tr,{maxWidth:"400",text:o,maxLength:50,className:r.chipValue}),className:r.chip},`${o}-${a}`))]})},mve=({value:e,operator:t})=>{const{classes:n}=VP();return e?w("div",{className:n.singleValueView,children:[w("p",{className:n.singleValueText,children:["Value must be ",t]})," ",i(jr,{label:i(Tr,{maxWidth:"400",text:e,maxLength:50}),className:n.chip})]}):null},gve=({constraint:e})=>{const{classes:t}=Si(),{locationSettings:n}=vi();return i("div",{children:w("div",{className:t.valuesContainer,children:[i(hve,{values:e.values}),i(mve,{value:HP(e,n),operator:e.operator})]})})},vve=le()(e=>({container:{padding:e.spacing(.5,1.5),borderRadius:e.shape.borderRadius,backgroundColor:e.palette.constraintAccordion.operatorBackground,lineHeight:1.25},name:{fontSize:e.fontSizes.smallBody,lineHeight:17/14},text:{fontSize:e.fontSizes.smallerBody,color:e.palette.grey[700]},not:{display:"block",margin:"-1rem 0 0.25rem 0",height:"1rem","& > span":{display:"inline-block",padding:"0 0.25rem",borderRadius:e.shape.borderRadius,fontSize:e.fontSizes.smallerBody,backgroundColor:e.palette.primary.light,color:"white"}}})),yve=({constraint:e,hasPrefix:t})=>{const{classes:n}=vve(),r=e.operator,o=Vb(e.operator);return w("div",{className:n.container,style:{borderTopLeftRadius:t?0:void 0,borderBottomLeftRadius:t?0:void 0,paddingLeft:t?0:void 0},children:[i("div",{className:n.name,children:r}),i("div",{className:n.text,children:o})]})},GP=z("div")(({theme:e})=>({backgroundColor:e.palette.grey[200],width:24,display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"stretch",color:e.palette.primary.main,marginLeft:e.spacing(1),borderRadius:e.shape.borderRadius})),bve=z(GP)(()=>({marginLeft:0,borderTopRightRadius:0,borderBottomRightRadius:0})),v_=f.exports.forwardRef((r,n)=>{var o=r,{isPrefix:e}=o,t=en(o,["isPrefix"]);return i(F,{condition:Boolean(e),show:()=>i(bve,V({ref:n},t)),elseShow:()=>i(GP,V({ref:n},t))})}),xve=({constraint:e})=>{const{classes:t}=Si();return w("div",{className:t.headerValuesContainerWrapper,children:[i(F,{condition:Boolean(e.inverted),show:i(wt,{title:"Operator is negated",arrow:!0,children:i(mt,{sx:{display:"flex"},children:i(v_,{isPrefix:!0,children:i(Gb,{})})})})}),i("div",{className:t.headerConstraintContainer,children:i(yve,{constraint:e,hasPrefix:Boolean(e.inverted)})}),i(F,{condition:!Boolean(e.caseInsensitive)&&Vn(Bi,e.operator),show:i(wt,{title:"Case sensitive is active",arrow:!0,children:i(v_,{children:i(TP,{})})})})]})},wve=z(jr)(({theme:e})=>({margin:"auto 0",marginLeft:e.spacing(1),[e.breakpoints.down(710)]:{margin:e.spacing(1,0)}})),Sve=({constraint:e,allowExpand:t})=>{const{locationSettings:n}=vi(),{classes:r}=Si();return f.exports.useEffect(()=>{t(!1)},[t]),i("div",{className:r.headerValuesContainerWrapper,children:i(wve,{label:HP(e,n)})})},Cve=z("span")(({theme:e})=>({display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word",fontSize:e.fontSizes.smallBody,margin:"auto 0",[e.breakpoints.down(710)]:{margin:e.spacing(1,0),textAlign:"center"}})),Eve=({constraint:e,expanded:t,allowExpand:n,maxLength:r})=>{var c;const{classes:o}=Si(),[a,s]=f.exports.useState(!1),l=f.exports.useMemo(()=>{var u;return(u=e==null?void 0:e.values)==null?void 0:u.map(d=>d).join(", ")},[e]);return f.exports.useEffect(()=>{var u,d;l&&(n(((u=l==null?void 0:l.length)!=null?u:0)>r),s(((d=l==null?void 0:l.length)!=null?d:0)>r))},[l,r,n,s]),i("div",{className:o.headerValuesContainerWrapper,children:w("div",{className:o.headerValuesContainer,children:[i(Cve,{children:l}),i(F,{condition:a,show:i("p",{className:it(o.headerValuesExpand,"valuesExpandLabel"),children:t?"View less":`View all (${(c=e==null?void 0:e.values)==null?void 0:c.length})`})})]})})},Tve=z("span")(({theme:e})=>({display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",maxWidth:"100px",minWidth:"100px",marginRight:"10px",marginTop:"auto",marginBottom:"auto",wordBreak:"break-word",fontSize:e.fontSizes.smallBody,[e.breakpoints.down(710)]:{textAlign:"center",padding:e.spacing(1,0),marginRight:"inherit",maxWidth:"inherit"}})),Rve=z("div")(({theme:e})=>({display:"flex",width:"100%",justifyContent:"space-between",borderRadius:e.spacing(1)})),kve=({constraint:e,singleValue:t,allowExpand:n,expanded:r,maxLength:o=112})=>{const{classes:a}=Si();return i(Rve,{children:w("div",{className:a.headerMetaInfo,children:[i(wt,{title:e.contextName,arrow:!0,children:i(Tve,{children:e.contextName})}),i(xve,{constraint:e}),i(F,{condition:t,show:i(Sve,{constraint:e,allowExpand:n}),elseShow:i(Eve,{constraint:e,expanded:r,allowExpand:n,maxLength:o})})]})})},_ve=({constraint:e,onEdit:t,onDelete:n,singleValue:r,allowExpand:o,expanded:a,compact:s})=>{const{classes:l}=Si();return w("div",{className:l.headerContainer,children:[i(wP,{compact:s}),i(kve,{constraint:e,singleValue:r,allowExpand:o,expanded:a}),i(RP,{onEdit:t,onDelete:n})]})},Ive=({constraint:e,onEdit:t,onDelete:n,sx:r=void 0,compact:o=!1,renderAfter:a})=>{const{classes:s}=Si(),[l,c]=f.exports.useState(!0),[u,d]=f.exports.useState(!1),p=Vn([...Kc,...Yc,...ua],e.operator),h=()=>{l&&d(!u)};return w(Tu,{className:s.accordion,classes:{root:s.accordionRoot},expanded:u,sx:r,children:[i(ku,{classes:{root:s.summary},expandIcon:null,onClick:h,sx:{cursor:l?"pointer":"default!important","&:hover":{cursor:l?"pointer":"default!important"}},children:w("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[i(_ve,{constraint:e,onEdit:t,onDelete:n,singleValue:p,allowExpand:c,expanded:u,compact:o}),a]})}),i(Ru,{className:s.accordionDetails,children:i(gve,{constraint:e})})]})},Ave=({constraint:e,compact:t=!1,editing:n,onEdit:r,onCancel:o,onDelete:a,onSave:s})=>e?i(F,{condition:Boolean(n&&s),show:i(fve,{constraint:e,onCancel:o,onSave:s,onDelete:a,compact:t}),elseShow:i(Ive,{constraint:e,onEdit:r,onDelete:a})}):null,Nve=e=>{const t=f.exports.useRef(e!=null?e:new WeakMap),[,n]=f.exports.useState(0),r=f.exports.useCallback((a,s)=>{t.current.set(a,s),n(l=>l+1)},[]),o=f.exports.useCallback(a=>t.current.get(a),[]);return f.exports.useMemo(()=>({set:r,get:o}),[r,o])},$ve=e=>(s1.has(e)||(y_++,s1.set(e,y_)),s1.get(e)),s1=new WeakMap;let y_=0;const Pve=le()(e=>({container:{width:"100%",display:"flex",flexDirection:"column"},help:{fill:e.palette.grey[600],[e.breakpoints.down(860)]:{display:"none"}},helpWrapper:{marginLeft:"12px",height:"24px"},addCustomLabel:{display:"flex",flexDirection:"row",justifyContent:"start",margin:"0.75rem 0 "},customConstraintLabel:{marginBottom:e.spacing(1),color:e.palette.text.secondary}})),Ove=e=>{const t=SP(e)[0],n=Vn(ua,t)?new Date().toISOString():"";return{contextName:e,operator:t,value:n,values:[],caseInsensitive:!1,inverted:!1}},qP=z("div")(({theme:e})=>({padding:e.spacing(.75,1),color:e.palette.text.primary,fontSize:e.fontSizes.smallerBody,backgroundColor:e.palette.secondaryContainer,borderRadius:e.shape.borderRadius,position:"absolute",zIndex:e.zIndex.fab,top:"50%",left:e.spacing(2),transform:"translateY(-50%)",lineHeight:1})),Dve=z(qP)(({theme:e})=>({top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:e.palette.activityIndicators.primary,border:`1px solid ${e.palette.primary.border}`,borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(.75,1.5)})),hy=({text:e})=>{const t=pn();return i(mt,{sx:{height:t.spacing(e==="AND"?1:1.5),position:"relative",width:"100%"},children:i(F,{condition:e==="AND",show:()=>i(qP,{children:e}),elseShow:()=>i(Dve,{children:e})})})},YP="constraintAccordionListId",my=f.exports.forwardRef(({constraints:e,setConstraints:t,showCreateButton:n,showLabel:r=!0},o)=>{const a=Nve(),{context:s}=wi(),{classes:l}=Pve(),c=t&&(b=>{const y=Ove(b);a.set(y,{editing:!0,new:!0}),t(g=>[...g,y])});f.exports.useImperativeHandle(o,()=>({addConstraint:c}));const u=c&&(()=>{c(s[0].name)}),d=t&&(b=>{a.set(b,{editing:!0})}),p=t&&(b=>{const y=e[b];a.set(y,{}),t(ia(g=>{g.splice(b,1)}))}),h=t&&((b,y)=>{a.set(y,{}),t(ia(g=>{g[b]=y}))}),m=b=>{var g;const y=e[b];(g=a.get(y))!=null&&g.new&&(p==null||p(b)),a.set(y,{})};return s.length===0?null:w("div",{className:l.container,id:YP,children:[i(F,{condition:e&&e.length>0&&r,show:i("p",{className:l.customConstraintLabel,children:"Custom constraints"})}),e.map((b,y)=>{var g;return w(f.exports.Fragment,{children:[i(F,{condition:y>0,show:i(hy,{text:"AND"})}),i(Ave,{constraint:b,onEdit:d&&d.bind(null,b),onCancel:m.bind(null,y),onDelete:p&&p.bind(null,y),onSave:h&&h.bind(null,y),editing:Boolean((g=a.get(b))==null?void 0:g.editing),compact:!0})]},$ve(b))}),i(F,{condition:Boolean(n&&u),show:w("div",{children:[w("div",{className:l.addCustomLabel,children:[i("p",{children:"Add any number of custom constraints"}),i(wt,{title:"Help",arrow:!0,className:l.helpWrapper,children:i("a",{href:"https://docs.getunleash.io/advanced/strategy_constraints",target:"_blank",rel:"noopener noreferrer",children:i(Tte,{className:l.help})})})]}),i(nt,{type:"button",onClick:u,variant:"outlined",color:"secondary",children:"Add custom constraint"})]})})]})}),Lve=({projectId:e,environmentId:t,strategy:n,setStrategy:r})=>{const{hasAccess:o}=f.exports.useContext(Jt),a=f.exports.useMemo(()=>{var u;return(u=n.constraints)!=null?u:[]},[n]),s=u=>{r(d=>ee(V({},d),{constraints:u instanceof Function?u(a):u}))},l=o(Vi,e,t),c=o(jS,e,t);return i(my,{constraints:a,setConstraints:c?s:void 0,showCreateButton:l})},Mve="production",Bve=({open:e,onClose:t,onClick:n,label:r,loading:o})=>{const[a,s]=KP(),l=()=>{s(c=>({hide:!c.hide}))};return w(ln,{title:"Changing production environment!",primaryButtonText:r,disabledPrimaryButton:o,secondaryButtonText:"Cancel",onClick:n,onClose:t,open:e,children:[i(yt,{severity:"error",children:"WARNING. You are about to make changes to a production environment. These changes will affect your customers."}),i("p",{style:{marginTop:"1rem"},children:"Are you sure you want to proceed?"}),i($n,{label:"Don't show again",control:i(Do,{checked:a.hide,onChange:l})})]})},Fve=(e,t)=>{const[n]=KP(),r=e.environments.find(o=>o.name===t);return n.hide?!1:(r==null?void 0:r.type)===Mve},zve="useFeatureStrategyProdGuardSettings:v2",KP=OS(zve,{hide:!1}),jve=le()(e=>({form:{display:"grid",gap:"1rem"},hr:{width:"100%",height:1,margin:"1rem 0",border:"none",background:e.palette.grey[200]},title:{display:"grid",gridTemplateColumns:"auto 1fr",gridGap:".5rem",fontSize:e.fontSizes.bodySize},icon:{color:e.palette.primary.main},name:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:e.fontWeight.thin},buttons:{display:"flex",justifyContent:"end",gap:"1rem",paddingBottom:"5rem"}})),r2=e=>{const t=Boolean(e&&e.length===0),[n,r]=f.exports.useState(t),{validateConstraint:o}=xo();return f.exports.useEffect(()=>{if(!e)return;const a=e.map(s=>o(s));Promise.all(a).then(()=>r(!0)).catch(()=>r(!1))},[e]),n},Uve=le()(e=>({container:{display:"flex",alignItems:"center",borderRadius:"1rem",'& .MuiInputLabel-root[data-shrink="false"]':{top:3}},icon:{background:e.palette.featureSegmentSearchBackground,height:48,width:48,display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:6,borderTopLeftRadius:40,borderBottomLeftRadius:40,color:"#fff"},iconDisabled:{background:e.palette.primary.light},autocomplete:{flex:1},inputRoot:{height:48,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderTopRightRadius:50,borderBottomRightRadius:50,"& fieldset":{borderColor:e.palette.grey[300],borderLeftColor:"transparent"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderWidth:1}}})),XP=({label:e,options:t,value:n=[],onChange:r,disabled:o})=>{const{classes:a}=Uve(),s=l=>i(At,ee(V({},l),{variant:"outlined",label:e}));return w("div",{className:a.container,children:[i("div",{className:it(a.icon,o&&a.iconDisabled),"aria-hidden":!0,children:i(kS,{})}),i(Bl,{className:a.autocomplete,classes:{inputRoot:a.inputRoot},options:t,value:n,popupIcon:i(gte,{titleAccess:"Toggle"}),onChange:(l,c)=>r(c||[]),renderInput:s,getOptionLabel:l=>l.label,disabled:o,size:"small",multiple:!0})]})},Wve=le()(e=>({title:{margin:0,fontSize:e.fontSizes.bodySize,fontWeight:e.fontWeight.thin},list:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},and:{fontSize:e.fontSizes.smallerBody,padding:e.spacing(.75,1),display:"block",marginTop:"auto",marginBottom:"auto",alignItems:"center",borderRadius:e.shape.borderRadius,lineHeight:1,color:e.palette.text.primary,backgroundColor:e.palette.secondaryContainer},selectedSegmentsLabel:{color:e.palette.text.secondary}})),Hve=le()(e=>({chip:{display:"flex",alignItems:"center",gap:"0.25rem",paddingInlineStart:"1rem",paddingInlineEnd:"0.5rem",paddingBlockStart:4,paddingBlockEnd:4,borderRadius:"100rem",background:e.palette.featureStrategySegmentChipBackground,color:"white"},link:{marginRight:".5rem",color:"inherit",textDecoration:"none"},button:{all:"unset",height:"1rem",cursor:"pointer"},icon:{fontSize:"1rem"}})),Vve=({segment:e,setSegments:t,preview:n,setPreview:r})=>{const{classes:o}=Hve(),a=()=>{t(u=>u.filter(d=>d.id!==e.id)),r(u=>u===e?void 0:u)},s=()=>{r(u=>u===e?void 0:e)},l=i(F,{condition:e===n,show:i(E$,{titleAccess:"Hide",className:o.icon}),elseShow:i(C$,{titleAccess:"Show",className:o.icon})}),c=e===n?"Hide segment constraints":"Preview segment constraints";return w("span",{className:o.chip,children:[i(Ct,{to:`/segments/edit/${e.id}`,target:"_blank",className:o.link,children:e.name}),i(wt,{title:c,arrow:!0,children:i("button",{type:"button",onClick:s,className:o.button,"aria-expanded":e===n,"aria-controls":YP,children:l})}),i(wt,{title:"Remove segment",arrow:!0,children:i("button",{type:"button",onClick:a,className:o.button,children:i(bte,{titleAccess:"Remove",className:o.icon})})})]})},Gve=le()(e=>({container:{width:"100%",padding:e.spacing(2,3),display:"flex",alignItems:"center",justifyContent:"flex-start",fontSize:e.fontSizes.smallBody,border:`1px solid ${e.palette.dividerAlternative}`,position:"relative",borderRadius:"5px"},link:{textDecoration:"none",marginLeft:e.spacing(1),"&:hover":{textDecoration:"underline"}},accordion:{border:`1px solid ${e.palette.dividerAlternative}`,borderRadius:e.shape.borderRadiusMedium,backgroundColor:"#fff",boxShadow:"none",margin:0},accordionRoot:{transition:"all 0.1s ease"},accordionExpanded:{backgroundColor:e.palette.neutral.light},previewButton:{paddingTop:0,paddingBottom:0,marginLeft:"auto",fontSize:e.fontSizes.smallBody},summary:{fontSize:e.fontSizes.smallBody,margin:e.spacing(.5,0)}})),JP=({segment:e,isExpanded:t,headerContent:n,constraintList:r})=>{var l;const{classes:o}=Gve(),[a,s]=f.exports.useState(t||!1);return w(Tu,{expanded:a,className:o.accordion,classes:{root:o.accordionRoot,expanded:o.accordionExpanded},children:[w(ku,{id:`segment-accordion-${e.id}`,className:o.summary,children:[i(y$,{color:"secondary",sx:{mr:1}}),"Segment:",i(Ct,{to:`/segments/edit/${e.id}`,className:o.link,children:e.name}),i(F,{condition:Boolean(n),show:n}),i(F,{condition:!t,show:i(nt,{size:"small",variant:"outlined",onClick:()=>s(c=>!c),className:o.previewButton,children:a?"Close preview":"Preview"})})]}),i(Ru,{sx:{pt:0},children:i(F,{condition:Boolean(r),show:r,elseShow:i(F,{condition:(((l=e==null?void 0:e.constraints)==null?void 0:l.length)||0)>0,show:i(my,{constraints:e.constraints,showLabel:!1}),elseShow:i(Te,{children:"This segment has no constraints."})})})})]})},qve=({segments:e,setSegments:t})=>{const{classes:n}=Wve(),[r,o]=f.exports.useState(),a=e.length-1;return e.length===0?null:w(Ne,{children:[i(F,{condition:e&&e.length>0,show:i("p",{className:n.selectedSegmentsLabel,children:"Selected Segments"})}),i("div",{className:n.list,children:e.map((s,l)=>w(f.exports.Fragment,{children:[i(Vve,{segment:s,setSegments:t,preview:r,setPreview:o}),i(F,{condition:l<a,show:i("span",{className:n.and,children:"AND"})})]},s.id))}),i(F,{condition:Boolean(r),show:()=>i(JP,{segment:r,isExpanded:!0})})]})},Yve=le()(e=>({divider:{border:`1px dashed ${e.palette.divider}`,marginTop:e.spacing(1),marginBottom:e.spacing(2)}})),lc=()=>{const{uiConfig:e}=st();return{segmentValuesLimit:e.segmentValuesLimit,strategySegmentsLimit:e.strategySegmentsLimit}},Kve=()=>{const{segmentValuesLimit:e}=lc();return typeof e=="undefined"?null:w(yt,{severity:"warning",children:["Segments is an experimental feature, currently limited to at most"," ",e," values. ",i(QP,{})]})},Xve=e=>{const{segmentValuesLimit:t}=lc();return typeof t=="undefined"?null:w(yt,{severity:"error",children:["Segments are limited to at most ",t," values. This segment currently has ",e.values," ",e.values===1?"value":"values","."]})},Jve=()=>{const{strategySegmentsLimit:e}=lc();return typeof e=="undefined"?null:w(yt,{severity:"warning",children:["Strategies are limited to ",e," segments."," ",i(QP,{})]})},QP=()=>w(Ne,{children:["Please"," ",i("a",{href:"https://slack.unleash.run",target:"_blank",rel:"noreferrer",style:{color:"inherit"},children:"get in touch"})," ","if you would like this limit increased."]}),ZP="https://docs.getunleash.io/reference/segments",Qve=({segments:e,setSegments:t})=>{const{segments:n}=Gs(),{classes:r}=Yve(),{strategySegmentsLimit:o}=lc(),a=Boolean(o&&e.length>=o);if(!n||n.length===0)return null;const l=n.filter(u=>!e.find(d=>d.id===u.id)).map(u=>({value:String(u.id),label:u.name}));return w(Ne,{children:[i(Te,{component:"h3",sx:{m:0},variant:"h3",children:"Segmentation"}),a&&i(Jve,{}),i("p",{children:"Add a predefined segment to constrain this feature toggle:"}),i(XP,{label:"Select segments",options:l,onChange:([u])=>{const d=n.find(p=>String(p.id)===u.value);d&&t(p=>[...p,d])},disabled:a}),i(qve,{segments:e,setSegments:t}),i(Ur,{className:r.divider})]})},Zve=(e,t)=>{const{type:n,required:r}=e;if(!(n!=="string"&&n!=="list"&&n!=="number")){if(r&&(typeof t=="undefined"||t===""))return"Field is required";if(n==="number"&&!eye(t))return"Not a valid number."}},eye=e=>typeof e=="undefined"||e===""||/^\d+$/.test(String(e)),eO=({feature:e,environmentId:t,permission:n,onSubmit:r,loading:o,strategy:a,setStrategy:s,segments:l,setSegments:c,errors:u})=>{const{classes:d}=jve(),[p,h]=f.exports.useState(!1),m=r2(a.constraints),b=Fve(e,t),{hasAccess:y}=f.exports.useContext(Jt),{strategyDefinition:g}=ay(a==null?void 0:a.name),x=Ye(),{uiConfig:v,error:S,loading:E}=st();if(S)throw S;if(E||!g)return null;const R=I=>g.parameters.find(O=>O.name===I),A=(I,O)=>{const L=Zve(R(I),O);return L?(u.setFormError(I,L),!1):(u.removeFormError(I),!0)},_=()=>g.parameters.map(I=>I.name).map(I=>{var O;return A(I,(O=a.parameters)==null?void 0:O[I])}).every(Boolean),N=()=>{x(Bu(e.project,e.name))},k=async I=>{if(I.preventDefault(),_())b?h(!0):r();else return};return w("form",{className:d.form,onSubmit:k,children:[i("div",{children:i(ihe,{feature:e,environmentId:t})}),i("hr",{className:d.hr}),i(F,{condition:Boolean(v.flags.SE),show:i(Qve,{segments:l,setSegments:c})}),i(F,{condition:Boolean(v.flags.C||v.flags.CO),show:i(Lve,{projectId:e.project,environmentId:t,strategy:a,setStrategy:s})}),i(F,{condition:Boolean(v.flags.SE||v.flags.C||v.flags.CO),show:i("hr",{className:d.hr})}),i(qfe,{strategy:a,strategyDefinition:g,setStrategy:s,validateParameter:A,errors:u,hasAccess:y(n,e.project,t)}),i("hr",{className:d.hr}),w("div",{className:d.buttons,children:[i(Mr,{permission:n,projectId:e.project,environmentId:t,variant:"contained",color:"primary",type:"submit",disabled:o||!m||u.hasFormErrors(),"data-testid":Qne,children:"Save strategy"}),i(nt,{type:"button",color:"secondary",onClick:N,disabled:o,children:"Cancel"}),i(Bve,{open:p,onClose:()=>h(!1),onClick:r,loading:o,label:"Save strategy"})]})]})},tye=(e,t)=>{const n={};return t.parameters.forEach(r=>{n[r.name]=nye(e,r)}),{name:t.name,constraints:[],parameters:n}},nye=(e,t)=>t.name==="rollout"||t.name==="percentage"||t.type==="percentage"?"50":t.name==="stickiness"?"default":t.name==="groupId"?e:t.type==="boolean"?"false":"",rye=()=>{const e=Ve("projectId"),t=Ve("featureId"),n=ng("environmentId"),r=ng("strategyName"),[o,a]=f.exports.useState({}),[s,l]=f.exports.useState([]),{strategyDefinition:c}=ay(r),u=fP(),{addStrategyToFeature:d,loading:p}=Mu(),{setStrategySegments:h}=Of(),{setToastData:m,setToastApiError:b}=tt(),{uiConfig:y}=st(),{unleashUrl:g}=y,x=Ye(),{feature:v,refetchFeature:S}=oy(e,t);f.exports.useEffect(()=>{c&&a(tye(t,c))},[t,c]);const E=async()=>{try{const R=await d(e,t,n,hP(o));y.flags.SE&&await h({environmentId:n,projectId:e,strategyId:R.id,segmentIds:s.map(A=>A.id)}),m({title:"Strategy created",type:"success",confetti:!0}),S(),x(Bu(e,t))}catch(R){b(Ue(R))}};return i(Un,{modal:!0,title:tc(r),description:gP,documentationLink:vP,documentationLinkLabel:yP,formatApiCode:()=>oye(e,t,n,o,g),children:i(eO,{feature:v,strategy:o,setStrategy:a,segments:s,setSegments:l,environmentId:n,onSubmit:E,loading:p,permission:Vi,errors:u})})},tO=(e,t,n,r)=>{const o=new URLSearchParams({environmentId:n,strategyName:r});return`/projects/${e}/features/${t}/strategies/create?${o}`},oye=(e,t,n,r,o)=>{if(!o)return"";const a=`${o}/api/admin/projects/${e}/features/${t}/environments/${n}/strategies`,s=JSON.stringify(r,void 0,2);return`curl --location --request POST '${a}' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${s}'`},nO=({open:e,environmentName:t,featureId:n,projectId:r,onClose:o})=>{const{classes:a}=wfe(),s=Ye(),l=tO(r,n,t,"default");return w(ln,{open:e,maxWidth:"sm",onClose:()=>o(),title:"You need to add a strategy to your toggle",primaryButtonText:"Take me directly to add strategy",permissionButton:i(Mr,{type:"button",permission:Vi,projectId:r,environmentId:t,onClick:()=>{o(),s(l)},children:"Take me directly to add strategy"}),secondaryButtonText:"Cancel",children:[i("p",{className:a.infoText,children:"Before you can enable the toggle in the environment, you need to add an activation strategy."}),i("p",{className:a.infoText,children:"You can add the activation strategy by selecting the toggle, open the environment accordion and add the activation strategy."})]})},aye=(e=[])=>{var n;const t=f.exports.useRef(e);return(e==null?void 0:e.join(""))!==((n=t.current)==null?void 0:n.join(""))&&(t.current=e),t.current},iye=le()(e=>({container:{mx:"auto",display:"flex",justifyContent:"center"}})),sye=({projectId:e,featureName:t,environmentName:n,value:r,onToggle:o})=>{const{classes:a}=iye(),[s,l,c]=A3(r),u=()=>{l(!s),o(e,t,n,!s).catch(c)};return i(mt,{className:a.container,children:i(nc,{checked:r,environmentId:n,projectId:e,permission:j$,inputProps:{"aria-label":n},onClick:u,disabled:s!==r})},`${t}-${n}`)};var o2={},lye=yn.exports;Object.defineProperty(o2,"__esModule",{value:!0});var rO=o2.default=void 0,cye=lye(bn),uye=Cn,dye=(0,cye.default)((0,uye.jsx)("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5 6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"}),"Archive");rO=o2.default=dye;var a2={},pye=yn.exports;Object.defineProperty(a2,"__esModule",{value:!0});var oO=a2.default=void 0,fye=pye(bn),hye=Cn,mye=(0,fye.default)((0,hye.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"}),"WatchLater");oO=a2.default=mye;const gye=le()(e=>({cell:{display:"flex",justifyContent:"center",paddingRight:e.spacing(2)},menuContainer:{borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(1,1.5)},item:{borderRadius:e.shape.borderRadius},text:{fontSize:e.fontSizes.smallBody}})),l1=({permission:e,projectId:t,children:n,environmentId:r,tooltip:o,tooltipProps:a})=>{const{hasAccess:s}=f.exports.useContext(Jt);let l;return t&&r?l=s(e,t,r):t?l=s(e,t):l=s(e),i(Wv,ee(V({},a),{title:Hv(l,o),children:n({hasAccess:l})}))},vye=({projectId:e,row:t,onOpenArchiveDialog:n,onOpenStaleDialog:r})=>{const[o,a]=f.exports.useState(null),{classes:s}=gye(),{original:{name:l,stale:c}}=t,u=Boolean(o),d=b=>{a(b.currentTarget)},p=()=>{a(null)},h=`feature-${l}-actions`,m=`${h}-menu`;return w(mt,{className:s.cell,children:[i(wt,{title:"Feature toggle actions",arrow:!0,describeChild:!0,children:i(Ht,{id:h,"aria-controls":u?m:void 0,"aria-haspopup":"true","aria-expanded":u?"true":void 0,onClick:d,type:"button",children:i(TC,{})})}),i(Xl,{id:m,anchorEl:o,open:u,onClose:p,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},disableScrollLock:!0,PaperProps:{className:s.menuContainer},children:w(mv,{"aria-labelledby":h,children:[i(l1,{projectId:e,permission:Jl,children:({hasAccess:b})=>w(_r,{className:s.item,onClick:p,disabled:!b,component:Ct,to:`/projects/${e}/features/${l}/strategies/copy`,children:[i(Mi,{children:i(Xv,{})}),i(dn,{children:i(Te,{variant:"body2",children:"Copy"})})]})}),i(l1,{projectId:e,permission:zS,children:({hasAccess:b})=>w(_r,{className:s.item,onClick:()=>{n(l),p()},disabled:!b,children:[i(Mi,{children:i(rO,{})}),i(dn,{children:i(Te,{variant:"body2",children:"Archive"})})]})}),i(l1,{projectId:e,permission:Hi,children:({hasAccess:b})=>w(_r,{className:s.item,onClick:()=>{p(),r({featureId:l,stale:c===!0})},disabled:!b,children:[i(Mi,{children:i(oO,{})}),i(dn,{children:w(Te,{variant:"body2",children:[c?"Un-mark":"Mark"," as stale"]})})]})})]})})]})};var i2={},yye=yn.exports;Object.defineProperty(i2,"__esModule",{value:!0});var aO=i2.default=void 0,bye=yye(bn),xye=Cn,wye=(0,bye.default)((0,xye.jsx)("path",{d:"M5.33 20H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h1.33c1.1 0 2 .9 2 2v12c0 1.1-.89 2-2 2zM22 18V6c0-1.1-.9-2-2-2h-1.33c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2H20c1.11 0 2-.9 2-2zm-7.33 0V6c0-1.1-.9-2-2-2h-1.33c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h1.33c1.1 0 2-.9 2-2z"}),"ViewWeek");aO=i2.default=wye;const Sye=le()(e=>({container:{display:"flex",justifyContent:"center",alignItems:"center"},button:{margin:e.spacing(-1,0)},menuContainer:{borderRadius:e.shape.borderRadiusLarge,paddingBottom:e.spacing(2)},menuHeader:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e.spacing(1,1,0,4)},menuItem:{padding:e.spacing(0,2),margin:e.spacing(0,2),borderRadius:e.shape.borderRadius},checkbox:{padding:e.spacing(.75,1)},divider:{"&.MuiDivider-root.MuiDivider-fullWidth":{margin:e.spacing(.75,0)}}})),Cye=({allColumns:e,staticColumns:t=[],dividerBefore:n=[],dividerAfter:r=[],isCustomized:o=!1,setHiddenColumns:a})=>{const[s,l]=f.exports.useState(null),{classes:c}=Sye(),u=pn(),d=an(u.breakpoints.down("sm")),p=an(u.breakpoints.down("md")),h=an(u.breakpoints.down("lg"));f.exports.useEffect(()=>{if(o)return;const v=(S,E=0)=>{const R=e.filter(({id:_})=>_.startsWith("environments.")!==!1).map(({id:_})=>_).slice(0,E),A=e.map(({id:_})=>_).filter(_=>!S.includes(_)).filter(_=>!t.includes(_)).filter(_=>!R.includes(_));a(A)};if(d)return v(["createdAt"]);if(p)return v(["createdAt"],1);if(h)return v(["type","createdAt"],1);v(["lastSeenAt","type","createdAt"],3)},[d,p,h]);const m=v=>{l(v.currentTarget)},b=()=>{l(null)},y=Boolean(s),g="columns-menu",x=`columns-menu-list-${g}`;return w(mt,{className:c.container,children:[i(wt,{title:"Select columns",arrow:!0,describeChild:!0,children:i(Ht,{id:g,"aria-controls":y?x:void 0,"aria-haspopup":"true","aria-expanded":y?"true":void 0,onClick:m,type:"button",size:"large",className:c.button,"data-loading":!0,children:i(aO,{})})}),w(Xl,{id:x,open:y,anchorEl:s,onClose:b,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},disableScrollLock:!0,PaperProps:{className:c.menuContainer},children:[w(mt,{className:c.menuHeader,children:[i(Te,{variant:"body2",children:i("strong",{children:"Columns"})}),i(Ht,{onClick:b,children:i(xv,{})})]}),i(mv,{children:e.map(v=>[i(F,{condition:n.includes(v.id),show:i(Ur,{className:c.divider})}),w(_r,{onClick:()=>v.toggleHidden(v.isVisible),disabled:t.includes(v.id),className:c.menuItem,children:[i(Mi,{children:i(Do,{edge:"start",checked:v.isVisible,disableRipple:!0,inputProps:{"aria-labelledby":v.id},size:"medium",className:c.checkbox})}),i(dn,{id:v.id,primary:i(Te,{variant:"body2",children:i(F,{condition:Boolean(typeof v.Header=="string"&&v.Header),show:()=>i(Ne,{children:v.Header}),elseShow:()=>v.id})})})]}),i(F,{condition:r.includes(v.id),show:i(Ur,{className:c.divider})})])})]})]})},Eye=le()(e=>({container:{boxShadow:"none",marginLeft:"1rem",minHeight:"100%",width:"calc(100% - 1rem)",position:"relative",[e.breakpoints.down("md")]:{marginLeft:"0",paddingBottom:"4rem",width:"inherit"}},headerClass:{"& th":{fontSize:e.fontSizes.smallerBody,lineHeight:"1rem"}},bodyClass:{overflowX:"auto",padding:e.spacing(4)},header:{padding:"1rem"},title:{display:"unset"},iconButton:{marginRight:"1rem"},icon:{color:"#000",height:"30px",width:"30px"},noTogglesFound:{marginBottom:"0.5rem"},link:{textDecoration:"none",color:e.palette.primary.main},actionsContainer:{display:"flex",justifyContent:"center",alignItems:"center"},search:{border:`1px solid ${e.palette.grey[300]}`,height:35,marginRight:"2rem"},button:{whiteSpace:"nowrap"},row:{position:"absolute",width:"100%"},cell:{alignItems:"center",display:"flex",flexShrink:0,"& > *":{flexGrow:1}}})),iO=({isStale:e,isOpen:t,projectId:n,featureId:r,onClose:o})=>{const{setToastData:a,setToastApiError:s}=tt(),{patchFeatureToggle:l}=xo(),c=i(Te,{children:"Setting a toggle to stale marks it for cleanup"}),u=i(Te,{children:"Setting a toggle to active marks it as in active use"}),d=e?"active":"stale",p=async h=>{h.stopPropagation();try{await l(n,r,[{op:"replace",path:"/stale",value:!e}]),o()}catch(m){s(Ue(m))}a(e?{type:"success",title:"And we're back!",text:"The toggle is no longer marked as stale."}:{type:"success",title:"A job well done.",text:"The toggle has been marked as stale."})};return i(ln,{open:t,secondaryButtonText:"Cancel",primaryButtonText:`Flip to ${d}`,title:`Set feature state to ${d}`,onClick:p,onClose:o,children:i(F,{condition:e,show:u,elseShow:c})})},sO=({isOpen:e,onClose:t,onConfirm:n,projectId:r,featureId:o})=>{const{archiveFeatureToggle:a}=xo(),{setToastData:s,setToastApiError:l}=tt(),c=async()=>{try{await a(r,o),s({text:"Your feature toggle has been archived",type:"success",title:"Feature archived"}),n(),t()}catch(u){l(Ue(u)),t()}};return i(ln,{onClick:()=>c(),open:e,onClose:t,primaryButtonText:"Archive toggle",secondaryButtonText:"Cancel",title:"Archive feature toggle",children:"Are you sure you want to archive this feature toggle?"})},Uh=["Actions","name"],Tye={id:"createdAt"},Rye=({features:e,loading:t,environments:n=[]})=>{const{classes:r}=Eye(),o=zs(),a=an(o.breakpoints.down("md")),[s,l]=f.exports.useState({open:!1,featureId:"",environmentName:""}),[c,u]=f.exports.useState({}),[d,p]=f.exports.useState(),h=Ve("projectId"),{value:m,setValue:b}=Pu(`${h}:FeatureToggleListTable:v1`,Tye),y=Ye(),[g,x]=Ls(),{uiConfig:v}=st(),S=aye(t?["a","b","c"]:n),{refetch:E}=Gi(h),{setToastData:R,setToastApiError:A}=tt(),{toggleFeatureEnvironmentOn:_,toggleFeatureEnvironmentOff:N}=xo(),k=f.exports.useCallback(async(ae,oe,ue,ge)=>{try{ge?await _(ae,oe,ue):await N(ae,oe,ue),E()}catch(_e){const We=Ue(_e);throw We===aP?l({open:!0,featureId:oe,environmentName:ue}):A(We),_e}R({type:"success",title:"Updated toggle status",text:"Successfully updated toggle status."}),E()},[N,_]),I=f.exports.useMemo(()=>[{Header:"Seen",accessor:"lastSeenAt",Cell:jv,sortType:"date",align:"center",maxWidth:80},{Header:"Type",accessor:"type",Cell:Uv,align:"center",maxWidth:80},{Header:"Name",accessor:"name",Cell:({value:ae})=>i(bi,{title:ae,to:`/projects/${h}/features/${ae}`}),minWidth:100,sortType:"alphanumeric",searchable:!0},{Header:"Created",accessor:"createdAt",Cell:wa,sortType:"date",minWidth:120},...S.map(ae=>({Header:t?()=>"":ae,maxWidth:90,accessor:`environments.${ae}`,align:"center",Cell:({value:oe,row:{original:ue}})=>i(sye,{value:(oe==null?void 0:oe.enabled)||!1,projectId:h,featureName:ue==null?void 0:ue.name,environmentName:oe==null?void 0:oe.name,onToggle:k}),sortType:(oe,ue,ge)=>{var be,he,He,Pe;const _e=(he=(be=oe==null?void 0:oe.values)==null?void 0:be[ge])==null?void 0:he.enabled,We=(Pe=(He=ue==null?void 0:ue.values)==null?void 0:He[ge])==null?void 0:Pe.enabled;return _e===We?0:_e?-1:1},filterName:ae,filterParsing:oe=>oe.enabled?"enabled":"disabled"})),{id:"Actions",maxWidth:56,width:56,Cell:ae=>i(vye,V({projectId:h,onOpenArchiveDialog:p,onOpenStaleDialog:u},ae)),disableSortBy:!0}],[h,S,k,t]),[O,L]=f.exports.useState(g.get("search")||""),q=f.exports.useMemo(()=>e.map(({name:ae,lastSeenAt:oe,createdAt:ue,type:ge,stale:_e,environments:We})=>({name:ae,lastSeenAt:oe,createdAt:ue,type:ge,stale:_e,environments:Object.fromEntries(S.map(be=>{var he;return[be,{name:be,enabled:((he=We==null?void 0:We.find(He=>(He==null?void 0:He.name)===be))==null?void 0:he.enabled)||!1}]}))})),[e,S]),{data:D,getSearchText:H,getSearchContext:U}=Ou(I,O,q),Z=f.exports.useMemo(()=>t?Array(6).fill({type:"-",name:"Feature name",createdAt:new Date,environments:{production:{name:"production",enabled:!1}}}):D,[t,D]),G=f.exports.useMemo(()=>{var ge;const ae=new URLSearchParams,oe=I.map(_e=>(_e==null?void 0:_e.accessor)||(_e==null?void 0:_e.id));let ue=S.filter((_e,We)=>We>=3).map(_e=>`environments.${_e}`);if(ae.has("columns")){const _e=((ge=ae.get("columns"))==null?void 0:ge.split(","))||[],We=[...Uh,..._e];ue=oe.filter(be=>!We.includes(be))}else if(m.columns){const _e=[...Uh,...m.columns];ue=oe.filter(We=>!_e.includes(We))}return{sortBy:[{id:ae.get("sort")||"createdAt",desc:ae.has("order")?ae.get("order")==="desc":m.desc}],hiddenColumns:ue}},[S]),{allColumns:B,headerGroups:Y,rows:K,state:{sortBy:Q,hiddenColumns:re},prepareRow:pe,setHiddenColumns:ye}=ct.exports.useTable({columns:I,data:Z,initialState:G,sortTypes:Ar,disableSortRemove:!0,autoResetSortBy:!1},ct.exports.useFlexLayout,ct.exports.useSortBy);return f.exports.useEffect(()=>{if(t)return;const ae={};ae.sort=Q[0].id,Q[0].desc&&(ae.order="desc"),O&&(ae.search=O),ae.columns=B.map(({id:oe})=>oe).filter(oe=>!Uh.includes(oe)&&!(re!=null&&re.includes(oe))).join(","),x(ae,{replace:!0}),b(oe=>ee(V({},oe),{id:Q[0].id,desc:Q[0].desc||!1,columns:ae.columns.split(",")}))},[t,Q,re,O,x]),w(Gt,{isLoading:t,className:r.container,bodyClass:r.bodyClass,header:i(Dt,{className:r.title,titleElement:`Feature toggles (${K.length})`,actions:w(Ne,{children:[i(F,{condition:!a,show:i(jn,{initialValue:O,onChange:L,hasFilters:!0,getSearchContext:U})}),i(Cye,{allColumns:B,staticColumns:Uh,dividerAfter:["createdAt"],dividerBefore:["Actions"],isCustomized:Boolean(m.columns),setHiddenColumns:ye}),i(Dt.Divider,{sx:{marginLeft:0}}),i(oc,{onClick:()=>y(oC(h,v.flags.E)),maxWidth:"960px",Icon:io,projectId:h,permission:Jl,className:r.button,children:"New feature toggle"})]}),children:i(F,{condition:a,show:i(jn,{initialValue:O,onChange:L,hasFilters:!0,getSearchContext:U})})}),children:[i(so,{value:H(O),children:i(Hs,{rows:K,headerGroups:Y,prepareRow:pe})}),i(F,{condition:K.length===0,show:i(F,{condition:(O==null?void 0:O.length)>0,show:w(Vt,{children:["No feature toggles found matching \u201C",O,"\u201D"]}),elseShow:i(Vt,{children:"No feature toggles available. Get started by adding a new feature toggle."})})}),i(nO,V({onClose:()=>l(ae=>ee(V({},ae),{open:!1})),projectId:h},s)),i(iO,{isStale:c.stale===!0,isOpen:Boolean(c.featureId),onClose:()=>{u({}),E()},featureId:c.featureId||"",projectId:h}),i(sO,{isOpen:Boolean(d),onConfirm:()=>{E()},onClose:()=>{p(void 0)},featureId:d||"",projectId:h})]})},kye=le()(e=>({projectInfo:{width:"225px",display:"flex",flexDirection:"column",alignItems:"center",boxShadow:"none",[e.breakpoints.down("md")]:{flexDirection:"row",alignItems:"stretch",width:"100%",marginBottom:"1rem"}},description:{textAlign:"left",marginBottom:"0.5rem"},descriptionContainer:{display:"flex",justifyContent:"space-between"},idContainer:{display:"flex",width:"100%",textAlign:"left",wordBreak:"break-all"},percentageContainer:{display:"flex",justifyContent:"center",margin:"1rem 0"},projectIcon:{margin:"2rem 0",[e.breakpoints.down("md")]:{margin:"0 0 0.25rem 0",width:"53px"}},subtitle:{marginBottom:"1rem"},emphazisedText:{fontSize:"1.5rem",marginBottom:"1rem",[e.breakpoints.down("md")]:{fontSize:"1rem",marginBottom:"2rem"}},infoSection:{margin:"0",textAlign:"center",marginBottom:"1rem",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadiusLarge,width:"100%",padding:"1.5rem 1rem 1.5rem 1rem",[e.breakpoints.down("md")]:{margin:"0 0.25rem",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"0.8rem",position:"relative",padding:"0.8rem","&:first-of-type":{marginLeft:"0"},"&:last-of-type":{marginRight:"0"}}},arrowIcon:{color:"#635dc5",marginLeft:"0.5rem"},permissionButtonShortDesc:{transform:"translateY(-10px)"},infoLink:{textDecoration:"none",color:"#635dc5",[e.breakpoints.down("md")]:{position:"absolute",bottom:"5px"}},accordion:{boxShadow:"none",textAlign:"left"},accordionBody:{padding:"0",wordBreak:"break-all"},accordionActions:{padding:"0",justifyContent:"flex-start"},linkText:{[e.breakpoints.down("md")]:{display:"none"}}}));var s2={},_ye=yn.exports;Object.defineProperty(s2,"__esModule",{value:!0});var Jb=s2.default=void 0,Iye=_ye(bn),Aye=Cn,Nye=(0,Iye.default)((0,Aye.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");Jb=s2.default=Nye;const cg=({percentage:e,size:t="4rem"})=>{const n=pn(),r={display:"block",borderRadius:"100%",transform:"rotate(-90deg)",height:t,width:t,background:n.palette.grey[200]},o=100/(2*Math.PI),a=2*o;return i("svg",{viewBox:`0 0 ${a} ${a}`,style:r,"aria-hidden":!0,children:i("circle",{r:o,cx:o,cy:o,fill:"none",stroke:n.palette.primary.light,strokeWidth:a,strokeDasharray:`${e} 100`})})},$ye=({id:e,memberCount:t,health:n,description:r})=>{var m,b;const{classes:o}=Yn(),{classes:a}=kye(),{uiConfig:s,isOss:l}=st();let c="/admin/users";(b=(m=s==null?void 0:s.versionInfo)==null?void 0:m.current)!=null&&b.enterprise&&(c=`/projects/${e}/access`);const u=100,d=!r||r.length<u,p=it({[a.permissionButtonShortDesc]:d}),h=i("div",{children:i(Ft,{permission:ca,hidden:l(),projectId:e,component:Ct,className:p,"data-loading":!0,to:`/projects/${e}/edit`,tooltipProps:{title:"Edit description"},children:i(ar,{})})});return i("aside",{children:w("div",{className:a.projectInfo,children:[w("div",{className:a.infoSection,children:[w("div",{className:a.descriptionContainer,children:[i(F,{condition:Boolean(r),show:i(F,{condition:d,show:i("p",{"data-loading":!0,className:a.description,children:r}),elseShow:w(Tu,{className:a.accordion,children:[i(ku,{expandIcon:i(TS,{titleAccess:"Toggle"}),className:a.accordionBody,children:"Description"}),i(Ru,{className:a.accordionBody,children:r}),w(wU,{className:a.accordionActions,children:["Edit description"," ",h]})]})}),elseShow:i("p",{"data-loading":!0,className:a.description,children:"No description"})}),i(F,{condition:d,show:h})]}),i("div",{className:a.idContainer,children:w("p",{children:["projectId: ",e]})})]}),w("div",{className:a.infoSection,children:[i("div",{"data-loading":!0,className:a.percentageContainer,children:i(cg,{percentage:n})}),i("p",{className:a.subtitle,"data-loading":!0,children:"Overall health rating"}),w("p",{className:a.emphazisedText,"data-loading":!0,children:[n,"%"]}),w(Ct,{"data-loading":!0,className:it(o.flexRow,o.justifyCenter,a.infoLink),to:`/projects/${e}/health`,children:[w("span",{className:a.linkText,"data-loading":!0,children:["view more"," "]}),i(Jb,{"data-loading":!0,className:a.arrowIcon})]})]}),w("div",{className:a.infoSection,style:{marginBottom:"0"},children:[i("p",{className:a.subtitle,"data-loading":!0,children:"Project members"}),i("p",{"data-loading":!0,className:a.emphazisedText,children:t}),w(Ct,{"data-loading":!0,className:it(o.flexRow,o.justifyCenter,a.infoLink),to:c,children:[w("span",{className:a.linkText,"data-loading":!0,children:["view more"," "]}),i(Jb,{"data-loading":!0,className:a.arrowIcon})]})]})]})})},Pye=15*1e3,Oye=()=>{const e=Ve("projectId"),t=$f(e),{project:n,loading:r}=Gi(e,{refreshInterval:Pye}),{members:o,features:a,health:s,description:l,environments:c}=n,{classes:u}=tP();return Sa(`Project overview \u2013 ${t}`),i("div",{children:w("div",{className:u.containerStyles,children:[i($ye,{id:e,description:l,memberCount:o,health:s,featureCount:a==null?void 0:a.length}),i("div",{className:u.projectToggles,children:i(Rye,{features:a,environments:c,loading:r})})]})})},Dye=(e,t)=>{const n=bt(`api/admin/projects/${e}/health-report`),{data:r,error:o}=Wt(n,Lye,t),a=f.exports.useCallback(()=>{Fn(n).catch(console.warn)},[n]);return{healthReport:r,refetchHealthReport:a,loading:!o&&!r,error:o}},Lye=e=>fetch(e).then(rn("Health report")).then(t=>t.json());var l2={},Mye=yn.exports;Object.defineProperty(l2,"__esModule",{value:!0});var Qb=l2.default=void 0,Bye=Mye(bn),Fye=Cn,zye=(0,Bye.default)((0,Fye.jsx)("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined");Qb=l2.default=zye;const jye=z(mt)(({theme:e})=>({display:"flex",alignItems:"center",color:e.palette.success.dark,"& svg":{color:e.palette.success.main}})),b_=z(mt)(({theme:e})=>({display:"flex",alignItems:"center",color:e.palette.warning.dark,"& svg":{color:e.palette.warning.main}})),Uye=z(yr)(({theme:e})=>({padding:e.spacing(4),marginBottom:e.spacing(2),borderRadius:e.shape.borderRadiusLarge,boxShadow:"none",display:"flex",justifyContent:"space-between",[e.breakpoints.down("md")]:{flexDirection:"column",gap:e.spacing(2)}})),c1=z("h2")(({theme:e})=>({fontSize:e.fontSizes.mainHeader,marginBottom:e.spacing(1)})),Wye=z("p")(({theme:e})=>({fontSize:"2rem",fontWeight:e.fontWeight.bold})),Hye=z("p")(({theme:e})=>({color:e.palette.text.secondary})),x_=z("ul")(({theme:e})=>({listStyleType:"none",margin:0,padding:0,"& svg":{marginRight:e.spacing(1)}})),u1=z("p")(({theme:e})=>({marginLeft:e.spacing(4)})),Vye=({healthReport:e})=>{const t=e.health<50?"error.main":e.health<75?"warning.main":"success.main",n=()=>w(jye,{children:[i(Pv,{}),w("span",{children:[e.activeCount," active toggles"]})]}),r=()=>w(b_,{children:[i(Qb,{}),w("span",{children:[e.staleCount," stale toggles"]})]}),o=()=>w(b_,{children:[i(Qb,{}),w("span",{children:[e.potentiallyStaleCount," potentially stale toggles"]})]});return w(Uye,{children:[w(mt,{children:[i(c1,{children:"Health rating"}),i(F,{condition:e.health>-1,show:w(Ne,{children:[w(Wye,{sx:{color:t},children:[e.health,"%"]}),w(Hye,{children:["Last updated:"," ",i(zv,{date:e.updatedAt,live:!1})]})]})})]}),w(mt,{children:[i(c1,{children:"Toggle report"}),w(x_,{children:[i("li",{children:i(F,{condition:Boolean(e.activeCount),show:n})}),i(F,{condition:Boolean(e.activeCount),show:i(u1,{children:"Also includes potentially stale toggles."})}),i("li",{children:i(F,{condition:Boolean(e.staleCount),show:r})})]})]}),w(mt,{children:[i(c1,{children:"Potential actions"}),i(x_,{children:i("li",{children:i(F,{condition:Boolean(e.potentiallyStaleCount),show:o})})}),i(F,{condition:Boolean(e.potentiallyStaleCount),show:i(u1,{children:"Review your feature toggles and delete unused toggles."}),elseShow:i(u1,{children:"No action is required"})})]})]})},Gye=({row:e})=>{const t=pn();return e.original.expiredAt?i(wa,{value:e.original.expiredAt}):i(Bn,{children:i(Te,{variant:"body2",color:t.palette.text.secondary,children:"N/A"})})},qye=z("span")(({theme:e})=>({display:"flex",gap:"1ch",alignItems:"center",color:e.palette.warning.dark,"& svg":{color:e.palette.warning.main}})),Yye=z("span")(({theme:e})=>({display:"flex",gap:"1ch",alignItems:"center",color:e.palette.success.dark,"& svg":{color:e.palette.success.main}})),Kye=({row:e})=>e.original.status==="potentially-stale"?i(Bn,{children:w(qye,{children:[i(Lte,{}),i("span",{children:"Potentially stale"})]})}):i(Bn,{children:w(Yye,{children:[i(m$,{}),i("span",{children:"Healthy"})]})}),w_=40,Xye=7,lO={[o3]:w_,[a3]:w_,[i3]:Xye},cO=(e,t)=>Math.abs(fS(e,t)),uO=(e,t)=>e>=lO[t],Jye=e=>{const{type:t,createdAt:n}=e,r=Ql(n),o=new Date,a=cO(r,o);return uO(a,t)&&t!==KS&&t!==XS?"potentially-stale":"healthy"},Qye=e=>{const{type:t,createdAt:n}=e;if(t===KS||t===XS)return;const r=Ql(n),o=new Date,a=cO(r,o);if(uO(a,t)){const s=a-lO[t];return Eie(o,s).toISOString()}},Zye=({projectId:e,features:t})=>{const n=pn(),r=an(n.breakpoints.down("sm")),o=an(n.breakpoints.down("md")),a=an(n.breakpoints.down("lg")),s=f.exports.useMemo(()=>t.map(b=>({project:e,name:b.name,type:b.type,stale:b.stale,status:Jye(b),lastSeenAt:b.lastSeenAt,createdAt:b.createdAt,expiredAt:Qye(b)})),[e,t]),l=f.exports.useMemo(()=>({hiddenColumns:[],sortBy:[{id:"createdAt"}]}),[]),{headerGroups:c,rows:u,prepareRow:d,state:{globalFilter:p},setGlobalFilter:h,setHiddenColumns:m}=ct.exports.useTable({columns:e0e,data:s,initialState:l,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useFlexLayout,ct.exports.useSortBy);return f.exports.useEffect(()=>{const b=[];a&&b.push("createdAt"),o&&b.push("expiredAt","lastSeenAt"),r&&b.push("stale"),m(b)},[m,o,a,r]),w(Gt,{header:i(Dt,{titleElement:"Overview",actions:i(jn,{initialValue:p,onChange:h})}),children:[i(so,{value:p,children:i(Hs,{headerGroups:c,prepareRow:d,rows:u})}),i(F,{condition:u.length===0,show:i(F,{condition:(p==null?void 0:p.length)>0,show:w(Vt,{children:["No feature toggles found matching \u201C",p,"\u201D"]}),elseShow:i(Vt,{children:"No feature toggles available. Get started by adding a new feature toggle."})})})]})},e0e=[{Header:"Seen",accessor:"lastSeenAt",sortType:"date",align:"center",Cell:jv,disableGlobalFilter:!0,maxWidth:85},{Header:"Type",accessor:"type",align:"center",Cell:Uv,disableGlobalFilter:!0,maxWidth:85},{Header:"Name",accessor:"name",sortType:"alphanumeric",Cell:d3,minWidth:120},{Header:"Created",accessor:"createdAt",sortType:"date",Cell:wa,disableGlobalFilter:!0,maxWidth:150},{Header:"Expired",accessor:"expiredAt",Cell:Gye,disableGlobalFilter:!0,maxWidth:150},{Header:"Status",id:"status",Cell:Kye,disableGlobalFilter:!0,width:180},{Header:"State",accessor:"stale",sortType:"boolean",Cell:aC,disableGlobalFilter:!0,maxWidth:120}],t0e=()=>{const e=Ve("projectId"),t=$f(e);Sa(`Project health \u2013 ${t}`);const{healthReport:n,refetchHealthReport:r,error:o}=Dye(e,{refreshInterval:15*1e3});return n?w("div",{children:[i(F,{condition:Boolean(o),show:i(ry,{"data-loading":!0,style:{maxWidth:"500px",marginTop:"1rem"},onClick:r,text:`Could not fetch health rating for ${e}`})}),i(Vye,{healthReport:n}),i(Zye,{projectId:e,features:n.features})]}):null},d1=z("div")(()=>({display:"flex"})),n0e=z("div")(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingBottom:e.spacing(2)})),Zb=z("span")(({theme:e})=>({fontSize:e.fontSizes.smallBody,fontWeight:"normal"})),S_=z(Zb)(({theme:e})=>({color:e.palette.grey[800]})),r0e=()=>{const e=Ve("projectId"),t=Vs(),{project:n,error:r,loading:o,refetch:a}=Gi(e),s=Ji(o),{setToastData:l}=tt(),{classes:c}=tP(),u=Ye(),{pathname:d}=Gr(),{isOss:p}=st(),h=`/projects/${e}`,m=(n==null?void 0:n.name)||e,[b,y]=f.exports.useState(!1),g=[{title:"Overview",path:h,name:"overview"},{title:"Health",path:`${h}/health`,name:"health"},{title:"Access",path:`${h}/access`,name:"access"},{title:"Environments",path:`${h}/environments`,name:"environments"},{title:"Archive",path:`${h}/archive`,name:"archive"}],x=[...g].reverse().find(v=>d.startsWith(v.path));return f.exports.useEffect(()=>{const v=t.get("created"),S=t.get("edited");(v||S)&&l({type:"success",title:v?"Project created":"Project updated"})},[]),w("div",{ref:s,children:[w("div",{className:c.header,children:[i("div",{className:c.innerContainer,children:w("h2",{className:c.title,children:[w("div",{children:[i(n0e,{"data-loading":!0,children:m}),i(F,{condition:Boolean(n.description),show:w(d1,{children:[i(Zb,{"data-loading":!0,children:"Description:\xA0"}),i(S_,{"data-loading":!0,children:n.description})]})}),w(d1,{children:[i(Zb,{"data-loading":!0,children:"projectId:\xA0"}),i(S_,{"data-loading":!0,children:e})]})]}),w(d1,{children:[i(Ft,{permission:ca,projectId:e,sx:{visibility:p()?"hidden":"visible"},onClick:()=>u(`/projects/${e}/edit`),tooltipProps:{title:"Edit project"},"data-loading":!0,children:i(ar,{})}),i(Ft,{permission:z$,projectId:e,sx:{visibility:p()?"hidden":"visible"},onClick:()=>{y(!0)},tooltipProps:{title:"Delete project"},"data-loading":!0,children:i(er,{})})]})]})}),i(F,{condition:r,show:i(ry,{"data-loading":!0,style:{maxWidth:"400px",margin:"1rem"},onClick:a,text:"Could not fetch project"})}),i("div",{className:c.separator}),i("div",{className:c.tabContainer,children:i(bv,{value:x==null?void 0:x.path,indicatorColor:"primary",textColor:"primary",children:g.map(v=>i(Ha,{label:v.title,value:v.path,onClick:()=>u(v.path),className:c.tabButton},v.title))})})]}),i(eP,{project:e,open:b,onClose:()=>{y(!1)},onSuccess:()=>{u("/projects")}}),w(of,{children:[i(Er,{path:"health",element:i(t0e,{})}),i(Er,{path:"access/*",element:i(ofe,{})}),i(Er,{path:"environments",element:i(dfe,{})}),i(Er,{path:"archive",element:i(xfe,{})}),i(Er,{path:"*",element:i(Oye,{})})]})]})},o0e=()=>i(Yi,{to:"/archive",replace:!0}),a0e=le()(e=>({container:{borderRadius:"12.5px",backgroundColor:e.palette.background.paper,padding:"2rem"}})),i0e=z("li")(({theme:e})=>({padding:e.spacing(4),backgroundColor:e.palette.neutral.light,borderRadius:e.shape.borderRadiusLarge,fontSize:e.fontSizes.smallBody,"& code":{wordWrap:"break-word",whiteSpace:"pre-wrap",fontFamily:"monospace",lineHeight:"100%"}})),s0e=({entry:e})=>{const t=JSON.parse(JSON.stringify(e));delete t.description,delete t.name,delete t.diffs;const n=JSON.stringify(t,null,2);return i(i0e,{children:i("div",{children:i("code",{children:n})})})};var dO={exports:{}};(function(e,t){(function(n,r){var o=r(n);e.exports=o})(_n,function(n){var r=["N","E","A","D"];function o(N,k){N.super_=k,N.prototype=Object.create(k.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}})}function a(N,k){Object.defineProperty(this,"kind",{value:N,enumerable:!0}),k&&k.length&&Object.defineProperty(this,"path",{value:k,enumerable:!0})}function s(N,k,I){s.super_.call(this,"E",N),Object.defineProperty(this,"lhs",{value:k,enumerable:!0}),Object.defineProperty(this,"rhs",{value:I,enumerable:!0})}o(s,a);function l(N,k){l.super_.call(this,"N",N),Object.defineProperty(this,"rhs",{value:k,enumerable:!0})}o(l,a);function c(N,k){c.super_.call(this,"D",N),Object.defineProperty(this,"lhs",{value:k,enumerable:!0})}o(c,a);function u(N,k,I){u.super_.call(this,"A",N),Object.defineProperty(this,"index",{value:k,enumerable:!0}),Object.defineProperty(this,"item",{value:I,enumerable:!0})}o(u,a);function d(N,k,I){var O=N.slice((I||k)+1||N.length);return N.length=k<0?N.length+k:k,N.push.apply(N,O),N}function p(N){var k=typeof N;return k!=="object"?k:N===Math?"math":N===null?"null":Array.isArray(N)?"array":Object.prototype.toString.call(N)==="[object Date]"?"date":typeof N.toString=="function"&&/^\/.*\//.test(N.toString())?"regexp":"object"}function h(N){var k=0;if(N.length===0)return k;for(var I=0;I<N.length;I++){var O=N.charCodeAt(I);k=(k<<5)-k+O,k=k&k}return k}function m(N){var k=0,I=p(N);if(I==="array"){N.forEach(function(H){k+=m(H)});var O="[type: array, hash: "+k+"]";return k+h(O)}if(I==="object"){for(var L in N)if(N.hasOwnProperty(L)){var q="[ type: object, key: "+L+", value hash: "+m(N[L])+"]";k+=h(q)}return k}var D="[ type: "+I+" ; value: "+N+"]";return k+h(D)}function b(N,k,I,O,L,q,D,H){I=I||[],L=L||[],D=D||[];var U=L.slice(0);if(typeof q!="undefined"&&q!==null){if(O){if(typeof O=="function"&&O(U,q))return;if(typeof O=="object"){if(O.prefilter&&O.prefilter(U,q))return;if(O.normalize){var Z=O.normalize(U,q,N,k);Z&&(N=Z[0],k=Z[1])}}}U.push(q)}p(N)==="regexp"&&p(k)==="regexp"&&(N=N.toString(),k=k.toString());var G=typeof N,B=typeof k,Y,K,Q,re,pe=G!=="undefined"||D&&D.length>0&&D[D.length-1].lhs&&Object.getOwnPropertyDescriptor(D[D.length-1].lhs,q),ye=B!=="undefined"||D&&D.length>0&&D[D.length-1].rhs&&Object.getOwnPropertyDescriptor(D[D.length-1].rhs,q);if(!pe&&ye)I.push(new l(U,k));else if(!ye&&pe)I.push(new c(U,N));else if(p(N)!==p(k))I.push(new s(U,N,k));else if(p(N)==="date"&&N-k!==0)I.push(new s(U,N,k));else if(G==="object"&&N!==null&&k!==null){for(Y=D.length-1;Y>-1;--Y)if(D[Y].lhs===N){re=!0;break}if(re)N!==k&&I.push(new s(U,N,k));else{if(D.push({lhs:N,rhs:k}),Array.isArray(N)){for(H&&(N.sort(function(ue,ge){return m(ue)-m(ge)}),k.sort(function(ue,ge){return m(ue)-m(ge)})),Y=k.length-1,K=N.length-1;Y>K;)I.push(new u(U,Y,new l(void 0,k[Y--])));for(;K>Y;)I.push(new u(U,K,new c(void 0,N[K--])));for(;Y>=0;--Y)b(N[Y],k[Y],I,O,U,Y,D,H)}else{var ae=Object.keys(N),oe=Object.keys(k);for(Y=0;Y<ae.length;++Y)Q=ae[Y],re=oe.indexOf(Q),re>=0?(b(N[Q],k[Q],I,O,U,Q,D,H),oe[re]=null):b(N[Q],void 0,I,O,U,Q,D,H);for(Y=0;Y<oe.length;++Y)Q=oe[Y],Q&&b(void 0,k[Q],I,O,U,Q,D,H)}D.length=D.length-1}}else N!==k&&(G==="number"&&isNaN(N)&&isNaN(k)||I.push(new s(U,N,k)))}function y(N,k,I,O,L){var q=[];if(b(N,k,q,O,null,null,null,L),I)for(var D=0;D<q.length;++D)I(q[D]);return q}function g(N,k,I,O,L,q,D){return b(N,k,I,O,L,q,D,!0)}function x(N,k,I,O){var L=O?function(D){D&&O.push(D)}:void 0,q=y(N,k,L,I);return O||(q.length?q:void 0)}function v(N,k,I,O){var L=O?function(D){D&&O.push(D)}:void 0,q=y(N,k,L,I,!0);return O||(q.length?q:void 0)}function S(N,k,I){if(I.path&&I.path.length){var O=N[k],L,q=I.path.length-1;for(L=0;L<q;L++)O=O[I.path[L]];switch(I.kind){case"A":S(O[I.path[L]],I.index,I.item);break;case"D":delete O[I.path[L]];break;case"E":case"N":O[I.path[L]]=I.rhs;break}}else switch(I.kind){case"A":S(N[k],I.index,I.item);break;case"D":N=d(N,k);break;case"E":case"N":N[k]=I.rhs;break}return N}function E(N,k,I){if(typeof I=="undefined"&&k&&~r.indexOf(k.kind)&&(I=k),N&&I&&I.kind){for(var O=N,L=-1,q=I.path?I.path.length-1:0;++L<q;)typeof O[I.path[L]]=="undefined"&&(O[I.path[L]]=typeof I.path[L+1]!="undefined"&&typeof I.path[L+1]=="number"?[]:{}),O=O[I.path[L]];switch(I.kind){case"A":I.path&&typeof O[I.path[L]]=="undefined"&&(O[I.path[L]]=[]),S(I.path?O[I.path[L]]:O,I.index,I.item);break;case"D":delete O[I.path[L]];break;case"E":case"N":O[I.path[L]]=I.rhs;break}}}function R(N,k,I){if(I.path&&I.path.length){var O=N[k],L,q=I.path.length-1;for(L=0;L<q;L++)O=O[I.path[L]];switch(I.kind){case"A":R(O[I.path[L]],I.index,I.item);break;case"D":O[I.path[L]]=I.lhs;break;case"E":O[I.path[L]]=I.lhs;break;case"N":delete O[I.path[L]];break}}else switch(I.kind){case"A":R(N[k],I.index,I.item);break;case"D":N[k]=I.lhs;break;case"E":N[k]=I.lhs;break;case"N":N=d(N,k);break}return N}function A(N,k,I){if(N&&k&&I&&I.kind){var O=N,L,q;for(q=I.path.length-1,L=0;L<q;L++)typeof O[I.path[L]]=="undefined"&&(O[I.path[L]]={}),O=O[I.path[L]];switch(I.kind){case"A":R(O[I.path[L]],I.index,I.item);break;case"D":O[I.path[L]]=I.lhs;break;case"E":O[I.path[L]]=I.lhs;break;case"N":delete O[I.path[L]];break}}}function _(N,k,I){if(N&&k){var O=function(L){(!I||I(N,k,L))&&E(N,k,L)};y(N,k,O)}}return Object.defineProperties(x,{diff:{value:x,enumerable:!0},orderIndependentDiff:{value:v,enumerable:!0},observableDiff:{value:y,enumerable:!0},orderIndependentObservableDiff:{value:g,enumerable:!0},orderIndepHash:{value:m,enumerable:!0},applyDiff:{value:_,enumerable:!0},applyChange:{value:E,enumerable:!0},revertChange:{value:A,enumerable:!0},isConflict:{value:function(){return typeof $conflict!="undefined"},enumerable:!0}}),x.DeepDiff=x,n&&(n.DeepDiff=x),x})})(dO);const l0e={A:" ",E:" ",D:"-",N:"+"},c0e=({entry:e})=>{const t=zs(),n={A:{color:t.palette.code.edited},E:{color:t.palette.code.edited},D:{color:t.palette.code.diffSub},N:{color:t.palette.code.diffAdd}},r=e.data&&e.preData?dO.exports.diff(e.preData,e.data):void 0,o=(l,c)=>{let u;return l.lhs!==void 0?u=w("div",{style:n.D,children:["- ",c,": ",JSON.stringify(l.lhs)]}):l.rhs!==void 0&&(u=w("div",{style:n.N,children:["+ ",c,": ",JSON.stringify(l.rhs)]})),u},a=(l,c)=>{let u;const d=l.path.join(".");return l.item?u=o(l.item,d):l.lhs!==void 0&&l.rhs!==void 0?u=w("div",{children:[w("div",{style:n.D,children:["- ",d,": ",JSON.stringify(l.lhs)]}),w("div",{style:n.N,children:["+ ",d,": ",JSON.stringify(l.rhs)]})]}):u=w("div",{style:n[l.kind],children:[l0e[l.kind]," ",d,":"," ",JSON.stringify(l.rhs||l.item)]}),i("div",{children:u},c)};let s;if(r)s=r.map(a);else{const l=e.data||e.preData;s=[i("div",{style:e.data?n.N:n.D,children:JSON.stringify(l,null,2)})]}return i("pre",{style:{overflowX:"auto",overflowY:"hidden"},tabIndex:0,children:i("code",{children:s.length===0?"(no changes)":s})})},Sc=z("dt")(({theme:e})=>({color:e.palette.text.secondary})),u0e=z("strong")(({theme:e})=>({fontWeight:"inherit",color:e.palette.text.secondary})),d0e=z("li")(({theme:e})=>({display:"grid",backgroundColor:e.palette.neutral.light,borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(.5),[e.breakpoints.up("md")]:{gridTemplateColumns:"auto minmax(0, 1fr)"},"& dl":{display:"grid",gridTemplateColumns:"auto 1fr",alignContent:"start",gap:e.spacing(1),padding:e.spacing(2),[e.breakpoints.up("md")]:{padding:e.spacing(4)}}})),p0e=z("div")(({theme:e})=>({backgroundColor:"white",overflowX:"auto",padding:e.spacing(2),borderBottomLeftRadius:e.shape.borderRadiusLarge,borderBottomRightRadius:e.shape.borderRadiusLarge,[e.breakpoints.up("md")]:{padding:e.spacing(4),borderRadius:0,borderTopRightRadius:e.shape.borderRadiusLarge,borderBottomRightRadius:e.shape.borderRadiusLarge},"& code":{wordWrap:"break-word",whiteSpace:"pre-wrap",fontFamily:"monospace",lineHeight:1.5,fontSize:e.fontSizes.smallBody}})),f0e=({entry:e})=>{const{locationSettings:t}=vi(),n=qS(e.createdAt,t.locale);return w(d0e,{children:[w("dl",{children:[i(Sc,{children:"Event id:"}),i("dd",{children:e.id}),i(Sc,{children:"Changed at:"}),i("dd",{children:n}),i(Sc,{children:"Event:"}),i("dd",{children:e.type}),i(Sc,{children:"Changed by:"}),i("dd",{title:e.createdBy,children:e.createdBy}),i(F,{condition:Boolean(e.project),show:w(Ne,{children:[i(Sc,{children:"Project:"}),i("dd",{children:i(Ct,{to:`/projects/${e.project}`,children:e.project})})]})}),i(F,{condition:Boolean(e.featureName),show:w(Ne,{children:[i(Sc,{children:"Feature:"}),i("dd",{children:i(Ct,{to:`/projects/${e.project}/features/${e.featureName}`,children:e.featureName})})]})})]}),i(F,{condition:e.data||e.preData,show:w(p0e,{children:[i(u0e,{children:"Changes:"}),i(c0e,{entry:e})]})})]})},h0e=()=>{const[e,t]=g0e();return{eventSettings:e,setEventSettings:t}},m0e=()=>({showData:!1}),g0e=OS(`${Xi}:useEventSettings:v1`,m0e()),C_=bt("api/admin/events/search"),v0e=(e,t,n)=>{const[r,o]=f.exports.useState(),[a,s]=f.exports.useState(0),l=f.exports.useMemo(()=>({project:e,feature:t,query:n,limit:50}),[e,t,n]),{data:c,error:u,isValidating:d}=Wt([C_,l,a],()=>y0e(C_,ee(V({},l),{offset:a})));f.exports.useEffect(()=>{s(0),o(void 0)},[l]),f.exports.useEffect(()=>{c&&o(h=>[...h!=null?h:[],...c.events])},[c]);const p=f.exports.useCallback(()=>{r&&!d&&s(r.length)},[r,d]);return{events:r,loading:!u&&!c,fetchNextPage:p,error:u}},y0e=(e,t)=>fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(rn("Event history")).then(n=>n.json()),b0e=e=>{const t=f.exports.useRef(null);return f.exports.useEffect(()=>{if(t.current){const n=o=>{o[0].isIntersecting&&e()},r=new IntersectionObserver(n);return r.observe(t.current),()=>r.disconnect()}},[e]),t},x0e=ao("ul")(({theme:e})=>({listStyleType:"none",margin:0,padding:0,display:"grid",gap:e.spacing(2)})),pO=({title:e,project:t,feature:n,displayInline:r})=>{const[o,a]=f.exports.useState(""),{events:s,fetchNextPage:l}=v0e(t,n,o),c=b0e(l),{eventSettings:u,setEventSettings:d}=h0e(),p=an(oo.breakpoints.down("md")),[h,m]=f.exports.useState();f.exports.useEffect(()=>s&&m(s),[s]);const b=()=>{d(x=>({showData:!x.showData}))},y=i(jn,{onChange:a,debounceTime:500}),g=i($n,{label:"Full events",control:i(ro,{checked:u.showData,onChange:b,color:"primary"})});return w(Gt,{disablePadding:r,disableBorder:r,header:i(Dt,{title:e,actions:w(Ne,{children:[g,!p&&y]}),children:p&&y}),children:[r&&i(mt,{sx:{mt:4}}),i(F,{condition:Boolean(h&&h.length===0),show:()=>i("p",{children:"No events found."})}),i(F,{condition:Boolean(h&&h.length>0),show:()=>i(x0e,{children:h==null?void 0:h.map(x=>i(F,{condition:u.showData,show:()=>i(s0e,{entry:x}),elseShow:()=>i(f0e,{entry:x})},x.id))})}),i("div",{ref:c})]})},w0e=()=>{const e=Ve("projectId"),t=Ve("featureId"),{classes:n}=a0e(),{feature:r}=vr(e,t);return r.name?i("div",{className:n.container,children:i(pO,{title:"Event log",project:e,feature:t,displayInline:!0})}):null},S0e=le()(e=>({container:{borderRadius:e.shape.borderRadiusLarge,color:"#fff",backgroundColor:e.palette.featureMetaData,display:"flex",flexDirection:"column",maxWidth:"350px",minWidth:"350px",marginRight:"1rem",[e.breakpoints.down(1e3)]:{width:"100%",maxWidth:"none",minWidth:"auto"}},paddingContainerTop:{padding:"1.5rem 1.5rem 0 1.5rem"},paddingContainerBottom:{padding:"0 1.5rem 1.5rem 1.5rem",borderTop:`1px solid ${e.palette.grey[300]}`},metaDataHeader:{display:"flex",alignItems:"center"},header:{fontSize:e.fontSizes.bodySize,fontWeight:"normal",margin:0},body:{margin:"1rem 0",display:"flex",flexDirection:"column"},bodyItem:{margin:"0.5rem 0",fontSize:e.fontSizes.bodySize,wordBreak:"break-all"},headerIcon:{marginRight:"1rem",height:"40px",width:"40px",fill:"#fff"},descriptionContainer:{display:"flex",alignItems:"center",color:"#fff"},editIcon:{color:"#fff"}})),c2=(e,t={})=>{const n=async()=>{const u=bt(`api/admin/features/${e}/tags`);return(await fetch(u,{method:"GET"}).then(rn("Tags"))).json()},r=`api/admin/features/${e}/tags`,{data:o,error:a}=Wt(r,n,t),[s,l]=f.exports.useState(!a&&!o),c=()=>{Fn(r)};return f.exports.useEffect(()=>{l(!a&&!o)},[o,a]),{tags:(o==null?void 0:o.tags)||[],error:a,loading:s,refetch:c}},C0e=le()(e=>({container:{borderRadius:e.shape.borderRadiusLarge,backgroundColor:e.palette.primary.main,display:"flex",flexDirection:"column",marginRight:"1rem",marginTop:"1rem",[e.breakpoints.down(800)]:{width:"100%",maxWidth:"none"}},tagHeader:{display:"flex",alignItems:"center"},tag:{height:"40px",width:"40px",fill:e.palette.primary.main,marginRight:"0.8rem"},tagChip:{marginRight:"0.25rem",marginTop:"0.5rem",backgroundColor:"#fff",fontSize:e.fontSizes.smallBody},closeIcon:{color:e.palette.primary.light,"&:hover":{color:e.palette.primary.light}}})),E0e=n=>{var r=n,{projectId:e}=r,t=en(r,["projectId"]);const[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState({value:"",type:""}),{classes:c}=C0e(),u=Ve("featureId"),{tags:d,refetch:p}=c2(u),{tagTypes:h}=pC(),{deleteTagFromFeature:m}=xo(),{setToastData:b,setToastApiError:y}=tt(),{hasAccess:g}=f.exports.useContext(Jt),x=g(Hi,e),v=async()=>{try{await m(u,s.type,s.value),p(),b({type:"success",title:"Tag deleted",text:"Successfully deleted tag"})}catch(R){y(Ue(R))}},S=R=>{let A=h.find(N=>N.name===R);const _={width:"20px",height:"20px",marginRight:"5px"};if(A&&A.icon)switch(A.name){case"slack":return i("img",{style:_,alt:"Slack",src:Xa(R3)});case"jira":return i("img",{style:_,alt:"JIRA",src:Xa(k3)});case"webhook":return i("img",{style:_,alt:"Webhook",src:Xa(_3)});default:return i(RS,{})}else return i("span",{children:R[0].toUpperCase()})},E=R=>i(jr,{icon:S(R.type),className:c.tagChip,"data-loading":!0,label:R.value,deleteIcon:i(ES,{className:c.closeIcon,titleAccess:"Remove"}),onDelete:x?()=>{a(!0),l({type:R.type,value:R.value})}:void 0},`${R.type}:${R.value}`);return w("div",ee(V({className:c.container},t),{children:[i(ln,{open:o,onClose:()=>{a(!1),l({type:"",value:""})},onClick:()=>{a(!1),v(),l({type:"",value:""})},title:"Are you sure you want to delete this tag?"}),i("div",{children:i(F,{condition:d.length>0,show:d.map(E),elseShow:i("p",{"data-loading":!0,children:"No tags to display"})})})]}))},T0e=()=>{const{classes:e}=S0e(),t=Ve("projectId"),n=Ve("featureId"),{tags:r}=c2(n),{feature:o}=vr(t,n),{project:a,description:s,type:l}=o,c=u3(l);return w("div",{className:it(e.container),children:[w("div",{className:e.paddingContainerTop,children:[w("div",{className:e.metaDataHeader,"data-loading":!0,children:[i(c,{className:e.headerIcon})," ",w("h2",{className:e.header,children:[se(l||"")," toggle"]})]}),w("div",{className:e.body,children:[w("span",{className:e.bodyItem,"data-loading":!0,children:["Project: ",a]}),i(F,{condition:Boolean(s),show:w("span",{className:e.bodyItem,"data-loading":!0,children:[i("div",{children:"Description:"}),w("div",{className:e.descriptionContainer,children:[i("p",{children:s}),i(Ft,{projectId:t,permission:Hi,component:Ct,to:`/projects/${t}/features/${n}/settings`,tooltipProps:{title:"Edit description"},children:i(ar,{className:e.editIcon})})]})]}),elseShow:i("span",{"data-loading":!0,children:w("div",{className:e.descriptionContainer,children:["No description."," ",i(Ft,{projectId:t,permission:Hi,component:Ct,to:`/projects/${t}/features/${n}/settings`,tooltipProps:{title:"Edit description"},children:i(ar,{className:e.editIcon})})]})})})]})]}),i(F,{condition:r.length>0,show:i("div",{className:e.paddingContainerBottom,children:i(E0e,{projectId:t})})})]})},R0e=le()(e=>({container:{display:"flex",width:"100%",[e.breakpoints.down(1e3)]:{flexDirection:"column"}},mainContent:{display:"flex",flexDirection:"column",width:"calc(100% - (350px + 1rem))",[e.breakpoints.down(1e3)]:{width:"100%"}},trafficContainer:{display:"flex",flexWrap:"wrap",[e.breakpoints.down(1e3)]:{marginTop:"1rem"}}})),E_={lastHourUsage:[],seenApplications:[]},k0e=(e,t,n={})=>{const r=async()=>{const d=bt(`api/admin/client-metrics/features/${t}`),p=await fetch(d,{method:"GET"}).then(rn("feature metrics"));return p.ok?p.json():E_},o=`${e}_${t}_metrics`,{data:a,error:s}=Wt(o,r,V({},n)),[l,c]=f.exports.useState(!s&&!a),u=()=>{Fn(o)};return f.exports.useEffect(()=>{c(!s&&!a)},[a,s]),{metrics:a||E_,error:s,loading:l,refetch:u,FEATURE_METRICS_CACHE_KEY:o}},_0e=e=>({yes:0,no:0,environment:e,timestamp:""}),I0e=(e,t)=>e.map(n=>t.lastHourUsage.find(o=>o.environment===n.name)||_0e(n.name)),A0e=({enabled:e,className:t})=>{const n=pn(),r=e?"Environment enabled":"Environment disabled",o={backgroundColor:e?n.palette.primary.light:n.palette.neutral.border,borderRadius:"50%",width:"28px",height:"28px",minWidth:"28px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:n.spacing(1)};return i("div",{style:o,className:t,children:i(xte,{style:{fill:"#fff",width:"16px",height:"16px"},titleAccess:r})})},N0e=le()(e=>({featureOverviewEnvironment:{borderRadius:e.shape.borderRadiusLarge,marginBottom:e.spacing(2),padding:"0.2rem",backgroundColor:e.palette.background.paper},accordion:{boxShadow:"none",background:"none"},accordionHeader:{boxShadow:"none",padding:"1rem 2rem",[e.breakpoints.down(400)]:{padding:"0.5rem 1rem"}},accordionBodyInnerContainer:{[e.breakpoints.down(400)]:{padding:"0.5rem"}},accordionDetails:{padding:e.spacing(3),background:e.palette.secondaryContainer,borderBottomLeftRadius:e.shape.borderRadiusLarge,borderBottomRightRadius:e.shape.borderRadiusLarge,borderBottom:`4px solid ${e.palette.primary.light}`,[e.breakpoints.down("md")]:{padding:e.spacing(2,1)}},accordionDetailsDisabled:{borderBottom:`4px solid ${e.palette.neutral.border}`},accordionBody:{width:"100%",position:"relative",paddingBottom:e.spacing(2)},header:{display:"flex",justifyContent:"center",flexDirection:"column"},headerTitle:{display:"flex",alignItems:"center",[e.breakpoints.down(560)]:{flexDirection:"column",textAlign:"center"}},headerIcon:{[e.breakpoints.down(560)]:{marginBottom:"0.5rem"}},iconContainer:{backgroundColor:e.palette.primary.light,borderRadius:"50%",width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"0.5rem"},icon:{fill:"#fff",width:"17px",height:"17px"},linkContainer:{display:"flex",justifyContent:"flex-end",marginBottom:"1rem"},truncator:{fontSize:e.fontSizes.bodySize,fontWeight:e.typography.fontWeightMedium,[e.breakpoints.down(560)]:{textAlign:"center"}},container:{display:"flex",alignItems:"center",marginLeft:"1.8rem",[e.breakpoints.down(560)]:{flexDirection:"column",marginLeft:"0"}}})),$0e=({projectId:e,featureId:t,environmentId:n,strategyId:r,disabled:o,icon:a})=>{const[s,l]=f.exports.useState(!1),{deleteStrategyFromFeature:c}=Mu(),{refetchFeature:u}=vr(e,t),{setToastData:d,setToastApiError:p}=tt(),h=Ye(),m=async b=>{try{b.preventDefault(),await c(e,t,n,r),d({title:"Strategy deleted",type:"success"}),u(),h(Bu(e,t))}catch(y){p(Ue(y))}};return w(Ne,{children:[i(F,{condition:Boolean(a),show:i(Ft,{onClick:()=>l(!0),projectId:e,environmentId:n,disabled:o,permission:Ok,"data-testid":Rk,tooltipProps:{title:"Remove strategy"},type:"button",children:i(er,{})}),elseShow:i(Mr,{onClick:()=>l(!0),projectId:e,environmentId:n,disabled:o,permission:Ok,"data-testid":Rk,color:"secondary",variant:"text",type:"button",children:"Remove strategy"})}),i(ln,{title:"Are you sure you want to delete this strategy?",open:s,primaryButtonText:"Remove strategy",secondaryButtonText:"Cancel",onClick:m,onClose:()=>l(!1),children:i(yt,{severity:"error",children:"Removing the strategy will change which users receive access to the feature."})})]})},P0e=le()(e=>({container:{width:"100%",padding:e.spacing(2,3),borderRadius:e.shape.borderRadiusMedium,border:`1px solid ${e.palette.divider}`},chip:{margin:"0.25rem"},paragraph:{display:"inline",margin:"0.25rem 0",maxWidth:"95%",textAlign:"center",wordBreak:"break-word"}})),p1=({value:e,text:t})=>{const{classes:n}=P0e();return i("div",{className:n.container,children:i(F,{condition:e.length===0,show:w("p",{children:["No ",t,"s added yet."]}),elseShow:w("div",{children:[w("p",{className:n.paragraph,children:[e.length," ",e.length>1?`${t}s`:t," will get access."]}),e.map(r=>i(jr,{label:i(Tr,{maxWidth:"300",text:r,maxLength:50}),className:n.chip},r))]})})})},O0e=({strategyId:e})=>{const{segments:t}=Gs(e);return!t||t.length===0?null:i(Ne,{children:t.map((n,r)=>w(f.exports.Fragment,{children:[i(F,{condition:r>0,show:i(hy,{text:"AND"})}),i(JP,{segment:n})]},n.id))})},D0e=le()(e=>({valueContainer:{padding:e.spacing(2,3),border:`1px solid ${e.palette.dividerAlternative}`,borderRadius:e.shape.borderRadiusMedium},valueSeparator:{color:e.palette.grey[700]}})),T_=()=>i(mt,{sx:{px:3,color:"text.disabled"},children:"This strategy does not have constraints or parameters."}),L0e=({strategy:e})=>{const{parameters:t,constraints:n=[]}=e,{classes:r}=D0e(),{strategies:o}=ec(),{uiConfig:a}=st(),{segments:s}=Gs(e.id),l=o.find(p=>p.name===e.name),c=f.exports.useMemo(()=>!t||(l==null?void 0:l.editable)?null:Object.keys(t).map(p=>{switch(p){case"rollout":case"Rollout":const h=ip(t[p]);return w(mt,{className:r.valueContainer,sx:{display:"flex",alignItems:"center"},children:[i(mt,{sx:{mr:2},children:i(cg,{percentage:h,size:"2rem"})}),w("div",{children:[i(jr,{color:"success",variant:"outlined",size:"small",label:`${h}%`})," ","of your base"," ",n.length>0?"who match constraints":""," ","is included."]})]});case"userIds":case"UserIds":const m=Cl(t[p]);return i(p1,{value:m,text:"user"},p);case"hostNames":case"HostNames":const b=Cl(t[p]);return i(p1,{value:b,text:"host"},p);case"IPs":const y=Cl(t[p]);return i(p1,{value:y,text:"IP"},p);case"stickiness":case"groupId":return null;default:return null}}),[t,l,n,r]),u=f.exports.useMemo(()=>{if(!t||!(l!=null&&l.editable))return null;const p=i("span",{className:r.valueSeparator,children:" is set to "});return l==null?void 0:l.parameters.map(h=>{const{type:m,name:b}=V({},h);if(!m||!b||t[b]===void 0)return null;const y=i(Tr,{maxLength:15,maxWidth:"150",text:b});switch(h==null?void 0:h.type){case"list":const g=Cl(t[b]);return g.length>0?w("div",{className:r.valueContainer,children:[y," ",w("span",{className:r.valueSeparator,children:["has ",g.length," ",g.length>1?"items":"item",":"," ",g.map(E=>i(jr,{label:i(Tr,{maxWidth:"300",text:E,maxLength:50}),sx:{mr:.5}},E))]})]}):null;case"percentage":const x=ip(t[b]);return t[b]!==""?w(mt,{className:r.valueContainer,sx:{display:"flex",alignItems:"center"},children:[i(mt,{sx:{mr:2},children:i(cg,{percentage:x,size:"2rem"})}),w("div",{children:[y,p,i(jr,{color:"success",variant:"outlined",size:"small",label:`${x}%`})]})]}):null;case"boolean":return t[b]==="true"||t[b]==="false"?w("div",{className:r.valueContainer,children:[i(Tr,{maxLength:15,maxWidth:"150",text:b}),p,i(jr,{color:t[b]==="true"?"success":"error",variant:"outlined",size:"small",label:t[b]})]}):null;case"string":const v=jl(t[b]);return typeof t[b]!="undefined"?w("div",{className:r.valueContainer,children:[y,i(F,{condition:v==="",show:i("span",{className:r.valueSeparator,children:" is an empty string"}),elseShow:w(Ne,{children:[p,i(Tr,{maxWidth:"300",text:v,maxLength:50})]})})]}):null;case"number":const S=ip(t[b]);return t[b]!==""&&S!==void 0?w("div",{className:r.valueContainer,children:[y,p,i(Tr,{maxWidth:"300",text:String(S),maxLength:50})]}):null;case"default":return null}return null})},[t,l,r]);if(!t)return i(T_,{});const d=[Boolean(a.flags.SE)&&s&&s.length>0&&i(O0e,{strategyId:e.id}),n.length>0&&i(my,{constraints:n,showLabel:!1}),e.name==="default"&&i(Ne,{children:w(mt,{sx:{width:"100%"},className:r.valueContainer,children:["The standard strategy is"," ",i(jr,{variant:"outlined",size:"small",color:"success",label:"ON"})," ","for all users."]})}),...c!=null?c:[],...u!=null?u:[]].filter(Boolean);return i(F,{condition:d.length>0,show:i(Ne,{children:d.map((p,h)=>w(f.exports.Fragment,{children:[i(F,{condition:h>0,show:i(hy,{text:"AND"})}),p]},h))}),elseShow:i(T_,{})})},M0e=({environments:e,strategy:t})=>{const n=Ve("projectId"),r=Ve("featureId"),[o,a]=f.exports.useState(null),s=Boolean(o),{addStrategyToFeature:l}=Mu(),{setToastData:c,setToastApiError:u}=tt(),{refetchFeature:d}=vr(n,r),{refetchFeature:p}=oy(n,r),h=()=>{a(null)},{hasAccess:m}=f.exports.useContext(Jt),b=async g=>{const S=ee(V({},t),{environment:g}),{id:x}=S,v=en(S,["id"]);try{await l(n,r,g,v),d(),p(),c({title:"Strategy created",text:`Successfully copied a strategy to ${g}`,type:"success"})}catch(E){u(Ue(E))}h()},y=e.some(g=>m(Vi,n,g));return w("div",{children:[i(wt,{title:`Copy to another environment${y?"":" (Access denied)"}`,children:i("div",{children:i(Ht,{size:"large",id:`copy-strategy-icon-menu-${t.id}`,"aria-controls":s?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,onClick:g=>{a(g.currentTarget)},disabled:!y,children:i(pte,{})})})}),i(bf,{id:"basic-menu",anchorEl:o,open:s,onClose:h,MenuListProps:{"aria-labelledby":`copy-strategy-icon-menu-${t.id}`},children:e.map(g=>{const x=m(Vi,n,g);return i(wt,{title:x?"":"You don't have access to add a strategy to this environment",children:i("div",{children:w(_r,{onClick:()=>b(g),disabled:!x,children:[i(F,{condition:!x,show:i(Mi,{children:i($v,{fontSize:"small"})})}),w(dn,{children:["Copy to ",g]})]})})},g)})})]})},B0e=le()(e=>({container:{borderRadius:e.shape.borderRadiusMedium,border:`1px solid ${e.palette.divider}`,"& + &":{marginTop:e.spacing(2)},background:e.palette.background.paper},header:{padding:e.spacing(.5,2),display:"flex",gap:e.spacing(1),alignItems:"center",borderBottom:`1px solid ${e.palette.divider}`,fontWeight:e.typography.fontWeightMedium},headerDraggable:{paddingLeft:e.spacing(1)},icon:{fill:e.palette.inactiveIcon},actions:{marginLeft:"auto",display:"flex",minHeight:e.spacing(6),alignItems:"center"},resultChip:{marginLeft:"auto"},body:{padding:e.spacing(2),justifyItems:"center"}})),F0e=z(Ht)(({theme:e})=>({padding:0,cursor:"inherit",transition:"color 0.2s ease-in-out"})),z0e=z("div")(({theme:e})=>({fontSize:e.typography.fontSize,color:e.palette.text.secondary,position:"absolute",display:"none",right:"calc(100% + 6px)",top:e.spacing(2.5),[e.breakpoints.up("md")]:{display:"block"}})),j0e=({strategy:e,onDragStart:t,onDragEnd:n,actions:r,children:o,orderNumber:a,className:s})=>{const{classes:l}=B0e(),c=zp(e.name);return w(mt,{sx:{position:"relative"},children:[i(F,{condition:a!==void 0,show:i(z0e,{children:a})}),w(mt,{className:it(l.container,s),children:[w("div",{className:it(l.header,{[l.headerDraggable]:Boolean(t)}),children:[i(F,{condition:Boolean(t),show:()=>i(F0e,{draggable:!0,disableRipple:!0,size:"small",onDragStart:t,onDragEnd:n,sx:{cursor:"move"},children:i(b$,{titleAccess:"Drag to reorder",cursor:"grab",sx:{color:"neutral.main"}})})}),i(c,{className:l.icon}),i(Tr,{maxWidth:"150",maxLength:15,text:tc(e.name)}),i("div",{className:l.actions,children:r})]}),i("div",{className:l.body,children:o})]})]})},U0e=({environmentId:e,strategy:t,onDragStart:n,onDragEnd:r,otherEnvironments:o,orderNumber:a})=>{const s=Ve("projectId"),l=Ve("featureId"),c=mP(s,l,e,t.id);return i(j0e,{strategy:t,onDragStart:n,onDragEnd:r,orderNumber:a,actions:w(Ne,{children:[i(F,{condition:Boolean(o&&(o==null?void 0:o.length)>0),show:()=>i(M0e,{environments:o,strategy:t})}),i(Ft,{permission:jS,environmentId:e,projectId:s,component:Ct,to:c,tooltipProps:{title:"Edit strategy"},children:i(ar,{})}),i($0e,{projectId:s,featureId:l,environmentId:e,strategyId:t.id,icon:!0})]}),children:i(L0e,{strategy:t})})},W0e=({strategy:e,index:t,environmentName:n,otherEnvironments:r,isDragging:o,onDragStartRef:a,onDragOver:s,onDragEnd:l})=>{const c=f.exports.useRef(null);return w(mt,{ref:c,onDragOver:s(c,t),sx:{opacity:o?"0.5":"1"},children:[i(F,{condition:t>0,show:i(hy,{text:"OR"})}),i(U0e,{strategy:e,environmentId:n,otherEnvironments:r,onDragStart:a(c,t),onDragEnd:l,orderNumber:t+1})]},e.id)},H0e=z("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",margin:"1rem 0",position:"relative","&:before":{content:'""',position:"absolute",top:"50%",transform:"translateY(-50%)",height:2,width:"100%",backgroundColor:e.palette.dividerAlternative}})),V0e=z("span")(({theme:e})=>({fontSize:e.fontSizes.bodySize,textAlign:"center",padding:"0 1rem",background:e.palette.secondaryContainer,position:"relative",maxWidth:"80%",color:e.palette.text.primary})),fO=({children:e})=>i(H0e,{children:i(V0e,{children:e})}),G0e=le()(e=>({card:{display:"grid",gridTemplateColumns:"3rem 1fr",width:"20rem",padding:"1rem",color:"inherit",textDecoration:"inherit",lineHeight:1.25,borderWidth:1,borderStyle:"solid",borderColor:e.palette.grey[400],borderRadius:e.spacing(1),"&:hover, &:focus":{borderColor:e.palette.primary.main}},icon:{width:"2rem",height:"auto","& > svg":{fill:e.palette.primary.main},"& > div":{height:"1rem",marginLeft:"-.75rem",color:e.palette.primary.main}},name:{fontWeight:e.fontWeight.bold},description:{fontSize:e.fontSizes.smallBody}})),q0e=({projectId:e,featureId:t,environmentId:n,strategy:r})=>{const{classes:o}=G0e(),a=zp(r.name),s=tc(r.name),l=tO(e,t,n,r.name);return w(Ct,{to:l,className:o.card,children:[i("div",{className:o.icon,children:i(a,{})}),w("div",{children:[i(Tr,{text:r.displayName||s,className:o.name,maxWidth:"200",maxLength:25}),i("div",{className:o.description,children:r.description})]})]})},Y0e=({projectId:e,featureId:t,environmentId:n})=>{const{strategies:r}=ec(),o=f.exports.useMemo(()=>r.filter(a=>!a.deprecated),[r]);return i(Po,{dense:!0,children:o.map(a=>i(Rn,{children:i(q0e,{projectId:e,featureId:t,environmentId:n,strategy:a})},a.name))})},ex=({label:e,projectId:t,featureId:n,environmentId:r,variant:o})=>{const[a,s]=f.exports.useState(),l=Boolean(a),c=l?"FeatureStrategyMenuPopover":void 0,u=()=>{s(void 0)};return w("div",{onClick:p=>p.stopPropagation(),children:[i(Mr,{permission:Vi,projectId:t,environmentId:r,onClick:p=>{s(p.currentTarget)},"aria-labelledby":c,variant:o,children:e}),i(Xl,{id:c,open:l,anchorEl:a,onClose:u,onClick:u,children:i(Y0e,{projectId:t,featureId:n,environmentId:r})})]})},K0e=z(d4)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:e.shape.borderRadiusMedium})),R_=({title:e,children:t,Icon:n,projectId:r,environmentId:o,onClick:a})=>i(K0e,{variant:"outlined",children:w(DV,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[w(Te,{variant:"body1",fontWeight:"medium",sx:{mb:.5,display:"flex",alignItems:"center"},children:[i(n,{color:"disabled",sx:{mr:1}})," ",e]}),i(Te,{variant:"body2",color:"text.secondary",component:"p",children:t}),i(mt,{sx:{ml:"auto",mt:"auto",pt:1,mr:{xs:"auto",sm:0}},children:i(Mr,{permission:Vi,projectId:r,environmentId:o,variant:"outlined",size:"small",onClick:a,children:"Use template"})})]})}),X0e=le()(e=>({container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",paddingTop:e.spacing(2)},title:{fontSize:e.fontSizes.bodySize,textAlign:"center",color:e.palette.text.primary,marginBottom:e.spacing(1)},description:{color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody,textAlign:"center",marginBottom:e.spacing(3)}})),J0e=({environmentId:e,environments:t,onClick:n})=>{const r=Ve("projectId"),[o,a]=f.exports.useState(null),s=Boolean(o),{hasAccess:l}=f.exports.useContext(Jt),c=t.some(u=>l(Vi,r,u));return w("div",{children:[i(wt,{title:c?"":"(Access denied)",children:i("div",{children:i(nt,{id:`copy-all-strategies-${e}`,"aria-controls":s?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,onClick:u=>{a(u.currentTarget)},disabled:!c,variant:"outlined",children:"Copy from another environment"})})}),i(bf,{id:"basic-menu",anchorEl:o,open:s,onClose:()=>{a(null)},MenuListProps:{"aria-labelledby":`copy-all-strategies-${e}`},children:t.map(u=>{const d=l(Vi,r,u);return i(wt,{title:d?"":"You don't have access to add a strategy to this environment",children:i("div",{children:w(_r,{onClick:()=>n(u),disabled:!d,children:[i(F,{condition:!d,show:i(Mi,{children:i($v,{fontSize:"small"})})}),w(dn,{children:["Copy from ",u]})]})})},u)})})]})},Q0e=({projectId:e,featureId:t,environmentId:n})=>{const{classes:r}=X0e(),{addStrategyToFeature:o}=Mu(),{setToastData:a,setToastApiError:s}=tt(),{refetchFeature:l}=vr(e,t),{refetchFeature:c}=oy(e,t),{feature:u}=vr(e,t),d=u==null?void 0:u.environments.filter(y=>y.name!==n&&y.strategies&&y.strategies.length>0),p=(y=!1)=>{l(),c(),a({title:y?"Strategies created":"Strategy created",text:y?"Successfully copied from another environment":"Successfully created strategy",type:"success"})},h=async y=>{var x;const g=((x=d==null?void 0:d.find(v=>v.name===y))==null?void 0:x.strategies)||[];try{await Promise.all(g.map(v=>{const R=ee(V({},v),{environment:n}),{id:S}=R,E=en(R,["id"]);return o(e,t,n,E)})),p(!0)}catch(v){s(Ue(v))}},m=async()=>{try{await o(e,t,n,{name:"default",parameters:{},constraints:[]}),p()}catch(y){s(Ue(y))}},b=async()=>{try{await o(e,t,n,{name:"flexibleRollout",parameters:{rollout:"50",stickiness:"default"},constraints:[]}),p()}catch(y){s(Ue(y))}};return w("div",{className:r.container,children:[i("div",{className:r.title,children:"You have not defined any strategies yet."}),w("p",{className:r.description,children:["Strategies added in this environment will only be executed if the SDK is using an"," ",i(Ct,{to:"/admin/api",children:"API key configured"})," for this environment."]}),w(mt,{sx:{w:"100%",display:"flex",flexWrap:"wrap",gap:2,alignItems:"center",justifyContent:"center"},children:[i(ex,{label:"Add your first strategy",projectId:e,featureId:t,environmentId:n}),i(F,{condition:d&&d.length>0,show:i(J0e,{environmentId:n,environments:d.map(y=>y.name),onClick:h})})]}),i(mt,{sx:{width:"100%",mt:3},children:i(fO,{children:"Or use a strategy template"})}),w(mt,{sx:{display:"grid",width:"100%",gap:2,gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"}},children:[i(R_,{title:"Standard strategy",Icon:zp("default"),onClick:m,projectId:e,environmentId:n,children:"The standard strategy is strictly on/off for your entire userbase."}),i(R_,{title:"Gradual rollout",Icon:zp("flexibleRollout"),onClick:b,projectId:e,environmentId:n,children:"Roll out to a percentage of your userbase."})]})]})},Z0e=le()(e=>({accordionBodyInnerContainer:{[e.breakpoints.down(400)]:{padding:"0.5rem"}},accordionBody:{width:"100%",position:"relative",paddingBottom:"1rem"}})),e1e=({featureEnvironment:e,isDisabled:t,otherEnvironments:n})=>{const r=Ve("projectId"),o=Ve("featureId"),{setStrategiesSortOrder:a}=Mu(),{setToastData:s,setToastApiError:l}=tt(),{refetchFeature:c}=vr(r,o),[u,d]=f.exports.useState((e==null?void 0:e.strategies)||[]),[p,h]=f.exports.useState(null),{classes:m}=Z0e();if(f.exports.useEffect(()=>{d((e==null?void 0:e.strategies)||[])},[e==null?void 0:e.strategies]),!e)return null;const b=async v=>{try{await a(r,o,e.name,v),c(),s({title:"Order of strategies updated",type:"success"})}catch(S){l(Ue(S))}},y=(v,S)=>E=>{var R;h({id:u[S].id,index:S,height:((R=v.current)==null?void 0:R.offsetHeight)||0}),v!=null&&v.current&&(E.dataTransfer.effectAllowed="move",E.dataTransfer.setData("text/html",v.current.outerHTML),E.dataTransfer.setDragImage(v.current,20,20))},g=v=>(S,E)=>R=>{if(p===null||S.current===null||p.index===E||v===p.id)return;const{top:A,bottom:_}=S.current.getBoundingClientRect(),N=R.clientY-A<p.height,k=_-R.clientY<p.height,I=p.index>E;if(N&&I||k&&!I){const O=[...u],L=O.splice(p.index,1)[0];O.splice(E,0,L),d(O),h(ee(V({},p),{index:E}))}},x=()=>{h(null),b(u.map((v,S)=>({id:v.id,sortOrder:S})))};return i("div",{className:m.accordionBody,children:w("div",{className:m.accordionBodyInnerContainer,children:[i(F,{condition:u.length>0&&t,show:()=>i(yt,{severity:"warning",sx:{mb:2},children:"This environment is disabled, which means that none of your strategies are executing."})}),i(F,{condition:u.length>0,show:i(Ne,{children:u.map((v,S)=>i(W0e,{strategy:v,index:S,environmentName:e.name,otherEnvironments:n,isDragging:(p==null?void 0:p.id)===v.id,onDragStartRef:y,onDragOver:g(v.id),onDragEnd:x},v.id))}),elseShow:i(Q0e,{projectId:r,featureId:o,environmentId:e.name})})]})})},hO=(e,t)=>e===0?0:Math.round(t/e*100),t1e=le()(e=>({item:{padding:e.spacing(2),background:e.palette.featureMetricsBackground,borderRadius:e.spacing(2),textAlign:"center",[e.breakpoints.up("md")]:{padding:e.spacing(4)}},title:{margin:0,fontSize:e.fontSizes.bodySize,fontWeight:e.fontWeight.thin},value:{fontSize:"2.25rem",fontWeight:e.fontWeight.bold,color:e.palette.primary.main},text:{margin:".5rem 0 0 0",padding:"1rem 0 0 0",borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.palette.grey[300],fontSize:e.fontSizes.smallerBody,color:e.palette.grey[800]}})),mO=({totalYes:e,totalNo:t,hoursBack:n,statsSectionId:r,tableSectionId:o})=>{const{classes:a}=t1e(),s=n===1?"in the last hour":`in the last ${n} hours`;return w(de,{container:!0,spacing:2,id:r,"aria-describedby":o,"aria-label":"Feature metrics summary",component:"section",children:[i(de,{item:!0,xs:12,sm:4,children:w("article",{className:a.item,children:[i("h3",{className:a.title,children:"Exposure"}),i("p",{className:a.value,children:e}),w("p",{className:a.text,children:["Total exposure of the feature in the environment"," ",s,"."]})]})}),i(de,{item:!0,xs:12,sm:4,children:w("article",{className:a.item,children:[i("h3",{className:a.title,children:"Exposure %"}),w("p",{className:a.value,children:[hO(e+t,e),"%"]}),w("p",{className:a.text,children:["% total exposure of the feature in the environment"," ",s,"."]})]})}),i(de,{item:!0,xs:12,sm:4,children:w("article",{className:a.item,children:[i("h3",{className:a.title,children:"Requests"}),i("p",{className:a.value,children:e+t}),w("p",{className:a.text,children:["Total requests for the feature in the environment"," ",s,"."]})]})})]})},n1e=({environmentMetric:e})=>e?w(Ne,{children:[i(fO,{children:"Feature toggle exposure"}),i("div",{children:i(mO,{totalYes:e.yes,totalNo:e.no,hoursBack:1})})]}):null,r1e=le()(e=>({container:{marginLeft:"auto",display:"flex",alignItems:"center"},info:{marginRight:"0.5rem",display:"flex",flexDirection:"column"},icon:{fill:e.palette.grey[300],height:"75px",width:"75px",[e.breakpoints.down(500)]:{display:"none"}},infoParagraph:{maxWidth:"270px",marginTop:"0.25rem",fontSize:e.fontSizes.smallBody,textAlign:"right",[e.breakpoints.down(700)]:{display:"none"}},percentage:{color:e.palette.primary.main,textAlign:"right",fontSize:e.fontSizes.bodySize},percentageCircle:{margin:"0 1rem",[e.breakpoints.down(500)]:{display:"none"}}})),o1e=({environmentMetric:e,disabled:t=!1})=>{const{classes:n}=r1e(),r=zs();if(!e)return null;const o=e.yes+e.no,a=hO(o,e==null?void 0:e.yes);return!e||e.yes===0&&e.no===0?w("div",{className:n.container,children:[w("div",{className:n.info,children:[w("p",{className:n.percentage,style:{color:t?r.palette.text.secondary:void 0},"data-loading":!0,children:[a,"%"]}),w("p",{className:n.infoParagraph,style:{color:t?r.palette.text.secondary:r.palette.text.primary},"data-loading":!0,children:["The feature has been requested ",i("b",{children:"0 times"})," and exposed",i("b",{children:" 0 times"})," in the last hour"]})]}),i(w$,{className:n.icon,style:{transform:"scale(1.1)"},"data-loading":!0})]}):w("div",{className:n.container,children:[w("div",{className:n.info,children:[w("p",{className:n.percentage,children:[a,"%"]}),w("p",{className:n.infoParagraph,children:["The feature has been requested"," ",w("b",{children:[e.yes+e.no," times"]})," ","and exposed ",w("b",{children:[e.yes," times"]})," in the last hour"]})]}),i("div",{className:n.percentageCircle,"data-loading":!0,children:i(cg,{percentage:a,size:"3rem"})})]})},a1e=({strategyName:e})=>{const t=zp(e);return i(wt,{title:tc(e),arrow:!0,children:i(i1e,{children:i(t,{})})})},i1e=z("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.palette.inactiveIcon,"& svg":{width:e.spacing(2.5),height:e.spacing(2.5)}})),s1e=({strategies:e})=>e!=null&&e.length?i(l1e,{"aria-label":"Feature strategies",children:e.map(t=>i(c1e,{children:i(a1e,{strategyName:t.name})},t.id))}):null,l1e=z("ul")(()=>({all:"unset",display:"flex",alignItems:"center",alignContent:"center"})),c1e=z("li")(()=>({all:"unset",minWidth:30,textAlign:"center"})),u1e=({env:e})=>{var d;const{classes:t}=N0e(),n=pn(),r=Ve("projectId"),o=Ve("featureId"),{metrics:a}=k0e(r,o),{feature:s}=vr(r,o),c=I0e(s==null?void 0:s.environments,a).find(p=>p.environment===e.name),u=s==null?void 0:s.environments.find(p=>p.name===e.name);return i("div",{className:t.featureOverviewEnvironment,style:{background:e.enabled?n.palette.background.paper:n.palette.neutral.light},children:w(Tu,{className:t.accordion,"data-testid":`${Vne}_${e.name}`,children:[w(ku,{className:t.accordionHeader,expandIcon:i(TS,{titleAccess:"Toggle"}),children:[w("div",{className:t.header,"data-loading":!0,style:{color:e.enabled?n.palette.text.primary:n.palette.text.secondary},children:[w("div",{className:t.headerTitle,children:[i(A0e,{enabled:e.enabled,className:t.headerIcon}),i("div",{children:i(Tr,{text:e.name,className:t.truncator,maxWidth:"100",maxLength:15})}),i(F,{condition:!e.enabled,show:i(jr,{size:"small",variant:"outlined",label:"Disabled",sx:{ml:1}})})]}),w("div",{className:t.container,children:[i(ex,{label:"Add strategy",projectId:r,featureId:o,environmentId:e.name,variant:"text"}),i(s1e,{strategies:u==null?void 0:u.strategies})]})]}),i(o1e,{environmentMetric:c,disabled:!e.enabled})]}),w(Ru,{className:it(t.accordionDetails,{[t.accordionDetailsDisabled]:!e.enabled}),children:[i(e1e,{featureEnvironment:u,isDisabled:!e.enabled,otherEnvironments:s==null?void 0:s.environments.map(({name:p})=>p).filter(p=>p!==e.name)}),i(F,{condition:(((d=u==null?void 0:u.strategies)==null?void 0:d.length)||0)>0,show:w(Ne,{children:[i(mt,{sx:{display:"flex",justifyContent:"center",py:1},children:i(ex,{label:"Add strategy",projectId:r,featureId:o,environmentId:e.name})}),i(n1e,{environmentMetric:c})]})})]})]})})},d1e=()=>{const e=Ve("projectId"),t=Ve("featureId"),{feature:n}=vr(e,t);if(!n)return null;const{environments:r}=n;return i(Ne,{children:r==null?void 0:r.map(o=>i(u1e,{env:o},o.name))})},p1e=le()(e=>({label:{display:"inline-flex",alignItems:"center",cursor:"pointer"}})),f1e=({env:e,callback:t,text:n,showInfoBox:r})=>{const o=Ve("projectId"),a=Ve("featureId"),{toggleFeatureEnvironmentOn:s,toggleFeatureEnvironmentOff:l}=xo(),{refetchFeature:c}=vr(o,a),{setToastData:u,setToastApiError:d}=tt(),{classes:p}=p1e(),h=async()=>{try{await s(o,a,e.name),u({type:"success",title:`Available in ${e.name}`,text:`${a} is now available in ${e.name} based on its defined strategies.`}),c(),t&&t()}catch(g){g instanceof Error&&g.message===aP?r():d(Ue(g))}},m=async()=>{try{await l(o,a,e.name),u({type:"success",title:`Unavailable in ${e.name}`,text:`${a} is unavailable in ${e.name} and its strategies will no longer have any effect.`}),c(),t&&t()}catch(g){d(Ue(g))}},b=async g=>{if(e.enabled){await m();return}await h()};let y=n||w(Ne,{children:[" ",w("span",{"data-loading":!0,children:[e.enabled?"enabled":"disabled"," in"]}),"\xA0",i(Tr,{text:e.name,maxWidth:"120",maxLength:15})]});return i("div",{children:w("label",{className:p.label,children:[i(nc,{permission:j$,projectId:o,checked:e.enabled,onChange:b,environmentId:e.name}),y]})})},h1e=z("div")(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,backgroundColor:e.palette.background.paper,display:"flex",flexDirection:"column",padding:"1.5rem",maxWidth:"350px",minWidth:"350px",marginRight:"1rem",marginTop:"1rem",[e.breakpoints.down(1e3)]:{marginBottom:"1rem",width:"100%",maxWidth:"none",minWidth:"auto"}})),m1e=z("h3")(({theme:e})=>({display:"flex",gap:e.spacing(1),alignItems:"center",fontSize:e.fontSizes.bodySize,fontWeight:"normal",margin:0,marginBottom:"0.5rem","& > :last-child":{position:"relative",top:1}})),g1e=()=>{const e=Ve("projectId"),t=Ve("featureId"),{feature:n}=vr(e,t);xo();const[r,o]=f.exports.useState(!1),[a,s]=f.exports.useState(""),l=()=>{o(!1)};return w(h1e,{children:[w(m1e,{"data-loading":!0,children:["Feature toggle status",i(su,{tooltip:"When a feature is switched off in an environment, it will always return false. When switched on, it will return true or false depending on its strategies.",placement:"top"})]}),(()=>n==null?void 0:n.environments.map(u=>i(f1e,{env:u,showInfoBox:()=>{s(u.name),o(!0)}},u.name)))(),i(nO,{open:r,onClose:l,projectId:e,featureId:t,environmentName:a})]})},v1e=()=>{const{classes:e}=R0e(),t=Ye(),n=Ve("projectId"),r=Ve("featureId"),o=Bu(n,r),a=()=>t(o);return Sa(r),w("div",{className:e.container,children:[w("div",{children:[i(T0e,{}),i(g1e,{})]}),i("div",{className:e.mainContent,children:i(d1e,{})}),w(of,{children:[i(Er,{path:"strategies/create",element:i(pu,{label:"Create feature strategy",onClose:a,open:!0,children:i(rye,{})})}),i(Er,{path:"strategies/edit",element:i(pu,{label:"Edit feature strategy",onClose:a,open:!0,children:i(ohe,{})})})]})]})};/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */var y1e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),b1e=Object.prototype.hasOwnProperty;function tx(e,t){return b1e.call(e,t)}function nx(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var o in e)tx(e,o)&&r.push(o);return r}function Uo(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function rx(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function ll(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function gO(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ox(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(ox(e[t]))return!0}else if(typeof e=="object"){for(var r=nx(e),o=r.length,a=0;a<o;a++)if(ox(e[r[a]]))return!0}}return!1}function k_(e,t){var n=[e];for(var r in t){var o=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof o!="undefined"&&n.push(r+": "+o)}return n.join(`
`)}var vO=function(e){y1e(t,e);function t(n,r,o,a,s){var l=this.constructor,c=e.call(this,k_(n,{name:r,index:o,operation:a,tree:s}))||this;return c.name=r,c.index=o,c.operation=a,c.tree=s,Object.setPrototypeOf(c,l.prototype),c.message=k_(n,{name:r,index:o,operation:a,tree:s}),c}return t}(Error),cr=vO,x1e=Uo,Dc={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=ug(n,this.path);r&&(r=Uo(r));var o=Al(n,{op:"remove",path:this.from}).removed;return Al(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=ug(n,this.from);return Al(n,{op:"add",path:this.path,value:Uo(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:qp(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},w1e={add:function(e,t,n){return rx(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Dc.move,copy:Dc.copy,test:Dc.test,_get:Dc._get};function ug(e,t){if(t=="")return e;var n={op:"_get",path:t};return Al(e,n),n.value}function Al(e,t,n,r,o,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):dg(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=ug(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=qp(e,t.value),s.test===!1)throw new cr("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new cr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=Uo(e));var l=t.path||"",c=l.split("/"),u=e,d=1,p=c.length,h=void 0,m=void 0,b=void 0;for(typeof n=="function"?b=n:b=dg;;){if(m=c[d],m&&m.indexOf("~")!=-1&&(m=gO(m)),o&&(m=="__proto__"||m=="prototype"&&d>0&&c[d-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&h===void 0&&(u[m]===void 0?h=c.slice(0,d).join("/"):d==p-1&&(h=t.path),h!==void 0&&b(t,0,e,h)),d++,Array.isArray(u)){if(m==="-")m=u.length;else{if(n&&!rx(m))throw new cr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);rx(m)&&(m=~~m)}if(d>=p){if(n&&t.op==="add"&&m>u.length)throw new cr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=w1e[t.op].call(t,u,m,e);if(s.test===!1)throw new cr("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(d>=p){var s=Dc[t.op].call(t,u,m,e);if(s.test===!1)throw new cr("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(u=u[m],n&&d<p&&(!u||typeof u!="object"))throw new cr("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function u2(e,t,n,r,o){if(r===void 0&&(r=!0),o===void 0&&(o=!0),n&&!Array.isArray(t))throw new cr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Uo(e));for(var a=new Array(t.length),s=0,l=t.length;s<l;s++)a[s]=Al(e,t[s],n,!0,o,s),e=a[s].newDocument;return a.newDocument=e,a}function S1e(e,t,n){var r=Al(e,t);if(r.test===!1)throw new cr("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function dg(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new cr("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Dc[e.op]){if(typeof e.path!="string")throw new cr("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new cr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new cr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new cr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&ox(e.value))throw new cr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var o=e.path.split("/").length,a=r.split("/").length;if(o!==a+1&&o!==a)throw new cr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new cr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},l=yO([s],n);if(l&&l.name==="OPERATION_PATH_UNRESOLVABLE")throw new cr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new cr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function yO(e,t,n){try{if(!Array.isArray(e))throw new cr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)u2(Uo(t),Uo(e),n||!0);else{n=n||dg;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(o){if(o instanceof cr)return o;throw o}}function qp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),o,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(o=a;o--!==0;)if(!qp(e[o],t[o]))return!1;return!0}if(n!=r)return!1;var l=Object.keys(e);if(a=l.length,a!==Object.keys(t).length)return!1;for(o=a;o--!==0;)if(!t.hasOwnProperty(l[o]))return!1;for(o=a;o--!==0;)if(s=l[o],!qp(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}var C1e=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:cr,deepClone:x1e,getValueByPointer:ug,applyOperation:Al,applyPatch:u2,applyReducer:S1e,validator:dg,validate:yO,_areEquals:qp},Symbol.toStringTag,{value:"Module"}));/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */var d2=new WeakMap,E1e=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),T1e=function(){function e(t,n){this.callback=t,this.observer=n}return e}();function R1e(e){return d2.get(e)}function k1e(e,t){return e.observers.get(t)}function _1e(e,t){e.observers.delete(t.callback)}function I1e(e,t){t.unobserve()}function A1e(e,t){var n=[],r,o=R1e(e);if(!o)o=new E1e(e),d2.set(e,o);else{var a=k1e(o,t);r=a&&a.observer}if(r)return r;if(r={},o.value=Uo(e),t){r.callback=t,r.next=null;var s=function(){ax(r)},l=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window!="undefined"&&(window.addEventListener("mouseup",l),window.addEventListener("keyup",l),window.addEventListener("mousedown",l),window.addEventListener("keydown",l),window.addEventListener("change",l))}return r.patches=n,r.object=e,r.unobserve=function(){ax(r),clearTimeout(r.next),_1e(o,r),typeof window!="undefined"&&(window.removeEventListener("mouseup",l),window.removeEventListener("keyup",l),window.removeEventListener("mousedown",l),window.removeEventListener("keydown",l),window.removeEventListener("change",l))},o.observers.set(t,new T1e(t,r)),r}function ax(e,t){t===void 0&&(t=!1);var n=d2.get(e.object);p2(n.value,e.object,e.patches,"",t),e.patches.length&&u2(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function p2(e,t,n,r,o){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=nx(t),s=nx(e),l=!1,c=s.length-1;c>=0;c--){var u=s[c],d=e[u];if(tx(t,u)&&!(t[u]===void 0&&d!==void 0&&Array.isArray(t)===!1)){var p=t[u];typeof d=="object"&&d!=null&&typeof p=="object"&&p!=null&&Array.isArray(d)===Array.isArray(p)?p2(d,p,n,r+"/"+ll(u),o):d!==p&&(o&&n.push({op:"test",path:r+"/"+ll(u),value:Uo(d)}),n.push({op:"replace",path:r+"/"+ll(u),value:Uo(p)}))}else Array.isArray(e)===Array.isArray(t)?(o&&n.push({op:"test",path:r+"/"+ll(u),value:Uo(d)}),n.push({op:"remove",path:r+"/"+ll(u)}),l=!0):(o&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!l&&a.length==s.length))for(var c=0;c<a.length;c++){var u=a[c];!tx(e,u)&&t[u]!==void 0&&n.push({op:"add",path:r+"/"+ll(u),value:Uo(t[u])})}}}function f2(e,t,n){n===void 0&&(n=!1);var r=[];return p2(e,t,r,"",n),r}var N1e=Object.freeze(Object.defineProperty({__proto__:null,unobserve:I1e,observe:A1e,generate:ax,compare:f2},Symbol.toStringTag,{value:"Module"}));Object.assign({},C1e,N1e,{JsonPatchError:vO,deepClone:Uo,escapePathComponent:ll,unescapePathComponent:gO});const $1e=le()(e=>({contextFieldSelect:{marginRight:"8px"}})),P1e=a=>{var s=a,{values:e=[],updateValues:t,placeholder:n="",error:r}=s,o=en(s,["values","updateValues","placeholder","error"]);const l=u=>{const p=u.target.value.split(/,\s?/).map(h=>h.trim());t(p)},c=u=>{if(u.key==="Backspace"){const d=u.target.value;if(d.endsWith(", ")){u.preventDefault();const p=d.slice(0,-2);t(p.split(/,\s*/))}}};return i(At,ee(V({},o),{error:r,placeholder:n,value:e?e.join(", "):"",onKeyDown:c,onChange:l,style:{width:"100%"},variant:"outlined",size:"small"}))},O1e=({overrides:e,overridesDispatch:t})=>{const{classes:n}=$1e(),{classes:r}=Yn(),{context:o}=wi(),a=o.map(({name:c})=>({key:c,label:c})),s=c=>u=>{t({type:"UPDATE_VALUES_AT",payload:[c,u]})},l=c=>(u,d)=>{u==null||u.preventDefault(),t({type:"UPDATE_VALUES_AT",payload:[c,d||[]]})};return i(Ne,{children:e.map((c,u)=>{var m;const d=o.find(b=>b.name===c.contextName),p=((m=d==null?void 0:d.legalValues)==null?void 0:m.map(({value:b})=>b))||[],h=c.values.filter(b=>p.includes(b));return w(de,{container:!0,alignItems:"center",children:[i(de,{item:!0,md:3,sm:3,xs:3,className:n.contextFieldSelect,children:i(Fa,{name:"contextName",label:"Context Field",value:c.contextName,options:a,classes:{root:it(r.fullWidth)},onChange:b=>{t({type:"UPDATE_TYPE_AT",payload:[u,b]})}})}),i(de,{md:7,sm:7,xs:6,item:!0,children:i(F,{condition:Boolean(p&&p.length>0),show:i(Bl,{multiple:!0,id:`override-select-${u}`,isOptionEqualToValue:(b,y)=>b===y,options:p,onChange:l(u),getOptionLabel:b=>b,value:h,style:{width:"100%"},filterSelectedOptions:!0,size:"small",renderInput:b=>i(At,ee(V({},b),{variant:"outlined",label:"Legal values",style:{width:"100%"}}))}),elseShow:i(P1e,{label:"Values (v1, v2, ...)",name:"values",placeholder:"",values:c.values,updateValues:s(u)})})}),i(de,{item:!0,md:1,children:i(wt,{title:"Remove",arrow:!0,children:i(Ht,{onClick:b=>{b.preventDefault(),t({type:"REMOVE",payload:u})},size:"large",children:i(er,{})})})})]},`override=${u}`)})})};var ix={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",p="[object GeneratorFunction]",h="[object Map]",m="[object Number]",b="[object Object]",y="[object Promise]",g="[object RegExp]",x="[object Set]",v="[object String]",S="[object Symbol]",E="[object WeakMap]",R="[object ArrayBuffer]",A="[object DataView]",_="[object Float32Array]",N="[object Float64Array]",k="[object Int8Array]",I="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",q="[object Uint8ClampedArray]",D="[object Uint16Array]",H="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,Z=/\w*$/,G=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,Y={};Y[a]=Y[s]=Y[R]=Y[A]=Y[l]=Y[c]=Y[_]=Y[N]=Y[k]=Y[I]=Y[O]=Y[h]=Y[m]=Y[b]=Y[g]=Y[x]=Y[v]=Y[S]=Y[L]=Y[q]=Y[D]=Y[H]=!0,Y[u]=Y[d]=Y[E]=!1;var K=typeof _n=="object"&&_n&&_n.Object===Object&&_n,Q=typeof self=="object"&&self&&self.Object===Object&&self,re=K||Q||Function("return this")(),pe=t&&!t.nodeType&&t,ye=pe&&!0&&e&&!e.nodeType&&e,ae=ye&&ye.exports===pe;function oe(j,ie){return j.set(ie[0],ie[1]),j}function ue(j,ie){return j.add(ie),j}function ge(j,ie){for(var Se=-1,lt=j?j.length:0;++Se<lt&&ie(j[Se],Se,j)!==!1;);return j}function _e(j,ie){for(var Se=-1,lt=ie.length,br=j.length;++Se<lt;)j[br+Se]=ie[Se];return j}function We(j,ie,Se,lt){var br=-1,Br=j?j.length:0;for(lt&&Br&&(Se=j[++br]);++br<Br;)Se=ie(Se,j[br],br,j);return Se}function be(j,ie){for(var Se=-1,lt=Array(j);++Se<j;)lt[Se]=ie(Se);return lt}function he(j,ie){return j==null?void 0:j[ie]}function He(j){var ie=!1;if(j!=null&&typeof j.toString!="function")try{ie=!!(j+"")}catch{}return ie}function Pe(j){var ie=-1,Se=Array(j.size);return j.forEach(function(lt,br){Se[++ie]=[br,lt]}),Se}function pt(j,ie){return function(Se){return j(ie(Se))}}function St(j){var ie=-1,Se=Array(j.size);return j.forEach(function(lt){Se[++ie]=lt}),Se}var Ut=Array.prototype,zt=Function.prototype,gt=Object.prototype,Et=re["__core-js_shared__"],Qt=function(){var j=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),In=zt.toString,ke=gt.hasOwnProperty,Fe=gt.toString,Ge=RegExp("^"+In.call(ke).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=ae?re.Buffer:void 0,te=re.Symbol,Ee=re.Uint8Array,me=pt(Object.getPrototypeOf,Object),je=Object.create,ut=gt.propertyIsEnumerable,kt=Ut.splice,cn=Object.getOwnPropertySymbols,Wn=$e?$e.isBuffer:void 0,So=pt(Object.keys,Object),tr=Ri(re,"DataView"),pr=Ri(re,"Map"),Nr=Ri(re,"Promise"),On=Ri(re,"Set"),En=Ri(re,"WeakMap"),fn=Ri(Object,"create"),Bo=_i(tr),Fo=_i(pr),Co=_i(Nr),Ca=_i(On),Ea=_i(En),qt=te?te.prototype:void 0,ir=qt?qt.valueOf:void 0;function fr(j){var ie=-1,Se=j?j.length:0;for(this.clear();++ie<Se;){var lt=j[ie];this.set(lt[0],lt[1])}}function Ta(){this.__data__=fn?fn(null):{}}function Zi(j){return this.has(j)&&delete this.__data__[j]}function qs(j){var ie=this.__data__;if(fn){var Se=ie[j];return Se===r?void 0:Se}return ke.call(ie,j)?ie[j]:void 0}function Ys(j){var ie=this.__data__;return fn?ie[j]!==void 0:ke.call(ie,j)}function Lt(j,ie){var Se=this.__data__;return Se[j]=fn&&ie===void 0?r:ie,this}fr.prototype.clear=Ta,fr.prototype.delete=Zi,fr.prototype.get=qs,fr.prototype.has=Ys,fr.prototype.set=Lt;function xn(j){var ie=-1,Se=j?j.length:0;for(this.clear();++ie<Se;){var lt=j[ie];this.set(lt[0],lt[1])}}function Ie(){this.__data__=[]}function we(j){var ie=this.__data__,Se=Ks(ie,j);if(Se<0)return!1;var lt=ie.length-1;return Se==lt?ie.pop():kt.call(ie,Se,1),!0}function xt(j){var ie=this.__data__,Se=Ks(ie,j);return Se<0?void 0:ie[Se][1]}function Mt(j){return Ks(this.__data__,j)>-1}function An(j,ie){var Se=this.__data__,lt=Ks(Se,j);return lt<0?Se.push([j,ie]):Se[lt][1]=ie,this}xn.prototype.clear=Ie,xn.prototype.delete=we,xn.prototype.get=xt,xn.prototype.has=Mt,xn.prototype.set=An;function Mn(j){var ie=-1,Se=j?j.length:0;for(this.clear();++ie<Se;){var lt=j[ie];this.set(lt[0],lt[1])}}function Xn(){this.__data__={hash:new fr,map:new(pr||xn),string:new fr}}function qr(j){return Xs(this,j).delete(j)}function Ua(j){return Xs(this,j).get(j)}function Bf(j){return Xs(this,j).has(j)}function by(j,ie){return Xs(this,j).set(j,ie),this}Mn.prototype.clear=Xn,Mn.prototype.delete=qr,Mn.prototype.get=Ua,Mn.prototype.has=Bf,Mn.prototype.set=by;function Ti(j){this.__data__=new xn(j)}function xy(){this.__data__=new xn}function wy(j){return this.__data__.delete(j)}function Sy(j){return this.__data__.get(j)}function Ff(j){return this.__data__.has(j)}function zf(j,ie){var Se=this.__data__;if(Se instanceof xn){var lt=Se.__data__;if(!pr||lt.length<n-1)return lt.push([j,ie]),this;Se=this.__data__=new Mn(lt)}return Se.set(j,ie),this}Ti.prototype.clear=xy,Ti.prototype.delete=wy,Ti.prototype.get=Sy,Ti.prototype.has=Ff,Ti.prototype.set=zf;function Cy(j,ie){var Se=Js(j)||Hy(j)?be(j.length,String):[],lt=Se.length,br=!!lt;for(var Br in j)(ie||ke.call(j,Br))&&!(br&&(Br=="length"||zy(Br,lt)))&&Se.push(Br);return Se}function jf(j,ie,Se){var lt=j[ie];(!(ke.call(j,ie)&&Gf(lt,Se))||Se===void 0&&!(ie in j))&&(j[ie]=Se)}function Ks(j,ie){for(var Se=j.length;Se--;)if(Gf(j[Se][0],ie))return Se;return-1}function Uf(j,ie){return j&&Hf(ie,Zs(ie),j)}function zu(j,ie,Se,lt,br,Br,Yr){var C;if(lt&&(C=Br?lt(j,br,Br,Yr):lt(j)),C!==void 0)return C;if(!Qs(j))return j;var $=Js(j);if($){if(C=By(j),!ie)return Dy(j,C)}else{var P=ki(j),M=P==d||P==p;if(Vu(j))return Iy(j,ie);if(P==b||P==a||M&&!Br){if(He(j))return Br?j:{};if(C=Fy(M?{}:j),!ie)return Ly(j,Uf(C,j))}else{if(!Y[P])return Br?j:{};C=Vf(j,P,zu,ie)}}Yr||(Yr=new Ti);var X=Yr.get(j);if(X)return X;if(Yr.set(j,C),!$)var W=Se?My(j):Zs(j);return ge(W||j,function(J,ce){W&&(ce=J,J=j[ce]),jf(C,ce,zu(J,ie,Se,lt,ce,j,Yr))}),C}function Ey(j){return Qs(j)?je(j):{}}function Ty(j,ie,Se){var lt=ie(j);return Js(j)?lt:_e(lt,Se(j))}function Ry(j){return Fe.call(j)}function ky(j){if(!Qs(j)||Uy(j))return!1;var ie=uc(j)||He(j)?Ge:G;return ie.test(_i(j))}function _y(j){if(!Wu(j))return So(j);var ie=[];for(var Se in Object(j))ke.call(j,Se)&&Se!="constructor"&&ie.push(Se);return ie}function Iy(j,ie){if(ie)return j.slice();var Se=new j.constructor(j.length);return j.copy(Se),Se}function ju(j){var ie=new j.constructor(j.byteLength);return new Ee(ie).set(new Ee(j)),ie}function Ay(j,ie){var Se=ie?ju(j.buffer):j.buffer;return new j.constructor(Se,j.byteOffset,j.byteLength)}function Ny(j,ie,Se){var lt=ie?Se(Pe(j),!0):Pe(j);return We(lt,oe,new j.constructor)}function $y(j){var ie=new j.constructor(j.source,Z.exec(j));return ie.lastIndex=j.lastIndex,ie}function Wf(j,ie,Se){var lt=ie?Se(St(j),!0):St(j);return We(lt,ue,new j.constructor)}function Py(j){return ir?Object(ir.call(j)):{}}function Oy(j,ie){var Se=ie?ju(j.buffer):j.buffer;return new j.constructor(Se,j.byteOffset,j.length)}function Dy(j,ie){var Se=-1,lt=j.length;for(ie||(ie=Array(lt));++Se<lt;)ie[Se]=j[Se];return ie}function Hf(j,ie,Se,lt){Se||(Se={});for(var br=-1,Br=ie.length;++br<Br;){var Yr=ie[br],C=lt?lt(Se[Yr],j[Yr],Yr,Se,j):void 0;jf(Se,Yr,C===void 0?j[Yr]:C)}return Se}function Ly(j,ie){return Hf(j,Uu(j),ie)}function My(j){return Ty(j,Zs,Uu)}function Xs(j,ie){var Se=j.__data__;return jy(ie)?Se[typeof ie=="string"?"string":"hash"]:Se.map}function Ri(j,ie){var Se=he(j,ie);return ky(Se)?Se:void 0}var Uu=cn?pt(cn,Object):Gy,ki=Ry;(tr&&ki(new tr(new ArrayBuffer(1)))!=A||pr&&ki(new pr)!=h||Nr&&ki(Nr.resolve())!=y||On&&ki(new On)!=x||En&&ki(new En)!=E)&&(ki=function(j){var ie=Fe.call(j),Se=ie==b?j.constructor:void 0,lt=Se?_i(Se):void 0;if(lt)switch(lt){case Bo:return A;case Fo:return h;case Co:return y;case Ca:return x;case Ea:return E}return ie});function By(j){var ie=j.length,Se=j.constructor(ie);return ie&&typeof j[0]=="string"&&ke.call(j,"index")&&(Se.index=j.index,Se.input=j.input),Se}function Fy(j){return typeof j.constructor=="function"&&!Wu(j)?Ey(me(j)):{}}function Vf(j,ie,Se,lt){var br=j.constructor;switch(ie){case R:return ju(j);case l:case c:return new br(+j);case A:return Ay(j,lt);case _:case N:case k:case I:case O:case L:case q:case D:case H:return Oy(j,lt);case h:return Ny(j,lt,Se);case m:case v:return new br(j);case g:return $y(j);case x:return Wf(j,lt,Se);case S:return Py(j)}}function zy(j,ie){return ie=ie==null?o:ie,!!ie&&(typeof j=="number"||B.test(j))&&j>-1&&j%1==0&&j<ie}function jy(j){var ie=typeof j;return ie=="string"||ie=="number"||ie=="symbol"||ie=="boolean"?j!=="__proto__":j===null}function Uy(j){return!!Qt&&Qt in j}function Wu(j){var ie=j&&j.constructor,Se=typeof ie=="function"&&ie.prototype||gt;return j===Se}function _i(j){if(j!=null){try{return In.call(j)}catch{}try{return j+""}catch{}}return""}function Wy(j){return zu(j,!0,!0)}function Gf(j,ie){return j===ie||j!==j&&ie!==ie}function Hy(j){return cc(j)&&ke.call(j,"callee")&&(!ut.call(j,"callee")||Fe.call(j)==a)}var Js=Array.isArray;function Hu(j){return j!=null&&qf(j.length)&&!uc(j)}function cc(j){return Vy(j)&&Hu(j)}var Vu=Wn||qy;function uc(j){var ie=Qs(j)?Fe.call(j):"";return ie==d||ie==p}function qf(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=o}function Qs(j){var ie=typeof j;return!!j&&(ie=="object"||ie=="function")}function Vy(j){return!!j&&typeof j=="object"}function Zs(j){return Hu(j)?Cy(j):_y(j)}function Gy(){return[]}function qy(){return!1}e.exports=Wy})(ix,ix.exports);var Fi=ix.exports;const D1e=le()(e=>({error:{color:e.palette.error.main,fontSize:e.fontSizes.smallBody,position:"relative"},input:{maxWidth:350,width:"100%"},grid:{marginBottom:"0.5rem"},weightInput:{marginRight:"0.8rem"},label:{display:"flex",alignItems:"center",gap:"1ch",marginBottom:"1rem"},info:{width:"18.5px",height:"18.5px",color:"grey"},select:{minWidth:"100px",width:"100%"}})),L1e=(e,t)=>{switch(t.type){case"SET":return t.payload;case"CLEAR":return[];case"ADD":return[...e,t.payload];case"REMOVE":return e.filter((s,l)=>l!==t.payload);case"UPDATE_VALUES_AT":const[n,r]=t.payload;return e.map((s,l)=>l===n?ee(V({},s),{values:r}):s);case"UPDATE_TYPE_AT":const[o,a]=t.payload;return e.map((s,l)=>l===o?ee(V({},s),{contextName:a}):s)}},M1e=(e=[])=>f.exports.useReducer(L1e,e),B1e=[{key:"string",label:"string"},{key:"json",label:"json"},{key:"csv",label:"csv"}],f1={type:"string",value:""},F1e=({showDialog:e,closeDialog:t,save:n,editVariant:r,validateName:o,validateWeight:a,title:s,editing:l})=>{const{classes:c}=D1e(),[u,d]=f.exports.useState({}),[p,h]=f.exports.useState(f1),[m,b]=M1e([]),[y,g]=f.exports.useState({}),{classes:x}=Yn(),v=Ve("projectId"),S=Ve("featureId"),{feature:E}=vr(v,S),[R,A]=f.exports.useState([]),{context:_}=wi(),N=B=>{try{return JSON.parse(B),!0}catch{return g({payload:"Invalid JSON"}),!1}},k=()=>{r?(d({name:r.name,weight:String(r.weight/10),weightType:r.weightType||ul.VARIABLE,stickiness:r.stickiness}),r.payload?h(r.payload):h(f1),r.overrides?b({type:"SET",payload:r.overrides}):b({type:"CLEAR"})):(d({}),h(f1),b({type:"CLEAR"})),g({})},I=B=>A(Fi(B));f.exports.useEffect(()=>{E&&I(E.variants)},[E.variants]),f.exports.useEffect(()=>{k()},[r]);const O=B=>{const{name:Y,value:K}=B.target;d(ee(V({},u),{[Y]:xi(K)}))},L=B=>{const{checked:Y,name:K}=B.target,Q=Y?ul.FIX:ul.VARIABLE;d(ee(V({},u),{[K]:Q}))},q=async B=>{g({}),B.preventDefault();const Y=o(u.name);if(Y){g(Y);return}const K=a(u.weight);if(K){g(K);return}if(!(p.type==="json"&&!N(p.value)))try{const re={name:u.name,weight:Number(u.weight)*10,weightType:u.weightType,stickiness:u.stickiness,payload:p.value?p:void 0,overrides:m.map(pe=>({contextName:pe.contextName,values:pe.values})).filter(pe=>pe.values&&pe.values.length>0)};await n(re),k(),t()}catch(re){const pe=Ue(re);pe.includes("duplicate value")?g({name:"A variant with that name already exists."}):pe.includes("must be a number")?g({weight:"Weight must be a number"}):g({general:pe||"Could not add variant"})}},D=B=>Y=>{g({payload:""}),h(ee(V({},p),{[B]:Y}))},H=B=>{B.preventDefault(),k(),t()},U=()=>{_.length>0&&b({type:"ADD",payload:{contextName:_[0].name,values:[]}})},Z=u.weightType===ul.FIX,G="add-feature-variant-form";return i(ln,{open:e,style:zce,onClose:H,onClick:q,primaryButtonText:"Save",secondaryButtonText:"Cancel",title:s,fullWidth:!0,maxWidth:"md",formId:G,children:w("form",{id:G,onSubmit:q,className:x.contentSpacingY,children:[i("p",{className:c.error,children:y.general}),i(Sn,{label:"Variant name",autoFocus:!0,name:"name",id:"variant-name",className:c.input,errorText:y.name,value:u.name||"",error:Boolean(y.name),required:!0,type:"name",disabled:l,onChange:O,"data-testid":"VARIANT_NAME_INPUT"}),i("br",{}),w(de,{container:!0,children:[i(F,{condition:l&&R.length>1||!l&&R.length>0,show:i(de,{item:!0,md:12,className:c.grid,children:i(qo,{children:i($n,{control:i(nc,{permission:Bp,projectId:v,name:"weightType",checked:Z,"data-testid":"VARIANT_WEIGHT_CHECK",onChange:L}),label:"Custom percentage"})})})}),i(F,{condition:u.weightType===ul.FIX,show:i(de,{item:!0,md:4,children:i(Sn,{id:"weight",label:"Variant weight",name:"weight","data-testid":"VARIANT_WEIGHT_INPUT",InputProps:{endAdornment:i(sS,{position:"start",children:"%"})},className:c.weightInput,value:u.weight,error:Boolean(y.weight),errorText:y.weight,type:"number",disabled:!Z,onChange:B=>{O(B)},"aria-valuemin":0,"aria-valuemax":100})})})]}),w("p",{className:c.label,children:[i("strong",{children:"Payload "}),i(su,{tooltip:"Passed along with the the variant object."})]}),w(de,{container:!0,children:[i(de,{item:!0,md:2,sm:2,xs:4,children:i(Fa,{id:"variant-payload-type",name:"type",label:"Type",className:c.select,value:p.type,options:B1e,onChange:D("type")})}),i(de,{item:!0,md:8,sm:8,xs:6,children:i(Sn,{error:Boolean(y.payload),errorText:y.payload,name:"variant-payload-value",id:"variant-payload-value",label:"Value",multiline:p.type!=="string",rows:p.type==="string"?1:4,className:x.fullWidth,value:p.value,onChange:B=>D("value")(B.target.value),"data-testid":"VARIANT_PAYLOAD_VALUE",placeholder:p.type==="json"?'{ "hello": "world" }':""})})]}),i(F,{condition:m.length>0,show:w("p",{className:c.label,children:[i("strong",{children:"Overrides "}),i(su,{tooltip:"Here you can specify which users should get this variant."})]})}),i(O1e,{overrides:m,overridesDispatch:b}),i(nt,{onClick:U,variant:"contained",color:"primary",children:"Add override"})]})})},z1e=({show:e,onClick:t,onClose:n})=>i(ln,{title:"Are you sure you want to delete this variant?",open:e,primaryButtonText:"Delete variant",secondaryButtonText:"Cancel",onClick:t,onClose:n,children:i(yt,{severity:"error",children:"Deleting this variant will change which variant users receive."})}),j1e=({payload:e,overrides:t})=>w(Ne,{children:[i(F,{condition:Boolean(e),show:i(Bn,{children:"Payload"})}),i(F,{condition:t&&t.length>0,show:i(Bn,{children:"Overrides"})})]}),U1e=({projectId:e,setDelDialog:t,variant:n,editVariant:r})=>w(mt,{style:{display:"flex",justifyContent:"flex-end"},"data-loading":!0,children:[i(Ft,{size:"large","data-testid":`VARIANT_EDIT_BUTTON_${n.name}`,permission:Bp,projectId:e,onClick:()=>r(n.name),children:i(ar,{})}),i(Ft,{size:"large",permission:Bp,"data-testid":`VARIANT_DELETE_BUTTON_${n.name}`,projectId:e,onClick:()=>t({show:!0,name:n.name}),children:i(er,{})})]}),W1e=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=Ve("projectId"),n=Ve("featureId"),{feature:r,refetchFeature:o,loading:a}=vr(t,n),[s,l]=f.exports.useState([]),[c,u]=f.exports.useState(!1),{context:d}=wi(),{setToastData:p,setToastApiError:h}=tt(),{patchFeatureVariants:m}=xo(),[b,y]=f.exports.useState({}),[g,x]=f.exports.useState(!1),[v,S]=f.exports.useState([]),[E,R]=f.exports.useState({name:"",show:!1}),A=an(oo.breakpoints.down("md")),_=an(oo.breakpoints.down("lg"));f.exports.useEffect(()=>{r&&B(r.variants)},[r.variants]),f.exports.useEffect(()=>{const be=["default",...d.filter(he=>he.stickiness).map(he=>he.name)];S(be)},[d]);const N=e(Bp,t),k=f.exports.useMemo(()=>a?Array(5).fill({name:"Context name",description:"Context description when loading"}):r.variants,[r.variants,a]),I=f.exports.useCallback(be=>{const he=V({},s.find(He=>He.name===be));y(he),u(!0),x(!0)},[s,y,u,x]),O=f.exports.useMemo(()=>[{Header:"Name",accessor:"name",width:"25%",Cell:({row:{original:{name:be}}})=>i(Bn,{"data-loading":!0,children:be}),sortType:"alphanumeric"},{Header:"Payload/Overrides",accessor:"data",Cell:({row:{original:{overrides:be,payload:he}}})=>i(j1e,{overrides:be,payload:he}),disableSortBy:!0},{Header:"Weight",accessor:"weight",width:"20%",Cell:({row:{original:{name:be,weight:he}}})=>w(Bn,{"data-testid":`VARIANT_WEIGHT_${be}`,children:[Bce(he)," %"]}),sortType:"number"},{Header:"Type",accessor:"weightType",width:"20%",Cell:({row:{original:{weightType:be}}})=>i(Bn,{children:be}),sortType:"alphanumeric"},{Header:"Actions",id:"Actions",align:"right",Cell:({row:{original:be}})=>i(U1e,{editVariant:I,setDelDialog:R,variant:be,projectId:t}),width:150,disableSortBy:!0}],[t,I]),L=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}]}),[]),{getTableProps:q,getTableBodyProps:D,headerGroups:H,rows:U,prepareRow:Z,setHiddenColumns:G}=ct.exports.useTable({columns:O,data:k,initialState:L,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useSortBy);f.exports.useEffect(()=>{const be=[];_&&be.push("weightType"),A&&be.push("data"),G(be)},[G,A,_]);const B=be=>l(Fi(be)),Y=()=>{x(!1),u(!1),y({})},K=()=>{if(!s||s.length<2)return null;const be=s[0].stickiness||"default",he=v.map(Pe=>({key:Pe,label:Pe}));return v.includes(be)||he.push({key:be,label:be}),w("section",{style:{paddingTop:"16px"},children:[i(Fa,{label:"Stickiness",options:he,value:be,onChange:Pe=>{Q(Pe).catch(console.warn)}}),"\xA0\xA0",w("small",{style:{display:"block",marginTop:"0.5rem"},children:["By overriding the stickiness you can control which parameter is used to ensure consistent traffic allocation across variants."," ",i("a",{href:"https://docs.getunleash.io/advanced/toggle_variants",target:"_blank",rel:"noreferrer",children:"Read more"})]})]})},Q=async be=>{const he=[...s].map(Pe=>ee(V({},Pe),{stickiness:be})),He=_e(he);if(He.length!==0)try{await m(t,n,He),o(),p({title:"Updated variant",confetti:!0,type:"success",text:"Successfully updated variant stickiness"})}catch(Pe){h(Ue(Pe))}},re=async be=>{let he=s.filter(He=>He.name!==be);try{await ae(he,"Successfully removed variant")}catch(He){h(Ue(He))}},pe=async be=>{const he=Fi(s),He=he.findIndex(Pe=>Pe.name===be.name);he[He]=be,await ae(he,"Successfully updated variant")},ye=async be=>{let he="default";(s==null?void 0:s.length)>0&&(he=s[0].stickiness||"default"),be.stickiness=he,await ae([...s,be],"Successfully added a variant")},ae=async(be,he)=>{const He=Fce(be,1e3),Pe=_e(He);if(Pe.length!==0)try{await m(t,n,Pe),o(),p({title:"Updated variant",type:"success",text:he})}catch(pt){h(Ue(pt))}},oe=be=>{if(!be)return{name:"Name is required"}},ue=be=>{const he=parseInt(be);if(he>100||he<0)return{weight:"weight must be between 0 and 100"}},ge=z1e({show:E.show,onClick:()=>{re(E.name),R({name:"",show:!1}),p({title:"Deleted variant",type:"success",text:"Successfully deleted variant"})},onClose:()=>R({show:!1,name:""})}),_e=be=>f2(r.variants,be);return w(Gt,{isLoading:a,header:i(Dt,{title:"Variants",actions:i(Ne,{children:i(Mr,{onClick:()=>{u(!1),s.length===0?y({weight:1e3}):y({weightType:"variable"}),x(!0)},"data-testid":"ADD_VARIANT_BUTTON",permission:Bp,projectId:t,children:"New variant"})})}),children:[w(yt,{severity:"info",sx:{marginBottom:"1rem"},children:["Variants allows you to return a variant object if the feature toggle is considered enabled for the current request. When using variants you should use the"," ",i("code",{style:{fontWeight:"bold"},children:"getVariant()"})," method in the Client SDK."]}),w(vv,ee(V({},q()),{children:[i(Mo,{headerGroups:H}),i(bo,ee(V({},D()),{children:U.map(be=>(Z(be),i(Vr,ee(V({hover:!0},be.getRowProps()),{style:{height:"75px"},children:be.cells.map(he=>i(jo,ee(V({},he.getCellProps()),{padding:"none",children:he.render("Cell")})))}))))}))]})),i(F,{condition:U.length===0,show:i(Vt,{children:"No variants available. Get started by adding one."})}),i("br",{}),i("div",{children:i(F,{condition:N,show:K()})}),i(F1e,{showDialog:g,closeDialog:Y,save:async be=>c?pe(be):ye(be),editing:c,validateName:oe,validateWeight:ue,editVariant:b,title:c?"Edit variant":"Add variant"}),ge]})},H1e=()=>(Sa("Variants"),i(W1e,{})),V1e=bt("api/admin/client-metrics/features"),bO=(e,t)=>{const n=bt(`api/admin/client-metrics/features/${e}/raw?hoursBack=${t}`),{data:r,error:o}=Wt(n,()=>G1e(n)),a=f.exports.useCallback(()=>{Fn(V1e).catch(console.warn)},[]);return{featureMetrics:r==null?void 0:r.data,loading:!o&&!r,refetchFeatureMetrics:a,error:o}},G1e=e=>fetch(e).then(rn("Features")).then(t=>t.json()).then(),Yp=48,q1e=({hoursBack:e,setHoursBack:t})=>{const n=r=>{t(Y1e(r))};return i(Fa,{label:"Period",name:"feature-metrics-period",id:"feature-metrics-period",options:K1e,value:String(e),onChange:n,fullWidth:!0})},Y1e=e=>{switch(e){case"1":return 1;case"24":return 24;default:return Yp}},K1e=[{key:"1",label:"Last hour"},{key:"24",label:"Last 24 hours"},{key:`${Yp}`,label:`Last ${Yp} hours`}],X1e="modulepreload",__={},J1e="/",xO=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${J1e}${r}`,r in __)return;__[r]=!0;const o=r.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const s=document.createElement("link");if(s.rel=o?"stylesheet":X1e,o||(s.as="script",s.crossOrigin=""),s.href=r,document.head.appendChild(s),o)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},Q1e=({metrics:e,tableSectionId:t})=>{const n=an(oo.breakpoints.down("md")),r=f.exports.useMemo(()=>({sortBy:[{id:"timestamp"}]}),[]),{getTableProps:o,getTableBodyProps:a,headerGroups:s,rows:l,prepareRow:c,setHiddenColumns:u}=ct.exports.useTable({initialState:r,columns:Z1e,data:e,disableSortRemove:!0,defaultColumn:{Cell:Bn}},ct.exports.useGlobalFilter,ct.exports.useSortBy);return f.exports.useEffect(()=>{const d=[];n&&d.push("appName","environment"),u(d)},[u,n]),e.length===0?null:w(xa,ee(V({},o()),{rowHeight:"standard",id:t,children:[i(Mo,{headerGroups:s}),i(bo,ee(V({},a()),{children:l.map(d=>(c(d),i(Vr,ee(V({hover:!0},d.getRowProps()),{children:d.cells.map(p=>i(Zo,ee(V({},p.getCellProps()),{children:p.render("Cell")})))}))))}))]}))},Z1e=[{id:"Icon",width:"1%",disableSortBy:!0,Cell:()=>i(rc,{icon:i(vte,{color:"disabled"})})},{Header:"Time",accessor:"timestamp",Cell:e=>i(wa,{value:e.row.original.timestamp})},{Header:"Application",accessor:"appName"},{Header:"Environment",accessor:"environment"},{id:"requested",Header:"Requested",accessor:e=>e.yes+e.no},{Header:"Exposed",accessor:"yes"}],ebe=n=>{var r=n,{metrics:e}=r,t=en(r,["metrics"]);const o=f.exports.useMemo(()=>e.reduce((s,l)=>s+l.yes,0),[e]),a=f.exports.useMemo(()=>e.reduce((s,l)=>s+l.no,0),[e]);return i(mO,ee(V({},t),{totalYes:o,totalNo:a}))},tbe=({metrics:e,hoursBack:t})=>{const n=ga(),r=ga();return e.length===0?w(mt,{mt:6,children:[i(Te,{variant:"body1",paragraph:!0,children:"We have yet to receive any metrics for this feature toggle in the selected time period."}),i(Te,{variant:"body1",paragraph:!0,children:"Please note that, since the SDKs send metrics on an interval, it might take some time before metrics appear."})]}):w(f.exports.Suspense,{fallback:null,children:[i(mt,{borderTop:1,pt:2,mt:3,borderColor:oo.palette.grey[200],children:i(nbe,{metrics:e,hoursBack:t,statsSectionId:n})}),i(mt,{mt:4,children:i(ebe,{metrics:e,hoursBack:t,statsSectionId:n,tableSectionId:r})}),i(mt,{mt:4,children:i(Q1e,{metrics:e,tableSectionId:r})})]})},nbe=hr.lazy(()=>xO(()=>import("./FeatureMetricsChart.4b950cf7.js"),[])),sx=e=>{const{search:t}=window.location,n=Ye(),r=f.exports.useMemo(()=>new URLSearchParams(t),[t]),o=f.exports.useCallback(a=>{const s=new URLSearchParams(t);s.set(e,a),n({search:s.toString()},{replace:!0})},[e,t,n]);return[r.get(e)||void 0,o]},rbe=e=>{const[t,n]=sx(e),r=f.exports.useCallback(o=>n(String(o)),[n]);return[Number.isFinite(Number(t))?Number(t):void 0,r]},obe=le()(e=>({title:{margin:0,marginBottom:".5rem",fontSize:e.fontSizes.smallBody,fontWeight:e.fontWeight.thin,color:e.palette.grey[800]},list:{display:"flex",flexWrap:"wrap",gap:".5rem",listStyleType:"none",padding:0,minHeight:"100%"},item:{"& > [aria-pressed=true]":{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText}}})),I_=({title:e,values:t,value:n,setValue:r})=>{const{classes:o}=Yn(),{classes:a}=obe(),s=c=>()=>{t.has(c)&&r(c)},l=f.exports.useMemo(()=>Array.from(t).sort((c,u)=>c.localeCompare(u)),[t]);return w("div",{children:[i("h2",{className:a.title,children:e}),i("ul",{className:a.list,children:l.map(c=>i("li",{className:a.item,children:i(jr,{label:c,onClick:s(c),"aria-pressed":c===n,className:o.focusable})},c))})]})},abe=le()(e=>({mobileMarginTop:{[e.breakpoints.down("md")]:{marginTop:e.spacing(2)}}})),ibe=()=>{const e=Ve("projectId"),t=Ve("featureId"),n=sbe(e,t),r=lbe(t),{classes:o}=abe();Sa("Metrics");const[a=Yp,s]=rbe("hoursBack"),{featureMetrics:l}=bO(t,a),[c,u]=f.exports.useState(l);f.exports.useEffect(()=>{l&&u(l)},[l]);const d=Array.from(n)[0],p=Array.from(r)[0],[h=d,m]=sx("environment"),[b=p,y]=sx("application"),g=f.exports.useMemo(()=>c==null?void 0:c.filter(x=>x.environment===h).filter(x=>x.appName===b),[c,h,b]);return g?w(Gt,{children:[w(de,{container:!0,component:"header",spacing:2,alignItems:"flex-end",children:[i(de,{item:!0,xs:12,md:5,children:i(F,{condition:n.size>0,show:i(I_,{title:"Environments",values:n,value:h,setValue:m})})}),i(de,{item:!0,xs:12,md:5,children:i(F,{condition:r.size>0,show:i(I_,{title:"Applications",values:r,value:b,setValue:y})})}),i(de,{item:!0,xs:12,md:2,children:i("div",{className:o.mobileMarginTop,children:i(q1e,{hoursBack:a,setHoursBack:s})})})]}),i(tbe,{metrics:g,hoursBack:a})]}):null},sbe=(e,t)=>{const{feature:n}=vr(e,t),r=n.environments.map(o=>o.name);return new Set(r)},lbe=e=>{const{featureMetrics:t=[]}=bO(e,Yp),n=t.map(r=>r.appName);return new Set(n)},cbe=le()(e=>({container:{borderRadius:e.shape.borderRadiusLarge,boxShadow:"none",display:"flex"},header:{backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadiusLarge,marginBottom:"1rem"},toggleInfoContainer:{display:"flex",alignItems:"center"},toolbarContainer:{flexShrink:0,display:"flex"},innerContainer:{padding:"1rem 2rem",display:"flex",justifyContent:"space-between",alignItems:"center",[e.breakpoints.down(500)]:{flexDirection:"column"}},separator:{width:"100%",backgroundColor:e.palette.grey[200],height:"1px"},tabContainer:{padding:"0 2rem"},tabButton:{textTransform:"none",width:"auto",fontSize:"1rem",padding:"0 !important",[e.breakpoints.up("md")]:{minWidth:160}},featureViewHeader:{fontSize:e.fontSizes.mainHeader,fontWeight:"normal",display:"flex",alignItems:"center",wordBreak:"break-all"},statusContainer:{marginLeft:"0.5rem"}})),ube=le()(e=>({innerContainer:{display:"flex"},bodyContainer:{padding:0},listContainer:{width:"20%",borderRight:`1px solid ${e.palette.grey[300]}`,padding:"1rem 0",[e.breakpoints.down("md")]:{width:"35%"}},listItem:{padding:"0.75rem 2rem"},innerBodyContainer:{padding:"2rem",display:"flex",flexDirection:"column",width:400,["& > *"]:{margin:"0.5rem 0"}}})),wO=a=>{var s=a,{enabled:e,value:t,onChange:n,filter:r}=s,o=en(s,["enabled","value","onChange","filter"]);const{projects:l}=Zl();if(!e)return null;const c=d=>({key:d.id,label:d.name,title:d.description});let u;return r?u=l.filter(d=>r(d.id)).map(c):u=l.map(c),t&&!u.find(d=>d.key===t)&&u.push({key:t,label:t}),i(Fa,V({label:"Project",options:u,value:t,onChange:n},o))},dbe=le()(e=>({container:{display:"grid",gap:e.spacing(2),paddingTop:e.spacing(2)}})),pbe=(e,t)=>{const n=new Set(e),r=new Set(t);return n.size!==r.size?!1:[...n].every(o=>r.has(o))},fbe=({projectId:e,open:t,onClose:n,onClick:r,feature:o})=>{const{project:a}=Gi(e),{classes:s}=dbe(),l=f.exports.useMemo(()=>pbe(o.environments.map(c=>c.name),a.environments),[o,a]);return i(F,{condition:l,show:i(ln,{open:t,onClose:n,onClick:r,title:"Confirm change project",primaryButtonText:"Change project",secondaryButtonText:"Cancel",children:w("div",{className:s.container,children:[i(yt,{severity:"success",children:"This feature toggle is compatible with the new project."}),i("p",{children:"Are you sure you want to change the project for this toggle?"})]})}),elseShow:i(ln,{open:t,onClose:n,title:"Confirm change project",secondaryButtonText:"OK",children:w("div",{className:s.container,children:[i(yt,{severity:"warning",children:"Incompatible project environments"}),i("p",{children:"In order to move a feature toggle between two projects, both projects must have the exact same environments enabled."})]})})})},hbe=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=Ve("projectId"),n=Ve("featureId"),{feature:r,refetchFeature:o}=vr(t,n),[a,s]=f.exports.useState(!1),{changeFeatureProject:l}=xo(),{setToastData:c,setToastApiError:u}=tt(),[d,p]=f.exports.useState(t),{projects:h}=Zl(),m=Ye(),b=async()=>{try{d&&(await l(t,n,d),o(),c({title:"Project changed",type:"success"}),s(!1),m(`/projects/${d}/features/${n}/settings`,{replace:!0}))}catch(g){u(Ue(g))}},y=f.exports.useMemo(()=>h.map(g=>g.id).filter(g=>e(Dk,g)),[h,e]);return y.length===0?null:w(Ne,{children:[i(wO,{value:d,onChange:p,label:"Project",filter:g=>y.includes(g),enabled:!0}),i(Mr,{permission:Dk,onClick:()=>s(!0),disabled:d===t,projectId:t,children:"Save"}),i(fbe,{projectId:d,open:a,feature:r,onClose:()=>s(!1),onClick:b})]})},mbe=le()(e=>({container:{display:"flex",alignItems:"center"},header:{fontSize:e.fontSizes.mainHeader}})),gbe=({projectId:e,featureId:t})=>{var s;const{classes:n}=mbe(),{feature:r}=vr(e,t),o=Ye(),a=()=>{o(`/projects/${e}/features/${t}/edit`)};return w(Ne,{children:[w("div",{className:n.container,children:[i(Te,{className:n.header,children:"Feature information"}),i(Ft,{permission:Hi,projectId:e,"data-loading":!0,onClick:a,tooltipProps:{title:"Edit"},children:i(ar,{})})]}),w(Te,{children:["Name: ",i("strong",{children:r.name})]}),w(Te,{children:["Description:"," ",i("strong",{children:(s=r.description)!=null&&s.length?r.description:"no description"})]}),w(Te,{children:["Type: ",i("strong",{children:r.type})]}),w(Te,{children:["Impression Data:"," ",i("strong",{children:r.impressionData?"enabled":"disabled"})]})]})},Wh="metadata",h1="project",vbe=()=>{const{classes:e}=ube(),t=Ve("projectId"),n=Ve("featureId"),[r,o]=f.exports.useState(Wh),{uiConfig:a}=st();return i(Gt,{header:"Settings",bodyClass:e.bodyContainer,children:w("div",{className:e.innerContainer,children:[i("div",{className:e.listContainer,children:w(Po,{children:[i(Rn,{className:e.listItem,button:!0,onClick:()=>o(Wh),selected:r===Wh,children:"Metadata"},0),i(Rn,{className:e.listItem,button:!0,onClick:()=>o(h1),selected:r===h1,hidden:!a.flags.P,children:"Project"},1)]})}),w("div",{className:e.innerBodyContainer,children:[i(F,{condition:r===Wh,show:i(gbe,{projectId:t,featureId:n})}),i(F,{condition:r===h1&&a.flags.P,show:i(hbe,{})})]})]})})},ybe=le()(e=>({dialogFormContent:{["& > *"]:{margin:"0.5rem 0"}}})),bbe=r=>{var o=r,{value:e,onChange:t}=o,n=en(o,["value","onChange"]);const{tagTypes:a}=pC(),s=a.map(l=>({key:l.name,label:l.name,title:l.name}));return i(Ne,{children:i(Fa,V({label:"Tag type",id:"tag-select",options:s,value:e,onChange:t},n))})},xbe=({open:e,setOpen:t})=>{const n={type:"simple",value:""},{classes:r}=ybe(),o=Ve("featureId"),{addTagToFeature:a,loading:s}=xo(),{refetch:l}=c2(o),[c,u]=f.exports.useState({tagError:""}),{setToastData:d}=tt(),[p,h]=f.exports.useState(n),m=()=>{t(!1),u({tagError:""}),h(n)},b=(x,v)=>{const S=V({},p);S[x]=xi(v),h(S)},y=async x=>{x.preventDefault(),p.type||(p.type="simple");try{await a(o,p),t(!1),h(n),l(),d({type:"success",title:"Added tag to toggle",text:"We successfully added a tag to your toggle",confetti:!0})}catch(v){const S=Ue(v);u({tagError:S})}},g="add-tag-form";return i(Ne,{children:i(ln,{open:e,secondaryButtonText:"Cancel",primaryButtonText:"Add tag",title:"Add tags to feature toggle",onClick:y,disabledPrimaryButton:s,onClose:m,formId:g,children:w(Ne,{children:[i(Te,{paragraph:!0,children:"Tags allow you to group features together"}),i("form",{id:g,onSubmit:y,children:w("section",{className:r.dialogFormContent,children:[i(bbe,{autoFocus:!0,name:"type",value:p.type,onChange:x=>b("type",x)}),i("br",{}),i(Sn,{label:"Value",name:"value",placeholder:"Your tag",value:p.value,error:Boolean(c.tagError),errorText:c.tagError,onChange:x=>b("value",x.target.value)})]})})]})})})},wbe=le()(e=>({chip:{background:"transparent",border:`1px solid ${e.palette.primary.main}`,color:e.palette.primary.main}})),Sbe=({stale:e,showActive:t=!0})=>{const{classes:n}=wbe();if(!e&&!t)return null;const r=e?"Feature toggle is deprecated.":"Feature toggle is active.",o=e?"Stale":"Active";return i("div",{"data-loading":!0,style:{marginLeft:"8px"},children:i(jr,{color:"primary",variant:"outlined",className:n.chip,title:r,label:o})})},Cbe=le()(e=>({featureId:{wordBreak:"break-all"}})),SO=()=>{const{data:e,refetch:t,loading:n,error:r}=Fv("apiAdminArchiveFeaturesGet",()=>Fp.apiAdminArchiveFeaturesGet());return{archivedFeatures:e==null?void 0:e.features,refetchArchived:t,loading:n,error:r}},Ebe=()=>{const e=Ve("projectId"),t=Ve("featureId"),{archivedFeatures:n}=SO(),{classes:r}=Cbe(),{uiConfig:o}=st(),a=oC(e,o.flags.E,{name:t});return n?n.some(l=>l.name===t)?w("p",{children:["The feature"," ",i("strong",{className:r.featureId,children:t})," has been archived. You can find it on the"," ",i(Ct,{to:"/archive",children:"archive page"}),"."]}):w("p",{children:["The feature"," ",i("strong",{className:r.featureId,children:t})," does not exist. Would you like to"," ",i(Ct,{to:a,children:"create it"}),"?"]}):null},Tbe=()=>{var A;const e=Ve("projectId"),t=Ve("featureId"),{refetch:n}=Gi(e),{refetchFeature:r}=vr(e,t),[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState(!1),[c,u]=f.exports.useState(!1),d=an(`(max-width:${500}px)`),{feature:p,loading:h,error:m,status:b}=vr(e,t),{classes:y}=cbe(),g=Ye(),{pathname:x}=Gr(),v=Ji(h),S=`/projects/${e}/features/${t}`,E=[{title:"Overview",path:`${S}`,name:"overview"},{title:"Metrics",path:`${S}/metrics`,name:"Metrics"},{title:"Variants",path:`${S}/variants`,name:"Variants"},{title:"Settings",path:`${S}/settings`,name:"Settings"},{title:"Event log",path:`${S}/logs`,name:"Event log"}],R=(A=E.find(_=>_.path===x))!=null?A:E[0];return b===404?i(Ebe,{}):i(F,{condition:m===void 0,show:w("div",{ref:v,children:[w("div",{className:y.header,children:[w("div",{className:y.innerContainer,children:[w("div",{className:y.toggleInfoContainer,children:[w("h1",{className:y.featureViewHeader,"data-loading":!0,children:[p.name," "]}),i(F,{condition:!d,show:i(Sbe,{stale:p==null?void 0:p.stale})})]}),w("div",{className:y.toolbarContainer,children:[i(Ft,{permission:Jl,projectId:e,"data-loading":!0,component:Ct,to:`/projects/${e}/features/${t}/strategies/copy`,tooltipProps:{title:"Copy feature toggle"},children:i(Nv,{})}),i(Ft,{permission:zS,projectId:e,tooltipProps:{title:"Archive feature toggle"},"data-loading":!0,onClick:()=>l(!0),children:i(mte,{})}),i(Ft,{onClick:()=>u(!0),permission:Hi,projectId:e,tooltipProps:{title:"Toggle stale state"},"data-loading":!0,children:i(Hte,{})}),i(Ft,{onClick:()=>a(!0),permission:Hi,projectId:e,tooltipProps:{title:"Add tag"},"data-loading":!0,children:i(RS,{})})]})]}),i("div",{className:y.separator}),i("div",{className:y.tabContainer,children:i(bv,{value:R.path,indicatorColor:"primary",textColor:"primary",children:E.map(_=>i(Ha,{label:_.title,value:_.path,onClick:()=>g(_.path),className:y.tabButton},_.title))})})]}),w(of,{children:[i(Er,{path:"metrics",element:i(ibe,{})}),i(Er,{path:"logs",element:i(w0e,{})}),i(Er,{path:"variants",element:i(H1e,{})}),i(Er,{path:"settings",element:i(vbe,{})}),i(Er,{path:"*",element:i(v1e,{})})]}),i(sO,{isOpen:s,onConfirm:()=>{n(),g(`/projects/${e}`)},onClose:()=>l(!1),projectId:e,featureId:t}),i(iO,{isStale:p.stale,isOpen:c,onClose:()=>{u(!1),r()},featureId:t,projectId:e}),i(xbe,{open:o,setOpen:a})]})})},Rbe=(e={})=>{const t=()=>{const l=bt("api/admin/roles");return fetch(l,{method:"GET"}).then(rn("project roles")).then(c=>c.json())},{data:n,error:r}=Wt("api/admin/roles",t,e),[o,a]=f.exports.useState(!r&&!n),s=()=>{Fn("api/admin/roles")};return f.exports.useEffect(()=>{a(!r&&!n)},[n,r]),{roles:(n==null?void 0:n.roles)||[],error:r,loading:o,refetch:s}},gy=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{createRole:async c=>{const d=t("api/admin/roles",{method:"POST",body:JSON.stringify(c)});try{return await e(d.caller,d.id)}catch(p){throw p}},deleteRole:async c=>{const u=`api/admin/roles/${c}`,d=t(u,{method:"DELETE"});try{return await e(d.caller,d.id)}catch(p){throw p}},editRole:async(c,u)=>{const d=`api/admin/roles/${c}`,p=t(d,{method:"PUT",body:JSON.stringify(u)});try{return await e(p.caller,p.id)}catch(h){throw h}},validateRole:async c=>{const d=t("api/admin/roles/validate",{method:"POST",body:JSON.stringify(c)});try{return await e(d.caller,d.id)}catch(p){throw p}},errors:n,loading:r}},kbe=le()(e=>({deleteParagraph:{marginTop:"2rem"},roleDeleteInput:{marginTop:"1rem"}})),_be=({role:e,open:t,setDeldialogue:n,handleDeleteRole:r,confirmName:o,setConfirmName:a})=>{const{classes:s}=kbe(),l=d=>a(d.currentTarget.value),c=()=>{n(!1),a("")},u="delete-project-role-confirmation-form";return w(ln,{title:"Are you sure you want to delete this role?",open:t,primaryButtonText:"Delete project role",secondaryButtonText:"Cancel",onClick:()=>r(e.id),disabledPrimaryButton:(e==null?void 0:e.name)!==o,onClose:c,formId:u,children:[i(yt,{severity:"error",children:"Danger. Deleting this role will result in removing all permissions that are active in this environment across all feature toggles."}),w("p",{className:s.deleteParagraph,children:["In order to delete this role, please enter the name of the role in the textfield below: ",i("strong",{children:e==null?void 0:e.name})]}),i("form",{id:u,children:i(Sn,{autoFocus:!0,onChange:l,value:o,label:"Role name",className:s.roleDeleteInput})})]})},Ibe="root",Hh="project",Abe=()=>{const e=Ye(),{roles:t,refetch:n,loading:r}=Rbe(),o=an(oo.breakpoints.down("sm")),a=O=>(O==null?void 0:O.type)!==Ibe,s=t.filter(a),{deleteRole:l}=gy(),[c,u]=f.exports.useState(null),[d,p]=f.exports.useState(!1),[h,m]=f.exports.useState(""),{setToastData:b,setToastApiError:y}=tt(),g=async()=>{if(!!(c!=null&&c.id)){try{await l(c==null?void 0:c.id),n(),b({type:"success",title:"Successfully deleted role",text:"Your role is now deleted"})}catch(O){y(Ue(O))}p(!1),m("")}},x=f.exports.useMemo(()=>[{id:"Icon",Cell:()=>i(rc,{icon:i(Mte,{color:"disabled"})}),disableGlobalFilter:!0},{Header:"Project role",accessor:"name"},{Header:"Description",accessor:"description",width:"90%"},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:{id:O,type:L,name:q,description:D}}})=>w(mt,{sx:{display:"flex",justifyContent:"center"},children:[i(Ft,{"data-loading":!0,disabled:L===Hh,onClick:()=>{e(`/admin/roles/${O}/edit`)},permission:sn,tooltipProps:{title:L===Hh?"You cannot edit role":"Edit role"},children:i(ar,{})}),i(Ft,{"data-loading":!0,disabled:L===Hh,onClick:()=>{u({id:O,name:q,description:D}),p(!0)},permission:sn,tooltipProps:{title:L===Hh?"You cannot remove role":"Remove role"},children:i(er,{})})]}),width:100,disableGlobalFilter:!0,disableSortBy:!0}],[e]),v=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}]}),[]),{getTableProps:S,getTableBodyProps:E,headerGroups:R,rows:A,prepareRow:_,state:{globalFilter:N},setGlobalFilter:k,setHiddenColumns:I}=ct.exports.useTable({columns:x,data:s,initialState:v,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0,defaultColumn:{Cell:Wr}},ct.exports.useGlobalFilter,ct.exports.useSortBy);return f.exports.useEffect(()=>{const O=[];o&&O.push("Icon"),I(O)},[I,o]),w(Gt,{isLoading:r,header:i(Dt,{title:"Project roles",actions:w(Ne,{children:[i(jn,{initialValue:N,onChange:k}),i(Dt.Divider,{}),i(nt,{variant:"contained",color:"primary",onClick:()=>e("/admin/create-project-role"),children:"New project role"})]})}),children:[i(so,{value:N,children:w(xa,ee(V({},S()),{children:[i(Mo,{headerGroups:R}),i(bo,ee(V({},E()),{children:A.map(O=>(_(O),i(Vr,ee(V({hover:!0},O.getRowProps()),{children:O.cells.map(L=>i(Zo,ee(V({},L.getCellProps()),{children:L.render("Cell")})))}))))}))]}))}),i(F,{condition:A.length===0,show:i(F,{condition:(N==null?void 0:N.length)>0,show:w(Vt,{children:["No project roles found matching \u201C",N,"\u201D"]}),elseShow:i(Vt,{children:"No project roles available. Get started by adding one."})})}),i(_be,{role:c,open:d,setDeldialogue:p,handleDeleteRole:g,confirmName:h,setConfirmName:m})]})},Nbe=()=>{const{hasAccess:e}=f.exports.useContext(Jt);return w("div",{children:[i(ac,{}),i(F,{condition:e(sn),show:i(Abe,{}),elseShow:i(Du,{})})]})},$be=le()(e=>({environmentPermissionContainer:{marginBottom:"1.25rem"},accordionSummary:{boxShadow:"none",padding:"0"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},accordionHeader:{display:"flex",alignItems:"center",[e.breakpoints.down(500)]:{flexDirection:"column",alignItems:"flex-start"}},accordionBody:{padding:"0",flexWrap:"wrap"},header:{color:e.palette.primary.main},icon:{fill:e.palette.primary.main}})),Pbe=({environment:e,handlePermissionChange:t,checkAllEnvironmentPermissions:n,checkedPermissions:r,getRoleKey:o})=>{var p,h;const[a,s]=f.exports.useState({}),[l,c]=f.exports.useState(0),{classes:u}=$be();f.exports.useEffect(()=>{var b;const m=(b=e==null?void 0:e.permissions)==null?void 0:b.reduce((y,g)=>(y[o(g)]=!0,y),{});s(m)},[(p=e==null?void 0:e.permissions)==null?void 0:p.length]),f.exports.useEffect(()=>{let m=0;Object.keys(r).forEach(b=>{a[b]&&(m=m+1)}),c(m)},[r]);const d=()=>{var b;const m=(b=e==null?void 0:e.permissions)==null?void 0:b.map(y=>i($n,{classes:{root:u.label},control:i(Do,{checked:!!r[o(y)],onChange:()=>t(y,e.name),color:"primary"}),label:y.displayName},o(y)));return m.push(i($n,{classes:{root:u.label},control:i(Do,{checked:!!r[`check-all-environment-${e==null?void 0:e.name}`],onChange:()=>n(e==null?void 0:e.name),color:"primary"}),label:"Select all permissions for this env"},`check-all-environment-${e==null?void 0:e.name}`)),m};return i("div",{className:u.environmentPermissionContainer,children:w(Tu,{style:{boxShadow:"none"},children:[i(ku,{className:u.accordionSummary,expandIcon:i(TS,{className:u.icon,titleAccess:"Toggle"}),children:w("div",{className:u.accordionHeader,children:[i(Tr,{text:e.name,className:u.header,maxWidth:"120",maxLength:25}),"\xA0",w("p",{className:u.header,children:["(",l," /"," ",(h=e==null?void 0:e.permissions)==null?void 0:h.length," permissions)"]})]})}),i(Ru,{className:u.accordionBody,children:d()})]})})},Lf=(e={})=>{const t=()=>{const c=bt("api/admin/permissions");return fetch(c,{method:"GET"}).then(rn("Project permissions")).then(u=>u.json())},n="api/admin/permissions",{data:r,error:o}=Wt(n,t,e),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(n)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{permissions:(r==null?void 0:r.permissions)||{project:[],environments:[]},error:o,loading:a,refetch:l}},Obe=le()(e=>({container:{maxWidth:"400px"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},formHeader:{fontWeight:"normal",marginTop:"0"},header:{fontWeight:"normal"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"}})),ss="check-all-project",m1="check-all-environment",CO=(e="",t="",n={})=>{const{permissions:r}=Lf({revalidateIfStale:!1,revalidateOnReconnect:!1,revalidateOnFocus:!1}),[o,a]=f.exports.useState(e),[s,l]=f.exports.useState(t),[c,u]=f.exports.useState(n),[d,p]=f.exports.useState({}),{validateRole:h}=gy();f.exports.useEffect(()=>{a(e)},[e]),f.exports.useEffect(()=>{l(t)},[t]);const m=I=>{const O=y(b(I));u(O||{})},b=I=>{const{project:O}=r;return!O||O.length===0?void 0:(O.every(q=>I[k(q)])?I[ss]=!0:delete I[ss],I)},y=I=>{const{environments:O}=r;if(!(!O||O.length===0))return O.forEach(L=>{const q=L.permissions.every(H=>I[k(H)]),D=`${m1}-${L.name}`;q?I[D]=!0:delete I[D]}),I},g=()=>{const{environments:I}=r;return[...I.map(L=>`${m1}-${L.name}`),ss]},x=(I,O)=>{let L=Fi(c);L[k(I)]?delete L[k(I)]:L[k(I)]=V({},I),O==="project"?L=b(L):L=y(L),u(L)},v=()=>{const{project:I}=r,O=Fi(c),L=O[ss];I.forEach((q,D)=>{const H=I.length-1===D;L?(O[k(q)]&&delete O[k(q)],H&&delete O[ss]):(O[k(q)]=V({},q),H&&(O[ss]=!0))}),u(O)},S=I=>{const{environments:O}=r,L=Fi(c),q=`${m1}-${I}`,D=O.find(U=>U.name===I);if(!D)return;const H=L[q];D.permissions.forEach((U,Z)=>{const G=D.permissions.length-1===Z;H?(L[k(U)]&&delete L[k(U)],G&&delete L[q]):(L[k(U)]=V({},U),G&&(L[q]=!0))}),u(L)},E=()=>{const I=g(),O=Object.keys(c).filter(L=>!I.includes(L)).map(L=>c[L]);return{name:o,description:s,permissions:O}},R=async()=>{const I=E();try{await h(I)}catch(O){p(L=>ee(V({},L),{name:Ue(O)}))}},A=()=>o.length===0?(p(I=>ee(V({},I),{name:"Name can not be empty."})),!1):!0,_=()=>Object.keys(c).length===0?(p(I=>ee(V({},I),{permissions:"You must include at least one permission."})),!1):!0,N=()=>{p({})},k=I=>I.environment?`${I.id}-${I.environment}`:`${I.id}`;return{roleName:o,roleDesc:s,setRoleName:a,setRoleDesc:l,handlePermissionChange:x,checkAllProjectPermissions:v,checkAllEnvironmentPermissions:S,checkedPermissions:c,getProjectRolePayload:E,validatePermissions:_,validateName:A,handleInitialCheckedPermissions:m,clearErrors:N,validateNameUniqueness:R,errors:d,getRoleKey:k,permissions:r}},EO=({children:e,handleSubmit:t,handleCancel:n,roleName:r,roleDesc:o,setRoleName:a,setRoleDesc:s,checkedPermissions:l,handlePermissionChange:c,checkAllProjectPermissions:u,checkAllEnvironmentPermissions:d,errors:p,mode:h,validateNameUniqueness:m,clearErrors:b,getRoleKey:y})=>{const{classes:g}=Obe(),{permissions:x}=Lf({revalidateIfStale:!1,revalidateOnReconnect:!1,revalidateOnFocus:!1}),{project:v,environments:S}=x,E=()=>{const A=v.map(_=>i($n,{classes:{root:g.label},control:i(Do,{checked:!!l[y(_)],onChange:()=>c(_,"project"),color:"primary"}),label:_.displayName},y(_)));return A.push(i($n,{classes:{root:g.label},control:i(Do,{checked:!!l[ss],onChange:()=>u(),color:"primary"}),label:"Select all project permissions"},ss)),A},R=()=>S.map(A=>i(Pbe,{environment:A,checkedPermissions:l,handlePermissionChange:c,checkAllEnvironmentPermissions:d,getRoleKey:y},A.name));return w("form",{onSubmit:t,children:[w("div",{className:g.container,children:[i("p",{className:g.inputDescription,children:"What is your role name?"}),i(Sn,{className:g.input,label:"Role name",value:r,onChange:A=>a(A.target.value),error:Boolean(p.name),errorText:p.name,onFocus:()=>b(),onBlur:m,autoFocus:!0}),i("p",{className:g.inputDescription,children:"What is this role for?"}),i(At,{className:g.input,label:"Role description",variant:"outlined",multiline:!0,maxRows:4,value:o,onChange:A=>s(A.target.value)})]}),i("div",{className:g.permissionErrorContainer,children:i(F,{condition:Boolean(p.permissions),show:i("span",{className:g.errorMessage,children:"You must select at least one permission for a role."})})}),i("h3",{className:g.header,children:"Project permissions"}),i("div",{children:E()}),i("h3",{className:g.header,children:"Environment permissions"}),i("div",{children:R()}),w("div",{className:g.buttonContainer,children:[e,i(nt,{onClick:n,className:g.cancelButton,children:"Cancel"})]})]})},Ci=n=>{var r=n,{name:e}=r,t=en(r,["name"]);return w(Mr,ee(V({type:"submit"},t),{children:["Create ",e]}))},Dbe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),{roleName:o,roleDesc:a,setRoleName:s,setRoleDesc:l,checkedPermissions:c,handlePermissionChange:u,checkAllProjectPermissions:d,checkAllEnvironmentPermissions:p,getProjectRolePayload:h,validatePermissions:m,validateName:b,validateNameUniqueness:y,errors:g,clearErrors:x,getRoleKey:v}=CO(),{createRole:S,loading:E}=gy();return i(Un,{loading:E,title:"Create project role",description:"A project role can be customised to limit access to resources within a project",documentationLink:"https://docs.getunleash.io/user_guide/rbac#custom-project-roles",documentationLinkLabel:"Project roles documentation",formatApiCode:()=>`curl --location --request POST '${n.unleashUrl}/api/admin/roles' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(h(),void 0,2)}'`,children:i(EO,{errors:g,handleSubmit:async N=>{N.preventDefault(),x();const k=b(),I=m();if(k&&I){const O=h();try{await S(O),r("/admin/roles"),e({title:"Project role created",text:"Now you can start assigning your project roles to project members.",confetti:!0,type:"success"})}catch(L){t(Ue(L))}}},handleCancel:()=>{r(qn)},roleName:o,setRoleName:s,roleDesc:a,setRoleDesc:l,checkedPermissions:c,handlePermissionChange:u,checkAllProjectPermissions:d,checkAllEnvironmentPermissions:p,mode:"Create",clearErrors:x,validateNameUniqueness:y,getRoleKey:v,children:i(Ci,{name:"role",permission:sn})})})},Ei=t=>{var e=en(t,[]);return i(Mr,ee(V({type:"submit"},e),{children:"Save"}))},Lbe=()=>{var L,q,D;const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),r=Ve("id"),{role:o}=Fb(r),a=Ye(),{roleName:s,roleDesc:l,setRoleName:c,setRoleDesc:u,checkedPermissions:d,handlePermissionChange:p,checkAllProjectPermissions:h,checkAllEnvironmentPermissions:m,getProjectRolePayload:b,validatePermissions:y,validateName:g,errors:x,clearErrors:v,getRoleKey:S,handleInitialCheckedPermissions:E,permissions:R}=CO(o.name,o.description);f.exports.useEffect(()=>{var U;const H=(U=o==null?void 0:o.permissions)==null?void 0:U.reduce((Z,G)=>(Z[S(G)]=G,Z),{});E(H||{})},[(L=o==null?void 0:o.permissions)==null?void 0:L.length,(q=R==null?void 0:R.project)==null?void 0:q.length,(D=R==null?void 0:R.environments)==null?void 0:D.length]);const A=()=>`curl --location --request PUT '${e.unleashUrl}/api/admin/roles/${o.id}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(b(),void 0,2)}'`,{refetch:_}=Fb(r),{editRole:N,loading:k}=gy();return i(Un,{loading:k,title:"Edit project role",description:`A project role can be
customised to limit access
to resources within a project`,documentationLink:"https://docs.getunleash.io/user_guide/rbac#custom-project-roles",documentationLinkLabel:"Project roles documentation",formatApiCode:A,children:i(EO,{handleSubmit:async H=>{H.preventDefault();const U=b(),Z=g(),G=y();if(Z&&G)try{await N(r,U),_(),a("/admin/roles"),t({type:"success",title:"Project role updated",text:"Your role changes will automatically be applied to the users with this role.",confetti:!0})}catch(B){n(Ue(B))}},handleCancel:()=>{a(qn)},roleName:s,setRoleName:c,roleDesc:l,setRoleDesc:u,checkedPermissions:d,handlePermissionChange:p,checkAllProjectPermissions:h,checkAllEnvironmentPermissions:m,mode:"Edit",errors:x,clearErrors:v,getRoleKey:S,children:i(Ei,{permission:sn})})})},Mbe=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},roleBox:{margin:"3px 0",border:"1px solid #EFEFEF",padding:"1rem"},userInfoContainer:{margin:"-20px 0"},roleRadio:{marginRight:"15px"},roleSubtitle:{margin:"0.5rem 0"},errorAlert:{marginBottom:"1rem"},flexRow:{display:"flex",alignItems:"center"}})),vy="Edit",Bbe="Create",TO=({children:e,email:t,name:n,rootRole:r,sendEmail:o,setEmail:a,setName:s,setSendEmail:l,setRootRole:c,handleSubmit:u,handleCancel:d,errors:p,clearErrors:h,mode:m})=>{const{classes:b}=Mbe(),{roles:y}=_f(),{uiConfig:g}=st(),x=(v,S)=>S.name[0]<v.name[0]?1:v.name[0]<S.name[0]?-1:0;return w("form",{onSubmit:u,className:b.form,children:[w("div",{className:b.container,children:[i("p",{className:b.inputDescription,children:"Who is the new Unleash user?"}),i(Sn,{className:b.input,label:"Full name",value:n,onChange:v=>s(v.target.value),error:Boolean(p.name),errorText:p.name,onFocus:()=>h(),autoFocus:!0}),i(Sn,{className:b.input,label:"Email",type:"email",value:t,onChange:v=>a(v.target.value),error:Boolean(p.email),errorText:p.email,onFocus:()=>h()}),w(qo,{children:[i(Te,{variant:"subtitle1",className:b.roleSubtitle,"data-loading":!0,children:"What is your team member allowed to do?"}),i(gv,{name:"rootRole",value:r||"",onChange:v=>c(+v.target.value),"data-loading":!0,children:y.sort(x).map(v=>i($n,{labelPlacement:"end",className:b.roleBox,label:w("div",{children:[i("strong",{children:v.name}),i(Te,{variant:"body2",children:v.description})]}),control:i(wl,{checked:v.id===r,className:b.roleRadio}),value:v.id},`role-${v.id}`))})]}),i(F,{condition:m!==vy&&Boolean(g==null?void 0:g.emailEnabled),show:w(qo,{children:[i(Te,{variant:"subtitle1",className:b.roleSubtitle,"data-loading":!0,children:"Should we send an email to your new team member"}),w("div",{className:b.flexRow,children:[i(ro,{name:"sendEmail",onChange:()=>l(!o),checked:o}),i(Te,{children:o?"Yes":"No"})]})]})})]}),w("div",{className:b.buttonContainer,children:[e,i(nt,{onClick:d,className:b.cancelButton,children:"Cancel"})]})]})},RO=(e="",t="",n=1)=>{const{uiConfig:r}=st(),[o,a]=f.exports.useState(e),[s,l]=f.exports.useState(t),[c,u]=f.exports.useState(!1),[d,p]=f.exports.useState(n),[h,m]=f.exports.useState({}),{users:b}=_f();return f.exports.useEffect(()=>{a(e)},[e]),f.exports.useEffect(()=>{l(t)},[t]),f.exports.useEffect(()=>{u((r==null?void 0:r.emailEnabled)||!1)},[r==null?void 0:r.emailEnabled]),f.exports.useEffect(()=>{p(n)},[n]),{name:o,setName:a,email:s,setEmail:l,sendEmail:c,setSendEmail:u,rootRole:d,setRootRole:p,getAddUserPayload:()=>({name:o,email:s,sendEmail:c,rootRole:d}),validateName:()=>o.length===0?(m(S=>ee(V({},S),{name:"Name can not be empty."})),!1):s.length===0?(m(S=>ee(V({},S),{email:"Email can not be empty."})),!1):!0,validateEmail:()=>b.some(S=>S.email===s)?(m(S=>ee(V({},S),{email:"Email already exists"})),!1):!0,clearErrors:()=>{m({})},errors:h}},Fbe=()=>{const{setToastApiError:e}=tt(),{uiConfig:t}=st(),n=Ye(),{name:r,setName:o,email:a,setEmail:s,sendEmail:l,setSendEmail:c,rootRole:u,setRootRole:d,getAddUserPayload:p,validateName:h,validateEmail:m,errors:b,clearErrors:y}=RO(),[g,x]=f.exports.useState(!1),[v,S]=f.exports.useState(""),{addUser:E,userLoading:R}=Kv();return w(Un,{loading:R,title:"Create Unleash user",description:"In order to get access to Unleash needs to have an Unleash root role as Admin, Editor or Viewer. You can also add the user to projects as member or owner in the specific projects.",documentationLink:"https://docs.getunleash.io/user_guide/rbac#standard-roles",documentationLinkLabel:"User management documentation",formatApiCode:()=>`curl --location --request POST '${t.unleashUrl}/api/admin/user-admin' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(p(),void 0,2)}'`,children:[i(TO,{errors:b,handleSubmit:async I=>{I.preventDefault(),y();const O=h(),L=m();if(O&&L){const q=p();try{await E(q).then(D=>D.json()).then(D=>{Yv(),S(D.inviteLink),x(!0)})}catch(D){e(Ue(D))}}},handleCancel:()=>{n(qn)},name:r,setName:o,email:a,setEmail:s,sendEmail:l,setSendEmail:c,rootRole:u,setRootRole:d,clearErrors:y,children:i(Ci,{name:"user",permission:sn})}),i(D3,{open:g,closeConfirm:()=>{x(!1),n("/admin/users")},emailSent:l,inviteLink:v})]})},zbe=(e,t={})=>{const n=()=>{const c=bt(`api/admin/user-admin/${e}`);return fetch(c,{method:"GET"}).then(rn("Users")).then(u=>u.json())},{data:r,error:o}=Wt(`api/admin/user-admin/${e}`,n,t),[a,s]=f.exports.useState(!o&&!r),l=()=>{Fn(`api/admin/user-admin/${e}`)};return f.exports.useEffect(()=>{s(!o&&!r)},[r,o]),{user:r||{},error:o,loading:a,refetch:l}},jbe=()=>{f.exports.useEffect(()=>{Yv()},[]);const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),r=Ve("id"),{user:o,refetch:a}=zbe(r),{updateUser:s,userLoading:l}=Kv(),c=Ye(),{name:u,setName:d,email:p,setEmail:h,sendEmail:m,setSendEmail:b,rootRole:y,setRootRole:g,getAddUserPayload:x,validateName:v,errors:S,clearErrors:E}=RO(o==null?void 0:o.name,o==null?void 0:o.email,o==null?void 0:o.rootRole);return i(Un,{loading:l,title:"Edit user",description:"In order to get access to Unleash needs to have an Unleash root role as Admin, Editor or Viewer. You can also add the user to projects as member or owner in the specific projects.",documentationLink:"https://docs.getunleash.io/user_guide/rbac#standard-roles",documentationLinkLabel:"User management documentation",formatApiCode:()=>`curl --location --request PUT '${e.unleashUrl}/api/admin/user-admin/${r}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(x(),void 0,2)}'`,children:i(TO,{errors:S,handleSubmit:async N=>{N.preventDefault();const k=x();if(v())try{await s(ee(V({},k),{id:r})),a(),c("/admin/users"),t({title:"User information updated",type:"success"})}catch(O){n(Ue(O))}},handleCancel:()=>{c(qn)},name:u,setName:d,email:p,setEmail:h,sendEmail:m,setSendEmail:b,rootRole:y,setRootRole:g,clearErrors:E,mode:vy,children:i(Ei,{permission:sn})})})},kO=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},selectInput:{marginBottom:"1rem",minWidth:"400px",[e.breakpoints.down(600)]:{minWidth:"379px"}},radioGroup:{marginBottom:e.spacing(2)},radioItem:{marginBottom:e.spacing(1)},radio:{marginLeft:e.spacing(1.5)},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},selectOptionsLink:{cursor:"pointer"},selectOptionCheckbox:{marginRight:"0.2rem"}})),Ube=le()(e=>({selectOptionsLink:{cursor:"pointer",fontSize:e.fontSizes.bodySize}})),_O=({isAllSelected:e,onClick:t})=>{const{classes:n}=Ube();return i(mt,{sx:{ml:3.5,my:.5},children:i(Fl,{onClick:t,className:n.selectOptionsLink,component:"button",underline:"hover",children:e?"Deselect all":"Select all"})})},Sd="*",Wbe=t=>{var e=en(t,[]);return i(yr,V({elevation:8},e))},Hbe=({options:e,defaultValue:t=[Sd],onChange:n,disabled:r,error:o,onFocus:a})=>{const{classes:s}=kO(),[l,c]=f.exports.useState(typeof t=="string"?[t]:t),[u,d]=f.exports.useState(typeof t=="string"||t.includes(Sd)),p=l.length>0&&l.length===e.length&&l[0]!==Sd,h=(x,v)=>{v?(d(!0),n([Sd])):(d(!1),n(l.includes(Sd)?[]:l))},m=()=>{const x=p?[]:e.map(({value:v})=>v);c(x),n(x)};return w(mt,{sx:{mt:-1,mb:3},children:[i(mt,{sx:{mt:1,mb:.25,ml:1.5},children:i($n,{disabled:r,"data-testid":"select-all-projects",control:i(Do,{checked:r||u,onChange:h}),label:"ALL current and future projects"})}),i(Bl,{disabled:r||u,multiple:!0,limitTags:2,options:e,disableCloseOnSelect:!0,getOptionLabel:({label:x})=>x,groupBy:()=>"Select/Deselect all",renderGroup:({key:x,children:v})=>w(f.exports.Fragment,{children:[i(F,{condition:e.length>2,show:i(_O,{isAllSelected:p,onClick:m})}),v]},x),fullWidth:!0,PaperComponent:Wbe,renderOption:(x,v,{selected:S})=>w("li",ee(V({},x),{children:[i(Do,{icon:i(Af,{fontSize:"small"}),checkedIcon:i(Nf,{fontSize:"small"}),checked:S,className:s.selectOptionCheckbox}),v.label]})),renderInput:x=>i(At,ee(V({},x),{error:Boolean(o),helperText:o,variant:"outlined",label:"Projects",placeholder:"Select one or more projects",onFocus:a,"data-testid":"select-input"})),value:u||r?e:e.filter(x=>l.includes(x.value)),onChange:(x,v)=>{const S=v.map(({value:E})=>E);c(S),n(S)}})]})};var ta=(e=>(e.ADMIN="ADMIN",e.CLIENT="CLIENT",e.FRONTEND="FRONTEND",e))(ta||{});const Vbe=()=>w(yt,{sx:{mt:4},severity:"info",children:["By default, all ",ta.FRONTEND," tokens may be used from any CORS origin. If you'd like to configure a strict set of origins, please use the"," ",i(Ct,{to:"/admin/cors",target:"_blank",children:"CORS origins configuration page"}),"."]}),Gbe=({children:e,username:t,type:n,projects:r,environment:o,setUsername:a,setTokenType:s,setProjects:l,setEnvironment:c,handleSubmit:u,handleCancel:d,errors:p,clearErrors:h})=>{const{uiConfig:m}=st(),{classes:b}=kO(),{environments:y}=sc(),{projects:g}=Zl(),x=[{key:ta.CLIENT,label:`Server-side SDK (${ta.CLIENT})`,title:"Connect server-side SDK or Unleash Proxy"},{key:ta.ADMIN,label:ta.ADMIN,title:"Full access for managing Unleash"}];m.embedProxy&&x.splice(1,0,{key:ta.FRONTEND,label:`Client-side SDK (${ta.FRONTEND})`,title:"Connect web and mobile SDK directly to Unleash"});const v=g.map(E=>({value:E.id,label:E.name})),S=n===ta.ADMIN?[{key:"*",label:"ALL"}]:y.map(E=>({key:E.name,label:E.name,title:E.name,disabled:!E.enabled}));return w("form",{onSubmit:u,className:b.form,children:[w("div",{className:b.container,children:[i("p",{className:b.inputDescription,children:"Who are you generating the token for?"}),i(Sn,{className:b.input,value:t,name:"username",onChange:E=>a(E.target.value),label:"Username",error:p.username!==void 0,errorText:p.username,onFocus:()=>h("username"),autoFocus:!0}),w(qo,{className:b.radioGroup,children:[i("label",{id:"token-type",className:b.inputDescription,children:"What do you want to connect?"}),i(gv,{"aria-labelledby":"token-type",defaultValue:"CLIENT",name:"radio-buttons-group",value:n,onChange:(E,R)=>s(R),children:x.map(({key:E,label:R,title:A})=>i($n,{value:E,className:b.radioItem,control:i(wl,{className:b.radio}),label:w(Ne,{children:[i(Te,{children:R}),i(Te,{variant:"body2",color:"text.secondary",children:A})]})},E))})]}),i("p",{className:b.inputDescription,children:"Which project do you want to give access to?"}),i(Hbe,{disabled:n===ta.ADMIN,options:v,defaultValue:r,onChange:l,error:p==null?void 0:p.projects,onFocus:()=>h("projects")}),i("p",{className:b.inputDescription,children:"Which environment should the token have access to?"}),i(Fa,{disabled:n===ta.ADMIN,options:S,value:o,onChange:c,label:"Environment",id:"api_key_environment",name:"environment",IconComponent:Gm,fullWidth:!0,className:b.selectInput})]}),w("div",{className:b.buttonContainer,children:[e,i(nt,{onClick:d,className:b.cancelButton,children:"Cancel"})]}),i(F,{condition:n===ta.FRONTEND,show:i(mt,{sx:{mt:4},children:i(Vbe,{})})})]})},qbe=()=>{var v;const{environments:e}=sc(),t=(v=e==null?void 0:e.find(S=>S.enabled))==null?void 0:v.name,[n,r]=f.exports.useState(""),[o,a]=f.exports.useState("CLIENT"),[s,l]=f.exports.useState(["*"]),[c,u]=f.exports.useState(s),[d,p]=f.exports.useState(),[h,m]=f.exports.useState({});return f.exports.useEffect(()=>{p(o==="ADMIN"?"*":t)},[o,t]),{username:n,type:o,projects:s,environment:d,setUsername:r,setTokenType:S=>{S==="ADMIN"?(a(S),u(s),l(["*"]),p("*")):(a(S),l(c),p(t))},setProjects:l,setEnvironment:p,getApiTokenPayload:()=>({username:n,type:o,environment:d,projects:s}),isValid:()=>{const S={};return n||(S.username="Username is required"),s.length===0&&(S.projects="At least one project is required"),m(S),Object.keys(S).length===0},clearErrors:S=>{if(S){const E=V({},h);delete E[S],m(E)}else m({})},errors:h}},Ybe=({token:e})=>{const{setToastData:t}=tt();return w("div",{style:{backgroundColor:"#efefef",padding:"2rem",borderRadius:"3px",margin:"1rem 0",display:"flex",justifyContent:"space-between",alignItems:"center",wordBreak:"break-all"},children:[e,i(wt,{title:"Copy token",arrow:!0,children:i(Ht,{onClick:()=>{fC(e)?t({type:"success",title:"Token copied to clipboard"}):t({type:"error",title:"Could not copy token"})},size:"large",children:i(Xv,{})})})]})},Kbe=({open:e,closeConfirm:t,token:n})=>{const{classes:r}=Yn();return i(ln,{open:e,onClick:t,primaryButtonText:"Close",title:"New token created",children:w("div",{className:r.contentSpacingYLarge,children:[i(Te,{variant:"body1",children:"Your new token has been created successfully."}),i(Ybe,{token:n})]})})},A_="Create API token",Xbe=()=>{const{setToastApiError:e}=tt(),{uiConfig:t}=st(),n=Ye(),[r,o]=f.exports.useState(!1),[a,s]=f.exports.useState(""),{getApiTokenPayload:l,username:c,type:u,projects:d,environment:p,setUsername:h,setTokenType:m,setProjects:b,setEnvironment:y,isValid:g,errors:x,clearErrors:v}=qbe(),{createToken:S,loading:E}=P3();return Sa(A_),w(Un,{loading:E,title:A_,description:"In order to connect to Unleash clients will need an API token to grant access. A client SDK will need to token with 'client privileges', which allows them to fetch feature toggle configuration and post usage metrics back.",documentationLink:"https://docs.getunleash.io/reference/api-tokens-and-client-keys",documentationLinkLabel:"API tokens documentation",formatApiCode:()=>`curl --location --request POST '${t.unleashUrl}/api/admin/api-tokens' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(l(),void 0,2)}'`,children:[i(Gbe,{username:c,type:u,projects:d,environment:p,setEnvironment:y,setTokenType:m,setUsername:h,setProjects:b,errors:x,handleSubmit:async k=>{if(k.preventDefault(),!!g())try{const I=l();await S(I).then(O=>O.json()).then(O=>{Yv(),s(O.secret),o(!0)})}catch(I){e(Ue(I))}},handleCancel:()=>{n(qn)},mode:"Create",clearErrors:v,children:i(Ci,{name:"token",permission:sn})}),i(Kbe,{open:r,closeConfirm:()=>{o(!1),n("/admin/api")},token:a})]})},Mf=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{validateEnvName:async p=>{const m=t("api/admin/environments/validate",{method:"POST",body:JSON.stringify({name:p})},"validateEnvName");try{return await e(m.caller,m.id,!1)}catch(b){throw b}},createEnvironment:async p=>{const m=t("api/admin/environments",{method:"POST",body:JSON.stringify(p)},"createEnvironment");try{return await e(m.caller,m.id)}catch(b){throw b}},errors:n,loading:r,deleteEnvironment:async p=>{const h=`api/admin/environments/${p}`,m=t(h,{method:"DELETE"},"deleteEnvironment");try{return await e(m.caller,m.id)}catch(b){throw b}},updateEnvironment:async(p,h)=>{const m=`api/admin/environments/update/${p}`,b=t(m,{method:"PUT",body:JSON.stringify(h)},"updateEnvironment");try{return await e(b.caller,b.id)}catch(y){throw y}},changeSortOrder:async p=>{const m=t("api/admin/environments/sort-order",{method:"PUT",body:JSON.stringify(p)},"changeSortOrder");try{return await e(m.caller,m.id)}catch(b){throw b}},toggleEnvironmentOff:async p=>{const h=`api/admin/environments/${p}/off`,m=t(h,{method:"POST"},"toggleEnvironmentOff");try{return await e(m.caller,m.id)}catch(b){throw b}},toggleEnvironmentOn:async p=>{const h=`api/admin/environments/${p}/on`,m=t(h,{method:"POST"},"toggleEnvironmentOn");try{return await e(m.caller,m.id)}catch(b){throw b}}}},Jbe=e=>e.reduce((t,n,r)=>(t[n.name]=r+1,t),{}),IO=(e="",t="development")=>{const[n,r]=f.exports.useState(e),[o,a]=f.exports.useState(t),[s,l]=f.exports.useState({});f.exports.useEffect(()=>{r(e)},[e]),f.exports.useEffect(()=>{a(t)},[t]);const{validateEnvName:c}=Mf();return{name:n,setName:r,type:o,setType:a,getEnvPayload:()=>({name:n,type:o}),validateEnvironmentName:async()=>{if(n.length===0)return l(h=>ee(V({},h),{name:"Environment name can not be empty"})),!1;try{return await c(n),!0}catch(h){return l(m=>ee(V({},m),{name:Ue(h)})),!1}},clearErrors:()=>{l({})},errors:s}},Qbe=le()(e=>({container:{maxWidth:"440px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"30px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},formHeader:{fontWeight:"normal",marginTop:"0"},header:{fontWeight:"normal"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"}})),Zbe=le()(e=>({radioGroup:{flexDirection:"row"},formHeader:{fontWeight:"bold",fontSize:e.fontSizes.bodySize,marginTop:"1.5rem",marginBottom:"0.5rem"},radioBtnGroup:{display:"flex",flexDirection:"column"}})),exe=({onChange:e,value:t})=>{const{classes:n}=Zbe();return i(qo,{component:"fieldset",children:w(gv,{"data-loading":!0,value:t,onChange:e,className:n.radioGroup,children:[w("div",{className:n.radioBtnGroup,children:[i($n,{value:"development",label:"Development",control:i(wl,{})}),i($n,{value:"test",label:"Test",control:i(wl,{})})]}),w("div",{style:{display:"flex",flexDirection:"column"},children:[i($n,{value:"preproduction",label:"Pre production",control:i(wl,{})}),i($n,{value:"production",label:"Production",control:i(wl,{})})]})]})})},AO=({children:e,handleSubmit:t,handleCancel:n,name:r,type:o,setName:a,setType:s,validateEnvironmentName:l,errors:c,mode:u,clearErrors:d})=>{const{classes:p}=Qbe();return w("form",{onSubmit:t,className:p.form,children:[i("h3",{className:p.formHeader,children:"Environment information"}),w("div",{className:p.container,children:[i("p",{className:p.inputDescription,children:"What is your environment name? (Can't be changed later)"}),i(Sn,{className:p.input,label:"Environment name",value:r,onChange:h=>a(xi(h.target.value)),error:Boolean(c.name),errorText:c.name,onFocus:()=>d(),onBlur:l,disabled:u==="Edit",autoFocus:!0}),i("p",{className:p.inputDescription,children:"What type of environment do you want to create?"}),i(exe,{onChange:h=>s(h.currentTarget.value),value:o})]}),w("div",{className:p.buttonContainer,children:[e,i(nt,{onClick:n,className:p.cancelButton,children:"Cancel"})]})]})},txe=()=>{const{setToastApiError:e,setToastData:t}=tt(),{uiConfig:n}=st(),r=Ye(),{environments:o}=sc(),a=o.length<7,{createEnvironment:s,loading:l}=Mf(),{refetch:c}=Lf(),{name:u,setName:d,type:p,setType:h,getEnvPayload:m,validateEnvironmentName:b,clearErrors:y,errors:g}=IO(),x=async E=>{if(E.preventDefault(),y(),await b()){const A=m();try{await s(A),c(),t({title:"Environment created",type:"success",confetti:!0}),r("/environments")}catch(_){e(Ue(_))}}},v=()=>`curl --location --request POST '${n.unleashUrl}/api/admin/environments' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(m(),void 0,2)}'`,S=()=>{r(qn)};return i(F,{condition:a,show:i(Un,{loading:l,title:"Create environment",description:"Environments allow you to manage your product lifecycle from local development through production. Your projects and feature toggles are accessible in all your environments, but they can take different configurations per environment. This means that you can enable a feature toggle in a development or test environment without enabling the feature toggle in the production environment.",documentationLink:"https://docs.getunleash.io/user_guide/environments",documentationLinkLabel:"Environments documentation",formatApiCode:v,children:i(AO,{errors:g,handleSubmit:x,handleCancel:S,validateEnvironmentName:b,name:u,type:p,setName:d,setType:h,mode:"Create",clearErrors:y,children:i(Ci,{name:"environment",permission:sn})})}),elseShow:i(Ne,{children:w(Gt,{header:i(Dt,{title:"Create environment"}),children:[i(yt,{severity:"error",children:i("p",{children:"Currently Unleash does not support more than 7 environments. If you need more please reach out."})}),i("br",{}),i(nt,{onClick:S,variant:"contained",color:"primary",children:"Go back"})]})})})},nxe={name:"",type:"",createdAt:"",sortOrder:0,enabled:!1,protected:!1},rxe=(e,t={})=>{const n=async()=>{const u=bt(`api/admin/environments/${e}`);return fetch(u,{method:"GET"}).then(rn("Environment data")).then(d=>d.json())},r=`api/admin/environments/${e}`,{data:o,error:a}=Wt(r,n,V({},t)),[s,l]=f.exports.useState(!a&&!o),c=()=>{Fn(r)};return f.exports.useEffect(()=>{l(!a&&!o)},[o,a]),{environment:o||nxe,error:a,loading:s,refetch:c,FEATURE_CACHE_KEY:r}},oxe=()=>{const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),r=Ve("id"),{environment:o}=rxe(r),{updateEnvironment:a}=Mf(),s=Ye(),{name:l,type:c,setName:u,setType:d,errors:p,clearErrors:h}=IO(o.name,o.type),{refetch:m}=Lf(),b=()=>({type:c,sortOrder:o.sortOrder});return i(Un,{title:"Edit environment",description:"Environments allow you to manage your product lifecycle from local development through production. Your projects and feature toggles are accessible in all your environments, but they can take different configurations per environment. This means that you can enable a feature toggle in a development or test environment without enabling the feature toggle in the production environment.",documentationLink:"https://docs.getunleash.io/user_guide/environments",documentationLinkLabel:"Environments documentation",formatApiCode:()=>`curl --location --request PUT '${e.unleashUrl}/api/admin/environments/update/${r}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(b(),void 0,2)}'`,children:i(AO,{handleSubmit:async v=>{v.preventDefault();try{await a(r,b()),m(),s("/environments"),t({type:"success",title:"Successfully updated environment."})}catch(S){n(Ue(S))}},handleCancel:()=>{s(qn)},name:l,type:c,setName:u,setType:d,mode:"Edit",errors:p,clearErrors:h,children:i(Ei,{permission:sn})})})},yy=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0}),o="api/admin/context";return{createContext:async u=>{const p=t(o,{method:"POST",body:JSON.stringify(u)});try{return await e(p.caller,p.id)}catch(h){throw h}},validateContextName:async u=>{const d=`${o}/validate`,p=t(d,{method:"POST",body:JSON.stringify({name:u})});try{return await e(p.caller,p.id)}catch(h){throw h}},updateContext:async u=>{const d=`${o}/${u.name}`,p=t(d,{method:"PUT",body:JSON.stringify(u)});try{return await e(p.caller,p.id)}catch(h){throw h}},removeContext:async u=>{const d=`${o}/${u}`,p=t(d,{method:"DELETE"});try{return await e(p.caller,p.id)}catch(h){throw h}},errors:n,loading:r}},axe=(e,t={})=>{const n=async()=>{const u=bt(`api/admin/context/${e}`);return fetch(u,{method:"GET"}).then(rn("Context data")).then(d=>d.json())},r=`api/admin/context/${e}`,{data:o,error:a}=Wt(r,n,V({},t)),[s,l]=f.exports.useState(!a&&!o),c=()=>{Fn(r)};return f.exports.useEffect(()=>{l(!a&&!o)},[o,a]),{context:o||{name:"",description:"",legalValues:[],stickiness:!1},error:a,loading:s,refetch:c,FEATURE_CACHE_KEY:r}},ixe=le()(e=>({container:{maxWidth:"470px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},inputHeader:{marginBottom:"0.3rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},tagContainer:{display:"grid",gridTemplateColumns:"1fr auto",gap:"0.5rem",marginBottom:"1rem"},tagInput:{gridColumn:1},tagButton:{gridColumn:2},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},switchContainer:{display:"flex",alignItems:"center",marginLeft:"-9px"}})),sxe=le()(e=>({container:{display:"grid",lineHeight:1.25,gridTemplateColumns:"1fr auto",alignSelf:"start",alignItems:"start",gap:"0.5rem",padding:"0.5rem",background:e.palette.grey[200],borderRadius:e.shape.borderRadius,wordBreak:"break-word"},label:{fontSize:e.fontSizes.smallBody},description:{fontSize:e.fontSizes.smallerBody,color:e.palette.grey[700]},button:{all:"unset",lineHeight:.1,paddingTop:1,display:"block",cursor:"pointer","& svg":{fontSize:"1rem",opacity:.5},"&:hover svg, &:focus-visible svg":{opacity:.75}}})),lxe=({label:e,description:t,onRemove:n})=>{const{classes:r}=sxe();return w("li",{className:r.container,children:[w("div",{children:[i("div",{className:r.label,children:e}),i(F,{condition:Boolean(t),show:()=>i("div",{className:r.description,children:t})})]}),i("button",{onClick:n,className:r.button,children:i(yte,{titleAccess:"Remove"})})]})},cxe=le()(e=>({container:{listStyleType:"none",display:"flex",flexWrap:"wrap",gap:"0.5rem",padding:0,margin:0,marginBottom:"1rem !important"}})),uxe=({children:e})=>{const{classes:t}=cxe();return i("ul",{className:t.container,children:e})},dxe="Enter",NO=({children:e,handleSubmit:t,onCancel:n,contextName:r,contextDesc:o,legalValues:a,stickiness:s,setContextName:l,setContextDesc:c,setLegalValues:u,setStickiness:d,errors:p,mode:h,validateContext:m,setErrors:b,clearErrors:y})=>{const{classes:g}=ixe(),[x,v]=f.exports.useState(""),[S,E]=f.exports.useState(""),[R,A]=f.exports.useState(!1),_=S.trim()&&!x.trim(),N=a.some(D=>D.value.trim()===x.trim());f.exports.useEffect(()=>{b(D=>ee(V({},D),{tag:_?"Value cannot be empty":N?"Duplicate value":void 0}))},[b,_,N]);const k=D=>{D.preventDefault(),t(D)},I=D=>{D.key===dxe&&(D.preventDefault(),R?L():t(D))},O=(D,H)=>D.value.toLowerCase().localeCompare(H.value.toLowerCase()),L=()=>{const D={value:x.trim(),description:S.trim()};D.value&&!N&&(v(""),E(""),u(H=>[...H,D].sort(O)))},q=D=>{u(H=>H.filter(U=>U.value!==D.value))};return w("form",{onSubmit:k,className:g.form,children:[w("div",{className:g.container,children:[i("p",{className:g.inputDescription,children:"What is your context name?"}),i(Sn,{className:g.input,label:"Context name",value:r,disabled:h==="Edit",onChange:D=>l(D.target.value.trim()),error:Boolean(p.name),errorText:p.name,onFocus:()=>y("name"),onBlur:m,autoFocus:!0}),i("p",{className:g.inputDescription,children:"What is this context for?"}),i(At,{className:g.input,label:"Context description (optional)",variant:"outlined",multiline:!0,maxRows:4,value:o,size:"small",onChange:D=>c(D.target.value)}),i("p",{className:g.inputDescription,children:"Which values do you want to allow?"}),w("div",{className:g.tagContainer,children:[i(At,{label:"Legal value (optional)",name:"value",className:g.tagInput,value:x,error:Boolean(p.tag),helperText:p.tag,variant:"outlined",size:"small",onChange:D=>v(D.target.value),onKeyPress:D=>I(D),onBlur:()=>A(!1),onFocus:()=>A(!0),inputProps:{maxLength:100}}),i(At,{label:"Value description (optional)",className:g.tagInput,value:S,variant:"outlined",size:"small",onChange:D=>E(D.target.value),onKeyPress:D=>I(D),onBlur:()=>A(!1),onFocus:()=>A(!0),inputProps:{maxLength:100}}),i(nt,{className:g.tagButton,startIcon:i(io,{}),onClick:L,variant:"outlined",color:"primary",disabled:!x.trim()||N,children:"Add"})]}),i(uxe,{children:a.map(D=>i(lxe,{label:D.value,description:D.description,onRemove:()=>q(D)},D.value))}),i("p",{className:g.inputHeader,children:"Custom stickiness"}),w("p",{children:["By enabling stickiness on this context field you can use it together with the flexible-rollout strategy. This will guarantee a consistent behavior for specific values of this context field. PS! Not all client SDK's support this feature yet!"," ",i("a",{href:"https://docs.getunleash.io/advanced/stickiness",target:"_blank",rel:"noreferrer",children:"Read more"})]}),w("div",{className:g.switchContainer,children:[i(ro,{checked:s,value:s,onChange:()=>d(!s)}),i(Te,{children:s?"On":"Off"})]})]}),w("div",{className:g.buttonContainer,children:[e,i(nt,{onClick:n,className:g.cancelButton,children:"Cancel"})]})]})},$O=(e="",t="",n=[],r=!1)=>{const[o,a]=f.exports.useState(e),[s,l]=f.exports.useState(t),[c,u]=f.exports.useState(n),[d,p]=f.exports.useState(r),[h,m]=f.exports.useState({}),{validateContextName:b}=yy();return f.exports.useEffect(()=>{a(e)},[e]),f.exports.useEffect(()=>{l(t)},[t]),f.exports.useEffect(()=>{u(n)},[n.length]),f.exports.useEffect(()=>{p(r)},[r]),{contextName:o,contextDesc:s,legalValues:c,stickiness:d,setContextName:a,setContextDesc:l,setLegalValues:u,setStickiness:p,getContextPayload:()=>({name:o,description:s,legalValues:c,stickiness:d}),validateContext:async()=>{if(o.length===0)return m(v=>ee(V({},v),{name:"Name can not be empty."})),!1;try{return await b(o),!0}catch(v){return m(S=>ee(V({},S),{name:Ue(v)})),!1}},setErrors:m,clearErrors:v=>{m(v?S=>ee(V({},S),{[v]:void 0}):{})},errors:h}},pxe=()=>{f.exports.useEffect(()=>{Yv()},[]);const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),r=Ve("name"),{context:o,refetch:a}=axe(r),{updateContext:s,loading:l}=yy(),c=Ye(),{contextName:u,contextDesc:d,legalValues:p,stickiness:h,setContextName:m,setContextDesc:b,setLegalValues:y,setStickiness:g,getContextPayload:x,clearErrors:v,setErrors:S,errors:E}=$O(o==null?void 0:o.name,o==null?void 0:o.description,o==null?void 0:o.legalValues,o==null?void 0:o.stickiness);return i(Un,{loading:l,title:"Edit context",description:"Context fields are a basic building block used in Unleash to control roll-out. They can be used together with strategy constraints as part of the activation strategy evaluation.",documentationLink:"https://docs.getunleash.io/user_guide/unleash_context#custom-context-fields",documentationLinkLabel:"Context fields documentation",formatApiCode:()=>`curl --location --request PUT '${e.unleashUrl}/api/admin/context/${r}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(x(),void 0,2)}'`,children:i(NO,{errors:E,handleSubmit:async N=>{N.preventDefault();const k=x();try{await s(k),a(),c("/context"),t({title:"Context information updated",type:"success"})}catch(I){n(Ue(I))}},onCancel:()=>{c(qn)},contextName:u,setContextName:m,contextDesc:d,setContextDesc:b,legalValues:p,setLegalValues:y,stickiness:h,setStickiness:g,mode:"Edit",setErrors:S,clearErrors:v,children:i(Ei,{permission:F$})})})},PO=(e="",t="")=>{const[n,r]=f.exports.useState(e),[o,a]=f.exports.useState(t),[s,l]=f.exports.useState({}),{validateTagName:c}=Vv();return f.exports.useEffect(()=>{r(e)},[e]),f.exports.useEffect(()=>{a(t)},[t]),{tagName:n,tagDesc:o,setTagName:r,setTagDesc:a,getTagPayload:()=>({name:n,description:o}),clearErrors:()=>{l({})},validateNameUniqueness:async()=>{if(n.length===0)return l(h=>ee(V({},h),{name:"Name can not be empty."})),!1;if(n.length<2)return l(h=>ee(V({},h),{name:"Tag name length must be at least 2 characters long"})),!1;try{return await c(n),!0}catch(h){return l(m=>ee(V({},m),{name:Ue(h)})),!1}},errors:s}},fxe=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"}})),OO=({children:e,handleSubmit:t,handleCancel:n,tagName:r,tagDesc:o,setTagName:a,setTagDesc:s,errors:l,mode:c,validateNameUniqueness:u,clearErrors:d})=>{const{classes:p}=fxe();return w("form",{onSubmit:t,className:p.form,children:[w("div",{className:p.container,children:[i("p",{className:p.inputDescription,children:"What is your tag name?"}),i(Sn,{className:p.input,label:"Tag name",value:r,onChange:h=>a(xi(h.target.value)),error:Boolean(l.name),errorText:l.name,onFocus:()=>d(),disabled:c===vy,onBlur:u,autoFocus:!0}),i("p",{className:p.inputDescription,children:"What is this tag for?"}),i(At,{className:p.input,label:"Tag description",variant:"outlined",multiline:!0,maxRows:4,value:o,onChange:h=>s(h.target.value)})]}),w("div",{className:p.buttonContainer,children:[e,i(nt,{onClick:n,className:p.cancelButton,children:"Cancel"})]})]})},hxe=(e,t={})=>{const n=async()=>{const u=bt(`api/admin/tag-types/${e}`);return fetch(u,{method:"GET"}).then(rn("Tag data")).then(d=>d.json())},r=`api/admin/tag-types/${e}`,{data:o,error:a}=Wt(r,n,V({},t)),[s,l]=f.exports.useState(!a&&!o),c=()=>{Fn(r)};return f.exports.useEffect(()=>{l(!a&&!o)},[o,a]),{tagType:(o==null?void 0:o.tagType)||{name:"",description:""},error:a,loading:s,refetch:c,FEATURE_CACHE_KEY:r}},mxe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),o=Ve("name"),{tagType:a}=hxe(o),{tagName:s,tagDesc:l,setTagName:c,setTagDesc:u,getTagPayload:d,errors:p,clearErrors:h}=PO(a==null?void 0:a.name,a==null?void 0:a.description),{updateTagType:m,loading:b}=Vv();return i(Un,{loading:b,title:"Edit tag type",description:"Tag types allow you to group tags together in the management UI",documentationLink:"https://docs.getunleash.io/",documentationLinkLabel:"Tags documentation",formatApiCode:()=>`curl --location --request PUT '${n.unleashUrl}/api/admin/tag-types/${o}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(d(),void 0,2)}'`,children:i(OO,{errors:p,handleSubmit:async v=>{v.preventDefault(),h();const S=d();try{await m(s,S),r("/tag-types"),e({title:"Tag type updated",type:"success"})}catch(E){t(Ue(E))}},handleCancel:()=>{r(qn)},tagName:s,setTagName:c,tagDesc:l,setTagDesc:u,mode:"Edit",clearErrors:h,children:i(Ei,{permission:Mp})})})},gxe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),{tagName:o,tagDesc:a,setTagName:s,setTagDesc:l,getTagPayload:c,validateNameUniqueness:u,errors:d,clearErrors:p}=PO(),{createTag:h,loading:m}=Vv();return i(Un,{loading:m,title:"Create tag type",description:"Tag types allow you to group tags together in the management UI",documentationLink:"https://docs.getunleash.io/advanced/tags",documentationLinkLabel:"Tags documentation",formatApiCode:()=>`curl --location --request POST '${n.unleashUrl}/api/admin/tag-types' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(c(),void 0,2)}'`,children:i(OO,{errors:d,handleSubmit:async x=>{if(x.preventDefault(),p(),await u()){const S=c();try{await h(S),r("/tag-types"),e({title:"Tag type created",confetti:!0,type:"success"})}catch(E){t(Ue(E))}}},handleCancel:()=>{r(qn)},tagName:o,setTagName:s,tagDesc:a,setTagDesc:l,mode:"Create",clearErrors:p,validateNameUniqueness:u,children:i(Ci,{name:"type",permission:Mp})})})},vxe=le()(e=>({form:{display:"flex",flexDirection:"column",height:"100%"},container:{maxWidth:"400px"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"}})),DO=({children:e,handleSubmit:t,handleCancel:n,projectId:r,projectName:o,projectDesc:a,setProjectId:s,setProjectName:l,setProjectDesc:c,errors:u,mode:d,validateProjectId:p,clearErrors:h})=>{const{classes:m}=vxe();return w("form",{onSubmit:t,className:m.form,children:[w("div",{className:m.container,children:[i("p",{className:m.inputDescription,children:"What is your project Id?"}),i(Sn,{className:m.input,label:"Project Id",value:r,onChange:b=>s(xi(b.target.value)),error:Boolean(u.id),errorText:u.id,onFocus:()=>h(),onBlur:p,disabled:d==="Edit",autoFocus:!0,required:!0}),i("p",{className:m.inputDescription,children:"What is your project name?"}),i(Sn,{className:m.input,label:"Project name",value:o,onChange:b=>l(b.target.value),error:Boolean(u.name),errorText:u.name,onFocus:()=>h(),required:!0}),i("p",{className:m.inputDescription,children:"What is your project description?"}),i(At,{className:m.input,label:"Project description",variant:"outlined",multiline:!0,maxRows:4,value:a,onChange:b=>c(b.target.value)})]}),w("div",{className:m.buttonContainer,children:[e,i(nt,{onClick:n,className:m.cancelButton,children:"Cancel"})]})]})},LO=(e="",t="",n="")=>{const[r,o]=f.exports.useState(e),[a,s]=f.exports.useState(t),[l,c]=f.exports.useState(n),[u,d]=f.exports.useState({}),{validateId:p}=ic();f.exports.useEffect(()=>{o(e)},[e]),f.exports.useEffect(()=>{s(t)},[t]),f.exports.useEffect(()=>{c(n)},[n]);const h=()=>({id:r,name:a,description:l});return{projectId:r,projectName:a,projectDesc:l,setProjectId:o,setProjectName:s,setProjectDesc:c,getProjectPayload:h,validateName:()=>a.length===0?(d(g=>ee(V({},g),{name:"Name can not be empty."})),!1):!0,validateProjectId:async()=>{if(r.length===0)return d(g=>ee(V({},g),{id:"Id can not be empty."})),!1;try{return await p(h()),!0}catch(g){return d(x=>ee(V({},x),{id:Ue(g)})),!1}},clearErrors:()=>{d({})},errors:u}},yxe=()=>{const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),{hasAccess:r}=f.exports.useContext(Jt),o=Ve("projectId"),{project:a}=Gi(o),s=Ye(),{projectId:l,projectName:c,projectDesc:u,setProjectId:d,setProjectName:p,setProjectDesc:h,getProjectPayload:m,clearErrors:b,validateProjectId:y,validateName:g,errors:x}=LO(o,a.name,a.description),v=()=>`curl --location --request PUT '${e.unleashUrl}/api/admin/projects/${o}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(m(),void 0,2)}'`,{refetch:S}=Gi(o),{editProject:E,loading:R}=ic(),A=async k=>{k.preventDefault();const I=m();if(g())try{await E(o,I),S(),s(`/projects/${o}`),t({title:"Project information updated",type:"success"})}catch(L){n(Ue(L))}},_=()=>{s(qn)},N=!r(ca,l)&&i(yt,{severity:"error",sx:{mb:4},children:"You do not have the required permissions to edit this project."});return w(Un,{loading:R,title:"Edit project",description:"Projects allows you to group feature toggles together in the management UI.",documentationLink:"https://docs.getunleash.io/user_guide/projects",documentationLinkLabel:"Projects documentation",formatApiCode:v,children:[N,i(DO,{errors:x,handleSubmit:A,handleCancel:_,projectId:l,setProjectId:d,projectName:c,setProjectName:p,projectDesc:u,setProjectDesc:h,mode:"Edit",clearErrors:b,validateProjectId:y,children:i(Ei,{permission:ca,projectId:l})})]})},bxe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{refetchUser:n}=yi(),{uiConfig:r}=st(),o=Ye(),{projectId:a,projectName:s,projectDesc:l,setProjectId:c,setProjectName:u,setProjectDesc:d,getProjectPayload:p,clearErrors:h,validateProjectId:m,validateName:b,errors:y}=LO(),{createProject:g,loading:x}=ic();return i(Un,{loading:x,title:"Create project",description:"Projects allows you to group feature toggles together in the management UI.",documentationLink:"https://docs.getunleash.io/user_guide/projects",documentationLinkLabel:"Projects documentation",formatApiCode:()=>`curl --location --request POST '${r.unleashUrl}/api/admin/projects' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(p(),void 0,2)}'`,children:i(DO,{errors:y,handleSubmit:async R=>{R.preventDefault(),h();const A=b(),_=await m();if(A&&_){const N=p();try{await g(N),n(),o(`/projects/${a}`),e({title:"Project created",text:"Now you can add toggles to this project",confetti:!0,type:"success"})}catch(k){t(Ue(k))}}},handleCancel:()=>{o(qn)},projectId:a,setProjectId:c,projectName:s,setProjectName:u,projectDesc:l,setProjectDesc:d,mode:"Create",clearErrors:h,validateProjectId:m,children:i(Ci,{name:"project",permission:Nb})})})},xxe=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},selectInput:{marginBottom:"1rem",minWidth:"400px",[e.breakpoints.down(600)]:{minWidth:"379px"}},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem",color:e.palette.text.secondary},typeDescription:{fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary,top:"-13px",position:"relative"},formHeader:{fontWeight:"normal",marginTop:"0"},header:{fontWeight:"normal"},permissionErrorContainer:{position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},roleSubtitle:{margin:"0.5rem 0"},flexRow:{display:"flex",alignItems:"center",marginTop:"0.5rem"}})),wxe=s=>{var l=s,{editable:e,value:t,id:n,label:r,onChange:o}=l,a=en(l,["editable","value","id","label","onChange"]);const{featureTypes:c}=rC(),u=c.map(d=>({key:d.id,label:d.name,title:d.description}));return u.some(d=>d.key===t)||u.push({key:t,label:t}),i(Ne,{children:i(Fa,V({disabled:!e,options:u,value:t,onChange:o,label:r,id:n},a))})},Sxe=(e=[],t)=>{let n=!1;const r=e.reduce((o,a)=>(a.permission===sn&&(n=!0),a.project&&a.permission===t&&(o[a.project]=t),o),{});return o=>n||Boolean(r[o])},h2=()=>{const e=Tf();return{permissions:e.data&&"permissions"in e.data?e.data.permissions:void 0,refetchPermissions:e.refetchAuth,loading:e.loading,error:e.error}},MO=({children:e,type:t,name:n,description:r,project:o,setType:a,setName:s,setDescription:l,setProject:c,validateToggleName:u,setImpressionData:d,impressionData:p,handleSubmit:h,handleCancel:m,errors:b,mode:y,clearErrors:g})=>{const{classes:x}=xxe(),{featureTypes:v}=rC(),S=Ye(),{permissions:E}=h2(),R=y!=="Edit",A=()=>{var _;return(_=v.find(N=>N.id===t))==null?void 0:_.description};return w("form",{onSubmit:h,className:x.form,children:[w("div",{className:x.container,children:[i("p",{className:x.inputDescription,children:"What would you like to call your toggle?"}),i(Sn,{autoFocus:!0,disabled:y==="Edit",className:x.input,label:"Name",id:"feature-toggle-name",error:Boolean(b.name),errorText:b.name,onFocus:()=>g(),value:n,onChange:_=>s(xi(_.target.value)),"data-testid":gne,onBlur:u}),i("p",{className:x.inputDescription,children:"What kind of feature toggle do you want?"}),i(wxe,{value:t,onChange:a,label:"Toggle type",id:"feature-type-select",editable:!0,"data-testid":vne,IconComponent:Gm,className:x.selectInput}),i("p",{className:x.typeDescription,children:A()}),i(F,{condition:R,show:i("p",{className:x.inputDescription,children:"In which project do you want to save the toggle?"})}),i(wO,{value:o,onChange:_=>{c(_),S(`/projects/${_}/create-toggle`,{replace:!0})},enabled:R,filter:Sxe(E,Jl),IconComponent:Gm,className:x.selectInput}),i("p",{className:x.inputDescription,children:"How would you describe your feature toggle?"}),i(Sn,{className:x.input,multiline:!0,rows:4,label:"Description",placeholder:"A short description of the feature toggle",value:r,"data-testid":yne,onChange:_=>l(_.target.value)}),w(qo,{className:x.input,children:[i(Te,{variant:"subtitle1",className:x.roleSubtitle,"data-loading":!0,component:"h2",children:"Impression Data"}),w("p",{children:["When you enable impression data for a feature toggle, your client SDKs will emit events you can listen for every time this toggle gets triggered. Learn more in"," ",i("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.getunleash.io/advanced/impression_data",children:"the impression data documentation"})]}),i("div",{className:x.flexRow,children:i($n,{labelPlacement:"start",style:{marginLeft:0},control:i(ro,{name:"impressionData",onChange:()=>d(!p),checked:p}),label:"Enable impression data"})})]})]}),w("div",{className:x.buttonContainer,children:[e,i(nt,{onClick:m,className:x.cancelButton,children:"Cancel"})]})]})},BO=(e="",t="release",n="default",r="",o=!1)=>{const a=Ve("projectId"),s=Vs(),{validateFeatureToggleName:l}=xo(),c=s.get("name"),[u,d]=f.exports.useState(t),[p,h]=f.exports.useState(c||e),[m,b]=f.exports.useState(a||n),[y,g]=f.exports.useState(r),[x,v]=f.exports.useState(o),[S,E]=f.exports.useState({});return f.exports.useEffect(()=>{d(t)},[t]),f.exports.useEffect(()=>{p||h(c||e)},[p,e,c]),f.exports.useEffect(()=>{b(a||n)},[n,a]),f.exports.useEffect(()=>{g(r)},[r]),f.exports.useEffect(()=>{v(o)},[o]),{type:u,setType:d,name:p,setName:h,project:m,setProject:b,description:y,setDescription:g,impressionData:x,setImpressionData:v,getTogglePayload:()=>({type:u,name:p,description:y,impressionData:x}),validateToggleName:async()=>{if(p.length===0)return E(N=>ee(V({},N),{name:"Name can not be empty."})),!1;try{return await l(p),!0}catch(N){return E(k=>ee(V({},k),{name:Ue(N)})),!1}},clearErrors:()=>{E({})},errors:S}},Cxe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{setShowFeedback:n}=f.exports.useContext(Ws),{uiConfig:r}=st(),o=Ye(),{type:a,setType:s,name:l,setName:c,project:u,setProject:d,description:p,setDescription:h,validateToggleName:m,impressionData:b,setImpressionData:y,getTogglePayload:g,clearErrors:x,errors:v}=BO(),{createFeatureToggle:S,loading:E}=xo();return i(Un,{loading:E,title:"Create feature toggle",description:"Feature toggles support different use cases, each with their own specific needs such as simple static routing or more complex routing. The feature toggle is disabled when created and you decide when to enable",documentationLink:"https://docs.getunleash.io/advanced/feature_toggle_types",documentationLinkLabel:"Feature toggle types documentation",formatApiCode:()=>`curl --location --request POST '${r.unleashUrl}/api/admin/projects/${u}/features' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${JSON.stringify(g(),void 0,2)}'`,children:i(MO,{type:a,name:l,project:u,description:p,setType:s,setName:c,setProject:d,setDescription:h,validateToggleName:m,setImpressionData:y,impressionData:b,errors:v,handleSubmit:async N=>{if(N.preventDefault(),x(),await m()){const I=g();try{await S(u,I),o(`/projects/${u}/features/${l}`),e({title:"Toggle created successfully",text:"Now you can start using your toggle.",confetti:!0,type:"success"}),n(!0)}catch(O){t(Ue(O))}}},handleCancel:()=>{o(qn)},mode:"Create",clearErrors:x,children:i(Ci,{name:"feature toggle",permission:Jl,projectId:u,"data-testid":bne})})})},Exe=()=>{const e=Ve("projectId"),t=Ve("featureId"),{setToastData:n,setToastApiError:r}=tt(),{uiConfig:o}=st(),a=Ye(),{patchFeatureToggle:s,loading:l}=xo(),{feature:c}=vr(e,t),{type:u,setType:d,name:p,setName:h,project:m,setProject:b,description:y,setDescription:g,impressionData:x,setImpressionData:v,clearErrors:S,errors:E}=BO(c==null?void 0:c.name,c==null?void 0:c.type,c==null?void 0:c.project,c==null?void 0:c.description,c==null?void 0:c.impressionData),R=()=>{const k=ee(V({},c),{type:u,description:y,impressionData:x});return f2(c,k)};return i(Un,{loading:l,title:"Edit Feature toggle",description:"Feature toggles support different use cases, each with their own specific needs such as simple static routing or more complex routing. The feature toggle is disabled when created and you decide when to enable",documentationLink:"https://docs.getunleash.io/advanced/feature_toggle_types",documentationLinkLabel:"Feature toggle types documentation",formatApiCode:()=>`curl --location --request PATCH '${o.unleashUrl}/api/admin/projects/${e}/features/${t}' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${JSON.stringify(R(),void 0,2)}'`,children:i(MO,{type:u,name:p,project:m,description:y,setType:d,setName:h,setProject:b,setDescription:g,errors:E,handleSubmit:async k=>{k.preventDefault(),S();const I=R();try{await s(m,t,I),a(`/projects/${m}/features/${p}`),n({title:"Toggle updated successfully",type:"success"})}catch(O){r(Ue(O))}},handleCancel:()=>{a(qn)},impressionData:x,setImpressionData:v,mode:"Edit",clearErrors:S,children:i(Ei,{permission:Hi,projectId:m})})})},m2=(e,t={})=>{const n=bt(`api/admin/metrics/applications/${e}`),r=async()=>fetch(n,{method:"GET"}).then(rn("Application")).then(d=>d.json()),o=`api/admin/metrics/applications/${e}`,{data:a,error:s}=Wt(o,r,V({},t)),[l,c]=f.exports.useState(!s&&!a),u=()=>{Fn(o)};return f.exports.useEffect(()=>{c(!s&&!a)},[a,s]),{application:a||{appName:e,color:"",createdAt:"2022-02-02T21:04:00.268Z",descriotion:"",instances:[],strategies:[],seenToggles:[],url:""},error:s,loading:l,refetchApplication:u,APPLICATION_CACHE_KEY:o}},Txe=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=Ve("name"),{application:n}=m2(t),{locationSettings:r}=vi(),{instances:o,strategies:a,seenToggles:s}=n,l=({createUrl:u,name:d,permission:p})=>i(F,{condition:e(p),show:w(Rn,{children:[i(ps,{children:i(Sk,{style:{color:"red"}})}),i(dn,{primary:i(Ct,{to:`${u}`,children:d}),secondary:"Missing, want to create?"})]},`not_found_${d}`),elseShow:w(Rn,{children:[i(ps,{children:i(Sk,{})}),i(dn,{primary:d,secondary:`Could not find feature toggle with name ${d}`})]},`not_found_${d}`)},`not_found_conditional_${d}`),c=({viewUrl:u,name:d,description:p,Icon:h,i:m})=>w(Rn,{children:[i(ps,{children:i(h,{})}),i(dn,{primary:i(Ct,{to:`${u}/${d}`,style:{wordBreak:"break-all"},children:d}),secondary:p})]},`found_${d}-${m}`);return w(de,{container:!0,style:{margin:0},children:[w(de,{item:!0,xl:6,md:6,xs:12,children:[i(Te,{variant:"subtitle1",style:{padding:"1rem 0"},children:"Toggles"}),i(Ur,{}),i(Po,{children:s.map(({name:u,description:d,notFound:p,project:h},m)=>i(F,{condition:p,show:l({createUrl:`/projects/default/create-toggle?name=${u}`,name:u,permission:Jl}),elseShow:c({viewUrl:eg(h,u),name:u,description:d,Icon:Cte,i:m})},`toggle_conditional_${u}`))})]}),w(de,{item:!0,xl:6,md:6,xs:12,children:[i(Te,{variant:"subtitle1",style:{padding:"1rem 0"},children:"Implemented strategies"}),i(Ur,{}),i(Po,{children:a.map(({name:u,description:d,notFound:p},h)=>i(F,{condition:p,show:l({createUrl:"/strategies/create",name:u,permission:Ym}),elseShow:c({viewUrl:"/strategies",name:u,Icon:x$,description:d,i:h})},`strategies_conditional_${u}`))})]}),w(de,{item:!0,xl:12,md:12,children:[w(Te,{variant:"subtitle1",style:{padding:"1rem 0"},children:[o.length," Instances registered"]}),i(Ur,{}),i(Po,{children:o.map(({instanceId:u,clientIp:d,lastSeen:p,sdkVersion:h})=>w(Rn,{children:[i(ps,{children:i(Bte,{})}),i(dn,{primary:i(F,{condition:Boolean(h),show:w("span",{children:[u," ",h]}),elseShow:i("span",{children:u})},`${u}_conditional`),secondary:w("span",{children:[d," last seen at"," ",i("small",{children:qS(p,r.locale)})]})})]},`${u}`))})]})]})};var Rxe=["3d_rotation","ac_unit","access_alarm","access_alarms","access_time","accessibility","accessible","account_balance","account_balance_wallet","account_box","account_circle","adb","add","add_a_photo","add_alarm","add_alert","add_box","add_circle","add_circle_outline","add_location","add_shopping_cart","add_to_photos","add_to_queue","adjust","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","airplanemode_active","airplanemode_inactive","airplay","airport_shuttle","alarm","alarm_add","alarm_off","alarm_on","album","all_inclusive","all_out","android","announcement","apps","archive","arrow_back","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_upward","art_track","aspect_ratio","assessment","assignment","assignment_ind","assignment_late","assignment_return","assignment_returned","assignment_turned_in","assistant","assistant_photo","attach_file","attach_money","attachment","audiotrack","autorenew","av_timer","backspace","backup","battery_alert","battery_charging_full","battery_full","battery_std","battery_unknown","beach_access","beenhere","block","bluetooth","bluetooth_audio","bluetooth_connected","bluetooth_disabled","bluetooth_searching","blur_circular","blur_linear","blur_off","blur_on","book","bookmark","bookmark_border","border_all","border_bottom","border_clear","border_color","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","branding_watermark","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","brightness_auto","brightness_high","brightness_low","brightness_medium","broken_image","brush","bubble_chart","bug_report","build","burst_mode","business","business_center","cached","cake","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","call_to_action","camera","camera_alt","camera_enhance","camera_front","camera_rear","camera_roll","cancel","card_giftcard","card_membership","card_travel","casino","cast","cast_connected","center_focus_strong","center_focus_weak","change_history","chat","chat_bubble","chat_bubble_outline","check","check_box","check_box_outline_blank","check_circle","chevron_left","chevron_right","child_care","child_friendly","chrome_reader_mode","class","clear","clear_all","close","closed_caption","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_queue","cloud_upload","code","collections","collections_bookmark","color_lens","colorize","comment","compare","compare_arrows","computer","confirmation_number","contact_mail","contact_phone","contacts","content_copy","content_cut","content_paste","control_point","control_point_duplicate","copyright","create","create_new_folder","credit_card","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","dashboard","data_usage","date_range","dehaze","delete","delete_forever","delete_sweep","description","desktop_mac","desktop_windows","details","developer_board","developer_mode","device_hub","devices","devices_other","dialer_sip","dialpad","directions","directions_bike","directions_boat","directions_bus","directions_car","directions_railway","directions_run","directions_subway","directions_transit","directions_walk","disc_full","dns","do_not_disturb","do_not_disturb_alt","do_not_disturb_off","do_not_disturb_on","dock","domain","done","done_all","donut_large","donut_small","drafts","drag_handle","drive_eta","dvr","edit","edit_location","eject","email","enhanced_encryption","equalizer","error","error_outline","euro_symbol","ev_station","event","event_available","event_busy","event_note","event_seat","exit_to_app","expand_less","expand_more","explicit","explore","exposure","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","extension","face","fast_forward","fast_rewind","favorite","favorite_border","featured_play_list","featured_video","feedback","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","file_download","file_upload","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_list","filter_none","filter_tilt_shift","filter_vintage","find_in_page","find_replace","fingerprint","first_page","fitness_center","flag","flare","flash_auto","flash_off","flash_on","flight","flight_land","flight_takeoff","flip","flip_to_back","flip_to_front","folder","folder_open","folder_shared","folder_special","font_download","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_fill","format_color_reset","format_color_text","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_numbered","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underlined","forum","forward","forward_10","forward_30","forward_5","free_breakfast","fullscreen","fullscreen_exit","functions","g_translate","gamepad","games","gavel","gesture","get_app","gif","golf_course","gps_fixed","gps_not_fixed","gps_off","grade","gradient","grain","graphic_eq","grid_off","grid_on","group","group_add","group_work","hd","hdr_off","hdr_on","hdr_strong","hdr_weak","headset","headset_mic","healing","hearing","help","help_outline","high_quality","highlight","highlight_off","history","home","hot_tub","hotel","hourglass_empty","hourglass_full","http","https","image","image_aspect_ratio","import_contacts","import_export","important_devices","inbox","indeterminate_check_box","info","info_outline","input","insert_chart","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_photo","invert_colors","invert_colors_off","iso","keyboard","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_hide","keyboard_return","keyboard_tab","keyboard_voice","kitchen","label","label_outline","landscape","language","laptop","laptop_chromebook","laptop_mac","laptop_windows","last_page","launch","layers","layers_clear","leak_add","leak_remove","lens","library_add","library_books","library_music","lightbulb_outline","line_style","line_weight","linear_scale","link","linked_camera","list","live_help","live_tv","local_activity","local_airport","local_atm","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_post_office","local_printshop","local_see","local_shipping","local_taxi","location_city","location_disabled","location_off","location_on","location_searching","lock","lock_open","lock_outline","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loop","loupe","low_priority","loyalty","mail","mail_outline","map","markunread","markunread_mailbox","memory","menu","merge_type","message","mic","mic_none","mic_off","mms","mode_comment","mode_edit","monetization_on","money_off","monochrome_photos","mood","mood_bad","more","more_horiz","more_vert","motorcycle","mouse","move_to_inbox","movie","movie_creation","movie_filter","multiline_chart","music_note","music_video","my_location","nature","nature_people","navigate_before","navigate_next","navigation","near_me","network_cell","network_check","network_locked","network_wifi","new_releases","next_week","nfc","no_encryption","no_sim","not_interested","note","note_add","notifications","notifications_active","notifications_none","notifications_off","notifications_paused","offline_pin","ondemand_video","opacity","open_in_browser","open_in_new","open_with","pages","pageview","palette","pan_tool","panorama","panorama_fish_eye","panorama_horizontal","panorama_vertical","panorama_wide_angle","party_mode","pause","pause_circle_filled","pause_circle_outline","payment","people","people_outline","perm_camera_mic","perm_contact_calendar","perm_data_setting","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","person","person_add","person_outline","person_pin","person_pin_circle","personal_video","pets","phone","phone_android","phone_bluetooth_speaker","phone_forwarded","phone_in_talk","phone_iphone","phone_locked","phone_missed","phone_paused","phonelink","phonelink_erase","phonelink_lock","phonelink_off","phonelink_ring","phonelink_setup","photo","photo_album","photo_camera","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","picture_as_pdf","picture_in_picture","picture_in_picture_alt","pie_chart","pie_chart_outlined","pin_drop","place","play_arrow","play_circle_filled","play_circle_outline","play_for_work","playlist_add","playlist_add_check","playlist_play","plus_one","poll","polymer","pool","portable_wifi_off","portrait","power","power_input","power_settings_new","pregnant_woman","present_to_all","print","priority_high","public","publish","query_builder","question_answer","queue","queue_music","queue_play_next","radio","radio_button_checked","radio_button_unchecked","rate_review","receipt","recent_actors","record_voice_over","redeem","redo","refresh","remove","remove_circle","remove_circle_outline","remove_from_queue","remove_red_eye","remove_shopping_cart","reorder","repeat","repeat_one","replay","replay_10","replay_30","replay_5","reply","reply_all","report","report_problem","restaurant","restaurant_menu","restore","restore_page","ring_volume","room","room_service","rotate_90_degrees_ccw","rotate_left","rotate_right","rounded_corner","router","rowing","rss_feed","rv_hookup","satellite","save","scanner","schedule","school","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","screen_share","sd_card","sd_storage","search","security","select_all","send","sentiment_dissatisfied","sentiment_neutral","sentiment_satisfied","sentiment_very_dissatisfied","sentiment_very_satisfied","settings","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_system_daydream","settings_voice","share","shop","shop_two","shopping_basket","shopping_cart","short_text","show_chart","shuffle","signal_cellular_4_bar","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_null","signal_cellular_off","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_off","sim_card","sim_card_alert","skip_next","skip_previous","slideshow","slow_motion_video","smartphone","smoke_free","smoking_rooms","sms","sms_failed","snooze","sort","sort_by_alpha","spa","space_bar","speaker","speaker_group","speaker_notes","speaker_notes_off","speaker_phone","spellcheck","star","star_border","star_half","stars","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","stop","stop_screen_share","storage","store","store_mall_directory","straighten","streetview","strikethrough_s","style","subdirectory_arrow_left","subdirectory_arrow_right","subject","subscriptions","subtitles","subway","supervisor_account","surround_sound","swap_calls","swap_horiz","swap_vert","swap_vertical_circle","switch_camera","switch_video","sync","sync_disabled","sync_problem","system_update","system_update_alt","tab","tab_unselected","tablet","tablet_android","tablet_mac","tag_faces","tap_and_play","terrain","text_fields","text_format","textsms","texture","theaters","thumb_down","thumb_up","thumbs_up_down","time_to_leave","timelapse","timeline","timer","timer_10","timer_3","timer_off","title","toc","today","toll","tonality","touch_app","toys","track_changes","traffic","train","tram","transfer_within_a_station","transform","translate","trending_down","trending_flat","trending_up","tune","turned_in","turned_in_not","tv","unarchive","undo","unfold_less","unfold_more","update","usb","verified_user","vertical_align_bottom","vertical_align_center","vertical_align_top","vibration","video_call","video_label","video_library","videocam","videocam_off","videogame_asset","view_agenda","view_array","view_carousel","view_column","view_comfy","view_compact","view_day","view_headline","view_list","view_module","view_quilt","view_stream","view_week","vignette","visibility","visibility_off","voice_chat","voicemail","volume_down","volume_mute","volume_off","volume_up","vpn_key","vpn_lock","wallpaper","warning","watch","watch_later","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_sunny","wc","web","web_asset","weekend","whatshot","widgets","wifi","wifi_lock","wifi_tethering","work","wrap_text","youtube_searched_for","zoom_in","zoom_out","zoom_out_map"];const FO=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0}),o="api/admin/metrics/applications";return{storeApplicationMetaData:async(l,c,u)=>{const d={};d[c]=u;const p=`${o}/${l}`,h=t(p,{method:"POST",body:JSON.stringify(d)});try{return await e(h.caller,h.id)}catch(m){throw m}},deleteApplication:async l=>{const c=`${o}/${l}`,u=t(c,{method:"DELETE"});try{return await e(u.caller,u.id)}catch(d){throw d}},errors:n,loading:r}},kxe=({application:e})=>{const{storeApplicationMetaData:t}=FO(),{appName:n,icon:r,url:o,description:a}=e,{refetchApplication:s}=m2(n),[l,c]=f.exports.useState(o||""),[u,d]=f.exports.useState(a||""),{setToastData:p,setToastApiError:h}=tt(),{classes:m}=Yn(),b=async(y,g,x)=>{x==null||x.preventDefault();try{await t(n,y,g),s(),p({type:"success",title:"Updated Successfully",text:`${y} successfully updated`})}catch(v){h(Ue(v))}};return i(de,{container:!0,style:{marginTop:"1rem"},children:w(de,{item:!0,sm:12,xs:12,className:m.contentSpacingY,children:[i(de,{item:!0,children:i(Fa,{name:"iconSelect",id:"selectIcon",label:"Icon",options:Rxe.map(y=>({key:y,label:y})),value:r||"apps",onChange:y=>b("icon",y)})}),i(de,{item:!0,children:i(At,{value:l,onChange:y=>c(y.target.value),label:"Application URL",placeholder:"https://example.com",type:"url",variant:"outlined",size:"small",onBlur:y=>b("url",l,y)})}),i(de,{item:!0,children:i(At,{value:u,label:"Description",variant:"outlined",size:"small",rows:2,onChange:y=>d(y.target.value),onBlur:y=>b("description",u,y)})})]})})},_xe=()=>{const e=Ye(),t=Ve("name"),{application:n,loading:r}=m2(t),{appName:o,url:a,description:s,icon:l="apps",createdAt:c}=n,{hasAccess:u}=f.exports.useContext(Jt),{deleteApplication:d}=FO(),{locationSettings:p}=vi(),{setToastData:h,setToastApiError:m}=tt(),[b,y]=f.exports.useState(!1),g=()=>{y(!b)},x=R=>uu(R,p.locale),v=async R=>{R.preventDefault();try{await d(o),h({title:"Deleted Successfully",text:"Application deleted successfully",type:"success"}),e("/applications")}catch(A){m(Ue(A))}},S=()=>i(ln,{open:b,onClose:g,onClick:v,title:"Are you sure you want to delete this application?"}),E=[{label:"Application overview",component:i(Txe,{})},{label:"Edit application",component:i(kxe,{application:n})}];return r?w("div",{children:[i("p",{children:"Loading..."}),i(XY,{})]}):n?w(Gt,{header:i(Dt,{titleElement:w("span",{style:{display:"flex",alignItems:"center"},children:[i(_u,{style:{marginRight:"8px"},children:i(S4,{children:l||"apps"})}),o]}),title:o,actions:w(Ne,{children:[i(F,{condition:Boolean(a),show:i(Ht,{component:Fl,href:a,size:"large",children:i(Ate,{titleAccess:a})})}),i(Mr,{tooltipProps:{title:"Delete application"},onClick:g,permission:$k,children:"Delete"})]})}),children:[w("div",{children:[i(Te,{variant:"body1",children:s||""}),w(Te,{variant:"body2",children:["Created: ",i("strong",{children:x(c)})]})]}),i(F,{condition:u($k),show:w("div",{children:[S(),i(G3,{tabData:E})]})})]}):w("p",{children:["Application (",o,") not found"]})},Ixe=()=>{const{applications:e,loading:t}=y3(),[n,r]=Ls(),[o,a]=f.exports.useState(n.get("search")||"");f.exports.useEffect(()=>{const c={};o&&(c.search=o),r(c,{replace:!0})},[o,r]);const s=f.exports.useMemo(()=>{const c=new RegExp(o,"i");return o?e==null?void 0:e.filter(u=>c.test(u.appName)):e},[e,o]),l=()=>i(Ne,{children:w("section",{style:{textAlign:"center"},children:[i(Ute,{titleAccess:"Warning"})," ",i("br",{}),i("br",{}),"Oh snap, it does not seem like you have connected any applications. To connect your application to Unleash you will require a Client SDK.",i("br",{}),i("br",{}),"You can read more about how to use Unleash in your application in the"," ",i("a",{href:"https://docs.getunleash.io/docs/sdks/",children:"documentation."})]})});return s?i(Ne,{children:i(Gt,{header:i(Dt,{title:"Applications",actions:i(jn,{initialValue:o,onChange:a})}),children:i("div",{className:Il.fullwidth,children:i(F,{condition:s.length>0,show:i(iC,{apps:s}),elseShow:i(F,{condition:t,show:i("div",{children:"...loading"}),elseShow:l()})})})})}):i(cG,{variant:"indeterminate"})},Axe=()=>{const e=an("(max-width:700px)"),t=Ye();return i(F,{condition:e,show:i(Ft,{permission:Km,onClick:()=>t("/context/create"),size:"large",tooltipProps:{title:"Add context type"},children:i(io,{})}),elseShow:i(Mr,{onClick:()=>t("/context/create"),permission:Km,color:"primary",variant:"contained",children:"New context field"})})},Nxe=({name:e,onDelete:t})=>{const n=Ye();return w(Lo,{children:[i(Ft,{permission:F$,onClick:()=>n(`/context/edit/${e}`),"data-loading":!0,"aria-label":"edit",tooltipProps:{title:"Edit context field"},children:i(ar,{})}),i(Ft,{permission:poe,onClick:t,"data-loading":!0,"aria-label":"delete",tooltipProps:{title:"Delete context field"},children:i(er,{})})]})},$xe=()=>{const[e,t]=f.exports.useState(!1),[n,r]=f.exports.useState(),{context:o,refetchUnleashContext:a,loading:s}=wi(),{removeContext:l}=yy(),{setToastData:c,setToastApiError:u}=tt(),d=f.exports.useMemo(()=>s?Array(5).fill({name:"Context name",description:"Context description when loading"}):o.map(({name:R,description:A,sortOrder:_})=>({name:R,description:A,sortOrder:_})).sort((R,A)=>R.sortOrder-A.sortOrder),[o,s]),p=f.exports.useMemo(()=>[{id:"Icon",Cell:()=>i(rc,{icon:i(fte,{color:"disabled"})}),disableGlobalFilter:!0},{Header:"Name",accessor:"name",width:"90%",Cell:({row:{original:{name:R,description:A}}})=>i(bi,{title:R,to:`/context/edit/${R}`,subtitle:A}),sortType:"alphanumeric"},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:{name:R}}})=>i(Nxe,{name:R,onDelete:()=>{r(R),t(!0)}}),width:150,disableGlobalFilter:!0,disableSortBy:!0},{accessor:"description",disableSortBy:!0},{accessor:"sortOrder",disableGlobalFilter:!0,sortType:"number"}],[]),h=f.exports.useMemo(()=>({sortBy:[{id:"name",desc:!1}],hiddenColumns:["description","sortOrder"]}),[]),m=async()=>{try{if(n===void 0)throw new Error;await l(n),a(),c({type:"success",title:"Successfully deleted context",text:"Your context is now deleted"})}catch(R){u(Ue(R))}r(void 0),t(!1)},{getTableProps:b,getTableBodyProps:y,headerGroups:g,rows:x,prepareRow:v,state:{globalFilter:S},setGlobalFilter:E}=ct.exports.useTable({columns:p,data:d,initialState:h,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0},ct.exports.useGlobalFilter,ct.exports.useSortBy);return w(Gt,{isLoading:s,header:i(Dt,{title:"Context fields",actions:w(Ne,{children:[i(jn,{initialValue:S,onChange:E}),i(Dt.Divider,{}),i(Axe,{})]})}),children:[i(so,{value:S,children:w(xa,ee(V({},b()),{children:[i(Mo,{headerGroups:g}),i(bo,ee(V({},y()),{children:x.map(R=>(v(R),i(Vr,ee(V({hover:!0},R.getRowProps()),{children:R.cells.map(A=>i(Zo,ee(V({},A.getCellProps()),{children:A.render("Cell")})))}))))}))]}))}),i(F,{condition:x.length===0,show:i(F,{condition:(S==null?void 0:S.length)>0,show:w(Vt,{children:["No contexts found matching \u201C",S,"\u201D"]}),elseShow:i(Vt,{children:"No contexts available. Get started by adding one."})})}),i(ln,{open:e,onClick:m,onClose:()=>{r(void 0),t(!1)},title:"Really delete context field"})]})},N_=()=>{const e=Ve("featureId"),{features:t=[]}=GS(),[n,r]=f.exports.useState();return f.exports.useEffect(()=>{const o=t.find(a=>a.name===e);r(o)},[t,e]),n!=null&&n.project?i(Yi,{to:eg(n.project,n.name),replace:!0}):null},Pxe=ao("form")({display:"flex",flexDirection:"column",height:"100%",gap:"1rem"}),Cc=ao("section")({marginBottom:"36px"}),lx=ao("p")({marginBottom:"0.5rem"}),Oxe=ao("div")({maxWidth:"600px"}),Dxe=ao("div")({marginTop:"auto",display:"flex",justifyContent:"flex-end"}),Lxe=ao("section")(({theme:e})=>({"padding-top":"16px","& > *":{marginRight:e.spacing(1)}})),$_=ao(At)({width:"100%",marginBottom:"1rem",marginTop:"0px"}),Mxe=ao($n)({paddingBottom:"16px"}),zO=ao("h4")({marginBottom:"8px"}),Bxe=ao("div")({marginTop:"25px"}),Fxe=({type:e="text",sensitive:t=!1},n)=>t&&n===zxe||e==="textfield"?"text":e,zxe="*****",jxe=({definition:e,config:t,parametersErrors:n,setParameterValue:r})=>{const o=t.parameters[e.name]||"",a=Fxe(e,o),s=n[e.name];return i(Bxe,{children:i(At,{size:"small",style:{width:"100%"},minRows:e.type==="textfield"?9:0,multiline:e.type==="textfield",type:a,label:e.displayName,name:e.name,placeholder:e.placeholder||"",InputLabelProps:{shrink:!0},value:o,error:Boolean(s),onChange:r(e.name),variant:"outlined",helperText:e.description})})},Uxe=({provider:e,config:t,parametersErrors:n,setParameterValue:r,editMode:o})=>e?w(hr.Fragment,{children:[i(zO,{children:"Parameters"}),o?w("p",{children:['Sensitive parameters will be masked with value "',i("i",{children:"*****"}),`". If you don't change the value they will not be updated when saving.`]}):null,e.parameters.map(a=>i(jxe,{definition:a,parametersErrors:n,config:t,setParameterValue:r},a.name))]}):null,Vh="*",Wxe=ao(Do)(()=>({marginRight:"0.2em"})),Hxe=t=>{var e=en(t,[]);return i(yr,V({elevation:8},e))},g1=({options:e,selectedItems:t,onChange:n,error:r,onFocus:o,entityName:a,selectAllEnabled:s=!0,description:l})=>{const[c,u]=f.exports.useState(t.includes(Vh)),d=v=>i(At,ee(V({},v),{error:Boolean(r),helperText:r,variant:"outlined",label:`${se(a)}s`,placeholder:`Select ${a}s to filter by`,onFocus:o,"data-testid":`select-${a}-input`})),p=t.length>0&&t.length===e.length&&t[0]!==Vh,h=(v,S)=>{S?(u(!0),n([Vh])):(u(!1),n(t.includes(Vh)?[]:t))},m=()=>{const v=p?[]:e.map(({value:S})=>S);n(v)},b=(v,S,{selected:E})=>w("li",ee(V({},v),{children:[i(Wxe,{icon:i(Af,{fontSize:"small"}),checkedIcon:i(Nf,{fontSize:"small"}),checked:E}),S.label]})),y=({key:v,children:S})=>w(f.exports.Fragment,{children:[i(F,{condition:e.length>2&&s,show:i(_O,{isAllSelected:p,onClick:m})}),S]},v),g=()=>i(Mxe,{"data-testid":`select-all-${a}s`,control:i(Do,{checked:c,onChange:h}),label:`ALL current and future ${a}s`}),x=()=>w(lx,{children:["Selecting ",a,"(s) here will filter events so that your addon will only receive events that are tagged with one of your"," ",a,"s."]});return w(hr.Fragment,{children:[w(zO,{children:[se(a),"s"]}),i(F,{condition:l!==void 0,show:i(lx,{children:l})}),i(F,{condition:s,show:i(x,{})}),i("span",{className:Il.error,children:r}),i(F,{condition:s,show:i(g,{})}),i(Bl,{sx:{mb:8},disabled:c,multiple:!0,limitTags:2,options:e,disableCloseOnSelect:!0,getOptionLabel:({label:v})=>v,fullWidth:!0,groupBy:()=>"Select/Deselect all",renderGroup:y,PaperComponent:Hxe,renderOption:b,renderInput:d,value:c?e:e.filter(v=>t.includes(v.value)),onChange:(v,S)=>{const E=S.map(({value:R})=>R);n(E)}})]})},jO=({editMode:e,provider:t,addon:n,fetch:r})=>{const{createAddon:o,updateAddon:a}=T3(),{setToastData:s,setToastApiError:l}=tt(),c=Ye(),u=zs(),{projects:d}=Zl(),p=d.map(G=>({value:G.id,label:G.name})),{environments:h}=sc(),m=h.map(G=>({value:G.name,label:G.name})),b=t==null?void 0:t.events.map(G=>({value:G,label:G})),{uiConfig:y}=st(),[g,x]=f.exports.useState(n),[v,S]=f.exports.useState({containsErrors:!1,parameters:{}}),E=e?"Update":"Create";let R=`${y.unleashUrl}/api/admin/addons${e?`/${g.id}`:""}`;const A=()=>`curl --location --request ${e?"PUT":"POST"} '${R}' \\
        --header 'Authorization: INSERT_API_KEY' \\
        --header 'Content-Type: application/json' \\
        --data-raw '${JSON.stringify(g,void 0,2)}'`;f.exports.useEffect(()=>{t||r()},[r,t]),f.exports.useEffect(()=>{x(V({},n))},[n.description,n.provider]),f.exports.useEffect(()=>{t&&!g.provider&&x(ee(V({},n),{provider:t.name}))},[t,n,g.provider]);const _=G=>B=>{B.preventDefault(),x(ee(V({},g),{[G]:B.target.value}))},N=G=>{G.preventDefault(),x(({enabled:B})=>ee(V({},g),{enabled:!B}))},k=G=>B=>{B.preventDefault(),x(ia(Y=>{Y.parameters[G]=B.target.value}))},I=G=>{x(ia(B=>{B.events=G})),S(B=>ee(V({},B),{events:void 0}))},O=G=>{x(ia(B=>{B.projects=G})),S(B=>ee(V({},B),{projects:void 0}))},L=G=>{x(ia(B=>{B.environments=G})),S(B=>ee(V({},B),{environments:void 0}))},q=()=>{c(qn)},D=async G=>{if(G.preventDefault(),!t)return;const B=Fi(v);if(B.containsErrors=!1,g.events.length===0&&(B.events="You must listen to at least one event",B.containsErrors=!0),t.parameters.forEach(Y=>{const K=xi(g.parameters[Y.name]);Y.required&&!K&&(B.parameters[Y.name]="This field is required",B.containsErrors=!0)}),B.containsErrors){S(B);return}try{e?(await a(g),c("/addons"),s({type:"success",title:"Addon updated successfully"})):(await o(g),c("/addons"),s({type:"success",confetti:!0,title:"Addon created successfully"}))}catch(Y){const K=Ue(Y);l(K),S({parameters:{},general:K,containsErrors:!0})}},{name:H,description:U,documentationUrl:Z="https://unleash.github.io/docs/addons"}=t||{};return i(Un,{title:`${E} ${H} addon`,description:U||"",documentationLink:Z,documentationLinkLabel:"Addon documentation",formatApiCode:A,children:w(Pxe,{onSubmit:D,children:[w(Oxe,{children:[w(Cc,{children:[i($_,{size:"small",label:"Provider",name:"provider",value:g.provider,disabled:!0,hidden:!0,variant:"outlined"}),i($n,{control:i(ro,{checked:g.enabled,onClick:N}),label:g.enabled?"Enabled":"Disabled"})]}),w(Cc,{children:[i(lx,{children:"What is your addon description?"}),i($_,{size:"small",style:{width:"80%"},minRows:4,multiline:!0,label:"Description",name:"description",placeholder:"",value:g.description,error:Boolean(v.description),helperText:v.description,onChange:_("description"),variant:"outlined"})]}),i(Cc,{children:i(g1,{options:b||[],selectedItems:g.events,onChange:I,entityName:"event",selectAllEnabled:!1,description:"Select what events you want your addon to be notified about"})}),i(Cc,{children:i(g1,{options:p,selectedItems:g.projects||[],onChange:O,entityName:"project",selectAllEnabled:!0})}),i(Cc,{children:i(g1,{options:m,selectedItems:g.environments||[],onChange:L,entityName:"environment",selectAllEnabled:!0})}),i(Cc,{children:i(Uxe,{provider:t,config:g,parametersErrors:v.parameters,editMode:e,setParameterValue:k})})]}),i(Ur,{}),i(Dxe,{children:w(Lxe,{theme:u,children:[i(Mr,{type:"submit",color:"primary",variant:"contained",permission:sn,children:E}),i(nt,{type:"button",onClick:q,children:"Cancel"})]})})]})})},UO={provider:"",description:"",enabled:!0,parameters:{},events:[],projects:[],environments:[]},Vxe=()=>{const e=Ve("providerId"),{providers:t,refetchAddons:n}=Gv(),r=!1,o=t.find(s=>s.name===e),a=ee(V({},Fi(UO)),{provider:o?o.name:""});return i(jO,{editMode:r,provider:o,fetch:n,addon:a})},Gxe=()=>{const e=Ve("addonId"),{providers:t,addons:n,refetchAddons:r}=Gv(),o=!0,a=n.find(l=>l.id===Number(e))||V({},Fi(UO)),s=a?t.find(l=>l.name===a.provider):void 0;return i(jO,{editMode:o,provider:s,fetch:r,addon:a})},qxe="_header_1nxx3_1",Yxe="_content_1nxx3_10",Kxe="_text_1nxx3_25";var v1={header:qxe,content:Yxe,text:Kxe};const Xxe=()=>{const[e,t]=f.exports.useState(!0),[n,r]=f.exports.useState(""),[o,a]=f.exports.useState(),[s,l]=f.exports.useState(),{cloneFeatureToggle:c,validateFeatureToggleName:u}=xo(),d=Ve("featureId"),p=Ve("projectId"),{feature:h}=vr(p,d),m=Ye(),b=v=>{const S=xi(v.target.value);l(S)},y=()=>{t(v=>!v)},g=async()=>{try{return await u(s),a(void 0),!0}catch(v){a(Ue(v))}return!1},x=async v=>{if(v.preventDefault(),!!await g())try{await c(p,d,{name:s,replaceGroupId:e}),m(eg(p,s))}catch(E){r(Ue(E))}};return!h||!h.name?i("span",{children:"Toggle not found"}):w(yr,{className:Il.fullwidth,style:{overflow:"visible"},children:[i("div",{className:v1.header,children:w("h1",{children:["Copy\xA0",d]})}),i(F,{condition:Boolean(n),show:i(yt,{severity:"error",children:n})}),w("section",{className:v1.content,children:[w("p",{className:v1.text,children:["You are about to create a new feature toggle by cloning the configuration of feature toggle\xA0",i(Ct,{to:eg(p,d),children:d}),". You must give the new feature toggle a unique name before you can proceed."]}),w("form",{onSubmit:x,children:[i(At,{label:"Name",name:"name",value:s||"",onBlur:g,onChange:b,error:o!==void 0,helperText:o,variant:"outlined",size:"small","aria-required":!0,autoFocus:!0}),i($n,{control:i(ro,{value:e,checked:e,onChange:y}),label:"Replace groupId"}),w(nt,{type:"submit",color:"primary",variant:"contained",children:[i(Nv,{}),"\xA0\xA0\xA0 Create from copy"]})]})]})]})},Jxe=()=>{const{hasAccess:e}=f.exports.useContext(Jt);return i(F,{condition:e(sn),show:()=>i(pO,{title:"Event log"}),elseShow:i(Du,{})})},WO=(e="",t="",n=[])=>{const[r,o]=f.exports.useState(e),[a,s]=f.exports.useState(t),[l,c]=f.exports.useState(n),[u,d]=f.exports.useState({}),{strategies:p}=ec();return f.exports.useEffect(()=>{o(e)},[e]),f.exports.useEffect(()=>{s(t)},[t]),f.exports.useEffect(()=>{c(n)},[JSON.stringify(n)]),{strategyName:r,strategyDesc:a,params:l,setStrategyName:o,setStrategyDesc:s,setParams:c,getStrategyPayload:()=>({name:r,description:a,parameters:l}),validateStrategyName:()=>r.length===0?(d(g=>ee(V({},g),{name:"Name can not be empty."})),!1):p.some(g=>g.name===r)?(d(g=>ee(V({},g),{name:"A strategy name with that name already exist"})),!1):!0,validateParams:()=>{let g=!0;for(const[x,v]of Object.entries(l))l.forEach((S,E)=>{S.name.length===0&&(d(R=>ee(V({},R),{[`paramName${E}`]:"Name can not be empty"})),g=!1)});return g},setErrors:d,clearErrors:()=>{d({})},errors:u}},Qxe=le()(e=>({container:{maxWidth:400},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},selectInput:{marginBottom:"1rem",minWidth:"400px",[e.breakpoints.down(600)]:{minWidth:"379px"}},link:{color:e.palette.primary.light},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},typeDescription:{fontSize:e.fontSizes.smallBody,color:e.palette.grey[600],top:"-13px",position:"relative"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},flexRow:{display:"flex",alignItems:"center",marginTop:"0.5rem"},paramButton:{color:e.palette.primary.dark}})),Zxe=le()(e=>({paramsContainer:{maxWidth:"400px",margin:"1rem 0"},divider:{borderStyle:"dashed",margin:"1rem 0 1.5rem 0",borderColor:e.palette.grey[500]},nameContainer:{display:"flex",alignItems:"center",marginBottom:"1rem"},name:{minWidth:"365px",width:"100%"},input:{minWidth:"365px",width:"100%",marginBottom:"1rem"},description:{minWidth:"365px",marginBottom:"1rem"},checkboxLabel:{marginTop:"-0.5rem"},inputDescription:{marginBottom:"0.5rem"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},paramButton:{color:e.palette.primary.dark}})),ewe=[{key:"string",label:"string"},{key:"percentage",label:"percentage"},{key:"list",label:"list"},{key:"number",label:"number"},{key:"boolean",label:"boolean"}],twe=({set:e,input:t,index:n,params:r,setParams:o,errors:a})=>{const{classes:s}=Zxe(),l=c=>{e({type:c})};return w("div",{className:s.paramsContainer,children:[i(Ur,{className:s.divider}),i(F,{condition:n===0,show:w("p",{className:s.input,children:["Parameters let you provide arguments to your strategy that it can access for evaluation. Read more in the"," ",i("a",{href:"https://docs.getunleash.io/advanced/custom_activation_strategy#parameter-types",target:"_blank",rel:"noreferrer",children:"parameter types documentation"}),"."]})}),w("div",{className:s.nameContainer,children:[i(Sn,{autoFocus:!0,label:`Parameter name ${n+1}*`,onChange:c=>e({name:c.target.value}),value:t.name,className:s.name,error:Boolean(a==null?void 0:a[`paramName${n}`]),errorText:a==null?void 0:a[`paramName${n}`]}),i(wt,{title:"Remove parameter",arrow:!0,children:i(Ht,{onClick:()=>{o(r.filter((c,u)=>u!==n))},size:"large",children:i(er,{})})})]}),i(Fa,{label:"Type*",name:"type",options:ewe,value:t.type,onChange:l,id:`prop-type-${n}-select`,className:s.input}),i(Sn,{rows:2,multiline:!0,label:`Parameter name ${n+1} description`,onChange:({target:c})=>e({description:c.value}),value:t.description,className:s.description}),i($n,{control:i(Do,{checked:Boolean(t.required),onChange:()=>e({required:!t.required})}),label:"Required",className:s.checkboxLabel})]})},nwe=({input:e=[],updateParameter:t,setParams:n,errors:r})=>i("div",{style:{marginTop:"0.5rem"},children:e.map((o,a)=>i(twe,{params:e,set:s=>t(a,s),index:a,input:e[a],setParams:n,errors:r},a))}),HO=({children:e,handleSubmit:t,handleCancel:n,strategyName:r,strategyDesc:o,params:a,setParams:s,setStrategyName:l,validateStrategyName:c,setStrategyDesc:u,errors:d,mode:p,clearErrors:h})=>{const{classes:m}=Qxe(),b=(g,x)=>{let v=V({},a[g]);a[g]=Object.assign({},v,x),s(S=>[...S])},y=()=>{s(g=>[...g,{name:"",type:"string",description:"",required:!1}])};return w("form",{onSubmit:t,className:m.form,children:[w("div",{className:m.container,children:[i("p",{className:m.inputDescription,children:"What would you like to call your strategy?"}),i(Sn,{disabled:p==="Edit",autoFocus:!0,className:m.input,label:"Strategy name*",value:r,onChange:g=>l(xi(g.target.value)),error:Boolean(d.name),errorText:d.name,onFocus:h,onBlur:c}),i("p",{className:m.inputDescription,children:"What is your strategy description?"}),i(Sn,{className:m.input,label:"Strategy description",value:o,onChange:g=>u(g.target.value),rows:2,multiline:!0}),i(nwe,{input:a,updateParameter:b,setParams:s,errors:d}),i(nt,{onClick:g=>{g.preventDefault(),y()},variant:"outlined",color:"secondary",className:m.paramButton,startIcon:i(io,{}),children:"Add parameter"})]}),w("div",{className:m.buttonContainer,children:[e,i(nt,{type:"button",onClick:n,className:m.cancelButton,children:"Cancel"})]})]})},rwe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),{strategyName:o,strategyDesc:a,params:s,setParams:l,setStrategyName:c,setStrategyDesc:u,getStrategyPayload:d,validateStrategyName:p,validateParams:h,clearErrors:m,setErrors:b,errors:y}=WO(),{createStrategy:g,loading:x}=dC(),{refetchStrategies:v}=ec();return i(Un,{loading:x,title:"Create strategy type",description:"The strategy type and the parameters will be selectable when adding an activation strategy to a toggle in the environments. The parameter defines the type of activation strategy. E.g. you can create a type 'Teams' and add a parameter 'List'. Then it's easy to add team names to the activation strategy",documentationLink:"https://docs.getunleash.io/advanced/custom_activation_strategy",documentationLinkLabel:"Custom strategies documentation",formatApiCode:()=>`curl --location --request POST '${n.unleashUrl}/api/admin/strategies' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(d(),void 0,2)}'`,children:i(HO,{errors:y,handleSubmit:async A=>{if(m(),A.preventDefault(),p()&&h()){const N=d();try{await g(N),v(),r(`/strategies/${o}`),e({title:"Strategy created",text:"Successfully created strategy",confetti:!0,type:"success"})}catch(k){t(Ue(k))}}},handleCancel:()=>{r(qn)},strategyName:o,setStrategyName:c,validateStrategyName:p,strategyDesc:a,setStrategyDesc:u,params:s,setParams:l,mode:"Create",setErrors:b,clearErrors:m,children:i(Ci,{name:"strategy",permission:Ym,children:"Create strategy"})})})},owe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),o=Ve("name"),{strategyDefinition:a}=ay(o),{strategyName:s,strategyDesc:l,params:c,setParams:u,setStrategyName:d,setStrategyDesc:p,getStrategyPayload:h,validateParams:m,clearErrors:b,setErrors:y,errors:g}=WO(a==null?void 0:a.name,a==null?void 0:a.description,a==null?void 0:a.parameters),{updateStrategy:x,loading:v}=dC(),{refetchStrategies:S}=ec();return i(Un,{loading:v,title:"Edit strategy type",description:"The strategy type and the parameters will be selectable when adding an activation strategy to a toggle in the environments. The parameter defines the type of activation strategy. E.g. you can create a type 'Teams' and add a parameter 'List'. Then it's easy to add team names to the activation strategy",documentationLink:"https://docs.getunleash.io/advanced/custom_activation_strategy",documentationLinkLabel:"Custom strategies documentation",formatApiCode:()=>`curl --location --request PUT '${n.unleashUrl}/api/admin/strategies/${o}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(h(),void 0,2)}'`,children:i(HO,{errors:g,handleSubmit:async _=>{if(b(),_.preventDefault(),m()){const N=h();try{await x(N),r(`/strategies/${s}`),e({type:"success",title:"Success",text:"Successfully updated strategy"}),S()}catch(k){t(Ue(k))}}},handleCancel:()=>{r(qn)},strategyName:s,setStrategyName:d,strategyDesc:l,setStrategyDesc:p,params:c,setParams:u,mode:"Edit",setErrors:y,clearErrors:b,children:i(Ei,{permission:Bv})})})},awe=()=>{const{makeRequest:e,createRequest:t}=Cr({propagateErrors:!0});return{setSplashSeen:async r=>{const o=`api/admin/splash/${r}`,a=t(o,{method:"POST"});try{return await e(a.caller,a.id)}catch{console.log("An exception was caught and handled.")}}}},iwe=le()(e=>({container:{backgroundColor:e.palette.primary.light,minHeight:"100vh",padding:"1rem",display:"grid",gap:"1rem",alignItems:"center",alignContent:"center",justifyContent:"center",gridTemplateColumns:"minmax(0,auto)",fontWeight:e.fontWeight.thin},content:{position:"relative",padding:"2rem",borderRadius:"0.5rem",backgroundColor:e.palette.primary.main,color:"white",[e.breakpoints.up("md")]:{padding:"4rem"}},header:{textAlign:"center"},footer:{display:"grid",gap:"2rem",textAlign:"center",justifyItems:"center"},body:{margin:"2rem 0",padding:"2rem 0",borderTop:"1px solid",borderBottom:"1px solid",borderTopColor:e.palette.primary.light,borderBottomColor:e.palette.primary.light},close:{position:"absolute",top:0,right:0,color:"inherit"},title:{fontWeight:"inherit"},ingress:{maxWidth:"32rem",margin:"1.5rem auto 0 auto"},list:{padding:"1rem 0",[e.breakpoints.up("md")]:{padding:"1rem 2rem"},"& li + li":{marginTop:"0.25rem"},"& strong":{padding:"0 .2rem",fontSize:e.fontSizes.smallBody,fontWeight:"inherit",backgroundColor:"rgba(0, 0, 0, 0.2)"}},link:{color:"inherit"},button:{background:"white !important",color:e.palette.primary.main}})),swe=()=>{const e=Ye(),{classes:t}=iwe();return w("section",{className:t.container,children:[w("div",{className:t.content,children:[w("header",{className:t.header,children:[i("h1",{className:t.title,children:"New strategy operators"}),i(Ht,{className:t.close,onClick:()=>e("/"),size:"large",children:i(g$,{titleAccess:"Close"})}),i("p",{className:t.ingress,children:"We've added some new feature strategy constraint operators. Fine-tune your feature targeting like never before."})]}),w("div",{className:t.body,children:[i("p",{children:"For example:"}),w("ul",{className:t.list,children:[w("li",{children:[i("span",{children:"Toggle features at dates: "}),w("span",{children:[i("strong",{children:"DATE_BEFORE"})," ",i("strong",{children:"DATE_AFTER"})]})]}),w("li",{children:[i("span",{children:"Toggle features for versions: "}),w("span",{children:[i("strong",{children:"SEMVER_EQ"})," ",i("strong",{children:"SEMVER_GT"})," ",i("strong",{children:"SEMVER_LT"})]})]}),w("li",{children:[i("span",{children:"Toggle features for strings: "}),w("span",{children:[i("strong",{children:"STR_CONTAINS"})," ",i("strong",{children:"STR_ENDS_WITH"})," ",i("strong",{children:"STR_STARTS_WITH"})]})]}),w("li",{children:[i("span",{children:"Toggle features for numbers: "}),w("span",{children:[i("strong",{children:"NUM_GT"})," ",i("strong",{children:"NUM_GTE"})," ",i("strong",{children:"NUM_LT"})," ",i("strong",{children:"NUM_LTE"})]})]})]})]}),w("footer",{className:t.footer,children:[w("p",{children:[w("a",{href:"https://docs.getunleash.io/advanced/strategy_constraints#numeric-operators",target:"_blank",rel:"noreferrer",className:t.link,children:["Read all about operators in our in-depth"," ",i("strong",{children:"docs"})]}),"."]}),i("p",{children:i(nt,{className:t.button,variant:"contained",component:Ct,to:"/",children:"Fine, whatever, I have work to do!"})})]})]}),i(xP,{})]})},VO=()=>{const e=Tf();return{splash:e.data&&"splash"in e.data?e.data.splash:void 0,refetchSplash:e.refetchAuth,loading:e.loading,error:e.error}},lwe=["operators"],cwe=[],uwe=()=>{const e=Ve("splashId"),t=pwe(e),{refetchSplash:n}=VO(),{setSplashSeen:r}=awe();if(dwe("Escape","/"),f.exports.useEffect(()=>{e&&t&&r(e).then(()=>n()).catch(console.warn)},[e,t]),!t)return null;switch(e){case"operators":return i(swe,{});default:return i(Yi,{to:"/",replace:!0})}},dwe=(e,t)=>{const n=Ye();f.exports.useEffect(()=>{const r=o=>{o.code===e&&n(t)};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t,n])},pwe=e=>lwe.includes(e),GO=({onSubmit:e,onCancel:t,modal:n})=>{const{setToastData:r,setToastApiError:o}=tt(),{uiConfig:a}=st(),{contextName:s,contextDesc:l,legalValues:c,stickiness:u,setContextName:d,setContextDesc:p,setLegalValues:h,setStickiness:m,getContextPayload:b,validateContext:y,clearErrors:g,setErrors:x,errors:v}=$O(),{createContext:S,loading:E}=yy(),{refetchUnleashContext:R}=wi();return i(Un,{loading:E,title:"Create context",description:"Context fields are a basic building block used in Unleash to control roll-out. They can be used together with strategy constraints as part of the activation strategy evaluation.",documentationLink:"https://docs.getunleash.io/user_guide/unleash_context#custom-context-fields",documentationLinkLabel:"Context fields documentation",formatApiCode:()=>`curl --location --request POST '${a.unleashUrl}/api/admin/context' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(b(),void 0,2)}'`,modal:n,children:i(NO,{errors:v,handleSubmit:async N=>{if(N.preventDefault(),N.stopPropagation(),await y()){const I=b();try{await S(I),R(),r({title:"Context created",confetti:!0,type:"success"}),e()}catch(O){o(Ue(O))}}},onCancel:t,contextName:s,setContextName:d,contextDesc:l,setContextDesc:p,legalValues:c,setLegalValues:h,stickiness:u,setStickiness:m,mode:"Create",validateContext:y,setErrors:x,clearErrors:g,children:i(Ci,{name:"context",permission:Km})})})},fwe=()=>{const e=Ye();return i(GO,{onSubmit:()=>e("/context"),onCancel:()=>e(qn)})},hwe=(e,t)=>{const[n,r]=f.exports.useState(),o=e!==t;return f.exports.useEffect(()=>{r(void 0),e&&o&&mwe(e).then(gwe).then(r).catch(()=>r(void 0))},[e,o]),n},mwe=e=>fetch(bt("api/admin/segments/validate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})}),gwe=async e=>e.ok?void 0:(await e.json()).details[0].message,qO=(e="",t="",n=[])=>{const[r,o]=f.exports.useState(e),[a,s]=f.exports.useState(t),[l,c]=f.exports.useState(n),[u,d]=f.exports.useState({}),p=hwe(r,e);return f.exports.useEffect(()=>{o(e)},[e]),f.exports.useEffect(()=>{s(t)},[t]),f.exports.useEffect(()=>{c(n)},[JSON.stringify(n)]),f.exports.useEffect(()=>{d(b=>ee(V({},b),{name:p}))},[p]),{name:r,setName:o,description:a,setDescription:s,constraints:l,setConstraints:c,getSegmentPayload:()=>({name:r,description:a,constraints:l}),clearErrors:()=>{d({})},errors:u}},vwe=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},formHeader:{fontWeight:"normal",marginTop:"0"},header:{fontWeight:"normal"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},userInfoContainer:{margin:"-20px 0"},errorAlert:{marginBottom:"1rem"},flexRow:{display:"flex",alignItems:"center"}})),ywe=le()(e=>({container:{maxWidth:"400px"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"0.5rem"},header:{fontWeight:"normal"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},userInfoContainer:{margin:"-20px 0"},errorAlert:{marginBottom:"1rem"},flexRow:{display:"flex",alignItems:"center"}})),bwe=({children:e,name:t,description:n,setName:r,setDescription:o,errors:a,clearErrors:s,setCurrentStep:l})=>{const c=Ye(),{classes:u}=ywe();return w("div",{className:u.form,children:[w("div",{className:u.container,children:[i("p",{className:u.inputDescription,children:"What is the segment name?"}),i(Sn,{className:u.input,label:"Segment name",value:t,onChange:d=>r(d.target.value),error:Boolean(a.name),errorText:a.name,autoFocus:!0,required:!0,"data-testid":Dne}),i("p",{className:u.inputDescription,children:"What is the segment description?"}),i(Sn,{className:u.input,label:"Description (optional)",value:n,onChange:d=>o(d.target.value),error:Boolean(a.description),errorText:a.description,"data-testid":Lne})]}),w("div",{className:u.buttonContainer,children:[i(nt,{type:"button",variant:"contained",color:"primary",onClick:()=>l(2),disabled:t.length===0||Boolean(a.name),"data-testid":Mne,children:"Next"}),i(nt,{type:"button",className:u.cancelButton,onClick:()=>{c("/segments")},children:"Cancel"})]})]})},xwe=le()(e=>({warning:{marginBottom:"1.5rem"},error:{marginTop:"1.5rem"},form:{display:"flex",flexDirection:"column",height:"100%"},input:{width:"100%",marginBottom:"1rem"},label:{minWidth:"300px",[e.breakpoints.down(600)]:{minWidth:"auto"}},buttonContainer:{marginTop:"auto",display:"flex",justifyContent:"flex-end",borderTop:`1px solid ${e.palette.grey[300]}`,paddingTop:15},errorsContainer:{marginTop:"1rem"},cancelButton:{marginLeft:"1.5rem"},inputDescription:{marginBottom:"1rem"},formHeader:{fontWeight:"normal",marginTop:"0"},header:{fontWeight:"normal"},errorMessage:{fontSize:e.fontSizes.smallBody,color:e.palette.error.main,position:"absolute",top:"-8px"},userInfoContainer:{margin:"-20px 0"},errorAlert:{marginBottom:"1rem"},flexRow:{display:"flex",alignItems:"center"},backButton:{marginRight:"auto"},addContextContainer:{marginTop:"1rem",borderBottom:`1px solid ${e.palette.grey[300]}`,paddingBottom:"2rem"},addContextButton:{color:e.palette.primary.dark,background:"transparent",boxShadow:"none",border:"1px solid","&:hover":{background:"transparent",boxShadow:"none"}},divider:{borderStyle:"solid",borderColor:`${e.palette.grey[300]}`,marginTop:"1rem !important"},noConstraintText:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:"6rem"},subtitle:{fontSize:e.fontSizes.bodySize,color:e.palette.grey[600],maxWidth:515,marginBottom:20,wordBreak:"break-word",whiteSpace:"normal",textAlign:"center"},constraintContainer:{marginBlock:"2rem"}})),g2=e=>f.exports.useMemo(()=>e.map(t=>t.values).reduce((t,n)=>{var r;return t+((r=n==null?void 0:n.length)!=null?r:0)},0),[e]),wwe=({children:e,constraints:t,setConstraints:n,setCurrentStep:r,mode:o})=>{const a=f.exports.useRef(),s=Ye(),{hasAccess:l}=f.exports.useContext(Jt),{classes:c}=xwe(),{context:u=[]}=wi(),[d,p]=f.exports.useState(!1),h=g2(t),m=o==="create"?US:WS,{segmentValuesLimit:b}=lc(),y=Boolean(b&&h>b),g=u.map(v=>({value:v.name,label:v.name})),x=([v])=>{var S,E;(E=(S=a.current)==null?void 0:S.addConstraint)==null||E.call(S,v.value)};return w(Ne,{children:[w("div",{className:c.form,children:[i("div",{className:c.warning,children:i(Kve,{})}),w("div",{children:[i("p",{className:c.inputDescription,children:"Select the context fields you want to include in the segment."}),i("p",{className:c.inputDescription,children:"Use a predefined context field:"}),i(XP,{label:"Select a context",options:g,onChange:x})]}),w("div",{className:c.addContextContainer,children:[i("p",{className:c.inputDescription,children:"...or add a new context field:"}),i(pu,{label:"Create new context",onClose:()=>p(!1),open:d,children:i(GO,{onSubmit:()=>p(!1),onCancel:()=>p(!1),modal:!0})}),i(Mr,{permission:Km,variant:"outlined",color:"primary",startIcon:i(io,{}),onClick:()=>p(!0),children:"Add context field"}),y&&i("div",{className:c.error,children:i(Xve,{values:h})})]}),i(F,{condition:t.length===0,show:i("div",{className:c.noConstraintText,children:i("p",{className:c.subtitle,children:"Start adding context fields by selecting an option from above, or you can create a new context field and use it right away"})})}),i("div",{className:c.constraintContainer,children:i(my,{ref:a,constraints:t,setConstraints:l(m)?n:void 0})})]}),w("div",{className:c.buttonContainer,children:[i(nt,{type:"button",onClick:()=>r(1),className:c.backButton,children:"Back"}),e,i(nt,{type:"button",className:c.cancelButton,onClick:()=>{s("/segments")},children:"Cancel"})]})]})},Swe=le()(e=>({container:{display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",top:30,left:0,right:F3,[e.breakpoints.down(1100)]:{right:0}},steps:{position:"relative",borderRadius:10,background:e.palette.background.paper,padding:"0.6rem 1.5rem",margin:"auto",display:"flex",alignItems:"center"},stepsText:{marginRight:15,fontSize:e.fontSizes.smallBody},circle:{fill:e.palette.primary.main,fontSize:17,opacity:.4,transition:"opacity 0.4s ease"},filledCircle:{opacity:1,fontSize:20}})),Cwe=({total:e,current:t})=>{const{classes:n}=Swe(),r=Array.from({length:e}).map((o,a)=>a+1);return i("div",{className:n.container,children:w("div",{className:n.steps,children:[w("span",{className:n.stepsText,children:["Step ",t," of ",e]}),r.map(o=>i(w$,{className:it(n.circle,o===t&&n.filledCircle)},o))]})})},YO=({children:e,name:t,description:n,constraints:r,setName:o,setDescription:a,setConstraints:s,handleSubmit:l,errors:c,clearErrors:u,mode:d})=>{const{classes:p}=vwe(),h=2,[m,b]=f.exports.useState(1);return w(Ne,{children:[i(Cwe,{total:h,current:m}),w("form",{onSubmit:l,className:p.form,children:[i(F,{condition:m===1,show:i(bwe,{name:t,description:n,setName:o,setDescription:a,errors:c,clearErrors:u,setCurrentStep:b})}),i(F,{condition:m===2,show:i(wwe,{constraints:r,setConstraints:s,setCurrentStep:b,mode:d,children:e})})]})]})},Ewe=()=>{throw new Error("showFeedbackCES called outside feedbackCESContext")},Twe=()=>{throw new Error("hideFeedbackCES called outside feedbackCESContext")},v2=f.exports.createContext({showFeedbackCES:Ewe,hideFeedbackCES:Twe}),Rwe=()=>{const{uiConfig:e}=st(),{setToastData:t,setToastApiError:n}=tt(),{showFeedbackCES:r}=f.exports.useContext(v2),o=Ye(),{createSegment:a,loading:s}=Of(),{refetchSegments:l}=Gs(),{name:c,setName:u,description:d,setDescription:p,constraints:h,setConstraints:m,getSegmentPayload:b,errors:y,clearErrors:g}=qO(),x=r2(h),{segmentValuesLimit:v}=lc(),S=g2(h),E=Boolean(v&&S>v);return i(Un,{loading:s,title:"Create segment",description:KO,documentationLink:ZP,documentationLinkLabel:"Segments documentation",formatApiCode:()=>`curl --location --request POST '${e.unleashUrl}/api/admin/segments' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(b(),void 0,2)}'`,children:i(YO,{handleSubmit:async _=>{_.preventDefault(),g();try{await a(b()),await l(),o("/segments/"),t({title:"Segment created",confetti:!0,type:"success"}),r({title:"How easy was it to create a segment?",text:"Please help us understand how we can improve segments",path:"/segments/create"})}catch(N){n(Ue(N))}},name:c,setName:u,description:d,setDescription:p,constraints:h,setConstraints:m,errors:y,clearErrors:g,mode:"create",children:i(Ci,{name:"segment",permission:US,disabled:!x||E,"data-testid":Bne})})})},KO=`
    Segments make it easy for you to define which of your users should get access to a feature.
    A segment is a reusable collection of constraints.
    You can create and apply a segment when configuring activation strategies for a feature toggle or at any time from the segments page in the navigation menu.
`,kwe=e=>{const t=bt(`api/admin/segments/${e}`),{data:n,error:r}=Wt(t,()=>_we(t)),o=f.exports.useCallback(()=>{Fn(t).catch(console.warn)},[t]);return{segment:n,refetchSegment:o,loading:!r&&!n,error:r}},_we=e=>fetch(e,{method:"GET"}).then(rn("Segment")).then(t=>t.json()),Iwe=()=>{const e=Ve("segmentId"),{segment:t}=kwe(Number(e)),{uiConfig:n}=st(),{setToastData:r,setToastApiError:o}=tt(),a=Ye(),{updateSegment:s,loading:l}=Of(),{refetchSegments:c}=Gs(),{name:u,setName:d,description:p,setDescription:h,constraints:m,setConstraints:b,getSegmentPayload:y,errors:g,clearErrors:x}=qO(t==null?void 0:t.name,t==null?void 0:t.description,t==null?void 0:t.constraints),v=r2(m),S=g2(m),{segmentValuesLimit:E}=lc(),R=Boolean(E&&S>E);return i(Un,{loading:l,title:"Edit segment",description:KO,documentationLink:ZP,documentationLinkLabel:"Segments documentation",formatApiCode:()=>`curl --location --request PUT '${n.unleashUrl}/api/admin/segments/${e}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(y(),void 0,2)}'`,children:i(YO,{handleSubmit:async N=>{if(t){N.preventDefault(),x();try{await s(t.id,y()),await c(),a("/segments/"),r({title:"Segment updated",type:"success"})}catch(k){o(Ue(k))}}},name:u,setName:d,description:p,setDescription:h,constraints:m,setConstraints:b,errors:g,clearErrors:x,mode:"edit",children:i(Ei,{permission:WS,disabled:!v||R,"data-testid":Fne})})})},Awe=()=>{const{uiConfig:e}=st(),t=Ye();return i(oc,{onClick:()=>t("/environments/create"),maxWidth:"700px",Icon:io,permission:sn,disabled:!Boolean(e.flags.EEA),children:"New environment"})},Nwe=(e,t)=>{const n=f.exports.useRef(null);return f.exports.useEffect(()=>{if(n.current)return n.current.draggable=!0,n.current.style.cursor="grab",n.current.dataset.index=String(e),$we(n.current,t)},[e,t]),n},$we=(e,t)=>{const n=l=>{Gh&&t(Number(Gh.dataset.index),Number(e.dataset.index),l)},r=()=>{Gh=e},o=()=>{n(!1)},a=l=>{l.preventDefault()},s=()=>{n(!0),Gh=null};return e.addEventListener("dragstart",r),e.addEventListener("dragenter",o),e.addEventListener("dragover",a),e.addEventListener("drop",s),()=>{e.removeEventListener("dragstart",r),e.removeEventListener("dragenter",o),e.removeEventListener("dragover",a),e.removeEventListener("drop",s)}};let Gh;const Pwe=({row:e,moveListItem:t})=>{const{hasAccess:n}=f.exports.useContext(Jt),r=Nwe(e.index,t),{searchQuery:o}=$u(),a=!o&&n(Xm);return i(Vr,{hover:!0,ref:a?r:void 0,children:e.cells.map(s=>i(Zo,ee(V({},s.getCellProps()),{children:s.render("Cell")})))})},P_=z(kf)(({theme:e})=>({marginLeft:e.spacing(1)})),Owe=({environment:e})=>{const{searchQuery:t}=$u();return w(Bn,{children:[i(Ts,{search:t,children:e.name}),i(F,{condition:!e.enabled,show:i(P_,{color:"warning",children:"Disabled"})}),i(F,{condition:e.protected,show:i(P_,{color:"success",children:"Predefined"})})]})},Dwe=le()(e=>({container:{display:"flex",flexDirection:"column",border:`1px solid ${e.palette.grey[200]}`,padding:"1.5rem",borderRadius:"5px",margin:"1.5rem 0",minWidth:"450px"},icon:{fill:e.palette.inactiveIcon,marginRight:"0.5rem"},header:{display:"flex",alignItems:"center",marginBottom:"0.25rem"},infoContainer:{marginTop:"1rem",display:"flex",justifyContent:"space-around"},infoInnerContainer:{textAlign:"center"},infoTitle:{fontWeight:"bold",marginBottom:"0.25rem"}})),XO=({name:e,type:t})=>{const{classes:n}=Dwe();return w("div",{className:n.container,children:[w("div",{className:n.header,children:[i(v$,{className:n.icon})," Environment"]}),w("div",{className:n.infoContainer,children:[w("div",{className:n.infoInnerContainer,children:[i("div",{className:n.infoTitle,children:"Id"}),i("div",{children:i(Tr,{text:e,maxWidth:"250",maxLength:30})})]}),w("div",{className:n.infoInnerContainer,children:[i("div",{className:n.infoTitle,children:"Type"}),i("div",{children:t})]})]})]})},Lwe=({env:e,open:t,setToggleDialog:n,handleConfirmToggleEnvironment:r})=>{let o=e.enabled?"disable":"enable";const a=()=>{n(!1)};return w(ln,{title:`Are you sure you want to ${o} this environment?`,open:t,primaryButtonText:se(o),secondaryButtonText:"Cancel",onClick:r,onClose:a,children:[i(F,{condition:e.enabled,show:i(yt,{severity:"info",children:"Disabling an environment will not effect any strategies that already exist in that environment, but it will make it unavailable as a selection option for new activation strategies."}),elseShow:i(yt,{severity:"info",children:"Enabling an environment will allow you to add new activation strategies to this environment."})}),i(XO,{name:e==null?void 0:e.name,type:e==null?void 0:e.type})]})},Mwe=le()(e=>({deleteParagraph:{marginTop:"2rem"},environmentDeleteInput:{marginTop:"1rem"}})),Bwe=({env:e,open:t,setDeldialogue:n,handleDeleteEnvironment:r,confirmName:o,setConfirmName:a})=>{const{classes:s}=Mwe(),l=d=>a(d.currentTarget.value),c=()=>{n(!1),a("")},u="delete-environment-confirmation-form";return w(ln,{title:"Are you sure you want to delete this environment?",open:t,primaryButtonText:"Delete environment",secondaryButtonText:"Cancel",onClick:r,disabledPrimaryButton:(e==null?void 0:e.name)!==o,onClose:c,formId:u,children:[i(yt,{severity:"error",children:"Danger. Deleting this environment will result in removing all strategies that are active in this environment across all feature toggles."}),i(XO,{name:e==null?void 0:e.name,type:e==null?void 0:e.type}),w("p",{className:s.deleteParagraph,children:["In order to delete this environment, please enter the id of the environment in the textfield below: ",i("strong",{children:e==null?void 0:e.name})]}),i("form",{id:u,children:i(Sn,{autoFocus:!0,onChange:l,value:o,label:"Environment name",className:s.environmentDeleteInput})})]})},Fwe=({environment:e})=>{const t=Ye(),{setToastApiError:n,setToastData:r}=tt(),{refetchEnvironments:o}=sc(),{refetch:a}=Lf(),{deleteEnvironment:s,toggleEnvironmentOn:l,toggleEnvironmentOff:c}=Mf(),[u,d]=f.exports.useState(!1),[p,h]=f.exports.useState(!1),[m,b]=f.exports.useState(""),y=async()=>{try{await s(e.name),a(),r({type:"success",title:"Environment deleted",text:`You have successfully deleted the ${e.name} environment.`})}catch(S){n(Ue(S))}finally{d(!1),b(""),await o()}},g=()=>e.enabled?v():x(),x=async()=>{try{h(!1),await l(e.name),r({type:"success",title:"Project environment enabled"})}catch(S){n(Ue(S))}finally{await o()}},v=async()=>{try{h(!1),await c(e.name),r({type:"success",title:"Project environment disabled"})}catch(S){n(Ue(S))}finally{await o()}};return w(Lo,{children:[i(nc,{permission:Xm,checked:e.enabled,disabled:e.protected,tooltip:e.enabled?`Disable environment ${e.name}`:`Enable environment ${e.name}`,onClick:()=>h(!0)}),i(Lo.Divider,{}),i(Ft,{permission:Xm,disabled:e.protected,size:"large",tooltipProps:{title:e.protected?"You cannot edit protected environment":"Edit environment"},onClick:()=>t(`/environments/${e.name}`),children:i(ar,{})}),i(Ft,{permission:boe,disabled:e.protected,size:"large",tooltipProps:{title:e.protected?"You cannot delete protected environment":"Delete environment"},onClick:()=>d(!0),children:i(er,{})}),i(Bwe,{env:e,setDeldialogue:d,open:u,handleDeleteEnvironment:y,confirmName:m,setConfirmName:b}),i(Lwe,{env:e,open:p,setToggleDialog:h,handleConfirmToggleEnvironment:g})]})},zwe=z(Ht)(({theme:e})=>`
        padding: ${e.spacing(0,1,0,0)};
        cursor: inherit;
        transition: color 0.2s ease-in-out;
    `),jwe=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=e(Xm),{searchQuery:n}=$u();return w(mt,{sx:{display:"flex",alignItems:"center",pl:2},children:[i(F,{condition:t&&!n,show:i(zwe,{size:"large",disableRipple:!0,disabled:!0,children:i(b$,{titleAccess:"Drag to reorder",cursor:"grab"})})}),i(v$,{color:"disabled"})]})},Uwe=z(yt)(({theme:e})=>({marginBottom:e.spacing(4)})),Wwe=()=>{const{changeSortOrder:e}=Mf(),{setToastApiError:t}=tt(),{environments:n,mutateEnvironments:r}=sc(),o=f.exports.useCallback(async(y,g,x=!1)=>{const v=[...n],S=v[y];if(v.splice(y,1),v.splice(g,0,S),await r(v),x)try{await e(Jbe(v))}catch(E){t(Ue(E))}},[e,n,r,t]),{getTableProps:a,getTableBodyProps:s,headerGroups:l,rows:c,prepareRow:u,state:{globalFilter:d},setGlobalFilter:p}=ct.exports.useTable({columns:Hwe,data:n,disableSortBy:!0},ct.exports.useGlobalFilter),m=w(Ne,{children:[i(jn,{initialValue:d,onChange:p}),i(Dt.Divider,{}),i(Awe,{})]});return w(Gt,{header:i(Dt,{title:"Environments",actions:m}),children:[i(Uwe,{severity:"info",children:"This is the order of environments that you have today in each feature toggle. Rearranging them here will change also the order inside each feature toggle."}),i(so,{value:d,children:w(xa,ee(V({},a()),{children:[i(Mo,{headerGroups:l}),i(bo,ee(V({},s()),{children:c.map(y=>(u(y),i(Pwe,{row:y,moveListItem:o},y.original.name)))}))]}))}),i(F,{condition:c.length===0,show:i(F,{condition:(d==null?void 0:d.length)>0,show:w(Vt,{children:["No environments found matching \u201C",d,"\u201D"]}),elseShow:i(Vt,{children:"No environments available. Get started by adding one."})})})]})},Hwe=[{id:"Icon",width:"1%",Cell:()=>i(jwe,{}),disableGlobalFilter:!0},{Header:"Name",accessor:"name",Cell:({row:{original:e}})=>i(Owe,{environment:e})},{Header:"Actions",id:"Actions",align:"center",width:"1%",Cell:({row:{original:e}})=>i(Fwe,{environment:e}),disableGlobalFilter:!0}],Vwe=()=>{const e=Ye();return i(Mr,{onClick:()=>e("/segments/create"),permission:US,"data-testid":hne,children:"New segment"})},Gwe=le()(e=>({empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",margin:e.spacing(6),marginLeft:"auto",marginRight:"auto"},title:{fontSize:e.fontSizes.mainHeader,marginBottom:e.spacing(2.5)},subtitle:{fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary,maxWidth:515,marginBottom:e.spacing(2.5),textAlign:"center"},paramButton:{textDecoration:"none",color:e.palette.primary.main,fontWeight:e.fontWeight.bold}})),qwe=()=>{const{classes:e}=Gwe();return w("div",{className:e.empty,children:[i(Te,{className:e.title,children:"No segments yet!"}),i("p",{className:e.subtitle,children:"Segment makes it easy for you to define who should be exposed to your feature. The segment is often a collection of constraints and can be reused."}),i(Ct,{to:"/segments/create",className:e.paramButton,children:"Create your first segment"})]})},Ywe=e=>{const t=bt(`api/admin/segments/${e}/strategies`),{data:n,error:r}=Wt(t,()=>Kwe(t)),o=f.exports.useCallback(()=>{Fn(t).catch(console.warn)},[t]);return{strategies:n==null?void 0:n.strategies,refetchUsedSegments:o,loading:!r&&!n,error:r}},Kwe=e=>fetch(e,{method:"GET"}).then(rn("Strategies by segment")).then(t=>t.json()),JO=le()(e=>({deleteParagraph:{marginTop:"2rem"},deleteInput:{marginTop:"1rem"},link:{textDecoration:"none",color:e.palette.primary.main,fontWeight:e.fontWeight.bold}})),Xwe=({segment:e,open:t,onClose:n,onRemove:r})=>{const{classes:o}=JO(),[a,s]=f.exports.useState(""),l=d=>s(d.currentTarget.value),c=()=>{n(),s("")},u="delete-segment-confirmation-form";return w(ln,{title:"Are you sure you want to delete this segment?",open:t,primaryButtonText:"Delete segment",secondaryButtonText:"Cancel",onClick:()=>{r(),s("")},disabledPrimaryButton:(e==null?void 0:e.name)!==a,onClose:c,formId:u,children:[w("p",{className:o.deleteParagraph,children:["In order to delete this segment, please enter the name of the segment in the field below: ",i("strong",{children:e==null?void 0:e.name})]}),i("form",{id:u,children:i(Sn,{autoFocus:!0,onChange:l,value:a,label:"Segment name",className:o.deleteInput,"data-testid":jne})})]})},Jwe=({segment:e,open:t,onClose:n,strategies:r})=>{const{classes:o}=JO();return w(ln,{title:"You can't delete a segment that's currently in use",open:t,primaryButtonText:"OK",onClick:n,children:[w("p",{children:["The following feature toggles are using the"," ",i("strong",{children:e.name})," segment for their strategies:"]}),i("ul",{children:r==null?void 0:r.map(a=>i("li",{children:w(Ct,{to:mP(a.projectId,a.featureName,a.environment,a.id),target:"_blank",rel:"noopener noreferrer",className:o.link,children:[a.featureName," ",Qwe(a)]})},a.id))})]})},Qwe=e=>e.strategyName?`(${tc(e.strategyName)})`:"",Zwe=({segment:e,open:t,onClose:n,onRemove:r})=>{const{strategies:o}=Ywe(e.id),a=(o==null?void 0:o.length)===0;return i(F,{condition:a,show:i(Xwe,{segment:e,open:t,onClose:n,onRemove:r}),elseShow:i(Jwe,{segment:e,open:t,onClose:n,strategies:o})})},eSe=({segment:e})=>{const{refetchSegments:t}=Gs(),{deleteSegment:n}=Of(),{setToastData:r,setToastApiError:o}=tt(),[a,s]=f.exports.useState(!1),l=async()=>{try{await n(e.id),await t(),r({type:"success",title:"Successfully deleted segment"})}catch(c){o(Ue(c))}finally{s(!1)}};return w(Ne,{children:[i(Ft,{onClick:()=>s(!0),permission:xoe,tooltipProps:{title:"Remove segment"},"data-testid":`${zne}_${e.name}`,children:i(er,{"data-loading":!0})}),i(F,{condition:a,show:()=>i(Zwe,{segment:e,open:a,onClose:()=>s(!1),onRemove:l})})]})},tSe=({segment:e})=>{const t=Ye();return i(Ft,{onClick:()=>t(`/segments/edit/${e.id}`),permission:WS,tooltipProps:{title:"Edit segment"},children:i(ar,{"data-loading":!0})})},nSe=({segment:e})=>w(Lo,{children:[i(tSe,{segment:e}),i(eSe,{segment:e})]}),rSe=()=>{const{segments:e,loading:t}=Gs(),n=an(oo.breakpoints.down("md")),[r]=f.exports.useState({sortBy:[{id:"createdAt"}],hiddenColumns:["description"]}),o=f.exports.useMemo(()=>e!=null?e:Array(5).fill({name:"Segment name",description:"Segment descripton",createdAt:new Date().toISOString(),createdBy:"user"}),[e]),{getTableProps:a,getTableBodyProps:s,headerGroups:l,rows:c,prepareRow:u,state:{globalFilter:d},setGlobalFilter:p,setHiddenColumns:h}=ct.exports.useTable({initialState:r,columns:oSe,data:o,sortTypes:Ar,autoResetGlobalFilter:!1,autoResetSortBy:!1,disableSortRemove:!0,defaultColumn:{Cell:Wr}},ct.exports.useGlobalFilter,ct.exports.useSortBy);return f.exports.useEffect(()=>{const m=["description"];n&&m.push("createdAt","createdBy"),h(m)},[h,n]),i(Gt,{header:i(Dt,{title:"Segments",actions:w(Ne,{children:[i(jn,{initialValue:d,onChange:p}),i(Dt.Divider,{}),i(Vwe,{})]})}),isLoading:t,children:i(F,{condition:!t&&o.length===0,show:i(Vt,{children:i(qwe,{})}),elseShow:()=>w(Ne,{children:[i(so,{value:d,children:w(xa,ee(V({},a()),{rowHeight:"standard",children:[i(Mo,{headerGroups:l}),i(bo,ee(V({},s()),{children:c.map(m=>(u(m),i(Vr,ee(V({hover:!0},m.getRowProps()),{children:m.cells.map(b=>i(Zo,ee(V({},b.getCellProps()),{children:b.render("Cell")})))}))))}))]}))}),i(F,{condition:c.length===0&&(d==null?void 0:d.length)>0,show:w(Vt,{children:["No segments found matching \u201C",d,"\u201D"]})})]})})})},oSe=[{id:"Icon",width:"1%",disableGlobalFilter:!0,disableSortBy:!0,Cell:()=>i(rc,{icon:i(y$,{color:"disabled"})})},{Header:"Name",accessor:"name",width:"60%",Cell:({value:e,row:{original:t}})=>i(Wr,{value:e,subtitle:t.description})},{Header:"Created at",accessor:"createdAt",minWidth:150,Cell:wa,disableGlobalFilter:!0},{Header:"Created by",accessor:"createdBy",width:"25%"},{Header:"Actions",id:"Actions",align:"center",width:"1%",disableSortBy:!0,disableGlobalFilter:!0,Cell:({row:{original:e}})=>i(nSe,{segment:e})},{accessor:"description"}];var y2={},aSe=yn.exports;Object.defineProperty(y2,"__esModule",{value:!0});var QO=y2.default=void 0,iSe=aSe(bn),sSe=Cn,lSe=(0,iSe.default)((0,sSe.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");QO=y2.default=lSe;const cx="api/admin/invoices",cSe=bt(cx),ZO=(e={})=>{const t=()=>fetch(cSe,{method:"GET"}).then(rn("Invoices")).then(l=>l.json()),{data:n,error:r}=Wt(cx,t,e),[o,a]=f.exports.useState(!r&&!n),s=()=>{Fn(cx)};return f.exports.useEffect(()=>{a(!r&&!n)},[n,r]),{invoices:(n==null?void 0:n.invoices)||[],error:r,loading:o,refetchInvoices:s}},uSe=bt("api/admin/invoices/portal"),dSe=()=>{const{refetchInvoices:e,invoices:t}=ZO(),[n,r]=f.exports.useState(!1),{locationSettings:o}=vi();return f.exports.useEffect(()=>{e(),r(!0)},[]),i(F,{condition:t.length>0,show:i(Gt,{header:i(Dt,{title:"Invoices",actions:i(nt,{href:uSe,rel:"noreferrer",target:"_blank",endIcon:i(QO,{}),children:"Billing portal"})}),children:i("div",{children:w(vv,{children:[i(L4,{children:w(Vr,{children:[i(jo,{children:"Amount"}),i(jo,{children:"Status"}),i(jo,{children:"Due date"}),i(jo,{children:"PDF"}),i(jo,{children:"Link"})]})}),i(bo,{children:t.map(a=>w(Vr,{style:{backgroundColor:a.status==="past-due"?"#ff9194":"inherit"},children:[i(jo,{style:{textAlign:"left"},children:a.amountFormatted}),i(jo,{style:{textAlign:"left"},children:a.status}),i(jo,{style:{textAlign:"left"},children:a.dueDate&&uu(a.dueDate,o.locale)}),i(jo,{style:{textAlign:"left"},children:i("a",{href:a.invoicePDF,children:"PDF"})}),i(jo,{style:{textAlign:"left"},children:i("a",{href:a.invoiceURL,target:"_blank",rel:"noreferrer",children:"Payment link"})})]},a.invoiceURL))})]})})}),elseShow:i("div",{children:n&&"No invoices to show."})})},pSe=()=>{const{hasAccess:e}=f.exports.useContext(Jt);return i("div",{children:i(F,{condition:e(sn),show:i(dSe,{}),elseShow:i(yt,{severity:"error",children:"You need to be instance admin to access this section."})})})},fSe=()=>{const{uiConfig:e,loading:t}=st();return t?null:e.flags.UNLEASH_CLOUD?i(Yi,{to:"/admin/billing",replace:!0}):i(pSe,{})},hSe={id:"createdAt"},{value:mSe,setValue:gSe}=Pu("FeaturesArchiveTable:v1",hSe),vSe=()=>{Sa("Archive");const{archivedFeatures:e=[],loading:t,refetchArchived:n}=SO();return i(oP,{title:"Archive",archivedFeatures:e,loading:t,storedParams:mSe,setStoredParams:gSe,refetch:n})},ySe=bt("api/admin/invoices"),bSe=z(nt)(({theme:e})=>({width:"100%",marginBottom:e.spacing(1.5)})),xSe=({update:e})=>i(bSe,{href:`${ySe}/${e?"portal":"checkout"}`,variant:e?"outlined":"contained",children:e?"Update billing information":"Add billing information"}),wSe=z("aside")(({theme:e})=>({padding:e.spacing(4),height:"100%",borderRadius:e.shape.borderRadiusLarge,backgroundColor:e.palette.secondaryContainer})),SSe=z(Te)(({theme:e})=>({marginBottom:e.spacing(4)})),CSe=z(yt)(({theme:e})=>({marginBottom:e.spacing(4)})),O_=z(Te)(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary})),ESe=z(Ur)(({theme:e})=>({margin:`${e.spacing(2.5)} 0`,borderColor:e.palette.dividerAlternative})),TSe=({instanceStatus:e})=>{const t=e.state!==Da.ACTIVE;return i(de,{item:!0,xs:12,md:5,children:w(wSe,{children:[i(SSe,{variant:"body1",children:"Billing information"}),i(F,{condition:t,show:w(CSe,{severity:"warning",children:["In order to ",i("strong",{children:"Upgrade trial"})," you need to provide us your billing information."]})}),i(xSe,{update:!t}),i(O_,{children:t?"Once we have received your billing information we will upgrade your trial within 1 business day":"Update your credit card and business information and change which email address we send invoices to"}),i(ESe,{}),w(O_,{children:[i("a",{href:"mailto:elise@getunleash.ai?subject=PRO plan clarifications",children:"Get in touch with us"})," ","for any clarification"]})]})})},RSe=10,eD=e=>(e==null?void 0:e.state)===Da.TRIAL||(e==null?void 0:e.state)===Da.EXPIRED||(e==null?void 0:e.state)===Da.CHURNED,b2=e=>(e==null?void 0:e.state)===Da.EXPIRED||(e==null?void 0:e.state)===Da.CHURNED?!0:(e==null?void 0:e.state)===Da.TRIAL&&(e==null?void 0:e.trialExpiry)?Cie(Ql(e.trialExpiry)):!1,kSe=e=>!e||e.state!==Da.TRIAL||!e.trialExpiry?!1:fS(Ql(e.trialExpiry),new Date)<=RSe,D_=e=>Boolean(e&&e.state===Da.EXPIRED&&!e.trialExtended),_Se=z(de)(({theme:e})=>({flexWrap:"nowrap",gap:e.spacing(1)})),qh=({sx:e,children:t})=>i(_Se,{container:!0,item:!0,justifyContent:"space-between",alignItems:"center",sx:e,children:t}),rs=({children:e,vertical:t=!1})=>i(de,{container:t,item:!0,display:"flex",alignItems:t?"start":"center",direction:t?"column":void 0,children:e}),ISe=z("span")(({theme:e})=>({fontSize:e.fontSizes.smallBody,marginLeft:e.spacing(1)})),L_=({children:e})=>w(ISe,{children:["(",e,")"]}),ASe=z("aside")(({theme:e})=>({padding:e.spacing(2.5),height:"100%",borderRadius:e.shape.borderRadiusLarge,boxShadow:e.boxShadows.elevated,[e.breakpoints.up("md")]:{padding:e.spacing(6.5)}})),NSe=z(Te)(({theme:e})=>({fontSize:e.fontSizes.smallBody,color:e.palette.text.secondary})),$Se=z("span")(({theme:e})=>({fontSize:"3.25rem",lineHeight:1,color:e.palette.primary.main,fontWeight:800})),PSe=z("span")(({theme:e})=>({marginLeft:e.spacing(1.5),fontWeight:e.fontWeight.bold})),OSe=z("span")(({theme:e})=>({color:e.palette.primary.main,fontSize:e.fontSizes.mainHeader,fontWeight:e.fontWeight.bold})),DSe=z(yt)(({theme:e})=>({fontSize:e.fontSizes.smallerBody,marginBottom:e.spacing(3),marginTop:e.spacing(-1.5),[e.breakpoints.up("md")]:{marginTop:e.spacing(-4.5)}})),LSe=z(Pv)(({theme:e})=>({fontSize:"1rem",marginRight:e.spacing(1)})),MSe=z(Ur)(({theme:e})=>({margin:`${e.spacing(3)} 0`})),BSe=({instanceStatus:e})=>{var p;const{users:t}=_f(),n=b2(e),r={[ni.PRO]:80,[ni.COMPANY]:0,[ni.TEAM]:0,[ni.UNKNOWN]:0,user:15},o=r[e.plan],a=(p=e.seats)!=null?p:5,s=Math.min(t.length,a),l=t.length-s,c=r.user*l,u=o+c,d=e.state!==Da.ACTIVE;return i(de,{item:!0,xs:12,md:7,children:w(ASe,{children:[i(F,{condition:d,show:w(DSe,{severity:"info",children:["After you have sent your billing information, your instance will be upgraded - you don't have to do anything."," ",i("a",{href:"mailto:elise@getunleash.ai?subject=PRO plan clarifications",children:"Get in touch with us"})," ","for any clarification"]})}),i(kf,{color:"success",children:"Current plan"}),i(de,{container:!0,children:w(qh,{sx:h=>({marginBottom:h.spacing(3)}),children:[w(rs,{children:[i($Se,{children:e.plan}),i(F,{condition:eD(e),show:i(PSe,{sx:h=>({color:n?h.palette.error.dark:h.palette.warning.dark}),children:n?"Trial expired":e.trialExtended?"Extended Trial":"Trial"})})]}),i(rs,{children:i(F,{condition:o>0,show:w(OSe,{children:["$",o.toFixed(2)]})})})]})}),i(F,{condition:L3,show:w(Ne,{children:[w(de,{container:!0,children:[w(qh,{sx:h=>({marginBottom:h.spacing(1.5)}),children:[i(rs,{children:w(Te,{children:[i("strong",{children:a})," team members",i(L_,{children:w(Ct,{to:"/admin/users",children:[s," assigned"]})})]})}),w(rs,{children:[i(LSe,{}),i(Te,{variant:"body2",children:"included"})]})]}),w(qh,{children:[w(rs,{vertical:!0,children:[w(Te,{children:["Paid members",i(L_,{children:w(Ct,{to:"/admin/users",children:[l," assigned"]})})]}),w(NSe,{children:["Add up to 15 extra paid members - $",r.user,"/month per member"]})]}),i(rs,{children:w(Te,{sx:h=>({fontSize:h.fontSizes.mainHeader}),children:["$",c.toFixed(2)]})})]})]}),i(MSe,{}),i(de,{container:!0,children:w(qh,{children:[i(rs,{children:i(Te,{sx:h=>({fontWeight:h.fontWeight.bold,fontSize:h.fontSizes.mainHeader}),children:"Total per month"})}),i(rs,{children:w(Te,{sx:h=>({fontWeight:h.fontWeight.bold,fontSize:"2rem"}),children:["$",u.toFixed(2)]})})]})})]})})]})})},FSe=({instanceStatus:e})=>w(de,{container:!0,spacing:4,children:[i(TSe,{instanceStatus:e}),i(BSe,{instanceStatus:e})]});var x2={},zSe=yn.exports;Object.defineProperty(x2,"__esModule",{value:!0});var tD=x2.default=void 0,jSe=zSe(bn),USe=Cn,WSe=(0,jSe.default)((0,USe.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"FileDownload");tD=x2.default=WSe;const HSe=z(Te)(({theme:e})=>({marginTop:e.spacing(6),marginBottom:e.spacing(2.5),fontSize:e.fontSizes.mainHeader})),VSe=[{Header:"Amount",accessor:"amountFormatted"},{Header:"Status",accessor:"status",disableGlobalFilter:!0},{Header:"Due date",accessor:"dueDate",Cell:wa,sortType:"date",disableGlobalFilter:!0},{Header:"Download",accessor:"invoicePDF",align:"center",Cell:({value:e})=>i(mt,{sx:{display:"flex",justifyContent:"center"},"data-loading":!0,children:i(Ht,{href:e,children:i(tD,{})})}),width:100,disableGlobalFilter:!0,disableSortBy:!0}],GSe=({data:e,isLoading:t=!1})=>{const n=f.exports.useMemo(()=>({sortBy:[{id:"dueDate"}]}),[]),{getTableProps:r,getTableBodyProps:o,headerGroups:a,rows:s,prepareRow:l}=ct.exports.useTable({columns:VSe,data:e,initialState:n,sortTypes:Ar,autoResetGlobalFilter:!1,disableSortRemove:!0,defaultColumn:{Cell:Bn}},ct.exports.useGlobalFilter,ct.exports.useSortBy);return w(Gt,{isLoading:t,disablePadding:!0,children:[i(HSe,{children:"Payment history"}),w(xa,ee(V({},r()),{children:[i(Mo,{headerGroups:a}),i(bo,ee(V({},o()),{children:s.map(c=>(l(c),i(Vr,ee(V({hover:!0},c.getRowProps()),{children:c.cells.map(u=>i(Zo,ee(V({},u.getCellProps()),{children:u.render("Cell")})))}))))}))]})),i(F,{condition:s.length===0,show:i(Vt,{children:"No invoices to show."})})]})},qSe=()=>{const{instanceStatus:e,isBilling:t,refetchInstanceStatus:n,refresh:r,loading:o}=qv(),{invoices:a}=ZO(),{hasAccess:s}=f.exports.useContext(Jt);return f.exports.useEffect(()=>{(async()=>{await r(),n()})()},[n,r]),w("div",{children:[i(ac,{}),i(Gt,{header:"Billing",isLoading:o,children:i(F,{condition:t,show:i(F,{condition:s(sn),show:()=>w(Ne,{children:[i(FSe,{instanceStatus:e}),i(GSe,{data:a})]}),elseShow:()=>i(Du,{})}),elseShow:i(yt,{severity:"error",children:"Billing is not enabled for this instance."})})})]})},YSe=z(yr)(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(2.5,4),boxShadow:"none",marginBottom:e.spacing(2),fontSize:e.fontSizes.smallBody})),KSe=z("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between"})),XSe=z("h1")(({theme:e})=>({fontSize:e.fontSizes.mainHeader})),JSe=z("div")(({theme:e})=>({display:"flex"})),QSe=z("span")(({theme:e})=>({color:e.palette.text.secondary,fontSize:e.fontSizes.smallBody,marginLeft:e.spacing(1)})),ZSe=({title:e,description:t,actions:n})=>(Sa(e),w(YSe,{children:[w(KSe,{children:[i(XSe,{children:e}),i(JSe,{children:n})]}),i(F,{condition:Boolean(t==null?void 0:t.length),show:w(Ne,{children:["Description:",i(QSe,{children:t})]})})]})),eCe=({open:e,setOpen:t,user:n,group:r})=>{const{refetchGroup:o}=Jv(r.id),{updateGroup:a}=If(),{setToastData:s,setToastApiError:l}=tt(),c=async()=>{try{const d=ee(V({},r),{users:r.users.filter(({id:p})=>p!==(n==null?void 0:n.id)).map(({id:p})=>({user:{id:p}}))});await a(r.id,d),o(),t(!1),s({title:"User removed from group successfully",type:"success"})}catch(d){l(Ue(d))}},u=(n==null?void 0:n.name)||(n==null?void 0:n.username)||(n==null?void 0:n.email);return i(ln,{open:e&&Boolean(n),primaryButtonText:"Remove user",secondaryButtonText:"Cancel",onClick:c,onClose:()=>{t(!1)},title:"Remove user from group?",children:w(Te,{children:["Do you really want to remove ",i("strong",{children:u})," from"," ",i("strong",{children:r.name}),"? ",i("strong",{children:u})," will lose all access rights granted by this group."]})})},tCe=z(ar)(({theme:e})=>({fontSize:e.fontSizes.mainHeader})),nCe=z(er)(({theme:e})=>({fontSize:e.fontSizes.mainHeader})),rCe=Array(15).fill({name:"Name of the user",username:"Username of the user"}),oCe={id:"joinedAt"},{value:M_,setValue:aCe}=Pu("Group:v1",oCe),iCe=()=>{var O;const e=Number(Ve("groupId")),t=pn(),n=an(t.breakpoints.down("md")),{group:r,loading:o}=Jv(e),[a,s]=f.exports.useState(!1),[l,c]=f.exports.useState(!1),[u,d]=f.exports.useState(!1),[p,h]=f.exports.useState(),m=f.exports.useMemo(()=>[{Header:"Avatar",accessor:"imageUrl",Cell:({row:{original:L}})=>i(Bn,{children:i(Qi,{user:L})}),maxWidth:85,disableSortBy:!0},{id:"name",Header:"Name",accessor:L=>L.name||"",Cell:Wr,minWidth:100,searchable:!0},{id:"username",Header:"Username",accessor:L=>L.username||L.email,Cell:Wr,minWidth:100,searchable:!0},{Header:"Joined",accessor:"joinedAt",Cell:wa,sortType:"date",maxWidth:150},{Header:"Last login",accessor:L=>L.seenAt||"",Cell:({row:{original:L}})=>i(Up,{value:L.seenAt,emptyText:"Never logged"}),sortType:"date",maxWidth:150},{Header:"Actions",id:"Actions",align:"center",Cell:({row:{original:L}})=>i(Lo,{children:i(wt,{title:"Remove user from group",arrow:!0,describeChild:!0,children:i("span",{children:i(Ht,{"data-testid":`${kne}-${L.id}`,onClick:()=>{h(L),d(!0)},children:i(er,{})})})})}),maxWidth:100,disableSortBy:!0}],[h,d]),[b,y]=Ls(),[g]=f.exports.useState(()=>({sortBy:[{id:b.get("sort")||M_.id,desc:b.has("order")?b.get("order")==="desc":M_.desc}],hiddenColumns:["description"],globalFilter:b.get("search")||""})),[x,v]=f.exports.useState(g.globalFilter),{data:S,getSearchText:E,getSearchContext:R}=Ou(m,x,(O=r==null?void 0:r.users)!=null?O:[]),A=f.exports.useMemo(()=>(S==null?void 0:S.length)===0&&o?rCe:S,[S,o]),{headerGroups:_,rows:N,prepareRow:k,state:{sortBy:I}}=ct.exports.useTable({columns:m,data:A,initialState:g,sortTypes:Ar,autoResetSortBy:!1,disableSortRemove:!0,disableMultiSort:!0},ct.exports.useSortBy,ct.exports.useFlexLayout);return f.exports.useEffect(()=>{const L={};L.sort=I[0].id,I[0].desc&&(L.order="desc"),x&&(L.search=x),y(L,{replace:!0}),aCe({id:I[0].id,desc:I[0].desc||!1})},[I,x,y]),i(F,{condition:Boolean(r),show:w(Ne,{children:[i(ZSe,{title:r==null?void 0:r.name,description:r==null?void 0:r.description,actions:w(Ne,{children:[i(Ft,{"data-testid":Ene,to:`/admin/groups/${e}/edit`,component:Ct,"data-loading":!0,permission:sn,tooltipProps:{title:"Edit group"},children:i(tCe,{})}),i(Ft,{"data-testid":Tne,"data-loading":!0,onClick:()=>s(!0),permission:sn,tooltipProps:{title:"Delete group"},children:i(nCe,{})})]})}),w(Gt,{isLoading:o,header:i(Dt,{secondary:!0,title:`Users (${N.length<A.length?`${N.length} of ${A.length}`:A.length})`,actions:w(Ne,{children:[i(F,{condition:!n,show:w(Ne,{children:[i(jn,{initialValue:x,onChange:v,hasFilters:!0,getSearchContext:R}),i(Dt.Divider,{})]})}),i(oc,{"data-testid":Rne,onClick:()=>{c(!0)},maxWidth:"700px",Icon:io,permission:sn,children:"Edit users"})]}),children:i(F,{condition:n,show:i(jn,{initialValue:x,onChange:v,hasFilters:!0,getSearchContext:R})})}),children:[i(so,{value:E(x),children:i(Hs,{rows:N,headerGroups:_,prepareRow:k})}),i(F,{condition:N.length===0,show:i(F,{condition:(x==null?void 0:x.length)>0,show:w(Vt,{children:["No users found matching \u201C",x,"\u201D in this group."]}),elseShow:i(Vt,{children:"This group is empty. Get started by adding a user to the group."})})}),i(M3,{open:a,setOpen:s,group:r}),i(W3,{open:l,setOpen:c,group:r}),i(eCe,{open:u,setOpen:d,user:p,group:r})]})]})})},sCe=z("form")(()=>({display:"flex",flexDirection:"column",height:"100%"})),y1=z("p")(({theme:e})=>({color:e.palette.text.secondary,marginBottom:e.spacing(1)})),B_=z(Sn)(({theme:e})=>({width:"100%",maxWidth:e.spacing(50),marginBottom:e.spacing(2)})),lCe=z("div")(({theme:e})=>({marginBottom:e.spacing(6)})),cCe=z("div")(()=>({marginTop:"auto",display:"flex",justifyContent:"flex-end"})),uCe=z(nt)(({theme:e})=>({marginLeft:e.spacing(3)})),nD=({name:e,description:t,users:n,setName:r,setDescription:o,setUsers:a,handleSubmit:s,handleCancel:l,errors:c,mode:u,children:d})=>w(sCe,{onSubmit:s,children:[w("div",{children:[i(y1,{children:"What would you like to call your group?"}),i(B_,{autoFocus:!0,label:"Name",id:"group-name",error:Boolean(c.name),errorText:c.name,value:e,onChange:p=>r(p.target.value),"data-testid":xne,required:!0}),i(y1,{children:"How would you describe your group?"}),i(B_,{multiline:!0,rows:4,label:"Description",placeholder:"A short description of the group",value:t,onChange:p=>o(p.target.value),"data-testid":wne}),i(F,{condition:u==="Create",show:w(Ne,{children:[i(y1,{children:"Add users to this group"}),i(j3,{users:n,setUsers:a}),i(lCe,{children:i(U3,{users:n,setUsers:a})})]})})]}),w(cCe,{children:[d,i(uCe,{onClick:l,children:"Cancel"})]})]}),dCe=()=>{const{setToastData:e,setToastApiError:t}=tt(),{uiConfig:n}=st(),r=Ye(),{name:o,setName:a,description:s,setDescription:l,users:c,setUsers:u,getGroupPayload:d,clearErrors:p,errors:h,setErrors:m}=xC(),{groups:b}=du(),{createGroup:y,loading:g}=If(),x=async N=>{if(N.preventDefault(),p(),!A)return;const k=d();try{const I=await y(k);r(`/admin/groups/${I.id}`),e({title:"Group created successfully",text:"Now you can start using your group.",confetti:!0,type:"success"})}catch(I){t(Ue(I))}},v=()=>`curl --location --request POST '${n.unleashUrl}/api/admin/groups' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${JSON.stringify(d(),void 0,2)}'`,S=()=>{r(qn)},E=N=>N.length,R=N=>!(b!=null&&b.filter(k=>k.name===N).length),A=E(o)&&R(o);return i(Un,{loading:g,title:"Create group",description:"Groups is the best and easiest way to organize users and then use them in projects to assign a specific role in one go to all the users in a group.",documentationLink:"https://docs.getunleash.io/advanced/groups",documentationLinkLabel:"Groups documentation",formatApiCode:v,children:i(nD,{name:o,description:s,users:c,setName:N=>{p(),R(N)||m({name:"A group with that name already exists."}),a(N)},setDescription:l,setUsers:u,errors:h,handleSubmit:x,handleCancel:S,mode:Bbe,children:i(nt,{type:"submit",variant:"contained",color:"primary",disabled:!A,"data-testid":Cne,children:"Create group"})})})},pCe=()=>{const e=Number(Ve("groupId")),{group:t,refetchGroup:n}=Jv(e),{refetchGroups:r}=du(),{setToastData:o,setToastApiError:a}=tt(),{uiConfig:s}=st(),l=Ye(),{name:c,setName:u,description:d,setDescription:p,users:h,setUsers:m,getGroupPayload:b,clearErrors:y,errors:g,setErrors:x}=xC(t==null?void 0:t.name,t==null?void 0:t.description,t==null?void 0:t.users),{groups:v}=du(),{updateGroup:S,loading:E}=If(),R=async L=>{L.preventDefault(),y();const q=b();try{await S(e,q),n(),r(),l(qn),o({title:"Group updated successfully",type:"success"})}catch(D){a(Ue(D))}},A=()=>`curl --location --request PUT '${s.unleashUrl}/api/admin/groups/${e}' \\
    --header 'Authorization: INSERT_API_KEY' \\
    --header 'Content-Type: application/json' \\
    --data-raw '${JSON.stringify(b(),void 0,2)}'`,_=()=>{l(qn)},N=L=>L.length,k=L=>!(v!=null&&v.filter(q=>q.name===L&&q.id!==e).length),I=N(c)&&k(c);return i(Un,{loading:E,title:"Edit group",description:"Groups is the best and easiest way to organize users and then use them in projects to assign a specific role in one go to all the users in a group.",documentationLink:"https://docs.getunleash.io/advanced/groups",documentationLinkLabel:"Groups documentation",formatApiCode:A,children:i(nD,{name:c,description:d,users:h,setName:L=>{y(),k(L)||x({name:"A group with that name already exists."}),u(L)},setDescription:p,setUsers:m,errors:g,handleSubmit:R,handleCancel:_,mode:vy,children:i(nt,{type:"submit",variant:"contained",color:"primary",disabled:!I,"data-testid":R$,children:"Save"})})})},fCe=f.exports.lazy(()=>xO(()=>import("./Playground.0e5495f1.js"),[])),hCe=()=>w(yt,{severity:"info",children:[w("p",{children:["Use this page to configure allowed CORS origins for the Frontend API (",i("code",{children:"/api/frontend"}),")."]}),w("p",{children:["This configuration will not affect the Admin API (",i("code",{children:"/api/admin"}),") nor the Client API (",i("code",{children:"/api/client"}),")."]}),w("p",{children:["An asterisk (",i("code",{children:"*"}),") may be used to allow API calls from any origin."]})]}),mCe=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{setFrontendSettings:async a=>{const s={frontendSettings:{frontendApiOrigins:a}},l=t(bt("api/admin/ui-config"),{method:"POST",body:JSON.stringify(s)},"setFrontendSettings");await e(l.caller,l.id)},loading:r,errors:n}},gCe=({frontendApiOrigins:e})=>{const{setFrontendSettings:t}=mCe(),{setToastData:n,setToastApiError:r}=tt(),[o,a]=f.exports.useState(F_(e)),s=ga(),l=ga();return i("form",{onSubmit:async u=>{try{const d=vCe(o);u.preventDefault(),await t(d),a(F_(d)),n({title:"Settings saved",type:"success"})}catch(d){r(Ue(d))}},children:w(mt,{sx:{display:"grid",gap:1},children:[i("label",{htmlFor:s,children:"Which origins should be allowed to call the Frontend API (one per line)?"}),i(At,{id:s,"aria-describedby":l,placeholder:yCe,value:o,onChange:u=>a(u.target.value),multiline:!0,rows:12,variant:"outlined",fullWidth:!0,InputProps:{style:{fontFamily:"monospace",fontSize:"0.8em"}}}),i(Ei,{permission:sn})]})})},vCe=e=>e.split(/[,\n\s]+/).map(t=>t.replace(/\/$/,"")).filter(Boolean),F_=e=>{var t;return(t=e==null?void 0:e.join(`
`))!=null?t:""},yCe=["https://example.com","https://example.org"].join(`
`),bCe=()=>{const{pathname:e}=Gr(),t=e.includes("/admin/"),{hasAccess:n}=f.exports.useContext(Jt);return w("div",{children:[i(F,{condition:t,show:i(ac,{})}),i(F,{condition:n(sn),show:i(xCe,{}),elseShow:i(Du,{})})]})},xCe=()=>{const{uiConfig:e,loading:t}=st();return t?null:i(Gt,{header:i(Dt,{title:"CORS origins"}),children:w(mt,{sx:{display:"grid",gap:4},children:[i(hCe,{}),i(gCe,{frontendApiOrigins:e.frontendApiOrigins})]})})},Kp=[{path:"/splash/:splashId",title:"Unleash",component:uwe,type:"protected",menu:{}},{path:"/projects/create",parent:"/projects",title:"Create",component:bxe,type:"protected",enterprise:!0,menu:{}},{path:"/projects/:projectId/edit",parent:"/projects",title:":projectId",component:yxe,type:"protected",enterprise:!0,menu:{}},{path:"/projects/:projectId/archived",title:":projectId",parent:"/archive",component:o0e,type:"protected",menu:{}},{path:"/projects/:projectId/features/:featureId/:activeTab/copy",parent:"/projects/:projectId/features/:featureId/:activeTab",title:"Copy",component:Xxe,type:"protected",menu:{}},{path:"/projects/:projectId/features/:featureId/edit",parent:"/projects",title:"Edit feature",component:Exe,type:"protected",menu:{}},{path:"/projects/:projectId/features/:featureId/*",parent:"/projects",title:"FeatureView",component:Tbe,type:"protected",menu:{}},{path:"/projects/:projectId/create-toggle",parent:"/projects/:projectId/features",title:"Create feature toggle",component:Cxe,type:"protected",menu:{}},{path:"/projects/:projectId/features2/:featureId",parent:"/features",title:":featureId",component:N_,type:"protected",menu:{}},{path:"/projects/:projectId/*",parent:"/projects",title:":projectId",component:r0e,flag:ipe,type:"protected",menu:{}},{path:"/projects",title:"Projects",component:Ipe,type:"protected",menu:{mobile:!0}},{path:"/features/:activeTab/:featureId",parent:"/features",title:":featureId",component:N_,type:"protected",menu:{}},{path:"/features",title:"Feature toggles",component:Wse,type:"protected",menu:{mobile:!0}},{path:"/playground",title:"Playground",component:fCe,hidden:!1,type:"protected",menu:{mobile:!0}},{path:"/applications/:name",title:":name",parent:"/applications",component:_xe,type:"protected",menu:{}},{path:"/applications",title:"Applications",component:Ixe,type:"protected",menu:{mobile:!0,advanced:!0}},{path:"/context/create",parent:"/context",title:"Create",component:fwe,type:"protected",flag:G0,menu:{}},{path:"/context/edit/:name",parent:"/context",title:":name",component:pxe,type:"protected",flag:G0,menu:{}},{path:"/context",title:"Context fields",component:$xe,type:"protected",flag:G0,menu:{mobile:!0,advanced:!0}},{path:"/strategies/create",title:"Create",parent:"/strategies",component:rwe,type:"protected",menu:{}},{path:"/strategies/:name/edit",title:":name",parent:"/strategies",component:owe,type:"protected",menu:{}},{path:"/strategies/:name",title:":name",parent:"/strategies",component:Ale,type:"protected",menu:{}},{path:"/strategies",title:"Strategies",component:ace,type:"protected",menu:{mobile:!0,advanced:!0}},{path:"/environments/create",title:"Environments",component:txe,parent:"/environments",type:"protected",menu:{}},{path:"/environments/:id",title:"Edit",component:oxe,type:"protected",menu:{}},{path:"/environments",title:"Environments",component:Wwe,type:"protected",flag:spe,menu:{mobile:!0,advanced:!0}},{path:"/tag-types/create",parent:"/tag-types",title:"Create",component:gxe,type:"protected",menu:{}},{path:"/tag-types/edit/:name",parent:"/tag-types",title:":name",component:mxe,type:"protected",menu:{}},{path:"/tag-types",title:"Tag types",component:sce,type:"protected",menu:{mobile:!0,advanced:!0}},{path:"/addons/create/:providerId",parent:"/addons",title:"Create",component:Vxe,type:"protected",menu:{}},{path:"/addons/edit/:addonId",parent:"/addons",title:"Edit",component:Gxe,type:"protected",menu:{}},{path:"/addons",title:"Addons",component:hce,hidden:!1,type:"protected",menu:{mobile:!0,advanced:!0}},{path:"/segments/create",title:"Segments",component:Rwe,hidden:!1,type:"protected",layout:"main",menu:{},flag:Y0},{path:"/segments/edit/:segmentId",title:"Segments",component:Iwe,hidden:!1,type:"protected",layout:"main",menu:{},flag:Y0},{path:"/segments",title:"Segments",component:rSe,hidden:!1,type:"protected",menu:{mobile:!0,advanced:!0},flag:Y0},{path:"/history",title:"Event log",component:Jxe,type:"protected",menu:{adminSettings:!0}},{path:"/archive",title:"Archived toggles",component:vSe,type:"protected",menu:{}},{path:"/admin/api/create-token",parent:"/admin",title:"API access",component:Xbe,type:"protected",menu:{}},{path:"/admin/create-project-role",title:"Create",component:Dbe,type:"protected",menu:{},flag:q0},{path:"/admin/roles/:id/edit",title:"Edit",component:Lbe,type:"protected",menu:{},flag:q0},{path:"/admin/users/:id/edit",title:"Edit",component:jbe,type:"protected",menu:{},hidden:!0},{path:"/admin/api",parent:"/admin",title:"API access",component:Dce,type:"protected",menu:{mobile:!0,advanced:!0}},{path:"/admin/users",parent:"/admin",title:"Users",component:fue,type:"protected",menu:{adminSettings:!0}},{path:"/admin/create-user",parent:"/admin",title:"Users",component:Fbe,type:"protected",menu:{}},{path:"/admin/groups",parent:"/admin",title:"Groups",component:fde,type:"protected",menu:{adminSettings:!0},flag:Lh},{path:"/admin/groups/:groupId",parent:"/admin",title:":groupId",component:iCe,type:"protected",menu:{},flag:Lh},{path:"/admin/groups/create-group",parent:"/admin/groups",title:"Create group",component:dCe,type:"protected",menu:{},flag:Lh},{path:"/admin/groups/:groupId/edit",parent:"/admin/groups",title:"Edit group",component:pCe,type:"protected",menu:{},flag:Lh},{path:"/admin/roles",parent:"/admin",title:"Project roles",component:Nbe,type:"protected",flag:q0,menu:{adminSettings:!0}},{path:"/admin/auth",parent:"/admin",title:"Single sign-on",component:Ede,type:"protected",menu:{adminSettings:!0}},{path:"/admin/cors",parent:"/admin",title:"CORS origins",component:bCe,type:"protected",configFlag:"embedProxy",menu:{adminSettings:!0}},{path:"/admin/billing",parent:"/admin",title:"Billing",component:qSe,type:"protected",menu:{}},{path:"/admin-invoices",parent:"/admin",title:"Billing & invoices",component:fSe,type:"protected",menu:{adminSettings:!0,isEnterprise:!0}},{path:"/admin",title:"Admin",component:N3,hidden:!1,type:"protected",menu:{}},{path:"/login",title:"Log in",component:ape,type:"unprotected",hidden:!0,menu:{}},{path:"/new-user",title:"New user",hidden:!0,component:mpe,type:"unprotected",menu:{}},{path:"/reset-password",title:"Reset password",hidden:!0,component:vpe,type:"unprotected",menu:{}},{path:"/forgotten-password",title:"Forgotten password",hidden:!0,component:bpe,type:"unprotected",menu:{}}],wCe=Kp.filter(e=>!e.hidden),SCe=()=>{const e=wCe.filter(o=>o.menu.advanced),t=Kp.filter(o=>o.menu.adminSettings),n=Kp.filter(o=>o.menu.mobile),r={mainNavRoutes:e,adminRoutes:t,mobileRoutes:n};return()=>r},CCe=SCe(),ECe=le()(e=>({header:{backgroundColor:e.palette.headerBackground,padding:"0.5rem",boxShadow:"none",position:"relative",zIndex:300},links:{display:"flex",justifyContent:"center",marginLeft:"1.5rem","& a":{textDecoration:"none",color:"inherit",marginRight:"1.5rem",display:"flex",alignItems:"center"}},container:{display:"flex",alignItems:"center",maxWidth:1280,[e.breakpoints.down("md")]:{padding:"0"}},nav:{display:"flex",alignItems:"center",flexGrow:1},drawerButton:{color:"#000"},advancedNavButton:{border:"none",background:"transparent",height:"100%",display:"flex",fontSize:"1rem",fontFamily:e.typography.fontFamily,alignItems:"center",color:"inherit",cursor:"pointer"},headerTitle:{fontSize:"1.4rem"},userContainer:{marginLeft:"auto",display:"flex",alignItems:"center"},logoOnly:{width:"60px"},logo:{width:"150px"},popover:{top:"25px"},menuItem:{minWidth:"150px"},menuItemBox:{width:"12.5px",height:"12.5px",display:"block",backgroundColor:e.palette.primary.main,marginRight:"1rem",borderRadius:"2px"},navMenuLink:{textDecoration:"none",alignItems:"center",display:"flex"},icon:{color:e.palette.grey[700]},wideButton:{borderRadius:100}})),TCe=()=>{const{onSetThemeMode:e,themeMode:t}=B4(),n=pn(),r=ga(),o=ga(),[a,s]=f.exports.useState(null),[l,c]=f.exports.useState(null),[u,d]=f.exports.useState(!1),{permissions:p}=h2(),{uiConfig:h,isOss:m}=st(),b=an(n.breakpoints.down("md")),{classes:y}=ECe(),{classes:g}=Yn(),[x,v]=f.exports.useState(!1),S=()=>v(k=>!k),E=()=>s(null),R=()=>c(null);f.exports.useEffect(()=>{(p==null?void 0:p.find(I=>I.permission===sn))&&d(!0)},[p]);const A=CCe(),_=k=>!k.menu.isEnterprise||!m(),N={mainNavRoutes:A.mainNavRoutes.filter(V0(h)),mobileRoutes:A.mobileRoutes.filter(V0(h)),adminRoutes:A.adminRoutes.filter(V0(h)).filter(_)};return b?i(fR,{className:y.header,position:"static",children:w(SR,{className:y.container,children:[i(wt,{title:"Menu",arrow:!0,children:i(Ht,{className:y.drawerButton,onClick:S,"aria-controls":"header-drawer","aria-expanded":x,size:"large",children:i(d$,{})})}),i(uoe,{title:h.name,flags:h.flags,links:h.links,open:x,toggleDrawer:S,admin:u,routes:N}),i("div",{className:y.userContainer,children:i(Ik,{})})]})}):i(fR,{className:y.header,position:"static",children:w(SR,{className:y.container,children:[i(Ct,{to:"/",className:it(g.flexRow,g.focusable),"aria-label":"Home",children:i(qb,{darkmode:i(Bre,{className:y.logo,"aria-label":"Unleash logo"}),lightmode:i(Mre,{className:y.logo,"aria-label":"Unleash logo"})})}),w("nav",{className:y.nav,children:[w("div",{className:y.links,children:[i(Ct,{to:"/projects",className:g.focusable,children:"Projects"}),i(Ct,{to:"/features",className:g.focusable,children:"Feature toggles"}),i(Ct,{to:"/playground",className:g.focusable,children:"Playground"}),w("button",{className:y.advancedNavButton,onClick:k=>c(k.currentTarget),"aria-controls":l?o:void 0,"aria-expanded":Boolean(l),children:["Configure",i(Ab,{className:y.icon})]}),i(Lk,{id:o,options:N.mainNavRoutes,anchorEl:l,handleClose:R,style:{top:10}})]}),w("div",{className:y.userContainer,children:[i(F,{condition:Boolean(h.flags.ENABLE_DARK_MODE_SUPPORT),show:i($n,{control:i(ro,{onChange:e,checked:t==="dark"}),label:"darkmode"})}),i(wt,{title:"Documentation",arrow:!0,children:i(Ht,{href:"https://docs.getunleash.io/",target:"_blank",rel:"noopener noreferrer",size:"large",disableRipple:!0,className:g.focusable,children:i(LS,{})})}),i(F,{condition:u,show:i(wt,{title:"Settings",arrow:!0,children:w(Ht,{onClick:k=>s(k.currentTarget),className:it(y.wideButton,g.focusable),"aria-controls":a?r:void 0,"aria-expanded":Boolean(a),size:"large",disableRipple:!0,children:[i(p$,{}),i(Ab,{className:y.icon})]})})}),i(Lk,{id:r,options:N.adminRoutes,anchorEl:a,handleClose:E,style:{top:5,left:-100}})," ",i(Ik,{})]})]})]})})},RCe=e=>{var n;const t=(n=e.versionInfo)==null?void 0:n.current;return t!=null&&t.enterprise?`${e.name} ${t.enterprise}`:t!=null&&t.oss?`${e.name} ${t.oss}`:`${e.name} ${e.version}`},kCe=e=>{var r,o;const t=(r=e.versionInfo)==null?void 0:r.latest,n=(o=e.versionInfo)==null?void 0:o.isLatest;if((t==null?void 0:t.enterprise)&&!n)return`Upgrade available - Latest Enterprise release: ${t.enterprise}`;if((t==null?void 0:t.oss)&&!n)return`Upgrade available - Latest OSS release: ${t.oss}`},_Ce=le()(e=>({title:{all:"unset",display:"block",margin:"1rem 0",fontSize:"1rem",fontWeight:e.fontWeight.bold}})),dm=({children:e})=>{const{classes:t}=_Ce();return i("h2",{className:t.title,children:e})},ICe=e=>{var a;const t=(a=e.uiConfig.versionInfo)==null?void 0:a.instanceId,n=RCe(e.uiConfig),r=e.uiConfig.environment,o=kCe(e.uiConfig);return w("section",{title:"API details",children:[w(dm,{children:[n," ",i(F,{condition:Boolean(r),show:w("small",{children:["(",r,")"]})})]}),i(F,{condition:Boolean(o),show:w("small",{children:[o,i("br",{})]})}),i("br",{}),i("small",{children:e.uiConfig.slogan}),i("br",{}),i(F,{condition:Boolean(t),show:i("small",{children:`${t}`})})]})},ACe=le()(e=>({footer:{padding:"2rem 4rem",width:"100%",flexGrow:1,zIndex:100,backgroundColor:e.palette.footerBackground},list:{padding:0,margin:0},listItem:{padding:0,margin:0,"& a":{textDecoration:"none",color:e.palette.text.primary}}})),NCe=()=>{const{classes:e}=ACe(),{uiConfig:t}=st();return i("footer",{className:e.footer,children:w(de,{container:!0,justifyContent:"center",spacing:10,style:{marginBottom:0},children:[i(de,{item:!0,md:4,xs:12,children:i(ICe,{uiConfig:t})}),i(de,{item:!0,xs:12,md:"auto",children:w(de,{container:!0,spacing:7,direction:"row",children:[i(de,{item:!0,children:w("section",{title:"Unleash SDK",children:[i(dm,{children:"Server SDKs"}),w(Po,{className:e.list,dense:!0,children:[i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/node_sdk",target:"_blank",children:"Node.js"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/java_sdk",target:"_blank",children:"Java"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/go_sdk",target:"_blank",children:"Go"})})})," ",i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/ruby_sdk",target:"_blank",children:"Ruby"})})})," ",i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/python_sdk",target:"_blank",children:"Python"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/dot_net_sdk",target:"_blank",children:".NET"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/php_sdk",target:"_blank",children:"PHP"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks",target:"_blank",children:"All SDKs"})})})]})]})}),i(de,{item:!0,children:w("section",{title:"Unleash SDK",children:[i(dm,{children:"Frontend SDKs"}),w(Po,{className:e.list,dense:!0,children:[i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/unleash-proxy",target:"_blank",children:"Unleash Proxy"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/proxy-javascript",target:"_blank",children:"JavaScript SDK"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/proxy-react",target:"_blank",children:"React SDK"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/proxy-ios",target:"_blank",children:"iOS SDK"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://docs.getunleash.io/sdks/android_proxy_sdk",target:"_blank",children:"Android SDK"})})})]})]})}),i(de,{item:!0,children:w("section",{children:[i(dm,{children:"About"}),w(Po,{className:e.list,dense:!0,children:[i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://www.getunleash.io/",target:"_blank",children:"getunleash.io"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://twitter.com/getunleash",target:"_blank",children:"Twitter"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://www.linkedin.com/company/getunleash",target:"_blank",children:"LinkedIn"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://github.com/Unleash/unleash",target:"_blank",children:"GitHub"})})}),i(Rn,{className:e.listItem,children:i(dn,{primary:i("a",{href:"https://slack.unleash.run",target:"_blank",children:"Slack Community"})})})]})]})})]})})]})})},$Ce=le()({proclamation:{marginBottom:"1rem"},content:{maxWidth:"800px"},link:{display:"block",marginTop:"0.5rem",width:"100px"}}),PCe=e=>!(!e||localStorage&&localStorage.getItem(e)),OCe=({toast:e})=>{const[t,n]=f.exports.useState(!1),{classes:r}=$Ce();f.exports.useEffect(()=>{n(PCe((e==null?void 0:e.id)||""))},[e==null?void 0:e.id]);const o=()=>{localStorage&&localStorage.setItem((e==null?void 0:e.id)||"","seen"),n(!1)};return e?i(F,{condition:t,show:w(yt,{className:r.proclamation,severity:e.severity,onClose:o,children:[i(Te,{className:r.content,variant:"body2",children:e.message}),i("a",{href:e.link,className:r.link,target:"_blank",rel:"noopener noreferrer",children:"View more"})]})}):null},DCe=le()(e=>({breadcrumbNav:{position:"absolute",top:"4px"},breadcrumbNavParagraph:{color:"inherit","& > *":{verticalAlign:"middle"}},breadcrumbLink:{textDecoration:"none","& > *":{verticalAlign:"middle"},color:e.palette.primary.main}})),LCe=()=>{const{isAdmin:e}=f.exports.useContext(Jt),{classes:t}=DCe(),n=Gr(),r=n.pathname.split("/").filter(o=>o).filter(o=>o!=="create"&&o!=="edit"&&o!=="view"&&o!=="variants"&&o!=="logs"&&o!=="metrics"&&o!=="copy"&&o!=="features"&&o!=="features2"&&o!=="create-toggle"&&o!=="settings");return i(F,{condition:n.pathname.includes("admin")&&e||!n.pathname.includes("admin"),show:i(F,{condition:r.length>1,show:i(sV,{className:t.breadcrumbNav,"aria-label":"Breadcrumbs",children:r.map((o,a)=>{if(a===r.length-1)return i("p",{className:t.breadcrumbNavParagraph,children:i(Tr,{text:o,maxWidth:"200",maxLength:25})},o);let l="/";return r.forEach((c,u)=>{u!==a&&u<a?l+=c+"/":u===a&&(l+=c)}),i(Ct,{className:t.breadcrumbLink,to:l,children:i(Tr,{maxLength:25,text:o,maxWidth:"200"})},o)})})})})};var MCe="/static/texture.c29e66c0.png";const rD="skip-nav-target-id",BCe=()=>i("div",{id:rD}),FCe=le()(e=>({link:{position:"fixed",overflow:"hidden",zIndex:1e3,top:"1.125rem",left:"1.125rem",padding:"0.5rem 1rem",whiteSpace:"nowrap",textDecoration:"none",background:e.palette.primary.dark,color:e.palette.primary.contrastText,borderRadius:e.shape.borderRadius,fontSize:e.fontSizes.smallBody,[e.breakpoints.down(960)]:{top:"0.8rem",left:"0.8rem"},"&:not(:focus):not(:active)":{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",zIndex:-1,width:1,height:1,margin:-1,padding:0}}})),zCe=()=>{const{classes:e}=FCe();return w("a",{href:`#${rD}`,className:e.link,children:["Skip to content ",i("span",{"aria-hidden":!0,children:"\u2193"})]})},jCe=le()(e=>({container:{height:"100%",justifyContent:"space-between"},contentContainer:{height:"100%",padding:"3.25rem 0",position:"relative",[e.breakpoints.down("md")]:{padding:"3.25rem 0.75rem"}}})),UCe=({children:e})=>{const{classes:t}=jCe(),{classes:n}=u$(),{uiConfig:r}=st();return w(Ne,{children:[i(zCe,{}),i(TCe,{}),i(BCe,{}),w(de,{container:!0,className:t.container,children:[w("main",{className:it(n.contentWrapper),children:[i(de,{item:!0,className:n.content,xs:12,sm:12,children:w("div",{className:t.contentContainer,style:{zIndex:200},children:[i(LCe,{}),i(OCe,{toast:r.toast}),e]})}),i("img",{src:Xa(MCe),alt:"",style:{display:"block",position:"fixed",zIndex:0,bottom:0,right:0,width:400,pointerEvents:"none",userSelect:"none"}})]}),i(NCe,{})]})]})},WCe=({children:e})=>{const{pathname:t}=Gr();return i(F,{condition:HCe(t),show:e,elseShow:i(UCe,{children:e})})},HCe=e=>VCe.some(t=>uw(t,e)),VCe=["/login","/new-user","/reset-password","/reset-password-success","/forgotten-password","/splash/:splashId","/404"],GCe=le()({container:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",padding:"2rem",position:"fixed",inset:0,backgroundColor:"#fff",width:"100%"},logo:{height:"80px"},content:{display:"flex",position:"relative"},buttonContainer:{marginTop:"2rem"},homeButton:{marginLeft:"1rem"},icon:{height:"150px",width:"150px",position:"absolute",right:100,top:45}}),qCe=()=>{const e=Ye(),{classes:t}=GCe(),n=()=>{e("/")},r=()=>{e(qn)};return i("div",{className:t.container,children:w("div",{children:[i(M$,{className:t.logo}),i("div",{className:t.content,children:i(Te,{variant:"h1",style:{fontSize:"2rem"},children:"Ooops. That's a page we haven't toggled on yet."})}),w("div",{className:t.buttonContainer,children:[i(nt,{variant:"contained",color:"primary",onClick:r,children:"Go back"}),i(nt,{onClick:n,className:t.homeButton,children:"Go home"})]})]})})},YCe=()=>{const{pathname:e,search:t}=Gr(),r=`/login?redirect=${encodeURIComponent(e+t)}`;return i(Yi,{to:r,replace:!0})},KCe=({route:e})=>{const{user:t}=yi();return!Boolean(t==null?void 0:t.id)&&e.type==="protected"?i(YCe,{}):i(e.component,{})},XCe="InvalidTokenError",JCe=({children:e,isUnauthorized:t})=>{const{cache:n}=l$(),r=Ye(),{setToastApiError:o}=tt();return i(Hee,{value:{onErrorRetry:(s,l,c,u,{retryCount:d})=>{if(s.status<499)return s;setTimeout(()=>u({retryCount:d}),5e3)},onError:s=>{var l;if(s.status===401){const c=location.pathname;if(((l=s==null?void 0:s.info)==null?void 0:l.name)!==XCe&&Fn(Vm,V({},s.info),!1),c===bt("login")||c===bt("new-user")||c===bt("reset-password")||c===bt("forgotten-password"))return;n.clear(),r("/login");return}t||o(s.message)}},children:e})},QCe=le()(e=>({toastWrapper:{right:0,left:0,margin:"0 auto",maxWidth:"450px"}})),ZCe=le()(e=>({container:{maxWidth:"450px",background:e.palette.background.paper,boxShadow:"2px 2px 4px rgba(0,0,0,0.4)",zIndex:500,margin:"0 0.8rem",borderRadius:"12.5px",padding:"2rem"},innerContainer:{position:"relative"},starting:{opacity:0},headerContainer:{display:"flex",alignItems:"center"},confettiContainer:{position:"relative",maxWidth:"600px",margin:"0 auto",display:"flex"},textContainer:{marginLeft:"1rem",wordBreak:"break-word"},headerStyles:{fontWeight:"normal",margin:0,marginBottom:"0.5rem"},createdContainer:{display:"flex",alignItems:"center",flexDirection:"column"},anim:{animation:"$drop 10s 3s"},checkMark:{width:"65px",height:"65px"},buttonStyle:{position:"absolute",top:"-33px",right:"-33px"},"@keyframes drop":{"0%":{opacity:"0%",top:"0%"},"10%":{opacity:"100%"},"100%":{top:"100%"}}})),e2e=le()(e=>({badge:{backgroundColor:e.palette.checkmarkBadge,width:"75px",height:"75px",borderRadius:"50px",display:"flex",justifyContent:"center",alignItems:"center",[e.breakpoints.down("sm")]:{width:"50px",height:"50px"}},check:{color:"#fff",width:"35px",height:"35px"}})),t2e=({type:e,className:t})=>{const{classes:n}=e2e();return i("div",{className:it(n.badge,t),children:e==="error"?i(ES,{className:n.check,titleAccess:"Error"}):i(m$,{className:n.check})})},n2e=({title:e,text:t,type:n,confetti:r})=>{const{setToast:o}=f.exports.useContext(Ws),{classes:a}=ZCe(),s=["#d13447","#ffbf00","#263672"],l=200,c=p=>Math.floor(Math.random()*p)+1,u=()=>new Array(l).fill(1).map((m,b)=>{const y=c(8),g=c(100),x={position:"absolute",width:`${y}px`,height:`${y*.4}px`,backgroundColor:s[c(2)],left:`${g}%`,transform:`rotate(${c(101)}deg)`,animationDelay:`${c(5)}s`,animationDuration:`${c(3)}s`,animationEase:`${c(2)}s`};return i("div",{style:x,className:it(a.starting,a.anim)},b)}),d=()=>{o(p=>ee(V({},p),{show:!1}))};return i("div",{className:a.container,children:i("div",{className:a.innerContainer,children:w("div",{className:a.confettiContainer,children:[r&&u(),w("div",{className:a.createdContainer,children:[w("div",{className:a.headerContainer,children:[i("div",{children:i(t2e,{type:n,className:a.checkMark})}),w("div",{className:a.textContainer,children:[i("h3",{className:a.headerStyles,children:e}),i(F,{condition:Boolean(t),show:i("p",{"data-testid":ore,children:t})})]})]}),i(wt,{title:"Close",arrow:!0,children:i(Ht,{onClick:d,className:a.buttonStyle,size:"large",children:i(xv,{})})})]})]})})})},r2e=()=>{const{toastData:e,setToast:t}=f.exports.useContext(Ws),{classes:n}=Yn(),{classes:r}=QCe(),o=()=>{t(a=>ee(V({},a),{show:!1}))};return f.exports.useEffect(()=>{if(!e.autoHideDuration)return;let a=setTimeout(()=>{o()},e.autoHideDuration);return()=>{clearTimeout(a)}},[e==null?void 0:e.show]),i(Xw,{children:i(q4,{mounted:Boolean(e==null?void 0:e.show),start:n.fadeInBottomStartWithoutFixed,enter:n.fadeInBottomEnter,leave:n.fadeInBottomLeave,container:r.toastWrapper,children:i(n2e,V({},e))})})},o2e=()=>{const{pathname:e}=Gr(),{user:t}=yi(),{splash:n}=VO(),{uiConfig:r,loading:o}=st();if(!t||!n||!r||o||uw("/splash/:splashId",e)||t.isAPI)return null;const a=cwe.find(s=>i2e(s,r.flags)&&!a2e(s,n));return a?i(Yi,{to:`/splash/${a}`,replace:!0}):null},a2e=(e,t)=>Boolean(t[e]),i2e=(e,t)=>e==="operators"?Boolean(t.C||t.CO):!0;function s2e(e,t,n){const r=/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*:)*?:?0*1$/.test(location.hostname)||location.protocol==="file:";if(!t.trackLocalhost&&r)return console.warn("[Plausible] Ignoring event because website is running locally");try{if(window.localStorage.plausible_ignore==="true")return console.warn('[Plausible] Ignoring event because "plausible_ignore" is set to "true" in localStorage')}catch{}const o={n:e,u:t.url,d:t.domain,r:t.referrer,w:t.deviceWidth,h:t.hashMode?1:0,p:n&&n.props?JSON.stringify(n.props):void 0},a=new XMLHttpRequest;a.open("POST",`${t.apiHost}/api/event`,!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(o)),a.onreadystatechange=()=>{a.readyState===4&&n&&n.callback&&n.callback()}}function l2e(e){const t=()=>V({hashMode:!1,trackLocalhost:!1,url:location.href,domain:location.hostname,referrer:document.referrer||null,deviceWidth:window.innerWidth,apiHost:"https://plausible.io"},e),n=(s,l,c)=>{s2e(s,V(V({},t()),c),l)},r=(s,l)=>{n("pageview",l,s)};return{trackEvent:n,trackPageview:r,enableAutoPageviews:()=>{const s=()=>r(),l=history.pushState;return l&&(history.pushState=function(c,u,d){l.apply(this,[c,u,d]),s()},addEventListener("popstate",s)),e&&e.hashMode&&addEventListener("hashchange",s),r(),function(){l&&(history.pushState=l,removeEventListener("popstate",s)),e&&e.hashMode&&removeEventListener("hashchange",s)}},enableAutoOutboundTracking:(s=document,l={subtree:!0,childList:!0,attributes:!0,attributeFilter:["href"]})=>{function c(m){n("Outbound Link: Click",{props:{url:this.href}}),typeof process!="undefined"&&process,setTimeout(()=>{location.href=this.href},150),m.preventDefault()}const u=new Set;function d(m){m instanceof HTMLAnchorElement?m.host!==location.host&&(m.addEventListener("click",c),u.add(m)):"querySelectorAll"in m&&m.querySelectorAll("a").forEach(d)}function p(m){m instanceof HTMLAnchorElement?(m.removeEventListener("click",c),u.delete(m)):"querySelectorAll"in m&&m.querySelectorAll("a").forEach(p)}const h=new MutationObserver(m=>{m.forEach(b=>{b.type==="attributes"?(p(b.target),d(b.target)):b.type==="childList"&&(b.addedNodes.forEach(d),b.removedNodes.forEach(p))})});return s.querySelectorAll("a").forEach(d),h.observe(s,l),function(){u.forEach(b=>{b.removeEventListener("click",c)}),u.clear(),h.disconnect()}}}}const c2e="https://plausible.getunleash.io",u2e="app.unleash-hosted.com",d2e=()=>{const{uiConfig:e}=st(),t=f2e(e.flags);f.exports.useEffect(()=>{if(t)try{return p2e()}catch(n){console.warn(n)}},[t])},p2e=()=>l2e({domain:u2e,apiHost:c2e,trackLocalhost:!0}).enableAutoPageviews(),f2e=e=>Boolean(e.T),h2e=()=>{const{classes:e}=u$(),{authDetails:t}=ny(),{user:n}=yi(),{isOss:r}=st(),o=Boolean(n==null?void 0:n.id),a=Boolean(t||n);d2e();const s=r()?Kp.filter(l=>!l.enterprise):Kp;return i(JCe,{isUnauthorized:!o,children:i(f.exports.Suspense,{fallback:i(Bb,{}),children:i(F,{condition:!a,show:i(Bb,{}),elseShow:w("div",{className:e.container,children:[i(r2e,{}),w(WCe,{children:[w(of,{children:[s.map(l=>i(Er,{path:l.path,element:i(KCe,{route:l})},l.path)),i(Er,{path:"/",element:i(Yi,{to:"/features",replace:!0})}),i(Er,{path:"*",element:i(qCe,{})})]}),i(Kee,{openUrl:"http://feedback.unleash.run"}),i(o2e,{})]})]})})})})},m2e=()=>{const{pathname:e}=Gr();return f.exports.useEffect(()=>{g2e.some(t=>e.includes(t))||window.scrollTo(0,0)},[e]),null},g2e=["/admin/api","/admin/users","/admin/auth","/admin/roles"],v2e=({children:e})=>{const{permissions:t}=h2(),n=f.exports.useMemo(()=>({isAdmin:y2e(t),hasAccess:b2e.bind(null,t)}),[t]);return i(Jt.Provider,{value:n,children:e})},y2e=e=>e?e.some(t=>t.permission===sn):!1,b2e=(e,t,n,r)=>e?e.some(o=>x2e(o,t,n,r)):!1,x2e=(e,t,n,r)=>t?e.permission===sn||e.permission===t&&(e.project===n||e.project==="*")&&(e.environment===r||e.environment==="*")||e.permission===t&&(e.project===n||e.project==="*")&&e.environment===null?!0:e.permission===t&&e.project===void 0&&e.environment===null:(console.warn(`Missing permission for AccessProvider: ${t}`),!1),w2e=le()(e=>({container:{fontWeight:e.fontWeight.thin},form:{display:"grid",gap:"3rem",gridTemplateColumns:"minmax(auto, 40rem)",justifyContent:"center"},title:{all:"unset",display:"block",textAlign:"center",color:e.palette.text.secondary},subtitle:{all:"unset",display:"block",marginTop:"2.5rem",fontSize:"1.5rem",textAlign:"center"},textLabel:{display:"block",marginBottom:"0.5rem"},buttons:{textAlign:"center"},button:{minWidth:"15rem"}})),S2e=le()(e=>({scoreInput:{display:"flex",gap:"1rem",alignItems:"center",margin:"0 auto"},scoreHelp:{width:"6.25rem",whiteSpace:"nowrap",color:e.palette.text.secondary,"&:first-of-type":{textAlign:"right"},[e.breakpoints.down("sm")]:{display:"none"}},scoreValue:{"& input":{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:1,height:1},"& span":{display:"grid",justifyContent:"center",alignItems:"center",background:e.palette.grey[300],width:"3rem",height:"3rem",borderRadius:"10rem",fontSize:"1.25rem",paddingBottom:2,userSelect:"none",cursor:"pointer"},"& input:checked + span":{fontWeight:e.fontWeight.bold,background:e.palette.primary.main,color:"white"},"& input:focus-visible + span":{outline:"2px solid",outlineOffset:2,outlineColor:e.palette.primary.main}}})),C2e=({form:e,setForm:t})=>{const{classes:n}=S2e(),r=o=>{t(ia(a=>{a.score=Number(o.target.value)}))};return w("div",{className:n.scoreInput,children:[i("span",{className:n.scoreHelp,children:"Very difficult"}),[1,2,3,4,5,6,7].map(o=>w("label",{className:n.scoreValue,children:[i("input",{type:"radio",name:"score",value:o,checked:e.score===o,onChange:r}),i("span",{children:o})]},o)),i("span",{className:n.scoreHelp,children:"Very easy"})]})},E2e=async e=>{if(!e.score)return;const t={source:"app:segments",data:{score:e.score,comment:e.comment,currentPage:e.path,openedManually:!1,customerType:"paying"}};await fetch("https://europe-west3-metrics-304612.cloudfunctions.net/docs-app-feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},T2e=({state:e,onClose:t})=>{var d;const[n,r]=f.exports.useState(!1),{setToastData:o}=tt(),{classes:a}=w2e(),[s,l]=f.exports.useState({path:e.path}),c=p=>{l(ia(h=>{h.comment=p.target.value}))},u=async p=>{if(p.preventDefault(),!n)try{r(!0),await E2e(s),o({type:"success",title:"Feedback sent. Thank you!",confetti:!0}),t()}finally{r(!1)}};return w("div",{className:a.container,children:[i("h1",{className:a.title,children:"Please help us improve"}),w("form",{className:a.form,onSubmit:u,"aria-live":"polite",children:[i("p",{className:a.subtitle,children:e.title}),i(C2e,{form:s,setForm:l}),w("div",{hidden:!s.score,children:[i("label",{htmlFor:"comment",className:a.textLabel,children:e.text}),i(At,{value:(d=s.comment)!=null?d:"",onChange:c,multiline:!0,rows:3,variant:"outlined",fullWidth:!0})]}),i("div",{className:a.buttons,hidden:!s.score,children:i(nt,{type:"submit",color:"primary",variant:"contained",className:a.button,disabled:!s.score||n,children:"Send feedback"})})]})]})},R2e=le()(e=>({overlay:{pointerEvents:"none",display:"grid",padding:"1rem",overflowY:"auto",alignItems:"center",justifyContent:"center",height:"100vh",width:"100vw"},modal:{pointerEvents:"auto",position:"relative",padding:"4rem",background:e.palette.background.paper,boxShadow:"0 0 1rem rgba(0, 0, 0, 0.25)",borderRadius:"1rem",[e.breakpoints.down("md")]:{padding:"2rem"}},close:{all:"unset",position:"absolute",top:0,right:0},closeIcon:{fontSize:"1.5rem",color:e.palette.inactiveIcon}})),k2e=({state:e})=>{const{hideFeedbackCES:t}=f.exports.useContext(v2),{classes:n}=R2e(),r=e&&i(T2e,{state:e,onClose:t});return i(yf,{open:Boolean(e),onClose:t,"aria-label":e==null?void 0:e.title,children:i("div",{className:n.overlay,children:w("div",{className:n.modal,children:[i("div",{className:n.close,children:i(Ht,{onClick:t,size:"large",children:i(g$,{titleAccess:"Close",className:n.closeIcon})})}),r]})})})},_2e=()=>{const{createFeedback:e}=c$(),{feedback:t}=yS(),n=f.exports.useCallback(o=>!!t&&t.some(a=>a.feedbackId===z_(o)),[t]),r=f.exports.useCallback(o=>e({feedbackId:z_(o)}),[e]);return{isSeen:n,setSeen:r}},z_=e=>`ces${e.path}`,I2e=(e=window.location.hostname)=>e==="localhost",A2e=(e=window.location.hostname)=>e.endsWith(".getunleash.io")||e.endsWith(".unleash-hosted.com"),N2e=(e=window.location.hostname)=>e.endsWith(".vercel.app"),$2e=()=>A2e()||N2e()||I2e(),P2e=({children:e})=>{const[t,n]=f.exports.useState(),{isSeen:r,setSeen:o}=_2e(),a=$2e();f.exports.useEffect(()=>{t&&o(t)},[t,o]);const s=f.exports.useCallback(u=>{n(d=>{const p=u instanceof Function?u(d):u;return!a||!p||r(p)?void 0:p})},[a,r]),l=f.exports.useCallback(()=>{n(void 0)},[n]),c=f.exports.useMemo(()=>({showFeedbackCES:s,hideFeedbackCES:l}),[s,l]);return w(v2.Provider,{value:c,children:[e,i(k2e,{state:t})]})},O2e=le()({container:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",zIndex:-1,width:1,height:1,margin:-1,padding:0,overflow:"hidden"}}),D2e=({announcement:e})=>{const{classes:t}=O2e();return i("div",{role:"status","aria-live":"polite","aria-atomic":!0,className:t.container,"data-testid":rre,children:e})},L2e=({children:e})=>{const[t,n]=f.exports.useState(),r=f.exports.useMemo(()=>({setAnnouncement:n}),[n]);return w(HS.Provider,{value:r,children:[e,i(D2e,{announcement:t})]})},M2e=z("aside")(({theme:e})=>({position:"relative",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing(1),gap:e.spacing(1),borderBottom:"1px solid",borderColor:e.palette.warning.border,background:e.palette.warning.light,color:e.palette.warning.dark})),oD=z("aside")(({theme:e})=>({position:"relative",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing(1),gap:e.spacing(1),borderBottom:"1px solid",borderColor:e.palette.info.border,background:e.palette.info.light,color:e.palette.info.dark})),B2e=z(nt)(({theme:e})=>({whiteSpace:"nowrap",minWidth:"8rem",marginLeft:e.spacing(2)})),F2e=z(Wte)(({theme:e})=>({color:e.palette.warning.main})),aD=z(Rte)(({theme:e})=>({color:e.palette.info.main})),z2e=({instanceStatus:e})=>b2(e)?i(j2e,{instanceStatus:e}):kSe(e)?i(U2e,{instanceStatus:e}):eD(e)?i(W2e,{instanceStatus:e}):null,j2e=({instanceStatus:e})=>w(M2e,{"data-testid":PS,children:[i(F2e,{}),w(Te,{sx:t=>({fontSize:t.fontSizes.smallBody}),children:[i("strong",{children:"Warning!"})," Your free ",e.plan," trial has expired. ",i("strong",{children:"Upgrade trial"})," otherwise your"," ",i("strong",{children:"account will be deleted."})]}),i(w2,{})]}),U2e=({instanceStatus:e})=>{const t=Sie(Ql(e.trialExpiry),{roundingMethod:"floor"});return w(oD,{"data-testid":PS,children:[i(aD,{}),w(Te,{sx:n=>({fontSize:n.fontSizes.smallBody}),children:[i("strong",{children:"Heads up!"})," You have"," ",i("strong",{children:t})," left of your free"," ",e.plan," trial."]}),i(w2,{})]})},W2e=({instanceStatus:e})=>w(oD,{"data-testid":PS,children:[i(aD,{}),w(Te,{sx:t=>({fontSize:t.fontSizes.smallBody}),children:[i("strong",{children:"Heads up!"})," You're currently on a free"," ",e.plan," trial account."]}),i(w2,{})]}),w2=()=>{const{hasAccess:e}=f.exports.useContext(Jt),t=Ye();return e(sn)?i(B2e,{onClick:()=>t("/admin/billing"),variant:"outlined",children:"Upgrade trial"}):null},H2e=()=>{const{makeRequest:e,createRequest:t,errors:n,loading:r}=Cr({propagateErrors:!0});return{extendTrial:async()=>{const s=t("api/instance/extend",{method:"POST"},"extendTrial");await e(s.caller,s.id)},loading:r,errors:n}},V2e=({instanceStatus:e,onExtendTrial:t})=>{const{hasAccess:n}=f.exports.useContext(Jt),r=Ye(),o=b2(e),[a,s]=f.exports.useState(o),l=(c,u)=>{u||(s(!1),D_(e)&&t().catch(console.error))};return f.exports.useEffect(()=>{s(o);const c=setInterval(()=>{s(o)},6e4);return()=>clearInterval(c)},[o]),n(sn)?i(ln,{open:a,primaryButtonText:"Upgrade trial",secondaryButtonText:D_(e)?"Extend trial (5 days)":"Remind me later",onClick:()=>{r("/admin/billing"),s(!1)},onClose:l,title:`Your free ${e.plan} trial has expired!`,children:w(Te,{children:[i("strong",{children:"Upgrade trial"})," otherwise your"," ",i("strong",{children:"account will be deleted."})]})}):i(ln,{open:a,secondaryButtonText:"Remind me later",onClose:()=>{s(!1)},title:`Your free ${e.plan} trial has expired!`,children:w(Te,{children:["Please inform your admin to ",i("strong",{children:"Upgrade trial"})," or your ",i("strong",{children:"account will be deleted."})]})})},G2e=({children:e})=>{const{instanceStatus:t,refetchInstanceStatus:n,isBilling:r}=qv(),{extendTrial:o}=H2e(),{setToastApiError:a}=tt(),s=pn(),l=async()=>{try{await o(),await n()}catch(c){a(Ue(c))}};return w("div",{style:{height:"100%",backgroundColor:s.palette.background.paper},children:[i(F,{condition:r&&Boolean(t),show:()=>w(Ne,{children:[i(q2e,{instanceStatus:t}),i(V2e,{instanceStatus:t,onExtendTrial:l})]})}),e]})},q2e=hr.memo(z2e),Y2e=e=>{const t=Wm("unleash-theme");if(t)return t;let n;return e&&(n=window.matchMedia("(prefers-color-scheme: dark)").matches),n?"dark":"light"},K2e=({children:e,darkmode:t=!1})=>{const[n,r]=f.exports.useState(M4()),[o,a]=f.exports.useState(!1),[s,l]=f.exports.useState(Y2e(t)),c=hr.useMemo(()=>({setToast:r,toastData:n,showFeedback:o,setShowFeedback:a,themeMode:s,setThemeMode:l}),[n,o,s]);return i(Ws.Provider,{value:c,children:e})},X2e=({children:e})=>{const{uiConfig:t}=st();return t.flags?i(K2e,{darkmode:t.flags.ENABLE_DARK_MODE_SUPPORT||!1,children:e}):null};_d.render(i(X2e,{children:i(v2e,{children:i(sL,{basename:Xi,children:i(lZ,{children:i(L2e,{children:i(P2e,{children:w(G2e,{children:[i(m2e,{}),i(h2e,{})]})})})})})})}),document.getElementById("app"));export{Cr as $,yt as A,mt as B,jr as C,Cl as D,ip as E,Ne as F,cg as G,ec as H,rc as I,jl as J,st as K,Jle as L,j0e as M,Pu as N,Ls as O,Xl as P,Ji as Q,an as R,Mo as S,Te as T,bi as U,Ou as V,Wr as W,jn as X,Vt as Y,so as Z,Hs as _,ne as a,Ws as a0,Pv as a1,tt as a2,wi as a3,Ue as a4,qo as a5,Iu as a6,Nu as a7,_r as a8,nt as a9,Jm as aA,bae as aB,gae as aC,t3 as aD,Tae as aE,dae as aF,Op as aG,n3 as aH,Iae as aI,Uk as aJ,_ae as aK,Ql as aL,YS as aM,Wk as aN,gk as aO,oo as aP,Q2e as aQ,vi as aR,Mce as aa,Lce as ab,At as ac,Bl as ad,Zl as ae,Ur as af,sv as ag,yr as ah,ES as ai,sc as aj,Gt as ak,Dt as al,Bb as am,Kn as an,mr as ao,fi as ap,sae as aq,Rf as ar,iae as as,J$ as at,X$ as au,cae as av,fS as aw,Z2e as ax,Z$ as ay,Qm as az,F as b,et as c,Bce as d,ct as e,Ar as f,w as g,xa as h,bo as i,i as j,Vr as k,Zo as l,Bn as m,Ht as n,Rte as o,le as p,g$ as q,f as r,z as s,hy as t,pn as u,Ive as v,$ve as w,JP as x,it as y,Tr as z};