xmirror-components 1.0.15 → 1.0.17
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/dist/index.cjs +35 -12
- package/build/dist/index.mjs +2247 -945
- package/build/es/components/AntdApp/index.js +2 -0
- package/build/es/components/GlobalLoading/index.d.ts +6 -0
- package/build/es/components/GlobalLoading/index.js +35 -0
- package/build/es/components/IconFont/index.d.ts +1 -1
- package/build/lib/components/AntdApp/index.js +2 -0
- package/build/lib/components/GlobalLoading/index.d.ts +6 -0
- package/build/lib/components/GlobalLoading/index.js +71 -0
- package/build/lib/components/IconFont/index.d.ts +1 -1
- package/build/lib/index.d.ts +1 -1
- package/build/package.json +1 -1
- package/build/types/components/GlobalLoading/index.d.ts +6 -0
- package/build/types/components/IconFont/index.d.ts +1 -1
- package/package.json +1 -1
package/build/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict"})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),ve=require("antd"),qe=require("react-dom");var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}},we={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var
|
|
10
|
+
*/var Nr;function wt(){if(Nr)return we;Nr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return we.Fragment=t,we.jsx=n,we.jsxs=n,we}var je={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.development.js
|
|
13
13
|
*
|
|
@@ -15,22 +15,45 @@
|
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var
|
|
19
|
-
at`)?" (<anonymous>)":-1<
|
|
20
|
-
`+
|
|
21
|
-
`),
|
|
22
|
-
`);for(
|
|
23
|
-
`+
|
|
18
|
+
*/var Mr;function jt(){return Mr||(Mr=1,process.env.NODE_ENV!=="production"&&function(){function e(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Te?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case J:return"Fragment";case p:return"Portal";case H:return"Profiler";case re:return"StrictMode";case oe:return"Suspense";case Y:return"SuspenseList"}if(typeof s=="object")switch(typeof s.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case pe:return(s.displayName||"Context")+".Provider";case fe:return(s._context.displayName||"Context")+".Consumer";case se:var E=s.render;return s=s.displayName,s||(s=E.displayName||E.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case B:return E=s.displayName||null,E!==null?E:e(s.type)||"Memo";case te:E=s._payload,s=s._init;try{return e(s(E))}catch{}}return null}function t(s){return""+s}function n(s){try{t(s);var E=!1}catch{E=!0}if(E){E=console;var T=E.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&s[Symbol.toStringTag]||s.constructor.name||"Object";return T.call(E,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(s)}}function r(){}function i(){if(O===0){A=console.log,C=console.info,j=console.warn,N=console.error,k=console.group,M=console.groupCollapsed,V=console.groupEnd;var s={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}O++}function o(){if(O--,O===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},s,{value:A}),info:g({},s,{value:C}),warn:g({},s,{value:j}),error:g({},s,{value:N}),group:g({},s,{value:k}),groupCollapsed:g({},s,{value:M}),groupEnd:g({},s,{value:V})})}0>O&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(s){if(m===void 0)try{throw Error()}catch(T){var E=T.stack.trim().match(/\n( *(at )?)/);m=E&&E[1]||"",ne=-1<T.stack.indexOf(`
|
|
19
|
+
at`)?" (<anonymous>)":-1<T.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
20
|
+
`+m+s+ne}function c(s,E){if(!s||me)return"";var T=xe.get(s);if(T!==void 0)return T;me=!0,T=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var I=null;I=ie.H,ie.H=null,i();try{var Z={DetermineComponentFrameRoot:function(){try{if(E){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(de){var Ie=de}Reflect.construct(s,[],ge)}else{try{ge.call()}catch(de){Ie=de}s.call(ge.prototype)}}else{try{throw Error()}catch(de){Ie=de}(ge=s())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(de){if(de&&Ie&&typeof de.stack=="string")return[de.stack,Ie.stack]}return[null,null]}};Z.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var U=Object.getOwnPropertyDescriptor(Z.DetermineComponentFrameRoot,"name");U&&U.configurable&&Object.defineProperty(Z.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=Z.DetermineComponentFrameRoot(),le=w[0],Se=w[1];if(le&&Se){var ee=le.split(`
|
|
21
|
+
`),he=Se.split(`
|
|
22
|
+
`);for(w=U=0;U<ee.length&&!ee[U].includes("DetermineComponentFrameRoot");)U++;for(;w<he.length&&!he[w].includes("DetermineComponentFrameRoot");)w++;if(U===ee.length||w===he.length)for(U=ee.length-1,w=he.length-1;1<=U&&0<=w&&ee[U]!==he[w];)w--;for(;1<=U&&0<=w;U--,w--)if(ee[U]!==he[w]){if(U!==1||w!==1)do if(U--,w--,0>w||ee[U]!==he[w]){var Ce=`
|
|
23
|
+
`+ee[U].replace(" at new "," at ");return s.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",s.displayName)),typeof s=="function"&&xe.set(s,Ce),Ce}while(1<=U&&0<=w);break}}}finally{me=!1,ie.H=I,o(),Error.prepareStackTrace=T}return ee=(ee=s?s.displayName||s.name:"")?a(ee):"",typeof s=="function"&&xe.set(s,ee),ee}function f(s){if(s==null)return"";if(typeof s=="function"){var E=s.prototype;return c(s,!(!E||!E.isReactComponent))}if(typeof s=="string")return a(s);switch(s){case oe:return a("Suspense");case Y:return a("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case se:return s=c(s.render,!1),s;case B:return f(s.type);case te:E=s._payload,s=s._init;try{return f(s(E))}catch{}}return""}function u(){var s=ie.A;return s===null?null:s.getOwner()}function l(s){if(v.call(s,"key")){var E=Object.getOwnPropertyDescriptor(s,"key").get;if(E&&E.isReactWarning)return!1}return s.key!==void 0}function d(s,E){function T(){wr||(wr=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",E))}T.isReactWarning=!0,Object.defineProperty(s,"key",{get:T,configurable:!0})}function y(){var s=e(this.type);return jr[s]||(jr[s]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),s=this.props.ref,s!==void 0?s:null}function b(s,E,T,I,Z,U){return T=U.ref,s={$$typeof:D,type:s,key:E,props:U,_owner:Z},(T!==void 0?T:null)!==null?Object.defineProperty(s,"ref",{enumerable:!1,get:y}):Object.defineProperty(s,"ref",{enumerable:!1,value:null}),s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(s,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}function h(s,E,T,I,Z,U){if(typeof s=="string"||typeof s=="function"||s===J||s===H||s===re||s===oe||s===Y||s===Q||typeof s=="object"&&s!==null&&(s.$$typeof===te||s.$$typeof===B||s.$$typeof===pe||s.$$typeof===fe||s.$$typeof===se||s.$$typeof===P||s.getModuleId!==void 0)){var w=E.children;if(w!==void 0)if(I)if(_(w)){for(I=0;I<w.length;I++)x(w[I],s);Object.freeze&&Object.freeze(w)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(w,s)}else w="",(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(w+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),s===null?I="null":_(s)?I="array":s!==void 0&&s.$$typeof===D?(I="<"+(e(s.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):I=typeof s,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",I,w);if(v.call(E,"key")){w=e(s);var le=Object.keys(E).filter(function(ee){return ee!=="key"});I=0<le.length?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}",Pr[w+I]||(le=0<le.length?"{"+le.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
24
24
|
let props = %s;
|
|
25
25
|
<%s {...props} />
|
|
26
26
|
React keys must be passed directly to JSX without using spread:
|
|
27
27
|
let props = %s;
|
|
28
|
-
<%s key={someKey} {...props} />`,
|
|
28
|
+
<%s key={someKey} {...props} />`,I,w,le,w),Pr[w+I]=!0)}if(w=null,T!==void 0&&(n(T),w=""+T),l(E)&&(n(E.key),w=""+E.key),"key"in E){T={};for(var Se in E)Se!=="key"&&(T[Se]=E[Se])}else T=E;return w&&d(T,typeof s=="function"?s.displayName||s.name||"Unknown":s),b(s,w,U,Z,u(),T)}function x(s,E){if(typeof s=="object"&&s&&s.$$typeof!==Ct){if(_(s))for(var T=0;T<s.length;T++){var I=s[T];$(I)&&G(I,E)}else if($(s))s._store&&(s._store.validated=1);else if(s===null||typeof s!="object"?T=null:(T=ue&&s[ue]||s["@@iterator"],T=typeof T=="function"?T:null),typeof T=="function"&&T!==s.entries&&(T=T.call(s),T!==s))for(;!(s=T.next()).done;)$(s.value)&&G(s.value,E)}}function $(s){return typeof s=="object"&&s!==null&&s.$$typeof===D}function G(s,E){if(s._store&&!s._store.validated&&s.key==null&&(s._store.validated=1,E=X(E),!Ar[E])){Ar[E]=!0;var T="";s&&s._owner!=null&&s._owner!==u()&&(T=null,typeof s._owner.tag=="number"?T=e(s._owner.type):typeof s._owner.name=="string"&&(T=s._owner.name),T=" It was passed a child from "+T+".");var I=ie.getCurrentStack;ie.getCurrentStack=function(){var Z=f(s.type);return I&&(Z+=I()||""),Z},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',E,T),ie.getCurrentStack=I}}function X(s){var E="",T=u();return T&&(T=e(T.type))&&(E=`
|
|
29
29
|
|
|
30
|
-
Check the render method of \``+
|
|
30
|
+
Check the render method of \``+T+"`."),E||(s=e(s))&&(E=`
|
|
31
31
|
|
|
32
|
-
Check the top-level render call using <`+
|
|
32
|
+
Check the top-level render call using <`+s+">."),E}var W=S,D=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),re=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),fe=Symbol.for("react.consumer"),pe=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),ue=Symbol.iterator,Te=Symbol.for("react.client.reference"),ie=W.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,v=Object.prototype.hasOwnProperty,g=Object.assign,P=Symbol.for("react.client.reference"),_=Array.isArray,O=0,A,C,j,N,k,M,V;r.__reactDisabledLog=!0;var m,ne,me=!1,xe=new(typeof WeakMap=="function"?WeakMap:Map),Ct=Symbol.for("react.client.reference"),wr,jr={},Pr={},Ar={};je.Fragment=J,je.jsx=function(s,E,T,I,Z){return h(s,E,T,!1,I,Z)},je.jsxs=function(s,E,T,I,Z){return h(s,E,T,!0,I,Z)}}()),je}var kr;function Pt(){return kr||(kr=1,process.env.NODE_ENV==="production"?De.exports=wt():De.exports=jt()),De.exports}var F=Pt();function Ge(){return Ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ge.apply(null,arguments)}function dt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yr(e,t){return yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},yr(e,t)}function vt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yr(e,t)}var We={exports:{}},Ye={exports:{}},q={};/** @license React v16.13.1
|
|
33
|
+
* react-is.production.min.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/var $r;function At(){if($r)return q;$r=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,G=e?Symbol.for("react.responder"):60118,X=e?Symbol.for("react.scope"):60119;function W(p){if(typeof p=="object"&&p!==null){var J=p.$$typeof;switch(J){case t:switch(p=p.type,p){case f:case u:case r:case o:case i:case d:return p;default:switch(p=p&&p.$$typeof,p){case c:case l:case h:case b:case a:return p;default:return J}}case n:return J}}}function D(p){return W(p)===u}return q.AsyncMode=f,q.ConcurrentMode=u,q.ContextConsumer=c,q.ContextProvider=a,q.Element=t,q.ForwardRef=l,q.Fragment=r,q.Lazy=h,q.Memo=b,q.Portal=n,q.Profiler=o,q.StrictMode=i,q.Suspense=d,q.isAsyncMode=function(p){return D(p)||W(p)===f},q.isConcurrentMode=D,q.isContextConsumer=function(p){return W(p)===c},q.isContextProvider=function(p){return W(p)===a},q.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},q.isForwardRef=function(p){return W(p)===l},q.isFragment=function(p){return W(p)===r},q.isLazy=function(p){return W(p)===h},q.isMemo=function(p){return W(p)===b},q.isPortal=function(p){return W(p)===n},q.isProfiler=function(p){return W(p)===o},q.isStrictMode=function(p){return W(p)===i},q.isSuspense=function(p){return W(p)===d},q.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===u||p===o||p===i||p===d||p===y||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===b||p.$$typeof===a||p.$$typeof===c||p.$$typeof===l||p.$$typeof===$||p.$$typeof===G||p.$$typeof===X||p.$$typeof===x)},q.typeOf=W,q}var L={};/** @license React v16.13.1
|
|
40
|
+
* react-is.development.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/var Ir;function Nt(){return Ir||(Ir=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,G=e?Symbol.for("react.responder"):60118,X=e?Symbol.for("react.scope"):60119;function W(m){return typeof m=="string"||typeof m=="function"||m===r||m===u||m===o||m===i||m===d||m===y||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===b||m.$$typeof===a||m.$$typeof===c||m.$$typeof===l||m.$$typeof===$||m.$$typeof===G||m.$$typeof===X||m.$$typeof===x)}function D(m){if(typeof m=="object"&&m!==null){var ne=m.$$typeof;switch(ne){case t:var me=m.type;switch(me){case f:case u:case r:case o:case i:case d:return me;default:var xe=me&&me.$$typeof;switch(xe){case c:case l:case h:case b:case a:return xe;default:return ne}}case n:return ne}}}var p=f,J=u,re=c,H=a,fe=t,pe=l,se=r,oe=h,Y=b,B=n,te=o,Q=i,ue=d,Te=!1;function ie(m){return Te||(Te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(m)||D(m)===f}function v(m){return D(m)===u}function g(m){return D(m)===c}function P(m){return D(m)===a}function _(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function O(m){return D(m)===l}function A(m){return D(m)===r}function C(m){return D(m)===h}function j(m){return D(m)===b}function N(m){return D(m)===n}function k(m){return D(m)===o}function M(m){return D(m)===i}function V(m){return D(m)===d}L.AsyncMode=p,L.ConcurrentMode=J,L.ContextConsumer=re,L.ContextProvider=H,L.Element=fe,L.ForwardRef=pe,L.Fragment=se,L.Lazy=oe,L.Memo=Y,L.Portal=B,L.Profiler=te,L.StrictMode=Q,L.Suspense=ue,L.isAsyncMode=ie,L.isConcurrentMode=v,L.isContextConsumer=g,L.isContextProvider=P,L.isElement=_,L.isForwardRef=O,L.isFragment=A,L.isLazy=C,L.isMemo=j,L.isPortal=N,L.isProfiler=k,L.isStrictMode=M,L.isSuspense=V,L.isValidElementType=W,L.typeOf=D}()),L}var qr;function pt(){return qr||(qr=1,process.env.NODE_ENV==="production"?Ye.exports=At():Ye.exports=Nt()),Ye.exports}/*
|
|
47
|
+
object-assign
|
|
48
|
+
(c) Sindre Sorhus
|
|
49
|
+
@license MIT
|
|
50
|
+
*/var Xe,Lr;function Mt(){if(Lr)return Xe;Lr=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var f=Object.getOwnPropertyNames(a).map(function(l){return a[l]});if(f.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(l){u[l]=l}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xe=i()?Object.assign:function(o,a){for(var c,f=r(o),u,l=1;l<arguments.length;l++){c=Object(arguments[l]);for(var d in c)t.call(c,d)&&(f[d]=c[d]);if(e){u=e(c);for(var y=0;y<u.length;y++)n.call(c,u[y])&&(f[u[y]]=c[u[y]])}}return f},Xe}var Je,Dr;function Sr(){if(Dr)return Je;Dr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Je=e,Je}var Ze,Wr;function mt(){return Wr||(Wr=1,Ze=Function.call.bind(Object.prototype.hasOwnProperty)),Ze}var Ke,Yr;function kt(){if(Yr)return Ke;Yr=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Sr(),n={},r=mt();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,c,f,u){if(process.env.NODE_ENV!=="production"){for(var l in o)if(r(o,l)){var d;try{if(typeof o[l]!="function"){var y=Error((f||"React class")+": "+c+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}d=o[l](a,l,f,c,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((f||"React class")+": type specification of "+c+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var b=u?u():"";e("Failed "+c+" type: "+d.message+(b??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ke=i,Ke}var Qe,Fr;function $t(){if(Fr)return Qe;Fr=1;var e=pt(),t=Mt(),n=Sr(),r=mt(),i=kt(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var f="Warning: "+c;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function a(){return null}return Qe=function(c,f){var u=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function d(v){var g=v&&(u&&v[u]||v[l]);if(typeof g=="function")return g}var y="<<anonymous>>",b={array:G("array"),bigint:G("bigint"),bool:G("boolean"),func:G("function"),number:G("number"),object:G("object"),string:G("string"),symbol:G("symbol"),any:X(),arrayOf:W,element:D(),elementType:p(),instanceOf:J,node:pe(),objectOf:H,oneOf:re,oneOfType:fe,shape:oe,exact:Y};function h(v,g){return v===g?v!==0||1/v===1/g:v!==v&&g!==g}function x(v,g){this.message=v,this.data=g&&typeof g=="object"?g:{},this.stack=""}x.prototype=Error.prototype;function $(v){if(process.env.NODE_ENV!=="production")var g={},P=0;function _(A,C,j,N,k,M,V){if(N=N||y,M=M||j,V!==n){if(f){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=N+":"+j;!g[ne]&&P<3&&(o("You are manually calling a React.PropTypes validation function for the `"+M+"` prop on `"+N+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),g[ne]=!0,P++)}}return C[j]==null?A?C[j]===null?new x("The "+k+" `"+M+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new x("The "+k+" `"+M+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:v(C,j,N,k,M)}var O=_.bind(null,!1);return O.isRequired=_.bind(null,!0),O}function G(v){function g(P,_,O,A,C,j){var N=P[_],k=Q(N);if(k!==v){var M=ue(N);return new x("Invalid "+A+" `"+C+"` of type "+("`"+M+"` supplied to `"+O+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return $(g)}function X(){return $(a)}function W(v){function g(P,_,O,A,C){if(typeof v!="function")return new x("Property `"+C+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var j=P[_];if(!Array.isArray(j)){var N=Q(j);return new x("Invalid "+A+" `"+C+"` of type "+("`"+N+"` supplied to `"+O+"`, expected an array."))}for(var k=0;k<j.length;k++){var M=v(j,k,O,A,C+"["+k+"]",n);if(M instanceof Error)return M}return null}return $(g)}function D(){function v(g,P,_,O,A){var C=g[P];if(!c(C)){var j=Q(C);return new x("Invalid "+O+" `"+A+"` of type "+("`"+j+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return $(v)}function p(){function v(g,P,_,O,A){var C=g[P];if(!e.isValidElementType(C)){var j=Q(C);return new x("Invalid "+O+" `"+A+"` of type "+("`"+j+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return $(v)}function J(v){function g(P,_,O,A,C){if(!(P[_]instanceof v)){var j=v.name||y,N=ie(P[_]);return new x("Invalid "+A+" `"+C+"` of type "+("`"+N+"` supplied to `"+O+"`, expected ")+("instance of `"+j+"`."))}return null}return $(g)}function re(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function g(P,_,O,A,C){for(var j=P[_],N=0;N<v.length;N++)if(h(j,v[N]))return null;var k=JSON.stringify(v,function(V,m){var ne=ue(m);return ne==="symbol"?String(m):m});return new x("Invalid "+A+" `"+C+"` of value `"+String(j)+"` "+("supplied to `"+O+"`, expected one of "+k+"."))}return $(g)}function H(v){function g(P,_,O,A,C){if(typeof v!="function")return new x("Property `"+C+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var j=P[_],N=Q(j);if(N!=="object")return new x("Invalid "+A+" `"+C+"` of type "+("`"+N+"` supplied to `"+O+"`, expected an object."));for(var k in j)if(r(j,k)){var M=v(j,k,O,A,C+"."+k,n);if(M instanceof Error)return M}return null}return $(g)}function fe(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var g=0;g<v.length;g++){var P=v[g];if(typeof P!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Te(P)+" at index "+g+"."),a}function _(O,A,C,j,N){for(var k=[],M=0;M<v.length;M++){var V=v[M],m=V(O,A,C,j,N,n);if(m==null)return null;m.data&&r(m.data,"expectedType")&&k.push(m.data.expectedType)}var ne=k.length>0?", expected one of type ["+k.join(", ")+"]":"";return new x("Invalid "+j+" `"+N+"` supplied to "+("`"+C+"`"+ne+"."))}return $(_)}function pe(){function v(g,P,_,O,A){return B(g[P])?null:new x("Invalid "+O+" `"+A+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return $(v)}function se(v,g,P,_,O){return new x((v||"React class")+": "+g+" type `"+P+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function oe(v){function g(P,_,O,A,C){var j=P[_],N=Q(j);if(N!=="object")return new x("Invalid "+A+" `"+C+"` of type `"+N+"` "+("supplied to `"+O+"`, expected `object`."));for(var k in v){var M=v[k];if(typeof M!="function")return se(O,A,C,k,ue(M));var V=M(j,k,O,A,C+"."+k,n);if(V)return V}return null}return $(g)}function Y(v){function g(P,_,O,A,C){var j=P[_],N=Q(j);if(N!=="object")return new x("Invalid "+A+" `"+C+"` of type `"+N+"` "+("supplied to `"+O+"`, expected `object`."));var k=t({},P[_],v);for(var M in k){var V=v[M];if(r(v,M)&&typeof V!="function")return se(O,A,C,M,ue(V));if(!V)return new x("Invalid "+A+" `"+C+"` key `"+M+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(P[_],null," ")+`
|
|
51
|
+
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var m=V(j,M,O,A,C+"."+M,n);if(m)return m}return null}return $(g)}function B(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(B);if(v===null||c(v))return!0;var g=d(v);if(g){var P=g.call(v),_;if(g!==v.entries){for(;!(_=P.next()).done;)if(!B(_.value))return!1}else for(;!(_=P.next()).done;){var O=_.value;if(O&&!B(O[1]))return!1}}else return!1;return!0;default:return!1}}function te(v,g){return v==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function Q(v){var g=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":te(g,v)?"symbol":g}function ue(v){if(typeof v>"u"||v===null)return""+v;var g=Q(v);if(g==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return g}function Te(v){var g=ue(v);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function ie(v){return!v.constructor||!v.constructor.name?y:v.constructor.name}return b.checkPropTypes=i,b.resetWarningCache=i.resetWarningCache,b.PropTypes=b,b},Qe}var er,Ur;function It(){if(Ur)return er;Ur=1;var e=Sr();function t(){}function n(){}return n.resetWarningCache=t,er=function(){function r(a,c,f,u,l,d){if(d!==e){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},er}var Gr;function qt(){if(Gr)return We.exports;if(Gr=1,process.env.NODE_ENV!=="production"){var e=pt(),t=!0;We.exports=$t()(e.isElement,t)}else We.exports=It()();return We.exports}var Lt=qt();const R=ze(Lt);function Dt(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Wt(e,t){e.classList?e.classList.add(t):Dt(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Br(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Yt(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Br(e.className,t):e.setAttribute("class",Br(e.className&&e.className.baseVal||"",t))}const zr={disabled:!1};var Ft=process.env.NODE_ENV!=="production"?R.oneOfType([R.number,R.shape({enter:R.number,exit:R.number,appear:R.number}).isRequired]):null,Ut=process.env.NODE_ENV!=="production"?R.oneOfType([R.string,R.shape({enter:R.string,exit:R.string,active:R.string}),R.shape({enter:R.string,enterDone:R.string,enterActive:R.string,exit:R.string,exitDone:R.string,exitActive:R.string})]):null;const gt=S.createContext(null);var ht=function(t){return t.scrollTop},Ae="unmounted",be="exited",ye="entering",_e="entered",Er="exiting",ce=function(e){vt(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,c=a&&!a.isMounting?r.enter:r.appear,f;return o.appearStatus=null,r.in?c?(f=be,o.appearStatus=ye):f=_e:r.unmountOnExit||r.mountOnEnter?f=Ae:f=be,o.state={status:f},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Ae?{status:be}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==ye&&a!==_e&&(o=ye):(a===ye||a===_e)&&(o=Er)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,c;return o=a=c=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,c=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:c}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ye){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:qe.findDOMNode(this);a&&ht(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===be&&this.setState({status:Ae})},n.performEnter=function(i){var o=this,a=this.props.enter,c=this.context?this.context.isMounting:i,f=this.props.nodeRef?[c]:[qe.findDOMNode(this),c],u=f[0],l=f[1],d=this.getTimeouts(),y=c?d.appear:d.enter;if(!i&&!a||zr.disabled){this.safeSetState({status:_e},function(){o.props.onEntered(u)});return}this.props.onEnter(u,l),this.safeSetState({status:ye},function(){o.props.onEntering(u,l),o.onTransitionEnd(y,function(){o.safeSetState({status:_e},function(){o.props.onEntered(u,l)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),c=this.props.nodeRef?void 0:qe.findDOMNode(this);if(!o||zr.disabled){this.safeSetState({status:be},function(){i.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:Er},function(){i.props.onExiting(c),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:be},function(){i.props.onExited(c)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(c){a&&(a=!1,o.nextCallback=null,i(c))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:qe.findDOMNode(this),c=i==null&&!this.props.addEndListener;if(!a||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=f[0],l=f[1];this.props.addEndListener(u,l)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ae)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=dt(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return S.createElement(gt.Provider,{value:null},typeof a=="function"?a(i,c):S.cloneElement(S.Children.only(a),c))},t}(S.Component);ce.contextType=gt;ce.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:R.shape({current:typeof Element>"u"?R.any:function(e,t,n,r,i,o){var a=e[t];return R.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:R.oneOfType([R.func.isRequired,R.element.isRequired]).isRequired,in:R.bool,mountOnEnter:R.bool,unmountOnExit:R.bool,appear:R.bool,enter:R.bool,exit:R.bool,timeout:function(t){var n=Ft;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:R.func,onEnter:R.func,onEntering:R.func,onEntered:R.func,onExit:R.func,onExiting:R.func,onExited:R.func}:{};function Oe(){}ce.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Oe,onEntering:Oe,onEntered:Oe,onExit:Oe,onExiting:Oe,onExited:Oe};ce.UNMOUNTED=Ae;ce.EXITED=be;ce.ENTERING=ye;ce.ENTERED=_e;ce.EXITING=Er;var Gt=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Wt(t,r)})},rr=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Yt(t,r)})},Or=function(e){vt(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(c,f){var u=r.resolveArguments(c,f),l=u[0],d=u[1];r.removeClasses(l,"exit"),r.addClass(l,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(c,f)},r.onEntering=function(c,f){var u=r.resolveArguments(c,f),l=u[0],d=u[1],y=d?"appear":"enter";r.addClass(l,y,"active"),r.props.onEntering&&r.props.onEntering(c,f)},r.onEntered=function(c,f){var u=r.resolveArguments(c,f),l=u[0],d=u[1],y=d?"appear":"enter";r.removeClasses(l,y),r.addClass(l,y,"done"),r.props.onEntered&&r.props.onEntered(c,f)},r.onExit=function(c){var f=r.resolveArguments(c),u=f[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(c)},r.onExiting=function(c){var f=r.resolveArguments(c),u=f[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(c)},r.onExited=function(c){var f=r.resolveArguments(c),u=f[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(c)},r.resolveArguments=function(c,f){return r.props.nodeRef?[r.props.nodeRef.current,c]:[c,f]},r.getClassNames=function(c){var f=r.props.classNames,u=typeof f=="string",l=u&&f?f+"-":"",d=u?""+l+c:f[c],y=u?d+"-active":f[c+"Active"],b=u?d+"-done":f[c+"Done"];return{baseClassName:d,activeClassName:y,doneClassName:b}},r}var n=t.prototype;return n.addClass=function(i,o,a){var c=this.getClassNames(o)[a+"ClassName"],f=this.getClassNames("enter"),u=f.doneClassName;o==="appear"&&a==="done"&&u&&(c+=" "+u),a==="active"&&i&&ht(i),c&&(this.appliedClasses[o][a]=c,Gt(i,c))},n.removeClasses=function(i,o){var a=this.appliedClasses[o],c=a.base,f=a.active,u=a.done;this.appliedClasses[o]={},c&&rr(i,c),f&&rr(i,f),u&&rr(i,u)},n.render=function(){var i=this.props;i.classNames;var o=dt(i,["classNames"]);return S.createElement(ce,Ge({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(S.Component);Or.defaultProps={classNames:""};Or.propTypes=process.env.NODE_ENV!=="production"?Ge({},ce.propTypes,{classNames:Ut,onEnter:R.func,onEntering:R.func,onEntered:R.func,onExit:R.func,onExiting:R.func,onExited:R.func}):{};function Bt(){const e=S.useRef(null),[t,n]=S.useState(!1);return S.useEffect(()=>{},[]),F.jsx(Or,{in:t,nodeRef:e,timeout:500,classNames:"global-loading-transition",unmountOnExit:!0,children:()=>F.jsxs("div",{ref:e,className:"global-loading",children:[F.jsxs("div",{className:"global-loading-container",children:[F.jsx("div",{className:"dot dot-1"}),F.jsx("div",{className:"dot dot-2"}),F.jsx("div",{className:"dot dot-3"}),F.jsx("div",{className:"dot dot-4"}),F.jsx("div",{className:"dot dot-5"})]}),F.jsx("svg",{style:{visibility:"hidden",position:"absolute"},children:F.jsx("defs",{children:F.jsxs("filter",{id:"goo",children:[F.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3",result:"blur"}),F.jsx("feColorMatrix",{in:"blur",type:"matrix",values:`
|
|
52
|
+
1 0 0 0 0
|
|
53
|
+
0 1 0 0 0
|
|
54
|
+
0 0 1 0 0
|
|
55
|
+
0 0 0 18 -2`}),F.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})})]})})}exports.message=ve.message;exports.notification=ve.notification;exports.modal=ve.Modal;function zt({children:e}){const t=ve.App.useApp();return exports.message=t.message,exports.modal=t.modal,exports.notification=t.notification,e||""}function Ht({children:e,...t}){return F.jsxs(ve.App,{...t,children:[F.jsx(Bt,{}),F.jsx(zt,{children:e})]})}const bt=S.forwardRef(({type:e="",className:t="",symbol:n=!1,...r},i)=>n?F.jsx("svg",{className:`iconfont-symbol ${e} ${t}`,"aria-hidden":"true",ref:i,...r,children:F.jsx("use",{xlinkHref:`#${e}`})}):F.jsx("i",{className:`iconfont ${e} ${t}`,ref:i,...r})),Vt=({checked:e,onChange:t,trueValue:n=!0,falseValue:r=!1,trueLabel:i="",falseLabel:o="",children:a,...c})=>{const f=e===n,u=l=>{t==null||t(l.target.checked?n:r,l)};return F.jsx(ve.Checkbox,{checked:f,onChange:u,...c,children:a||(f?i:o)})},Xt=({checked:e,onChange:t,trueValue:n=!0,falseValue:r=!1,...i})=>{const o=e===n,a=(c,f)=>{t==null||t(c?n:r,f)};return F.jsx(ve.Switch,{checked:o,onChange:a,...i})};var Jt=typeof global=="object"&&global&&global.Object===Object&&global,Zt=typeof self=="object"&&self&&self.Object===Object&&self,Kt=Jt||Zt||Function("return this")(),Be=Kt.Symbol,yt=Object.prototype,Qt=yt.hasOwnProperty,en=yt.toString,Pe=Be?Be.toStringTag:void 0;function rn(e){var t=Qt.call(e,Pe),n=e[Pe];try{e[Pe]=void 0;var r=!0}catch{}var i=en.call(e);return r&&(t?e[Pe]=n:delete e[Pe]),i}var tn=Object.prototype,nn=tn.toString;function on(e){return nn.call(e)}var an="[object Null]",sn="[object Undefined]",Hr=Be?Be.toStringTag:void 0;function un(e){return e==null?e===void 0?sn:an:Hr&&Hr in Object(e)?rn(e):on(e)}function cn(e){return e!=null&&typeof e=="object"}var fn=Array.isArray;function ln(){}var dn="[object String]";function vn(e){return typeof e=="string"||!fn(e)&&cn(e)&&un(e)==dn}var tr={exports:{}};/*!
|
|
33
56
|
Copyright (c) 2018 Jed Watson.
|
|
34
57
|
Licensed under the MIT License (MIT), see
|
|
35
58
|
http://jedwatson.github.io/classnames
|
|
36
|
-
*/var fr;function ft(){return fr||(fr=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(o=i(o,a(s)))}return o}function a(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var c="";for(var s in o)t.call(o,s)&&o[s]&&(c=i(c,s));return c}function i(o,c){return c?o?o+" "+c:o+c:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Re)),Re.exports}var lt=ft();const dt=Ge(lt);var vt=function(e){return function(t,r){var a=h.useRef(!1);e(function(){return function(){a.current=!1}},[]),e(function(){if(!a.current)a.current=!0;else return t()},r)}},N=function(){return N=Object.assign||function(t){for(var r,a=1,i=arguments.length;a<i;a++){r=arguments[a];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},N.apply(this,arguments)};function Ar(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r}function gt(e,t,r,a){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function s(d){try{u(a.next(d))}catch(l){c(l)}}function f(d){try{u(a.throw(d))}catch(l){c(l)}}function u(d){d.done?o(d.value):i(d.value).then(s,f)}u((a=a.apply(e,t||[])).next())})}function bt(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,i,o,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=s(0),c.throw=s(1),c.return=s(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(u){return function(d){return f([u,d])}}function f(u){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,u[0]&&(r=0)),r;)try{if(a=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{a=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function j(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,o=[],c;try{for(;(t===void 0||t-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(s){c={error:s}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(c)throw c.error}}return o}function O(e,t,r){if(r||arguments.length===2)for(var a=0,i=t.length,o;a<i;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}var ue=function(e){return typeof e=="function"},he=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";function Z(e){he&&(ue(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=h.useRef(e);t.current=h.useMemo(function(){return e},[e]);var r=h.useRef();return r.current||(r.current=function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];return t.current.apply(this,a)}),r.current}const Ie=vt(h.useEffect);var Cr=function(e,t){var r=t.manual,a=t.ready,i=a===void 0?!0:a,o=t.defaultParams,c=o===void 0?[]:o,s=t.refreshDeps,f=s===void 0?[]:s,u=t.refreshDepsAction,d=h.useRef(!1);return d.current=!1,Ie(function(){!r&&i&&(d.current=!0,e.run.apply(e,O([],j(c),!1)))},[i]),Ie(function(){d.current||r||(d.current=!0,u?u():e.refresh())},O([],j(f),!1)),{onBefore:function(){if(!i)return{stopNow:!0}}}};Cr.onInit=function(e){var t=e.ready,r=t===void 0?!0:t,a=e.manual;return{loading:!a&&r}};function Be(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function Nr(e,t){var r=h.useRef({deps:t,obj:void 0,initialized:!1}).current;return(r.initialized===!1||!Be(r.deps,t))&&(r.deps=t,r.obj=e(),r.initialized=!0),r.obj}function Ye(e){var t=h.useRef(e);return t.current=e,t}var ye=function(e){he&&(ue(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=Ye(e);h.useEffect(function(){return function(){t.current()}},[])},ge=new Map,mt=function(e,t,r){var a=ge.get(e);a!=null&&a.timer&&clearTimeout(a.timer);var i=void 0;t>-1&&(i=setTimeout(function(){ge.delete(e)},t)),ge.set(e,N(N({},r),{timer:i}))},ht=function(e){return ge.get(e)},be=new Map,yt=function(e){return be.get(e)},pt=function(e,t){be.set(e,t),t.then(function(r){return be.delete(e),r}).catch(function(){be.delete(e)})},J={},Et=function(e,t){J[e]&&J[e].forEach(function(r){return r(t)})},je=function(e,t){return J[e]||(J[e]=[]),J[e].push(t),function(){var a=J[e].indexOf(t);J[e].splice(a,1)}},Tt=function(e,t){var r=t.cacheKey,a=t.cacheTime,i=a===void 0?5*60*1e3:a,o=t.staleTime,c=o===void 0?0:o,s=t.setCache,f=t.getCache,u=h.useRef(),d=h.useRef(),l=function(m,b){s?s(b):mt(m,i,b),Et(m,b.data)},p=function(m,b){return b===void 0&&(b=[]),f?f(b):ht(m)};return Nr(function(){if(r){var m=p(r);m&&Object.hasOwnProperty.call(m,"data")&&(e.state.data=m.data,e.state.params=m.params,(c===-1||new Date().getTime()-m.time<=c)&&(e.state.loading=!1)),u.current=je(r,function(b){e.setState({data:b})})}},[]),ye(function(){var m;(m=u.current)===null||m===void 0||m.call(u)}),r?{onBefore:function(m){var b=p(r,m);return!b||!Object.hasOwnProperty.call(b,"data")?{}:c===-1||new Date().getTime()-b.time<=c?{loading:!1,data:b==null?void 0:b.data,error:void 0,returnNow:!0}:{data:b==null?void 0:b.data,error:void 0}},onRequest:function(m,b){var T=yt(r);return T&&T!==d.current?{servicePromise:T}:(T=m.apply(void 0,O([],j(b),!1)),d.current=T,pt(r,T),{servicePromise:T})},onSuccess:function(m,b){var T;r&&((T=u.current)===null||T===void 0||T.call(u),l(r,{data:m,params:b,time:new Date().getTime()}),u.current=je(r,function(x){e.setState({data:x})}))},onMutate:function(m){var b;r&&((b=u.current)===null||b===void 0||b.call(u),l(r,{data:m,params:e.state.params,time:new Date().getTime()}),u.current=je(r,function(T){e.setState({data:T})}))}}:{}},Se,lr;function He(){if(lr)return Se;lr=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Se=e,Se}var Oe,dr;function wt(){if(dr)return Oe;dr=1;var e=typeof de=="object"&&de&&de.Object===Object&&de;return Oe=e,Oe}var _e,vr;function kr(){if(vr)return _e;vr=1;var e=wt(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _e=r,_e}var xe,gr;function Rt(){if(gr)return xe;gr=1;var e=kr(),t=function(){return e.Date.now()};return xe=t,xe}var Pe,br;function jt(){if(br)return Pe;br=1;var e=/\s/;function t(r){for(var a=r.length;a--&&e.test(r.charAt(a)););return a}return Pe=t,Pe}var Ae,mr;function St(){if(mr)return Ae;mr=1;var e=jt(),t=/^\s+/;function r(a){return a&&a.slice(0,e(a)+1).replace(t,"")}return Ae=r,Ae}var Ce,hr;function qr(){if(hr)return Ce;hr=1;var e=kr(),t=e.Symbol;return Ce=t,Ce}var Ne,yr;function Ot(){if(yr)return Ne;yr=1;var e=qr(),t=Object.prototype,r=t.hasOwnProperty,a=t.toString,i=e?e.toStringTag:void 0;function o(c){var s=r.call(c,i),f=c[i];try{c[i]=void 0;var u=!0}catch{}var d=a.call(c);return u&&(s?c[i]=f:delete c[i]),d}return Ne=o,Ne}var ke,pr;function _t(){if(pr)return ke;pr=1;var e=Object.prototype,t=e.toString;function r(a){return t.call(a)}return ke=r,ke}var qe,Er;function xt(){if(Er)return qe;Er=1;var e=qr(),t=Ot(),r=_t(),a="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function c(s){return s==null?s===void 0?i:a:o&&o in Object(s)?t(s):r(s)}return qe=c,qe}var Me,Tr;function Pt(){if(Tr)return Me;Tr=1;function e(t){return t!=null&&typeof t=="object"}return Me=e,Me}var We,wr;function At(){if(wr)return We;wr=1;var e=xt(),t=Pt(),r="[object Symbol]";function a(i){return typeof i=="symbol"||t(i)&&e(i)==r}return We=a,We}var $e,Rr;function Ct(){if(Rr)return $e;Rr=1;var e=St(),t=He(),r=At(),a=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;function f(u){if(typeof u=="number")return u;if(r(u))return a;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var l=o.test(u);return l||c.test(u)?s(u.slice(2),l?2:8):i.test(u)?a:+u}return $e=f,$e}var Le,jr;function Mr(){if(jr)return Le;jr=1;var e=He(),t=Rt(),r=Ct(),a="Expected a function",i=Math.max,o=Math.min;function c(s,f,u){var d,l,p,m,b,T,x=0,M=!1,k=!1,W=!0;if(typeof s!="function")throw new TypeError(a);f=r(f)||0,e(u)&&(M=!!u.leading,k="maxWait"in u,p=k?i(r(u.maxWait)||0,f):p,W="trailing"in u?!!u.trailing:W);function q(w){var A=d,L=l;return d=l=void 0,x=w,m=s.apply(L,A),m}function H(w){return x=w,b=setTimeout(P,f),M?q(w):m}function G(w){var A=w-T,L=w-x,fe=f-A;return k?o(fe,p-L):fe}function $(w){var A=w-T,L=w-x;return T===void 0||A>=f||A<0||k&&L>=p}function P(){var w=t();if($(w))return Q(w);b=setTimeout(P,G(w))}function Q(w){return b=void 0,W&&d?q(w):(d=l=void 0,m)}function se(){b!==void 0&&clearTimeout(b),x=0,d=T=l=b=void 0}function K(){return b===void 0?m:Q(t())}function U(){var w=t(),A=$(w);if(d=arguments,l=this,T=w,A){if(b===void 0)return H(T);if(k)return clearTimeout(b),b=setTimeout(P,f),q(T)}return b===void 0&&(b=setTimeout(P,f)),m}return U.cancel=se,U.flush=K,U}return Le=c,Le}var Nt=Mr();const kt=Ge(Nt);var qt=function(e,t){var r=t.debounceWait,a=t.debounceLeading,i=t.debounceTrailing,o=t.debounceMaxWait,c=h.useRef(),s=h.useMemo(function(){var f={};return a!==void 0&&(f.leading=a),i!==void 0&&(f.trailing=i),o!==void 0&&(f.maxWait=o),f},[a,i,o]);return h.useEffect(function(){if(r){var f=e.runAsync.bind(e);return c.current=kt(function(u){u()},r,s),e.runAsync=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return new Promise(function(l,p){var m;(m=c.current)===null||m===void 0||m.call(c,function(){f.apply(void 0,O([],j(u),!1)).then(l).catch(p)})})},function(){var u;(u=c.current)===null||u===void 0||u.cancel(),e.runAsync=f}}},[r,s]),r?{onCancel:function(){var f;(f=c.current)===null||f===void 0||f.cancel()}}:{}},Mt=function(e,t){var r=t.loadingDelay,a=t.ready,i=h.useRef();if(!r)return{};var o=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return o(),a!==!1&&(i.current=setTimeout(function(){e.setState({loading:!0})},r)),{loading:!1}},onFinally:function(){o()},onCancel:function(){o()}}},ce=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ue(){return ce?document.visibilityState!=="hidden":!0}var oe=[];function Wt(e){return oe.push(e),function(){var r=oe.indexOf(e);oe.splice(r,1)}}if(ce){var $t=function(){if(Ue())for(var e=0;e<oe.length;e++){var t=oe[e];t()}};window.addEventListener("visibilitychange",$t,!1)}var Lt=function(e,t){var r=t.pollingInterval,a=t.pollingWhenHidden,i=a===void 0?!0:a,o=t.pollingErrorRetryCount,c=o===void 0?-1:o,s=h.useRef(),f=h.useRef(),u=h.useRef(0),d=function(){var l;s.current&&clearTimeout(s.current),(l=f.current)===null||l===void 0||l.call(f)};return Ie(function(){r||d()},[r]),r?{onBefore:function(){d()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){c===-1||c!==-1&&u.current<=c?s.current=setTimeout(function(){!i&&!Ue()?f.current=Wt(function(){e.refresh()}):e.refresh()},r):u.current=0},onCancel:function(){d()}}:{}};function Ft(e,t){var r=!1;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];r||(r=!0,e.apply(void 0,O([],j(a),!1)),setTimeout(function(){r=!1},t))}}function It(){return ce&&typeof navigator.onLine<"u"?navigator.onLine:!0}var ie=[];function Bt(e){return ie.push(e),function(){var r=ie.indexOf(e);r>-1&&ie.splice(r,1)}}if(ce){var Sr=function(){if(!(!Ue()||!It()))for(var e=0;e<ie.length;e++){var t=ie[e];t()}};window.addEventListener("visibilitychange",Sr,!1),window.addEventListener("focus",Sr,!1)}var Gt=function(e,t){var r=t.refreshOnWindowFocus,a=t.focusTimespan,i=a===void 0?5e3:a,o=h.useRef(),c=function(){var s;(s=o.current)===null||s===void 0||s.call(o)};return h.useEffect(function(){if(r){var s=Ft(e.refresh.bind(e),i);o.current=Bt(function(){s()})}return function(){c()}},[r,i]),ye(function(){c()}),{}},Yt=function(e,t){var r=t.retryInterval,a=t.retryCount,i=h.useRef(),o=h.useRef(0),c=h.useRef(!1);return a?{onBefore:function(){c.current||(o.current=0),c.current=!1,i.current&&clearTimeout(i.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,a===-1||o.current<=a){var s=r??Math.min(1e3*Math.pow(2,o.current),3e4);i.current=setTimeout(function(){c.current=!0,e.refresh()},s)}else o.current=0},onCancel:function(){o.current=0,i.current&&clearTimeout(i.current)}}:{}},Fe,Or;function Ht(){if(Or)return Fe;Or=1;var e=Mr(),t=He(),r="Expected a function";function a(i,o,c){var s=!0,f=!0;if(typeof i!="function")throw new TypeError(r);return t(c)&&(s="leading"in c?!!c.leading:s,f="trailing"in c?!!c.trailing:f),e(i,o,{leading:s,maxWait:o,trailing:f})}return Fe=a,Fe}var Ut=Ht();const zt=Ge(Ut);var Dt=function(e,t){var r=t.throttleWait,a=t.throttleLeading,i=t.throttleTrailing,o=h.useRef(),c={};return a!==void 0&&(c.leading=a),i!==void 0&&(c.trailing=i),h.useEffect(function(){if(r){var s=e.runAsync.bind(e);return o.current=zt(function(f){f()},r,c),e.runAsync=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];return new Promise(function(d,l){var p;(p=o.current)===null||p===void 0||p.call(o,function(){s.apply(void 0,O([],j(f),!1)).then(d).catch(l)})})},function(){var f;e.runAsync=s,(f=o.current)===null||f===void 0||f.cancel()}}},[r,a,i]),r?{onCancel:function(){var s;(s=o.current)===null||s===void 0||s.cancel()}}:{}},Vt=function(e){he&&(ue(e)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof e,'".'))),h.useEffect(function(){e==null||e()},[])},Jt=function(){var e=j(h.useState({}),2),t=e[1];return h.useCallback(function(){return t({})},[])},Xt=function(){function e(t,r,a,i){i===void 0&&(i={}),this.serviceRef=t,this.options=r,this.subscribe=a,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=N(N(N({},this.state),{loading:!r.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=N(N({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var i=this.pluginImpls.map(function(o){var c;return(c=o[t])===null||c===void 0?void 0:c.call.apply(c,O([o],j(r),!1))}).filter(Boolean);return Object.assign.apply(Object,O([{}],j(i),!1))},e.prototype.runAsync=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return gt(this,void 0,void 0,function(){var a,i,o,c,s,f,u,d,l,p,m,b,T,x,M,k,W,q,H,G,$;return bt(this,function(P){switch(P.label){case 0:if(this.count+=1,a=this.count,i=this.runPluginHandler("onBefore",t),o=i.stopNow,c=o===void 0?!1:o,s=i.returnNow,f=s===void 0?!1:s,u=Ar(i,["stopNow","returnNow"]),c)return[2,new Promise(function(){})];if(this.setState(N({loading:!0,params:t},u)),f)return[2,Promise.resolve(u.data)];(T=(b=this.options).onBefore)===null||T===void 0||T.call(b,t),P.label=1;case 1:return P.trys.push([1,3,,4]),d=this.runPluginHandler("onRequest",this.serviceRef.current,t).servicePromise,d||(d=(m=this.serviceRef).current.apply(m,O([],j(t),!1))),[4,d];case 2:return l=P.sent(),a!==this.count?[2,new Promise(function(){})]:(this.setState({data:l,error:void 0,loading:!1}),(M=(x=this.options).onSuccess)===null||M===void 0||M.call(x,l,t),this.runPluginHandler("onSuccess",l,t),(W=(k=this.options).onFinally)===null||W===void 0||W.call(k,t,l,void 0),a===this.count&&this.runPluginHandler("onFinally",t,l,void 0),[2,l]);case 3:if(p=P.sent(),a!==this.count)return[2,new Promise(function(){})];throw this.setState({error:p,loading:!1}),(H=(q=this.options).onError)===null||H===void 0||H.call(q,p,t),this.runPluginHandler("onError",p,t),($=(G=this.options).onFinally)===null||$===void 0||$.call(G,t,void 0,p),a===this.count&&this.runPluginHandler("onFinally",t,void 0,p),p;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];this.runAsync.apply(this,O([],j(r),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,O([],j(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,O([],j(this.state.params||[]),!1))},e.prototype.mutate=function(t){var r=ue(t)?t(this.state.data):t;this.runPluginHandler("onMutate",r),this.setState({data:r})},e}();function Zt(e,t,r){t===void 0&&(t={}),r===void 0&&(r=[]);var a=t.manual,i=a===void 0?!1:a,o=t.ready,c=o===void 0?!0:o,s=Ar(t,["manual","ready"]);he&&t.defaultParams&&!Array.isArray(t.defaultParams)&&console.warn("expected defaultParams is array, got ".concat(typeof t.defaultParams));var f=N({manual:i,ready:c},s),u=Ye(e),d=Jt(),l=Nr(function(){var p=r.map(function(m){var b;return(b=m==null?void 0:m.onInit)===null||b===void 0?void 0:b.call(m,f)}).filter(Boolean);return new Xt(u,f,d,Object.assign.apply(Object,O([{}],j(p),!1)))},[]);return l.options=f,l.pluginImpls=r.map(function(p){return p(l,f)}),Vt(function(){if(!i&&c){var p=l.state.params||t.defaultParams||[];l.run.apply(l,O([],j(p),!1))}}),ye(function(){l.cancel()}),{loading:l.state.loading,data:l.state.data,error:l.state.error,params:l.state.params||[],cancel:Z(l.cancel.bind(l)),refresh:Z(l.refresh.bind(l)),refreshAsync:Z(l.refreshAsync.bind(l)),run:Z(l.run.bind(l)),runAsync:Z(l.runAsync.bind(l)),mutate:Z(l.mutate.bind(l))}}function Qt(e,t,r){return Zt(e,t,O(O([],j(r||[]),!1),[qt,Mt,Lt,Gt,Dt,Cr,Tt,Yt],!1))}function Kt(e,t){var r=j(h.useState(e),2),a=r[0],i=r[1],o=h.useMemo(function(){var c=!0,s=function(){return i(function(l){return l===e?c:e})},f=function(l){return i(l)},u=function(){return i(e)},d=function(){return i(c)};return{toggle:s,set:f,setLeft:u,setRight:d}},[]);return[a,o]}function en(e){var t=j(Kt(!1),2),r=t[0],a=t[1],i=a.toggle,o=a.set,c=h.useMemo(function(){var s=function(){return o(!0)},f=function(){return o(!1)};return{toggle:i,set:function(u){return o(!!u)},setTrue:s,setFalse:f}},[]);return[r,c]}function Wr(e,t){if(ce){if(!e)return t;var r;return ue(e)?r=e():"current"in e?r=e.current:r=e,r}}var rn=function(e){var t=function(r,a,i){var o=h.useRef(!1),c=h.useRef([]),s=h.useRef([]),f=h.useRef();e(function(){var u,d=Array.isArray(i)?i:[i],l=d.map(function(p){return Wr(p)});if(!o.current){o.current=!0,c.current=l,s.current=a,f.current=r();return}(l.length!==c.current.length||!Be(c.current,l)||!Be(s.current,a))&&((u=f.current)===null||u===void 0||u.call(f),c.current=l,s.current=a,f.current=r())}),ye(function(){var u;(u=f.current)===null||u===void 0||u.call(f),o.current=!1})};return t},tn=rn(h.useEffect);function _r(e,t,r){r===void 0&&(r={});var a=r.enable,i=a===void 0?!0:a,o=Ye(t);tn(function(){if(i){var c=Wr(r.target,window);if(c!=null&&c.addEventListener){var s=function(u){return o.current(u)},f=Array.isArray(e)?e:[e];return f.forEach(function(u){c.addEventListener(u,s,{capture:r.capture,once:r.once,passive:r.passive})}),function(){f.forEach(function(u){c.removeEventListener(u,s,{capture:r.capture})})}}}},[e,r.capture,r.once,r.passive,i],r.target)}const nn=function(e,t){var r={},a=r.onEnter,i=r.onLeave,o=r.onChange,c=j(en(),2),s=c[0],f=c[1],u=f.setTrue,d=f.setFalse;return _r("mouseenter",function(){a==null||a(),u(),o==null||o(!0)},{target:e}),_r("mouseleave",function(){i==null||i(),d(),o==null||o(!1)},{target:e}),s},an={},on=(e,t)=>{const r=h.useRef(null),{icon:a,tooltipDisabled:i=!1,onClick:o=ut,disabled:c,size:s="middle",style:f={},className:u,loading:d=!1,...l}=e,p=nn(r),m=()=>st(a)&&a.includes("icon-")?C.jsx(xr,{type:a}):a,b=C.jsx(B.Button,{onClick:o,size:s,disabled:c,style:f,ref:t,loading:d,className:dt([u,an.btn_icon__warp]),icon:m()});if(!a)throw new Error("IconButton 组件必须传入 icon 属性");return C.jsxs(h.Fragment,{children:[i&&b,!i&&C.jsx(B.Tooltip,{open:p,trigger:"contextMenu",destroyTooltipOnHide:!0,...l,children:C.jsx("span",{ref:r,style:{display:"inline-block"},className:"icon-button-box",children:b})})]})},un=h.forwardRef(on);function cn(e,t,r){const a=Qt(e,{...t,onError(o,c){var s;((t==null?void 0:t.errorMessage)??!0)&&exports.message.error(o.message),(s=t==null?void 0:t.onError)==null||s.call(t,o,c)}},r),i=a.data&&typeof a.data=="object"&&"data"in a.data?a.data.data:a.data;return{...a,data:i}}exports.App=Hr;exports.CheckboxValue=Ur;exports.IconButton=un;exports.IconFont=xr;exports.SwitchValue=zr;exports.useRequest=cn;
|
|
59
|
+
*/var Vr;function pn(){return Vr||(Vr=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var c in o)t.call(o,c)&&o[c]&&(a=i(a,c));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(tr)),tr.exports}var mn=pn();const gn=ze(mn);var hn=function(e){return function(t,n){var r=S.useRef(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},ae=function(){return ae=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ae.apply(this,arguments)};function Et(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function bn(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function c(l){try{u(r.next(l))}catch(d){a(d)}}function f(l){try{u(r.throw(l))}catch(d){a(d)}}function u(l){l.done?o(l.value):i(l.value).then(c,f)}u((r=r.apply(e,t||[])).next())})}function yn(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(l){return f([u,l])}}function f(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(l){u=[6,l],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function z(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(c){a={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function K(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var ke=function(e){return typeof e=="function"},He=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test";function Re(e){He&&(ke(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=S.useRef(e);t.current=S.useMemo(function(){return e},[e]);var n=S.useRef();return n.current||(n.current=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current}const Tr=hn(S.useEffect);var Tt=function(e,t){var n=t.manual,r=t.ready,i=r===void 0?!0:r,o=t.defaultParams,a=o===void 0?[]:o,c=t.refreshDeps,f=c===void 0?[]:c,u=t.refreshDepsAction,l=S.useRef(!1);return l.current=!1,Tr(function(){!n&&i&&(l.current=!0,e.run.apply(e,K([],z(a),!1)))},[i]),Tr(function(){l.current||n||(l.current=!0,u?u():e.refresh())},K([],z(f),!1)),{onBefore:function(){if(!i)return{stopNow:!0}}}};Tt.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};function xr(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function xt(e,t){var n=S.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!xr(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function Rr(e){var t=S.useRef(e);return t.current=e,t}var Ve=function(e){He&&(ke(e)||console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));var t=Rr(e);S.useEffect(function(){return function(){t.current()}},[])},Fe=new Map,En=function(e,t,n){var r=Fe.get(e);r!=null&&r.timer&&clearTimeout(r.timer);var i=void 0;t>-1&&(i=setTimeout(function(){Fe.delete(e)},t)),Fe.set(e,ae(ae({},n),{timer:i}))},Tn=function(e){return Fe.get(e)},Ue=new Map,xn=function(e){return Ue.get(e)},Sn=function(e,t){Ue.set(e,t),t.then(function(n){return Ue.delete(e),n}).catch(function(){Ue.delete(e)})},Ee={},On=function(e,t){Ee[e]&&Ee[e].forEach(function(n){return n(t)})},nr=function(e,t){return Ee[e]||(Ee[e]=[]),Ee[e].push(t),function(){var r=Ee[e].indexOf(t);Ee[e].splice(r,1)}},Rn=function(e,t){var n=t.cacheKey,r=t.cacheTime,i=r===void 0?5*60*1e3:r,o=t.staleTime,a=o===void 0?0:o,c=t.setCache,f=t.getCache,u=S.useRef(),l=S.useRef(),d=function(b,h){c?c(h):En(b,i,h),On(b,h.data)},y=function(b,h){return h===void 0&&(h=[]),f?f(h):Tn(b)};return xt(function(){if(n){var b=y(n);b&&Object.hasOwnProperty.call(b,"data")&&(e.state.data=b.data,e.state.params=b.params,(a===-1||new Date().getTime()-b.time<=a)&&(e.state.loading=!1)),u.current=nr(n,function(h){e.setState({data:h})})}},[]),Ve(function(){var b;(b=u.current)===null||b===void 0||b.call(u)}),n?{onBefore:function(b){var h=y(n,b);return!h||!Object.hasOwnProperty.call(h,"data")?{}:a===-1||new Date().getTime()-h.time<=a?{loading:!1,data:h==null?void 0:h.data,error:void 0,returnNow:!0}:{data:h==null?void 0:h.data,error:void 0}},onRequest:function(b,h){var x=xn(n);return x&&x!==l.current?{servicePromise:x}:(x=b.apply(void 0,K([],z(h),!1)),l.current=x,Sn(n,x),{servicePromise:x})},onSuccess:function(b,h){var x;n&&((x=u.current)===null||x===void 0||x.call(u),d(n,{data:b,params:h,time:new Date().getTime()}),u.current=nr(n,function($){e.setState({data:$})}))},onMutate:function(b){var h;n&&((h=u.current)===null||h===void 0||h.call(u),d(n,{data:b,params:e.state.params,time:new Date().getTime()}),u.current=nr(n,function(x){e.setState({data:x})}))}}:{}},or,Xr;function _r(){if(Xr)return or;Xr=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return or=e,or}var ir,Jr;function _n(){if(Jr)return ir;Jr=1;var e=typeof Le=="object"&&Le&&Le.Object===Object&&Le;return ir=e,ir}var ar,Zr;function St(){if(Zr)return ar;Zr=1;var e=_n(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return ar=n,ar}var sr,Kr;function Cn(){if(Kr)return sr;Kr=1;var e=St(),t=function(){return e.Date.now()};return sr=t,sr}var ur,Qr;function wn(){if(Qr)return ur;Qr=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return ur=t,ur}var cr,et;function jn(){if(et)return cr;et=1;var e=wn(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return cr=n,cr}var fr,rt;function Ot(){if(rt)return fr;rt=1;var e=St(),t=e.Symbol;return fr=t,fr}var lr,tt;function Pn(){if(tt)return lr;tt=1;var e=Ot(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var c=n.call(a,i),f=a[i];try{a[i]=void 0;var u=!0}catch{}var l=r.call(a);return u&&(c?a[i]=f:delete a[i]),l}return lr=o,lr}var dr,nt;function An(){if(nt)return dr;nt=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return dr=n,dr}var vr,ot;function Nn(){if(ot)return vr;ot=1;var e=Ot(),t=Pn(),n=An(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(c){return c==null?c===void 0?i:r:o&&o in Object(c)?t(c):n(c)}return vr=a,vr}var pr,it;function Mn(){if(it)return pr;it=1;function e(t){return t!=null&&typeof t=="object"}return pr=e,pr}var mr,at;function kn(){if(at)return mr;at=1;var e=Nn(),t=Mn(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return mr=r,mr}var gr,st;function $n(){if(st)return gr;st=1;var e=jn(),t=_r(),n=kn(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt;function f(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=t(l)?l+"":l}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=o.test(u);return d||a.test(u)?c(u.slice(2),d?2:8):i.test(u)?r:+u}return gr=f,gr}var hr,ut;function Rt(){if(ut)return hr;ut=1;var e=_r(),t=Cn(),n=$n(),r="Expected a function",i=Math.max,o=Math.min;function a(c,f,u){var l,d,y,b,h,x,$=0,G=!1,X=!1,W=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(u)&&(G=!!u.leading,X="maxWait"in u,y=X?i(n(u.maxWait)||0,f):y,W="trailing"in u?!!u.trailing:W);function D(Y){var B=l,te=d;return l=d=void 0,$=Y,b=c.apply(te,B),b}function p(Y){return $=Y,h=setTimeout(H,f),G?D(Y):b}function J(Y){var B=Y-x,te=Y-$,Q=f-B;return X?o(Q,y-te):Q}function re(Y){var B=Y-x,te=Y-$;return x===void 0||B>=f||B<0||X&&te>=y}function H(){var Y=t();if(re(Y))return fe(Y);h=setTimeout(H,J(Y))}function fe(Y){return h=void 0,W&&l?D(Y):(l=d=void 0,b)}function pe(){h!==void 0&&clearTimeout(h),$=0,l=x=d=h=void 0}function se(){return h===void 0?b:fe(t())}function oe(){var Y=t(),B=re(Y);if(l=arguments,d=this,x=Y,B){if(h===void 0)return p(x);if(X)return clearTimeout(h),h=setTimeout(H,f),D(x)}return h===void 0&&(h=setTimeout(H,f)),b}return oe.cancel=pe,oe.flush=se,oe}return hr=a,hr}var In=Rt();const qn=ze(In);var Ln=function(e,t){var n=t.debounceWait,r=t.debounceLeading,i=t.debounceTrailing,o=t.debounceMaxWait,a=S.useRef(),c=S.useMemo(function(){var f={};return r!==void 0&&(f.leading=r),i!==void 0&&(f.trailing=i),o!==void 0&&(f.maxWait=o),f},[r,i,o]);return S.useEffect(function(){if(n){var f=e.runAsync.bind(e);return a.current=qn(function(u){u()},n,c),e.runAsync=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return new Promise(function(d,y){var b;(b=a.current)===null||b===void 0||b.call(a,function(){f.apply(void 0,K([],z(u),!1)).then(d).catch(y)})})},function(){var u;(u=a.current)===null||u===void 0||u.cancel(),e.runAsync=f}}},[n,c]),n?{onCancel:function(){var f;(f=a.current)===null||f===void 0||f.cancel()}}:{}},Dn=function(e,t){var n=t.loadingDelay,r=t.ready,i=S.useRef();if(!n)return{};var o=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return o(),r!==!1&&(i.current=setTimeout(function(){e.setState({loading:!0})},n)),{loading:!1}},onFinally:function(){o()},onCancel:function(){o()}}},$e=!!(typeof window<"u"&&window.document&&window.document.createElement);function Cr(){return $e?document.visibilityState!=="hidden":!0}var Ne=[];function Wn(e){return Ne.push(e),function(){var n=Ne.indexOf(e);Ne.splice(n,1)}}if($e){var Yn=function(){if(Cr())for(var e=0;e<Ne.length;e++){var t=Ne[e];t()}};window.addEventListener("visibilitychange",Yn,!1)}var Fn=function(e,t){var n=t.pollingInterval,r=t.pollingWhenHidden,i=r===void 0?!0:r,o=t.pollingErrorRetryCount,a=o===void 0?-1:o,c=S.useRef(),f=S.useRef(),u=S.useRef(0),l=function(){var d;c.current&&clearTimeout(c.current),(d=f.current)===null||d===void 0||d.call(f)};return Tr(function(){n||l()},[n]),n?{onBefore:function(){l()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){a===-1||a!==-1&&u.current<=a?c.current=setTimeout(function(){!i&&!Cr()?f.current=Wn(function(){e.refresh()}):e.refresh()},n):u.current=0},onCancel:function(){l()}}:{}};function Un(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n||(n=!0,e.apply(void 0,K([],z(r),!1)),setTimeout(function(){n=!1},t))}}function Gn(){return $e&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Me=[];function Bn(e){return Me.push(e),function(){var n=Me.indexOf(e);n>-1&&Me.splice(n,1)}}if($e){var ct=function(){if(!(!Cr()||!Gn()))for(var e=0;e<Me.length;e++){var t=Me[e];t()}};window.addEventListener("visibilitychange",ct,!1),window.addEventListener("focus",ct,!1)}var zn=function(e,t){var n=t.refreshOnWindowFocus,r=t.focusTimespan,i=r===void 0?5e3:r,o=S.useRef(),a=function(){var c;(c=o.current)===null||c===void 0||c.call(o)};return S.useEffect(function(){if(n){var c=Un(e.refresh.bind(e),i);o.current=Bn(function(){c()})}return function(){a()}},[n,i]),Ve(function(){a()}),{}},Hn=function(e,t){var n=t.retryInterval,r=t.retryCount,i=S.useRef(),o=S.useRef(0),a=S.useRef(!1);return r?{onBefore:function(){a.current||(o.current=0),a.current=!1,i.current&&clearTimeout(i.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,r===-1||o.current<=r){var c=n??Math.min(1e3*Math.pow(2,o.current),3e4);i.current=setTimeout(function(){a.current=!0,e.refresh()},c)}else o.current=0},onCancel:function(){o.current=0,i.current&&clearTimeout(i.current)}}:{}},br,ft;function Vn(){if(ft)return br;ft=1;var e=Rt(),t=_r(),n="Expected a function";function r(i,o,a){var c=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(c="leading"in a?!!a.leading:c,f="trailing"in a?!!a.trailing:f),e(i,o,{leading:c,maxWait:o,trailing:f})}return br=r,br}var Xn=Vn();const Jn=ze(Xn);var Zn=function(e,t){var n=t.throttleWait,r=t.throttleLeading,i=t.throttleTrailing,o=S.useRef(),a={};return r!==void 0&&(a.leading=r),i!==void 0&&(a.trailing=i),S.useEffect(function(){if(n){var c=e.runAsync.bind(e);return o.current=Jn(function(f){f()},n,a),e.runAsync=function(){for(var f=[],u=0;u<arguments.length;u++)f[u]=arguments[u];return new Promise(function(l,d){var y;(y=o.current)===null||y===void 0||y.call(o,function(){c.apply(void 0,K([],z(f),!1)).then(l).catch(d)})})},function(){var f;e.runAsync=c,(f=o.current)===null||f===void 0||f.cancel()}}},[n,r,i]),n?{onCancel:function(){var c;(c=o.current)===null||c===void 0||c.cancel()}}:{}},Kn=function(e){He&&(ke(e)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof e,'".'))),S.useEffect(function(){e==null||e()},[])},Qn=function(){var e=z(S.useState({}),2),t=e[1];return S.useCallback(function(){return t({})},[])},eo=function(){function e(t,n,r,i){i===void 0&&(i={}),this.serviceRef=t,this.options=n,this.subscribe=r,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=ae(ae(ae({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=ae(ae({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.pluginImpls.map(function(o){var a;return(a=o[t])===null||a===void 0?void 0:a.call.apply(a,K([o],z(n),!1))}).filter(Boolean);return Object.assign.apply(Object,K([{}],z(i),!1))},e.prototype.runAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return bn(this,void 0,void 0,function(){var r,i,o,a,c,f,u,l,d,y,b,h,x,$,G,X,W,D,p,J,re;return yn(this,function(H){switch(H.label){case 0:if(this.count+=1,r=this.count,i=this.runPluginHandler("onBefore",t),o=i.stopNow,a=o===void 0?!1:o,c=i.returnNow,f=c===void 0?!1:c,u=Et(i,["stopNow","returnNow"]),a)return[2,new Promise(function(){})];if(this.setState(ae({loading:!0,params:t},u)),f)return[2,Promise.resolve(u.data)];(x=(h=this.options).onBefore)===null||x===void 0||x.call(h,t),H.label=1;case 1:return H.trys.push([1,3,,4]),l=this.runPluginHandler("onRequest",this.serviceRef.current,t).servicePromise,l||(l=(b=this.serviceRef).current.apply(b,K([],z(t),!1))),[4,l];case 2:return d=H.sent(),r!==this.count?[2,new Promise(function(){})]:(this.setState({data:d,error:void 0,loading:!1}),(G=($=this.options).onSuccess)===null||G===void 0||G.call($,d,t),this.runPluginHandler("onSuccess",d,t),(W=(X=this.options).onFinally)===null||W===void 0||W.call(X,t,d,void 0),r===this.count&&this.runPluginHandler("onFinally",t,d,void 0),[2,d]);case 3:if(y=H.sent(),r!==this.count)return[2,new Promise(function(){})];throw this.setState({error:y,loading:!1}),(p=(D=this.options).onError)===null||p===void 0||p.call(D,y,t),this.runPluginHandler("onError",y,t),(re=(J=this.options).onFinally)===null||re===void 0||re.call(J,t,void 0,y),r===this.count&&this.runPluginHandler("onFinally",t,void 0,y),y;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,K([],z(n),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,K([],z(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,K([],z(this.state.params||[]),!1))},e.prototype.mutate=function(t){var n=ke(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();function ro(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,o=t.ready,a=o===void 0?!0:o,c=Et(t,["manual","ready"]);He&&t.defaultParams&&!Array.isArray(t.defaultParams)&&console.warn("expected defaultParams is array, got ".concat(typeof t.defaultParams));var f=ae({manual:i,ready:a},c),u=Rr(e),l=Qn(),d=xt(function(){var y=n.map(function(b){var h;return(h=b==null?void 0:b.onInit)===null||h===void 0?void 0:h.call(b,f)}).filter(Boolean);return new eo(u,f,l,Object.assign.apply(Object,K([{}],z(y),!1)))},[]);return d.options=f,d.pluginImpls=n.map(function(y){return y(d,f)}),Kn(function(){if(!i&&a){var y=d.state.params||t.defaultParams||[];d.run.apply(d,K([],z(y),!1))}}),Ve(function(){d.cancel()}),{loading:d.state.loading,data:d.state.data,error:d.state.error,params:d.state.params||[],cancel:Re(d.cancel.bind(d)),refresh:Re(d.refresh.bind(d)),refreshAsync:Re(d.refreshAsync.bind(d)),run:Re(d.run.bind(d)),runAsync:Re(d.runAsync.bind(d)),mutate:Re(d.mutate.bind(d))}}function to(e,t,n){return ro(e,t,K(K([],z(n||[]),!1),[Ln,Dn,Fn,zn,Zn,Tt,Rn,Hn],!1))}function no(e,t){var n=z(S.useState(e),2),r=n[0],i=n[1],o=S.useMemo(function(){var a=!0,c=function(){return i(function(d){return d===e?a:e})},f=function(d){return i(d)},u=function(){return i(e)},l=function(){return i(a)};return{toggle:c,set:f,setLeft:u,setRight:l}},[]);return[r,o]}function oo(e){var t=z(no(!1),2),n=t[0],r=t[1],i=r.toggle,o=r.set,a=S.useMemo(function(){var c=function(){return o(!0)},f=function(){return o(!1)};return{toggle:i,set:function(u){return o(!!u)},setTrue:c,setFalse:f}},[]);return[n,a]}function _t(e,t){if($e){if(!e)return t;var n;return ke(e)?n=e():"current"in e?n=e.current:n=e,n}}var io=function(e){var t=function(n,r,i){var o=S.useRef(!1),a=S.useRef([]),c=S.useRef([]),f=S.useRef();e(function(){var u,l=Array.isArray(i)?i:[i],d=l.map(function(y){return _t(y)});if(!o.current){o.current=!0,a.current=d,c.current=r,f.current=n();return}(d.length!==a.current.length||!xr(a.current,d)||!xr(c.current,r))&&((u=f.current)===null||u===void 0||u.call(f),a.current=d,c.current=r,f.current=n())}),Ve(function(){var u;(u=f.current)===null||u===void 0||u.call(f),o.current=!1})};return t},ao=io(S.useEffect);function lt(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0?!0:r,o=Rr(t);ao(function(){if(i){var a=_t(n.target,window);if(a!=null&&a.addEventListener){var c=function(u){return o.current(u)},f=Array.isArray(e)?e:[e];return f.forEach(function(u){a.addEventListener(u,c,{capture:n.capture,once:n.once,passive:n.passive})}),function(){f.forEach(function(u){a.removeEventListener(u,c,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}const so=function(e,t){var n={},r=n.onEnter,i=n.onLeave,o=n.onChange,a=z(oo(),2),c=a[0],f=a[1],u=f.setTrue,l=f.setFalse;return lt("mouseenter",function(){r==null||r(),u(),o==null||o(!0)},{target:e}),lt("mouseleave",function(){i==null||i(),l(),o==null||o(!1)},{target:e}),c},uo={},co=(e,t)=>{const n=S.useRef(null),{icon:r,tooltipDisabled:i=!1,onClick:o=ln,disabled:a,size:c="middle",style:f={},className:u,loading:l=!1,...d}=e,y=so(n),b=()=>vn(r)&&r.includes("icon-")?F.jsx(bt,{type:r}):r,h=F.jsx(ve.Button,{onClick:o,size:c,disabled:a,style:f,ref:t,loading:l,className:gn([u,uo.btn_icon__warp]),icon:b()});if(!r)throw new Error("IconButton 组件必须传入 icon 属性");return F.jsxs(S.Fragment,{children:[i&&h,!i&&F.jsx(ve.Tooltip,{open:y,trigger:"contextMenu",destroyTooltipOnHide:!0,...d,children:F.jsx("span",{ref:n,style:{display:"inline-block"},className:"icon-button-box",children:h})})]})},fo=S.forwardRef(co);function lo(e,t,n){const r=to(e,{...t,onError(o,a){var c;((t==null?void 0:t.errorMessage)??!0)&&exports.message.error(o.message),(c=t==null?void 0:t.onError)==null||c.call(t,o,a)}},n),i=r.data&&typeof r.data=="object"&&"data"in r.data?r.data.data:r.data;return{...r,data:i}}exports.App=Ht;exports.CheckboxValue=Vt;exports.IconButton=fo;exports.IconFont=bt;exports.SwitchValue=Xt;exports.useRequest=lo;
|