@ebay/muse-manager 1.3.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev/deps-manifest.json +4 -4
- package/build/dev/main.js +2 -2
- package/build/dev/main.js.map +1 -1
- package/build/dist/deps-manifest.json +4 -4
- package/build/dist/main.js +2 -2
- package/build/dist/main.js.map +1 -1
- package/build/test/deps-manifest.json +6 -6
- package/build/test/main.js +2 -2
- package/build/test/main.js.map +1 -1
- package/package.json +8 -8
package/build/test/main.js
CHANGED
|
@@ -4,12 +4,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d1(e,t){return m1(e)||h1(e,t)||hm(e,t)||p1()}function p1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hm(e,t){if(e){if(typeof e=="string")return uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uf(e,t):void 0}}function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h1(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,a=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function m1(e){if(Array.isArray(e))return e}function g1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b1(r.key),r)}}function y1(e,t,n){return t&&v1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b1(e){var t=x1(e,"string");return Kt(t)=="symbol"?t:t+""}function x1(e,t){if(Kt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ge=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;g1(this,e),typeof t=="string"&&(t=[t]),this.locale=d0(t.concat(e.getDefaultLocale()),Tn),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=xt,this.IntlPluralRules=xt.PluralRules),this.relativeTimeFormatCache=new Uc,this.pluralRulesCache=new Uc}return y1(e,[{key:"format",value:function(n,r,a){a||(r&&!O1(r)?(a=r,r=void 0):a={}),r||(r=_s),typeof r=="string"&&(r=c1(r));var i=w1(n),o=this.getLabels(r.flavour||r.labels),s=o.labels,l=o.labelsType,c;r.now!==void 0&&(c=r.now),c===void 0&&a.now!==void 0&&(c=a.now),c===void 0&&(c=Date.now());var u=(c-i)/1e3,f=a.future||u<0,p=E1(s,Tn(this.locale).now,Tn(this.locale).long,f);if(r.custom){var g=r.custom({now:c,date:new Date(i),time:i,elapsed:u,locale:this.locale});if(g!==void 0)return g}var h=S1(r.units,s,p),v=a.round||r.round,y=w0(r.gradation||r.steps||_s.steps,u,{now:c,units:h,round:v,future:f}),b=d1(y,3),w=b[0],$=b[1],A=b[2],M=this.formatDateForStep(i,$,u,{labels:s,labelsType:l,nowLabel:p,now:c,future:f,round:v})||"";if(a.getTimeToNextUpdate){var T=k0(i,$,{nextStep:A,prevStep:w,now:c,future:f,round:v});return[M,T]}return M}},{key:"formatDateForStep",value:function(n,r,a,i){var o=this,s=i.labels,l=i.labelsType,c=i.nowLabel,u=i.now,f=i.future,p=i.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(b,w){return o.formatValue(w,b,{labels:s,future:f})},now:u,future:f});var g=r.unit||r.formatAs;if(!g)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(g==="now")return c;var h=Math.abs(a)/om(r);r.granularity&&(h=Or(p)(h/r.granularity)*r.granularity);var v=-1*Math.sign(a)*Or(p)(h);switch(v===0&&(f?v=0:v=-0),l){case"long":case"short":case"narrow":return this.getFormatter(l).format(v,g);default:return this.formatValue(v,g,{labels:s,future:f})}}}},{key:"formatValue",value:function(n,r,a){var i=a.labels,o=a.future;return this.getFormattingRule(i,r,n,{future:o}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,a,i){var o=i.future;if(this.locale,n=n[r],typeof n=="string")return n;var s=a===0?o?"future":"past":a<0?"past":"future",l=n[s]||n;if(typeof l=="string")return l;var c=this.getPluralRules().select(Math.abs(a));return l[c]||l.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(s){switch(s){case"tiny":case"mini-time":return"mini";default:return s}}),n=n.concat("long");for(var r=Tn(this.locale),a=f1(n),i;!(i=a()).done;){var o=i.value;if(r[o])return{labelsType:o,labels:r[o]}}}}]),e}(),mm="en";Ge.getDefaultLocale=function(){return mm};Ge.setDefaultLocale=function(e){return mm=e};Ge.addDefaultLocale=function(e){if(cf)return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");cf=!0,Ge.setDefaultLocale(e.locale),Ge.addLocale(e)};var cf;Ge.addLocale=function(e){fm(e),xt.addLocale(e)};Ge.locale=Ge.addLocale;Ge.addLabels=function(e,t,n){var r=Tn(e);r||(fm({locale:e}),r=Tn(e)),r[t]=n};function w1(e){if(e.constructor===Date||$1(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(Kt(e),", ").concat(e))}function $1(e){return Kt(e)==="object"&&typeof e.getTime=="function"}function S1(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(a){return a==="now"||r.indexOf(a)>=0})),r}function E1(e,t,n,r){var a=e.now||t&&t.now;if(a)return typeof a=="string"?a:r?a.future:a.past;if(n&&n.second&&n.second.current)return n.second.current}function O1(e){return typeof e=="string"||h0(e)}var ff=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function A1(e,t){return!!(e===t||ff(e)&&ff(t))}function C1(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!A1(e[n],t[n]))return!1;return!0}function k1(e,t){t===void 0&&(t=C1);var n=null;function r(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];if(n&&n.lastThis===this&&t(a,n.lastArgs))return n.lastResult;var o=e.apply(this,a);return n={lastResult:o,lastArgs:a,lastThis:this},o}return r.clear=function(){n=null},r}function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function _1(e){if(gm())return Intl.DateTimeFormat.supportedLocalesOf(e)[0]}function gm(){var e=(typeof Intl>"u"?"undefined":Rs(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}function T1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j1(e,t,n){return t&&P1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var vm=function(){function e(){T1(this,e),this.cache={}}return j1(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];for(var o=0,s=a;o<s.length;o++){var l=s[o];if(ai(n)!=="object")return;n=n[l]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];for(var i=r.pop(),o=r.pop(),s=this.cache,l=0,c=r;l<c.length;l++){var u=c[l];ai(s[u])!=="object"&&(s[u]={}),s=s[u]}return s[o]=i}}]),e}(),df=new vm,R1=gm(),F1=function(t){return t.toString()};function M1(e,t){if(!R1)return F1;var n=I1(e),r=JSON.stringify(t),a=df.get(String(n),r)||df.put(String(n),r,new Intl.DateTimeFormat(n,t));return function(i){return a.format(i)}}const L1=k1(M1);var wo={};function I1(e){var t=e.toString();return wo[t]?wo[t]:wo[t]=_1(e)}function Fs(e){"@babel/helpers - typeof";return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function N1(e){return D1(e)?e:new Date(e)}function D1(e){return e instanceof Date||B1(e)}function B1(e){return Fs(e)==="object"&&typeof e.getTime=="function"}var pf=new vm;function z1(e,t){var n=t.polyfill,r=String(e)+":"+String(n);return pf.get(r)||pf.put(r,new Ge(e,{polyfill:n}))}var $i={exports:{}},yr={exports:{}};(function(){var e,t,n,r,a,i;typeof performance<"u"&&performance!==null&&performance.now?yr.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(yr.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},r=e(),i=process.uptime()*1e9,a=r-i):Date.now?(yr.exports=function(){return Date.now()-n},n=Date.now()):(yr.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(qt);var U1=yr.exports,q1=U1,bt=typeof window>"u"?qt:window,Ea=["moz","webkit"],Fn="AnimationFrame",In=bt["request"+Fn],Lr=bt["cancel"+Fn]||bt["cancelRequest"+Fn];for(var or=0;!In&&or<Ea.length;or++)In=bt[Ea[or]+"Request"+Fn],Lr=bt[Ea[or]+"Cancel"+Fn]||bt[Ea[or]+"CancelRequest"+Fn];if(!In||!Lr){var $o=0,hf=0,Dt=[],H1=1e3/60;In=function(e){if(Dt.length===0){var t=q1(),n=Math.max(0,H1-(t-$o));$o=n+t,setTimeout(function(){var r=Dt.slice(0);Dt.length=0;for(var a=0;a<r.length;a++)if(!r[a].cancelled)try{r[a].callback($o)}catch(i){setTimeout(function(){throw i},0)}},Math.round(n))}return Dt.push({handle:++hf,callback:e,cancelled:!1}),hf},Lr=function(e){for(var t=0;t<Dt.length;t++)Dt[t].handle===e&&(Dt[t].cancelled=!0)}}$i.exports=function(e){return In.call(bt,e)};$i.exports.cancel=function(){Lr.apply(bt,arguments)};$i.exports.polyfill=function(e){e||(e=bt),e.requestAnimationFrame=In,e.cancelAnimationFrame=Lr};var V1=$i.exports;const mf=ke(V1);function G1(e,t){if(e.length===0)return 0;for(var n=0,r=e.length-1,a;n<=r;){a=Math.floor((r+n)/2);var i=t(e[a]);if(i===0)return a;if(i<0){if(n=a+1,n>r)return n}else if(r=a-1,r<n)return n}}function W1(e,t){return Q1(e)||Y1(e,t)||X1(e,t)||K1()}function K1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X1(e,t){if(e){if(typeof e=="string")return gf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gf(e,t)}}function gf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y1(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,o,s;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));a=!0);}catch(l){i=!0,s=l}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Q1(e){if(Array.isArray(e))return e}const J1={instances:[],add:function(t){var n=this,r=this.instances.length===0;return ym(this.instances,t),r&&this.start(),{stop:function(){bm(n.instances,t),n.instances.length===0&&n.stop()},forceUpdate:function(){vf(t,n.instances)}}},tick:function(){for(var t=Date.now();;){var n=this.instances[0];if(t>=n.nextUpdateTime)vf(n,this.instances);else break}},scheduleNextTick:function(){var t=this;this.scheduledTick=mf(function(){t.tick(),t.scheduleNextTick()})},start:function(){this.scheduleNextTick()},stop:function(){mf.cancel(this.scheduledTick)}};function Z1(e){var t=e.getNextValue(),n=W1(t,2),r=n[0],a=n[1];e.setValue(r),e.nextUpdateTime=a}function vf(e,t){Z1(e),bm(t,e),ym(t,e)}function ym(e,t){var n=ex(e,t);e.splice(n,0,t)}function bm(e,t){var n=e.indexOf(t);e.splice(n,1)}function ex(e,t){var n=t.nextUpdateTime;return G1(e,function(r){return r.nextUpdateTime===n?0:r.nextUpdateTime>n?1:-1})}function Oa(e,t){return ax(e)||rx(e,t)||nx(e,t)||tx()}function tx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nx(e,t){if(e){if(typeof e=="string")return yf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yf(e,t)}}function yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,o,s;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));a=!0);}catch(l){i=!0,s=l}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function ax(e){if(Array.isArray(e))return e}function ix(e){var t=e.date,n=e.future,r=e.locale,a=e.locales,i=e.timeStyle,o=e.round,s=e.minTimeLeft,l=e.formatVerboseDate,c=e.verboseDateFormat,u=c===void 0?lx:c,f=e.updateInterval,p=e.tick,g=p===void 0?!0:p,h=e.now,v=e.timeOffset,y=v===void 0?0:v,b=e.polyfill,w=le.useMemo(function(){return r&&(a=[r]),a.concat(Ge.getDefaultLocale())},[r,a]),$=le.useMemo(function(){return z1(w,{polyfill:b})},[w,b]);t=le.useMemo(function(){return N1(t)},[t]);var A=le.useCallback(function(){var N=(h||Date.now())-y,B;if(n&&N>=t.getTime()&&(N=t.getTime(),B=!0),s!==void 0){var q=t.getTime()-s*1e3;N>q&&(N=q,B=!0)}var V=$.format(t,i,{getTimeToNextUpdate:!0,now:N,future:n,round:o}),m=Oa(V,2),X=m[0],ne=m[1];return B?ne=sx:ne=f||ne||60*1e3,[X,N+ne]},[t,n,i,f,o,s,$,h]),M=le.useRef();M.current=A;var T=le.useMemo(A,[]),P=Oa(T,2),O=P[0],j=P[1],z=le.useState(O),R=Oa(z,2),D=R[0],U=R[1],k=le.useRef();le.useEffect(function(){if(g)return k.current=J1.add({getNextValue:function(){return M.current()},setValue:U,nextUpdateTime:j}),function(){return k.current.stop()}},[g]),le.useEffect(function(){if(k.current)k.current.forceUpdate();else{var N=A(),B=Oa(N,1),q=B[0];U(q)}},[A]);var F=le.useMemo(function(){return L1(w,u)},[w,u]),I=le.useMemo(function(){return l?l(t):F(t)},[t,l,F]);return{date:t,formattedDate:D,verboseDate:I}}var ox=365*24*60*60*1e3,sx=1e3*ox,lx={weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},Ms=L.oneOfType,bf=L.arrayOf,Pn=L.string,xf=L.number,br=L.shape,Aa=L.func,ux=Ms([br({minTime:xf,formatAs:Pn.isRequired}),br({test:Aa,formatAs:Pn.isRequired}),br({minTime:xf,format:Aa.isRequired}),br({test:Aa,format:Aa.isRequired})]),cx=Ms([Pn,br({steps:bf(ux).isRequired,labels:Ms([Pn,bf(Pn)]).isRequired,round:Pn})]),fx=["date","future","timeStyle","round","minTimeLeft","locale","locales","formatVerboseDate","verboseDateFormat","updateInterval","tick","now","timeOffset","polyfill","tooltip","component","container","wrapperComponent","wrapperProps"];function ii(){return ii=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},ii.apply(this,arguments)}function dx(e,t){if(e==null)return{};var n=px(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function px(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function wt(e){var t=e.date,n=e.future,r=e.timeStyle,a=e.round,i=e.minTimeLeft,o=e.locale,s=e.locales,l=s===void 0?[]:s,c=e.formatVerboseDate,u=e.verboseDateFormat,f=e.updateInterval,p=e.tick,g=e.now,h=e.timeOffset,v=e.polyfill,y=e.tooltip,b=y===void 0?!0:y,w=e.component,$=w===void 0?ni:w,A=e.container,M=e.wrapperComponent,T=e.wrapperProps,P=dx(e,fx),O=ix({date:t,future:n,timeStyle:r,round:a,minTimeLeft:i,locale:o,locales:l,formatVerboseDate:c,verboseDateFormat:u,updateInterval:f,tick:p,now:g,timeOffset:h,polyfill:v}),j=O.date,z=O.verboseDate,R=O.formattedDate,D=x.createElement($,ii({date:j,verboseDate:z,tooltip:b},P),R),U=M||A;return U?x.createElement(U,ii({},T,{verboseDate:z}),D):D}wt.propTypes={date:L.oneOfType([L.instanceOf(Date),L.number]).isRequired,locale:L.string,locales:L.arrayOf(L.string),future:L.bool,timeStyle:cx,round:L.string,minTimeLeft:L.number,component:L.elementType,tooltip:L.bool,formatVerboseDate:L.func,verboseDateFormat:L.object,updateInterval:L.oneOfType([L.number,L.arrayOf(L.shape({threshold:L.number,interval:L.number.isRequired}))]),tick:L.bool,now:L.number,timeOffset:L.number,polyfill:L.bool,wrapperComponent:L.elementType,wrapperProps:L.object};wt=x.memo(wt);const hx=MUSE_GLOBAL.__shared__.require("@ebay/muse-lib-antd@1.3.0/src/features/common/index.js");var ie=hx;const mx=MUSE_GLOBAL.__shared__.require("lodash@4.17.21/lodash.js");var et=mx;const Y=ke(et),Ls={defaultProps:{size:"middle",pagination:{hideOnSinglePage:!0,size:"small",showTotal:e=>`Total ${e} items`,showQuickJumper:!0}},defaultSorter(e){return(t,n)=>{if(!t)return 1;if(!n)return-1;const r=Y.get(t,e),a=Y.get(n,e);return typeof r=="number"&&typeof a=="number"?r-a:String(r).localeCompare(String(a))}},defaultFilter:(e,t)=>{if(!e||!e.length)return{};const n=Object.keys(e.reduce((r,a)=>(r[Y.get(a,t)]=!0,r),{}));return n.sort((r,a)=>String(r).localeCompare(String(a))),n.length>10&&(n.length=10),{filters:n.map(r=>({text:r,value:r})),onFilter:(r,a)=>Y.get(a,t)===r}}},gx=MUSE_GLOBAL.__shared__.require("react-use@17.4.0/esm/index.js");var Mn=gx;let cl=class{constructor(t,n){this.operator=t,this.value=n,Object.defineProperty(this,"t",{writable:!0})}get notes(){return this.t}addNote(t){this.t=this.t||[],this.t.push(t)}},Si=class extends cl{},Hr=class extends Si{constructor(t,n){if(!Array.isArray(n))throw new Error(`"${t}" operator expects to receive an array of conditions`);super(t,n)}};const Bn="__itself__";let Vr=class extends cl{constructor(t,n,r){super(t,r),this.field=n}};const fl=new Si("__null__",null),Is=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);function xm(e,t){return t instanceof Hr&&t.operator===e}function Ei(e,t){return t.length===1?t[0]:new Hr(e,function n(r,a,i){const o=i||[];for(let s=0,l=a.length;s<l;s++){const c=a[s];xm(r,c)?n(r,c.value,o):o.push(c)}return o}(e,t))}const wm=e=>e,dl=()=>Object.create(null),pl=Object.defineProperty(dl(),"__@type@__",{value:"ignore value"});function $m(e,t,n=!1){if(!e||e&&e.constructor!==Object)return!1;for(const r in e)if(Is(e,r)&&Is(t,r)&&(!n||e[r]!==pl))return!0;return!1}function vx(e){const t=[];for(const n in e)Is(e,n)&&e[n]!==pl&&t.push(n);return t}function So(e,t){t!==fl&&e.push(t)}const hl=e=>Ei("and",e),yx=e=>Ei("or",e),oi={compound(e,t,n){const r=(Array.isArray(t)?t:[t]).map(a=>n.parse(a));return new Hr(e.name,r)},field:(e,t,n)=>new Vr(e.name,n.field,t),document:(e,t)=>new Si(e.name,t)};let ml=class{constructor(t,n=dl()){this.o=void 0,this.s=void 0,this.i=void 0,this.u=void 0,this.h=void 0,this.parse=this.parse.bind(this),this.u={operatorToConditionName:n.operatorToConditionName||wm,defaultOperatorName:n.defaultOperatorName||"eq",mergeFinalConditions:n.mergeFinalConditions||hl},this.o=Object.keys(t).reduce((r,a)=>(r[a]=Object.assign({name:this.u.operatorToConditionName(a)},t[a]),r),{}),this.s=Object.assign({},n.fieldContext,{field:"",query:{},parse:this.parse,hasOperators:r=>$m(r,this.o,n.useIgnoreValue)}),this.i=Object.assign({},n.documentContext,{parse:this.parse,query:{}}),this.h=n.useIgnoreValue?vx:Object.keys}setParse(t){this.parse=t,this.s.parse=t,this.i.parse=t}parseField(t,n,r,a){const i=this.o[n];if(!i)throw new Error(`Unsupported operator "${n}"`);if(i.type!=="field")throw new Error(`Unexpected ${i.type} operator "${n}" at field level`);return this.s.field=t,this.s.query=a,this.parseInstruction(i,r,this.s)}parseInstruction(t,n,r){return typeof t.validate=="function"&&t.validate(t,n),(t.parse||oi[t.type])(t,n,r)}parseFieldOperators(t,n){const r=[],a=this.h(n);for(let i=0,o=a.length;i<o;i++){const s=a[i];if(!this.o[s])throw new Error(`Field query for "${t}" may contain only operators or a plain object as a value`);So(r,this.parseField(t,s,n[s],n))}return r}parse(t){const n=[],r=this.h(t);this.i.query=t;for(let a=0,i=r.length;a<i;a++){const o=r[a],s=t[o],l=this.o[o];if(l){if(l.type!=="document"&&l.type!=="compound")throw new Error(`Cannot use parsing instruction for operator "${o}" in "document" context as it is supposed to be used in "${l.type}" context`);So(n,this.parseInstruction(l,s,this.i))}else this.s.hasOperators(s)?n.push(...this.parseFieldOperators(o,s)):So(n,this.parseField(o,this.u.defaultOperatorName,s,t))}return this.u.mergeFinalConditions(n)}};function Eo(e,t){const n=e[t];if(typeof n!="function")throw new Error(`Unable to interpret "${t}" condition. Did you forget to register interpreter for it?`);return n}function bx(e){return e.operator}function Sm(e,t){const n=t,r=n&&n.getInterpreterName||bx;let a;switch(n?n.numberOfArguments:0){case 1:a=o=>{const s=r(o,n);return Eo(e,s)(o,i)};break;case 3:a=(o,s,l)=>{const c=r(o,n);return Eo(e,c)(o,s,l,i)};break;default:a=(o,s)=>{const l=r(o,n);return Eo(e,l)(o,s,i)}}const i=Object.assign({},n,{interpret:a});return i.interpret}function Em(e,t){return(n,...r)=>{const a=e(n,...r),i=t.bind(null,a);return i.ast=a,i}}const xx=ml.prototype.parseInstruction;function Om(e,t){if(!Array.isArray(t))throw new Error(`"${e.name}" expects value to be an array`)}function Am(e,t){if(Om(e,t),!t.length)throw new Error(`"${e.name}" expects to have at least one element in array`)}const gl=e=>(t,n)=>{if(typeof n!==e)throw new Error(`"${t.name}" expects value to be a "${e}"`)},vl={type:"compound",validate:Am,parse(e,t,{parse:n}){const r=t.map(a=>n(a));return Ei(e.name,r)}},Cm=vl,km={type:"compound",validate:Am},_m={type:"field",validate(e,t){if(!(t&&(t instanceof RegExp||t.constructor===Object)))throw new Error(`"${e.name}" expects to receive either regular expression or object of field operators`)},parse(e,t,n){const r=t instanceof RegExp?new Vr("regex",n.field,t):n.parse(t,n);return new Hr(e.name,[r])}},yl={type:"field",validate(e,t){if(!t||t.constructor!==Object)throw new Error(`"${e.name}" expects to receive an object with nested query or field level operators`)},parse(e,t,{parse:n,field:r,hasOperators:a}){const i=a(t)?n(t,{field:Bn}):n(t);return new Vr(e.name,r,i)}},bl={type:"field",validate:gl("number")},Gr={type:"field",validate:Om},xl=Gr,wl=Gr,Tm={type:"field",validate(e,t){if(!Array.isArray(t)||t.length!==2)throw new Error(`"${e.name}" expects an array with 2 numeric elements`)}},$l={type:"field",validate:gl("boolean")},Oi={type:"field",validate:function(e,t){if(!(typeof t=="string"||typeof t=="number"||t instanceof Date))throw new Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`)}},Wr=Oi,Sl=Wr,El=Wr,Ai={type:"field"},Ol=Ai,Al={type:"field",validate(e,t){if(!(t instanceof RegExp)&&typeof t!="string")throw new Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`)},parse(e,t,n){const r=typeof t=="string"?new RegExp(t,n.query.$options||""):t;return new Vr(e.name,n.field,r)}},Cl={type:"field",parse:()=>fl},Pm={type:"document",validate:gl("function")};var wx=Object.freeze({__proto__:null,$and:vl,$or:Cm,$nor:km,$not:_m,$elemMatch:yl,$size:bl,$in:Gr,$nin:xl,$all:wl,$mod:Tm,$exists:$l,$gte:Oi,$gt:Wr,$lt:Sl,$lte:El,$eq:Ai,$ne:Ol,$regex:Al,$options:Cl,$where:Pm});let jm=class extends ml{constructor(t){super(t,{defaultOperatorName:"$eq",operatorToConditionName:n=>n.slice(1)})}parse(t,n){return n&&n.field?hl(this.parseFieldOperators(n.field,t)):super.parse(t)}};const si=wx;function kl(e,t,n){for(let r=0,a=e.length;r<a;r++)if(n(e[r],t)===0)return!0;return!1}function _l(e,t){return Array.isArray(e)&&Number.isNaN(Number(t))}function wf(e,t,n){if(!_l(e,t))return n(e,t);let r=[];for(let a=0;a<e.length;a++){const i=n(e[a],t);i!==void 0&&(r=r.concat(i))}return r}function Jt(e){return(t,n,r)=>{const a=r.get(n,t.field);return Array.isArray(a)?a.some(i=>e(t,i,r)):e(t,a,r)}}const $x=(e,t)=>e[t];function Tl(e,t,n){const r=t.lastIndexOf(".");return r===-1?[e,t]:[n(e,t.slice(0,r)),t.slice(r+1)]}function Pl(e,t,n=$x){if(t===Bn)return e;if(!e)throw new Error(`Unable to get field "${t}" out of ${String(e)}.`);return function(r,a,i){if(a.indexOf(".")===-1)return wf(r,a,i);const o=a.split(".");let s=r;for(let l=0,c=o.length;l<c;l++)if(s=wf(s,o[l],i),!s||typeof s!="object")return s;return s}(e,t,n)}function Sx(e){return(t,n)=>Pl(t,n,e)}function jl(e,t){return e===t?0:e>t?1:-1}function Rl(e,t={}){return Sm(e,Object.assign({get:Pl,compare:jl},t))}const Fl=(e,t,{interpret:n})=>e.value.some(r=>n(r,t)),Rm=(e,t,n)=>!Fl(e,t,n),Ml=(e,t,{interpret:n})=>e.value.every(r=>n(r,t)),Fm=(e,t,{interpret:n})=>!n(e.value[0],t),Ci=(e,t,{compare:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&!Array.isArray(e.value)?kl(a,e.value,n):n(a,e.value)===0},Ll=(e,t,n)=>!Ci(e,t,n),Il=Jt((e,t,n)=>{const r=n.compare(t,e.value);return r===0||r===-1}),Nl=Jt((e,t,n)=>n.compare(t,e.value)===-1),Dl=Jt((e,t,n)=>n.compare(t,e.value)===1),Bl=Jt((e,t,n)=>{const r=n.compare(t,e.value);return r===0||r===1}),zl=(e,t,{get:n})=>{if(e.field===Bn)return t!==void 0;const[r,a]=Tl(t,e.field,n),i=o=>o==null?!!o===e.value:o.hasOwnProperty(a)===e.value;return _l(r,a)?r.some(i):i(r)},Mm=Jt((e,t)=>typeof t=="number"&&t%e.value[0]===e.value[1]),Ul=(e,t,{get:n})=>{const[r,a]=Tl(t,e.field,n),i=o=>{const s=n(o,a);return Array.isArray(s)&&s.length===e.value};return e.field!==Bn&&_l(r,a)?r.some(i):i(r)},ql=Jt((e,t)=>typeof t=="string"&&e.value.test(t)),Kr=Jt((e,t,{compare:n})=>kl(e.value,t,n)),Hl=(e,t,n)=>!Kr(e,t,n),Vl=(e,t,{compare:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&e.value.every(i=>kl(a,i,n))},Gl=(e,t,{interpret:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&a.some(i=>n(e.value,i))},Lm=(e,t)=>e.value.call(t);var Ex=Object.freeze({__proto__:null,or:Fl,nor:Rm,and:Ml,not:Fm,eq:Ci,ne:Ll,lte:Il,lt:Nl,gt:Dl,gte:Bl,exists:zl,mod:Mm,size:Ul,regex:ql,within:Kr,nin:Hl,all:Vl,elemMatch:Gl,where:Lm});const ki=Object.assign({},Ex,{in:Kr}),Ox=Rl(ki);function $f(e){return e===null||typeof e!="object"?e:e instanceof Date?e.getTime():e&&typeof e.toJSON=="function"?e.toJSON():e}const Ax=(e,t)=>jl($f(e),$f(t));function _i(e,t,n){const r=new jm(e),a=Rl(t,Object.assign({compare:Ax},n));if(n&&n.forPrimitives){const i={field:Bn},o=r.parse;r.setParse(s=>o(s,i))}return Em(r.parse,a)}const Im=_i(si,ki),Cx=_i(["$and","$or"].reduce((e,t)=>(e[t]=Object.assign({},e[t],{type:"field"}),e),Object.assign({},si,{$nor:Object.assign({},si.$nor,{type:"field",parse:oi.compound})})),ki,{forPrimitives:!0}),kx=Im,_x=Object.freeze(Object.defineProperty({__proto__:null,$all:wl,$and:vl,$elemMatch:yl,$eq:Ai,$exists:$l,$gt:Wr,$gte:Oi,$in:Gr,$lt:Sl,$lte:El,$mod:Tm,$ne:Ol,$nin:xl,$nor:km,$not:_m,$options:Cl,$or:Cm,$regex:Al,$size:bl,$where:Pm,CompoundCondition:Hr,Condition:cl,DocumentCondition:Si,FieldCondition:Vr,ITSELF:Bn,MongoQueryParser:jm,NULL_CONDITION:fl,ObjectQueryParser:ml,all:Vl,allInterpreters:ki,allParsingInstructions:si,and:Ml,buildAnd:hl,buildOr:yx,compare:jl,createFactory:_i,createGetter:Sx,createInterpreter:Sm,createJsInterpreter:Rl,createTranslatorFactory:Em,defaultInstructionParsers:oi,defaultParsers:oi,elemMatch:Gl,eq:Ci,exists:zl,filter:kx,getObjectField:Pl,getObjectFieldCursor:Tl,gt:Dl,gte:Bl,guard:Im,hasOperators:$m,identity:wm,ignoreValue:pl,interpret:Ox,isCompound:xm,lt:Nl,lte:Il,mod:Mm,ne:Ll,nin:Hl,nor:Rm,not:Fm,object:dl,optimizedCompoundCondition:Ei,or:Fl,parseInstruction:xx,regex:ql,size:Ul,squire:Cx,where:Lm,within:Kr},Symbol.toStringTag,{value:"Module"})),Ca="__caslSubjectType__";function Oo(e,t){if(t){if(!Object.hasOwn(t,Ca))Object.defineProperty(t,Ca,{value:e});else if(e!==t[Ca])throw new Error(`Trying to cast object to subject type ${e} but previously it was casted to ${t[Ca]}`)}return t}const Tx={$eq:Ai,$ne:Ol,$lt:Sl,$lte:El,$gt:Wr,$gte:Oi,$in:Gr,$nin:xl,$all:wl,$size:bl,$regex:Al,$options:Cl,$elemMatch:yl,$exists:$l},Px={eq:Ci,ne:Ll,lt:Nl,lte:Il,gt:Dl,gte:Bl,in:Kr,nin:Hl,all:Vl,size:Ul,regex:ql,elemMatch:Gl,exists:zl,and:Ml};_i(Tx,Px);var Fe={};const jx=xb(_x);var ue=jx;function Ir(e){return Array.isArray(e)?e:[e]}const jn="__caslSubjectType__";function Rx(e,t){if(t){if(!Object.hasOwn(t,jn))Object.defineProperty(t,jn,{value:e});else if(e!==t[jn])throw new Error(`Trying to cast object to subject type ${e} but previously it was casted to ${t[jn]}`)}return t}const Xa=e=>{const t=typeof e;return t==="string"||t==="function"},Nm=e=>e.modelName||e.name;function Fx(e){return typeof e=="string"?e:Nm(e)}function Wl(e){return Object.hasOwn(e,jn)?e[jn]:Nm(e.constructor)}const Sf={function:e=>e.constructor,string:Wl};function Dm(e,t,n){let r=Ir(t),a=0;for(;a<r.length;){const i=r[a++];Object.hasOwn(e,i)&&(r=n(r,e[i]))}return r}function Mx(e,t){if(typeof t=="string"&&e.indexOf(t)!==-1)return t;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])!==-1)return t[n];return null}const Lx=(e,t)=>e.concat(t);function Ix(e,t){if(t in e)throw new Error(`Cannot use "${t}" as an alias because it's reserved action.`);const n=Object.keys(e),r=(a,i)=>{const o=Mx(a,i);if(o)throw new Error(`Detected cycle ${o} -> ${a.join(", ")}`);if(typeof i=="string"&&i===t||a.indexOf(t)!==-1||Array.isArray(i)&&i.indexOf(t)!==-1)throw new Error(`Cannot make an alias to "${t}" because this is reserved action`);return a.concat(i)};for(let a=0;a<n.length;a++)Dm(e,n[a],r)}function Nx(e,t){return(!t||t.skipValidate!==!1)&&Ix(e,t&&t.anyAction||"manage"),n=>Dm(e,n,Lx)}function Ef(e,t,n){for(let r=n;r<t.length;r++)e.push(t[r])}function Of(e,t){if(!e||!e.length)return t||[];if(!t||!t.length)return e||[];let n=0,r=0;const a=[];for(;n<e.length&&r<t.length;)e[n].priority<t[r].priority?(a.push(e[n]),n++):(a.push(t[r]),r++);return Ef(a,e,n),Ef(a,t,r),a}function ka(e,t,n){let r=e.get(t);return r||(r=n(),e.set(t,r)),r}const Dx=e=>e;function Bx(e,t){if(Array.isArray(e.fields)&&!e.fields.length)throw new Error("`rawRule.fields` cannot be an empty array. https://bit.ly/390miLa");if(e.fields&&!t.fieldMatcher)throw new Error('You need to pass "fieldMatcher" option in order to restrict access by fields');if(e.conditions&&!t.conditionsMatcher)throw new Error('You need to pass "conditionsMatcher" option in order to restrict access by conditions')}let zx=class{constructor(t,n,r=0){Bx(t,n),this.action=n.resolveAction(t.action),this.subject=t.subject,this.inverted=!!t.inverted,this.conditions=t.conditions,this.reason=t.reason,this.origin=t,this.fields=t.fields?Ir(t.fields):void 0,this.priority=r,this.t=n}i(){return this.conditions&&!this.o&&(this.o=this.t.conditionsMatcher(this.conditions)),this.o}get ast(){const t=this.i();return t?t.ast:void 0}matchesConditions(t){return this.conditions?!t||Xa(t)?!this.inverted:this.i()(t):!0}matchesField(t){return this.fields?t?(this.u||(this.u=this.t.fieldMatcher(this.fields)),this.u(t)):!this.inverted:!0}};function Ux(e,t){const n={value:e,prev:t,next:null};return t&&(t.next=n),n}function qx(e){e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next),e.next=e.prev=null}const Hx=e=>({value:e.value,prev:e.prev,next:e.next}),Af=()=>({rules:[],merged:!1}),Cf=()=>new Map;let Vx=class{constructor(t=[],n={}){this.h=!1,this.l=new Map,this.p={conditionsMatcher:n.conditionsMatcher,fieldMatcher:n.fieldMatcher,resolveAction:n.resolveAction||Dx},this.$=n.anyAction||"manage",this.A=n.anySubjectType||"all",this.M=t,this.m=!!n.detectSubjectType,this.j=n.detectSubjectType||Wl,this.v(t)}get rules(){return this.M}detectSubjectType(t){return Xa(t)?t:t?this.j(t):this.A}update(t){const n={rules:t,ability:this,target:this};return this._("update",n),this.M=t,this.v(t),this._("updated",n),this}v(t){const n=new Map;let r;for(let a=t.length-1;a>=0;a--){const i=t.length-a-1,o=new zx(t[a],this.p,i),s=Ir(o.action),l=Ir(o.subject||this.A);!this.h&&o.fields&&(this.h=!0);for(let c=0;c<l.length;c++){const u=ka(n,l[c],Cf);r===void 0&&(r=typeof l[c]),typeof l[c]!==r&&r!=="mixed"&&(r="mixed");for(let f=0;f<s.length;f++)ka(u,s[f],Af).rules.push(o)}}if(this.l=n,r!=="mixed"&&!this.m){const a=Sf[r]||Sf.string;this.j=a}}possibleRulesFor(t,n=this.A){if(!Xa(n))throw new Error('"possibleRulesFor" accepts only subject types (i.e., string or class) as the 2nd parameter');const r=ka(this.l,n,Cf),a=ka(r,t,Af);if(a.merged)return a.rules;const i=t!==this.$&&r.has(this.$)?r.get(this.$).rules:void 0;let o=Of(a.rules,i);return n!==this.A&&(o=Of(o,this.possibleRulesFor(t,this.A))),a.rules=o,a.merged=!0,o}rulesFor(t,n,r){const a=this.possibleRulesFor(t,n);if(r&&typeof r!="string")throw new Error("The 3rd, `field` parameter is expected to be a string. See https://stalniy.github.io/casl/en/api/casl-ability#can-of-pure-ability for details");return this.h?a.filter(i=>i.matchesField(r)):a}actionsFor(t){if(!Xa(t))throw new Error('"actionsFor" accepts only subject types (i.e., string or class) as a parameter');const n=new Set,r=this.l.get(t);r&&Array.from(r.keys()).forEach(i=>n.add(i));const a=t!==this.A?this.l.get(this.A):void 0;return a&&Array.from(a.keys()).forEach(i=>n.add(i)),Array.from(n)}on(t,n){this.F=this.F||new Map;const r=this.F,a=r.get(t)||null,i=Ux(n,a);return r.set(t,i),()=>{const o=r.get(t);!i.next&&!i.prev&&o===i?r.delete(t):i===o&&r.set(t,i.prev),qx(i)}}_(t,n){if(!this.F)return;let r=this.F.get(t)||null;for(;r!==null;){const a=r.prev?Hx(r.prev):null;r.value(n),r=a}}},Kl=class extends Vx{can(t,n,r){const a=this.relevantRuleFor(t,n,r);return!!a&&!a.inverted}relevantRuleFor(t,n,r){const a=this.detectSubjectType(n),i=this.rulesFor(t,a,r);for(let o=0,s=i.length;o<s;o++)if(i[o].matchesConditions(n))return i[o];return null}cannot(t,n,r){return!this.can(t,n,r)}};const Bm={$eq:ue.$eq,$ne:ue.$ne,$lt:ue.$lt,$lte:ue.$lte,$gt:ue.$gt,$gte:ue.$gte,$in:ue.$in,$nin:ue.$nin,$all:ue.$all,$size:ue.$size,$regex:ue.$regex,$options:ue.$options,$elemMatch:ue.$elemMatch,$exists:ue.$exists},zm={eq:ue.eq,ne:ue.ne,lt:ue.lt,lte:ue.lte,gt:ue.gt,gte:ue.gte,in:ue.within,nin:ue.nin,all:ue.all,size:ue.size,regex:ue.regex,elemMatch:ue.elemMatch,exists:ue.exists,and:ue.and},Gx=(e,t,n)=>ue.createFactory(Object.assign({},Bm,e),Object.assign({},zm,t),n),Xl=ue.createFactory(Bm,zm),Wx=/[-/\\^$+?.()|[\]{}]/g,Kx=/\.?\*+\.?/g,Xx=/\*+/,Yx=/\./g;function Qx(e,t,n){const r=n[0]==="*"||e[0]==="."&&e[e.length-1]==="."?"+":"*",a=e.indexOf("**")===-1?"[^.]":".",i=e.replace(Yx,"\\$&").replace(Xx,a+r);return t+e.length===n.length?`(?:${i})?`:i}function Jx(e,t,n){return e==="."&&(n[t-1]==="*"||n[t+1]==="*")?e:`\\${e}`}function Zx(e){const t=e.map(r=>r.replace(Wx,Jx).replace(Kx,Qx)),n=t.length>1?`(?:${t.join("|")})`:t[0];return new RegExp(`^${n}$`)}const Yl=e=>{let t;return n=>(typeof t>"u"&&(t=e.every(r=>r.indexOf("*")===-1)?null:Zx(e)),t===null?e.indexOf(n)!==-1:t.test(n))};class ew extends Kl{constructor(t=[],n={}){super(t,Object.assign({conditionsMatcher:Xl,fieldMatcher:Yl},n))}}function Um(e=[],t={}){return new Kl(e,Object.assign({conditionsMatcher:Xl,fieldMatcher:Yl},t))}function tw(e){return e.prototype!==void 0&&typeof e.prototype.possibleRulesFor=="function"}let nw=class{constructor(t){this.O=t}because(t){return this.O.reason=t,this}},qm=class{constructor(t){this.rules=[],this.C=t,this.can=(n,r,a,i)=>this.R(n,r,a,i,!1),this.cannot=(n,r,a,i)=>this.R(n,r,a,i,!0),this.build=n=>tw(this.C)?new this.C(this.rules,n):this.C(this.rules,n)}R(t,n,r,a,i){const o={action:t};return i&&(o.inverted=i),n&&(o.subject=n,Array.isArray(r)||typeof r=="string"?o.fields=r:typeof r<"u"&&(o.conditions=r),typeof a<"u"&&(o.conditions=a)),this.rules.push(o),new nw(o)}};function rw(e,t){const n=new qm(Um),r=e(n.can,n.cannot);return r&&typeof r.then=="function"?r.then(()=>n.build(t)):n.build(t)}const Hm=e=>`Cannot execute "${e.action}" on "${e.subjectType}"`,Vm=function(t){this.message=t};Vm.prototype=Object.create(Error.prototype);class Gm extends Vm{static setDefaultMessage(t){this.P=typeof t=="string"?()=>t:t}static from(t){return new this(t)}constructor(t){super(""),this.ability=t,typeof Error.captureStackTrace=="function"&&(this.name="ForbiddenError",Error.captureStackTrace(this,this.constructor))}setMessage(t){return this.message=t,this}throwUnlessCan(t,n,r){const a=this.unlessCan(t,n,r);if(a)throw a}unlessCan(t,n,r){const a=this.ability.relevantRuleFor(t,n,r);if(a&&!a.inverted)return;this.action=t,this.subject=n,this.subjectType=Fx(this.ability.detectSubjectType(n)),this.field=r;const i=a?a.reason:"";return this.message=this.message||i||this.constructor.P(this),this}}Gm.P=Hm;var aw=Object.freeze({__proto__:null});Fe.Ability=ew;Fe.AbilityBuilder=qm;Fe.ForbiddenError=Gm;Fe.PureAbility=Kl;Fe.buildMongoQueryMatcher=Gx;Fe.createAliasResolver=Nx;Fe.createMongoAbility=Um;Fe.defineAbility=rw;Fe.detectSubjectType=Wl;Fe.fieldPatternMatcher=Yl;Fe.getDefaultErrorMessage=Hm;Fe.hkt=aw;Fe.mongoQueryMatcher=Xl;Fe.subject=Rx;Fe.wrapArray=Ir;const{AbilityBuilder:iw,PureAbility:ow}=Fe,Ao=Qh,sw=e=>e,lw=e=>t=>e.includes(t);var uw=function(t){const{can:n,cannot:r,build:a}=new iw(ow);t=t||{};const i=o=>{var s;return(s=o==null?void 0:o.owners)==null?void 0:s.includes(t.username)};return Ao.invoke("museAcl.beforeDefineAbility",{user:t,allow:n,forbid:r}),t.isMuseAdmin&&n("manage","all"),n("create","Plugin"),n("create","App"),n("manage","Plugin",i),n("manage","App",i),n("manage","Plugin",({app:o,plugin:s})=>i(s)||(s==null?void 0:s.app)===(o==null?void 0:o.name)&&i(o)),n("config","Plugin",({app:o,plugin:s})=>i(s)||i(o)),n("update","App",({app:o,plugin:s,changes:l})=>i(o)?!0:i(s)?[...(l==null?void 0:l.set)||[],...(l==null?void 0:l.remove)||[],...(l==null?void 0:l.push)||[]].map(u=>u.path).concat((l==null?void 0:l.unset)||[]).every(u=>{const f=u.split(".");return!!(f[0]==="envs"&&["pluginConfig","pluginVariables"].includes(f[2])&&f[3]===s.name||["pluginConfig","pluginVariables"].includes(f[0])&&f[1]===s.name)}):!1),n("update","Release",["description"],i),Ao.invoke("museAcl.defineAbility",{user:t,allow:n,forbid:r}),Ao.invoke("museAcl.afterDefineAbility",{user:t,allow:n,forbid:r}),a({conditionsMatcher:sw,fieldMatcher:lw})};const cw=ke(uw);var Gh;const Bt=(Gh=window.MUSE_GLOBAL)==null?void 0:Gh.getUser();function _e(){const{data:e,error:t}=$t("muse.admins"),n={username:(Bt==null?void 0:Bt.username)||"anonymous",isMuseAdmin:!(Bt!=null&&Bt.username)||(e==null?void 0:e.includes(Bt.username))},r=cw(n);return{can:(a,i,o)=>r.can(a,Oo(i,o)),cannot:(a,i,o)=>r.cannot(a,Oo(i,o)),rawAbility:r,caslSubject:Oo,error:t}}const Z=MUSE_GLOBAL.__shared__.require("@tanstack/react-query@4.33.0/build/lib/index.mjs");Z.CancelledError;Z.Hydrate;Z.InfiniteQueryObserver;Z.IsRestoringProvider;Z.MutationCache;Z.MutationObserver;Z.QueriesObserver;Z.Query;Z.QueryCache;Z.QueryClient;Z.QueryClientProvider;Z.QueryErrorResetBoundary;Z.QueryObserver;Z.defaultContext;Z.defaultShouldDehydrateMutation;Z.defaultShouldDehydrateQuery;Z.dehydrate;Z.focusManager;Z.hashQueryKey;Z.hydrate;Z.isCancelledError;Z.isError;Z.isServer;Z.matchQuery;Z.notifyManager;Z.onlineManager;Z.parseFilterArgs;Z.parseMutationArgs;Z.parseMutationFilterArgs;Z.parseQueryArgs;Z.replaceEqualDeep;Z.useHydrate;Z.useInfiniteQuery;Z.useIsFetching;Z.useIsMutating;Z.useIsRestoring;const fw=Z.useMutation;Z.useQueries;const dw=Z.useQuery,pw=Z.useQueryClient;Z.useQueryErrorResetBoundary;Z.default;/*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors */function Wm(e,t){return function(){return e.apply(t,arguments)}}const{toString:hw}=Object.prototype,{getPrototypeOf:Ql}=Object,{iterator:Ti,toStringTag:Km}=Symbol,Pi=(e=>t=>{const n=hw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),t=>Pi(t)===e),ji=e=>t=>typeof t===e,{isArray:zn}=Array,Nn=ji("undefined");function Xr(e){return e!==null&&!Nn(e)&&e.constructor!==null&&!Nn(e.constructor)&&Le(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xm=tt("ArrayBuffer");function mw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xm(e.buffer),t}const gw=ji("string"),Le=ji("function"),Ym=ji("number"),Yr=e=>e!==null&&typeof e=="object",vw=e=>e===!0||e===!1,Ya=e=>{if(Pi(e)!=="object")return!1;const t=Ql(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Km in e)&&!(Ti in e)},yw=e=>{if(!Yr(e)||Xr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},bw=tt("Date"),xw=tt("File"),ww=tt("Blob"),$w=tt("FileList"),Sw=e=>Yr(e)&&Le(e.pipe),Ew=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Le(e.append)&&((t=Pi(e))==="formdata"||t==="object"&&Le(e.toString)&&e.toString()==="[object FormData]"))},Ow=tt("URLSearchParams"),[Aw,Cw,kw,_w]=["ReadableStream","Request","Response","Headers"].map(tt),Tw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),zn(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Xr(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(r=0;r<o;r++)s=i[r],t.call(null,e[s],s,e)}}function Qm(e,t){if(Xr(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ht=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:qt,Jm=e=>!Nn(e)&&e!==Ht;function Ns(){const{caseless:e,skipUndefined:t}=Jm(this)&&this||{},n={},r=(a,i)=>{const o=e&&Qm(n,i)||i;Ya(n[o])&&Ya(a)?n[o]=Ns(n[o],a):Ya(a)?n[o]=Ns({},a):zn(a)?n[o]=a.slice():(!t||!Nn(a))&&(n[o]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Qr(arguments[a],r);return n}const Pw=(e,t,n,{allOwnKeys:r}={})=>(Qr(t,(a,i)=>{n&&Le(a)?e[i]=Wm(a,n):e[i]=a},{allOwnKeys:r}),e),jw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fw=(e,t,n,r)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Ql(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Lw=e=>{if(!e)return null;if(zn(e))return e;let t=e.length;if(!Ym(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Iw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ql(Uint8Array)),Nw=(e,t)=>{const r=(e&&e[Ti]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},Dw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Bw=tt("HTMLFormElement"),zw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),kf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uw=tt("RegExp"),Zm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qr(n,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(r[i]=o||a)}),Object.defineProperties(e,r)},qw=e=>{Zm(e,(t,n)=>{if(Le(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Le(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Hw=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return zn(e)?r(e):r(String(e).split(t)),n},Vw=()=>{},Gw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ww(e){return!!(e&&Le(e.append)&&e[Km]==="FormData"&&e[Ti])}const Kw=e=>{const t=new Array(10),n=(r,a)=>{if(Yr(r)){if(t.indexOf(r)>=0)return;if(Xr(r))return r;if(!("toJSON"in r)){t[a]=r;const i=zn(r)?[]:{};return Qr(r,(o,s)=>{const l=n(o,a+1);!Nn(l)&&(i[s]=l)}),t[a]=void 0,i}}return r};return n(e,0)},Xw=tt("AsyncFunction"),Yw=e=>e&&(Yr(e)||Le(e))&&Le(e.then)&&Le(e.catch),eg=((e,t)=>e?setImmediate:t?((n,r)=>(Ht.addEventListener("message",({source:a,data:i})=>{a===Ht&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ht.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Le(Ht.postMessage)),Qw=typeof queueMicrotask<"u"?queueMicrotask.bind(Ht):typeof process<"u"&&process.nextTick||eg,Jw=e=>e!=null&&Le(e[Ti]);var C={isArray:zn,isArrayBuffer:Xm,isBuffer:Xr,isFormData:Ew,isArrayBufferView:mw,isString:gw,isNumber:Ym,isBoolean:vw,isObject:Yr,isPlainObject:Ya,isEmptyObject:yw,isReadableStream:Aw,isRequest:Cw,isResponse:kw,isHeaders:_w,isUndefined:Nn,isDate:bw,isFile:xw,isBlob:ww,isRegExp:Uw,isFunction:Le,isStream:Sw,isURLSearchParams:Ow,isTypedArray:Iw,isFileList:$w,forEach:Qr,merge:Ns,extend:Pw,trim:Tw,stripBOM:jw,inherits:Rw,toFlatObject:Fw,kindOf:Pi,kindOfTest:tt,endsWith:Mw,toArray:Lw,forEachEntry:Nw,matchAll:Dw,isHTMLForm:Bw,hasOwnProperty:kf,hasOwnProp:kf,reduceDescriptors:Zm,freezeMethods:qw,toObjectSet:Hw,toCamelCase:zw,noop:Vw,toFiniteNumber:Gw,findKey:Qm,global:Ht,isContextDefined:Jm,isSpecCompliantForm:Ww,toJSONObject:Kw,isAsyncFn:Xw,isThenable:Yw,setImmediate:eg,asap:Qw,isIterable:Jw};function te(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}C.inherits(te,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const tg=te.prototype,ng={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ng[e]={value:e}});Object.defineProperties(te,ng);Object.defineProperty(tg,"isAxiosError",{value:!0});te.from=(e,t,n,r,a,i)=>{const o=Object.create(tg);C.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return te.call(o,s,l,n,r,a),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};var Zw=null;function Ds(e){return C.isPlainObject(e)||C.isArray(e)}function rg(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function _f(e,t,n){return e?e.concat(t).map(function(a,i){return a=rg(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function e$(e){return C.isArray(e)&&!e.some(Ds)}const t$=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function Ri(e,t,n){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!C.isUndefined(y[v])});const r=n.metaTokens,a=n.visitor||u,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(a))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(C.isDate(h))return h.toISOString();if(C.isBoolean(h))return h.toString();if(!l&&C.isBlob(h))throw new te("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(h)||C.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,v,y){let b=h;if(h&&!y&&typeof h=="object"){if(C.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(C.isArray(h)&&e$(h)||(C.isFileList(h)||C.endsWith(v,"[]"))&&(b=C.toArray(h)))return v=rg(v),b.forEach(function($,A){!(C.isUndefined($)||$===null)&&t.append(o===!0?_f([v],A,i):o===null?v:v+"[]",c($))}),!1}return Ds(h)?!0:(t.append(_f(y,v,i),c(h)),!1)}const f=[],p=Object.assign(t$,{defaultVisitor:u,convertValue:c,isVisitable:Ds});function g(h,v){if(!C.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),C.forEach(h,function(b,w){(!(C.isUndefined(b)||b===null)&&a.call(t,b,C.isString(w)?w.trim():w,v,p))===!0&&g(b,v?v.concat(w):[w])}),f.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Tf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Jl(e,t){this._pairs=[],e&&Ri(e,this,t)}const ag=Jl.prototype;ag.append=function(t,n){this._pairs.push([t,n])};ag.toString=function(t){const n=t?function(r){return t.call(this,r,Tf)}:Tf;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function n$(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ig(e,t,n){if(!t)return e;const r=n&&n.encode||n$;C.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let i;if(a?i=a(t,n):i=C.isURLSearchParams(t)?t.toString():new Jl(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class r${constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Pf=r$,og={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},a$=typeof URLSearchParams<"u"?URLSearchParams:Jl,i$=typeof FormData<"u"?FormData:null,o$=typeof Blob<"u"?Blob:null,s$={isBrowser:!0,classes:{URLSearchParams:a$,FormData:i$,Blob:o$},protocols:["http","https","file","blob","url","data"]};const Zl=typeof window<"u"&&typeof document<"u",Bs=typeof navigator=="object"&&navigator||void 0,l$=Zl&&(!Bs||["ReactNative","NativeScript","NS"].indexOf(Bs.product)<0),u$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",c$=Zl&&window.location.href||"http://localhost";var f$=Object.freeze({__proto__:null,hasBrowserEnv:Zl,hasStandardBrowserWebWorkerEnv:u$,hasStandardBrowserEnv:l$,navigator:Bs,origin:c$}),je={...f$,...s$};function d$(e,t){return Ri(e,new je.classes.URLSearchParams,{visitor:function(n,r,a,i){return je.isNode&&C.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function p$(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function h$(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function sg(e){function t(n,r,a,i){let o=n[i++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=i>=n.length;return o=!o&&C.isArray(a)?a.length:o,l?(C.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!s):((!a[o]||!C.isObject(a[o]))&&(a[o]=[]),t(n,r,a[o],i)&&C.isArray(a[o])&&(a[o]=h$(a[o])),!s)}if(C.isFormData(e)&&C.isFunction(e.entries)){const n={};return C.forEachEntry(e,(r,a)=>{t(p$(r),a,n,0)}),n}return null}function m$(e,t,n){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const eu={transitional:og,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=C.isObject(t);if(i&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return a?JSON.stringify(sg(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return d$(t,this.formSerializer).toString();if((s=C.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ri(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),m$(t)):t}],transformResponse:[function(t){const n=this.transitional||eu.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(r&&!this.responseType||a)){const o=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?te.from(s,te.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],e=>{eu.headers[e]={}});var tu=eu;const g$=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var v$=e=>{const t={};let n,r,a;return e&&e.split(`
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nx(e,t){if(e){if(typeof e=="string")return yf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yf(e,t)}}function yf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rx(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,o,s;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));a=!0);}catch(l){i=!0,s=l}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function ax(e){if(Array.isArray(e))return e}function ix(e){var t=e.date,n=e.future,r=e.locale,a=e.locales,i=e.timeStyle,o=e.round,s=e.minTimeLeft,l=e.formatVerboseDate,c=e.verboseDateFormat,u=c===void 0?lx:c,f=e.updateInterval,p=e.tick,g=p===void 0?!0:p,h=e.now,v=e.timeOffset,y=v===void 0?0:v,b=e.polyfill,w=le.useMemo(function(){return r&&(a=[r]),a.concat(Ge.getDefaultLocale())},[r,a]),$=le.useMemo(function(){return z1(w,{polyfill:b})},[w,b]);t=le.useMemo(function(){return N1(t)},[t]);var A=le.useCallback(function(){var N=(h||Date.now())-y,B;if(n&&N>=t.getTime()&&(N=t.getTime(),B=!0),s!==void 0){var q=t.getTime()-s*1e3;N>q&&(N=q,B=!0)}var V=$.format(t,i,{getTimeToNextUpdate:!0,now:N,future:n,round:o}),m=Oa(V,2),X=m[0],ne=m[1];return B?ne=sx:ne=f||ne||60*1e3,[X,N+ne]},[t,n,i,f,o,s,$,h]),M=le.useRef();M.current=A;var T=le.useMemo(A,[]),P=Oa(T,2),O=P[0],j=P[1],z=le.useState(O),R=Oa(z,2),D=R[0],U=R[1],k=le.useRef();le.useEffect(function(){if(g)return k.current=J1.add({getNextValue:function(){return M.current()},setValue:U,nextUpdateTime:j}),function(){return k.current.stop()}},[g]),le.useEffect(function(){if(k.current)k.current.forceUpdate();else{var N=A(),B=Oa(N,1),q=B[0];U(q)}},[A]);var F=le.useMemo(function(){return L1(w,u)},[w,u]),I=le.useMemo(function(){return l?l(t):F(t)},[t,l,F]);return{date:t,formattedDate:D,verboseDate:I}}var ox=365*24*60*60*1e3,sx=1e3*ox,lx={weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},Ms=L.oneOfType,bf=L.arrayOf,Pn=L.string,xf=L.number,br=L.shape,Aa=L.func,ux=Ms([br({minTime:xf,formatAs:Pn.isRequired}),br({test:Aa,formatAs:Pn.isRequired}),br({minTime:xf,format:Aa.isRequired}),br({test:Aa,format:Aa.isRequired})]),cx=Ms([Pn,br({steps:bf(ux).isRequired,labels:Ms([Pn,bf(Pn)]).isRequired,round:Pn})]),fx=["date","future","timeStyle","round","minTimeLeft","locale","locales","formatVerboseDate","verboseDateFormat","updateInterval","tick","now","timeOffset","polyfill","tooltip","component","container","wrapperComponent","wrapperProps"];function ii(){return ii=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},ii.apply(this,arguments)}function dx(e,t){if(e==null)return{};var n=px(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function px(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function wt(e){var t=e.date,n=e.future,r=e.timeStyle,a=e.round,i=e.minTimeLeft,o=e.locale,s=e.locales,l=s===void 0?[]:s,c=e.formatVerboseDate,u=e.verboseDateFormat,f=e.updateInterval,p=e.tick,g=e.now,h=e.timeOffset,v=e.polyfill,y=e.tooltip,b=y===void 0?!0:y,w=e.component,$=w===void 0?ni:w,A=e.container,M=e.wrapperComponent,T=e.wrapperProps,P=dx(e,fx),O=ix({date:t,future:n,timeStyle:r,round:a,minTimeLeft:i,locale:o,locales:l,formatVerboseDate:c,verboseDateFormat:u,updateInterval:f,tick:p,now:g,timeOffset:h,polyfill:v}),j=O.date,z=O.verboseDate,R=O.formattedDate,D=x.createElement($,ii({date:j,verboseDate:z,tooltip:b},P),R),U=M||A;return U?x.createElement(U,ii({},T,{verboseDate:z}),D):D}wt.propTypes={date:L.oneOfType([L.instanceOf(Date),L.number]).isRequired,locale:L.string,locales:L.arrayOf(L.string),future:L.bool,timeStyle:cx,round:L.string,minTimeLeft:L.number,component:L.elementType,tooltip:L.bool,formatVerboseDate:L.func,verboseDateFormat:L.object,updateInterval:L.oneOfType([L.number,L.arrayOf(L.shape({threshold:L.number,interval:L.number.isRequired}))]),tick:L.bool,now:L.number,timeOffset:L.number,polyfill:L.bool,wrapperComponent:L.elementType,wrapperProps:L.object};wt=x.memo(wt);const hx=MUSE_GLOBAL.__shared__.require("@ebay/muse-lib-antd@1.3.2/src/features/common/index.js");var ie=hx;const mx=MUSE_GLOBAL.__shared__.require("lodash@4.17.21/lodash.js");var et=mx;const Y=ke(et),Ls={defaultProps:{size:"middle",pagination:{hideOnSinglePage:!0,size:"small",showTotal:e=>`Total ${e} items`,showQuickJumper:!0}},defaultSorter(e){return(t,n)=>{if(!t)return 1;if(!n)return-1;const r=Y.get(t,e),a=Y.get(n,e);return typeof r=="number"&&typeof a=="number"?r-a:String(r).localeCompare(String(a))}},defaultFilter:(e,t)=>{if(!e||!e.length)return{};const n=Object.keys(e.reduce((r,a)=>(r[Y.get(a,t)]=!0,r),{}));return n.sort((r,a)=>String(r).localeCompare(String(a))),n.length>10&&(n.length=10),{filters:n.map(r=>({text:r,value:r})),onFilter:(r,a)=>Y.get(a,t)===r}}},gx=MUSE_GLOBAL.__shared__.require("react-use@17.4.0/esm/index.js");var Mn=gx;let cl=class{constructor(t,n){this.operator=t,this.value=n,Object.defineProperty(this,"t",{writable:!0})}get notes(){return this.t}addNote(t){this.t=this.t||[],this.t.push(t)}},Si=class extends cl{},Hr=class extends Si{constructor(t,n){if(!Array.isArray(n))throw new Error(`"${t}" operator expects to receive an array of conditions`);super(t,n)}};const Bn="__itself__";let Vr=class extends cl{constructor(t,n,r){super(t,r),this.field=n}};const fl=new Si("__null__",null),Is=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);function xm(e,t){return t instanceof Hr&&t.operator===e}function Ei(e,t){return t.length===1?t[0]:new Hr(e,function n(r,a,i){const o=i||[];for(let s=0,l=a.length;s<l;s++){const c=a[s];xm(r,c)?n(r,c.value,o):o.push(c)}return o}(e,t))}const wm=e=>e,dl=()=>Object.create(null),pl=Object.defineProperty(dl(),"__@type@__",{value:"ignore value"});function $m(e,t,n=!1){if(!e||e&&e.constructor!==Object)return!1;for(const r in e)if(Is(e,r)&&Is(t,r)&&(!n||e[r]!==pl))return!0;return!1}function vx(e){const t=[];for(const n in e)Is(e,n)&&e[n]!==pl&&t.push(n);return t}function So(e,t){t!==fl&&e.push(t)}const hl=e=>Ei("and",e),yx=e=>Ei("or",e),oi={compound(e,t,n){const r=(Array.isArray(t)?t:[t]).map(a=>n.parse(a));return new Hr(e.name,r)},field:(e,t,n)=>new Vr(e.name,n.field,t),document:(e,t)=>new Si(e.name,t)};let ml=class{constructor(t,n=dl()){this.o=void 0,this.s=void 0,this.i=void 0,this.u=void 0,this.h=void 0,this.parse=this.parse.bind(this),this.u={operatorToConditionName:n.operatorToConditionName||wm,defaultOperatorName:n.defaultOperatorName||"eq",mergeFinalConditions:n.mergeFinalConditions||hl},this.o=Object.keys(t).reduce((r,a)=>(r[a]=Object.assign({name:this.u.operatorToConditionName(a)},t[a]),r),{}),this.s=Object.assign({},n.fieldContext,{field:"",query:{},parse:this.parse,hasOperators:r=>$m(r,this.o,n.useIgnoreValue)}),this.i=Object.assign({},n.documentContext,{parse:this.parse,query:{}}),this.h=n.useIgnoreValue?vx:Object.keys}setParse(t){this.parse=t,this.s.parse=t,this.i.parse=t}parseField(t,n,r,a){const i=this.o[n];if(!i)throw new Error(`Unsupported operator "${n}"`);if(i.type!=="field")throw new Error(`Unexpected ${i.type} operator "${n}" at field level`);return this.s.field=t,this.s.query=a,this.parseInstruction(i,r,this.s)}parseInstruction(t,n,r){return typeof t.validate=="function"&&t.validate(t,n),(t.parse||oi[t.type])(t,n,r)}parseFieldOperators(t,n){const r=[],a=this.h(n);for(let i=0,o=a.length;i<o;i++){const s=a[i];if(!this.o[s])throw new Error(`Field query for "${t}" may contain only operators or a plain object as a value`);So(r,this.parseField(t,s,n[s],n))}return r}parse(t){const n=[],r=this.h(t);this.i.query=t;for(let a=0,i=r.length;a<i;a++){const o=r[a],s=t[o],l=this.o[o];if(l){if(l.type!=="document"&&l.type!=="compound")throw new Error(`Cannot use parsing instruction for operator "${o}" in "document" context as it is supposed to be used in "${l.type}" context`);So(n,this.parseInstruction(l,s,this.i))}else this.s.hasOperators(s)?n.push(...this.parseFieldOperators(o,s)):So(n,this.parseField(o,this.u.defaultOperatorName,s,t))}return this.u.mergeFinalConditions(n)}};function Eo(e,t){const n=e[t];if(typeof n!="function")throw new Error(`Unable to interpret "${t}" condition. Did you forget to register interpreter for it?`);return n}function bx(e){return e.operator}function Sm(e,t){const n=t,r=n&&n.getInterpreterName||bx;let a;switch(n?n.numberOfArguments:0){case 1:a=o=>{const s=r(o,n);return Eo(e,s)(o,i)};break;case 3:a=(o,s,l)=>{const c=r(o,n);return Eo(e,c)(o,s,l,i)};break;default:a=(o,s)=>{const l=r(o,n);return Eo(e,l)(o,s,i)}}const i=Object.assign({},n,{interpret:a});return i.interpret}function Em(e,t){return(n,...r)=>{const a=e(n,...r),i=t.bind(null,a);return i.ast=a,i}}const xx=ml.prototype.parseInstruction;function Om(e,t){if(!Array.isArray(t))throw new Error(`"${e.name}" expects value to be an array`)}function Am(e,t){if(Om(e,t),!t.length)throw new Error(`"${e.name}" expects to have at least one element in array`)}const gl=e=>(t,n)=>{if(typeof n!==e)throw new Error(`"${t.name}" expects value to be a "${e}"`)},vl={type:"compound",validate:Am,parse(e,t,{parse:n}){const r=t.map(a=>n(a));return Ei(e.name,r)}},Cm=vl,km={type:"compound",validate:Am},_m={type:"field",validate(e,t){if(!(t&&(t instanceof RegExp||t.constructor===Object)))throw new Error(`"${e.name}" expects to receive either regular expression or object of field operators`)},parse(e,t,n){const r=t instanceof RegExp?new Vr("regex",n.field,t):n.parse(t,n);return new Hr(e.name,[r])}},yl={type:"field",validate(e,t){if(!t||t.constructor!==Object)throw new Error(`"${e.name}" expects to receive an object with nested query or field level operators`)},parse(e,t,{parse:n,field:r,hasOperators:a}){const i=a(t)?n(t,{field:Bn}):n(t);return new Vr(e.name,r,i)}},bl={type:"field",validate:gl("number")},Gr={type:"field",validate:Om},xl=Gr,wl=Gr,Tm={type:"field",validate(e,t){if(!Array.isArray(t)||t.length!==2)throw new Error(`"${e.name}" expects an array with 2 numeric elements`)}},$l={type:"field",validate:gl("boolean")},Oi={type:"field",validate:function(e,t){if(!(typeof t=="string"||typeof t=="number"||t instanceof Date))throw new Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`)}},Wr=Oi,Sl=Wr,El=Wr,Ai={type:"field"},Ol=Ai,Al={type:"field",validate(e,t){if(!(t instanceof RegExp)&&typeof t!="string")throw new Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`)},parse(e,t,n){const r=typeof t=="string"?new RegExp(t,n.query.$options||""):t;return new Vr(e.name,n.field,r)}},Cl={type:"field",parse:()=>fl},Pm={type:"document",validate:gl("function")};var wx=Object.freeze({__proto__:null,$and:vl,$or:Cm,$nor:km,$not:_m,$elemMatch:yl,$size:bl,$in:Gr,$nin:xl,$all:wl,$mod:Tm,$exists:$l,$gte:Oi,$gt:Wr,$lt:Sl,$lte:El,$eq:Ai,$ne:Ol,$regex:Al,$options:Cl,$where:Pm});let jm=class extends ml{constructor(t){super(t,{defaultOperatorName:"$eq",operatorToConditionName:n=>n.slice(1)})}parse(t,n){return n&&n.field?hl(this.parseFieldOperators(n.field,t)):super.parse(t)}};const si=wx;function kl(e,t,n){for(let r=0,a=e.length;r<a;r++)if(n(e[r],t)===0)return!0;return!1}function _l(e,t){return Array.isArray(e)&&Number.isNaN(Number(t))}function wf(e,t,n){if(!_l(e,t))return n(e,t);let r=[];for(let a=0;a<e.length;a++){const i=n(e[a],t);i!==void 0&&(r=r.concat(i))}return r}function Jt(e){return(t,n,r)=>{const a=r.get(n,t.field);return Array.isArray(a)?a.some(i=>e(t,i,r)):e(t,a,r)}}const $x=(e,t)=>e[t];function Tl(e,t,n){const r=t.lastIndexOf(".");return r===-1?[e,t]:[n(e,t.slice(0,r)),t.slice(r+1)]}function Pl(e,t,n=$x){if(t===Bn)return e;if(!e)throw new Error(`Unable to get field "${t}" out of ${String(e)}.`);return function(r,a,i){if(a.indexOf(".")===-1)return wf(r,a,i);const o=a.split(".");let s=r;for(let l=0,c=o.length;l<c;l++)if(s=wf(s,o[l],i),!s||typeof s!="object")return s;return s}(e,t,n)}function Sx(e){return(t,n)=>Pl(t,n,e)}function jl(e,t){return e===t?0:e>t?1:-1}function Rl(e,t={}){return Sm(e,Object.assign({get:Pl,compare:jl},t))}const Fl=(e,t,{interpret:n})=>e.value.some(r=>n(r,t)),Rm=(e,t,n)=>!Fl(e,t,n),Ml=(e,t,{interpret:n})=>e.value.every(r=>n(r,t)),Fm=(e,t,{interpret:n})=>!n(e.value[0],t),Ci=(e,t,{compare:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&!Array.isArray(e.value)?kl(a,e.value,n):n(a,e.value)===0},Ll=(e,t,n)=>!Ci(e,t,n),Il=Jt((e,t,n)=>{const r=n.compare(t,e.value);return r===0||r===-1}),Nl=Jt((e,t,n)=>n.compare(t,e.value)===-1),Dl=Jt((e,t,n)=>n.compare(t,e.value)===1),Bl=Jt((e,t,n)=>{const r=n.compare(t,e.value);return r===0||r===1}),zl=(e,t,{get:n})=>{if(e.field===Bn)return t!==void 0;const[r,a]=Tl(t,e.field,n),i=o=>o==null?!!o===e.value:o.hasOwnProperty(a)===e.value;return _l(r,a)?r.some(i):i(r)},Mm=Jt((e,t)=>typeof t=="number"&&t%e.value[0]===e.value[1]),Ul=(e,t,{get:n})=>{const[r,a]=Tl(t,e.field,n),i=o=>{const s=n(o,a);return Array.isArray(s)&&s.length===e.value};return e.field!==Bn&&_l(r,a)?r.some(i):i(r)},ql=Jt((e,t)=>typeof t=="string"&&e.value.test(t)),Kr=Jt((e,t,{compare:n})=>kl(e.value,t,n)),Hl=(e,t,n)=>!Kr(e,t,n),Vl=(e,t,{compare:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&e.value.every(i=>kl(a,i,n))},Gl=(e,t,{interpret:n,get:r})=>{const a=r(t,e.field);return Array.isArray(a)&&a.some(i=>n(e.value,i))},Lm=(e,t)=>e.value.call(t);var Ex=Object.freeze({__proto__:null,or:Fl,nor:Rm,and:Ml,not:Fm,eq:Ci,ne:Ll,lte:Il,lt:Nl,gt:Dl,gte:Bl,exists:zl,mod:Mm,size:Ul,regex:ql,within:Kr,nin:Hl,all:Vl,elemMatch:Gl,where:Lm});const ki=Object.assign({},Ex,{in:Kr}),Ox=Rl(ki);function $f(e){return e===null||typeof e!="object"?e:e instanceof Date?e.getTime():e&&typeof e.toJSON=="function"?e.toJSON():e}const Ax=(e,t)=>jl($f(e),$f(t));function _i(e,t,n){const r=new jm(e),a=Rl(t,Object.assign({compare:Ax},n));if(n&&n.forPrimitives){const i={field:Bn},o=r.parse;r.setParse(s=>o(s,i))}return Em(r.parse,a)}const Im=_i(si,ki),Cx=_i(["$and","$or"].reduce((e,t)=>(e[t]=Object.assign({},e[t],{type:"field"}),e),Object.assign({},si,{$nor:Object.assign({},si.$nor,{type:"field",parse:oi.compound})})),ki,{forPrimitives:!0}),kx=Im,_x=Object.freeze(Object.defineProperty({__proto__:null,$all:wl,$and:vl,$elemMatch:yl,$eq:Ai,$exists:$l,$gt:Wr,$gte:Oi,$in:Gr,$lt:Sl,$lte:El,$mod:Tm,$ne:Ol,$nin:xl,$nor:km,$not:_m,$options:Cl,$or:Cm,$regex:Al,$size:bl,$where:Pm,CompoundCondition:Hr,Condition:cl,DocumentCondition:Si,FieldCondition:Vr,ITSELF:Bn,MongoQueryParser:jm,NULL_CONDITION:fl,ObjectQueryParser:ml,all:Vl,allInterpreters:ki,allParsingInstructions:si,and:Ml,buildAnd:hl,buildOr:yx,compare:jl,createFactory:_i,createGetter:Sx,createInterpreter:Sm,createJsInterpreter:Rl,createTranslatorFactory:Em,defaultInstructionParsers:oi,defaultParsers:oi,elemMatch:Gl,eq:Ci,exists:zl,filter:kx,getObjectField:Pl,getObjectFieldCursor:Tl,gt:Dl,gte:Bl,guard:Im,hasOperators:$m,identity:wm,ignoreValue:pl,interpret:Ox,isCompound:xm,lt:Nl,lte:Il,mod:Mm,ne:Ll,nin:Hl,nor:Rm,not:Fm,object:dl,optimizedCompoundCondition:Ei,or:Fl,parseInstruction:xx,regex:ql,size:Ul,squire:Cx,where:Lm,within:Kr},Symbol.toStringTag,{value:"Module"})),Ca="__caslSubjectType__";function Oo(e,t){if(t){if(!Object.hasOwn(t,Ca))Object.defineProperty(t,Ca,{value:e});else if(e!==t[Ca])throw new Error(`Trying to cast object to subject type ${e} but previously it was casted to ${t[Ca]}`)}return t}const Tx={$eq:Ai,$ne:Ol,$lt:Sl,$lte:El,$gt:Wr,$gte:Oi,$in:Gr,$nin:xl,$all:wl,$size:bl,$regex:Al,$options:Cl,$elemMatch:yl,$exists:$l},Px={eq:Ci,ne:Ll,lt:Nl,lte:Il,gt:Dl,gte:Bl,in:Kr,nin:Hl,all:Vl,size:Ul,regex:ql,elemMatch:Gl,exists:zl,and:Ml};_i(Tx,Px);var Fe={};const jx=xb(_x);var ue=jx;function Ir(e){return Array.isArray(e)?e:[e]}const jn="__caslSubjectType__";function Rx(e,t){if(t){if(!Object.hasOwn(t,jn))Object.defineProperty(t,jn,{value:e});else if(e!==t[jn])throw new Error(`Trying to cast object to subject type ${e} but previously it was casted to ${t[jn]}`)}return t}const Xa=e=>{const t=typeof e;return t==="string"||t==="function"},Nm=e=>e.modelName||e.name;function Fx(e){return typeof e=="string"?e:Nm(e)}function Wl(e){return Object.hasOwn(e,jn)?e[jn]:Nm(e.constructor)}const Sf={function:e=>e.constructor,string:Wl};function Dm(e,t,n){let r=Ir(t),a=0;for(;a<r.length;){const i=r[a++];Object.hasOwn(e,i)&&(r=n(r,e[i]))}return r}function Mx(e,t){if(typeof t=="string"&&e.indexOf(t)!==-1)return t;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])!==-1)return t[n];return null}const Lx=(e,t)=>e.concat(t);function Ix(e,t){if(t in e)throw new Error(`Cannot use "${t}" as an alias because it's reserved action.`);const n=Object.keys(e),r=(a,i)=>{const o=Mx(a,i);if(o)throw new Error(`Detected cycle ${o} -> ${a.join(", ")}`);if(typeof i=="string"&&i===t||a.indexOf(t)!==-1||Array.isArray(i)&&i.indexOf(t)!==-1)throw new Error(`Cannot make an alias to "${t}" because this is reserved action`);return a.concat(i)};for(let a=0;a<n.length;a++)Dm(e,n[a],r)}function Nx(e,t){return(!t||t.skipValidate!==!1)&&Ix(e,t&&t.anyAction||"manage"),n=>Dm(e,n,Lx)}function Ef(e,t,n){for(let r=n;r<t.length;r++)e.push(t[r])}function Of(e,t){if(!e||!e.length)return t||[];if(!t||!t.length)return e||[];let n=0,r=0;const a=[];for(;n<e.length&&r<t.length;)e[n].priority<t[r].priority?(a.push(e[n]),n++):(a.push(t[r]),r++);return Ef(a,e,n),Ef(a,t,r),a}function ka(e,t,n){let r=e.get(t);return r||(r=n(),e.set(t,r)),r}const Dx=e=>e;function Bx(e,t){if(Array.isArray(e.fields)&&!e.fields.length)throw new Error("`rawRule.fields` cannot be an empty array. https://bit.ly/390miLa");if(e.fields&&!t.fieldMatcher)throw new Error('You need to pass "fieldMatcher" option in order to restrict access by fields');if(e.conditions&&!t.conditionsMatcher)throw new Error('You need to pass "conditionsMatcher" option in order to restrict access by conditions')}let zx=class{constructor(t,n,r=0){Bx(t,n),this.action=n.resolveAction(t.action),this.subject=t.subject,this.inverted=!!t.inverted,this.conditions=t.conditions,this.reason=t.reason,this.origin=t,this.fields=t.fields?Ir(t.fields):void 0,this.priority=r,this.t=n}i(){return this.conditions&&!this.o&&(this.o=this.t.conditionsMatcher(this.conditions)),this.o}get ast(){const t=this.i();return t?t.ast:void 0}matchesConditions(t){return this.conditions?!t||Xa(t)?!this.inverted:this.i()(t):!0}matchesField(t){return this.fields?t?(this.u||(this.u=this.t.fieldMatcher(this.fields)),this.u(t)):!this.inverted:!0}};function Ux(e,t){const n={value:e,prev:t,next:null};return t&&(t.next=n),n}function qx(e){e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next),e.next=e.prev=null}const Hx=e=>({value:e.value,prev:e.prev,next:e.next}),Af=()=>({rules:[],merged:!1}),Cf=()=>new Map;let Vx=class{constructor(t=[],n={}){this.h=!1,this.l=new Map,this.p={conditionsMatcher:n.conditionsMatcher,fieldMatcher:n.fieldMatcher,resolveAction:n.resolveAction||Dx},this.$=n.anyAction||"manage",this.A=n.anySubjectType||"all",this.M=t,this.m=!!n.detectSubjectType,this.j=n.detectSubjectType||Wl,this.v(t)}get rules(){return this.M}detectSubjectType(t){return Xa(t)?t:t?this.j(t):this.A}update(t){const n={rules:t,ability:this,target:this};return this._("update",n),this.M=t,this.v(t),this._("updated",n),this}v(t){const n=new Map;let r;for(let a=t.length-1;a>=0;a--){const i=t.length-a-1,o=new zx(t[a],this.p,i),s=Ir(o.action),l=Ir(o.subject||this.A);!this.h&&o.fields&&(this.h=!0);for(let c=0;c<l.length;c++){const u=ka(n,l[c],Cf);r===void 0&&(r=typeof l[c]),typeof l[c]!==r&&r!=="mixed"&&(r="mixed");for(let f=0;f<s.length;f++)ka(u,s[f],Af).rules.push(o)}}if(this.l=n,r!=="mixed"&&!this.m){const a=Sf[r]||Sf.string;this.j=a}}possibleRulesFor(t,n=this.A){if(!Xa(n))throw new Error('"possibleRulesFor" accepts only subject types (i.e., string or class) as the 2nd parameter');const r=ka(this.l,n,Cf),a=ka(r,t,Af);if(a.merged)return a.rules;const i=t!==this.$&&r.has(this.$)?r.get(this.$).rules:void 0;let o=Of(a.rules,i);return n!==this.A&&(o=Of(o,this.possibleRulesFor(t,this.A))),a.rules=o,a.merged=!0,o}rulesFor(t,n,r){const a=this.possibleRulesFor(t,n);if(r&&typeof r!="string")throw new Error("The 3rd, `field` parameter is expected to be a string. See https://stalniy.github.io/casl/en/api/casl-ability#can-of-pure-ability for details");return this.h?a.filter(i=>i.matchesField(r)):a}actionsFor(t){if(!Xa(t))throw new Error('"actionsFor" accepts only subject types (i.e., string or class) as a parameter');const n=new Set,r=this.l.get(t);r&&Array.from(r.keys()).forEach(i=>n.add(i));const a=t!==this.A?this.l.get(this.A):void 0;return a&&Array.from(a.keys()).forEach(i=>n.add(i)),Array.from(n)}on(t,n){this.F=this.F||new Map;const r=this.F,a=r.get(t)||null,i=Ux(n,a);return r.set(t,i),()=>{const o=r.get(t);!i.next&&!i.prev&&o===i?r.delete(t):i===o&&r.set(t,i.prev),qx(i)}}_(t,n){if(!this.F)return;let r=this.F.get(t)||null;for(;r!==null;){const a=r.prev?Hx(r.prev):null;r.value(n),r=a}}},Kl=class extends Vx{can(t,n,r){const a=this.relevantRuleFor(t,n,r);return!!a&&!a.inverted}relevantRuleFor(t,n,r){const a=this.detectSubjectType(n),i=this.rulesFor(t,a,r);for(let o=0,s=i.length;o<s;o++)if(i[o].matchesConditions(n))return i[o];return null}cannot(t,n,r){return!this.can(t,n,r)}};const Bm={$eq:ue.$eq,$ne:ue.$ne,$lt:ue.$lt,$lte:ue.$lte,$gt:ue.$gt,$gte:ue.$gte,$in:ue.$in,$nin:ue.$nin,$all:ue.$all,$size:ue.$size,$regex:ue.$regex,$options:ue.$options,$elemMatch:ue.$elemMatch,$exists:ue.$exists},zm={eq:ue.eq,ne:ue.ne,lt:ue.lt,lte:ue.lte,gt:ue.gt,gte:ue.gte,in:ue.within,nin:ue.nin,all:ue.all,size:ue.size,regex:ue.regex,elemMatch:ue.elemMatch,exists:ue.exists,and:ue.and},Gx=(e,t,n)=>ue.createFactory(Object.assign({},Bm,e),Object.assign({},zm,t),n),Xl=ue.createFactory(Bm,zm),Wx=/[-/\\^$+?.()|[\]{}]/g,Kx=/\.?\*+\.?/g,Xx=/\*+/,Yx=/\./g;function Qx(e,t,n){const r=n[0]==="*"||e[0]==="."&&e[e.length-1]==="."?"+":"*",a=e.indexOf("**")===-1?"[^.]":".",i=e.replace(Yx,"\\$&").replace(Xx,a+r);return t+e.length===n.length?`(?:${i})?`:i}function Jx(e,t,n){return e==="."&&(n[t-1]==="*"||n[t+1]==="*")?e:`\\${e}`}function Zx(e){const t=e.map(r=>r.replace(Wx,Jx).replace(Kx,Qx)),n=t.length>1?`(?:${t.join("|")})`:t[0];return new RegExp(`^${n}$`)}const Yl=e=>{let t;return n=>(typeof t>"u"&&(t=e.every(r=>r.indexOf("*")===-1)?null:Zx(e)),t===null?e.indexOf(n)!==-1:t.test(n))};class ew extends Kl{constructor(t=[],n={}){super(t,Object.assign({conditionsMatcher:Xl,fieldMatcher:Yl},n))}}function Um(e=[],t={}){return new Kl(e,Object.assign({conditionsMatcher:Xl,fieldMatcher:Yl},t))}function tw(e){return e.prototype!==void 0&&typeof e.prototype.possibleRulesFor=="function"}let nw=class{constructor(t){this.O=t}because(t){return this.O.reason=t,this}},qm=class{constructor(t){this.rules=[],this.C=t,this.can=(n,r,a,i)=>this.R(n,r,a,i,!1),this.cannot=(n,r,a,i)=>this.R(n,r,a,i,!0),this.build=n=>tw(this.C)?new this.C(this.rules,n):this.C(this.rules,n)}R(t,n,r,a,i){const o={action:t};return i&&(o.inverted=i),n&&(o.subject=n,Array.isArray(r)||typeof r=="string"?o.fields=r:typeof r<"u"&&(o.conditions=r),typeof a<"u"&&(o.conditions=a)),this.rules.push(o),new nw(o)}};function rw(e,t){const n=new qm(Um),r=e(n.can,n.cannot);return r&&typeof r.then=="function"?r.then(()=>n.build(t)):n.build(t)}const Hm=e=>`Cannot execute "${e.action}" on "${e.subjectType}"`,Vm=function(t){this.message=t};Vm.prototype=Object.create(Error.prototype);class Gm extends Vm{static setDefaultMessage(t){this.P=typeof t=="string"?()=>t:t}static from(t){return new this(t)}constructor(t){super(""),this.ability=t,typeof Error.captureStackTrace=="function"&&(this.name="ForbiddenError",Error.captureStackTrace(this,this.constructor))}setMessage(t){return this.message=t,this}throwUnlessCan(t,n,r){const a=this.unlessCan(t,n,r);if(a)throw a}unlessCan(t,n,r){const a=this.ability.relevantRuleFor(t,n,r);if(a&&!a.inverted)return;this.action=t,this.subject=n,this.subjectType=Fx(this.ability.detectSubjectType(n)),this.field=r;const i=a?a.reason:"";return this.message=this.message||i||this.constructor.P(this),this}}Gm.P=Hm;var aw=Object.freeze({__proto__:null});Fe.Ability=ew;Fe.AbilityBuilder=qm;Fe.ForbiddenError=Gm;Fe.PureAbility=Kl;Fe.buildMongoQueryMatcher=Gx;Fe.createAliasResolver=Nx;Fe.createMongoAbility=Um;Fe.defineAbility=rw;Fe.detectSubjectType=Wl;Fe.fieldPatternMatcher=Yl;Fe.getDefaultErrorMessage=Hm;Fe.hkt=aw;Fe.mongoQueryMatcher=Xl;Fe.subject=Rx;Fe.wrapArray=Ir;const{AbilityBuilder:iw,PureAbility:ow}=Fe,Ao=Qh,sw=e=>e,lw=e=>t=>e.includes(t);var uw=function(t){const{can:n,cannot:r,build:a}=new iw(ow);t=t||{};const i=o=>{var s;return(s=o==null?void 0:o.owners)==null?void 0:s.includes(t.username)};return Ao.invoke("museAcl.beforeDefineAbility",{user:t,allow:n,forbid:r}),t.isMuseAdmin&&n("manage","all"),n("create","Plugin"),n("create","App"),n("manage","Plugin",i),n("manage","App",i),n("manage","Plugin",({app:o,plugin:s})=>i(s)||(s==null?void 0:s.app)===(o==null?void 0:o.name)&&i(o)),n("config","Plugin",({app:o,plugin:s})=>i(s)||i(o)),n("update","App",({app:o,plugin:s,changes:l})=>i(o)?!0:i(s)?[...(l==null?void 0:l.set)||[],...(l==null?void 0:l.remove)||[],...(l==null?void 0:l.push)||[]].map(u=>u.path).concat((l==null?void 0:l.unset)||[]).every(u=>{const f=u.split(".");return!!(f[0]==="envs"&&["pluginConfig","pluginVariables"].includes(f[2])&&f[3]===s.name||["pluginConfig","pluginVariables"].includes(f[0])&&f[1]===s.name)}):!1),n("update","Release",["description"],i),Ao.invoke("museAcl.defineAbility",{user:t,allow:n,forbid:r}),Ao.invoke("museAcl.afterDefineAbility",{user:t,allow:n,forbid:r}),a({conditionsMatcher:sw,fieldMatcher:lw})};const cw=ke(uw);var Gh;const Bt=(Gh=window.MUSE_GLOBAL)==null?void 0:Gh.getUser();function _e(){const{data:e,error:t}=$t("muse.admins"),n={username:(Bt==null?void 0:Bt.username)||"anonymous",isMuseAdmin:!(Bt!=null&&Bt.username)||(e==null?void 0:e.includes(Bt.username))},r=cw(n);return{can:(a,i,o)=>r.can(a,Oo(i,o)),cannot:(a,i,o)=>r.cannot(a,Oo(i,o)),rawAbility:r,caslSubject:Oo,error:t}}const Z=MUSE_GLOBAL.__shared__.require("@tanstack/react-query@4.33.0/build/lib/index.mjs");Z.CancelledError;Z.Hydrate;Z.InfiniteQueryObserver;Z.IsRestoringProvider;Z.MutationCache;Z.MutationObserver;Z.QueriesObserver;Z.Query;Z.QueryCache;Z.QueryClient;Z.QueryClientProvider;Z.QueryErrorResetBoundary;Z.QueryObserver;Z.defaultContext;Z.defaultShouldDehydrateMutation;Z.defaultShouldDehydrateQuery;Z.dehydrate;Z.focusManager;Z.hashQueryKey;Z.hydrate;Z.isCancelledError;Z.isError;Z.isServer;Z.matchQuery;Z.notifyManager;Z.onlineManager;Z.parseFilterArgs;Z.parseMutationArgs;Z.parseMutationFilterArgs;Z.parseQueryArgs;Z.replaceEqualDeep;Z.useHydrate;Z.useInfiniteQuery;Z.useIsFetching;Z.useIsMutating;Z.useIsRestoring;const fw=Z.useMutation;Z.useQueries;const dw=Z.useQuery,pw=Z.useQueryClient;Z.useQueryErrorResetBoundary;Z.default;/*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors */function Wm(e,t){return function(){return e.apply(t,arguments)}}const{toString:hw}=Object.prototype,{getPrototypeOf:Ql}=Object,{iterator:Ti,toStringTag:Km}=Symbol,Pi=(e=>t=>{const n=hw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),t=>Pi(t)===e),ji=e=>t=>typeof t===e,{isArray:zn}=Array,Nn=ji("undefined");function Xr(e){return e!==null&&!Nn(e)&&e.constructor!==null&&!Nn(e.constructor)&&Le(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xm=tt("ArrayBuffer");function mw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xm(e.buffer),t}const gw=ji("string"),Le=ji("function"),Ym=ji("number"),Yr=e=>e!==null&&typeof e=="object",vw=e=>e===!0||e===!1,Ya=e=>{if(Pi(e)!=="object")return!1;const t=Ql(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Km in e)&&!(Ti in e)},yw=e=>{if(!Yr(e)||Xr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},bw=tt("Date"),xw=tt("File"),ww=tt("Blob"),$w=tt("FileList"),Sw=e=>Yr(e)&&Le(e.pipe),Ew=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Le(e.append)&&((t=Pi(e))==="formdata"||t==="object"&&Le(e.toString)&&e.toString()==="[object FormData]"))},Ow=tt("URLSearchParams"),[Aw,Cw,kw,_w]=["ReadableStream","Request","Response","Headers"].map(tt),Tw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),zn(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Xr(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(r=0;r<o;r++)s=i[r],t.call(null,e[s],s,e)}}function Qm(e,t){if(Xr(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ht=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:qt,Jm=e=>!Nn(e)&&e!==Ht;function Ns(){const{caseless:e,skipUndefined:t}=Jm(this)&&this||{},n={},r=(a,i)=>{const o=e&&Qm(n,i)||i;Ya(n[o])&&Ya(a)?n[o]=Ns(n[o],a):Ya(a)?n[o]=Ns({},a):zn(a)?n[o]=a.slice():(!t||!Nn(a))&&(n[o]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Qr(arguments[a],r);return n}const Pw=(e,t,n,{allOwnKeys:r}={})=>(Qr(t,(a,i)=>{n&&Le(a)?e[i]=Wm(a,n):e[i]=a},{allOwnKeys:r}),e),jw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fw=(e,t,n,r)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Ql(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Lw=e=>{if(!e)return null;if(zn(e))return e;let t=e.length;if(!Ym(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Iw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ql(Uint8Array)),Nw=(e,t)=>{const r=(e&&e[Ti]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},Dw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Bw=tt("HTMLFormElement"),zw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),kf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uw=tt("RegExp"),Zm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qr(n,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(r[i]=o||a)}),Object.defineProperties(e,r)},qw=e=>{Zm(e,(t,n)=>{if(Le(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Le(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Hw=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return zn(e)?r(e):r(String(e).split(t)),n},Vw=()=>{},Gw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ww(e){return!!(e&&Le(e.append)&&e[Km]==="FormData"&&e[Ti])}const Kw=e=>{const t=new Array(10),n=(r,a)=>{if(Yr(r)){if(t.indexOf(r)>=0)return;if(Xr(r))return r;if(!("toJSON"in r)){t[a]=r;const i=zn(r)?[]:{};return Qr(r,(o,s)=>{const l=n(o,a+1);!Nn(l)&&(i[s]=l)}),t[a]=void 0,i}}return r};return n(e,0)},Xw=tt("AsyncFunction"),Yw=e=>e&&(Yr(e)||Le(e))&&Le(e.then)&&Le(e.catch),eg=((e,t)=>e?setImmediate:t?((n,r)=>(Ht.addEventListener("message",({source:a,data:i})=>{a===Ht&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ht.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Le(Ht.postMessage)),Qw=typeof queueMicrotask<"u"?queueMicrotask.bind(Ht):typeof process<"u"&&process.nextTick||eg,Jw=e=>e!=null&&Le(e[Ti]);var C={isArray:zn,isArrayBuffer:Xm,isBuffer:Xr,isFormData:Ew,isArrayBufferView:mw,isString:gw,isNumber:Ym,isBoolean:vw,isObject:Yr,isPlainObject:Ya,isEmptyObject:yw,isReadableStream:Aw,isRequest:Cw,isResponse:kw,isHeaders:_w,isUndefined:Nn,isDate:bw,isFile:xw,isBlob:ww,isRegExp:Uw,isFunction:Le,isStream:Sw,isURLSearchParams:Ow,isTypedArray:Iw,isFileList:$w,forEach:Qr,merge:Ns,extend:Pw,trim:Tw,stripBOM:jw,inherits:Rw,toFlatObject:Fw,kindOf:Pi,kindOfTest:tt,endsWith:Mw,toArray:Lw,forEachEntry:Nw,matchAll:Dw,isHTMLForm:Bw,hasOwnProperty:kf,hasOwnProp:kf,reduceDescriptors:Zm,freezeMethods:qw,toObjectSet:Hw,toCamelCase:zw,noop:Vw,toFiniteNumber:Gw,findKey:Qm,global:Ht,isContextDefined:Jm,isSpecCompliantForm:Ww,toJSONObject:Kw,isAsyncFn:Xw,isThenable:Yw,setImmediate:eg,asap:Qw,isIterable:Jw};function te(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}C.inherits(te,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.status}}});const tg=te.prototype,ng={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ng[e]={value:e}});Object.defineProperties(te,ng);Object.defineProperty(tg,"isAxiosError",{value:!0});te.from=(e,t,n,r,a,i)=>{const o=Object.create(tg);C.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return te.call(o,s,l,n,r,a),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};var Zw=null;function Ds(e){return C.isPlainObject(e)||C.isArray(e)}function rg(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function _f(e,t,n){return e?e.concat(t).map(function(a,i){return a=rg(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function e$(e){return C.isArray(e)&&!e.some(Ds)}const t$=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function Ri(e,t,n){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!C.isUndefined(y[v])});const r=n.metaTokens,a=n.visitor||u,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(a))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(C.isDate(h))return h.toISOString();if(C.isBoolean(h))return h.toString();if(!l&&C.isBlob(h))throw new te("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(h)||C.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,v,y){let b=h;if(h&&!y&&typeof h=="object"){if(C.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(C.isArray(h)&&e$(h)||(C.isFileList(h)||C.endsWith(v,"[]"))&&(b=C.toArray(h)))return v=rg(v),b.forEach(function($,A){!(C.isUndefined($)||$===null)&&t.append(o===!0?_f([v],A,i):o===null?v:v+"[]",c($))}),!1}return Ds(h)?!0:(t.append(_f(y,v,i),c(h)),!1)}const f=[],p=Object.assign(t$,{defaultVisitor:u,convertValue:c,isVisitable:Ds});function g(h,v){if(!C.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),C.forEach(h,function(b,w){(!(C.isUndefined(b)||b===null)&&a.call(t,b,C.isString(w)?w.trim():w,v,p))===!0&&g(b,v?v.concat(w):[w])}),f.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Tf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Jl(e,t){this._pairs=[],e&&Ri(e,this,t)}const ag=Jl.prototype;ag.append=function(t,n){this._pairs.push([t,n])};ag.toString=function(t){const n=t?function(r){return t.call(this,r,Tf)}:Tf;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function n$(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ig(e,t,n){if(!t)return e;const r=n&&n.encode||n$;C.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let i;if(a?i=a(t,n):i=C.isURLSearchParams(t)?t.toString():new Jl(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class r${constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Pf=r$,og={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},a$=typeof URLSearchParams<"u"?URLSearchParams:Jl,i$=typeof FormData<"u"?FormData:null,o$=typeof Blob<"u"?Blob:null,s$={isBrowser:!0,classes:{URLSearchParams:a$,FormData:i$,Blob:o$},protocols:["http","https","file","blob","url","data"]};const Zl=typeof window<"u"&&typeof document<"u",Bs=typeof navigator=="object"&&navigator||void 0,l$=Zl&&(!Bs||["ReactNative","NativeScript","NS"].indexOf(Bs.product)<0),u$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",c$=Zl&&window.location.href||"http://localhost";var f$=Object.freeze({__proto__:null,hasBrowserEnv:Zl,hasStandardBrowserWebWorkerEnv:u$,hasStandardBrowserEnv:l$,navigator:Bs,origin:c$}),je={...f$,...s$};function d$(e,t){return Ri(e,new je.classes.URLSearchParams,{visitor:function(n,r,a,i){return je.isNode&&C.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function p$(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function h$(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function sg(e){function t(n,r,a,i){let o=n[i++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),l=i>=n.length;return o=!o&&C.isArray(a)?a.length:o,l?(C.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!s):((!a[o]||!C.isObject(a[o]))&&(a[o]=[]),t(n,r,a[o],i)&&C.isArray(a[o])&&(a[o]=h$(a[o])),!s)}if(C.isFormData(e)&&C.isFunction(e.entries)){const n={};return C.forEachEntry(e,(r,a)=>{t(p$(r),a,n,0)}),n}return null}function m$(e,t,n){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const eu={transitional:og,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=C.isObject(t);if(i&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return a?JSON.stringify(sg(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return d$(t,this.formSerializer).toString();if((s=C.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ri(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),m$(t)):t}],transformResponse:[function(t){const n=this.transitional||eu.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(r&&!this.responseType||a)){const o=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?te.from(s,te.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],e=>{eu.headers[e]={}});var tu=eu;const g$=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var v$=e=>{const t={};let n,r,a;return e&&e.split(`
|
|
8
8
|
`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!n||t[n]&&g$[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const jf=Symbol("internals");function sr(e){return e&&String(e).trim().toLowerCase()}function Qa(e){return e===!1||e==null?e:C.isArray(e)?e.map(Qa):String(e)}function y$(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const b$=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Co(e,t,n,r,a){if(C.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!C.isString(t)){if(C.isString(r))return t.indexOf(r)!==-1;if(C.isRegExp(r))return r.test(t)}}function x$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function w$(e,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,i,o){return this[r].call(this,t,a,i,o)},configurable:!0})})}class Fi{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(s,l,c){const u=sr(l);if(!u)throw new Error("header name must be a non-empty string");const f=C.findKey(a,u);(!f||a[f]===void 0||c===!0||c===void 0&&a[f]!==!1)&&(a[f||l]=Qa(s))}const o=(s,l)=>C.forEach(s,(c,u)=>i(c,u,l));if(C.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(C.isString(t)&&(t=t.trim())&&!b$(t))o(v$(t),n);else if(C.isObject(t)&&C.isIterable(t)){let s={},l,c;for(const u of t){if(!C.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[c=u[0]]=(l=s[c])?C.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=sr(t),t){const r=C.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return y$(a);if(C.isFunction(n))return n.call(this,a,r);if(C.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=sr(t),t){const r=C.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Co(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(o){if(o=sr(o),o){const s=C.findKey(r,o);s&&(!n||Co(r,r[s],s,n))&&(delete r[s],a=!0)}}return C.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||Co(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return C.forEach(this,(a,i)=>{const o=C.findKey(r,i);if(o){n[o]=Qa(a),delete n[i];return}const s=t?x$(i):String(i).trim();s!==i&&delete n[i],n[s]=Qa(a),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&C.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
9
9
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[jf]=this[jf]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=sr(o);r[s]||(w$(a,o),r[s]=!0)}return C.isArray(t)?t.forEach(i):i(t),this}}Fi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(Fi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});C.freezeMethods(Fi);var Ze=Fi;function ko(e,t){const n=this||tu,r=t||n,a=Ze.from(r.headers);let i=r.data;return C.forEach(e,function(s){i=s.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function lg(e){return!!(e&&e.__CANCEL__)}function Un(e,t,n){te.call(this,e??"canceled",te.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Un,te,{__CANCEL__:!0});function ug(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new te("Request failed with status code "+n.status,[te.ERR_BAD_REQUEST,te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function S$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];o||(o=c),n[a]=l,r[a]=c;let f=i,p=0;for(;f!==a;)p+=n[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-o<t)return;const g=u&&c-u;return g?Math.round(p*1e3/g):void 0}}function E$(e,t){let n=0,r=1e3/t,a,i;const o=(c,u=Date.now())=>{n=u,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?o(c,u):(a=c,i||(i=setTimeout(()=>{i=null,o(a)},r-f)))},()=>a&&o(a)]}const li=(e,t,n=3)=>{let r=0;const a=S$(50,250);return E$(i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,l=o-r,c=a(l),u=o<=s;r=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-o)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},Rf=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ff=e=>(...t)=>C.asap(()=>e(...t));var O$=je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,A$=je.hasStandardBrowserEnv?{write(e,t,n,r,a,i,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];C.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),C.isString(r)&&s.push(`path=${r}`),C.isString(a)&&s.push(`domain=${a}`),i===!0&&s.push("secure"),C.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function C$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function k$(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cg(e,t,n){let r=!C$(t);return e&&(r||n==!1)?k$(e,t):t}const Mf=e=>e instanceof Ze?{...e}:e;function Xt(e,t){t=t||{};const n={};function r(c,u,f,p){return C.isPlainObject(c)&&C.isPlainObject(u)?C.merge.call({caseless:p},c,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function a(c,u,f,p){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c,f,p)}else return r(c,u,f,p)}function i(c,u){if(!C.isUndefined(u))return r(void 0,u)}function o(c,u){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(c,u,f)=>a(Mf(c),Mf(u),f,!0)};return C.forEach(Object.keys({...e,...t}),function(u){const f=l[u]||a,p=f(e[u],t[u],u);C.isUndefined(p)&&f!==s||(n[u]=p)}),n}var fg=e=>{const t=Xt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:s}=t;if(t.headers=o=Ze.from(o),t.url=ig(cg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),C.isFormData(n)){if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(C.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,f])=>{c.includes(u.toLowerCase())&&o.set(u,f)})}}if(je.hasStandardBrowserEnv&&(r&&C.isFunction(r)&&(r=r(t)),r||r!==!1&&O$(t.url))){const l=a&&i&&A$.read(i);l&&o.set(a,l)}return t};const _$=typeof XMLHttpRequest<"u";var T$=_$&&function(e){return new Promise(function(n,r){const a=fg(e);let i=a.data;const o=Ze.from(a.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=a,u,f,p,g,h;function v(){g&&g(),h&&h(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function b(){if(!y)return;const $=Ze.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),M={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:$,config:e,request:y};ug(function(P){n(P),v()},function(P){r(P),v()},M),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new te("Request aborted",te.ECONNABORTED,e,y)),y=null)},y.onerror=function(A){const M=A&&A.message?A.message:"Network Error",T=new te(M,te.ERR_NETWORK,e,y);T.event=A||null,r(T),y=null},y.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const M=a.transitional||og;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),r(new te(A,M.clarifyTimeoutError?te.ETIMEDOUT:te.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&C.forEach(o.toJSON(),function(A,M){y.setRequestHeader(M,A)}),C.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),s&&s!=="json"&&(y.responseType=a.responseType),c&&([p,h]=li(c,!0),y.addEventListener("progress",p)),l&&y.upload&&([f,g]=li(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",g)),(a.cancelToken||a.signal)&&(u=$=>{y&&(r(!$||$.type?new Un(null,e,y):$),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const w=$$(a.url);if(w&&je.protocols.indexOf(w)===-1){r(new te("Unsupported protocol "+w+":",te.ERR_BAD_REQUEST,e));return}y.send(i||null)})};const P$=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const i=function(c){if(!a){a=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof te?u:new Un(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new te(`timeout ${t} of ms exceeded`,te.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>C.asap(s),l}};var j$=P$;const R$=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},F$=async function*(e,t){for await(const n of M$(e))yield*R$(n,t)},M$=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Lf=(e,t,n,r)=>{const a=F$(e,t);let i=0,o,s=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){s(),l.close();return}let f=u.byteLength;if(n){let p=i+=f;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),a.return()}},{highWaterMark:2})},If=64*1024,{isFunction:_a}=C,L$=(({Request:e,Response:t})=>({Request:e,Response:t}))(C.global),{ReadableStream:Nf,TextEncoder:Df}=C.global,Bf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},I$=e=>{e=C.merge.call({skipUndefined:!0},L$,e);const{fetch:t,Request:n,Response:r}=e,a=t?_a(t):typeof fetch=="function",i=_a(n),o=_a(r);if(!a)return!1;const s=a&&_a(Nf),l=a&&(typeof Df=="function"?(h=>v=>h.encode(v))(new Df):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=i&&s&&Bf(()=>{let h=!1;const v=new n(je.origin,{body:new Nf,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!v}),u=o&&s&&Bf(()=>C.isReadableStream(new r("").body)),f={stream:u&&(h=>h.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!f[h]&&(f[h]=(v,y)=>{let b=v&&v[h];if(b)return b.call(v);throw new te(`Response type '${h}' is not supported`,te.ERR_NOT_SUPPORT,y)})});const p=async h=>{if(h==null)return 0;if(C.isBlob(h))return h.size;if(C.isSpecCompliantForm(h))return(await new n(je.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(C.isArrayBufferView(h)||C.isArrayBuffer(h))return h.byteLength;if(C.isURLSearchParams(h)&&(h=h+""),C.isString(h))return(await l(h)).byteLength},g=async(h,v)=>{const y=C.toFiniteNumber(h.getContentLength());return y??p(v)};return async h=>{let{url:v,method:y,data:b,signal:w,cancelToken:$,timeout:A,onDownloadProgress:M,onUploadProgress:T,responseType:P,headers:O,withCredentials:j="same-origin",fetchOptions:z}=fg(h),R=t||fetch;P=P?(P+"").toLowerCase():"text";let D=j$([w,$&&$.toAbortSignal()],A),U=null;const k=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let F;try{if(T&&c&&y!=="get"&&y!=="head"&&(F=await g(O,b))!==0){let m=new n(v,{method:"POST",body:b,duplex:"half"}),X;if(C.isFormData(b)&&(X=m.headers.get("content-type"))&&O.setContentType(X),m.body){const[ne,we]=Rf(F,li(Ff(T)));b=Lf(m.body,If,ne,we)}}C.isString(j)||(j=j?"include":"omit");const I=i&&"credentials"in n.prototype,N={...z,signal:D,method:y.toUpperCase(),headers:O.normalize().toJSON(),body:b,duplex:"half",credentials:I?j:void 0};U=i&&new n(v,N);let B=await(i?R(U,z):R(v,N));const q=u&&(P==="stream"||P==="response");if(u&&(M||q&&k)){const m={};["status","statusText","headers"].forEach(ce=>{m[ce]=B[ce]});const X=C.toFiniteNumber(B.headers.get("content-length")),[ne,we]=M&&Rf(X,li(Ff(M),!0))||[];B=new r(Lf(B.body,If,ne,()=>{we&&we(),k&&k()}),m)}P=P||"text";let V=await f[C.findKey(f,P)||"text"](B,h);return!q&&k&&k(),await new Promise((m,X)=>{ug(m,X,{data:V,headers:Ze.from(B.headers),status:B.status,statusText:B.statusText,config:h,request:U})})}catch(I){throw k&&k(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new te("Network Error",te.ERR_NETWORK,h,U),{cause:I.cause||I}):te.from(I,I&&I.code,h,U)}}},N$=new Map,dg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let o=i.length,s=o,l,c,u=N$;for(;s--;)l=i[s],c=u.get(l),c===void 0&&u.set(l,c=s?new Map:I$(t)),u=c;return c};dg();const nu={http:Zw,xhr:T$,fetch:{get:dg}};C.forEach(nu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zf=e=>`- ${e}`,D$=e=>C.isFunction(e)||e===null||e===!1;function B$(e,t){e=C.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let o=0;o<n;o++){r=e[o];let s;if(a=r,!D$(r)&&(a=nu[(s=String(r)).toLowerCase()],a===void 0))throw new te(`Unknown adapter '${s}'`);if(a&&(C.isFunction(a)||(a=a.get(t))))break;i[s||"#"+o]=a}if(!a){const o=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=n?o.length>1?`since :
|
|
10
10
|
`+o.map(zf).join(`
|
|
11
11
|
`):" "+zf(o[0]):"as no adapter specified";throw new te("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a}var pg={getAdapter:B$,adapters:nu};function _o(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Un(null,e)}function Uf(e){return _o(e),e.headers=Ze.from(e.headers),e.data=ko.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pg.getAdapter(e.adapter||tu.adapter,e)(e).then(function(r){return _o(e),r.data=ko.call(e,e.transformResponse,r),r.headers=Ze.from(r.headers),r},function(r){return lg(r)||(_o(e),r&&r.response&&(r.response.data=ko.call(e,e.transformResponse,r.response),r.response.headers=Ze.from(r.response.headers))),Promise.reject(r)})}const hg="1.13.2",Mi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const qf={};Mi.transitional=function(t,n,r){function a(i,o){return"[Axios v"+hg+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,s)=>{if(t===!1)throw new te(a(o," has been removed"+(n?" in "+n:"")),te.ERR_DEPRECATED);return n&&!qf[o]&&(qf[o]=!0,console.warn(a(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,s):!0}};Mi.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function z$(e,t,n){if(typeof e!="object")throw new te("options must be an object",te.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new te("option "+i+" must be "+l,te.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new te("Unknown option "+i,te.ERR_BAD_OPTION)}}var Ja={assertOptions:z$,validators:Mi};const lt=Ja.validators;class ui{constructor(t){this.defaults=t||{},this.interceptors={request:new Pf,response:new Pf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
12
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xt(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Ja.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),a!=null&&(C.isFunction(a)?n.paramsSerializer={serialize:a}:Ja.assertOptions(a,{encode:lt.function,serialize:lt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ja.assertOptions(n,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&C.merge(i.common,i[n.method]);i&&C.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Ze.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,p;if(!l){const h=[Uf.bind(this),void 0];for(h.unshift(...s),h.push(...c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let g=n;for(;f<p;){const h=s[f++],v=s[f++];try{g=h(g)}catch(y){v.call(this,y);break}}try{u=Uf.call(this,g)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=Xt(this.defaults,t);const n=cg(t.baseURL,t.url,t.allowAbsoluteUrls);return ig(n,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){ui.prototype[t]=function(n,r){return this.request(Xt(r||{},{method:t,url:n,data:(r||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,s){return this.request(Xt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ui.prototype[t]=n(),ui.prototype[t+"Form"]=n(!0)});var Za=ui;class ru{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{r.subscribe(s),i=s}).then(a);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,s){r.reason||(r.reason=new Un(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ru(function(a){t=a}),cancel:t}}}var U$=ru;function q$(e){return function(n){return e.apply(null,n)}}function H$(e){return C.isObject(e)&&e.isAxiosError===!0}const zs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zs).forEach(([e,t])=>{zs[t]=e});var V$=zs;function mg(e){const t=new Za(e),n=Wm(Za.prototype.request,t);return C.extend(n,Za.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return mg(Xt(e,a))},n}const Ae=mg(tu);Ae.Axios=Za;Ae.CanceledError=Un;Ae.CancelToken=U$;Ae.isCancel=lg;Ae.VERSION=hg;Ae.toFormData=Ri;Ae.AxiosError=te;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=q$;Ae.isAxiosError=H$;Ae.mergeConfig=Xt;Ae.AxiosHeaders=Ze;Ae.formToJSON=e=>sg(C.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=pg.getAdapter;Ae.HttpStatusCode=V$;Ae.default=Ae;var G$=Ae;const W$=G$;var K$={create({endpoint:e,token:t,axiosConfig:n,interceptors:r={}}){let a=n&&n.headers?n.headers:{},i=W$.create({baseURL:e,timeout:3e4,...n,headers:{authorization:t||"",...a}});const o=async(l,c)=>{var u;try{let f;return typeof FormData<"u"&&c[0]instanceof FormData?f=await i.post(l,c[0],{"Content-Type":"multipart/form-data"}):f=await i.post(l,{args:c}),((u=f.data)==null?void 0:u.data)||f.data}catch(f){throw f&&f.response&&f.response.data&&f.response.data.error?new Error(f.response.data.error):f}},s={set(l,c,u){switch(c){case"interceptors":r=u;break;case"token":i.defaults.headers.common.authorization=u;break;case"baseUrl":e=u,i.defaults.baseURL=u;break;case"headers":Object.assign(i.defaults.headers,u);break;default:l[c]=u;break}return!0},get(l,c,u){if(["_api_path_","apply","call"].includes(c))return l[c]||"";if(c==="_url")return`${e}${u._api_path_||""}`;const f=(u._api_path_||"")+"/"+c,p=f.replace(/\//g,".").replace(/^\./,"");if(r!=null&&r[p])return r[p];const g=async(...h)=>await o(f,h);return g._api_path_=f,new Proxy(g,s)}};return new Proxy({},s)}},X$=K$;const Y$=ke(X$),To=window.MUSE_GLOBAL;var Wh,Kh,Xh,Yh;const Yt=Y$.create({endpoint:((Kh=(Wh=To.pluginVariables)==null?void 0:Wh["@ebay/muse-manager"])==null?void 0:Kh.museApiEndpoint)||((Xh=To.appVariables)==null?void 0:Xh.museApiEndpoint)||"/api/v2",token:(Yh=To.getUser())==null?void 0:Yh.museSession,axiosConfig:{timeout:12e4}}),xe=(...e)=>{const t=pw();return async(...n)=>{const r=S.message.loading("Syncing status...",0);try{await Yt.data.syncCache()}catch(a){console.warn("Failed to sync cache: ",a)}try{await Promise.all(Y.uniq([...e,...n]).map(async a=>await t.refetchQueries({queryKey:["muse-query","data.get",a],exact:!0})))}catch(a){console.error(a),S.message.error("Failed to sync status, please refresh the page to see update.")}r()}};function Nr(e,t){const n=Mn.useLocation(),r=Mn.useSearchParam(e)||t,a=H.useCallback(i=>{const{pathname:o,hash:s,search:l}=n,c=new URLSearchParams(l);c.set(e,i),window.history.pushState({},"",`${o}?${c.toString()}${s}`)},[n,e]);return[r,a]}var Us={exports:{}};const Q$="2.0.0",gg=256,J$=Number.MAX_SAFE_INTEGER||9007199254740991,Z$=16,eS=gg-6,tS=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Li={MAX_LENGTH:gg,MAX_SAFE_COMPONENT_LENGTH:Z$,MAX_SAFE_BUILD_LENGTH:eS,MAX_SAFE_INTEGER:J$,RELEASE_TYPES:tS,SEMVER_SPEC_VERSION:Q$,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Po={};const nS=typeof process=="object"&&Po&&Po.NODE_DEBUG&&/\bsemver\b/i.test(Po.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Ii=nS;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:a}=Li,i=Ii;t=e.exports={};const o=t.re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let f=0;const p="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",a],[p,r]],h=y=>{for(const[b,w]of g)y=y.split(`${b}*`).join(`${b}{0,${w}}`).split(`${b}+`).join(`${b}{1,${w}}`);return y},v=(y,b,w)=>{const $=h(b),A=f++;i(y,A,b),u[y]=A,l[A]=b,c[A]=$,o[A]=new RegExp(b,w?"g":void 0),s[A]=new RegExp($,w?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),v("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${p}+`),v("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),v("FULL",`^${l[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),v("LOOSE",`^${l[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),v("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),v("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[u.COERCE],!0),v("COERCERTLFULL",l[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Us,Us.exports);var Jr=Us.exports;const rS=Object.freeze({loose:!0}),aS=Object.freeze({}),iS=e=>e?typeof e!="object"?rS:e:aS;var au=iS;const Hf=/^[0-9]+$/,vg=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const n=Hf.test(e),r=Hf.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},oS=(e,t)=>vg(t,e);var yg={compareIdentifiers:vg,rcompareIdentifiers:oS};const Ta=Ii,{MAX_LENGTH:Vf,MAX_SAFE_INTEGER:Pa}=Li,{safeRe:ja,t:Ra}=Jr,sS=au,{compareIdentifiers:jo}=yg;let lS=class ct{constructor(t,n){if(n=sS(n),t instanceof ct){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Vf)throw new TypeError(`version is longer than ${Vf} characters`);Ta("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?ja[Ra.LOOSE]:ja[Ra.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>Pa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pa||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const i=+a;if(i>=0&&i<Pa)return i}return a}):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(Ta("SemVer.compare",this.version,this.options,t),!(t instanceof ct)){if(typeof t=="string"&&t===this.version)return 0;t=new ct(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ct||(t=new ct(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof ct||(t=new ct(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],a=t.prerelease[n];if(Ta("prerelease compare",n,r,a),r===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(r===void 0)return-1;if(r===a)continue;return jo(r,a)}while(++n)}compareBuild(t){t instanceof ct||(t=new ct(t,this.options));let n=0;do{const r=this.build[n],a=t.build[n];if(Ta("build compare",n,r,a),r===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(r===void 0)return-1;if(r===a)continue;return jo(r,a)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const a=`-${n}`.match(this.options.loose?ja[Ra.PRERELEASELOOSE]:ja[Ra.PRERELEASE]);if(!a||a[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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":{const a=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[a];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let i=[n,a];r===!1&&(i=[n]),jo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Me=lS;const Gf=Me,uS=(e,t,n=!1)=>{if(e instanceof Gf)return e;try{return new Gf(e,t)}catch(r){if(!n)return null;throw r}};var qn=uS;const cS=qn,fS=(e,t)=>{const n=cS(e,t);return n?n.version:null};var bg=fS;const Wf=ke(bg),dS=qn,pS=(e,t)=>{const n=dS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var hS=pS;const Kf=Me,mS=(e,t,n,r,a)=>{typeof n=="string"&&(a=r,r=n,n=void 0);try{return new Kf(e instanceof Kf?e.version:e,n).inc(t,r,a).version}catch{return null}};var gS=mS;const Xf=qn,vS=(e,t)=>{const n=Xf(e,null,!0),r=Xf(t,null,!0),a=n.compare(r);if(a===0)return null;const i=a>0,o=i?n:r,s=i?r:n,l=!!o.prerelease.length;if(!!s.prerelease.length&&!l){if(!s.patch&&!s.minor)return"major";if(s.compareMain(o)===0)return s.minor&&!s.patch?"minor":"patch"}const u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};var xg=vS;const yS=ke(xg),bS=Me,xS=(e,t)=>new bS(e,t).major;var wS=xS;const $S=Me,SS=(e,t)=>new $S(e,t).minor;var ES=SS;const OS=Me,AS=(e,t)=>new OS(e,t).patch;var CS=AS;const kS=qn,_S=(e,t)=>{const n=kS(e,t);return n&&n.prerelease.length?n.prerelease:null};var TS=_S;const Yf=Me,PS=(e,t,n)=>new Yf(e,n).compare(new Yf(t,n));var nt=PS;const jS=nt,RS=(e,t,n)=>jS(t,e,n);var FS=RS;const MS=nt,LS=(e,t)=>MS(e,t,!0);var IS=LS;const Qf=Me,NS=(e,t,n)=>{const r=new Qf(e,n),a=new Qf(t,n);return r.compare(a)||r.compareBuild(a)};var iu=NS;const DS=iu,BS=(e,t)=>e.sort((n,r)=>DS(n,r,t));var zS=BS;const US=iu,qS=(e,t)=>e.sort((n,r)=>US(r,n,t));var HS=qS;const VS=nt,GS=(e,t,n)=>VS(e,t,n)>0;var Ni=GS;const WS=nt,KS=(e,t,n)=>WS(e,t,n)<0;var ou=KS;const XS=nt,YS=(e,t,n)=>XS(e,t,n)===0;var wg=YS;const QS=nt,JS=(e,t,n)=>QS(e,t,n)!==0;var $g=JS;const ZS=nt,eE=(e,t,n)=>ZS(e,t,n)>=0;var su=eE;const tE=nt,nE=(e,t,n)=>tE(e,t,n)<=0;var lu=nE;const rE=wg,aE=$g,iE=Ni,oE=su,sE=ou,lE=lu,uE=(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 rE(e,n,r);case"!=":return aE(e,n,r);case">":return iE(e,n,r);case">=":return oE(e,n,r);case"<":return sE(e,n,r);case"<=":return lE(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var Sg=uE;const cE=Me,fE=qn,{safeRe:Fa,t:Ma}=Jr,dE=(e,t)=>{if(e instanceof cE)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(t.includePrerelease?Fa[Ma.COERCEFULL]:Fa[Ma.COERCE]);else{const l=t.includePrerelease?Fa[Ma.COERCERTLFULL]:Fa[Ma.COERCERTL];let c;for(;(c=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],a=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return fE(`${r}.${a}.${i}${o}${s}`,t)};var pE=dE;class hE{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(t,n)}return this}}var mE=hE,Ro,Jf;function rt(){if(Jf)return Ro;Jf=1;const e=/\s+/g;class t{constructor(F,I){if(I=a(I),F instanceof t)return F.loose===!!I.loose&&F.includePrerelease===!!I.includePrerelease?F:new t(F.raw,I);if(F instanceof i)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=I,this.loose=!!I.loose,this.includePrerelease=!!I.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(N=>this.parseRange(N.trim())).filter(N=>N.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter(B=>!v(B[0])),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&y(B[0])){this.set=[B];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const I=this.set[F];for(let N=0;N<I.length;N++)N>0&&(this.formatted+=" "),this.formatted+=I[N].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const N=((this.options.includePrerelease&&g)|(this.options.loose&&h))+":"+F,B=r.get(N);if(B)return B;const q=this.options.loose,V=q?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];F=F.replace(V,D(this.options.includePrerelease)),o("hyphen replace",F),F=F.replace(l[c.COMPARATORTRIM],u),o("comparator trim",F),F=F.replace(l[c.TILDETRIM],f),o("tilde trim",F),F=F.replace(l[c.CARETTRIM],p),o("caret trim",F);let m=F.split(" ").map(ce=>w(ce,this.options)).join(" ").split(/\s+/).map(ce=>R(ce,this.options));q&&(m=m.filter(ce=>(o("loose invalid filter",ce,this.options),!!ce.match(l[c.COMPARATORLOOSE])))),o("range list",m);const X=new Map,ne=m.map(ce=>new i(ce,this.options));for(const ce of ne){if(v(ce))return[ce];X.set(ce.value,ce)}X.size>1&&X.has("")&&X.delete("");const we=[...X.values()];return r.set(N,we),we}intersects(F,I){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(N=>b(N,I)&&F.set.some(B=>b(B,I)&&N.every(q=>B.every(V=>q.intersects(V,I)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new s(F,this.options)}catch{return!1}for(let I=0;I<this.set.length;I++)if(U(this.set[I],F,this.options))return!0;return!1}}Ro=t;const n=mE,r=new n,a=au,i=Di(),o=Ii,s=Me,{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:f,caretTrimReplace:p}=Jr,{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:h}=Li,v=k=>k.value==="<0.0.0-0",y=k=>k.value==="",b=(k,F)=>{let I=!0;const N=k.slice();let B=N.pop();for(;I&&N.length;)I=N.every(q=>B.intersects(q,F)),B=N.pop();return I},w=(k,F)=>(k=k.replace(l[c.BUILD],""),o("comp",k,F),k=T(k,F),o("caret",k),k=A(k,F),o("tildes",k),k=O(k,F),o("xrange",k),k=z(k,F),o("stars",k),k),$=k=>!k||k.toLowerCase()==="x"||k==="*",A=(k,F)=>k.trim().split(/\s+/).map(I=>M(I,F)).join(" "),M=(k,F)=>{const I=F.loose?l[c.TILDELOOSE]:l[c.TILDE];return k.replace(I,(N,B,q,V,m)=>{o("tilde",k,N,B,q,V,m);let X;return $(B)?X="":$(q)?X=`>=${B}.0.0 <${+B+1}.0.0-0`:$(V)?X=`>=${B}.${q}.0 <${B}.${+q+1}.0-0`:m?(o("replaceTilde pr",m),X=`>=${B}.${q}.${V}-${m} <${B}.${+q+1}.0-0`):X=`>=${B}.${q}.${V} <${B}.${+q+1}.0-0`,o("tilde return",X),X})},T=(k,F)=>k.trim().split(/\s+/).map(I=>P(I,F)).join(" "),P=(k,F)=>{o("caret",k,F);const I=F.loose?l[c.CARETLOOSE]:l[c.CARET],N=F.includePrerelease?"-0":"";return k.replace(I,(B,q,V,m,X)=>{o("caret",k,B,q,V,m,X);let ne;return $(q)?ne="":$(V)?ne=`>=${q}.0.0${N} <${+q+1}.0.0-0`:$(m)?q==="0"?ne=`>=${q}.${V}.0${N} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.0${N} <${+q+1}.0.0-0`:X?(o("replaceCaret pr",X),q==="0"?V==="0"?ne=`>=${q}.${V}.${m}-${X} <${q}.${V}.${+m+1}-0`:ne=`>=${q}.${V}.${m}-${X} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.${m}-${X} <${+q+1}.0.0-0`):(o("no pr"),q==="0"?V==="0"?ne=`>=${q}.${V}.${m}${N} <${q}.${V}.${+m+1}-0`:ne=`>=${q}.${V}.${m}${N} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.${m} <${+q+1}.0.0-0`),o("caret return",ne),ne})},O=(k,F)=>(o("replaceXRanges",k,F),k.split(/\s+/).map(I=>j(I,F)).join(" ")),j=(k,F)=>{k=k.trim();const I=F.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return k.replace(I,(N,B,q,V,m,X)=>{o("xRange",k,N,B,q,V,m,X);const ne=$(q),we=ne||$(V),ce=we||$(m),he=ce;return B==="="&&he&&(B=""),X=F.includePrerelease?"-0":"",ne?B===">"||B==="<"?N="<0.0.0-0":N="*":B&&he?(we&&(V=0),m=0,B===">"?(B=">=",we?(q=+q+1,V=0,m=0):(V=+V+1,m=0)):B==="<="&&(B="<",we?q=+q+1:V=+V+1),B==="<"&&(X="-0"),N=`${B+q}.${V}.${m}${X}`):we?N=`>=${q}.0.0${X} <${+q+1}.0.0-0`:ce&&(N=`>=${q}.${V}.0${X} <${q}.${+V+1}.0-0`),o("xRange return",N),N})},z=(k,F)=>(o("replaceStars",k,F),k.trim().replace(l[c.STAR],"")),R=(k,F)=>(o("replaceGTE0",k,F),k.trim().replace(l[F.includePrerelease?c.GTE0PRE:c.GTE0],"")),D=k=>(F,I,N,B,q,V,m,X,ne,we,ce,he)=>($(N)?I="":$(B)?I=`>=${N}.0.0${k?"-0":""}`:$(q)?I=`>=${N}.${B}.0${k?"-0":""}`:V?I=`>=${I}`:I=`>=${I}${k?"-0":""}`,$(ne)?X="":$(we)?X=`<${+ne+1}.0.0-0`:$(ce)?X=`<${ne}.${+we+1}.0-0`:he?X=`<=${ne}.${we}.${ce}-${he}`:k?X=`<${ne}.${we}.${+ce+1}-0`:X=`<=${X}`,`${I} ${X}`.trim()),U=(k,F,I)=>{for(let N=0;N<k.length;N++)if(!k[N].test(F))return!1;if(F.prerelease.length&&!I.includePrerelease){for(let N=0;N<k.length;N++)if(o(k[N].semver),k[N].semver!==i.ANY&&k[N].semver.prerelease.length>0){const B=k[N].semver;if(B.major===F.major&&B.minor===F.minor&&B.patch===F.patch)return!0}return!1}return!0};return Ro}var Fo,Zf;function Di(){if(Zf)return Fo;Zf=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,f){if(f=n(f),u instanceof t){if(u.loose===!!f.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,f),this.options=f,this.loose=!!f.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const f=this.options.loose?r[a.COMPARATORLOOSE]:r[a.COMPARATOR],p=u.match(f);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new s(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new s(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,f){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,f).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,f).test(u.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,f)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,f)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Fo=t;const n=au,{safeRe:r,t:a}=Jr,i=Sg,o=Ii,s=Me,l=rt();return Fo}const gE=rt(),vE=(e,t,n)=>{try{t=new gE(t,n)}catch{return!1}return t.test(e)};var Zr=vE;const yE=rt(),bE=(e,t)=>new yE(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var xE=bE;const wE=Me,$E=rt(),SE=(e,t,n)=>{let r=null,a=null,i=null;try{i=new $E(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||a.compare(o)===-1)&&(r=o,a=new wE(r,n))}),r};var EE=SE;const OE=Me,AE=rt(),CE=(e,t,n)=>{let r=null,a=null,i=null;try{i=new AE(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||a.compare(o)===1)&&(r=o,a=new OE(r,n))}),r};var kE=CE;const Mo=Me,_E=rt(),ed=Ni,TE=(e,t)=>{e=new _E(e,t);let n=new Mo("0.0.0");if(e.test(n)||(n=new Mo("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const a=e.set[r];let i=null;a.forEach(o=>{const s=new Mo(o.semver.version);switch(o.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!i||ed(s,i))&&(i=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||ed(n,i))&&(n=i)}return n&&e.test(n)?n:null};var PE=TE;const jE=rt(),RE=(e,t)=>{try{return new jE(e,t).range||"*"}catch{return null}};var FE=RE;const ME=Me,Eg=Di(),{ANY:LE}=Eg,IE=rt(),NE=Zr,td=Ni,nd=ou,DE=lu,BE=su,zE=(e,t,n,r)=>{e=new ME(e,r),t=new IE(t,r);let a,i,o,s,l;switch(n){case">":a=td,i=DE,o=nd,s=">",l=">=";break;case"<":a=nd,i=BE,o=td,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(NE(e,t,r))return!1;for(let c=0;c<t.set.length;++c){const u=t.set[c];let f=null,p=null;if(u.forEach(g=>{g.semver===LE&&(g=new Eg(">=0.0.0")),f=f||g,p=p||g,a(g.semver,f.semver,r)?f=g:o(g.semver,p.semver,r)&&(p=g)}),f.operator===s||f.operator===l||(!p.operator||p.operator===s)&&i(e,p.semver))return!1;if(p.operator===l&&o(e,p.semver))return!1}return!0};var uu=zE;const UE=uu,qE=(e,t,n)=>UE(e,t,">",n);var HE=qE;const VE=uu,GE=(e,t,n)=>VE(e,t,"<",n);var WE=GE;const rd=rt(),KE=(e,t,n)=>(e=new rd(e,n),t=new rd(t,n),e.intersects(t,n));var XE=KE;const YE=Zr,QE=nt;var JE=(e,t,n)=>{const r=[];let a=null,i=null;const o=e.sort((u,f)=>QE(u,f,n));for(const u of o)YE(u,t,n)?(i=u,a||(a=u)):(i&&r.push([a,i]),i=null,a=null);a&&r.push([a,null]);const s=[];for(const[u,f]of r)u===f?s.push(u):!f&&u===o[0]?s.push("*"):f?u===o[0]?s.push(`<=${f}`):s.push(`${u} - ${f}`):s.push(`>=${u}`);const l=s.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t};const ad=rt(),cu=Di(),{ANY:Lo}=cu,lr=Zr,fu=nt,ZE=(e,t,n={})=>{if(e===t)return!0;e=new ad(e,n),t=new ad(t,n);let r=!1;e:for(const a of e.set){for(const i of t.set){const o=tO(a,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},eO=[new cu(">=0.0.0-0")],id=[new cu(">=0.0.0")],tO=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Lo){if(t.length===1&&t[0].semver===Lo)return!0;n.includePrerelease?e=eO:e=id}if(t.length===1&&t[0].semver===Lo){if(n.includePrerelease)return!0;t=id}const r=new Set;let a,i;for(const g of e)g.operator===">"||g.operator===">="?a=od(a,g,n):g.operator==="<"||g.operator==="<="?i=sd(i,g,n):r.add(g.semver);if(r.size>1)return null;let o;if(a&&i){if(o=fu(a.semver,i.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||i.operator!=="<="))return null}for(const g of r){if(a&&!lr(g,String(a),n)||i&&!lr(g,String(i),n))return null;for(const h of t)if(!lr(g,String(h),n))return!1;return!0}let s,l,c,u,f=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,p=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(const g of t){if(u=u||g.operator===">"||g.operator===">=",c=c||g.operator==="<"||g.operator==="<=",a){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator===">"||g.operator===">="){if(s=od(a,g,n),s===g&&s!==a)return!1}else if(a.operator===">="&&!lr(a.semver,String(g),n))return!1}if(i){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(l=sd(i,g,n),l===g&&l!==i)return!1}else if(i.operator==="<="&&!lr(i.semver,String(g),n))return!1}if(!g.operator&&(i||a)&&o!==0)return!1}return!(a&&c&&!i&&o!==0||i&&u&&!a&&o!==0||p||f)},od=(e,t,n)=>{if(!e)return t;const r=fu(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},sd=(e,t,n)=>{if(!e)return t;const r=fu(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var nO=ZE;const Io=Jr,ld=Li,rO=Me,ud=yg,aO=qn,iO=bg,oO=hS,sO=gS,lO=xg,uO=wS,cO=ES,fO=CS,dO=TS,pO=nt,hO=FS,mO=IS,gO=iu,vO=zS,yO=HS,bO=Ni,xO=ou,wO=wg,$O=$g,SO=su,EO=lu,OO=Sg,AO=pE,CO=Di(),kO=rt(),_O=Zr,TO=xE,PO=EE,jO=kE,RO=PE,FO=FE,MO=uu,LO=HE,IO=WE,NO=XE,DO=JE,BO=nO;var zO={parse:aO,valid:iO,clean:oO,inc:sO,diff:lO,major:uO,minor:cO,patch:fO,prerelease:dO,compare:pO,rcompare:hO,compareLoose:mO,compareBuild:gO,sort:vO,rsort:yO,gt:bO,lt:xO,eq:wO,neq:$O,gte:SO,lte:EO,cmp:OO,coerce:AO,Comparator:CO,Range:kO,satisfies:_O,toComparators:TO,maxSatisfying:PO,minSatisfying:jO,minVersion:RO,validRange:FO,outside:MO,gtr:LO,ltr:IO,intersects:NO,simplifyRange:DO,subset:BO,SemVer:rO,re:Io.re,src:Io.src,tokens:Io.t,SEMVER_SPEC_VERSION:ld.SEMVER_SPEC_VERSION,RELEASE_TYPES:ld.RELEASE_TYPES,compareIdentifiers:ud.compareIdentifiers,rcompareIdentifiers:ud.rcompareIdentifiers};const UO=ke(zO);function qO({value:e="1.0.0",onChange:t,baseVersion:n="1.0.0"}){const[r,a]=H.useState("patch"),i=o=>{const s=o.target.value;a(s),s!=="custom"&&t(UO.inc(n,s))};return d.jsxs("div",{style:{marginTop:5},children:[d.jsxs(S.Radio.Group,{onChange:i,defaultValue:"patch",children:[d.jsx(S.Radio,{value:"patch",children:"Patch"}),d.jsx(S.Radio,{value:"minor",children:"Minor"}),d.jsx(S.Radio,{value:"major",children:"Major"}),d.jsx(S.Radio,{value:"custom",children:"Custom"})]}),d.jsx(S.Input,{disabled:r!=="custom",style:{marginTop:10},value:e,onChange:o=>t(o.target.value)})]})}const HO=MUSE_GLOBAL.__shared__.require("@ebay/muse-lib-antd@1.3.0/src/utils.js");var Oe=HO;const Se=ke(Oe);function du({value:e,onChange:t,plugin:n,app:r,filter:a,...i}){let{data:o,error:s,isLoading:l}=St(`muse.plugin-releases.${n==null?void 0:n.name}`);return n?VO({value:e,onChange:t,plugin:n,app:r,filter:a,releases:o,error:s,loading:l,...i}):d.jsx("div",{className:"plugin-manager_home-plugin-release-select",children:d.jsx(S.Select,{value:e,placeholder:"Select a version to deploy",onChange:t,...i,popupMatchSelectWidth:!1,disabled:!0})})}function VO({value:e,onChange:t,plugin:n,app:r,filter:a,releases:i,error:o,loading:s,...l}){if(o)return"Failed, please refresh to retry.";a&&i&&(i=i.filter(a));const c=i?i.map(u=>{const f=[];return r&&Object.entries(r.envs).forEach(([p,g])=>{var h;(h=g.plugins)!=null&&h.find(v=>v.name===n.name&&v.version===u.version)&&f.push(d.jsx(S.Tooltip,{title:`Already on ${p}`,children:d.jsx(S.Tag,{color:p==="production"?"green":"orange",style:{verticalAlign:"middle",lineHeight:"20px"},children:p})},p))}),{key:u.version,value:u.version.startsWith("v")?u.version.substring(1):u.version,label:d.jsxs(d.Fragment,{children:[d.jsx("span",{style:{marginRight:"15px",verticalAlign:"middle"},children:u.version}),f,d.jsxs("span",{style:{color:"#999",marginLeft:"5px",verticalAlign:"middle"},children:[u.branch&&d.jsxs(d.Fragment,{children:["built from"," ",d.jsx(S.Tag,{children:/^[0-9a-f]{40}$/.test(u.branch)?u.branch.substring(0,6):u.branch||"unknown"})]}),"by ",u.createdBy," ",d.jsx(wt,{date:new Date(u.createdAt)})]})]})}}):[];return Oe.extendArray(c,"options","museManager.pm.pluginReleaseSelect",{options:c,plugin:n,app:r}),d.jsx("div",{className:"plugin-manager_home-plugin-release-select",children:d.jsx(S.Select,{value:e,placeholder:"Select a version to deploy",onChange:t,...l,popupMatchSelectWidth:!1,disabled:s,loading:s,options:c})})}const GO={null:"#8bc34a",patch:"#ffc107",minor:"#9c27b0",major:"#e53935"};function Og(e){let t=[{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#8bc34a]"}),"Up to date"]}),key:"null"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#ffc107]"}),"Patch update"]}),key:"patch"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#9c27b0]"}),"Minor update"]}),key:"minor"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#e53935]"}),"Major update"]}),key:"major"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded mr-2 bg-[#26c6da]"}),"Core plugin"]}),key:"core"}];t.push(...et.flatten(oe.invoke("museManager.pm.pluginList.getEnvFilters",{...e}))),oe.invoke("museManager.pm.pluginList.processEnvFilters",{items:t,...e}),t=t.filter(Boolean),oe.sort(t);const n={label:d.jsx("p",{className:"text-center border-0 border-t border-[#f0f0f0] border-solid py-1 mb-0",children:"Clear"}),key:"clear"};return d.jsx("div",{className:"plugin-manager_home-env-filter-menu",children:d.jsx(S.Menu,{items:[...t,n],...e})})}const WO=MUSE_GLOBAL.__shared__.require("@ant-design/icons@5.3.7/es/index.js");var Re=WO;const KO=ke(Re),XO=()=>d.jsx("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",children:d.jsx("path",{d:"M299.612074 246.517593q-7.579926 7.579926-18.959815 7.579926t-18.959815-7.579926l-70.799308-72.059297q-20.219803-17.699827 0-37.929629 17.699827-17.699827 37.929629 0l70.789309 72.059296q17.699827 17.699827 0 37.92963z m222.507827-100.509019q-7.589926 8.21992-18.969815 8.21992-11.379889 0-19.599808-8.21992-8.20992-8.20992-8.20992-19.589809V26.549741q0-11.379889 8.20992-18.959815 8.21992-7.579926 19.599808-7.579926t18.969815 7.579926q7.589926 7.579926 7.589926 18.959815v99.869024q0 11.379889-7.589926 19.589809z m-332.486753 273.697327q11.379889 0 18.969815 8.21992 7.589926 8.21992 7.589926 18.329821 0 11.379889-7.589926 19.599809-7.589926 8.20992-18.969815 8.209919H89.764123q-11.379889 0-19.599808-8.209919-8.20992-8.21992-8.20992-19.599809 0-10.109901 8.20992-18.329821 8.21992-8.21992 19.599808-8.21992h99.869025zM554.97958 970.890519q11.379889 0 18.959815 7.589926 7.589926 7.589926 7.589926 18.969814 0 11.379889-7.589926 18.959815-7.579926 7.589926-18.959815 7.589926h-91.019111q-10.109901 0-18.329821-7.589926-8.21992-7.579926-8.21992-18.959815t8.21992-18.969814q8.21992-7.589926 18.329821-7.589926h91.019111z m270.537358-848.261717q8.849914 7.579926 8.849914 18.959815t-8.849914 18.959815l-70.789308 70.799309q-8.849914 8.849914-18.969815 8.849913t-18.969815-8.849913q-7.589926-7.589926-7.589926-18.969815 0-11.379889 7.589926-18.969815l70.799309-70.789308q20.219803-20.229802 37.919629 0z m108.718939 295.817112q11.379889 0 19.599808 7.579926 8.20992 7.589926 8.20992 18.969814 0 11.379889-8.20992 18.969815-8.21992 7.579926-19.599808 7.579926h-99.869025q-11.379889 0-18.969815-7.579926-7.579926-7.589926-7.579926-18.969815 0-11.379889 7.579926-18.969814 7.589926-7.579926 18.969815-7.579926h99.869025zM606.809074 864.701556q10.119901 0 18.339821 7.589926 8.21992 7.579926 8.21992 18.959814t-8.21992 18.959815q-8.21992 7.589926-18.339821 7.589926H413.390963q-11.379889 0-19.599809-7.589926-8.20992-7.579926-8.209919-18.959815t8.209919-18.959814q8.21992-7.589926 19.599809-7.589926h193.418111zM361.561469 279.387272q73.319284-63.209383 171.298327-54.989463 97.979043 8.21992 159.918439 82.799191 54.359469 61.949395 56.889444 150.438531 0 99.869025-69.529321 166.86837-49.309518 50.569506-46.779543 123.88879v39.199618q0 10.109901-7.579926 18.319821-7.589926 8.21992-18.969815 8.219919H413.390963q-11.379889 0-18.969815-8.219919-7.579926-8.20992-7.579926-18.319821v-85.969161q2.529975-55.629457-45.509555-84.699173-2.529975-1.269988-6.319939-5.05995-63.209383-75.849259-55.629456-171.928321 7.589926-96.079062 82.179197-160.548432z m280.647259 307.197q53.099481-51.829494 53.099482-127.688753-1.269988-68.259333-44.249568-116.298865-48.039531-58.159432-122.628802-63.849376-74.579272-5.689944-131.468717 42.359586-56.889444 49.299519-63.209382 123.88879t42.97958 132.738704q3.789963 3.789963 17.059833 18.959815 13.27987 15.169852 30.339704 45.509555 17.059833 30.339704 17.059833 54.35947v60.679407l136.538667 1.269988V699.093173q0-16.42984 3.789963-30.969698t12.639877-27.809728q8.849914-13.27987 13.909864-19.599809 5.059951-6.319938 18.329821-18.959815t15.799846-15.169851z"})});function Bi(e){return d.jsx(KO,{component:XO,"aria-label":"lighton-icon",...e})}Bi.propTypes={};Bi.defaultProps={};const{Option:YO}=S.Select;function pu({value:e,onChange:t,app:n}){const[r,a]=H.useState(!0),{data:i}=$t("muse.plugins"),{data:o}=$t("muse.plugins.latest-releases"),s=[...e||[]];r&&s.push({});const l=Y.keyBy(i,"name"),c=(h,v)=>{v===s.length-1&&a(!1);const y=o[h]&&o[h].version,b=Y.cloneDeep(s);b[v].name=h,b[v].version=y?y.startsWith("v")?y.substring(1):y:void 0,t(b.filter(w=>w.name))},u=(h,v)=>{const y=Y.cloneDeep(s);y[v].version=h,t(y.filter(b=>b.name))},f=H.useCallback(()=>{if(!e||e.some(h=>!h.name||!h.version)){S.message.warning("Select plugin/version first.");return}a(!0)},[a,e]),p=h=>{const v=Y.cloneDeep(s);v.splice(h,1),t(v.filter(y=>y.name))},g=i==null?void 0:i.filter(h=>(o==null?void 0:o[h==null?void 0:h.name])&&!Y.find(s,{name:h.name}));return g==null||g.sort((h,v)=>h.name.localeCompare(v.name)),d.jsxs("div",{className:"plugin-manager_home-plugins-select",children:[s.map((h,v)=>{const y=h.name?l[h.name]:null;return d.jsxs(S.Row,{gutter:10,className:"leading-10",children:[d.jsx(S.Col,{span:"12",children:d.jsx(S.Select,{showSearch:!0,popupMatchSelectWidth:!1,placeholder:"Select a plugin",value:h.name,onChange:b=>c(b,v),children:g==null?void 0:g.map(b=>d.jsx(YO,{value:b.name,children:b.name},b.name))})}),d.jsx(S.Col,{span:"10",children:d.jsx(du,{app:n,plugin:y,placeholder:"Select a version",value:h.version,onChange:b=>u(b,v),disabled:!h.name})}),d.jsx(S.Col,{span:2,style:{textAlign:"right"},children:h.name&&d.jsx(Re.MinusCircleOutlined,{style:{color:"#ff4d4f"},onClick:()=>p(v)})})]},v)}),(g==null?void 0:g.length)>0&&d.jsxs(S.Button,{type:"link",onClick:f,children:[d.jsx(Re.PlusOutlined,{})," Add"]})]})}const QO=MUSE_GLOBAL.__shared__.require("@ebay/nice-form-react@2.0.3/lib/esm/index.js");var JO=QO;const se=ke(JO),hu=({item:e})=>{let t=e.content||d.jsx(S.Button,{...e.props});return e.tooltip&&(t=d.jsx(S.Tooltip,{title:e.tooltip,children:d.jsx("span",{children:t})})),e.position!=="left"?t=d.jsx("span",{className:"justify-self-end",children:t}):t=d.jsx("span",{children:t}),t};function Hn({okText:e,cancelText:t,onOk:n,onCancel:r,okButtonProps:a,cancelButtonProps:i,items:o,...s}){o||(o=[{key:"cancel-btn",order:10,props:{children:t||"Cancel",onClick:r,...i}},{key:"ok-btn",order:20,props:{children:e||"Ok",onClick:n,type:"primary",...a}}]);const l=o.filter(p=>p.position==="left"),c=o.filter(p=>p.position!=="left"),u=[];l.length>0?u.push(l.length-1,"1fr",c.length):c.length>0&&u.push("1fr",c.length-1);const f=u.filter(Boolean).map(p=>p==="1fr"?"1fr":`repeat(${p}, auto)`).join(" ");return d.jsx("div",{className:"grid gap-2 mt-5",style:{gridTemplateColumns:f},children:[...l,...c].map(p=>d.jsx(hu,{item:p},p.key))})}const Ag=Q.create(({app:e})=>{var R;const t=_e(),[n]=S.Form.useForm(),r=K.useModal(),{mutateAsync:a,error:i,isLoading:o}=be("pm.deployPlugin"),{validateDeployment:s,validateDeploymentError:l,validateDeploymentPending:c}=zi(),{pending:u,error:f,setPending:p,setError:g}=ea([o,c],[l,i]),h=xe(`muse.app.${e.name}`),[v,y]=H.useState([]),b=H.useCallback(async()=>{try{await n.validateFields()}catch{return!1}const{envs:D}=n.getFieldsValue(),U=v.filter(N=>N.type==="add"),k=v.filter(N=>N.type==="remove");if(U.length<1&&k.length<1)return S.message.warning("Please choose plugin(s) to deploy or undeploy."),!1;const F=U.length>0?d.jsxs(d.Fragment,{children:["deploy ",d.jsx("b",{children:U.map(N=>`${N.pluginName}@${N.version}`).join(", ")})]}):null,I=k.length>0?d.jsxs(d.Fragment,{children:["undeploy ",d.jsx("b",{children:k.map(N=>N.pluginName).join(", ")})]}):null;return!(!await new Promise(N=>{S.Modal.confirm({title:"Confirm Deployment",okText:"Yes",cancelText:"No",content:d.jsxs(d.Fragment,{children:["Are you sure to ",F,F&&I?" and ":"",I," to ",d.jsxs("b",{children:[" ",D.join(", ")]})," environment of application",d.jsxs("b",{children:[" ",e.name]}),"?"]}),onOk:()=>N(!0),onCancel:()=>N(!1)})})||!await s({deployment:v,appName:e.name,envs:D}))},[e.name,n,s,v]),w=H.useCallback(async()=>{var k;const D=n.getFieldsValue(),U={appName:e.name,envMap:(k=D.envs)==null?void 0:k.reduce((F,I)=>(F[I]=v,F),{})};oe.invoke("museManager.pm.groupDeployModal.form.processPayload",{payload:U,values:D}),await a(U),r.hide(),S.message.success("Group deployment succeeded."),await h()},[e.name,a,n,r,h,v]),$=et.uniq(et.flatten((R=Object.keys((e==null?void 0:e.envs)||{}))==null?void 0:R.map(D=>{var U,k,F;return(F=(k=(U=e==null?void 0:e.envs)==null?void 0:U[D])==null?void 0:k.plugins)==null?void 0:F.map(I=>I.name)}))),A=t.can("create","Request",{type:"deploy-plugin",payload:{appName:e.name,deployments:v}}),M={ability:t,form:n,app:e,setPending:p,setError:g,pending:u,error:f,syncStatus:h,confirmDeployment:b,modal:r,validateDeployment:s,validateDeploymentPending:c,deployPluginPending:o,deployPluginError:i,validateDeploymentError:l},T={columns:1,disabled:u,fields:[{key:"pluginToAdd",label:"Plugins to deploy",widget:pu,widgetProps:{app:e}},{key:"pluginsToRemove",label:"Plugins to undeploy",widget:"select",placeholder:"Select which plugins to undeploy",widgetProps:{mode:"multiple",allowClear:!0},options:$},{key:"envs",label:"Environments",widget:"checkbox-group",options:Object.keys(e.envs),required:!0}]},{watchingFields:P}=Se.extendFormMeta(T,"museManager.pm.groupDeployModal.form",{meta:T,...M}),O=se.useUpdateOnChange(P),j=H.useCallback((...D)=>{O(...D);const U=n.getFieldsValue(),{pluginToAdd:k=[],pluginsToRemove:F=[]}=U;y([...k.map(I=>({pluginName:I.name,version:I.version,type:"add"})),...F.map(I=>({pluginName:I,version:null,type:"remove"}))])},[O,n]),z=[{key:"cancel-btn",props:{disabled:u,children:"Cancel",onClick:r.hide}},{key:"deploy-btn",tooltip:A?"":"No permission to deploy/undeploy some plugins.",props:{type:"primary",disabled:u||!A,children:"Deploy",onClick:async()=>{await b()&&w()}}}];return Se.extendArray(z,"items","museManager.pm.groupDeployModal.footer",{items:z,...M}),d.jsxs(S.Modal,{...K.antdModalV5(r),title:`Group deployment for application : ${e==null?void 0:e.name}`,maskClosable:!1,width:"800px",closable:!u,footer:!1,children:[d.jsx(ie.RequestStatus,{loading:u,error:f}),d.jsx(S.Alert,{message:`With group deployment, you can deploy/undeploy multiple plugins in one release process.
|
|
12
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xt(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Ja.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),a!=null&&(C.isFunction(a)?n.paramsSerializer={serialize:a}:Ja.assertOptions(a,{encode:lt.function,serialize:lt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ja.assertOptions(n,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&C.merge(i.common,i[n.method]);i&&C.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Ze.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,p;if(!l){const h=[Uf.bind(this),void 0];for(h.unshift(...s),h.push(...c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=s.length;let g=n;for(;f<p;){const h=s[f++],v=s[f++];try{g=h(g)}catch(y){v.call(this,y);break}}try{u=Uf.call(this,g)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=Xt(this.defaults,t);const n=cg(t.baseURL,t.url,t.allowAbsoluteUrls);return ig(n,t.params,t.paramsSerializer)}}C.forEach(["delete","get","head","options"],function(t){ui.prototype[t]=function(n,r){return this.request(Xt(r||{},{method:t,url:n,data:(r||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,s){return this.request(Xt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ui.prototype[t]=n(),ui.prototype[t+"Form"]=n(!0)});var Za=ui;class ru{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{r.subscribe(s),i=s}).then(a);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,s){r.reason||(r.reason=new Un(i,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ru(function(a){t=a}),cancel:t}}}var U$=ru;function q$(e){return function(n){return e.apply(null,n)}}function H$(e){return C.isObject(e)&&e.isAxiosError===!0}const zs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zs).forEach(([e,t])=>{zs[t]=e});var V$=zs;function mg(e){const t=new Za(e),n=Wm(Za.prototype.request,t);return C.extend(n,Za.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return mg(Xt(e,a))},n}const Ae=mg(tu);Ae.Axios=Za;Ae.CanceledError=Un;Ae.CancelToken=U$;Ae.isCancel=lg;Ae.VERSION=hg;Ae.toFormData=Ri;Ae.AxiosError=te;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=q$;Ae.isAxiosError=H$;Ae.mergeConfig=Xt;Ae.AxiosHeaders=Ze;Ae.formToJSON=e=>sg(C.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=pg.getAdapter;Ae.HttpStatusCode=V$;Ae.default=Ae;var G$=Ae;const W$=G$;var K$={create({endpoint:e,token:t,axiosConfig:n,interceptors:r={}}){let a=n&&n.headers?n.headers:{},i=W$.create({baseURL:e,timeout:3e4,...n,headers:{authorization:t||"",...a}});const o=async(l,c)=>{var u;try{let f;return typeof FormData<"u"&&c[0]instanceof FormData?f=await i.post(l,c[0],{"Content-Type":"multipart/form-data"}):f=await i.post(l,{args:c}),((u=f.data)==null?void 0:u.data)||f.data}catch(f){throw f&&f.response&&f.response.data&&f.response.data.error?new Error(f.response.data.error):f}},s={set(l,c,u){switch(c){case"interceptors":r=u;break;case"token":i.defaults.headers.common.authorization=u;break;case"baseUrl":e=u,i.defaults.baseURL=u;break;case"headers":Object.assign(i.defaults.headers,u);break;default:l[c]=u;break}return!0},get(l,c,u){if(["_api_path_","apply","call"].includes(c))return l[c]||"";if(c==="_url")return`${e}${u._api_path_||""}`;const f=(u._api_path_||"")+"/"+c,p=f.replace(/\//g,".").replace(/^\./,"");if(r!=null&&r[p])return r[p];const g=async(...h)=>await o(f,h);return g._api_path_=f,new Proxy(g,s)}};return new Proxy({},s)}},X$=K$;const Y$=ke(X$),To=window.MUSE_GLOBAL;var Wh,Kh,Xh,Yh;const Yt=Y$.create({endpoint:((Kh=(Wh=To.pluginVariables)==null?void 0:Wh["@ebay/muse-manager"])==null?void 0:Kh.museApiEndpoint)||((Xh=To.appVariables)==null?void 0:Xh.museApiEndpoint)||"/api/v2",token:(Yh=To.getUser())==null?void 0:Yh.museSession,axiosConfig:{timeout:12e4}}),xe=(...e)=>{const t=pw();return async(...n)=>{const r=S.message.loading("Syncing status...",0);try{await Yt.data.syncCache()}catch(a){console.warn("Failed to sync cache: ",a)}try{await Promise.all(Y.uniq([...e,...n]).map(async a=>await t.refetchQueries({queryKey:["muse-query","data.get",a],exact:!0})))}catch(a){console.error(a),S.message.error("Failed to sync status, please refresh the page to see update.")}r()}};function Nr(e,t){const n=Mn.useLocation(),r=Mn.useSearchParam(e)||t,a=H.useCallback(i=>{const{pathname:o,hash:s,search:l}=n,c=new URLSearchParams(l);c.set(e,i),window.history.pushState({},"",`${o}?${c.toString()}${s}`)},[n,e]);return[r,a]}var Us={exports:{}};const Q$="2.0.0",gg=256,J$=Number.MAX_SAFE_INTEGER||9007199254740991,Z$=16,eS=gg-6,tS=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Li={MAX_LENGTH:gg,MAX_SAFE_COMPONENT_LENGTH:Z$,MAX_SAFE_BUILD_LENGTH:eS,MAX_SAFE_INTEGER:J$,RELEASE_TYPES:tS,SEMVER_SPEC_VERSION:Q$,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Po={};const nS=typeof process=="object"&&Po&&Po.NODE_DEBUG&&/\bsemver\b/i.test(Po.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Ii=nS;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:a}=Li,i=Ii;t=e.exports={};const o=t.re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let f=0;const p="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",a],[p,r]],h=y=>{for(const[b,w]of g)y=y.split(`${b}*`).join(`${b}{0,${w}}`).split(`${b}+`).join(`${b}{1,${w}}`);return y},v=(y,b,w)=>{const $=h(b),A=f++;i(y,A,b),u[y]=A,l[A]=b,c[A]=$,o[A]=new RegExp(b,w?"g":void 0),s[A]=new RegExp($,w?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),v("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${p}+`),v("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),v("FULL",`^${l[u.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),v("LOOSE",`^${l[u.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),v("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),v("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[u.COERCE],!0),v("COERCERTLFULL",l[u.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Us,Us.exports);var Jr=Us.exports;const rS=Object.freeze({loose:!0}),aS=Object.freeze({}),iS=e=>e?typeof e!="object"?rS:e:aS;var au=iS;const Hf=/^[0-9]+$/,vg=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const n=Hf.test(e),r=Hf.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},oS=(e,t)=>vg(t,e);var yg={compareIdentifiers:vg,rcompareIdentifiers:oS};const Ta=Ii,{MAX_LENGTH:Vf,MAX_SAFE_INTEGER:Pa}=Li,{safeRe:ja,t:Ra}=Jr,sS=au,{compareIdentifiers:jo}=yg;let lS=class ct{constructor(t,n){if(n=sS(n),t instanceof ct){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Vf)throw new TypeError(`version is longer than ${Vf} characters`);Ta("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?ja[Ra.LOOSE]:ja[Ra.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>Pa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Pa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Pa||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const i=+a;if(i>=0&&i<Pa)return i}return a}):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(Ta("SemVer.compare",this.version,this.options,t),!(t instanceof ct)){if(typeof t=="string"&&t===this.version)return 0;t=new ct(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ct||(t=new ct(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof ct||(t=new ct(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],a=t.prerelease[n];if(Ta("prerelease compare",n,r,a),r===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(r===void 0)return-1;if(r===a)continue;return jo(r,a)}while(++n)}compareBuild(t){t instanceof ct||(t=new ct(t,this.options));let n=0;do{const r=this.build[n],a=t.build[n];if(Ta("build compare",n,r,a),r===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(r===void 0)return-1;if(r===a)continue;return jo(r,a)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const a=`-${n}`.match(this.options.loose?ja[Ra.PRERELEASELOOSE]:ja[Ra.PRERELEASE]);if(!a||a[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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":{const a=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[a];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let i=[n,a];r===!1&&(i=[n]),jo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Me=lS;const Gf=Me,uS=(e,t,n=!1)=>{if(e instanceof Gf)return e;try{return new Gf(e,t)}catch(r){if(!n)return null;throw r}};var qn=uS;const cS=qn,fS=(e,t)=>{const n=cS(e,t);return n?n.version:null};var bg=fS;const Wf=ke(bg),dS=qn,pS=(e,t)=>{const n=dS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var hS=pS;const Kf=Me,mS=(e,t,n,r,a)=>{typeof n=="string"&&(a=r,r=n,n=void 0);try{return new Kf(e instanceof Kf?e.version:e,n).inc(t,r,a).version}catch{return null}};var gS=mS;const Xf=qn,vS=(e,t)=>{const n=Xf(e,null,!0),r=Xf(t,null,!0),a=n.compare(r);if(a===0)return null;const i=a>0,o=i?n:r,s=i?r:n,l=!!o.prerelease.length;if(!!s.prerelease.length&&!l){if(!s.patch&&!s.minor)return"major";if(s.compareMain(o)===0)return s.minor&&!s.patch?"minor":"patch"}const u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};var xg=vS;const yS=ke(xg),bS=Me,xS=(e,t)=>new bS(e,t).major;var wS=xS;const $S=Me,SS=(e,t)=>new $S(e,t).minor;var ES=SS;const OS=Me,AS=(e,t)=>new OS(e,t).patch;var CS=AS;const kS=qn,_S=(e,t)=>{const n=kS(e,t);return n&&n.prerelease.length?n.prerelease:null};var TS=_S;const Yf=Me,PS=(e,t,n)=>new Yf(e,n).compare(new Yf(t,n));var nt=PS;const jS=nt,RS=(e,t,n)=>jS(t,e,n);var FS=RS;const MS=nt,LS=(e,t)=>MS(e,t,!0);var IS=LS;const Qf=Me,NS=(e,t,n)=>{const r=new Qf(e,n),a=new Qf(t,n);return r.compare(a)||r.compareBuild(a)};var iu=NS;const DS=iu,BS=(e,t)=>e.sort((n,r)=>DS(n,r,t));var zS=BS;const US=iu,qS=(e,t)=>e.sort((n,r)=>US(r,n,t));var HS=qS;const VS=nt,GS=(e,t,n)=>VS(e,t,n)>0;var Ni=GS;const WS=nt,KS=(e,t,n)=>WS(e,t,n)<0;var ou=KS;const XS=nt,YS=(e,t,n)=>XS(e,t,n)===0;var wg=YS;const QS=nt,JS=(e,t,n)=>QS(e,t,n)!==0;var $g=JS;const ZS=nt,eE=(e,t,n)=>ZS(e,t,n)>=0;var su=eE;const tE=nt,nE=(e,t,n)=>tE(e,t,n)<=0;var lu=nE;const rE=wg,aE=$g,iE=Ni,oE=su,sE=ou,lE=lu,uE=(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 rE(e,n,r);case"!=":return aE(e,n,r);case">":return iE(e,n,r);case">=":return oE(e,n,r);case"<":return sE(e,n,r);case"<=":return lE(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var Sg=uE;const cE=Me,fE=qn,{safeRe:Fa,t:Ma}=Jr,dE=(e,t)=>{if(e instanceof cE)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(t.includePrerelease?Fa[Ma.COERCEFULL]:Fa[Ma.COERCE]);else{const l=t.includePrerelease?Fa[Ma.COERCERTLFULL]:Fa[Ma.COERCERTL];let c;for(;(c=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],a=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return fE(`${r}.${a}.${i}${o}${s}`,t)};var pE=dE;class hE{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(t,n)}return this}}var mE=hE,Ro,Jf;function rt(){if(Jf)return Ro;Jf=1;const e=/\s+/g;class t{constructor(F,I){if(I=a(I),F instanceof t)return F.loose===!!I.loose&&F.includePrerelease===!!I.includePrerelease?F:new t(F.raw,I);if(F instanceof i)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=I,this.loose=!!I.loose,this.includePrerelease=!!I.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(N=>this.parseRange(N.trim())).filter(N=>N.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const N=this.set[0];if(this.set=this.set.filter(B=>!v(B[0])),this.set.length===0)this.set=[N];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&y(B[0])){this.set=[B];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const I=this.set[F];for(let N=0;N<I.length;N++)N>0&&(this.formatted+=" "),this.formatted+=I[N].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const N=((this.options.includePrerelease&&g)|(this.options.loose&&h))+":"+F,B=r.get(N);if(B)return B;const q=this.options.loose,V=q?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];F=F.replace(V,D(this.options.includePrerelease)),o("hyphen replace",F),F=F.replace(l[c.COMPARATORTRIM],u),o("comparator trim",F),F=F.replace(l[c.TILDETRIM],f),o("tilde trim",F),F=F.replace(l[c.CARETTRIM],p),o("caret trim",F);let m=F.split(" ").map(ce=>w(ce,this.options)).join(" ").split(/\s+/).map(ce=>R(ce,this.options));q&&(m=m.filter(ce=>(o("loose invalid filter",ce,this.options),!!ce.match(l[c.COMPARATORLOOSE])))),o("range list",m);const X=new Map,ne=m.map(ce=>new i(ce,this.options));for(const ce of ne){if(v(ce))return[ce];X.set(ce.value,ce)}X.size>1&&X.has("")&&X.delete("");const we=[...X.values()];return r.set(N,we),we}intersects(F,I){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(N=>b(N,I)&&F.set.some(B=>b(B,I)&&N.every(q=>B.every(V=>q.intersects(V,I)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new s(F,this.options)}catch{return!1}for(let I=0;I<this.set.length;I++)if(U(this.set[I],F,this.options))return!0;return!1}}Ro=t;const n=mE,r=new n,a=au,i=Di(),o=Ii,s=Me,{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:f,caretTrimReplace:p}=Jr,{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:h}=Li,v=k=>k.value==="<0.0.0-0",y=k=>k.value==="",b=(k,F)=>{let I=!0;const N=k.slice();let B=N.pop();for(;I&&N.length;)I=N.every(q=>B.intersects(q,F)),B=N.pop();return I},w=(k,F)=>(k=k.replace(l[c.BUILD],""),o("comp",k,F),k=T(k,F),o("caret",k),k=A(k,F),o("tildes",k),k=O(k,F),o("xrange",k),k=z(k,F),o("stars",k),k),$=k=>!k||k.toLowerCase()==="x"||k==="*",A=(k,F)=>k.trim().split(/\s+/).map(I=>M(I,F)).join(" "),M=(k,F)=>{const I=F.loose?l[c.TILDELOOSE]:l[c.TILDE];return k.replace(I,(N,B,q,V,m)=>{o("tilde",k,N,B,q,V,m);let X;return $(B)?X="":$(q)?X=`>=${B}.0.0 <${+B+1}.0.0-0`:$(V)?X=`>=${B}.${q}.0 <${B}.${+q+1}.0-0`:m?(o("replaceTilde pr",m),X=`>=${B}.${q}.${V}-${m} <${B}.${+q+1}.0-0`):X=`>=${B}.${q}.${V} <${B}.${+q+1}.0-0`,o("tilde return",X),X})},T=(k,F)=>k.trim().split(/\s+/).map(I=>P(I,F)).join(" "),P=(k,F)=>{o("caret",k,F);const I=F.loose?l[c.CARETLOOSE]:l[c.CARET],N=F.includePrerelease?"-0":"";return k.replace(I,(B,q,V,m,X)=>{o("caret",k,B,q,V,m,X);let ne;return $(q)?ne="":$(V)?ne=`>=${q}.0.0${N} <${+q+1}.0.0-0`:$(m)?q==="0"?ne=`>=${q}.${V}.0${N} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.0${N} <${+q+1}.0.0-0`:X?(o("replaceCaret pr",X),q==="0"?V==="0"?ne=`>=${q}.${V}.${m}-${X} <${q}.${V}.${+m+1}-0`:ne=`>=${q}.${V}.${m}-${X} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.${m}-${X} <${+q+1}.0.0-0`):(o("no pr"),q==="0"?V==="0"?ne=`>=${q}.${V}.${m}${N} <${q}.${V}.${+m+1}-0`:ne=`>=${q}.${V}.${m}${N} <${q}.${+V+1}.0-0`:ne=`>=${q}.${V}.${m} <${+q+1}.0.0-0`),o("caret return",ne),ne})},O=(k,F)=>(o("replaceXRanges",k,F),k.split(/\s+/).map(I=>j(I,F)).join(" ")),j=(k,F)=>{k=k.trim();const I=F.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return k.replace(I,(N,B,q,V,m,X)=>{o("xRange",k,N,B,q,V,m,X);const ne=$(q),we=ne||$(V),ce=we||$(m),he=ce;return B==="="&&he&&(B=""),X=F.includePrerelease?"-0":"",ne?B===">"||B==="<"?N="<0.0.0-0":N="*":B&&he?(we&&(V=0),m=0,B===">"?(B=">=",we?(q=+q+1,V=0,m=0):(V=+V+1,m=0)):B==="<="&&(B="<",we?q=+q+1:V=+V+1),B==="<"&&(X="-0"),N=`${B+q}.${V}.${m}${X}`):we?N=`>=${q}.0.0${X} <${+q+1}.0.0-0`:ce&&(N=`>=${q}.${V}.0${X} <${q}.${+V+1}.0-0`),o("xRange return",N),N})},z=(k,F)=>(o("replaceStars",k,F),k.trim().replace(l[c.STAR],"")),R=(k,F)=>(o("replaceGTE0",k,F),k.trim().replace(l[F.includePrerelease?c.GTE0PRE:c.GTE0],"")),D=k=>(F,I,N,B,q,V,m,X,ne,we,ce,he)=>($(N)?I="":$(B)?I=`>=${N}.0.0${k?"-0":""}`:$(q)?I=`>=${N}.${B}.0${k?"-0":""}`:V?I=`>=${I}`:I=`>=${I}${k?"-0":""}`,$(ne)?X="":$(we)?X=`<${+ne+1}.0.0-0`:$(ce)?X=`<${ne}.${+we+1}.0-0`:he?X=`<=${ne}.${we}.${ce}-${he}`:k?X=`<${ne}.${we}.${+ce+1}-0`:X=`<=${X}`,`${I} ${X}`.trim()),U=(k,F,I)=>{for(let N=0;N<k.length;N++)if(!k[N].test(F))return!1;if(F.prerelease.length&&!I.includePrerelease){for(let N=0;N<k.length;N++)if(o(k[N].semver),k[N].semver!==i.ANY&&k[N].semver.prerelease.length>0){const B=k[N].semver;if(B.major===F.major&&B.minor===F.minor&&B.patch===F.patch)return!0}return!1}return!0};return Ro}var Fo,Zf;function Di(){if(Zf)return Fo;Zf=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,f){if(f=n(f),u instanceof t){if(u.loose===!!f.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,f),this.options=f,this.loose=!!f.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const f=this.options.loose?r[a.COMPARATORLOOSE]:r[a.COMPARATOR],p=u.match(f);if(!p)throw new TypeError(`Invalid comparator: ${u}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new s(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new s(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,f){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,f).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,f).test(u.semver):(f=n(f),f.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!f.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,f)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,f)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Fo=t;const n=au,{safeRe:r,t:a}=Jr,i=Sg,o=Ii,s=Me,l=rt();return Fo}const gE=rt(),vE=(e,t,n)=>{try{t=new gE(t,n)}catch{return!1}return t.test(e)};var Zr=vE;const yE=rt(),bE=(e,t)=>new yE(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var xE=bE;const wE=Me,$E=rt(),SE=(e,t,n)=>{let r=null,a=null,i=null;try{i=new $E(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||a.compare(o)===-1)&&(r=o,a=new wE(r,n))}),r};var EE=SE;const OE=Me,AE=rt(),CE=(e,t,n)=>{let r=null,a=null,i=null;try{i=new AE(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||a.compare(o)===1)&&(r=o,a=new OE(r,n))}),r};var kE=CE;const Mo=Me,_E=rt(),ed=Ni,TE=(e,t)=>{e=new _E(e,t);let n=new Mo("0.0.0");if(e.test(n)||(n=new Mo("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const a=e.set[r];let i=null;a.forEach(o=>{const s=new Mo(o.semver.version);switch(o.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!i||ed(s,i))&&(i=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||ed(n,i))&&(n=i)}return n&&e.test(n)?n:null};var PE=TE;const jE=rt(),RE=(e,t)=>{try{return new jE(e,t).range||"*"}catch{return null}};var FE=RE;const ME=Me,Eg=Di(),{ANY:LE}=Eg,IE=rt(),NE=Zr,td=Ni,nd=ou,DE=lu,BE=su,zE=(e,t,n,r)=>{e=new ME(e,r),t=new IE(t,r);let a,i,o,s,l;switch(n){case">":a=td,i=DE,o=nd,s=">",l=">=";break;case"<":a=nd,i=BE,o=td,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(NE(e,t,r))return!1;for(let c=0;c<t.set.length;++c){const u=t.set[c];let f=null,p=null;if(u.forEach(g=>{g.semver===LE&&(g=new Eg(">=0.0.0")),f=f||g,p=p||g,a(g.semver,f.semver,r)?f=g:o(g.semver,p.semver,r)&&(p=g)}),f.operator===s||f.operator===l||(!p.operator||p.operator===s)&&i(e,p.semver))return!1;if(p.operator===l&&o(e,p.semver))return!1}return!0};var uu=zE;const UE=uu,qE=(e,t,n)=>UE(e,t,">",n);var HE=qE;const VE=uu,GE=(e,t,n)=>VE(e,t,"<",n);var WE=GE;const rd=rt(),KE=(e,t,n)=>(e=new rd(e,n),t=new rd(t,n),e.intersects(t,n));var XE=KE;const YE=Zr,QE=nt;var JE=(e,t,n)=>{const r=[];let a=null,i=null;const o=e.sort((u,f)=>QE(u,f,n));for(const u of o)YE(u,t,n)?(i=u,a||(a=u)):(i&&r.push([a,i]),i=null,a=null);a&&r.push([a,null]);const s=[];for(const[u,f]of r)u===f?s.push(u):!f&&u===o[0]?s.push("*"):f?u===o[0]?s.push(`<=${f}`):s.push(`${u} - ${f}`):s.push(`>=${u}`);const l=s.join(" || "),c=typeof t.raw=="string"?t.raw:String(t);return l.length<c.length?l:t};const ad=rt(),cu=Di(),{ANY:Lo}=cu,lr=Zr,fu=nt,ZE=(e,t,n={})=>{if(e===t)return!0;e=new ad(e,n),t=new ad(t,n);let r=!1;e:for(const a of e.set){for(const i of t.set){const o=tO(a,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},eO=[new cu(">=0.0.0-0")],id=[new cu(">=0.0.0")],tO=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Lo){if(t.length===1&&t[0].semver===Lo)return!0;n.includePrerelease?e=eO:e=id}if(t.length===1&&t[0].semver===Lo){if(n.includePrerelease)return!0;t=id}const r=new Set;let a,i;for(const g of e)g.operator===">"||g.operator===">="?a=od(a,g,n):g.operator==="<"||g.operator==="<="?i=sd(i,g,n):r.add(g.semver);if(r.size>1)return null;let o;if(a&&i){if(o=fu(a.semver,i.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||i.operator!=="<="))return null}for(const g of r){if(a&&!lr(g,String(a),n)||i&&!lr(g,String(i),n))return null;for(const h of t)if(!lr(g,String(h),n))return!1;return!0}let s,l,c,u,f=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,p=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(const g of t){if(u=u||g.operator===">"||g.operator===">=",c=c||g.operator==="<"||g.operator==="<=",a){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator===">"||g.operator===">="){if(s=od(a,g,n),s===g&&s!==a)return!1}else if(a.operator===">="&&!lr(a.semver,String(g),n))return!1}if(i){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(l=sd(i,g,n),l===g&&l!==i)return!1}else if(i.operator==="<="&&!lr(i.semver,String(g),n))return!1}if(!g.operator&&(i||a)&&o!==0)return!1}return!(a&&c&&!i&&o!==0||i&&u&&!a&&o!==0||p||f)},od=(e,t,n)=>{if(!e)return t;const r=fu(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},sd=(e,t,n)=>{if(!e)return t;const r=fu(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var nO=ZE;const Io=Jr,ld=Li,rO=Me,ud=yg,aO=qn,iO=bg,oO=hS,sO=gS,lO=xg,uO=wS,cO=ES,fO=CS,dO=TS,pO=nt,hO=FS,mO=IS,gO=iu,vO=zS,yO=HS,bO=Ni,xO=ou,wO=wg,$O=$g,SO=su,EO=lu,OO=Sg,AO=pE,CO=Di(),kO=rt(),_O=Zr,TO=xE,PO=EE,jO=kE,RO=PE,FO=FE,MO=uu,LO=HE,IO=WE,NO=XE,DO=JE,BO=nO;var zO={parse:aO,valid:iO,clean:oO,inc:sO,diff:lO,major:uO,minor:cO,patch:fO,prerelease:dO,compare:pO,rcompare:hO,compareLoose:mO,compareBuild:gO,sort:vO,rsort:yO,gt:bO,lt:xO,eq:wO,neq:$O,gte:SO,lte:EO,cmp:OO,coerce:AO,Comparator:CO,Range:kO,satisfies:_O,toComparators:TO,maxSatisfying:PO,minSatisfying:jO,minVersion:RO,validRange:FO,outside:MO,gtr:LO,ltr:IO,intersects:NO,simplifyRange:DO,subset:BO,SemVer:rO,re:Io.re,src:Io.src,tokens:Io.t,SEMVER_SPEC_VERSION:ld.SEMVER_SPEC_VERSION,RELEASE_TYPES:ld.RELEASE_TYPES,compareIdentifiers:ud.compareIdentifiers,rcompareIdentifiers:ud.rcompareIdentifiers};const UO=ke(zO);function qO({value:e="1.0.0",onChange:t,baseVersion:n="1.0.0"}){const[r,a]=H.useState("patch"),i=o=>{const s=o.target.value;a(s),s!=="custom"&&t(UO.inc(n,s))};return d.jsxs("div",{style:{marginTop:5},children:[d.jsxs(S.Radio.Group,{onChange:i,defaultValue:"patch",children:[d.jsx(S.Radio,{value:"patch",children:"Patch"}),d.jsx(S.Radio,{value:"minor",children:"Minor"}),d.jsx(S.Radio,{value:"major",children:"Major"}),d.jsx(S.Radio,{value:"custom",children:"Custom"})]}),d.jsx(S.Input,{disabled:r!=="custom",style:{marginTop:10},value:e,onChange:o=>t(o.target.value)})]})}const HO=MUSE_GLOBAL.__shared__.require("@ebay/muse-lib-antd@1.3.2/src/utils.js");var Oe=HO;const Se=ke(Oe);function du({value:e,onChange:t,plugin:n,app:r,filter:a,...i}){let{data:o,error:s,isLoading:l}=St(`muse.plugin-releases.${n==null?void 0:n.name}`);return n?VO({value:e,onChange:t,plugin:n,app:r,filter:a,releases:o,error:s,loading:l,...i}):d.jsx("div",{className:"plugin-manager_home-plugin-release-select",children:d.jsx(S.Select,{value:e,placeholder:"Select a version to deploy",onChange:t,...i,popupMatchSelectWidth:!1,disabled:!0})})}function VO({value:e,onChange:t,plugin:n,app:r,filter:a,releases:i,error:o,loading:s,...l}){if(o)return"Failed, please refresh to retry.";a&&i&&(i=i.filter(a));const c=i?i.map(u=>{const f=[];return r&&Object.entries(r.envs).forEach(([p,g])=>{var h;(h=g.plugins)!=null&&h.find(v=>v.name===n.name&&v.version===u.version)&&f.push(d.jsx(S.Tooltip,{title:`Already on ${p}`,children:d.jsx(S.Tag,{color:p==="production"?"green":"orange",style:{verticalAlign:"middle",lineHeight:"20px"},children:p})},p))}),{key:u.version,value:u.version.startsWith("v")?u.version.substring(1):u.version,label:d.jsxs(d.Fragment,{children:[d.jsx("span",{style:{marginRight:"15px",verticalAlign:"middle"},children:u.version}),f,d.jsxs("span",{style:{color:"#999",marginLeft:"5px",verticalAlign:"middle"},children:[u.branch&&d.jsxs(d.Fragment,{children:["built from"," ",d.jsx(S.Tag,{children:/^[0-9a-f]{40}$/.test(u.branch)?u.branch.substring(0,6):u.branch||"unknown"})]}),"by ",u.createdBy," ",d.jsx(wt,{date:new Date(u.createdAt)})]})]})}}):[];return Oe.extendArray(c,"options","museManager.pm.pluginReleaseSelect",{options:c,plugin:n,app:r}),d.jsx("div",{className:"plugin-manager_home-plugin-release-select",children:d.jsx(S.Select,{value:e,placeholder:"Select a version to deploy",onChange:t,...l,popupMatchSelectWidth:!1,disabled:s,loading:s,options:c})})}const GO={null:"#8bc34a",patch:"#ffc107",minor:"#9c27b0",major:"#e53935"};function Og(e){let t=[{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#8bc34a]"}),"Up to date"]}),key:"null"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#ffc107]"}),"Patch update"]}),key:"patch"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#9c27b0]"}),"Minor update"]}),key:"minor"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded-md mr-2 bg-[#e53935]"}),"Major update"]}),key:"major"},{label:d.jsxs("span",{children:[d.jsx("span",{className:"inline-block w-3 h-3 rounded mr-2 bg-[#26c6da]"}),"Core plugin"]}),key:"core"}];t.push(...et.flatten(oe.invoke("museManager.pm.pluginList.getEnvFilters",{...e}))),oe.invoke("museManager.pm.pluginList.processEnvFilters",{items:t,...e}),t=t.filter(Boolean),oe.sort(t);const n={label:d.jsx("p",{className:"text-center border-0 border-t border-[#f0f0f0] border-solid py-1 mb-0",children:"Clear"}),key:"clear"};return d.jsx("div",{className:"plugin-manager_home-env-filter-menu",children:d.jsx(S.Menu,{items:[...t,n],...e})})}const WO=MUSE_GLOBAL.__shared__.require("@ant-design/icons@5.3.7/es/index.js");var Re=WO;const KO=ke(Re),XO=()=>d.jsx("svg",{viewBox:"0 0 1024 1024",width:"20",height:"20",children:d.jsx("path",{d:"M299.612074 246.517593q-7.579926 7.579926-18.959815 7.579926t-18.959815-7.579926l-70.799308-72.059297q-20.219803-17.699827 0-37.929629 17.699827-17.699827 37.929629 0l70.789309 72.059296q17.699827 17.699827 0 37.92963z m222.507827-100.509019q-7.589926 8.21992-18.969815 8.21992-11.379889 0-19.599808-8.21992-8.20992-8.20992-8.20992-19.589809V26.549741q0-11.379889 8.20992-18.959815 8.21992-7.579926 19.599808-7.579926t18.969815 7.579926q7.589926 7.579926 7.589926 18.959815v99.869024q0 11.379889-7.589926 19.589809z m-332.486753 273.697327q11.379889 0 18.969815 8.21992 7.589926 8.21992 7.589926 18.329821 0 11.379889-7.589926 19.599809-7.589926 8.20992-18.969815 8.209919H89.764123q-11.379889 0-19.599808-8.209919-8.20992-8.21992-8.20992-19.599809 0-10.109901 8.20992-18.329821 8.21992-8.21992 19.599808-8.21992h99.869025zM554.97958 970.890519q11.379889 0 18.959815 7.589926 7.589926 7.589926 7.589926 18.969814 0 11.379889-7.589926 18.959815-7.579926 7.589926-18.959815 7.589926h-91.019111q-10.109901 0-18.329821-7.589926-8.21992-7.579926-8.21992-18.959815t8.21992-18.969814q8.21992-7.589926 18.329821-7.589926h91.019111z m270.537358-848.261717q8.849914 7.579926 8.849914 18.959815t-8.849914 18.959815l-70.789308 70.799309q-8.849914 8.849914-18.969815 8.849913t-18.969815-8.849913q-7.589926-7.589926-7.589926-18.969815 0-11.379889 7.589926-18.969815l70.799309-70.789308q20.219803-20.229802 37.919629 0z m108.718939 295.817112q11.379889 0 19.599808 7.579926 8.20992 7.589926 8.20992 18.969814 0 11.379889-8.20992 18.969815-8.21992 7.579926-19.599808 7.579926h-99.869025q-11.379889 0-18.969815-7.579926-7.579926-7.589926-7.579926-18.969815 0-11.379889 7.579926-18.969814 7.589926-7.579926 18.969815-7.579926h99.869025zM606.809074 864.701556q10.119901 0 18.339821 7.589926 8.21992 7.579926 8.21992 18.959814t-8.21992 18.959815q-8.21992 7.589926-18.339821 7.589926H413.390963q-11.379889 0-19.599809-7.589926-8.20992-7.579926-8.209919-18.959815t8.209919-18.959814q8.21992-7.589926 19.599809-7.589926h193.418111zM361.561469 279.387272q73.319284-63.209383 171.298327-54.989463 97.979043 8.21992 159.918439 82.799191 54.359469 61.949395 56.889444 150.438531 0 99.869025-69.529321 166.86837-49.309518 50.569506-46.779543 123.88879v39.199618q0 10.109901-7.579926 18.319821-7.589926 8.21992-18.969815 8.219919H413.390963q-11.379889 0-18.969815-8.219919-7.579926-8.20992-7.579926-18.319821v-85.969161q2.529975-55.629457-45.509555-84.699173-2.529975-1.269988-6.319939-5.05995-63.209383-75.849259-55.629456-171.928321 7.589926-96.079062 82.179197-160.548432z m280.647259 307.197q53.099481-51.829494 53.099482-127.688753-1.269988-68.259333-44.249568-116.298865-48.039531-58.159432-122.628802-63.849376-74.579272-5.689944-131.468717 42.359586-56.889444 49.299519-63.209382 123.88879t42.97958 132.738704q3.789963 3.789963 17.059833 18.959815 13.27987 15.169852 30.339704 45.509555 17.059833 30.339704 17.059833 54.35947v60.679407l136.538667 1.269988V699.093173q0-16.42984 3.789963-30.969698t12.639877-27.809728q8.849914-13.27987 13.909864-19.599809 5.059951-6.319938 18.329821-18.959815t15.799846-15.169851z"})});function Bi(e){return d.jsx(KO,{component:XO,"aria-label":"lighton-icon",...e})}Bi.propTypes={};Bi.defaultProps={};const{Option:YO}=S.Select;function pu({value:e,onChange:t,app:n}){const[r,a]=H.useState(!0),{data:i}=$t("muse.plugins"),{data:o}=$t("muse.plugins.latest-releases"),s=[...e||[]];r&&s.push({});const l=Y.keyBy(i,"name"),c=(h,v)=>{v===s.length-1&&a(!1);const y=o[h]&&o[h].version,b=Y.cloneDeep(s);b[v].name=h,b[v].version=y?y.startsWith("v")?y.substring(1):y:void 0,t(b.filter(w=>w.name))},u=(h,v)=>{const y=Y.cloneDeep(s);y[v].version=h,t(y.filter(b=>b.name))},f=H.useCallback(()=>{if(!e||e.some(h=>!h.name||!h.version)){S.message.warning("Select plugin/version first.");return}a(!0)},[a,e]),p=h=>{const v=Y.cloneDeep(s);v.splice(h,1),t(v.filter(y=>y.name))},g=i==null?void 0:i.filter(h=>(o==null?void 0:o[h==null?void 0:h.name])&&!Y.find(s,{name:h.name}));return g==null||g.sort((h,v)=>h.name.localeCompare(v.name)),d.jsxs("div",{className:"plugin-manager_home-plugins-select",children:[s.map((h,v)=>{const y=h.name?l[h.name]:null;return d.jsxs(S.Row,{gutter:10,className:"leading-10",children:[d.jsx(S.Col,{span:"12",children:d.jsx(S.Select,{showSearch:!0,popupMatchSelectWidth:!1,placeholder:"Select a plugin",value:h.name,onChange:b=>c(b,v),children:g==null?void 0:g.map(b=>d.jsx(YO,{value:b.name,children:b.name},b.name))})}),d.jsx(S.Col,{span:"10",children:d.jsx(du,{app:n,plugin:y,placeholder:"Select a version",value:h.version,onChange:b=>u(b,v),disabled:!h.name})}),d.jsx(S.Col,{span:2,style:{textAlign:"right"},children:h.name&&d.jsx(Re.MinusCircleOutlined,{style:{color:"#ff4d4f"},onClick:()=>p(v)})})]},v)}),(g==null?void 0:g.length)>0&&d.jsxs(S.Button,{type:"link",onClick:f,children:[d.jsx(Re.PlusOutlined,{})," Add"]})]})}const QO=MUSE_GLOBAL.__shared__.require("@ebay/nice-form-react@2.0.3/lib/esm/index.js");var JO=QO;const se=ke(JO),hu=({item:e})=>{let t=e.content||d.jsx(S.Button,{...e.props});return e.tooltip&&(t=d.jsx(S.Tooltip,{title:e.tooltip,children:d.jsx("span",{children:t})})),e.position!=="left"?t=d.jsx("span",{className:"justify-self-end",children:t}):t=d.jsx("span",{children:t}),t};function Hn({okText:e,cancelText:t,onOk:n,onCancel:r,okButtonProps:a,cancelButtonProps:i,items:o,...s}){o||(o=[{key:"cancel-btn",order:10,props:{children:t||"Cancel",onClick:r,...i}},{key:"ok-btn",order:20,props:{children:e||"Ok",onClick:n,type:"primary",...a}}]);const l=o.filter(p=>p.position==="left"),c=o.filter(p=>p.position!=="left"),u=[];l.length>0?u.push(l.length-1,"1fr",c.length):c.length>0&&u.push("1fr",c.length-1);const f=u.filter(Boolean).map(p=>p==="1fr"?"1fr":`repeat(${p}, auto)`).join(" ");return d.jsx("div",{className:"grid gap-2 mt-5",style:{gridTemplateColumns:f},children:[...l,...c].map(p=>d.jsx(hu,{item:p},p.key))})}const Ag=Q.create(({app:e})=>{var R;const t=_e(),[n]=S.Form.useForm(),r=K.useModal(),{mutateAsync:a,error:i,isLoading:o}=be("pm.deployPlugin"),{validateDeployment:s,validateDeploymentError:l,validateDeploymentPending:c}=zi(),{pending:u,error:f,setPending:p,setError:g}=ea([o,c],[l,i]),h=xe(`muse.app.${e.name}`),[v,y]=H.useState([]),b=H.useCallback(async()=>{try{await n.validateFields()}catch{return!1}const{envs:D}=n.getFieldsValue(),U=v.filter(N=>N.type==="add"),k=v.filter(N=>N.type==="remove");if(U.length<1&&k.length<1)return S.message.warning("Please choose plugin(s) to deploy or undeploy."),!1;const F=U.length>0?d.jsxs(d.Fragment,{children:["deploy ",d.jsx("b",{children:U.map(N=>`${N.pluginName}@${N.version}`).join(", ")})]}):null,I=k.length>0?d.jsxs(d.Fragment,{children:["undeploy ",d.jsx("b",{children:k.map(N=>N.pluginName).join(", ")})]}):null;return!(!await new Promise(N=>{S.Modal.confirm({title:"Confirm Deployment",okText:"Yes",cancelText:"No",content:d.jsxs(d.Fragment,{children:["Are you sure to ",F,F&&I?" and ":"",I," to ",d.jsxs("b",{children:[" ",D.join(", ")]})," environment of application",d.jsxs("b",{children:[" ",e.name]}),"?"]}),onOk:()=>N(!0),onCancel:()=>N(!1)})})||!await s({deployment:v,appName:e.name,envs:D}))},[e.name,n,s,v]),w=H.useCallback(async()=>{var k;const D=n.getFieldsValue(),U={appName:e.name,envMap:(k=D.envs)==null?void 0:k.reduce((F,I)=>(F[I]=v,F),{})};oe.invoke("museManager.pm.groupDeployModal.form.processPayload",{payload:U,values:D}),await a(U),r.hide(),S.message.success("Group deployment succeeded."),await h()},[e.name,a,n,r,h,v]),$=et.uniq(et.flatten((R=Object.keys((e==null?void 0:e.envs)||{}))==null?void 0:R.map(D=>{var U,k,F;return(F=(k=(U=e==null?void 0:e.envs)==null?void 0:U[D])==null?void 0:k.plugins)==null?void 0:F.map(I=>I.name)}))),A=t.can("create","Request",{type:"deploy-plugin",payload:{appName:e.name,deployments:v}}),M={ability:t,form:n,app:e,setPending:p,setError:g,pending:u,error:f,syncStatus:h,confirmDeployment:b,modal:r,validateDeployment:s,validateDeploymentPending:c,deployPluginPending:o,deployPluginError:i,validateDeploymentError:l},T={columns:1,disabled:u,fields:[{key:"pluginToAdd",label:"Plugins to deploy",widget:pu,widgetProps:{app:e}},{key:"pluginsToRemove",label:"Plugins to undeploy",widget:"select",placeholder:"Select which plugins to undeploy",widgetProps:{mode:"multiple",allowClear:!0},options:$},{key:"envs",label:"Environments",widget:"checkbox-group",options:Object.keys(e.envs),required:!0}]},{watchingFields:P}=Se.extendFormMeta(T,"museManager.pm.groupDeployModal.form",{meta:T,...M}),O=se.useUpdateOnChange(P),j=H.useCallback((...D)=>{O(...D);const U=n.getFieldsValue(),{pluginToAdd:k=[],pluginsToRemove:F=[]}=U;y([...k.map(I=>({pluginName:I.name,version:I.version,type:"add"})),...F.map(I=>({pluginName:I,version:null,type:"remove"}))])},[O,n]),z=[{key:"cancel-btn",props:{disabled:u,children:"Cancel",onClick:r.hide}},{key:"deploy-btn",tooltip:A?"":"No permission to deploy/undeploy some plugins.",props:{type:"primary",disabled:u||!A,children:"Deploy",onClick:async()=>{await b()&&w()}}}];return Se.extendArray(z,"items","museManager.pm.groupDeployModal.footer",{items:z,...M}),d.jsxs(S.Modal,{...K.antdModalV5(r),title:`Group deployment for application : ${e==null?void 0:e.name}`,maskClosable:!1,width:"800px",closable:!u,footer:!1,children:[d.jsx(ie.RequestStatus,{loading:u,error:f}),d.jsx(S.Alert,{message:`With group deployment, you can deploy/undeploy multiple plugins in one release process.
|
|
13
13
|
Note only app owners can undeploy plugins.`,type:"info",className:"mb-5"}),d.jsx(S.Form,{layout:"horizontal",form:n,onValuesChange:j,children:d.jsx(se,{meta:T})}),d.jsx(Hn,{items:z})]})});function Dn({items:e=[],extName:t="items",extBase:n,extArgs:r}){e=e.filter(Boolean),Oe.extendArray(e,t,n,r);const a=[];return e.filter(Boolean).forEach(i=>{let o;i.render?o=i.render():i.node?o=i.node:i.component&&(o=d.jsx(i.component,{...i.props},i.key)),a.push(o)}),a}const ZO=({message:e,state:t,...n})=>{const r={failure:"error",success:"success",pending:"processing",running:"processing",waiting:"cyan"}[t],a={pending:d.jsx(Re.Loading3QuartersOutlined,{spin:!0}),running:d.jsx(Re.Loading3QuartersOutlined,{spin:!0}),waiting:d.jsx(Re.ClockCircleOutlined,{})}[t]||null;return d.jsx(S.Tag,{color:r,style:{cursor:"pointer"},icon:a,...n,children:e})},cd={failure:1,pending:2,running:3,waiting:4,success:5};function Cg({plugin:e,app:t}){const{data:n=[]}=St({interval:1e4},"muse.requests"),r=n==null?void 0:n.filter(a=>{var i;return((i=a==null?void 0:a.payload)==null?void 0:i.pluginName)===e.name||oe.invoke("museManager.pm.pluginStatus.relatedToPlugin",{plugin:e,app:t,request:a}).some(o=>o)}).map((a,i)=>{var u,f,p;a=Y.clone(a),oe.invoke("museManager.pm.pluginStatus.processRequest",{request:a,app:t,plugin:e});const o=a.statuses||[];o.sort((g,h)=>(cd[g.state]||1e3)-(cd[h.state]||1e3));const s=((u=a.status)==null?void 0:u.message)||`${a.type}: ${o==null?void 0:o.map(g=>g.message||g.name+" "+g.state).join(", ")}.`,l=((f=a.status)==null?void 0:f.state)||((p=o[0])==null?void 0:p.state),c={message:s,state:l,onClick:()=>Q.show("muse-manager.request-detail-modal",{requestId:a.id})};return{order:i*10+10,node:d.jsx(ZO,{...c},a.id)}});return d.jsx("div",{className:"grid gap-1 justify-items-start",children:d.jsx(Dn,{items:r,extBase:"museManager.pm.pluginStatus",extArgs:{items:r,plugin:e,app:t,requests:n}})})}const kg=({app:e,plugin:t})=>{var r,a,i,o;if(!t)return null;const n=[];return e&&((a=(r=e.pluginConfig)==null?void 0:r[t.name])!=null&&a.core||t.type!=="normal")&&n.push({order:10,node:d.jsx("span",{className:"plugin-badge-core",title:"Core plugin, it will be always loaded for local development.",children:"C"},"core")}),e&&!Y.isEmpty((o=(i=e.pluginConfig)==null?void 0:i[t.name])==null?void 0:o.allowlist)&&n.push({order:20,node:d.jsx("span",{className:"plugin-badge-allowlist",title:"Allowlist defined.",children:"A"},"allowlist")}),Oe.extendArray(n,"nodes","museManager.pm.pluginList.pluginBadges",{app:e,plugin:t,nodes:n}),d.jsx("span",{className:"muse-manager_pm-plugin-badges",children:n.filter(Boolean).map(s=>s.node)})},eA=Object.freeze(Object.defineProperty({__proto__:null,EnvFilterMenu:Og,GroupDeployModal:Ag,LightOnIcon:Bi,MultiPluginSelector:pu,PluginBadges:kg,PluginReleaseSelect:du,PluginStatus:Cg,VersionSelect:qO},Symbol.toStringTag,{value:"Module"}));function _g(e={}){const[t,n]=H.useState(e.envFilterMap||{}),[r,a]=H.useState({}),i=H.useCallback((l,{key:c})=>{n({...t,[l]:c==="clear"?null:c}),a({...r,[l]:!1})},[t,r]),o=H.useCallback((l,c)=>{a({...r,[l]:c})},[r]);return{getEnvFilterConfig:H.useCallback(l=>({filterDropdown:d.jsx(Og,{selectedKeys:[t[l]],onSelect:c=>i(l,c)}),filterIcon:d.jsx(Re.FilterOutlined,{style:{color:t[l]?"#1890ff":"#aaa"}}),filterDropdownOpen:r[l],onFilterDropdownOpenChange:c=>o(l,c)}),[r,t,i,o]),envFilterMap:t,setEnvFilterMap:n}}function zi(){const[e,t]=H.useState(!1),[n,r]=H.useState(null);return{validateDeployment:H.useCallback(async({deployment:i,appName:o,envs:s})=>{const l={};S.message.loading({key:"validate-deployment-msg",content:"Validating deployment...",duration:0}),t(!0),r(null);try{await Promise.all(s.map(async f=>{l[f]=null;const p=await Yt.analyzer.validateDeployment({appName:o,envName:f,deployment:i});l[f]=p}))}catch(f){return console.error(f),S.Modal.error({title:"Error",content:"Failed to validate deployment, please retry."}),r(f),!1}finally{S.message.destroy("validate-deployment-msg"),t(!1)}const c=Object.values(l).every(f=>f.success);let u=c;return c||(u=await Q.show("muse-manager.validation-result-modal",{result:l})),u},[]),validateDeploymentPending:e,validateDeploymentError:n}}function ea(e=[],t=[]){const[n,r]=H.useState({}),[a,i]=H.useState({}),o=H.useMemo(()=>Object.values(n).some(Boolean),[n])||e.some(u=>!!u),s=H.useMemo(()=>Object.values(a).filter(Boolean)[0]||null,[a])||t.filter(Boolean)[0]||null,l=H.useCallback((u,f)=>r(p=>({...p,[u]:f})),[]),c=H.useCallback((u,f)=>i(p=>({...p,[u]:f})),[]);return{setPending:l,setError:c,pending:o,error:s}}function tA(e,t){const n=oe.invoke("!"+e,t),[r,a]=H.useState([]),i=H.useCallback(o=>{a(Y.flatten([...r,o]))},[r]);return{extNode:d.jsx(d.Fragment,{children:n.map((o,s)=>d.jsx(o,{callback:i,...t},s))}),values:r}}function mu(e,...t){let n={};return et.isObject(e)&&(n=e,e=t.shift()),dw({queryKey:["muse-query",e,...t],queryFn:()=>et.invoke(Yt,e,...t),retry:0,refetchOnWindowFocus:!1,...n})}function $t(e,t){let n={};return et.isObject(e)&&(n=e,e=t),mu(n,"data.get",e)}function Tg(e,...t){let n={};return et.isObject(e)&&(n=e,e=t.shift()),n.refetchInterval||(n.refetchInterval=1e4),mu(n,e,...t)}function St(...e){return et.isObject(e[0])?e.splice(1,0,"data.get"):e.unshift("data.get"),Tg(...e)}function be(e){return fw({mutationFn:n=>n._museParams?et.invoke(Yt,e,...n._museParams):et.invoke(Yt,e,n)})}const nA=Object.freeze(Object.defineProperty({__proto__:null,useAbility:_e,useEnvFilter:_g,useExtPoint:tA,useMuseData:$t,useMuseMutation:be,useMuseQuery:mu,usePendingError:ea,usePollingMuseData:St,usePollingMuseQuery:Tg,useSearchState:Nr,useSyncStatus:xe,useValidateDeployment:zi},Symbol.toStringTag,{value:"Module"})),rA=({app:e,plugin:t})=>Object.values(e.envs||{}).some(n=>{var r;return(r=n.plugins)==null?void 0:r.some(a=>a.name===t.name)});function aA({plugin:e,app:t}){const{mutateAsync:n}=be("pm.deletePlugin"),r=xe("muse.plugins"),a=_e(),{data:i}=$t("muse.apps"),o=Y.keyBy(i||[],"name"),s=a.can("delete","Plugin",{plugin:e,app:e.app&&(o==null?void 0:o[e.app])});let l=H.useMemo(()=>[t&&{key:"deploy",label:"Deploy",order:30,icon:"rocket",disabled:a.cannot("deploy","App",t),disabledText:"No permission to deploy.",highlight:!0,onClick:()=>{Q.show("muse-manager.deploy-plugin-modal",{plugin:e,app:t})}},t&&{key:"config",label:"Config",order:40,icon:"setting",disabled:a.cannot("config","Plugin",{app:t,plugin:e}),disabledText:"Only app or plugin owners can config plugins.",highlight:!0,onClick:()=>{Q.show("muse-manager.plugin-config-modal",{plugin:e,app:t})}},{key:"releaseList",label:"Releases",order:55,icon:"bars",highlight:!0,onClick:()=>{Q.show("muse-manager.releases-drawer",{plugin:e,app:t})}},t&&rA({app:t,plugin:e})&&{key:"undeploy",label:"Undeploy",order:68,icon:"minus-circle",disabled:a.cannot("deploy","App",t),disabledText:"No permissin to undeploy.",highlight:!1,onClick:()=>{Q.show("muse-manager.undeploy-plugin-modal",{plugin:e,app:t})}},{key:"delete",label:"Delete Plugin",disabled:!s,disabledText:"Only plugin owners can delete the plugin",order:70,icon:"delete",menuItemProps:{style:{color:s?"#ff4d4f":""}},highlight:!1,onClick:async()=>{S.Modal.confirm({title:"Confirm Delete",content:d.jsxs(d.Fragment,{children:["Are you sure to delete the plugin ",d.jsx("b",{children:e.name}),"?"]}),onOk:()=>{(async()=>{const c=S.message.loading(`Deleting plugin ${e.name}...`,0);return n({pluginName:e.name}).then(async u=>{c(),S.Modal.success({title:"Success",content:"Delete plugin from registry succeeded. Note that you need to delete the plugin repo yourself."}),await r()}).catch(u=>{c(),S.Modal.error({title:"Failed to Delete",content:u.config&&u.request&&u.response&&u.response.data||String(u)})})})()}})}}].filter(Boolean),[r,t,e,n,s,a]);return Oe.extendArray(l,"actions","museManager.pm.pluginList",{app:t,plugin:e,ability:a,actions:l,appByName:o}),l=l.filter(Boolean),d.jsx(ie.DropdownMenu,{items:l})}const{Search:iA}=S.Input;function Pg({searchKey:e="search",onSearch:t,onChange:n,...r}){const[a,i]=Nr(e),o=H.useCallback(l=>{i(l)},[i]),s=l=>{o(l.target.value)};return d.jsx(iA,{onSearch:o,onChange:s,value:a,...r})}const Dr={defaultValues:{pluginListDefaultScope:"all",pluginListDefaultEnv:"all",appListDefaultScope:"all"},__initialized:!1,ensureInit(){if(this.__initialized)return;const e=t=>Object.assign(this.defaultValues,t);oe.invoke("museManager.setConfig",e),this.__initialized=!0},get(e){return this.ensureInit(),this.defaultValues[e]}};function oA({app:e}){const t=_e(),[n,r]=Nr("scope",e?"deployed":Dr.get("pluginListDefaultScope")),[a,i]=Nr("env",Dr.get("pluginListDefaultEnv"));let o=[e&&{key:"env",highlight:!0,render:()=>{const s=Object.keys(e.envs||{}).map(c=>({value:c,label:c})),l=[{value:"all",label:"All Environments"}].concat(s);return d.jsx(S.Select,{value:a,onChange:i,style:{width:"160px",textAlign:"left",marginRight:"8px"},popupMatchSelectWidth:!1,options:l},"envSelect")}},{key:"scope",highlight:!0,render:()=>{const s=[{key:"all",label:"All Plugins",onClick:()=>r("all"),order:100}];return e&&s.push({key:"deployed",label:"Deployed Plugins",order:50,onClick:()=>r("deployed")}),s.push(...Y.flatten(oe.invoke("museManager.pluginListBar.getScopes",{setScope:r,scope:n}))),oe.sort(s),s.length>1?d.jsx(S.Radio.Group,{value:n,children:s.map(l=>d.jsx(S.Radio.Button,{value:l.key,onClick:()=>l.onClick(),children:l.label},l.key))},"scope"):null}},{key:"createPlugin",highlight:!0,render:()=>d.jsx(S.Button,{type:"primary",onClick:()=>Q.show("muse-manager.create-plugin-modal",{app:e==null?void 0:e.name}),children:"Create Plugin"},"createPlugin")},e&&{key:"preview",label:"Preview",onClick:()=>{Q.show("muse-manager.preview-modal",{app:e})}},e&&{key:"group-deployment",label:"Group Deployment",onClick:()=>{Q.show("muse-manager.group-deploy-modal",{app:e})}}];return Oe.extendArray(o,"dropdownItems","museManager.pluginListBar",{app:e,ability:t,items:o}),o=o.filter(Boolean),d.jsxs("div",{className:"flex mb-4 justify-end gap-2 whitespace-nowrap",children:[d.jsx(Pg,{placeholder:"Search by plugin name or owners...",className:"min-w-[100px] max-w-[400px] mr-auto",allowClear:!0}),o.length>0&&d.jsx(ie.DropdownMenu,{items:o,size:"default"})]})}const sA=e=>e.startsWith("@")?e.replace("/","."):e,qs=(e,t)=>{const n=Wf(e),r=Wf(t);if(n===null||r===null)return null;const a=yS(n,r);return a===null?"null":a},lA=Object.freeze(Object.defineProperty({__proto__:null,getPluginId:sA,versionDiff:qs},Symbol.toStringTag,{value:"Module"}));function gu({owners:e=[],searchKey:t,count:n=3}){const r=e.length>n?n-1:e.length;let a=e.slice(0,r),i=e.slice(r);const o=a.map((c,u)=>d.jsxs("span",{children:[d.jsx(ie.Highlighter,{text:c,search:t}),u<a.length-1?", ":" "]},c)),s=i.map(c=>d.jsxs("p",{className:"last:mb-0",children:[d.jsx(ie.Highlighter,{text:c,search:t})," "]},c)),l=e.length>n?d.jsxs("span",{children:["and ",d.jsx("span",{style:{cursor:"pointer",color:"#1890ff"},children:d.jsxs(S.Popover,{content:s,children:[e.length-(n-1)," others"]})})]}):null;return d.jsxs("div",{className:"muse-manager_common-owner-list",children:[o,l]})}const Tt=()=>d.jsx("span",{style:{color:"gray",fontSize:"13px"},children:"N/A"});function jg({app:e}){var h,v;const{data:t,isLoading:n,error:r}=St("muse.plugins"),{data:a}=St("muse.plugins.latest-releases"),i=((h=Mn.useSearchParam("search"))==null?void 0:h.toLowerCase())||"",o=Mn.useSearchParam("scope")||(e?"deployed":Dr.get("pluginListDefaultScope")),s=Mn.useSearchParam("env")||Dr.get("pluginListDefaultEnv"),{getEnvFilterConfig:l,envFilterMap:c}=_g({}),u=H.useMemo(()=>e&&Y(e.envs).entries().reduce((y,[b,{plugins:w}])=>(w.forEach(({name:$,version:A})=>{y[$]||(y[$]={}),y[$][b]=A}),y),{})||{},[e]);let f=t;if(o&&f){switch(o){case"deployed":f=f.filter(b=>{var w;return s==="all"?u[b.name]:(w=u[b.name])==null?void 0:w[s]});break}const y=Y.flatten(oe.invoke("museManager.pm.pluginList.getScopeFilterFns",{scope:o})).filter(Boolean);y.length>0&&(f=Y.flow(y)(f))}const p={pluginList:f};oe.invoke("museManager.pm.pluginList.processPluginList",p),f=(v=p.pluginList)==null?void 0:v.filter(y=>{var b;return y.name.toLowerCase().includes(i)||((b=y.owners)==null?void 0:b.some(w=>w.toLowerCase().includes(i)))}),f&&Object.entries(c).forEach(([b,w])=>{if(!w)return;f=f.filter(A=>{var M,T,P,O;if(!u[A.name])return!1;switch(w){case"null":case"patch":case"minor":case"major":const j=(M=a==null?void 0:a[A.name])==null?void 0:M.version;return qs(j,(T=u==null?void 0:u[A.name])==null?void 0:T[b])===w;case"core":return((O=(P=e.pluginConfig)==null?void 0:P[A.name])==null?void 0:O.core)||A.type!=="normal";default:return!0}});const $=Y.flatten(oe.invoke("museManager.pm.pluginList.getEnvFilterFns",{filterKey:w,app:e,envName:b})).filter(Boolean);$.length>0&&(f=Y.flow($)(f))});const g=[{dataIndex:"name",title:"Name",width:"350px",fixed:"left",order:10,viewMode:!0,tooltip:"Plugin name is readonly.",sorter:Ls.defaultSorter("name"),...Ls.defaultFilter(f,"type"),render:(y,b)=>d.jsxs(d.Fragment,{children:[d.jsx(S.Button,{type:"link",style:{padding:0},onClick:()=>{Q.show("muse-manager.plugin-info-modal",{plugin:b,app:e})},children:d.jsx(ie.Highlighter,{search:i,text:y})}),d.jsx(kg,{app:e,plugin:b})]})},{dataIndex:"latestVersion",title:"Latest",width:170,order:17,fixed:"left",sorter:(y,b)=>{y=a==null?void 0:a[y.name],b=a==null?void 0:a[b.name];const w=y&&y.createdAt&&new Date(y.createdAt).getTime()||0,$=b&&b.createdAt&&new Date(b.createdAt).getTime()||0;return w===$?0:w>$?-1:1},render:(y,b)=>{const w=a==null?void 0:a[b.name];return w?(Date.now()-((w==null?void 0:w.createdAt)&&new Date(w.createdAt).getTime())||0)<1e3*60*30?d.jsx(S.Tooltip,{color:"green",placement:"left",open:!0,title:d.jsxs(d.Fragment,{children:[d.jsx(wt,{date:new Date(w.createdAt||0),timeStyle:"mini"})," ago"]}),overlayInnerStyle:{padding:"2px 4px",minHeight:"fit-content",fontSize:13},zIndex:9,getPopupContainer:A=>A.parentElement,children:d.jsxs(S.Button,{type:"link",onClick:()=>{Q.show("muse-manager.release-info-modal",{plugin:b,app:e,release:w,isLatest:!0})},className:"text-left px-0 text-wrap h-auto",children:["v",w.version]})}):d.jsx(S.Tooltip,{title:d.jsxs(d.Fragment,{children:[d.jsx(wt,{date:new Date(w.createdAt||0)})," from ",w.branch||"unknown"," ","branch."]}),children:d.jsxs(S.Button,{type:"link",onClick:()=>{Q.show("muse-manager.release-info-modal",{plugin:b,app:e,release:w})},className:"text-left px-0 text-wrap h-auto",children:["v",w.version]})}):d.jsx(Tt,{})}},...Object.values((e==null?void 0:e.envs)||{}).filter(y=>s==="all"||y.name===s).map((y,b)=>({dataIndex:`${y.name}`,title:Y.capitalize(y.name),order:b+20,width:120,...l(y.name),render:(w,$)=>{var P,O;const A=(P=u==null?void 0:u[$.name])==null?void 0:P[y.name];if(!A)return d.jsx(Tt,{});const M=(O=a==null?void 0:a[$.name])==null?void 0:O.version;if(!M)return A;const T=GO[qs(A,M)];return d.jsxs(S.Button,{type:"link",style:{textAlign:"left",padding:0,color:T},onClick:()=>{Q.show("muse-manager.release-info-modal",{plugin:$,app:e,version:A})},children:["v",A]})}})),{dataIndex:"status",title:"Status",order:50,width:350,render:(y,b)=>d.jsx(Cg,{plugin:b,app:e})},{dataIndex:"owners",title:"Owners",width:200,order:95,render:y=>d.jsx(gu,{owners:y,searchKey:i,count:2})},{dataIndex:"actions",title:"Actions",order:100,width:180,align:"center",fixed:"right",render:(y,b)=>d.jsx(aA,{plugin:b,app:e})}].filter(Boolean);return Oe.extendArray(g,"columns","museManager.pm.pluginList",{app:e,columns:g,plugins:f,searchValue:i,latestReleases:a}),d.jsxs("div",{children:[!e&&d.jsx("h1",{children:"Plugins"}),d.jsx(ie.RequestStatus,{loading:n,error:r,loadingMode:"skeleton"}),t&&d.jsxs("div",{children:[d.jsx(oA,{app:e}),d.jsx(S.Table,{rowKey:"name",size:"small",columns:g,dataSource:f,loading:n,scroll:{x:1300},pagination:{hideOnSinglePage:!1,size:"small",defaultPageSize:50,showSizeChanger:!0,showTotal:y=>`Total ${y} items`,showQuickJumper:!0}})]})]})}const uA=MUSE_GLOBAL.__shared__.require("react-router-dom@6.15.0/dist/index.js");var Br=uA;function cA({app:e}){const{mutateAsync:t}=be("am.deleteApp"),n=xe("muse.apps"),a=_e().can("delete","App",e),i=H.useMemo(()=>[{key:"delete",label:"Delete App",disabled:!a,order:70,icon:"delete",menuItemProps:{style:{color:a?"#ff4d4f":""}},highlight:!1,onClick:async()=>{S.Modal.confirm({title:"Confirm Delete",content:d.jsxs(d.Fragment,{children:["Are you sure to delete the app ",d.jsx("b",{children:e.name}),"?"]}),onOk:()=>{(async()=>{const o=S.message.loading(`Deleting app ${e.name}...`,0);try{await t({appName:e.name}),o(),S.message.success("Delete app success."),await n()}catch(s){S.Modal.error({title:"Failed to delete the app",content:String(s)}),o()}})()}})}}].filter(Boolean),[a,e.name,t,n]);return d.jsx(ie.DropdownMenu,{extPoint:"museManager.app.processActions",items:i})}function fA(){const[e,t]=Nr("scope",Dr.get("appListDefaultScope")),n=[{key:"all",label:"All Apps",onClick:()=>t("all"),order:100}];n.push(...Y.flatten(oe.invoke("museManager.appListBar.getScopes",{setScope:t,scope:e}))),oe.sort(n);const r=[];return r.push(...Y.flatten(oe.invoke("museManager.appListBar.getDropdownItems",{}))),oe.invoke("museManager.appListBar.processDropdownItems",{dropdownItems:r}),d.jsxs("div",{className:"flex mb-2 justify-end gap-2 whitespace-nowrap",children:[d.jsx(Pg,{placeholder:"Search by app name or owners...",className:"min-w-[100px] max-w-[400px] mr-auto",allowClear:!0}),n.length>1?d.jsx(S.Radio.Group,{value:e,children:n.map(a=>d.jsx(S.Radio.Button,{value:a.key,onClick:()=>a.onClick(),children:a.label},a.key))}):null,d.jsx(ie.DropdownMenu,{items:r,size:"default"})]})}function dA(){var o;const e=((o=Mn.useSearchParam("search"))==null?void 0:o.toLowerCase())||"",{data:t,error:n}=St("muse.apps"),r=[{dataIndex:"name",title:"Name",width:"220px",order:10,sorter:Ls.defaultSorter("name"),render:s=>d.jsx(Br.Link,{to:`/app/${s}`,children:d.jsx(ie.Highlighter,{search:e,text:s})})},{dataIndex:"owners",title:"Owners",width:200,order:20,render:s=>d.jsx(gu,{owners:s,searchKey:e,count:2})},{dataIndex:"createdBy",title:"Created By",width:"120px",order:30},{dataIndex:"actions",title:"Actions",width:"160px",order:200,render:(s,l)=>d.jsx(cA,{app:l})}];let a=t;const i={appList:a};return oe.invoke("museManager.am.appList.processAppList",i),a=i.appList,a=a==null?void 0:a.filter(s=>{var l;return s.name.toLowerCase().includes(e)||((l=s.owners)==null?void 0:l.some(c=>c.toLowerCase().includes(e)))}),d.jsxs("div",{children:[d.jsx("h1",{children:"App List"}),d.jsx(ie.RequestStatus,{loading:!t&&!n,error:!t&&n,loadingMode:"skeleton"}),t?d.jsxs(d.Fragment,{children:[d.jsx(fA,{}),d.jsx(S.Table,{rowKey:"name",columns:r,dataSource:a,loading:!t,size:"small",pagination:{hideOnSinglePage:!1,size:"small",pageSize:50,showSizeChanger:!0,showTotal:s=>`Total ${s} items`,showQuickJumper:!0}})]}):null]})}function pA(e){const t={canvas:null,width:128,height:128,shape:"square",fontColor:"white",backgroundColor:"black",text:"C",fontFamily:"Leckerli One",fontSize:64},{canvas:n,width:r,height:a,shape:i,fontColor:o,backgroundColor:s,text:l,fontFamily:c,fontSize:u}={...t,...e},f=n.getContext("2d");n.width=2*r,n.height=2*a,n.style.width=r+"px",n.style.height=a+"px",f.scale(2,2),p(),y();function p(){switch(i){case"square":g();break;case"circle":h();break;case"rounded":v();break;default:g();break}}function g(){f.beginPath(),f.rect(0,0,r,a),f.fillStyle=s,f.fill()}function h(){f.beginPath(),f.arc(r/2,a/2,a/2,0,2*Math.PI,!1),f.fillStyle=s,f.fill()}function v(){f.beginPath();const w=a/10;f.moveTo(r,a),f.arcTo(0,a,0,0,w),f.arcTo(0,0,r,0,w),f.arcTo(r,0,r,a,w),f.arcTo(r,a,0,a,w),f.fillStyle=s,f.fill()}function y(){f.fillStyle=o,f.font=u+"px "+c,f.textBaseline="alphabetic",f.textAlign="center";const w=b(l,c,u),$=r/2+w.horizontal,A=a/2+w.vertical;f.fillText(l,$,A)}function b(w,$,A){const M=document.createElement("canvas"),T=M.getContext("2d");T.font=A+"px "+$,M.width=2*T.measureText(w).width,M.height=2*A,T.font=A+"px "+$,T.textBaseline="alphabetic",T.textAlign="center",T.fillStyle="white",T.fillText(w,M.width/2,M.height/2);const P=T.getImageData(0,0,M.width===0?1:M.width,M.height===0?1:M.height).data;let O,j;for(let I=0;I<=M.height;I++)for(let N=0;N<=M.width;N++){let B=4*(M.width*I+N);if(P[B]>0){O||(O=I),j=I;break}}const z=M.height/2,R=(j-O)/2+O;let D,U;for(let I=0;I<=M.width;I++)for(let N=0;N<=M.height;N++){let B=4*(M.width*N+I);if(P[B]>0){D||(D=I),U=I;break}}const k=M.width/2,F=(U-D)/2+D;return{vertical:z-R,horizontal:k-F}}}function hA({options:e,onLoad:t}){const{text:n,shape:r,fontFamily:a,fontColor:i,backgroundColor:o,fontSize:s}=e,l=H.useRef(null);return H.useEffect(()=>{t(l.current)},[t]),H.useEffect(()=>{const c=l.current;pA({canvas:c,width:100,height:100,shape:r.toLowerCase(),fontColor:i,backgroundColor:o,text:n,fontFamily:a,fontSize:s})},[o,r,s,n,i,a]),d.jsx("div",{children:d.jsx("canvas",{ref:l})})}var Ve={},ta={},mA=typeof qt=="object"&&qt&&qt.Object===Object&&qt,Rg=mA,gA=Rg,vA=typeof self=="object"&&self&&self.Object===Object&&self,yA=gA||vA||Function("return this")(),ht=yA,bA=ht,xA=bA.Symbol,na=xA,fd=na,Fg=Object.prototype,wA=Fg.hasOwnProperty,$A=Fg.toString,ur=fd?fd.toStringTag:void 0;function SA(e){var t=wA.call(e,ur),n=e[ur];try{e[ur]=void 0;var r=!0}catch{}var a=$A.call(e);return r&&(t?e[ur]=n:delete e[ur]),a}var EA=SA,OA=Object.prototype,AA=OA.toString;function CA(e){return AA.call(e)}var kA=CA,dd=na,_A=EA,TA=kA,PA="[object Null]",jA="[object Undefined]",pd=dd?dd.toStringTag:void 0;function RA(e){return e==null?e===void 0?jA:PA:pd&&pd in Object(e)?_A(e):TA(e)}var Zt=RA,FA=Array.isArray,at=FA;function MA(e){return e!=null&&typeof e=="object"}var Ot=MA,LA=Zt,IA=at,NA=Ot,DA="[object String]";function BA(e){return typeof e=="string"||!IA(e)&&NA(e)&&LA(e)==DA}var zA=BA;function UA(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++a];if(n(i[l],l,i)===!1)break}return t}}var qA=UA,HA=qA,VA=HA(),GA=VA;function WA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var KA=WA,XA=Zt,YA=Ot,QA="[object Arguments]";function JA(e){return YA(e)&&XA(e)==QA}var ZA=JA,hd=ZA,e2=Ot,Mg=Object.prototype,t2=Mg.hasOwnProperty,n2=Mg.propertyIsEnumerable,r2=hd(function(){return arguments}())?hd:function(e){return e2(e)&&t2.call(e,"callee")&&!n2.call(e,"callee")},Lg=r2,ci={exports:{}};function a2(){return!1}var i2=a2;ci.exports;(function(e,t){var n=ht,r=i2,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?n.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||r;e.exports=c})(ci,ci.exports);var vu=ci.exports,o2=9007199254740991,s2=/^(?:0|[1-9]\d*)$/;function l2(e,t){var n=typeof e;return t=t??o2,!!t&&(n=="number"||n!="symbol"&&s2.test(e))&&e>-1&&e%1==0&&e<t}var Ig=l2,u2=9007199254740991;function c2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u2}var yu=c2,f2=Zt,d2=yu,p2=Ot,h2="[object Arguments]",m2="[object Array]",g2="[object Boolean]",v2="[object Date]",y2="[object Error]",b2="[object Function]",x2="[object Map]",w2="[object Number]",$2="[object Object]",S2="[object RegExp]",E2="[object Set]",O2="[object String]",A2="[object WeakMap]",C2="[object ArrayBuffer]",k2="[object DataView]",_2="[object Float32Array]",T2="[object Float64Array]",P2="[object Int8Array]",j2="[object Int16Array]",R2="[object Int32Array]",F2="[object Uint8Array]",M2="[object Uint8ClampedArray]",L2="[object Uint16Array]",I2="[object Uint32Array]",ge={};ge[_2]=ge[T2]=ge[P2]=ge[j2]=ge[R2]=ge[F2]=ge[M2]=ge[L2]=ge[I2]=!0;ge[h2]=ge[m2]=ge[C2]=ge[g2]=ge[k2]=ge[v2]=ge[y2]=ge[b2]=ge[x2]=ge[w2]=ge[$2]=ge[S2]=ge[E2]=ge[O2]=ge[A2]=!1;function N2(e){return p2(e)&&d2(e.length)&&!!ge[f2(e)]}var D2=N2;function B2(e){return function(t){return e(t)}}var bu=B2,fi={exports:{}};fi.exports;(function(e,t){var n=Rg,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i&&n.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(fi,fi.exports);var xu=fi.exports,z2=D2,U2=bu,md=xu,gd=md&&md.isTypedArray,q2=gd?U2(gd):z2,Ng=q2,H2=KA,V2=Lg,G2=at,W2=vu,K2=Ig,X2=Ng,Y2=Object.prototype,Q2=Y2.hasOwnProperty;function J2(e,t){var n=G2(e),r=!n&&V2(e),a=!n&&!r&&W2(e),i=!n&&!r&&!a&&X2(e),o=n||r||a||i,s=o?H2(e.length,String):[],l=s.length;for(var c in e)(t||Q2.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||K2(c,l)))&&s.push(c);return s}var Dg=J2,Z2=Object.prototype;function eC(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Z2;return e===n}var wu=eC;function tC(e,t){return function(n){return e(t(n))}}var Bg=tC,nC=Bg,rC=nC(Object.keys,Object),aC=rC,iC=wu,oC=aC,sC=Object.prototype,lC=sC.hasOwnProperty;function uC(e){if(!iC(e))return oC(e);var t=[];for(var n in Object(e))lC.call(e,n)&&n!="constructor"&&t.push(n);return t}var cC=uC;function fC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vn=fC,dC=Zt,pC=Vn,hC="[object AsyncFunction]",mC="[object Function]",gC="[object GeneratorFunction]",vC="[object Proxy]";function yC(e){if(!pC(e))return!1;var t=dC(e);return t==mC||t==gC||t==hC||t==vC}var zg=yC,bC=zg,xC=yu;function wC(e){return e!=null&&xC(e.length)&&!bC(e)}var Ui=wC,$C=Dg,SC=cC,EC=Ui;function OC(e){return EC(e)?$C(e):SC(e)}var ra=OC,AC=GA,CC=ra;function kC(e,t){return e&&AC(e,t,CC)}var Ug=kC;function _C(e){return e}var qg=_C,TC=qg;function PC(e){return typeof e=="function"?e:TC}var jC=PC,RC=Ug,FC=jC;function MC(e,t){return e&&RC(e,FC(t))}var $u=MC,LC=Bg,IC=LC(Object.getPrototypeOf,Object),Su=IC,NC=Zt,DC=Su,BC=Ot,zC="[object Object]",UC=Function.prototype,qC=Object.prototype,Hg=UC.toString,HC=qC.hasOwnProperty,VC=Hg.call(Object);function GC(e){if(!BC(e)||NC(e)!=zC)return!1;var t=DC(e);if(t===null)return!0;var n=HC.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hg.call(n)==VC}var WC=GC;function KC(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var Vg=KC;function XC(){this.__data__=[],this.size=0}var YC=XC;function QC(e,t){return e===t||e!==e&&t!==t}var Eu=QC,JC=Eu;function ZC(e,t){for(var n=e.length;n--;)if(JC(e[n][0],t))return n;return-1}var qi=ZC,ek=qi,tk=Array.prototype,nk=tk.splice;function rk(e){var t=this.__data__,n=ek(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nk.call(t,n,1),--this.size,!0}var ak=rk,ik=qi;function ok(e){var t=this.__data__,n=ik(t,e);return n<0?void 0:t[n][1]}var sk=ok,lk=qi;function uk(e){return lk(this.__data__,e)>-1}var ck=uk,fk=qi;function dk(e,t){var n=this.__data__,r=fk(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var pk=dk,hk=YC,mk=ak,gk=sk,vk=ck,yk=pk;function Gn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gn.prototype.clear=hk;Gn.prototype.delete=mk;Gn.prototype.get=gk;Gn.prototype.has=vk;Gn.prototype.set=yk;var Hi=Gn,bk=Hi;function xk(){this.__data__=new bk,this.size=0}var wk=xk;function $k(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Sk=$k;function Ek(e){return this.__data__.get(e)}var Ok=Ek;function Ak(e){return this.__data__.has(e)}var Ck=Ak,kk=ht,_k=kk["__core-js_shared__"],Tk=_k,No=Tk,vd=function(){var e=/[^.]+$/.exec(No&&No.keys&&No.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pk(e){return!!vd&&vd in e}var jk=Pk,Rk=Function.prototype,Fk=Rk.toString;function Mk(e){if(e!=null){try{return Fk.call(e)}catch{}try{return e+""}catch{}}return""}var Gg=Mk,Lk=zg,Ik=jk,Nk=Vn,Dk=Gg,Bk=/[\\^$.*+?()[\]{}|]/g,zk=/^\[object .+?Constructor\]$/,Uk=Function.prototype,qk=Object.prototype,Hk=Uk.toString,Vk=qk.hasOwnProperty,Gk=RegExp("^"+Hk.call(Vk).replace(Bk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wk(e){if(!Nk(e)||Ik(e))return!1;var t=Lk(e)?Gk:zk;return t.test(Dk(e))}var Kk=Wk;function Xk(e,t){return e==null?void 0:e[t]}var Yk=Xk,Qk=Kk,Jk=Yk;function Zk(e,t){var n=Jk(e,t);return Qk(n)?n:void 0}var en=Zk,e_=en,t_=ht,n_=e_(t_,"Map"),Ou=n_,r_=en,a_=r_(Object,"create"),Vi=a_,yd=Vi;function i_(){this.__data__=yd?yd(null):{},this.size=0}var o_=i_;function s_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var l_=s_,u_=Vi,c_="__lodash_hash_undefined__",f_=Object.prototype,d_=f_.hasOwnProperty;function p_(e){var t=this.__data__;if(u_){var n=t[e];return n===c_?void 0:n}return d_.call(t,e)?t[e]:void 0}var h_=p_,m_=Vi,g_=Object.prototype,v_=g_.hasOwnProperty;function y_(e){var t=this.__data__;return m_?t[e]!==void 0:v_.call(t,e)}var b_=y_,x_=Vi,w_="__lodash_hash_undefined__";function $_(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=x_&&t===void 0?w_:t,this}var S_=$_,E_=o_,O_=l_,A_=h_,C_=b_,k_=S_;function Wn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wn.prototype.clear=E_;Wn.prototype.delete=O_;Wn.prototype.get=A_;Wn.prototype.has=C_;Wn.prototype.set=k_;var __=Wn,bd=__,T_=Hi,P_=Ou;function j_(){this.size=0,this.__data__={hash:new bd,map:new(P_||T_),string:new bd}}var R_=j_;function F_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var M_=F_,L_=M_;function I_(e,t){var n=e.__data__;return L_(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Gi=I_,N_=Gi;function D_(e){var t=N_(this,e).delete(e);return this.size-=t?1:0,t}var B_=D_,z_=Gi;function U_(e){return z_(this,e).get(e)}var q_=U_,H_=Gi;function V_(e){return H_(this,e).has(e)}var G_=V_,W_=Gi;function K_(e,t){var n=W_(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var X_=K_,Y_=R_,Q_=B_,J_=q_,Z_=G_,eT=X_;function Kn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kn.prototype.clear=Y_;Kn.prototype.delete=Q_;Kn.prototype.get=J_;Kn.prototype.has=Z_;Kn.prototype.set=eT;var Au=Kn,tT=Hi,nT=Ou,rT=Au,aT=200;function iT(e,t){var n=this.__data__;if(n instanceof tT){var r=n.__data__;if(!nT||r.length<aT-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rT(r)}return n.set(e,t),this.size=n.size,this}var oT=iT,sT=Hi,lT=wk,uT=Sk,cT=Ok,fT=Ck,dT=oT;function Xn(e){var t=this.__data__=new sT(e);this.size=t.size}Xn.prototype.clear=lT;Xn.prototype.delete=uT;Xn.prototype.get=cT;Xn.prototype.has=fT;Xn.prototype.set=dT;var Cu=Xn,pT="__lodash_hash_undefined__";function hT(e){return this.__data__.set(e,pT),this}var mT=hT;function gT(e){return this.__data__.has(e)}var vT=gT,yT=Au,bT=mT,xT=vT;function di(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new yT;++t<n;)this.add(e[t])}di.prototype.add=di.prototype.push=bT;di.prototype.has=xT;var wT=di;function $T(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var ST=$T;function ET(e,t){return e.has(t)}var OT=ET,AT=wT,CT=ST,kT=OT,_T=1,TT=2;function PT(e,t,n,r,a,i){var o=n&_T,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var f=-1,p=!0,g=n&TT?new AT:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var y=o?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(y!==void 0){if(y)continue;p=!1;break}if(g){if(!CT(t,function(b,w){if(!kT(g,w)&&(h===b||a(h,b,n,r,i)))return g.push(w)})){p=!1;break}}else if(!(h===v||a(h,v,n,r,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var Wg=PT,jT=ht,RT=jT.Uint8Array,Kg=RT;function FT(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var MT=FT;function LT(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var IT=LT,xd=na,wd=Kg,NT=Eu,DT=Wg,BT=MT,zT=IT,UT=1,qT=2,HT="[object Boolean]",VT="[object Date]",GT="[object Error]",WT="[object Map]",KT="[object Number]",XT="[object RegExp]",YT="[object Set]",QT="[object String]",JT="[object Symbol]",ZT="[object ArrayBuffer]",eP="[object DataView]",$d=xd?xd.prototype:void 0,Do=$d?$d.valueOf:void 0;function tP(e,t,n,r,a,i,o){switch(n){case eP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ZT:return!(e.byteLength!=t.byteLength||!i(new wd(e),new wd(t)));case HT:case VT:case KT:return NT(+e,+t);case GT:return e.name==t.name&&e.message==t.message;case XT:case QT:return e==t+"";case WT:var s=BT;case YT:var l=r&UT;if(s||(s=zT),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=qT,o.set(e,t);var u=DT(s(e),s(t),r,a,i,o);return o.delete(e),u;case JT:if(Do)return Do.call(e)==Do.call(t)}return!1}var nP=tP;function rP(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var Xg=rP,aP=Xg,iP=at;function oP(e,t,n){var r=t(e);return iP(e)?r:aP(r,n(e))}var Yg=oP;function sP(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}var lP=sP;function uP(){return[]}var Qg=uP,cP=lP,fP=Qg,dP=Object.prototype,pP=dP.propertyIsEnumerable,Sd=Object.getOwnPropertySymbols,hP=Sd?function(e){return e==null?[]:(e=Object(e),cP(Sd(e),function(t){return pP.call(e,t)}))}:fP,ku=hP,mP=Yg,gP=ku,vP=ra;function yP(e){return mP(e,vP,gP)}var Jg=yP,Ed=Jg,bP=1,xP=Object.prototype,wP=xP.hasOwnProperty;function $P(e,t,n,r,a,i){var o=n&bP,s=Ed(e),l=s.length,c=Ed(t),u=c.length;if(l!=u&&!o)return!1;for(var f=l;f--;){var p=s[f];if(!(o?p in t:wP.call(t,p)))return!1}var g=i.get(e),h=i.get(t);if(g&&h)return g==t&&h==e;var v=!0;i.set(e,t),i.set(t,e);for(var y=o;++f<l;){p=s[f];var b=e[p],w=t[p];if(r)var $=o?r(w,b,p,t,e,i):r(b,w,p,e,t,i);if(!($===void 0?b===w||a(b,w,n,r,i):$)){v=!1;break}y||(y=p=="constructor")}if(v&&!y){var A=e.constructor,M=t.constructor;A!=M&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var SP=$P,EP=en,OP=ht,AP=EP(OP,"DataView"),CP=AP,kP=en,_P=ht,TP=kP(_P,"Promise"),PP=TP,jP=en,RP=ht,FP=jP(RP,"Set"),MP=FP,LP=en,IP=ht,NP=LP(IP,"WeakMap"),DP=NP,Hs=CP,Vs=Ou,Gs=PP,Ws=MP,Ks=DP,Zg=Zt,Yn=Gg,Od="[object Map]",BP="[object Object]",Ad="[object Promise]",Cd="[object Set]",kd="[object WeakMap]",_d="[object DataView]",zP=Yn(Hs),UP=Yn(Vs),qP=Yn(Gs),HP=Yn(Ws),VP=Yn(Ks),zt=Zg;(Hs&&zt(new Hs(new ArrayBuffer(1)))!=_d||Vs&&zt(new Vs)!=Od||Gs&&zt(Gs.resolve())!=Ad||Ws&&zt(new Ws)!=Cd||Ks&&zt(new Ks)!=kd)&&(zt=function(e){var t=Zg(e),n=t==BP?e.constructor:void 0,r=n?Yn(n):"";if(r)switch(r){case zP:return _d;case UP:return Od;case qP:return Ad;case HP:return Cd;case VP:return kd}return t});var Wi=zt,Bo=Cu,GP=Wg,WP=nP,KP=SP,Td=Wi,Pd=at,jd=vu,XP=Ng,YP=1,Rd="[object Arguments]",Fd="[object Array]",La="[object Object]",QP=Object.prototype,Md=QP.hasOwnProperty;function JP(e,t,n,r,a,i){var o=Pd(e),s=Pd(t),l=o?Fd:Td(e),c=s?Fd:Td(t);l=l==Rd?La:l,c=c==Rd?La:c;var u=l==La,f=c==La,p=l==c;if(p&&jd(e)){if(!jd(t))return!1;o=!0,u=!1}if(p&&!u)return i||(i=new Bo),o||XP(e)?GP(e,t,n,r,a,i):WP(e,t,l,n,r,a,i);if(!(n&YP)){var g=u&&Md.call(e,"__wrapped__"),h=f&&Md.call(t,"__wrapped__");if(g||h){var v=g?e.value():e,y=h?t.value():t;return i||(i=new Bo),a(v,y,n,r,i)}}return p?(i||(i=new Bo),KP(e,t,n,r,a,i)):!1}var ZP=JP,ej=ZP,Ld=Ot;function ev(e,t,n,r,a){return e===t?!0:e==null||t==null||!Ld(e)&&!Ld(t)?e!==e&&t!==t:ej(e,t,n,r,ev,a)}var tv=ev,tj=Cu,nj=tv,rj=1,aj=2;function ij(e,t,n,r){var a=n.length,i=a,o=!r;if(e==null)return!i;for(e=Object(e);a--;){var s=n[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=n[a];var l=s[0],c=e[l],u=s[1];if(o&&s[2]){if(c===void 0&&!(l in e))return!1}else{var f=new tj;if(r)var p=r(c,u,l,e,t,f);if(!(p===void 0?nj(u,c,rj|aj,r,f):p))return!1}}return!0}var oj=ij,sj=Vn;function lj(e){return e===e&&!sj(e)}var nv=lj,uj=nv,cj=ra;function fj(e){for(var t=cj(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,uj(a)]}return t}var dj=fj;function pj(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var rv=pj,hj=oj,mj=dj,gj=rv;function vj(e){var t=mj(e);return t.length==1&&t[0][2]?gj(t[0][0],t[0][1]):function(n){return n===e||hj(n,e,t)}}var yj=vj,bj=Zt,xj=Ot,wj="[object Symbol]";function $j(e){return typeof e=="symbol"||xj(e)&&bj(e)==wj}var _u=$j,Sj=at,Ej=_u,Oj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Aj=/^\w*$/;function Cj(e,t){if(Sj(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ej(e)?!0:Aj.test(e)||!Oj.test(e)||t!=null&&e in Object(t)}var Tu=Cj,av=Au,kj="Expected a function";function Pu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kj);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(Pu.Cache||av),n}Pu.Cache=av;var _j=Pu,Tj=_j,Pj=500;function jj(e){var t=Tj(e,function(r){return n.size===Pj&&n.clear(),r}),n=t.cache;return t}var Rj=jj,Fj=Rj,Mj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lj=/\\(\\)?/g,Ij=Fj(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Mj,function(n,r,a,i){t.push(a?i.replace(Lj,"$1"):r||n)}),t}),Nj=Ij,Id=na,Dj=Vg,Bj=at,zj=_u,Nd=Id?Id.prototype:void 0,Dd=Nd?Nd.toString:void 0;function iv(e){if(typeof e=="string")return e;if(Bj(e))return Dj(e,iv)+"";if(zj(e))return Dd?Dd.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Uj=iv,qj=Uj;function Hj(e){return e==null?"":qj(e)}var Vj=Hj,Gj=at,Wj=Tu,Kj=Nj,Xj=Vj;function Yj(e,t){return Gj(e)?e:Wj(e,t)?[e]:Kj(Xj(e))}var ov=Yj,Qj=_u;function Jj(e){if(typeof e=="string"||Qj(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ki=Jj,Zj=ov,eR=Ki;function tR(e,t){t=Zj(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[eR(t[n++])];return n&&n==r?e:void 0}var sv=tR,nR=sv;function rR(e,t,n){var r=e==null?void 0:nR(e,t);return r===void 0?n:r}var aR=rR;function iR(e,t){return e!=null&&t in Object(e)}var oR=iR,sR=ov,lR=Lg,uR=at,cR=Ig,fR=yu,dR=Ki;function pR(e,t,n){t=sR(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var o=dR(t[r]);if(!(i=e!=null&&n(e,o)))break;e=e[o]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&fR(a)&&cR(o,a)&&(uR(e)||lR(e)))}var hR=pR,mR=oR,gR=hR;function vR(e,t){return e!=null&&gR(e,t,mR)}var yR=vR,bR=tv,xR=aR,wR=yR,$R=Tu,SR=nv,ER=rv,OR=Ki,AR=1,CR=2;function kR(e,t){return $R(e)&&SR(t)?ER(OR(e),t):function(n){var r=xR(n,e);return r===void 0&&r===t?wR(n,e):bR(t,r,AR|CR)}}var _R=kR;function TR(e){return function(t){return t==null?void 0:t[e]}}var PR=TR,jR=sv;function RR(e){return function(t){return jR(t,e)}}var FR=RR,MR=PR,LR=FR,IR=Tu,NR=Ki;function DR(e){return IR(e)?MR(NR(e)):LR(e)}var BR=DR,zR=yj,UR=_R,qR=qg,HR=at,VR=BR;function GR(e){return typeof e=="function"?e:e==null?qR:typeof e=="object"?HR(e)?UR(e[0],e[1]):zR(e):VR(e)}var WR=GR,KR=Ui;function XR(e,t){return function(n,r){if(n==null)return n;if(!KR(n))return e(n,r);for(var a=n.length,i=t?a:-1,o=Object(n);(t?i--:++i<a)&&r(o[i],i,o)!==!1;);return n}}var YR=XR,QR=Ug,JR=YR,ZR=JR(QR),eF=ZR,tF=eF,nF=Ui;function rF(e,t){var n=-1,r=nF(e)?Array(e.length):[];return tF(e,function(a,i,o){r[++n]=t(a,i,o)}),r}var aF=rF,iF=Vg,oF=WR,sF=aF,lF=at;function uF(e,t){var n=lF(e)?iF:sF;return n(e,oF(t))}var cF=uF;Object.defineProperty(ta,"__esModule",{value:!0});ta.flattenNames=void 0;var fF=zA,dF=Xi(fF),pF=$u,hF=Xi(pF),mF=WC,gF=Xi(mF),vF=cF,yF=Xi(vF);function Xi(e){return e&&e.__esModule?e:{default:e}}var bF=ta.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,yF.default)(t,function(r){Array.isArray(r)?e(r).map(function(a){return n.push(a)}):(0,gF.default)(r)?(0,hF.default)(r,function(a,i){a===!0&&n.push(i),n.push(i+"-"+a)}):(0,dF.default)(r)&&n.push(r)}),n};ta.default=bF;var aa={};function xF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var wF=xF,$F=en,SF=function(){try{var e=$F(Object,"defineProperty");return e({},"",{}),e}catch{}}(),EF=SF,Bd=EF;function OF(e,t,n){t=="__proto__"&&Bd?Bd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var lv=OF,AF=lv,CF=Eu,kF=Object.prototype,_F=kF.hasOwnProperty;function TF(e,t,n){var r=e[t];(!(_F.call(e,t)&&CF(r,n))||n===void 0&&!(t in e))&&AF(e,t,n)}var uv=TF,PF=uv,jF=lv;function RF(e,t,n,r){var a=!n;n||(n={});for(var i=-1,o=t.length;++i<o;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),a?jF(n,s,l):PF(n,s,l)}return n}var Yi=RF,FF=Yi,MF=ra;function LF(e,t){return e&&FF(t,MF(t),e)}var IF=LF;function NF(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var DF=NF,BF=Vn,zF=wu,UF=DF,qF=Object.prototype,HF=qF.hasOwnProperty;function VF(e){if(!BF(e))return UF(e);var t=zF(e),n=[];for(var r in e)r=="constructor"&&(t||!HF.call(e,r))||n.push(r);return n}var GF=VF,WF=Dg,KF=GF,XF=Ui;function YF(e){return XF(e)?WF(e,!0):KF(e)}var ju=YF,QF=Yi,JF=ju;function ZF(e,t){return e&&QF(t,JF(t),e)}var e9=ZF,pi={exports:{}};pi.exports;(function(e,t){var n=ht,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var f=c.length,p=s?s(f):new c.constructor(f);return c.copy(p),p}e.exports=l})(pi,pi.exports);var t9=pi.exports;function n9(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var r9=n9,a9=Yi,i9=ku;function o9(e,t){return a9(e,i9(e),t)}var s9=o9,l9=Xg,u9=Su,c9=ku,f9=Qg,d9=Object.getOwnPropertySymbols,p9=d9?function(e){for(var t=[];e;)l9(t,c9(e)),e=u9(e);return t}:f9,cv=p9,h9=Yi,m9=cv;function g9(e,t){return h9(e,m9(e),t)}var v9=g9,y9=Yg,b9=cv,x9=ju;function w9(e){return y9(e,x9,b9)}var $9=w9,S9=Object.prototype,E9=S9.hasOwnProperty;function O9(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&E9.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var A9=O9,zd=Kg;function C9(e){var t=new e.constructor(e.byteLength);return new zd(t).set(new zd(e)),t}var Ru=C9,k9=Ru;function _9(e,t){var n=t?k9(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var T9=_9,P9=/\w*$/;function j9(e){var t=new e.constructor(e.source,P9.exec(e));return t.lastIndex=e.lastIndex,t}var R9=j9,Ud=na,qd=Ud?Ud.prototype:void 0,Hd=qd?qd.valueOf:void 0;function F9(e){return Hd?Object(Hd.call(e)):{}}var M9=F9,L9=Ru;function I9(e,t){var n=t?L9(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var N9=I9,D9=Ru,B9=T9,z9=R9,U9=M9,q9=N9,H9="[object Boolean]",V9="[object Date]",G9="[object Map]",W9="[object Number]",K9="[object RegExp]",X9="[object Set]",Y9="[object String]",Q9="[object Symbol]",J9="[object ArrayBuffer]",Z9="[object DataView]",eM="[object Float32Array]",tM="[object Float64Array]",nM="[object Int8Array]",rM="[object Int16Array]",aM="[object Int32Array]",iM="[object Uint8Array]",oM="[object Uint8ClampedArray]",sM="[object Uint16Array]",lM="[object Uint32Array]";function uM(e,t,n){var r=e.constructor;switch(t){case J9:return D9(e);case H9:case V9:return new r(+e);case Z9:return B9(e,n);case eM:case tM:case nM:case rM:case aM:case iM:case oM:case sM:case lM:return q9(e,n);case G9:return new r;case W9:case Y9:return new r(e);case K9:return z9(e);case X9:return new r;case Q9:return U9(e)}}var cM=uM,fM=Vn,Vd=Object.create,dM=function(){function e(){}return function(t){if(!fM(t))return{};if(Vd)return Vd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),pM=dM,hM=pM,mM=Su,gM=wu;function vM(e){return typeof e.constructor=="function"&&!gM(e)?hM(mM(e)):{}}var yM=vM,bM=Wi,xM=Ot,wM="[object Map]";function $M(e){return xM(e)&&bM(e)==wM}var SM=$M,EM=SM,OM=bu,Gd=xu,Wd=Gd&&Gd.isMap,AM=Wd?OM(Wd):EM,CM=AM,kM=Wi,_M=Ot,TM="[object Set]";function PM(e){return _M(e)&&kM(e)==TM}var jM=PM,RM=jM,FM=bu,Kd=xu,Xd=Kd&&Kd.isSet,MM=Xd?FM(Xd):RM,LM=MM,IM=Cu,NM=wF,DM=uv,BM=IF,zM=e9,UM=t9,qM=r9,HM=s9,VM=v9,GM=Jg,WM=$9,KM=Wi,XM=A9,YM=cM,QM=yM,JM=at,ZM=vu,eL=CM,tL=Vn,nL=LM,rL=ra,aL=ju,iL=1,oL=2,sL=4,fv="[object Arguments]",lL="[object Array]",uL="[object Boolean]",cL="[object Date]",fL="[object Error]",dv="[object Function]",dL="[object GeneratorFunction]",pL="[object Map]",hL="[object Number]",pv="[object Object]",mL="[object RegExp]",gL="[object Set]",vL="[object String]",yL="[object Symbol]",bL="[object WeakMap]",xL="[object ArrayBuffer]",wL="[object DataView]",$L="[object Float32Array]",SL="[object Float64Array]",EL="[object Int8Array]",OL="[object Int16Array]",AL="[object Int32Array]",CL="[object Uint8Array]",kL="[object Uint8ClampedArray]",_L="[object Uint16Array]",TL="[object Uint32Array]",pe={};pe[fv]=pe[lL]=pe[xL]=pe[wL]=pe[uL]=pe[cL]=pe[$L]=pe[SL]=pe[EL]=pe[OL]=pe[AL]=pe[pL]=pe[hL]=pe[pv]=pe[mL]=pe[gL]=pe[vL]=pe[yL]=pe[CL]=pe[kL]=pe[_L]=pe[TL]=!0;pe[fL]=pe[dv]=pe[bL]=!1;function ei(e,t,n,r,a,i){var o,s=t&iL,l=t&oL,c=t&sL;if(n&&(o=a?n(e,r,a,i):n(e)),o!==void 0)return o;if(!tL(e))return e;var u=JM(e);if(u){if(o=XM(e),!s)return qM(e,o)}else{var f=KM(e),p=f==dv||f==dL;if(ZM(e))return UM(e,s);if(f==pv||f==fv||p&&!a){if(o=l||p?{}:QM(e),!s)return l?VM(e,zM(o,e)):HM(e,BM(o,e))}else{if(!pe[f])return a?e:{};o=YM(e,f,s)}}i||(i=new IM);var g=i.get(e);if(g)return g;i.set(e,o),nL(e)?e.forEach(function(y){o.add(ei(y,t,n,y,e,i))}):eL(e)&&e.forEach(function(y,b){o.set(b,ei(y,t,n,b,e,i))});var h=c?l?WM:GM:l?aL:rL,v=u?void 0:h(e);return NM(v||e,function(y,b){v&&(b=y,y=e[b]),DM(o,b,ei(y,t,n,b,e,i))}),o}var PL=ei,jL=PL,RL=1,FL=4;function ML(e){return jL(e,RL|FL)}var LL=ML;Object.defineProperty(aa,"__esModule",{value:!0});aa.mergeClasses=void 0;var IL=$u,NL=hv(IL),DL=LL,BL=hv(DL),zL=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};function hv(e){return e&&e.__esModule?e:{default:e}}var UL=aa.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,BL.default)(t.default)||{};return n.map(function(a){var i=t[a];return i&&(0,NL.default)(i,function(o,s){r[s]||(r[s]={}),r[s]=zL({},r[s],i[s])}),a}),r};aa.default=UL;var ia={};Object.defineProperty(ia,"__esModule",{value:!0});ia.autoprefix=void 0;var qL=$u,Yd=VL(qL),HL=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};function VL(e){return e&&e.__esModule?e:{default:e}}var GL={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},WL=ia.autoprefix=function(t){var n={};return(0,Yd.default)(t,function(r,a){var i={};(0,Yd.default)(r,function(o,s){var l=GL[s];l?i=HL({},i,l(o)):i[s]=o}),n[a]=i}),n};ia.default=WL;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});oa.hover=void 0;var KL=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},XL=le,zo=YL(XL);function YL(e){return e&&e.__esModule?e:{default:e}}function QL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function JL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ZL=oa.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){JL(a,r);function a(){var i,o,s,l;QL(this,a);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return l=(o=(s=Qd(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(u))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return zo.default.createElement(n,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},zo.default.createElement(t,KL({},s.props,s.state)))},o),Qd(s,l)}return a}(zo.default.Component)};oa.default=ZL;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.active=void 0;var e5=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},t5=le,Uo=n5(t5);function n5(e){return e&&e.__esModule?e:{default:e}}function r5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jd(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function a5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i5=sa.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){a5(a,r);function a(){var i,o,s,l;r5(this,a);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return l=(o=(s=Jd(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(u))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return Uo.default.createElement(n,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},Uo.default.createElement(t,e5({},s.props,s.state)))},o),Jd(s,l)}return a}(Uo.default.Component)};sa.default=i5;var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});var o5=function(t,n){var r={},a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[o]=s};return t===0&&a("first-child"),t===n-1&&a("last-child"),(t===0||t%2===0)&&a("even"),Math.abs(t%2)===1&&a("odd"),a("nth-child",t),r};Fu.default=o5;Object.defineProperty(Ve,"__esModule",{value:!0});Ve.ReactCSS=Ve.loop=Ve.handleActive=Mu=Ve.handleHover=Ve.hover=void 0;var s5=ta,l5=Qn(s5),u5=aa,c5=Qn(u5),f5=ia,d5=Qn(f5),p5=oa,mv=Qn(p5),h5=sa,m5=Qn(h5),g5=Fu,v5=Qn(g5);function Qn(e){return e&&e.__esModule?e:{default:e}}Ve.hover=mv.default;var Mu=Ve.handleHover=mv.default;Ve.handleActive=m5.default;Ve.loop=v5.default;var y5=Ve.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var i=(0,l5.default)(r),o=(0,c5.default)(t,i);return(0,d5.default)(o)},J=Ve.default=y5,b5=function(t,n,r,a,i){var o=i.clientWidth,s=i.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,c=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(i.getBoundingClientRect().left+window.pageXOffset),f=c-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var p=void 0;if(f<0?p=0:f>s?p=1:p=Math.round(f*100/s)/100,n.a!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}else{var g=void 0;if(u<0?g=0:u>o?g=1:g=Math.round(u*100/o)/100,a!==g)return{h:n.h,s:n.s,l:n.l,a:g,source:"rgb"}}return null},qo={},x5=function(t,n,r,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=r*2,i.height=r*2;var o=i.getContext("2d");return o?(o.fillStyle=t,o.fillRect(0,0,i.width,i.height),o.fillStyle=n,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),i.toDataURL()):null},w5=function(t,n,r,a){var i=t+"-"+n+"-"+r+(a?"-server":"");if(qo[i])return qo[i];var o=x5(t,n,r,a);return qo[i]=o,o},Zd=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},Jn=function(t){var n=t.white,r=t.grey,a=t.size,i=t.renderers,o=t.borderRadius,s=t.boxShadow,l=t.children,c=J({default:{grid:{borderRadius:o,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+w5(n,r,a,i.canvas)+") center left"}}});return le.isValidElement(l)?x.cloneElement(l,Zd({},l.props,{style:Zd({},l.props.style,c.grid)})):x.createElement("div",{style:c.grid})};Jn.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var $5=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},S5=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function E5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ep(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function O5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Lu=function(e){O5(t,e);function t(){var n,r,a,i;E5(this,t);for(var o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return i=(r=(a=ep(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(s))),a),a.handleChange=function(c){var u=b5(c,a.props.hsl,a.props.direction,a.props.a,a.container);u&&typeof a.props.onChange=="function"&&a.props.onChange(u,c)},a.handleMouseDown=function(c){a.handleChange(c),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},r),ep(a,i)}return S5(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,a=this.props.rgb,i=J({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
14
14
|
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
15
15
|
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:$5({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return x.createElement("div",{style:i.alpha},x.createElement("div",{style:i.checkboard},x.createElement(Jn,{renderers:this.props.renderers})),x.createElement("div",{style:i.gradient}),x.createElement("div",{style:i.container,ref:function(s){return r.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},x.createElement("div",{style:i.pointer},this.props.pointer?x.createElement(this.props.pointer,this.props):x.createElement("div",{style:i.slider}))))}}]),t}(le.PureComponent||le.Component),A5=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function C5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _5(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function T5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var P5=1,gv=38,j5=40,R5=[gv,j5],F5=function(t){return R5.indexOf(t)>-1},M5=function(t){return Number(String(t).replace(/%/g,""))},L5=1,ae=function(e){T5(t,e);function t(n){k5(this,t);var r=_5(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(a){r.setUpdatedValue(a.target.value,a)},r.handleKeyDown=function(a){var i=M5(a.target.value);if(!isNaN(i)&&F5(a.keyCode)){var o=r.getArrowOffset(),s=a.keyCode===gv?i+o:i-o;r.setUpdatedValue(s,a)}},r.handleDrag=function(a){if(r.props.dragLabel){var i=Math.round(r.props.value+a.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),a)}},r.handleMouseDown=function(a){r.props.dragLabel&&(a.preventDefault(),r.handleDrag(a),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+L5++,r}return A5(t,[{key:"componentDidUpdate",value:function(r,a){this.props.value!==this.state.value&&(r.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return C5({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||P5}},{key:"setUpdatedValue",value:function(r,a){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,a),this.setState({value:r})}},{key:"render",value:function(){var r=this,a=J({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return x.createElement("div",{style:a.wrap},x.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return r.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?x.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(le.PureComponent||le.Component),I5=function(t,n,r,a){var i=a.clientWidth,o=a.clientHeight,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,c=s-(a.getBoundingClientRect().left+window.pageXOffset),u=l-(a.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(u<0)f=359;else if(u>o)f=0;else{var p=-(u*100/o)+100;f=360*p/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var g=void 0;if(c<0)g=0;else if(c>i)g=359;else{var h=c*100/i;g=360*h/100}if(r.h!==g)return{h:g,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},N5=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function D5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tp(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function B5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Zn=function(e){B5(t,e);function t(){var n,r,a,i;D5(this,t);for(var o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return i=(r=(a=tp(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(s))),a),a.handleChange=function(c){var u=I5(c,a.props.direction,a.props.hsl,a.container);u&&typeof a.props.onChange=="function"&&a.props.onChange(u,c)},a.handleMouseDown=function(c){a.handleChange(c),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},r),tp(a,i)}return N5(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,a=this.props.direction,i=a===void 0?"horizontal":a,o=J({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return x.createElement("div",{style:o.hue},x.createElement("div",{className:"hue-"+i,style:o.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},x.createElement("style",null,`
|