xph-crud 0.1.6 → 0.1.7

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var qt;function yn(){if(qt)return We;qt=1;var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,c,u){var f,g={},h=null,y=null;u!==void 0&&(h=""+u),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(y=c.ref);for(f in c)n.call(c,f)&&!i.hasOwnProperty(f)&&(g[f]=c[f]);if(a&&a.defaultProps)for(f in c=a.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:a,key:h,ref:y,props:g,_owner:o.current}}return We.Fragment=r,We.jsx=s,We.jsxs=s,We}var Ne={};/**
9
+ */var qt;function yn(){if(qt)return We;qt=1;var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,c,u){var f,g={},p=null,y=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(y=c.ref);for(f in c)n.call(c,f)&&!i.hasOwnProperty(f)&&(g[f]=c[f]);if(a&&a.defaultProps)for(f in c=a.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:a,key:p,ref:y,props:g,_owner:o.current}}return We.Fragment=r,We.jsx=s,We.jsxs=s,We}var Ne={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Gt;function _n(){return Gt||(Gt=1,process.env.NODE_ENV!=="production"&&function(){var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),p=Symbol.iterator,x="@@iterator";function j(l){if(l===null||typeof l!="object")return null;var b=p&&l[p]||l[x];return typeof b=="function"?b:null}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(l){{for(var b=arguments.length,P=new Array(b>1?b-1:0),N=1;N<b;N++)P[N-1]=arguments[N];R("error",l,P)}}function R(l,b,P){{var N=z.ReactDebugCurrentFrame,K=N.getStackAddendum();K!==""&&(b+="%s",P=P.concat([K]));var Z=P.map(function(G){return String(G)});Z.unshift("Warning: "+b),Function.prototype.apply.call(console[l],console,Z)}}var V=!1,q=!1,X=!1,B=!1,F=!1,E;E=Symbol.for("react.module.reference");function _(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===i||F||l===o||l===u||l===f||B||l===y||V||q||X||typeof l=="object"&&l!==null&&(l.$$typeof===h||l.$$typeof===g||l.$$typeof===s||l.$$typeof===a||l.$$typeof===c||l.$$typeof===E||l.getModuleId!==void 0))}function S(l,b,P){var N=l.displayName;if(N)return N;var K=b.displayName||b.name||"";return K!==""?P+"("+K+")":P}function L(l){return l.displayName||"Context"}function W(l){if(l==null)return null;if(typeof l.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case a:var b=l;return L(b)+".Consumer";case s:var P=l;return L(P._context)+".Provider";case c:return S(l,l.render,"ForwardRef");case g:var N=l.displayName||null;return N!==null?N:W(l.type)||"Memo";case h:{var K=l,Z=K._payload,G=K._init;try{return W(G(Z))}catch{return null}}}return null}var w=Object.assign,v=0,C,D,T,k,$,A,I;function H(){}H.__reactDisabledLog=!0;function re(){{if(v===0){C=console.log,D=console.info,T=console.warn,k=console.error,$=console.group,A=console.groupCollapsed,I=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}v++}}function se(){{if(v--,v===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:w({},l,{value:C}),info:w({},l,{value:D}),warn:w({},l,{value:T}),error:w({},l,{value:k}),group:w({},l,{value:$}),groupCollapsed:w({},l,{value:A}),groupEnd:w({},l,{value:I})})}v<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var he=z.ReactCurrentDispatcher,de;function ie(l,b,P){{if(de===void 0)try{throw Error()}catch(K){var N=K.stack.trim().match(/\n( *(at )?)/);de=N&&N[1]||""}return`
18
- `+de+l}}var ce=!1,ee;{var ge=typeof WeakMap=="function"?WeakMap:Map;ee=new ge}function ve(l,b){if(!l||ce)return"";{var P=ee.get(l);if(P!==void 0)return P}var N;ce=!0;var K=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=he.current,he.current=null,re();try{if(b){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(ue){N=ue}Reflect.construct(l,[],G)}else{try{G.call()}catch(ue){N=ue}l.call(G.prototype)}}else{try{throw Error()}catch(ue){N=ue}l()}}catch(ue){if(ue&&N&&typeof ue.stack=="string"){for(var U=ue.stack.split(`
17
+ */var Gt;function _n(){return Gt||(Gt=1,process.env.NODE_ENV!=="production"&&function(){var e=d,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),h=Symbol.iterator,x="@@iterator";function j(l){if(l===null||typeof l!="object")return null;var b=h&&l[h]||l[x];return typeof b=="function"?b:null}var z=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function M(l){{for(var b=arguments.length,P=new Array(b>1?b-1:0),N=1;N<b;N++)P[N-1]=arguments[N];R("error",l,P)}}function R(l,b,P){{var N=z.ReactDebugCurrentFrame,K=N.getStackAddendum();K!==""&&(b+="%s",P=P.concat([K]));var Z=P.map(function(G){return String(G)});Z.unshift("Warning: "+b),Function.prototype.apply.call(console[l],console,Z)}}var U=!1,q=!1,X=!1,B=!1,F=!1,E;E=Symbol.for("react.module.reference");function _(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===i||F||l===o||l===u||l===f||B||l===y||U||q||X||typeof l=="object"&&l!==null&&(l.$$typeof===p||l.$$typeof===g||l.$$typeof===s||l.$$typeof===a||l.$$typeof===c||l.$$typeof===E||l.getModuleId!==void 0))}function S(l,b,P){var N=l.displayName;if(N)return N;var K=b.displayName||b.name||"";return K!==""?P+"("+K+")":P}function L(l){return l.displayName||"Context"}function W(l){if(l==null)return null;if(typeof l.tag=="number"&&M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case a:var b=l;return L(b)+".Consumer";case s:var P=l;return L(P._context)+".Provider";case c:return S(l,l.render,"ForwardRef");case g:var N=l.displayName||null;return N!==null?N:W(l.type)||"Memo";case p:{var K=l,Z=K._payload,G=K._init;try{return W(G(Z))}catch{return null}}}return null}var w=Object.assign,v=0,C,D,T,k,$,A,I;function H(){}H.__reactDisabledLog=!0;function re(){{if(v===0){C=console.log,D=console.info,T=console.warn,k=console.error,$=console.group,A=console.groupCollapsed,I=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}v++}}function se(){{if(v--,v===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:w({},l,{value:C}),info:w({},l,{value:D}),warn:w({},l,{value:T}),error:w({},l,{value:k}),group:w({},l,{value:$}),groupCollapsed:w({},l,{value:A}),groupEnd:w({},l,{value:I})})}v<0&&M("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var he=z.ReactCurrentDispatcher,de;function ie(l,b,P){{if(de===void 0)try{throw Error()}catch(K){var N=K.stack.trim().match(/\n( *(at )?)/);de=N&&N[1]||""}return`
18
+ `+de+l}}var ce=!1,ee;{var ge=typeof WeakMap=="function"?WeakMap:Map;ee=new ge}function ve(l,b){if(!l||ce)return"";{var P=ee.get(l);if(P!==void 0)return P}var N;ce=!0;var K=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Z;Z=he.current,he.current=null,re();try{if(b){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(ue){N=ue}Reflect.construct(l,[],G)}else{try{G.call()}catch(ue){N=ue}l.call(G.prototype)}}else{try{throw Error()}catch(ue){N=ue}l()}}catch(ue){if(ue&&N&&typeof ue.stack=="string"){for(var V=ue.stack.split(`
19
19
  `),ae=N.stack.split(`
20
- `),te=U.length-1,ne=ae.length-1;te>=1&&ne>=0&&U[te]!==ae[ne];)ne--;for(;te>=1&&ne>=0;te--,ne--)if(U[te]!==ae[ne]){if(te!==1||ne!==1)do if(te--,ne--,ne<0||U[te]!==ae[ne]){var me=`
21
- `+U[te].replace(" at new "," at ");return l.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",l.displayName)),typeof l=="function"&&ee.set(l,me),me}while(te>=1&&ne>=0);break}}}finally{ce=!1,he.current=Z,se(),Error.prepareStackTrace=K}var Le=l?l.displayName||l.name:"",ke=Le?ie(Le):"";return typeof l=="function"&&ee.set(l,ke),ke}function je(l,b,P){return ve(l,!1)}function kt(l){var b=l.prototype;return!!(b&&b.isReactComponent)}function Ee(l,b,P){if(l==null)return"";if(typeof l=="function")return ve(l,kt(l));if(typeof l=="string")return ie(l);switch(l){case u:return ie("Suspense");case f:return ie("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case c:return je(l.render);case g:return Ee(l.type,b,P);case h:{var N=l,K=N._payload,Z=N._init;try{return Ee(Z(K),b,P)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,Rt={},Re=z.ReactDebugCurrentFrame;function Ie(l){if(l){var b=l._owner,P=Ee(l.type,l._source,b?b.type:null);Re.setExtraStackFrame(P)}else Re.setExtraStackFrame(null)}function It(l,b,P,N,K){{var Z=Function.call.bind(Me);for(var G in l)if(Z(l,G)){var U=void 0;try{if(typeof l[G]!="function"){var ae=Error((N||"React class")+": "+P+" type `"+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[G]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}U=l[G](b,G,N,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){U=te}U&&!(U instanceof Error)&&(Ie(K),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",N||"React class",P,G,typeof U),Ie(null)),U instanceof Error&&!(U.message in Rt)&&(Rt[U.message]=!0,Ie(K),M("Failed %s type: %s",P,U.message),Ie(null))}}}var zt=Array.isArray;function Ge(l){return zt(l)}function Lt(l){{var b=typeof Symbol=="function"&&Symbol.toStringTag,P=b&&l[Symbol.toStringTag]||l.constructor.name||"Object";return P}}function Wt(l){try{return on(l),!1}catch{return!0}}function on(l){return""+l}function sn(l){if(Wt(l))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lt(l)),on(l)}var Xe=z.ReactCurrentOwner,Yl={key:!0,ref:!0,__self:!0,__source:!0},an,ln,Nt;Nt={};function ql(l){if(Me.call(l,"ref")){var b=Object.getOwnPropertyDescriptor(l,"ref").get;if(b&&b.isReactWarning)return!1}return l.ref!==void 0}function Gl(l){if(Me.call(l,"key")){var b=Object.getOwnPropertyDescriptor(l,"key").get;if(b&&b.isReactWarning)return!1}return l.key!==void 0}function Xl(l,b){if(typeof l.ref=="string"&&Xe.current&&b&&Xe.current.stateNode!==b){var P=W(Xe.current.type);Nt[P]||(M('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(Xe.current.type),l.ref),Nt[P]=!0)}}function Kl(l,b){{var P=function(){an||(an=!0,M("%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://reactjs.org/link/special-props)",b))};P.isReactWarning=!0,Object.defineProperty(l,"key",{get:P,configurable:!0})}}function Jl(l,b){{var P=function(){ln||(ln=!0,M("%s: `ref` 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://reactjs.org/link/special-props)",b))};P.isReactWarning=!0,Object.defineProperty(l,"ref",{get:P,configurable:!0})}}var Zl=function(l,b,P,N,K,Z,G){var U={$$typeof:t,type:l,key:b,ref:P,props:G,_owner:Z};return U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(U,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Ql(l,b,P,N,K){{var Z,G={},U=null,ae=null;P!==void 0&&(sn(P),U=""+P),Gl(b)&&(sn(b.key),U=""+b.key),ql(b)&&(ae=b.ref,Xl(b,K));for(Z in b)Me.call(b,Z)&&!Yl.hasOwnProperty(Z)&&(G[Z]=b[Z]);if(l&&l.defaultProps){var te=l.defaultProps;for(Z in te)G[Z]===void 0&&(G[Z]=te[Z])}if(U||ae){var ne=typeof l=="function"?l.displayName||l.name||"Unknown":l;U&&Kl(G,ne),ae&&Jl(G,ne)}return Zl(l,U,ae,K,N,Xe.current,G)}}var Ht=z.ReactCurrentOwner,cn=z.ReactDebugCurrentFrame;function ze(l){if(l){var b=l._owner,P=Ee(l.type,l._source,b?b.type:null);cn.setExtraStackFrame(P)}else cn.setExtraStackFrame(null)}var Bt;Bt=!1;function Ut(l){return typeof l=="object"&&l!==null&&l.$$typeof===t}function un(){{if(Ht.current){var l=W(Ht.current.type);if(l)return`
20
+ `),te=V.length-1,ne=ae.length-1;te>=1&&ne>=0&&V[te]!==ae[ne];)ne--;for(;te>=1&&ne>=0;te--,ne--)if(V[te]!==ae[ne]){if(te!==1||ne!==1)do if(te--,ne--,ne<0||V[te]!==ae[ne]){var me=`
21
+ `+V[te].replace(" at new "," at ");return l.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",l.displayName)),typeof l=="function"&&ee.set(l,me),me}while(te>=1&&ne>=0);break}}}finally{ce=!1,he.current=Z,se(),Error.prepareStackTrace=K}var Le=l?l.displayName||l.name:"",ke=Le?ie(Le):"";return typeof l=="function"&&ee.set(l,ke),ke}function je(l,b,P){return ve(l,!1)}function kt(l){var b=l.prototype;return!!(b&&b.isReactComponent)}function Ee(l,b,P){if(l==null)return"";if(typeof l=="function")return ve(l,kt(l));if(typeof l=="string")return ie(l);switch(l){case u:return ie("Suspense");case f:return ie("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case c:return je(l.render);case g:return Ee(l.type,b,P);case p:{var N=l,K=N._payload,Z=N._init;try{return Ee(Z(K),b,P)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,Rt={},Re=z.ReactDebugCurrentFrame;function Ie(l){if(l){var b=l._owner,P=Ee(l.type,l._source,b?b.type:null);Re.setExtraStackFrame(P)}else Re.setExtraStackFrame(null)}function It(l,b,P,N,K){{var Z=Function.call.bind(Me);for(var G in l)if(Z(l,G)){var V=void 0;try{if(typeof l[G]!="function"){var ae=Error((N||"React class")+": "+P+" type `"+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[G]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}V=l[G](b,G,N,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(te){V=te}V&&!(V instanceof Error)&&(Ie(K),M("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",N||"React class",P,G,typeof V),Ie(null)),V instanceof Error&&!(V.message in Rt)&&(Rt[V.message]=!0,Ie(K),M("Failed %s type: %s",P,V.message),Ie(null))}}}var zt=Array.isArray;function Ge(l){return zt(l)}function Lt(l){{var b=typeof Symbol=="function"&&Symbol.toStringTag,P=b&&l[Symbol.toStringTag]||l.constructor.name||"Object";return P}}function Wt(l){try{return on(l),!1}catch{return!0}}function on(l){return""+l}function sn(l){if(Wt(l))return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lt(l)),on(l)}var Xe=z.ReactCurrentOwner,Yl={key:!0,ref:!0,__self:!0,__source:!0},an,ln,Nt;Nt={};function ql(l){if(Me.call(l,"ref")){var b=Object.getOwnPropertyDescriptor(l,"ref").get;if(b&&b.isReactWarning)return!1}return l.ref!==void 0}function Gl(l){if(Me.call(l,"key")){var b=Object.getOwnPropertyDescriptor(l,"key").get;if(b&&b.isReactWarning)return!1}return l.key!==void 0}function Xl(l,b){if(typeof l.ref=="string"&&Xe.current&&b&&Xe.current.stateNode!==b){var P=W(Xe.current.type);Nt[P]||(M('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(Xe.current.type),l.ref),Nt[P]=!0)}}function Kl(l,b){{var P=function(){an||(an=!0,M("%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://reactjs.org/link/special-props)",b))};P.isReactWarning=!0,Object.defineProperty(l,"key",{get:P,configurable:!0})}}function Jl(l,b){{var P=function(){ln||(ln=!0,M("%s: `ref` 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://reactjs.org/link/special-props)",b))};P.isReactWarning=!0,Object.defineProperty(l,"ref",{get:P,configurable:!0})}}var Zl=function(l,b,P,N,K,Z,G){var V={$$typeof:t,type:l,key:b,ref:P,props:G,_owner:Z};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function Ql(l,b,P,N,K){{var Z,G={},V=null,ae=null;P!==void 0&&(sn(P),V=""+P),Gl(b)&&(sn(b.key),V=""+b.key),ql(b)&&(ae=b.ref,Xl(b,K));for(Z in b)Me.call(b,Z)&&!Yl.hasOwnProperty(Z)&&(G[Z]=b[Z]);if(l&&l.defaultProps){var te=l.defaultProps;for(Z in te)G[Z]===void 0&&(G[Z]=te[Z])}if(V||ae){var ne=typeof l=="function"?l.displayName||l.name||"Unknown":l;V&&Kl(G,ne),ae&&Jl(G,ne)}return Zl(l,V,ae,K,N,Xe.current,G)}}var Ht=z.ReactCurrentOwner,cn=z.ReactDebugCurrentFrame;function ze(l){if(l){var b=l._owner,P=Ee(l.type,l._source,b?b.type:null);cn.setExtraStackFrame(P)}else cn.setExtraStackFrame(null)}var Bt;Bt=!1;function Vt(l){return typeof l=="object"&&l!==null&&l.$$typeof===t}function un(){{if(Ht.current){var l=W(Ht.current.type);if(l)return`
22
22
 
23
23
  Check the render method of \``+l+"`."}return""}}function ec(l){return""}var fn={};function tc(l){{var b=un();if(!b){var P=typeof l=="string"?l:l.displayName||l.name;P&&(b=`
24
24
 
25
- Check the top-level render call using <`+P+">.")}return b}}function dn(l,b){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var P=tc(b);if(fn[P])return;fn[P]=!0;var N="";l&&l._owner&&l._owner!==Ht.current&&(N=" It was passed a child from "+W(l._owner.type)+"."),ze(l),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,N),ze(null)}}function pn(l,b){{if(typeof l!="object")return;if(Ge(l))for(var P=0;P<l.length;P++){var N=l[P];Ut(N)&&dn(N,b)}else if(Ut(l))l._store&&(l._store.validated=!0);else if(l){var K=j(l);if(typeof K=="function"&&K!==l.entries)for(var Z=K.call(l),G;!(G=Z.next()).done;)Ut(G.value)&&dn(G.value,b)}}}function rc(l){{var b=l.type;if(b==null||typeof b=="string")return;var P;if(typeof b=="function")P=b.propTypes;else if(typeof b=="object"&&(b.$$typeof===c||b.$$typeof===g))P=b.propTypes;else return;if(P){var N=W(b);It(P,l.props,"prop",N,l)}else if(b.PropTypes!==void 0&&!Bt){Bt=!0;var K=W(b);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",K||"Unknown")}typeof b.getDefaultProps=="function"&&!b.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nc(l){{for(var b=Object.keys(l.props),P=0;P<b.length;P++){var N=b[P];if(N!=="children"&&N!=="key"){ze(l),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),ze(null);break}}l.ref!==null&&(ze(l),M("Invalid attribute `ref` supplied to `React.Fragment`."),ze(null))}}var hn={};function gn(l,b,P,N,K,Z){{var G=_(l);if(!G){var U="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(U+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=ec();ae?U+=ae:U+=un();var te;l===null?te="null":Ge(l)?te="array":l!==void 0&&l.$$typeof===t?(te="<"+(W(l.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):te=typeof l,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",te,U)}var ne=Ql(l,b,P,K,Z);if(ne==null)return ne;if(G){var me=b.children;if(me!==void 0)if(N)if(Ge(me)){for(var Le=0;Le<me.length;Le++)pn(me[Le],l);Object.freeze&&Object.freeze(me)}else M("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 pn(me,l)}if(Me.call(b,"key")){var ke=W(l),ue=Object.keys(b).filter(function(cc){return cc!=="key"}),Vt=ue.length>0?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}";if(!hn[ke+Vt]){var lc=ue.length>0?"{"+ue.join(": ..., ")+": ...}":"{}";M(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+P+">.")}return b}}function dn(l,b){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var P=tc(b);if(fn[P])return;fn[P]=!0;var N="";l&&l._owner&&l._owner!==Ht.current&&(N=" It was passed a child from "+W(l._owner.type)+"."),ze(l),M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,N),ze(null)}}function pn(l,b){{if(typeof l!="object")return;if(Ge(l))for(var P=0;P<l.length;P++){var N=l[P];Vt(N)&&dn(N,b)}else if(Vt(l))l._store&&(l._store.validated=!0);else if(l){var K=j(l);if(typeof K=="function"&&K!==l.entries)for(var Z=K.call(l),G;!(G=Z.next()).done;)Vt(G.value)&&dn(G.value,b)}}}function rc(l){{var b=l.type;if(b==null||typeof b=="string")return;var P;if(typeof b=="function")P=b.propTypes;else if(typeof b=="object"&&(b.$$typeof===c||b.$$typeof===g))P=b.propTypes;else return;if(P){var N=W(b);It(P,l.props,"prop",N,l)}else if(b.PropTypes!==void 0&&!Bt){Bt=!0;var K=W(b);M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",K||"Unknown")}typeof b.getDefaultProps=="function"&&!b.getDefaultProps.isReactClassApproved&&M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nc(l){{for(var b=Object.keys(l.props),P=0;P<b.length;P++){var N=b[P];if(N!=="children"&&N!=="key"){ze(l),M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),ze(null);break}}l.ref!==null&&(ze(l),M("Invalid attribute `ref` supplied to `React.Fragment`."),ze(null))}}var hn={};function gn(l,b,P,N,K,Z){{var G=_(l);if(!G){var V="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(V+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=ec();ae?V+=ae:V+=un();var te;l===null?te="null":Ge(l)?te="array":l!==void 0&&l.$$typeof===t?(te="<"+(W(l.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):te=typeof l,M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",te,V)}var ne=Ql(l,b,P,K,Z);if(ne==null)return ne;if(G){var me=b.children;if(me!==void 0)if(N)if(Ge(me)){for(var Le=0;Le<me.length;Le++)pn(me[Le],l);Object.freeze&&Object.freeze(me)}else M("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 pn(me,l)}if(Me.call(b,"key")){var ke=W(l),ue=Object.keys(b).filter(function(cc){return cc!=="key"}),Ut=ue.length>0?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}";if(!hn[ke+Ut]){var lc=ue.length>0?"{"+ue.join(": ..., ")+": ...}":"{}";M(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Vt,ke,lc,ke),hn[ke+Vt]=!0}}return l===n?nc(ne):rc(ne),ne}}function oc(l,b,P){return gn(l,b,P,!0)}function sc(l,b,P){return gn(l,b,P,!1)}var ic=sc,ac=oc;Ne.Fragment=n,Ne.jsx=ic,Ne.jsxs=ac}()),Ne}process.env.NODE_ENV==="production"?pt.exports=yn():pt.exports=_n();var m=pt.exports,Xt=typeof global=="object"&&global&&global.Object===Object&&global,wn=typeof self=="object"&&self&&self.Object===Object&&self,_e=Xt||wn||Function("return this")(),Pe=_e.Symbol,Kt=Object.prototype,Cn=Kt.hasOwnProperty,xn=Kt.toString,He=Pe?Pe.toStringTag:void 0;function Sn(e){var t=Cn.call(e,He),r=e[He];try{e[He]=void 0;var n=!0}catch{}var o=xn.call(e);return n&&(t?e[He]=r:delete e[He]),o}var Tn=Object.prototype,Pn=Tn.toString;function $n(e){return Pn.call(e)}var Dn="[object Null]",jn="[object Undefined]",Jt=Pe?Pe.toStringTag:void 0;function we(e){return e==null?e===void 0?jn:Dn:Jt&&Jt in Object(e)?Sn(e):$n(e)}function be(e){return e!=null&&typeof e=="object"}var En="[object Symbol]";function ht(e){return typeof e=="symbol"||be(e)&&we(e)==En}function Fn(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var fe=Array.isArray,On=1/0,Zt=Pe?Pe.prototype:void 0,Qt=Zt?Zt.toString:void 0;function er(e){if(typeof e=="string")return e;if(fe(e))return Fn(e,er)+"";if(ht(e))return Qt?Qt.call(e):"";var t=e+"";return t=="0"&&1/e==-On?"-0":t}function pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tr(e){return e}var An="[object AsyncFunction]",Mn="[object Function]",kn="[object GeneratorFunction]",Rn="[object Proxy]";function oe(e){if(!pe(e))return!1;var t=we(e);return t==Mn||t==kn||t==An||t==Rn}var gt=_e["__core-js_shared__"],rr=function(){var e=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function In(e){return!!rr&&rr in e}var zn=Function.prototype,Ln=zn.toString;function Fe(e){if(e!=null){try{return Ln.call(e)}catch{}try{return e+""}catch{}}return""}var Wn=/[\\^$.*+?()[\]{}|]/g,Nn=/^\[object .+?Constructor\]$/,Hn=Function.prototype,Bn=Object.prototype,Un=Hn.toString,Vn=Bn.hasOwnProperty,Yn=RegExp("^"+Un.call(Vn).replace(Wn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qn(e){if(!pe(e)||In(e))return!1;var t=oe(e)?Yn:Nn;return t.test(Fe(e))}function Gn(e,t){return e==null?void 0:e[t]}function Oe(e,t){var r=Gn(e,t);return qn(r)?r:void 0}var mt=Oe(_e,"WeakMap"),nr=Object.create,Xn=function(){function e(){}return function(t){if(!pe(t))return{};if(nr)return nr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Kn(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Jn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Zn=800,Qn=16,eo=Date.now;function to(e){var t=0,r=0;return function(){var n=eo(),o=Qn-(n-r);if(r=n,o>0){if(++t>=Zn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ro(e){return function(){return e}}var Ke=function(){try{var e=Oe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),no=Ke?function(e,t){return Ke(e,"toString",{configurable:!0,enumerable:!1,value:ro(t),writable:!0})}:tr,oo=to(no),so=9007199254740991,io=/^(?:0|[1-9]\d*)$/;function bt(e,t){var r=typeof e;return t=t??so,!!t&&(r=="number"||r!="symbol"&&io.test(e))&&e>-1&&e%1==0&&e<t}function vt(e,t,r){t=="__proto__"&&Ke?Ke(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Be(e,t){return e===t||e!==e&&t!==t}var ao=Object.prototype,lo=ao.hasOwnProperty;function or(e,t,r){var n=e[t];(!(lo.call(e,t)&&Be(n,r))||r===void 0&&!(t in e))&&vt(e,t,r)}function co(e,t,r,n){var o=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var a=t[i],c=void 0;c===void 0&&(c=e[a]),o?vt(r,a,c):or(r,a,c)}return r}var sr=Math.max;function uo(e,t,r){return t=sr(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=sr(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(s),Kn(e,this,a)}}function fo(e,t){return oo(uo(e,t,tr),e+"")}var po=9007199254740991;function ir(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=po}function Je(e){return e!=null&&ir(e.length)&&!oe(e)}function ho(e,t,r){if(!pe(r))return!1;var n=typeof t;return(n=="number"?Je(r)&&bt(t,r.length):n=="string"&&t in r)?Be(r[t],e):!1}function go(e){return fo(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&ho(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,i)}return t})}var mo=Object.prototype;function yt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mo;return e===r}function bo(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var vo="[object Arguments]";function ar(e){return be(e)&&we(e)==vo}var lr=Object.prototype,yo=lr.hasOwnProperty,_o=lr.propertyIsEnumerable,_t=ar(function(){return arguments}())?ar:function(e){return be(e)&&yo.call(e,"callee")&&!_o.call(e,"callee")};function wo(){return!1}var cr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,ur=cr&&typeof module=="object"&&module&&!module.nodeType&&module,Co=ur&&ur.exports===cr,fr=Co?_e.Buffer:void 0,xo=fr?fr.isBuffer:void 0,Ze=xo||wo,So="[object Arguments]",To="[object Array]",Po="[object Boolean]",$o="[object Date]",Do="[object Error]",jo="[object Function]",Eo="[object Map]",Fo="[object Number]",Oo="[object Object]",Ao="[object RegExp]",Mo="[object Set]",ko="[object String]",Ro="[object WeakMap]",Io="[object ArrayBuffer]",zo="[object DataView]",Lo="[object Float32Array]",Wo="[object Float64Array]",No="[object Int8Array]",Ho="[object Int16Array]",Bo="[object Int32Array]",Uo="[object Uint8Array]",Vo="[object Uint8ClampedArray]",Yo="[object Uint16Array]",qo="[object Uint32Array]",Q={};Q[Lo]=Q[Wo]=Q[No]=Q[Ho]=Q[Bo]=Q[Uo]=Q[Vo]=Q[Yo]=Q[qo]=!0,Q[So]=Q[To]=Q[Io]=Q[Po]=Q[zo]=Q[$o]=Q[Do]=Q[jo]=Q[Eo]=Q[Fo]=Q[Oo]=Q[Ao]=Q[Mo]=Q[ko]=Q[Ro]=!1;function Go(e){return be(e)&&ir(e.length)&&!!Q[we(e)]}function Xo(e){return function(t){return e(t)}}var dr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Ue=dr&&typeof module=="object"&&module&&!module.nodeType&&module,Ko=Ue&&Ue.exports===dr,wt=Ko&&Xt.process,pr=function(){try{var e=Ue&&Ue.require&&Ue.require("util").types;return e||wt&&wt.binding&&wt.binding("util")}catch{}}(),hr=pr&&pr.isTypedArray,Ct=hr?Xo(hr):Go,Jo=Object.prototype,Zo=Jo.hasOwnProperty;function gr(e,t){var r=fe(e),n=!r&&_t(e),o=!r&&!n&&Ze(e),i=!r&&!n&&!o&&Ct(e),s=r||n||o||i,a=s?bo(e.length,String):[],c=a.length;for(var u in e)(t||Zo.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bt(u,c)))&&a.push(u);return a}function mr(e,t){return function(r){return e(t(r))}}var Qo=mr(Object.keys,Object),es=Object.prototype,ts=es.hasOwnProperty;function rs(e){if(!yt(e))return Qo(e);var t=[];for(var r in Object(e))ts.call(e,r)&&r!="constructor"&&t.push(r);return t}function ns(e){return Je(e)?gr(e):rs(e)}function os(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var ss=Object.prototype,is=ss.hasOwnProperty;function as(e){if(!pe(e))return os(e);var t=yt(e),r=[];for(var n in e)n=="constructor"&&(t||!is.call(e,n))||r.push(n);return r}function br(e){return Je(e)?gr(e,!0):as(e)}var ls=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;function us(e,t){if(fe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ht(e)?!0:cs.test(e)||!ls.test(e)||t!=null&&e in Object(t)}var Ve=Oe(Object,"create");function fs(){this.__data__=Ve?Ve(null):{},this.size=0}function ds(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ps="__lodash_hash_undefined__",hs=Object.prototype,gs=hs.hasOwnProperty;function ms(e){var t=this.__data__;if(Ve){var r=t[e];return r===ps?void 0:r}return gs.call(t,e)?t[e]:void 0}var bs=Object.prototype,vs=bs.hasOwnProperty;function ys(e){var t=this.__data__;return Ve?t[e]!==void 0:vs.call(t,e)}var _s="__lodash_hash_undefined__";function ws(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ve&&t===void 0?_s:t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ae.prototype.clear=fs,Ae.prototype.delete=ds,Ae.prototype.get=ms,Ae.prototype.has=ys,Ae.prototype.set=ws;function Cs(){this.__data__=[],this.size=0}function Qe(e,t){for(var r=e.length;r--;)if(Be(e[r][0],t))return r;return-1}var xs=Array.prototype,Ss=xs.splice;function Ts(e){var t=this.__data__,r=Qe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ss.call(t,r,1),--this.size,!0}function Ps(e){var t=this.__data__,r=Qe(t,e);return r<0?void 0:t[r][1]}function $s(e){return Qe(this.__data__,e)>-1}function Ds(e,t){var r=this.__data__,n=Qe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ce(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ce.prototype.clear=Cs,Ce.prototype.delete=Ts,Ce.prototype.get=Ps,Ce.prototype.has=$s,Ce.prototype.set=Ds;var Ye=Oe(_e,"Map");function js(){this.size=0,this.__data__={hash:new Ae,map:new(Ye||Ce),string:new Ae}}function Es(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function et(e,t){var r=e.__data__;return Es(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Fs(e){var t=et(this,e).delete(e);return this.size-=t?1:0,t}function Os(e){return et(this,e).get(e)}function As(e){return et(this,e).has(e)}function Ms(e,t){var r=et(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=js,xe.prototype.delete=Fs,xe.prototype.get=Os,xe.prototype.has=As,xe.prototype.set=Ms;var ks="Expected a function";function xt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ks);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(xt.Cache||xe),r}xt.Cache=xe;var Rs=500;function Is(e){var t=xt(e,function(n){return r.size===Rs&&r.clear(),n}),r=t.cache;return t}var zs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ls=/\\(\\)?/g,Ws=Is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zs,function(r,n,o,i){t.push(o?i.replace(Ls,"$1"):n||r)}),t});function Ns(e){return e==null?"":er(e)}function Hs(e,t){return fe(e)?e:us(e,t)?[e]:Ws(Ns(e))}var Bs=1/0;function Us(e){if(typeof e=="string"||ht(e))return e;var t=e+"";return t=="0"&&1/e==-Bs?"-0":t}function Vs(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var vr=mr(Object.getPrototypeOf,Object),Ys="[object Object]",qs=Function.prototype,Gs=Object.prototype,yr=qs.toString,Xs=Gs.hasOwnProperty,Ks=yr.call(Object);function Js(e){if(!be(e)||we(e)!=Ys)return!1;var t=vr(e);if(t===null)return!0;var r=Xs.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&yr.call(r)==Ks}function Zs(){this.__data__=new Ce,this.size=0}function Qs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ei(e){return this.__data__.get(e)}function ti(e){return this.__data__.has(e)}var ri=200;function ni(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!Ye||n.length<ri-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xe(n)}return r.set(e,t),this.size=r.size,this}function Se(e){var t=this.__data__=new Ce(e);this.size=t.size}Se.prototype.clear=Zs,Se.prototype.delete=Qs,Se.prototype.get=ei,Se.prototype.has=ti,Se.prototype.set=ni;var _r=typeof Y=="object"&&Y&&!Y.nodeType&&Y,wr=_r&&typeof module=="object"&&module&&!module.nodeType&&module,oi=wr&&wr.exports===_r,Cr=oi?_e.Buffer:void 0;Cr&&Cr.allocUnsafe;function si(e,t){return e.slice()}function ii(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function ai(){return[]}var li=Object.prototype,ci=li.propertyIsEnumerable,xr=Object.getOwnPropertySymbols,ui=xr?function(e){return e==null?[]:(e=Object(e),ii(xr(e),function(t){return ci.call(e,t)}))}:ai;function fi(e,t,r){var n=t(e);return fe(e)?n:Vs(n,r(e))}function Sr(e){return fi(e,ns,ui)}var St=Oe(_e,"DataView"),Tt=Oe(_e,"Promise"),Pt=Oe(_e,"Set"),Tr="[object Map]",di="[object Object]",Pr="[object Promise]",$r="[object Set]",Dr="[object WeakMap]",jr="[object DataView]",pi=Fe(St),hi=Fe(Ye),gi=Fe(Tt),mi=Fe(Pt),bi=Fe(mt),$e=we;(St&&$e(new St(new ArrayBuffer(1)))!=jr||Ye&&$e(new Ye)!=Tr||Tt&&$e(Tt.resolve())!=Pr||Pt&&$e(new Pt)!=$r||mt&&$e(new mt)!=Dr)&&($e=function(e){var t=we(e),r=t==di?e.constructor:void 0,n=r?Fe(r):"";if(n)switch(n){case pi:return jr;case hi:return Tr;case gi:return Pr;case mi:return $r;case bi:return Dr}return t});var tt=_e.Uint8Array;function vi(e){var t=new e.constructor(e.byteLength);return new tt(t).set(new tt(e)),t}function yi(e,t){var r=vi(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function _i(e){return typeof e.constructor=="function"&&!yt(e)?Xn(vr(e)):{}}var wi="__lodash_hash_undefined__";function Ci(e){return this.__data__.set(e,wi),this}function xi(e){return this.__data__.has(e)}function rt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}rt.prototype.add=rt.prototype.push=Ci,rt.prototype.has=xi;function Si(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ti(e,t){return e.has(t)}var Pi=1,$i=2;function Er(e,t,r,n,o,i){var s=r&Pi,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var g=-1,h=!0,y=r&$i?new rt:void 0;for(i.set(e,t),i.set(t,e);++g<a;){var p=e[g],x=t[g];if(n)var j=s?n(x,p,g,t,e,i):n(p,x,g,e,t,i);if(j!==void 0){if(j)continue;h=!1;break}if(y){if(!Si(t,function(z,M){if(!Ti(y,M)&&(p===z||o(p,z,r,n,i)))return y.push(M)})){h=!1;break}}else if(!(p===x||o(p,x,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function Di(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function ji(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ei=1,Fi=2,Oi="[object Boolean]",Ai="[object Date]",Mi="[object Error]",ki="[object Map]",Ri="[object Number]",Ii="[object RegExp]",zi="[object Set]",Li="[object String]",Wi="[object Symbol]",Ni="[object ArrayBuffer]",Hi="[object DataView]",Fr=Pe?Pe.prototype:void 0,$t=Fr?Fr.valueOf:void 0;function Bi(e,t,r,n,o,i,s){switch(r){case Hi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ni:return!(e.byteLength!=t.byteLength||!i(new tt(e),new tt(t)));case Oi:case Ai:case Ri:return Be(+e,+t);case Mi:return e.name==t.name&&e.message==t.message;case Ii:case Li:return e==t+"";case ki:var a=Di;case zi:var c=n&Ei;if(a||(a=ji),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Fi,s.set(e,t);var f=Er(a(e),a(t),n,o,i,s);return s.delete(e),f;case Wi:if($t)return $t.call(e)==$t.call(t)}return!1}var Ui=1,Vi=Object.prototype,Yi=Vi.hasOwnProperty;function qi(e,t,r,n,o,i){var s=r&Ui,a=Sr(e),c=a.length,u=Sr(t),f=u.length;if(c!=f&&!s)return!1;for(var g=c;g--;){var h=a[g];if(!(s?h in t:Yi.call(t,h)))return!1}var y=i.get(e),p=i.get(t);if(y&&p)return y==t&&p==e;var x=!0;i.set(e,t),i.set(t,e);for(var j=s;++g<c;){h=a[g];var z=e[h],M=t[h];if(n)var R=s?n(M,z,h,t,e,i):n(z,M,h,e,t,i);if(!(R===void 0?z===M||o(z,M,r,n,i):R)){x=!1;break}j||(j=h=="constructor")}if(x&&!j){var V=e.constructor,q=t.constructor;V!=q&&"constructor"in e&&"constructor"in t&&!(typeof V=="function"&&V instanceof V&&typeof q=="function"&&q instanceof q)&&(x=!1)}return i.delete(e),i.delete(t),x}var Gi=1,Or="[object Arguments]",Ar="[object Array]",nt="[object Object]",Xi=Object.prototype,Mr=Xi.hasOwnProperty;function Ki(e,t,r,n,o,i){var s=fe(e),a=fe(t),c=s?Ar:$e(e),u=a?Ar:$e(t);c=c==Or?nt:c,u=u==Or?nt:u;var f=c==nt,g=u==nt,h=c==u;if(h&&Ze(e)){if(!Ze(t))return!1;s=!0,f=!1}if(h&&!f)return i||(i=new Se),s||Ct(e)?Er(e,t,r,n,o,i):Bi(e,t,c,r,n,o,i);if(!(r&Gi)){var y=f&&Mr.call(e,"__wrapped__"),p=g&&Mr.call(t,"__wrapped__");if(y||p){var x=y?e.value():e,j=p?t.value():t;return i||(i=new Se),o(x,j,r,n,i)}}return h?(i||(i=new Se),qi(e,t,r,n,o,i)):!1}function kr(e,t,r,n,o){return e===t?!0:e==null||t==null||!be(e)&&!be(t)?e!==e&&t!==t:Ki(e,t,r,n,kr,o)}function Ji(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var c=s[++o];if(r(i[c],c,i)===!1)break}return t}}var Zi=Ji();function Dt(e,t,r){(r!==void 0&&!Be(e[t],r)||r===void 0&&!(t in e))&&vt(e,t,r)}function Qi(e){return be(e)&&Je(e)}function jt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ea(e){return co(e,br(e))}function ta(e,t,r,n,o,i,s){var a=jt(e,r),c=jt(t,r),u=s.get(c);if(u){Dt(e,r,u);return}var f=i?i(a,c,r+"",e,t,s):void 0,g=f===void 0;if(g){var h=fe(c),y=!h&&Ze(c),p=!h&&!y&&Ct(c);f=c,h||y||p?fe(a)?f=a:Qi(a)?f=Jn(a):y?(g=!1,f=si(c)):p?(g=!1,f=yi(c)):f=[]:Js(c)||_t(c)?(f=a,_t(a)?f=ea(a):(!pe(a)||oe(a))&&(f=_i(c))):g=!1}g&&(s.set(c,f),o(f,c,n,i,s),s.delete(c)),Dt(e,r,f)}function Rr(e,t,r,n,o){e!==t&&Zi(t,function(i,s){if(o||(o=new Se),pe(i))ta(e,t,s,r,Rr,n,o);else{var a=n?n(jt(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),Dt(e,s,a)}},br)}var ra="[object String]";function Ir(e){return typeof e=="string"||!fe(e)&&be(e)&&we(e)==ra}var na="[object Boolean]";function Et(e){return e===!0||e===!1||be(e)&&we(e)==na}function ot(e,t){return kr(e,t)}var oa="[object Number]";function sa(e){return typeof e=="number"||be(e)&&we(e)==oa}function zr(e){return e==null}function ia(e){return e===null}var De=go(function(e,t,r){Rr(e,t,r)});function aa(e,t,r,n){if(!pe(e))return e;t=Hs(t,e);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var c=Us(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=s){var f=a[c];u=void 0,u===void 0&&(u=pe(f)?f:bt(t[o+1])?[]:{})}or(a,c,u),a=a[c]}return e}function Lr(e,t,r){return e==null?e:aa(e,t,r)}function la(e){const{inherit:t=!0}=e,{extendActionsProps:r}=Ur();return{actionsProps:{...De(De({items:[],max:10},t?r:{}),e)}}}function Wr(e){return"component"in e}function ca(e){return"render"in e}function ua(e){const{type:t,disabled:r,items:n,max:o}=e,i=n.map(a=>{const c={...a};return Wr(c)&&(c.componentProps={type:t,disabled:r,...c.componentProps}),c}),s=sa(o)&&o>=0;return{showActionItems:i.slice(0,s?o:i.length),ellipsisActionItems:i.slice(s?o:i.length)}}const fa=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return m.jsx(O.Button,{...r()})},da=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:i,...s}=t;return s})();return m.jsx(O.Dropdown,{disabled:n.disabled,menu:{items:(t==null?void 0:t.dropDownItems)||[],onClick:t==null?void 0:t.onClick},trigger:["click"],children:m.jsx("div",{children:m.jsxs(O.Button,{...n,children:[n.children,m.jsx(ye.CaretDownOutlined,{})]})})})},st=new Map;st.set("Button",fa),st.set("Dropdown",da);function Nr(){const{setExtendActionsComp:e}=Ur();return e(st),{renderContent:d.useCallback((r,n)=>{const o=Wr(r),i=ca(r);if(o){const s=st.get(r.component);return m.jsx(s,{...r},n)}return i?m.jsx("div",{children:r.render},n):null},[])}}const Hr=d.createContext({}),pa=e=>{const{extendProps:t,extendComp:r}=e.value;return m.jsx(Hr.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},qe=()=>d.useContext(Hr),Br=e=>{const[t,r]=d.useState(e),n=d.useRef(null);return d.useEffect(()=>{n.current&&(n.current(),n.current=null)},[t]),[t,i=>new Promise((s,a)=>{r(c=>{const u=typeof i=="function"?i(c):i;return n.current=s,u})})]},Ur=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:ha}=O.theme,ga=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Nr(),{token:i}=ha(),s={backgroundColor:i.colorBgElevated,borderRadius:i.borderRadiusLG,boxShadow:i.boxShadowSecondary},a=()=>m.jsx("div",{style:s,children:m.jsx(O.Space,{style:{padding:8},children:e==null?void 0:e.map((c,u)=>o(c,u))})});return m.jsx(O.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:a,trigger:["click"],children:m.jsxs(O.Button,{type:r,children:["更多",m.jsx(ye.CaretDownOutlined,{})]})})},it=e=>{const{actionsProps:t}=la(e),{showActionItems:r,ellipsisActionItems:n}=ua(t),{renderContent:o}=Nr();return t!=null&&t.render?t.render:m.jsxs(d.Fragment,{children:[r==null?void 0:r.map((i,s)=>o(i,s)),n!=null&&n.length?m.jsx(ga,{actionsProps:t,items:n}):null]})};function ma(e,t){const{okText:r,cancelText:n,onCancel:o,onOk:i,okProps:s,cancelProps:a}=e;return{footerActions:{disabled:t,max:2,items:[{component:"Button",componentProps:{...a,children:n,onClick:o}},{component:"Button",componentProps:{type:"primary",loading:t,...s,children:r,onClick:i}}]}}}const ba=e=>{const{extendDialogProps:t}=va(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body},n={...De(De(r,t),e)};return{dialogProps:{...n,getPopperContainer:()=>{const i=n.getPopperContainer();return n.mask?document.body:i}},baseDialogProps:r}},va=()=>{const{extendProps:e}=qe();return{extendDialogProps:e==null?void 0:e.dialog}},ya=(e,t,r)=>{const{onOpen:n,onClose:o}=e;return{open:async()=>{n&&n(),await t(!0)},close:()=>{t(!1),r(!1),o&&o()}}},_a=({initWidth:e,initHeight:t,setDialogChangeRecord:r})=>{const[n,o]=d.useState(e.current),[i,s]=d.useState(t.current);return{dialogWidth:n,dialogHeight:i,setDialogSize:({width:c,height:u})=>{r({width:n,height:i}),c!==void 0&&o(c),u!==void 0&&s(u)}}},wa=({initLeft:e,initTop:t,setDialogChangeRecord:r})=>{const[n,o]=d.useState(e.current),[i,s]=d.useState(t.current);return{dialogLeft:n,dialogTop:i,setDialogPosition:({left:c,top:u})=>{r({left:n,top:i}),c!==void 0&&o(c),u!==void 0&&s(u)}}},Vr=({containerSizeTarget:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=d.useRef(0),i=d.useRef(0),s=f=>{const g=f.getBoundingClientRect(),h=g.width,y=g.height,p=-.5*h,x=-.5*y;return{translateX:p,translateY:x}},a=d.useCallback(f=>{const{offsetLeft:g,offsetTop:h}=r.current;o.current=f.clientX-g,i.current=f.clientY-h,document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[]),c=d.useCallback(f=>{const g=r.current,{translateX:h,translateY:y}=s(g);let p=f.clientX-o.current,x=f.clientY-i.current;const j=-h,z=-y,M=e.current.scrollWidth-g.offsetWidth-h,R=e.current.scrollHeight-g.offsetHeight-y;p<j&&(p=j),p>M&&(p=M),x<z&&(x=z),x>R&&(x=R),n({left:p,top:x})},[]),u=d.useCallback(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)},[]);return d.useEffect(()=>{const f=t.current;return f.addEventListener("mousedown",a),()=>{f.removeEventListener("mousedown",a)}},[]),{}},Ca=({containerSizeTarget:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[i,s]=d.useState(!1),[a,c]=d.useState(!1);return{minimizeVisible:i,maximizeVisible:a,onMinimize:()=>{s(!0)},onMaximize:y=>{if(y==="minimize"&&s(!1),y==="maximize"){const{scrollWidth:p,scrollHeight:x}=e.current,j=Math.floor(p),z=Math.floor(x),M=Math.floor(p/2),R=Math.floor(x/2);n({width:j,height:z}),o({top:R,left:M}),c(!0)}},onRecovery:()=>{const{top:y,left:p,width:x,height:j}=t.current;n({width:x,height:j}),o({top:y,left:p}),c(!1)},onClose:()=>{s(!1),c(!1),r()}}},xa=({visible:e,containerSizeTarget:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:i})=>{const{clientHeight:s,scrollHeight:a}=t.current,[c,u]=d.useState(0),[f,g]=d.useState("unset"),h=(y,p)=>{var q,X;const z=(q=o.current)==null?void 0:q.offsetHeight,M=(X=i.current)==null?void 0:X.offsetHeight;let R=y-z-M-0;const V=p-z-M-0;return R>V&&(R=V),R};return d.useEffect(()=>{var y;if(c===s){console.log("触发了dialogMaxHeight改变");const p=(y=n.current)==null?void 0:y.getBoundingClientRect().height;g(h(p,s)),u("unset")}},[c]),d.useEffect(()=>{r!=="unset"&&r!==0&&(console.log("触发了重新设置contentMaxHeight",r),g(h(r,r>s?a:s)),u("unset"))},[r]),d.useEffect(()=>{e?u(s):(u(0),g("unset"))},[e]),{dialogMaxHeight:c,contentMaxHeight:f}},Sa=()=>{const[e,t]=d.useState(160),[r,n]=d.useState(60),o=d.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:s,top:a})=>{s!==void 0&&t(s),a!==void 0&&n(a)}}},Ta=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},i=(a,c)=>{console.log("触发插入"),a.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",a.querySelector(`.${o.xphMinimizeDialog}`).style.opacity="unset",c.querySelector(`.${o.xphDialogWrapper}`).style.opacity=.7,c.querySelector(`.${o.xphMinimizeDialog}`).style.opacity=.7;const u=document.createElement("div");u.style.visibility="hidden",c.parentNode.insertBefore(u,c.nextSibling),c.parentNode.insertBefore(a,u),c.parentNode.removeChild(u)},s=a=>{var f,g;const c=n.querySelectorAll(`.${o.xphDialog}`),u=c[c.length-1];if(((f=t.current)==null?void 0:f.parentNode)!==u&&(i((g=t.current)==null?void 0:g.parentNode,u),a)){const h=a.target;h.tagName==="INPUT"&&h.focus&&h.focus()}};return d.useEffect(()=>{var a,c;return(a=t.current)==null||a.addEventListener("mousedown",s,!1),(c=r.current)==null||c.addEventListener("mousedown",s,!1),()=>{var u,f;(u=t.current)==null||u.removeEventListener("mousedown",s,!1),(f=r.current)==null||f.removeEventListener("mousedown",s,!1)}},[]),d.useEffect(()=>{if(e)s();else{const a=Array.from(n.querySelectorAll(`.${o.xphDialog}`)),c=a.map(h=>h.querySelector(`.${o.xphDialogWrapper}`)).filter(h=>h!==null),u=a.map(h=>h.querySelector(`.${o.xphMinimizeDialog}`)).filter(h=>h!==null),f=c.filter(h=>h.style.display==="flex"),g=u.filter(h=>h.style.display==="flex");if(f.length){i(f[f.length-1].parentNode,a[a.length-1]);return}if(g.length){i(g[g.length-1].parentNode,a[a.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},Pa=({initWidth:e,initHeight:t,initLeft:r,initTop:n,curPropsWidth:o,curPropsHeight:i,setDialogSize:s,setDialogPosition:a})=>{d.useEffect(()=>{o!==e.current&&(console.log("重新设置了宽度"),s({width:o})),i!==t.current&&(console.log("重新设置了高度"),s({height:i}))},[o,i]),d.useEffect(()=>{o!==e.current&&(console.log("重新设置了左边位置"),a({left:r.current})),i!==t.current&&(console.log("重新设置了上边位置"),a({top:n.current}))},[o,i])},$a=()=>{const e=d.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:i})=>{const{left:s,top:a,width:c,height:u}=e.current;e.current={left:r??s,top:n??a,width:o??c,height:i??u}}}},Da=({containerSizeTarget:e,dialogRef:t,minResizeRecord:r,setDialogSize:n,setDialogPosition:o})=>{const i=d.useCallback(()=>m.jsx("div",{ref:s,style:{position:"absolute",border:"4px dashed #ccc",display:"none"}}),[]),s=d.useRef(null),a=d.useRef(),c=d.useRef(!1),[u,f]=d.useState(!1),g=d.useRef(0),h=d.useRef(0),y=(B,F)=>{c.current=!0,f(!0),a.current=F;const{clientX:E,clientY:_}=B;g.current=E,h.current=_;const S=parseFloat(t.current.style.left),L=parseFloat(t.current.style.top),W=t.current.offsetWidth,w=t.current.offsetHeight;s.current.style.display="block",s.current.style.left=`${S-.5*W}px`,s.current.style.top=`${L-.5*w}px`,s.current.style.width=`${W}px`,s.current.style.height=`${w}px`},p=B=>{if(c.current){const{clientX:F,clientY:E}=B,_=F-g.current,S=E-h.current,L=parseFloat(s.current.style.left),W=parseFloat(s.current.style.top),w=s.current.offsetWidth,v=s.current.offsetHeight,C=r.current.width,D=r.current.height,T=e.current.scrollWidth,k=e.current.scrollHeight;let $=w,A=v,I=L,H=W;switch(a.current){case"lt":{$=$-_,A=A-S,H=H+S,I=I+_,$<C&&($=w,I=L),A<D&&(A=v,H=W),I<0&&(I=0,$=w),H<0&&(H=0,A=v);break}case"rt":{$=$+_,A=A-S,H=H+S,I=L,$<C&&($=w),A<D&&(A=v,H=W),$>T-I&&($=T-I),H<0&&(H=0,A=v);break}case"rb":{$=$+_,A=A+S,H=W,I=L,$<C&&($=w),A<D&&(A=v),$>T-I&&($=T-I),A>k-H&&(A=k-H);break}case"lb":{$=$-_,A=A+S,H=W,I=I+_,$<C&&($=w,I=L),A<D&&(A=v),I<0&&(I=0,$=w),A>k-H&&(A=k-H);break}}s.current.style.left=`${I}px`,s.current.style.top=`${H}px`,s.current.style.width=`${$}px`,s.current.style.height=`${A}px`,g.current=F,h.current=E}},x=()=>{if(c.current){c.current=!1,f(!1),s.current.style.display="none";const{left:B,top:F,width:E,height:_}=s.current.style,S=parseFloat(B)+.5*parseFloat(E),L=parseFloat(F)+.5*parseFloat(_),W=parseFloat(E),w=parseFloat(_);o({left:S,top:L}),n({width:W,height:w})}},j=B=>y(B,"lt"),z=B=>y(B,"rt"),M=B=>y(B,"rb"),R=B=>y(B,"lb"),V=d.useCallback(B=>{p(B)},[]),q=d.useCallback(()=>{x()},[]),X=d.useCallback(()=>{x()},[]);return d.useEffect(()=>(document.body.addEventListener("mousemove",V),document.body.addEventListener("mouseup",q),document.body.addEventListener("mouseleave",X),()=>{document.body.removeEventListener("mousemove",V),document.body.removeEventListener("mouseup",q),document.body.removeEventListener("mouseleave",X)}),[]),{resizingState:u,DashedBox:i,onMousedownResizeLt:j,onMousedownResizeRt:z,onMousedownResizeRb:M,onMousedownResizeLb:R}},ja=({container:e,dialogProps:t,baseDialogProps:r})=>{const[n,o]=d.useState(0),i=()=>{o(F=>F+1)};d.useEffect(()=>{const F=new ResizeObserver(i);return F.observe(e),()=>{F.unobserve(e),F.disconnect()}},[e]);const{containerSizeTarget:s,setContainerSizeTarget:a}=Fa({container:e}),{width:c,height:u}=r,{width:f,height:g}=t,h=f||c,y=g||u,{clientWidth:p,clientHeight:x}=s.current,j=h?h>p?p:h:0,z=y?y>x?x:y:"unset",M=d.useRef(j),R=d.useRef(z),V=F=>{M.current=F.width,R.current=F.height},q=d.useRef(Math.floor(p/2)),X=d.useRef(Math.floor(x/2)),B=F=>{q.current=F.left,X.current=F.top};return d.useEffect(()=>{n!==0&&(console.log("触发了内部parentResizeRecord"),a(),V({width:j,height:z}),B({left:Math.floor(p/2),top:Math.floor(x/2)}))},[n]),{containerSizeTarget:s,parentResizeRecord:n,initLeft:q,initTop:X,initWidth:M,initHeight:R,curPropsWidth:j,curPropsHeight:z,setInitPosition:B,setInitSize:V}},Ea=(e,t,r,n)=>{const o=d.useRef(null);return d.useEffect(()=>{if(e){const i=t.current.offsetWidth,s=t.current.offsetHeight;o.current={width:i,height:s}}else o.current=null},[r,n,e]),{minResizeRecord:o}},Fa=({container:e})=>{const t=e===document.body,r=d.useRef({clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight});return{containerSizeTarget:r,setContainerSizeTarget:()=>{r.current={clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight}}}},Ft={"minimize-windows":"_minimize-windows_12u3y_1","minimize-windows-title":"_minimize-windows-title_12u3y_43","minimize-windows-operate":"_minimize-windows-operate_12u3y_55"},Oa=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Yr=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Aa=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),qr=({onClick:e,disabled:t})=>m.jsx(O.Button,{type:"link",onClick:e,disabled:t,icon:m.jsx(ye.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:Ma}=O.theme,ka=d.forwardRef(({title:e,left:t,top:r,visible:n,loading:o,onMaximize:i,onClosesquare:s,className:a},c)=>{const{token:u}=Ma(),f={borderRadius:u.borderRadiusLG};return m.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...f},className:`${Ft["minimize-windows"]} ${a}`,ref:c,children:[m.jsx("div",{className:Ft["minimize-windows-title"],title:e,children:e}),m.jsxs("div",{className:Ft["minimize-windows-operate"],children:[m.jsx(Yr,{onClick:i}),m.jsx(qr,{onClick:s,disabled:o})]})]})}),le={"xph-dialog-mask":"_xph-dialog-mask_128q2_1","xph-dialog-wrapper":"_xph-dialog-wrapper_128q2_23",dialog__header:"_dialog__header_128q2_45","dialog__header-btns":"_dialog__header-btns_128q2_63",dialog__main:"_dialog__main_128q2_71",dialog__footer:"_dialog__footer_128q2_85",dialog__resize:"_dialog__resize_128q2_99","dialog__resize-lt":"_dialog__resize-lt_128q2_113","dialog__resize-rt":"_dialog__resize-rt_128q2_125","dialog__resize-rb":"_dialog__resize-rb_128q2_137","dialog__resize-lb":"_dialog__resize-lb_128q2_149"},{useToken:Ra}=O.theme,Ia=d.forwardRef((e,t)=>{console.log("render Dialog==============================================");const{token:r}=Ra(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:i,mask:s,title:a,renderFooter:c,renderTitle:u,getPopperContainer:f}=e,g=f(),[h,y]=Br(!1),[p,x]=d.useState(!1),{open:j,close:z}=ya(e,y,x),{footerActions:M}=ma(e,p),R=d.useRef(null),V=d.useRef(null),q=d.useRef(null),X=d.useRef(null),{containerSizeTarget:B,parentResizeRecord:F,initLeft:E,initTop:_,initWidth:S,initHeight:L,curPropsWidth:W,curPropsHeight:w}=ja({container:g,dialogProps:e,baseDialogProps:i}),{dialogChangeRecord:v,setDialogChangeRecord:C}=$a(),{dialogWidth:D,dialogHeight:T,setDialogSize:k}=_a({initWidth:S,initHeight:L,setDialogChangeRecord:C}),{dialogLeft:$,dialogTop:A,setDialogPosition:I}=wa({initTop:_,initLeft:E,setDialogChangeRecord:C}),{dialogMaxHeight:H,contentMaxHeight:re}=xa({visible:h,containerSizeTarget:B,dialogHeight:T,dialogRef:R,dialogHeaderRef:V,dialogFooterRef:X}),{minResizeRecord:se}=Ea(h,R,D,T),{minimizeLeft:he,minimizeTop:de,minimizeRef:ie,setMinimizePosition:ce}=Sa(),{minimizeVisible:ee,maximizeVisible:ge,onMaximize:ve,onMinimize:je,onRecovery:kt,onClose:Ee}=Ca({containerSizeTarget:B,dialogChangeRecord:v,close:z,setDialogSize:k,setDialogPosition:I}),Me=()=>{console.log("触发了initDialog"),k({width:S.current,height:L.current}),I({left:E.current,top:_.current}),ce({left:160,top:60})};d.useEffect(()=>{F!==0&&(console.log("触发了外部parentResizeRecord"),Me())},[F]),Pa({initWidth:S,initHeight:L,initLeft:E,initTop:_,curPropsWidth:W,curPropsHeight:w,setDialogSize:k,setDialogPosition:I}),Vr({containerSizeTarget:B,dialogHeaderRef:V,dialogRef:R,setDialogPosition:I}),Vr({containerSizeTarget:B,dialogHeaderRef:ie,dialogRef:ie,setDialogPosition:ce});const{dialogTopShowClassConfig:Re}=Ta({visible:h,container:g,dialogRef:R,minimizeRef:ie}),{resizingState:Ie,DashedBox:It,onMousedownResizeLt:zt,onMousedownResizeRt:Ge,onMousedownResizeRb:Lt,onMousedownResizeLb:Wt}=Da({containerSizeTarget:B,dialogRef:R,minResizeRecord:se,setDialogSize:k,setDialogPosition:I});return d.useImperativeHandle(t,()=>({open:j,close:Ee,setLoading:x})),m.jsxs("div",{className:Re.xphDialog,children:[s&&h?m.jsx("div",{className:le["xph-dialog-mask"]}):null,m.jsx(ka,{visible:ee,className:`${Re.xphMinimizeDialog}`,loading:p,ref:ie,left:he,top:de,title:a,onMaximize:()=>ve("minimize"),onClosesquare:Ee}),m.jsxs("div",{ref:R,className:`${le["xph-dialog-wrapper"]} ${Re.xphDialogWrapper}`,style:{display:h&&!ee?"flex":"none",left:$,top:A,width:D,height:T,maxHeight:H,opacity:Ie?.2:"unset",...n},children:[m.jsxs("div",{ref:V,className:le.dialog__header,children:[m.jsx("div",{children:u?u():a}),m.jsxs("div",{className:le["dialog__header-btns"],children:[m.jsx(Oa,{onClick:je}),ge?m.jsx(Aa,{onClick:kt}):m.jsx(Yr,{onClick:()=>ve("maximize")}),m.jsx(qr,{onClick:Ee,disabled:p})]})]}),m.jsx("div",{ref:q,className:le.dialog__main,style:{maxHeight:re},children:m.jsx(O.Spin,{spinning:p,children:h?o:null})}),c?m.jsx("div",{ref:X,children:c({loading:p})}):m.jsx("div",{ref:X,className:le.dialog__footer,children:m.jsx(it,{...M})}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-lt"]}`,onMouseDown:zt}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-rt"]}`,onMouseDown:Ge}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-rb"]}`,onMouseDown:Lt}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-lb"]}`,onMouseDown:Wt})]}),m.jsx(It,{})]})}),za=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:i}=ba(n),{getPopperContainer:s}=i;return console.log("render XphDialog=============================================="),m.jsx(Xr,{getPopperContainer:s,children:m.jsx(Ia,{...i,baseDialogProps:o,ref:t,children:r})})},Gr=d.forwardRef(za),Xr=({children:e,getPopperContainer:t})=>{const[r,n]=d.useState(null);return d.useEffect(()=>{const o=t();n(o)},[]),r?mn.createPortal(e,r):null};function Ot(e){return"component"in e}function At(e){return"render"in e}function La(e){return e.includes("Input")||e.includes("Complete")?"请输入":e.includes("Picker")||e.includes("Select")||e.includes("Cascader")||e.includes("Checkbox")||e.includes("Radio")||e.includes("Switch")?"请选择":""}function Wa(e,t,r){["DatePicker","MonthPicker","WeekPicker","TimePicker"].includes(t)?e.type=r?"string":"object":["RangePicker","Upload","CheckboxGroup","TimePicker"].includes(t)?e.type="array":["InputNumber"].includes(t)&&(e.type="number")}const Na=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],Ha=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:i}=e;return!!(oe(t)||oe(r)||oe(n)||oe(o)||oe(i)||At(e))},Ba=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,Ua=(e,t,r)=>{const n=d.useRef(null),o=d.useRef(null),{handleCollapseChangeFalse:i}=r.current||{},{show:s,ifShow:a}=e;let c=!0,u=!0;if(Et(s)&&(c=s),Et(a)&&(u=a),oe(s)){c=s({model:t});const f=zr(n.current)?c:n.current;d.useEffect(()=>{ot(c,f)||i&&i()},[t])}if(oe(a)){u=a({model:t});const f=zr(o.current)?u:o.current;d.useEffect(()=>{ot(u,f)||i&&i()},[t])}return n.current=c,o.current=u,{isShow:c,isIfShow:u}},Va=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,i]=d.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:i}},Ya=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:i,required:s}=e;let a=o;const c=Ot(e),u=c?La(e.component)+i:"";function f(p,x){const j=p.message||u;return x===void 0||ia(x)||Array.isArray(x)&&x.length===0||typeof x=="string"&&x.trim()===""||typeof x=="object"&&Reflect.has(x,"checked")&&Reflect.has(x,"halfChecked")&&Array.isArray(x.checked)&&Array.isArray(x.halfChecked)&&x.checked.length===0&&x.halfChecked.length===0?Promise.reject(j):Promise.resolve()}const g=oe(s)?s({model:t}):s;g&&(!a||a.length===0?a=[{required:g,validator:f}]:a.findIndex(x=>Reflect.has(x,"required"))===-1&&a.push({required:g,validator:f}));const h=a.findIndex(p=>Reflect.has(p,"required")&&!Reflect.has(p,"validator"));if(h!==-1){const p=a[h];if(r||(p.required=!1),c){const{component:x}=e;Reflect.has(p,"type")||(p.type=x==="InputNumber"?"number":"string"),p.message=p.message||u,(x.includes("Input")||x.includes("Textarea"))&&(p.whitespace=!0);const j=n.valueFormat;Wa(p,x,j)}}const y=a.findIndex(p=>p.max);return y!==-1&&!a[y].validator&&(a[y].message=a[y].message||`字符数应小于${a[y].max}位`),{rules:a}},qa=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:i}=t;return oe(i)&&(o=i({model:r})),Et(i)&&(o=i),{disabled:Reflect.has(t,"disabled")?o:n}},Ga=(e,t)=>{const r={},{componentProps:n={}}=e;return oe(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},Xa=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},Ka=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},Ja=(e,t)=>{const r=a=>(Object.keys(a).forEach(c=>{Object.defineProperty(a,c,{value:a[c],writable:!1,enumerable:!0,configurable:!1})}),a),n={};e.items.forEach(a=>{n[a.name]=a.initialValue});const o=Ha(t),i=o?O.Form.useWatch(a=>r(a)):null;return{rewritingModel:d.useMemo(()=>i||r(n),[i]),isusewatch:o}},Za=()=>{const e=d.useRef(null);function t(n){e.current=n}const r={getFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.getFieldsValue(...n)},setFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.setFieldsValue(...n)},resetFields:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.resetFields(...n)},validator:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.validator(...n)},scrollToField:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.scrollToField(...n)}};return d.useEffect(()=>(console.log("ParentComponent is mounted====================================="),()=>{console.log("ParentComponent is unmounted===================================="),e.current=null}),[]),[t,r]};var Kr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(bn,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",g="month",h="quarter",y="year",p="date",x="Invalid Date",j=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var v=["th","st","nd","rd"],C=w%100;return"["+w+(v[(C-20)%10]||v[C]||v[0])+"]"}},R=function(w,v,C){var D=String(w);return!D||D.length>=v?w:""+Array(v+1-D.length).join(C)+w},V={s:R,z:function(w){var v=-w.utcOffset(),C=Math.abs(v),D=Math.floor(C/60),T=C%60;return(v<=0?"+":"-")+R(D,2,"0")+":"+R(T,2,"0")},m:function w(v,C){if(v.date()<C.date())return-w(C,v);var D=12*(C.year()-v.year())+(C.month()-v.month()),T=v.clone().add(D,g),k=C-T<0,$=v.clone().add(D+(k?-1:1),g);return+(-(D+(C-T)/(k?T-$:$-T))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:g,y,w:f,d:u,D:p,h:c,m:a,s,ms:i,Q:h}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},q="en",X={};X[q]=M;var B="$isDayjsObject",F=function(w){return w instanceof L||!(!w||!w[B])},E=function w(v,C,D){var T;if(!v)return q;if(typeof v=="string"){var k=v.toLowerCase();X[k]&&(T=k),C&&(X[k]=C,T=k);var $=v.split("-");if(!T&&$.length>1)return w($[0])}else{var A=v.name;X[A]=v,T=A}return!D&&T&&(q=T),T||!D&&q},_=function(w,v){if(F(w))return w.clone();var C=typeof v=="object"?v:{};return C.date=w,C.args=arguments,new L(C)},S=V;S.l=E,S.i=F,S.w=function(w,v){return _(w,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var L=function(){function w(C){this.$L=E(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[B]=!0}var v=w.prototype;return v.parse=function(C){this.$d=function(D){var T=D.date,k=D.utc;if(T===null)return new Date(NaN);if(S.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var $=T.match(j);if($){var A=$[2]-1||0,I=($[7]||"0").substring(0,3);return k?new Date(Date.UTC($[1],A,$[3]||1,$[4]||0,$[5]||0,$[6]||0,I)):new Date($[1],A,$[3]||1,$[4]||0,$[5]||0,$[6]||0,I)}}return new Date(T)}(C),this.init()},v.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return this.$d.toString()!==x},v.isSame=function(C,D){var T=_(C);return this.startOf(D)<=T&&T<=this.endOf(D)},v.isAfter=function(C,D){return _(C)<this.startOf(D)},v.isBefore=function(C,D){return this.endOf(D)<_(C)},v.$g=function(C,D,T){return S.u(C)?this[D]:this.set(T,C)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(C,D){var T=this,k=!!S.u(D)||D,$=S.p(C),A=function(ce,ee){var ge=S.w(T.$u?Date.UTC(T.$y,ee,ce):new Date(T.$y,ee,ce),T);return k?ge:ge.endOf(u)},I=function(ce,ee){return S.w(T.toDate()[ce].apply(T.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(ee)),T)},H=this.$W,re=this.$M,se=this.$D,he="set"+(this.$u?"UTC":"");switch($){case y:return k?A(1,0):A(31,11);case g:return k?A(1,re):A(0,re+1);case f:var de=this.$locale().weekStart||0,ie=(H<de?H+7:H)-de;return A(k?se-ie:se+(6-ie),re);case u:case p:return I(he+"Hours",0);case c:return I(he+"Minutes",1);case a:return I(he+"Seconds",2);case s:return I(he+"Milliseconds",3);default:return this.clone()}},v.endOf=function(C){return this.startOf(C,!1)},v.$set=function(C,D){var T,k=S.p(C),$="set"+(this.$u?"UTC":""),A=(T={},T[u]=$+"Date",T[p]=$+"Date",T[g]=$+"Month",T[y]=$+"FullYear",T[c]=$+"Hours",T[a]=$+"Minutes",T[s]=$+"Seconds",T[i]=$+"Milliseconds",T)[k],I=k===u?this.$D+(D-this.$W):D;if(k===g||k===y){var H=this.clone().set(p,1);H.$d[A](I),H.init(),this.$d=H.set(p,Math.min(this.$D,H.daysInMonth())).$d}else A&&this.$d[A](I);return this.init(),this},v.set=function(C,D){return this.clone().$set(C,D)},v.get=function(C){return this[S.p(C)]()},v.add=function(C,D){var T,k=this;C=Number(C);var $=S.p(D),A=function(re){var se=_(k);return S.w(se.date(se.date()+Math.round(re*C)),k)};if($===g)return this.set(g,this.$M+C);if($===y)return this.set(y,this.$y+C);if($===u)return A(1);if($===f)return A(7);var I=(T={},T[a]=n,T[c]=o,T[s]=r,T)[$]||1,H=this.$d.getTime()+C*I;return S.w(H,this)},v.subtract=function(C,D){return this.add(-1*C,D)},v.format=function(C){var D=this,T=this.$locale();if(!this.isValid())return T.invalidDate||x;var k=C||"YYYY-MM-DDTHH:mm:ssZ",$=S.z(this),A=this.$H,I=this.$m,H=this.$M,re=T.weekdays,se=T.months,he=T.meridiem,de=function(ee,ge,ve,je){return ee&&(ee[ge]||ee(D,k))||ve[ge].slice(0,je)},ie=function(ee){return S.s(A%12||12,ee,"0")},ce=he||function(ee,ge,ve){var je=ee<12?"AM":"PM";return ve?je.toLowerCase():je};return k.replace(z,function(ee,ge){return ge||function(ve){switch(ve){case"YY":return String(D.$y).slice(-2);case"YYYY":return S.s(D.$y,4,"0");case"M":return H+1;case"MM":return S.s(H+1,2,"0");case"MMM":return de(T.monthsShort,H,se,3);case"MMMM":return de(se,H);case"D":return D.$D;case"DD":return S.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return de(T.weekdaysMin,D.$W,re,2);case"ddd":return de(T.weekdaysShort,D.$W,re,3);case"dddd":return re[D.$W];case"H":return String(A);case"HH":return S.s(A,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return ce(A,I,!0);case"A":return ce(A,I,!1);case"m":return String(I);case"mm":return S.s(I,2,"0");case"s":return String(D.$s);case"ss":return S.s(D.$s,2,"0");case"SSS":return S.s(D.$ms,3,"0");case"Z":return $}return null}(ee)||$.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(C,D,T){var k,$=this,A=S.p(D),I=_(C),H=(I.utcOffset()-this.utcOffset())*n,re=this-I,se=function(){return S.m($,I)};switch(A){case y:k=se()/12;break;case g:k=se();break;case h:k=se()/3;break;case f:k=(re-H)/6048e5;break;case u:k=(re-H)/864e5;break;case c:k=re/o;break;case a:k=re/n;break;case s:k=re/r;break;default:k=re}return T?k:S.a(k)},v.daysInMonth=function(){return this.endOf(g).$D},v.$locale=function(){return X[this.$L]},v.locale=function(C,D){if(!C)return this.$L;var T=this.clone(),k=E(C,D,!0);return k&&(T.$L=k),T},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},w}(),W=L.prototype;return _.prototype=W,[["$ms",i],["$s",s],["$m",a],["$H",c],["$W",u],["$M",g],["$y",y],["$D",p]].forEach(function(w){W[w[1]]=function(v){return this.$g(v,w[0],w[1])}}),_.extend=function(w,v){return w.$i||(w(v,L,_),w.$i=!0),_},_.locale=E,_.isDayjs=F,_.unix=function(w){return _(1e3*w)},_.en=X[q],_.Ls=X,_.p={},_})})(Kr);var Qa=Kr.exports;const at=vn(Qa);function el(e,t={}){const r=/^\[(.+)\]$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const i=[];return o.forEach((s,a)=>{Lr(i,a,t[s.trim()])}),i.filter(Boolean).length?i:void 0}}}function tl(e,t={}){const r=/^\{(.+)\}$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const i={};return o.forEach(s=>{Lr(i,s.trim(),t[s.trim()])}),Object.values(i).filter(Boolean).length?i:void 0}}}function rl(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,i],s="YYYY-MM-DD"]of r){if(!n||!o||!i)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[a,c]=e[n],[u,f]=Array.isArray(s)?s:[s,s];e[o]=at(a).format(u),e[i]=at(c).format(f),Reflect.deleteProperty(e,n)}return e}const nl=(e,t,r)=>{const n=e.filter(s=>s.name);return{handleFormatRenderValues:s=>{const a={},c=[];return n.forEach(u=>{const f=Reflect.has(s,u.name),g=el(u.name,s)||tl(u.name,s);if(f||g){const h=g||s[u.name];if(Ot(u))if(Na.includes(u.component)){if(fe(h)){const y=[];for(const p of h)y.push(p?at(p):null);a[u.name]=y}else a[u.name]=h?at(h):null;c.push(u.name)}else a[u.name]=h,c.push(u.name);At(u)&&(a[u.name]=h,c.push(u.name))}}),{renderValues:a,validKeys:c}},handleFormatReturnValues:s=>{var c,u,f,g,h;if(!pe(s))return{};const a={};for(const y of Object.entries(s)){let[,p]=y;const[x]=y;if(!x||fe(p)&&p.length===0||oe(p))continue;const{transformDateFunc:j}=t,z=(f=(u=(c=r.current)==null?void 0:c.get(x))==null?void 0:u.current)==null?void 0:f.componentProps,M=z==null?void 0:z.valueFormat;if(pe(p)){const R=p;R.format&&(p=j==null?void 0:j(R,M))}fe(p)&&((g=p[0])!=null&&g.format)&&((h=p[1])!=null&&h.format)&&(p=p.map(R=>j==null?void 0:j(R,M))),Ir(p)&&(p===""?p=void 0:p=p.trim()),a[x]=p}return rl(a,t)}}},ol=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:u,validKeys:f}=t(c);e.setFieldsValue(u),e.validateFields(f)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(u=>r(u)),scrollToField:async(c,u)=>e.scrollToField(c,u)}),sl=e=>{const{extendFormProps:t}=Jr();return{formProps:{...De(De({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,i)=>{var s;return((s=o==null?void 0:o.format)==null?void 0:s.call(o,i||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},lt=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:i}=e,s=d.useRef(!0),a=d.useRef(r),c=()=>{n&&oe(n)&&(r?n(r).then(o):n().then(o),a.current=r)};return d.useEffect(()=>{s.current&&(t&&c(),s.current=!1),!s.current&&i&&(ot(r,a.current)||t&&c())},[r]),{getApiData:c}},il=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=d.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var a;(a=t.current)==null||a.forEach(c=>{if(c.current){const{itemIndex:u}=c.current;u>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var a;(a=t.current)==null||a.forEach(c=>{if(c.current){const{itemCollapse:u}=c.current;u&&c.current.setItemCollapse(!1)}})}}},Jr=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},al=e=>{console.log("render ApiSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=h=>{h&&!n&&u(),i&&i(h)},g=()=>{const{api:h,params:y,immediate:p,isusewatch:x,...j}=e;return j};return m.jsx(O.Select,{...g(),options:a,onDropdownVisibleChange:f})},ll=e=>{console.log("render ApiTreeSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=h=>{h&&!n&&u(),i&&i(h)},g=()=>{const{api:h,params:y,immediate:p,isusewatch:x,...j}=e;return j};return m.jsx(O.TreeSelect,{...g(),treeData:a,onDropdownVisibleChange:f})},cl=e=>{console.log("render ApiTransfer");const{api:t,params:r,isusewatch:n}=e,o=n==="true",[i,s]=d.useState([]);lt({api:t,params:r,apiCallback:s,isUseWatch:o});const a=()=>{const{api:c,params:u,isusewatch:f,...g}=e;return g};return m.jsx(O.Transfer,{...a(),dataSource:i})},ul=e=>{console.log("render ApiAutoComplete");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=h=>{h&&!n&&u(),i&&i(h)},g=()=>{const{api:h,params:y,immediate:p,isusewatch:x,...j}=e;return j};return m.jsx(O.AutoComplete,{...g(),options:a,onDropdownVisibleChange:f})},Te={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},fl=e=>{console.log("render AutoUpload"),console.log(ft());const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:i="picture-card",openCrop:s=!1,data:a,returnType:c=Te.String,value:u=t,onChange:f}=e,g=d.useRef(!0),h=d.useRef(0),y=d.useRef([]),[p,x]=d.useState([]),j=F=>{y.current=F,x([...F])},z=()=>{const{api:F,maxCount:E,maxSize:_,openCrop:S,beforeUpload:L,fileList:W,returnType:w,...v}=e;return v},M=F=>{const E=F.size/1024/1024<o;E||O.message.error(`文件大小超过:${o}M, 请重试`);const _=y.current.length+h.current<n;return _||O.message.error(`文件数量不能超过${n}个`),E&&_&&h.current++,E&&_&&R(F),O.Upload.LIST_IGNORE},R=F=>{s?(O.message.error("暂时不支持裁剪功能,后续兼容。。。。"),V({file:F})):V({file:F})},V=F=>{r?r({file:F.file,...a}).then(E=>{j([...y.current,...E])}).finally(()=>{h.current--}):(Object.assign(F.file,{status:"done",url:URL.createObjectURL(new Blob([F.file],{type:Ba(F.file.type)}))}),j([...y.current,F.file]),h.current--)},q=F=>{const{file:E,fileList:_}=F,{status:S}=E;switch(S){case"removed":{j([..._]);break}}},X=F=>{const E=S=>{const L=S.split("/"),W=L[L.length-1],[w]=W.split("?");return w};return{uid:(S=>{const L=y.current.find(W=>W.url===S);return L?L.uid:ft()})(F),name:E(F),url:F,status:"done"}},B=()=>{switch(c){case Te.String:return p.map(F=>F.url).join(",");case Te["String[]"]:return p.map(F=>F.url);case Te["File[]"]:return[...p];case Te.FileList:return[...p]}};return d.useEffect(()=>{const F=B();if(ot(F,u))return;let E=[];switch(c){case Te.String:{E=(u||"").split(",").filter(_=>_).map(_=>X(_));break}case Te["String[]"]:{E=(u||[]).map(_=>X(_));break}case Te["File[]"]:{E=(u||[]).map(_=>_);break}case Te.FileList:{E=(u||[]).map(_=>_);break}}j(E)},[u]),d.useEffect(()=>{if(g.current){g.current=!1;return}const F=B();f==null||f(F)},[p]),m.jsx(O.Upload,{listType:i,...z(),fileList:p,beforeUpload:M,onChange:q,children:"上传"})},J=new Map;J.set("Input",O.Input),J.set("ApiSelect",al),J.set("Select",O.Select),J.set("InputNumber",O.InputNumber),J.set("ApiTreeSelect",ll),J.set("TreeSelect",O.TreeSelect),J.set("ApiTransfer",cl),J.set("Transfer",O.Transfer),J.set("Switch",O.Switch),J.set("Button",O.Button),J.set("Radio",O.Radio),J.set("RadioGroup",O.Radio.Group),J.set("Checkbox",O.Checkbox),J.set("CheckboxGroup",O.Checkbox.Group),J.set("Cascader",O.Cascader),J.set("TimePicker",O.TimePicker),J.set("DatePicker",O.DatePicker),J.set("MonthPicker",O.DatePicker.MonthPicker),J.set("WeekPicker",O.DatePicker.WeekPicker),J.set("RangePicker",O.DatePicker.RangePicker),J.set("InputPassword",O.Input.Password),J.set("InputTextArea",O.Input.TextArea),J.set("ApiAutoComplete",ul),J.set("AutoComplete",O.AutoComplete),J.set("Upload",O.Upload),J.set("AutoUpload",fl);const Zr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},dl=d.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},i)=>{console.log("render FormItem",t.name);const{rewritingModel:s,isusewatch:a}=Ja(n,t),{isIfShow:c,isShow:u}=Ua(t,s,o),{colProps:f}=Xa(t,n),{componentProps:g}=Ga(t,s),{rules:h}=Ya({item:t,model:s,isShow:u,componentProps:g}),{disabled:y}=qa(n,t,s),{itemCollapse:p,setItemCollapse:x}=Va(n,e),{name:j,label:z,wrapperCol:M,labelCol:R,valuePropName:V,initialValue:q,forceRow:X}=t;d.useImperativeHandle(i,()=>({itemIndex:e,componentProps:g,itemCollapse:p,setItemCollapse:x}));const B=()=>({name:j,label:z,rules:h,wrapperCol:M,labelCol:R,valuePropName:V,initialValue:q}),{setExtendFormComp:F}=Jr();F(J);const E=Ot(t),_=At(t),S=()=>{if(E){const L=J.get(t.component);return m.jsx(L,{...g,disabled:y,isusewatch:a.toString()})}return _?t.render({model:s,name:j,disabled:y,methods:r,componentProps:g}):null};return m.jsxs(d.Fragment,{children:[X?m.jsx("div",{className:Zr["form-item-force"]}):null,c?m.jsx(O.Col,{...f,className:u&&!p?void 0:Zr["form-item-hidden"],children:m.jsx(O.Form.Item,{...B(),children:S()})}):null]})}),pl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},hl=d.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,i]=d.useState(e),s=d.useMemo(()=>o,[o]),a=()=>{r(),i(!0)},c=()=>{t(),i(!1)};return d.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),m.jsx("div",{className:pl["collapse-wrapper"],children:s?m.jsx(O.Button,{onClick:c,type:"link",icon:m.jsx(ye.DownOutlined,{}),children:"展开"}):m.jsx(O.Button,{onClick:a,type:"link",icon:m.jsx(ye.UpOutlined,{}),children:"折叠"})})}),gl={"group-wrapper":"_group-wrapper_g8zqi_1"},ml=({formProps:e})=>{const{renderActions:t}=e;return m.jsx("div",{className:gl["group-wrapper"],children:t==null?void 0:t()})},bl={"xph-form-action":"_xph-form-action_8ws73_1"},vl=(e,t)=>{console.log("render Form");const[r]=O.Form.useForm(),{formProps:n}=sl(e),{formItems:o}=Ka({formProps:n}),i=d.useRef(new Map),{collapsible:s,collapseNum:a,collapseRef:c,onClickCollapseToFalse:u,onClickCollapseToTrue:f}=il(n,i),{handleFormatRenderValues:g,handleFormatReturnValues:h}=nl(o,n,i),{setFieldsValue:y,getFieldsValue:p,resetFields:x,validator:j,scrollToField:z}=ol(r,g,h),M=()=>{const{layout:V,wrapperCol:q,labelCol:X,colon:B,disabled:F,labelWrap:E,labelAlign:_,scrollToFirstError:S,size:L}=n;return{layout:V,wrapperCol:q,labelCol:X,colon:B,disabled:F,labelWrap:E,labelAlign:_,scrollToFirstError:S,size:L}},R={setFieldsValue:y,getFieldsValue:p,resetFields:x,validator:j,scrollToField:z};return d.useImperativeHandle(t,()=>({...R})),d.useEffect(()=>(console.log("Form is mounted======================="),n.register&&n.register(R),()=>{console.log("Form is unmounted========================="),i.current.clear()}),[]),m.jsxs(O.Form,{form:r,...M(),children:[m.jsx(O.Row,{children:o.map((V,q)=>(i.current.has(V.name)||i.current.set(V.name,d.createRef()),m.jsx(dl,{ref:i.current.get(V.name),itemIndex:q,itemProps:V,formProps:n,methods:R,collapseRef:c},q)))}),m.jsxs("div",{className:bl["xph-form-action"],children:[m.jsx(ml,{formProps:n}),s?m.jsx(hl,{ref:c,collapsible:o.length>a,onClickExpand:u,onClickFold:f}):null]})]})},Mt=d.forwardRef(vl),yl=d.memo(Mt),_l=d.forwardRef((e,t)=>{const{renderActions:r,showSearch:n,tableRef:o}=e,[i,s]=d.useState(!1),a=d.useRef(null),c=()=>{const{reloadData:h}=o.current;h()},u=()=>{const{resetData:h}=o.current;h()},f=d.useCallback(()=>m.jsxs("div",{style:{width:"100%",display:"flex"},children:[m.jsx("div",{style:{flex:1,width:0},children:r==null?void 0:r()}),n&&m.jsxs("div",{style:{display:"flex",gap:"8px"},children:[m.jsx(O.Button,{type:"primary",icon:m.jsx(ye.SearchOutlined,{}),onClick:c,children:"搜索"}),m.jsx(O.Button,{icon:m.jsx(ye.ReloadOutlined,{}),onClick:u,children:"重置"})]})]}),[n,r]),g=()=>{const{renderActions:h,...y}=e;return{...y,renderActions:f}};return d.useImperativeHandle(t,()=>({setFormLoading:s,...a.current})),m.jsx(O.Spin,{spinning:i,children:m.jsx(yl,{ref:a,...g()})})}),wl=d.memo(Mt),Cl=(e,t)=>{const r=d.useRef(null),n=d.useRef(null),{formProps:o}=e,s=(()=>{const{formProps:f,...g}=e;return g})(),a=d.useRef(null),c=async()=>{const{onOk:f,renderFooter:g}=s;if(!g){const{ok:h,data:y}=a.current;if(h){n.current.validator().then(async p=>{r.current.setLoading(!0),await h({values:n.current.getFieldsValue()}).then(j=>j).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),a.current=null)});return}if(f){n.current.validator().then(async p=>{r.current.setLoading(!0),await f({values:p,data:y}).then(j=>(console.log(j),j)).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),a.current=null)});return}r.current.close(),a.current=null}},u=async()=>{const{onCancel:f,renderFooter:g}=s;if(!g){const{cancel:h,data:y}=a.current;if(h){if(await h({values:n.current.getFieldsValue(!0)})===!1)return;r.current.close(),a.current=null;return}if(f){if(await f({values:n.current.getFieldsValue(!0),data:y})===!1)return;r.current.close(),a.current=null;return}r.current.close(),a.current=null}};return d.useImperativeHandle(t,()=>({open:f=>{const{renderFooter:g}=s;return!g&&(a.current=f),r.current.open().then(()=>{n.current.setFieldsValue(f.data||{})})},close:(...f)=>r.current.close(...f),setLoading:(...f)=>r.current.setLoading(...f),getFieldsValue:(...f)=>n.current.getFieldsValue(...f),setFieldsValue:(...f)=>n.current.setFieldsValue(...f),resetFields:(...f)=>n.current.resetFields(...f),validator:(...f)=>n.current.validator(...f),scrollToField:(...f)=>n.current.scrollToField(...f)})),m.jsx(Gr,{...s,ref:r,onOk:c,onCancel:u,children:m.jsx(wl,{...o,ref:n})})},Qr=d.forwardRef(Cl);function xl({searchForm:e}){return{searchFormRef:d.useRef(null),searchFormProps:e}}function Sl(e){return"cellFunc"in e}function Tl(e){return"children"in e}const{useToken:Pl}=O.theme,$l=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:i,onClick:s}=n,{token:a}=Pl(),c={color:a.colorLink,cursor:"pointer"},u=()=>{if(r.mainClick&&r.mainClick(),s){s();return}if(i){window.open(i,"_blank");return}};return m.jsx(e,{...r,mainClick:u,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},Dl={"cellfunc-actions":"_cellfunc-actions_14drt_1"},jl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return m.jsx("div",{className:Dl["cellfunc-actions"],children:m.jsx(it,{...n})})},{useToken:El}=O.theme,Fl={0:{color:"orange",backgroundColor:"unset",border:"1px solid orange"},1:{color:"purple",backgroundColor:"unset",border:"1px solid purple"},2:{color:"blue",backgroundColor:"unset",border:"1px solid blue"},3:{color:"green",backgroundColor:"unset",border:"1px solid green"},4:{color:"red",backgroundColor:"unset",border:"1px solid red"},5:{color:"pink",backgroundColor:"unset",border:"1px solid pink"},6:{color:"cyan",backgroundColor:"unset",border:"1px solid cyan"},7:{color:"magenta",backgroundColor:"unset",border:"1px solid magenta"},8:{color:"yellow",backgroundColor:"unset",border:"1px solid yellow"},9:{color:"teal",backgroundColor:"unset",border:"1px solid teal"},10:{color:"brown",backgroundColor:"unset",border:"1px solid brown"},11:{color:"gray",backgroundColor:"unset",border:"1px solid gray"},12:{color:"olive",backgroundColor:"unset",border:"1px solid olive"},13:{color:"navy",backgroundColor:"unset",border:"1px solid navy"},14:{color:"lime",backgroundColor:"unset",border:"1px solid lime"},15:{color:"maroon",backgroundColor:"unset",border:"1px solid maroon"}},Ol=(e,t,r)=>e.reduce((n,o,i)=>{var u;const s=`${t.dataIndex}${o.value}`,a=(u=o.config)==null?void 0:u.color,c=a?r[a]??{color:a,backgroundColor:"unset",border:`1px solid ${a}`}:Fl[i]||{};return n[s]={color:c.color,backgroundColor:c.backgroundColor,border:c.border},n},{}),en={link:{Comp:$l},actions:{Comp:jl},tag:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:{text:o,column:i}}}=t,{token:s}=El(),{enums:a}=n,c={primary:{color:s.colorPrimary,backgroundColor:s.colorPrimaryBg,border:`1px solid ${s.colorPrimary}`},success:{color:s.colorSuccess,backgroundColor:s.colorSuccessBg,border:`1px solid ${s.colorSuccess}`},warning:{color:s.colorWarning,backgroundColor:s.colorWarningBg,border:`1px solid ${s.colorWarning}`},info:{color:s.colorInfo,backgroundColor:s.colorInfoBg,border:`1px solid ${s.colorInfo}`},error:{color:s.colorError,backgroundColor:s.colorErrorBg,border:`1px solid ${s.colorError}`}},f=Ol(a,i,c)[`${String(i.dataIndex)}${o}`]||{},g={padding:"0 8px",borderRadius:s.borderRadiusLG,fontSize:s.fontSizeSM,...f},h=()=>{var p;return(p=a.find(x=>x.value===o))==null?void 0:p.label};return m.jsx(e,{...r,mainHandleText:h,mainStyle:Object.assign((r==null?void 0:r.mainStyle)||{},g)})}}},Al=(e,t)=>{var o;const{renderPrams:{text:r}}=e,n=(o=t==null?void 0:t.mainHandleText)==null?void 0:o.call(t);return m.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,children:n??r})},Ml=e=>{const{setExtendTableCellComp:t}=rn();t(en);const{dslConfig:r}=e;let n=Al.bind(null,e),o=0;for(;o<r.length;){const i=o++,s=en[r[i].component];s&&(n=s.Comp.bind(null,n,{curComponentProps:r[i].componentProps||{},cellFuncProps:e}))}return m.jsx(n,{})};function tn(e){return e.map(t=>{let r={...t};if(Sl(r)){const{cellFunc:n,...o}=r;r={...o,render:(...i)=>{const s=oe(n),[a,c,u]=i,f={text:a,record:c,index:u,column:JSON.parse(JSON.stringify(o))},g=s?n(f):n;return m.jsx(Ml,{dslConfig:g,renderPrams:f})}}}return Tl(r)&&r.children&&Array.isArray(r.children)&&(r.children=tn(r.children)),r})}function kl(e){const{columns:t}=e.table,r=tn(t);return console.log(r),{columns:r}}const Rl=e=>{const{extendTableProps:t}=rn();return{tableProps:{...De(De({table:{columns:[],fullHeight:!1,autoRequest:!0,pagination:{pageSize:20,total:0,showTotal:o=>`共:${o} 条`,current:1,pageSizeOptions:[10,20,50,100],showSizeChanger:!0,showQuickJumper:!0},requestFields:{pageSize:"pageSize",current:"current"},responseFields:{current:"current",list:"data",total:"total"}},crudFormDialog:void 0,searchForm:{showSearch:!0,items:[]}},t),e)}}};function Il(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=d.useState(t),i=d.useRef(t),s=d.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!i.current)return;const u={...i.current,...c};o(u),i.current=u},show:s},lastPaginationState:i}}function zl(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:i,requestFields:s,responseFields:a}=e.table,c=e.onPaginationChange,{pagination:u,lastPaginationState:f}=Il(e),[g,h]=d.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),y=d.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),p={model:g,update:E=>{var S;const _={...y.current,...E};h(_),y.current=_,(S=t.current)==null||S.setFormLoading(_.loading)}},x=async()=>{d.useEffect(()=>{const{autoRequest:E}=e.table,{validator:_}=t.current;E&&_().then(S=>{R({searchFormParams:S})})},[])},j=async({searchFormParams:E,paginationParams:_})=>{const S={...E,[`${s.current}`]:f.current.current,[`${s.pageSize}`]:f.current.pageSize,..._?{[`${s.current}`]:_.current,[`${s.pageSize}`]:_.pageSize}:{}};return r(S).then(L=>{const{current:W,list:w,total:v}=dt(a,L);p.update({dataSource:n?n(w):w}),u.update({total:v,current:W,pageSize:S[`${s.pageSize}`]})}).finally(()=>{p.update({loading:!1})})},z=async({searchFormParams:E,paginationParams:_})=>{const S={...E};return r(S).then(L=>{const{list:W}=dt(a,L),w=n?n(W):W;p.update({selection:[],dataSource:w}),u.update({current:1,total:W.length})}).finally(()=>{p.update({loading:!1})})},M=async({searchFormParams:E,paginationParams:_})=>{var L;const S={...E};if(_){const{current:W,pageSize:w}=_;u.update({current:W,pageSize:w});const v=(W-1)*w,C=v+w,D=(L=y.current.backupsDataSource)==null?void 0:L.slice(v,C);return p.update({loading:!1,selection:[],dataSource:D})}else return r(S).then(W=>{let w=n?n(W):W;const v=[...w],C=0,D=C+f.current.pageSize;w=w.slice(C,D),p.update({selection:[],dataSource:w,backupsDataSource:v}),u.update({current:1,total:W.length})}).finally(()=>{p.update({loading:!1})})},R=async({searchFormParams:E,paginationParams:_})=>{if(p.update({loading:!0,selection:[]}),r)switch(!!f.current){case!0:return o===!0?M({searchFormParams:E,paginationParams:_}):o===!1?z({searchFormParams:E,paginationParams:_}):j({searchFormParams:E,paginationParams:_});case!1:return z({searchFormParams:E,paginationParams:_})}return p.update({loading:!1})};return{table:p,pagination:u,firstGetTableData:x,onPaginationChange:(E,_)=>{const{validator:S}=t.current;S().then(L=>{R({searchFormParams:L,paginationParams:{current:E,pageSize:_}})}),c&&c(E,_)},onAllChange:async(...E)=>{const[_,S,L,W]=E,w=[];for(let v=0;v<w.length&&!w[v]();v++);i&&i(S,L,W)},resetData:async()=>{const{resetFields:E,validator:_}=t.current;return E().then(async()=>{const S=await _();return R({searchFormParams:S})})},resetAllData:async()=>{const{resetFields:E,validator:_}=t.current;return E().then(async()=>{const S={};if(f.current){const{pageSize:L}=f.current;o===void 0&&(S.paginationParams={current:1,pageSize:L})}return S.searchFormParams=await _(),R(S)})},reloadData:async()=>{const{validator:E}=t.current;return E().then(_=>R({searchFormParams:_}))}}}const Ll=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(Ir(n))return{type:n,onChange:(i,s,a)=>{t.update({selection:s}),r&&r(i,s)}};if(pe(n)){const{onChange:i}=n;return{...n,onChange:(s,a,c)=>{t.update({selection:a}),i&&i(s,a,c),r&&r(s,a)}}}return n};return{rowSelection:o(),getNewRowSelection:o}};function Wl(e,t){const{scroll:r,virtual:n}=e.table,o=d.useRef(null),[i,s]=d.useState(0),[a,c]=d.useState(0);d.useEffect(()=>{const f=()=>{o.current&&(s(o.current.offsetWidth),c(o.current.offsetHeight))};f();const g=new ResizeObserver(f);return o.current&&g.observe(o.current),()=>{g&&o.current&&g.unobserve(o.current)}},[]);const u=d.useMemo(()=>t?n?{x:i,y:a-70,...r}:{x:"max-content",y:a-70,...r}:{x:"max-content",...r},[a]);return{divRef:o,scroll:u}}function Nl(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(oe(r)){const o=r({loading:t.model.loading,selection:t.model.selection});return{...o,disabled:t.model.loading||o.disabled}}return{...r,disabled:t.model.loading||(r==null?void 0:r.disabled)}}}}const rn=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(i=>{const s=o[i];n[i]={Comp:s}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},Hl=({crudFormDialog:e})=>({crudFormDialogRef:d.useRef(null),crudFormProps:e}),ct={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},Bl=d.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=kl(e),i=d.useRef(null),{table:s,pagination:a,firstGetTableData:c,onPaginationChange:u,onAllChange:f,resetData:g,resetAllData:h,reloadData:y}=zl(e,t),{rowSelection:p}=Ll(e,s),{divRef:x,scroll:j}=Wl(e,r),{getTopToolbarBindProps:z}=Nl(e,s),M=()=>{const{autoRequest:R,api:V,formatDataSource:q,autoPagination:X,columns:B,scroll:F,pagination:E,rowSelection:_,onChange:S,...L}=e.table;return L};return c(),d.useImperativeHandle(n,()=>({resetData:g,resetAllData:h,reloadData:y,...i.current})),console.log("render Table"),m.jsxs("div",{className:r?ct["main-container"]:void 0,children:[m.jsx("div",{className:ct.container__toolbar,children:m.jsx(it,{...z()})}),m.jsx("div",{ref:x,className:r?ct.container__table:void 0,children:m.jsx(O.Table,{ref:i,...M(),loading:s.model.loading,columns:o,dataSource:s.model.dataSource,pagination:!1,rowSelection:p,scroll:j,onChange:f})}),a.show?m.jsx("div",{className:ct.container__pagination,children:m.jsx(O.Pagination,{disabled:s.model.loading,...a.model,onChange:u})}):null]})}),nn={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},Ul=(e,t)=>{const{tableProps:r}=Rl(e),n=d.useRef(null),{searchFormRef:o,searchFormProps:i}=xl(r),{crudFormDialogRef:s,crudFormProps:a}=Hl(r);let{fullHeight:c}=r.table;const{virtual:u}=r.table;return u&&(c=!0),d.useImperativeHandle(t,()=>({...n.current,...s.current})),m.jsxs("div",{className:c?nn["xph-table-full-wrapper"]:void 0,children:[m.jsx("div",{children:m.jsx(_l,{ref:o,tableRef:n,...i})}),m.jsx("div",{className:c?nn["full-wrapper__table"]:void 0,children:m.jsx(Bl,{ref:n,searchFormRef:o,fullHeight:c,tableProps:r})}),a?m.jsx(Qr,{ref:s,...a}):null]})},Vl=d.forwardRef(Ul);Y.XphActions=it,Y.XphCrudFormDialog=Qr,Y.XphDialog=Gr,Y.XphExtendCompPropsProvider=pa,Y.XphForm=Mt,Y.XphPortal=Xr,Y.XphTable=Vl,Y.buildUUID=ft,Y.getValueByPath=Yt,Y.getValuesByPathObj=dt,Y.useAsyncState=Br,Y.useXphExtendCompProps=qe,Y.useXphForm=Za,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
30
+ <%s key={someKey} {...props} />`,Ut,ke,lc,ke),hn[ke+Ut]=!0}}return l===n?nc(ne):rc(ne),ne}}function oc(l,b,P){return gn(l,b,P,!0)}function sc(l,b,P){return gn(l,b,P,!1)}var ic=sc,ac=oc;Ne.Fragment=n,Ne.jsx=ic,Ne.jsxs=ac}()),Ne}process.env.NODE_ENV==="production"?pt.exports=yn():pt.exports=_n();var m=pt.exports,Xt=typeof global=="object"&&global&&global.Object===Object&&global,wn=typeof self=="object"&&self&&self.Object===Object&&self,_e=Xt||wn||Function("return this")(),Pe=_e.Symbol,Kt=Object.prototype,Cn=Kt.hasOwnProperty,xn=Kt.toString,He=Pe?Pe.toStringTag:void 0;function Sn(e){var t=Cn.call(e,He),r=e[He];try{e[He]=void 0;var n=!0}catch{}var o=xn.call(e);return n&&(t?e[He]=r:delete e[He]),o}var Tn=Object.prototype,Pn=Tn.toString;function $n(e){return Pn.call(e)}var Dn="[object Null]",jn="[object Undefined]",Jt=Pe?Pe.toStringTag:void 0;function we(e){return e==null?e===void 0?jn:Dn:Jt&&Jt in Object(e)?Sn(e):$n(e)}function be(e){return e!=null&&typeof e=="object"}var En="[object Symbol]";function ht(e){return typeof e=="symbol"||be(e)&&we(e)==En}function Fn(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var fe=Array.isArray,On=1/0,Zt=Pe?Pe.prototype:void 0,Qt=Zt?Zt.toString:void 0;function er(e){if(typeof e=="string")return e;if(fe(e))return Fn(e,er)+"";if(ht(e))return Qt?Qt.call(e):"";var t=e+"";return t=="0"&&1/e==-On?"-0":t}function pe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tr(e){return e}var An="[object AsyncFunction]",Mn="[object Function]",kn="[object GeneratorFunction]",Rn="[object Proxy]";function oe(e){if(!pe(e))return!1;var t=we(e);return t==Mn||t==kn||t==An||t==Rn}var gt=_e["__core-js_shared__"],rr=function(){var e=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function In(e){return!!rr&&rr in e}var zn=Function.prototype,Ln=zn.toString;function Fe(e){if(e!=null){try{return Ln.call(e)}catch{}try{return e+""}catch{}}return""}var Wn=/[\\^$.*+?()[\]{}|]/g,Nn=/^\[object .+?Constructor\]$/,Hn=Function.prototype,Bn=Object.prototype,Vn=Hn.toString,Un=Bn.hasOwnProperty,Yn=RegExp("^"+Vn.call(Un).replace(Wn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qn(e){if(!pe(e)||In(e))return!1;var t=oe(e)?Yn:Nn;return t.test(Fe(e))}function Gn(e,t){return e==null?void 0:e[t]}function Oe(e,t){var r=Gn(e,t);return qn(r)?r:void 0}var mt=Oe(_e,"WeakMap"),nr=Object.create,Xn=function(){function e(){}return function(t){if(!pe(t))return{};if(nr)return nr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Kn(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Jn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Zn=800,Qn=16,eo=Date.now;function to(e){var t=0,r=0;return function(){var n=eo(),o=Qn-(n-r);if(r=n,o>0){if(++t>=Zn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ro(e){return function(){return e}}var Ke=function(){try{var e=Oe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),no=Ke?function(e,t){return Ke(e,"toString",{configurable:!0,enumerable:!1,value:ro(t),writable:!0})}:tr,oo=to(no),so=9007199254740991,io=/^(?:0|[1-9]\d*)$/;function bt(e,t){var r=typeof e;return t=t??so,!!t&&(r=="number"||r!="symbol"&&io.test(e))&&e>-1&&e%1==0&&e<t}function vt(e,t,r){t=="__proto__"&&Ke?Ke(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Be(e,t){return e===t||e!==e&&t!==t}var ao=Object.prototype,lo=ao.hasOwnProperty;function or(e,t,r){var n=e[t];(!(lo.call(e,t)&&Be(n,r))||r===void 0&&!(t in e))&&vt(e,t,r)}function co(e,t,r,n){var o=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var a=t[i],c=void 0;c===void 0&&(c=e[a]),o?vt(r,a,c):or(r,a,c)}return r}var sr=Math.max;function uo(e,t,r){return t=sr(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=sr(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(s),Kn(e,this,a)}}function fo(e,t){return oo(uo(e,t,tr),e+"")}var po=9007199254740991;function ir(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=po}function Je(e){return e!=null&&ir(e.length)&&!oe(e)}function ho(e,t,r){if(!pe(r))return!1;var n=typeof t;return(n=="number"?Je(r)&&bt(t,r.length):n=="string"&&t in r)?Be(r[t],e):!1}function go(e){return fo(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&ho(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,i)}return t})}var mo=Object.prototype;function yt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mo;return e===r}function bo(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var vo="[object Arguments]";function ar(e){return be(e)&&we(e)==vo}var lr=Object.prototype,yo=lr.hasOwnProperty,_o=lr.propertyIsEnumerable,_t=ar(function(){return arguments}())?ar:function(e){return be(e)&&yo.call(e,"callee")&&!_o.call(e,"callee")};function wo(){return!1}var cr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,ur=cr&&typeof module=="object"&&module&&!module.nodeType&&module,Co=ur&&ur.exports===cr,fr=Co?_e.Buffer:void 0,xo=fr?fr.isBuffer:void 0,Ze=xo||wo,So="[object Arguments]",To="[object Array]",Po="[object Boolean]",$o="[object Date]",Do="[object Error]",jo="[object Function]",Eo="[object Map]",Fo="[object Number]",Oo="[object Object]",Ao="[object RegExp]",Mo="[object Set]",ko="[object String]",Ro="[object WeakMap]",Io="[object ArrayBuffer]",zo="[object DataView]",Lo="[object Float32Array]",Wo="[object Float64Array]",No="[object Int8Array]",Ho="[object Int16Array]",Bo="[object Int32Array]",Vo="[object Uint8Array]",Uo="[object Uint8ClampedArray]",Yo="[object Uint16Array]",qo="[object Uint32Array]",Q={};Q[Lo]=Q[Wo]=Q[No]=Q[Ho]=Q[Bo]=Q[Vo]=Q[Uo]=Q[Yo]=Q[qo]=!0,Q[So]=Q[To]=Q[Io]=Q[Po]=Q[zo]=Q[$o]=Q[Do]=Q[jo]=Q[Eo]=Q[Fo]=Q[Oo]=Q[Ao]=Q[Mo]=Q[ko]=Q[Ro]=!1;function Go(e){return be(e)&&ir(e.length)&&!!Q[we(e)]}function Xo(e){return function(t){return e(t)}}var dr=typeof Y=="object"&&Y&&!Y.nodeType&&Y,Ve=dr&&typeof module=="object"&&module&&!module.nodeType&&module,Ko=Ve&&Ve.exports===dr,wt=Ko&&Xt.process,pr=function(){try{var e=Ve&&Ve.require&&Ve.require("util").types;return e||wt&&wt.binding&&wt.binding("util")}catch{}}(),hr=pr&&pr.isTypedArray,Ct=hr?Xo(hr):Go,Jo=Object.prototype,Zo=Jo.hasOwnProperty;function gr(e,t){var r=fe(e),n=!r&&_t(e),o=!r&&!n&&Ze(e),i=!r&&!n&&!o&&Ct(e),s=r||n||o||i,a=s?bo(e.length,String):[],c=a.length;for(var u in e)(t||Zo.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bt(u,c)))&&a.push(u);return a}function mr(e,t){return function(r){return e(t(r))}}var Qo=mr(Object.keys,Object),es=Object.prototype,ts=es.hasOwnProperty;function rs(e){if(!yt(e))return Qo(e);var t=[];for(var r in Object(e))ts.call(e,r)&&r!="constructor"&&t.push(r);return t}function ns(e){return Je(e)?gr(e):rs(e)}function os(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var ss=Object.prototype,is=ss.hasOwnProperty;function as(e){if(!pe(e))return os(e);var t=yt(e),r=[];for(var n in e)n=="constructor"&&(t||!is.call(e,n))||r.push(n);return r}function br(e){return Je(e)?gr(e,!0):as(e)}var ls=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cs=/^\w*$/;function us(e,t){if(fe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ht(e)?!0:cs.test(e)||!ls.test(e)||t!=null&&e in Object(t)}var Ue=Oe(Object,"create");function fs(){this.__data__=Ue?Ue(null):{},this.size=0}function ds(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ps="__lodash_hash_undefined__",hs=Object.prototype,gs=hs.hasOwnProperty;function ms(e){var t=this.__data__;if(Ue){var r=t[e];return r===ps?void 0:r}return gs.call(t,e)?t[e]:void 0}var bs=Object.prototype,vs=bs.hasOwnProperty;function ys(e){var t=this.__data__;return Ue?t[e]!==void 0:vs.call(t,e)}var _s="__lodash_hash_undefined__";function ws(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ue&&t===void 0?_s:t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ae.prototype.clear=fs,Ae.prototype.delete=ds,Ae.prototype.get=ms,Ae.prototype.has=ys,Ae.prototype.set=ws;function Cs(){this.__data__=[],this.size=0}function Qe(e,t){for(var r=e.length;r--;)if(Be(e[r][0],t))return r;return-1}var xs=Array.prototype,Ss=xs.splice;function Ts(e){var t=this.__data__,r=Qe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ss.call(t,r,1),--this.size,!0}function Ps(e){var t=this.__data__,r=Qe(t,e);return r<0?void 0:t[r][1]}function $s(e){return Qe(this.__data__,e)>-1}function Ds(e,t){var r=this.__data__,n=Qe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ce(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ce.prototype.clear=Cs,Ce.prototype.delete=Ts,Ce.prototype.get=Ps,Ce.prototype.has=$s,Ce.prototype.set=Ds;var Ye=Oe(_e,"Map");function js(){this.size=0,this.__data__={hash:new Ae,map:new(Ye||Ce),string:new Ae}}function Es(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function et(e,t){var r=e.__data__;return Es(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Fs(e){var t=et(this,e).delete(e);return this.size-=t?1:0,t}function Os(e){return et(this,e).get(e)}function As(e){return et(this,e).has(e)}function Ms(e,t){var r=et(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=js,xe.prototype.delete=Fs,xe.prototype.get=Os,xe.prototype.has=As,xe.prototype.set=Ms;var ks="Expected a function";function xt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ks);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(xt.Cache||xe),r}xt.Cache=xe;var Rs=500;function Is(e){var t=xt(e,function(n){return r.size===Rs&&r.clear(),n}),r=t.cache;return t}var zs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ls=/\\(\\)?/g,Ws=Is(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zs,function(r,n,o,i){t.push(o?i.replace(Ls,"$1"):n||r)}),t});function Ns(e){return e==null?"":er(e)}function Hs(e,t){return fe(e)?e:us(e,t)?[e]:Ws(Ns(e))}var Bs=1/0;function Vs(e){if(typeof e=="string"||ht(e))return e;var t=e+"";return t=="0"&&1/e==-Bs?"-0":t}function Us(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var vr=mr(Object.getPrototypeOf,Object),Ys="[object Object]",qs=Function.prototype,Gs=Object.prototype,yr=qs.toString,Xs=Gs.hasOwnProperty,Ks=yr.call(Object);function Js(e){if(!be(e)||we(e)!=Ys)return!1;var t=vr(e);if(t===null)return!0;var r=Xs.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&yr.call(r)==Ks}function Zs(){this.__data__=new Ce,this.size=0}function Qs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function ei(e){return this.__data__.get(e)}function ti(e){return this.__data__.has(e)}var ri=200;function ni(e,t){var r=this.__data__;if(r instanceof Ce){var n=r.__data__;if(!Ye||n.length<ri-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xe(n)}return r.set(e,t),this.size=r.size,this}function Se(e){var t=this.__data__=new Ce(e);this.size=t.size}Se.prototype.clear=Zs,Se.prototype.delete=Qs,Se.prototype.get=ei,Se.prototype.has=ti,Se.prototype.set=ni;var _r=typeof Y=="object"&&Y&&!Y.nodeType&&Y,wr=_r&&typeof module=="object"&&module&&!module.nodeType&&module,oi=wr&&wr.exports===_r,Cr=oi?_e.Buffer:void 0;Cr&&Cr.allocUnsafe;function si(e,t){return e.slice()}function ii(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function ai(){return[]}var li=Object.prototype,ci=li.propertyIsEnumerable,xr=Object.getOwnPropertySymbols,ui=xr?function(e){return e==null?[]:(e=Object(e),ii(xr(e),function(t){return ci.call(e,t)}))}:ai;function fi(e,t,r){var n=t(e);return fe(e)?n:Us(n,r(e))}function Sr(e){return fi(e,ns,ui)}var St=Oe(_e,"DataView"),Tt=Oe(_e,"Promise"),Pt=Oe(_e,"Set"),Tr="[object Map]",di="[object Object]",Pr="[object Promise]",$r="[object Set]",Dr="[object WeakMap]",jr="[object DataView]",pi=Fe(St),hi=Fe(Ye),gi=Fe(Tt),mi=Fe(Pt),bi=Fe(mt),$e=we;(St&&$e(new St(new ArrayBuffer(1)))!=jr||Ye&&$e(new Ye)!=Tr||Tt&&$e(Tt.resolve())!=Pr||Pt&&$e(new Pt)!=$r||mt&&$e(new mt)!=Dr)&&($e=function(e){var t=we(e),r=t==di?e.constructor:void 0,n=r?Fe(r):"";if(n)switch(n){case pi:return jr;case hi:return Tr;case gi:return Pr;case mi:return $r;case bi:return Dr}return t});var tt=_e.Uint8Array;function vi(e){var t=new e.constructor(e.byteLength);return new tt(t).set(new tt(e)),t}function yi(e,t){var r=vi(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function _i(e){return typeof e.constructor=="function"&&!yt(e)?Xn(vr(e)):{}}var wi="__lodash_hash_undefined__";function Ci(e){return this.__data__.set(e,wi),this}function xi(e){return this.__data__.has(e)}function rt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}rt.prototype.add=rt.prototype.push=Ci,rt.prototype.has=xi;function Si(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ti(e,t){return e.has(t)}var Pi=1,$i=2;function Er(e,t,r,n,o,i){var s=r&Pi,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var g=-1,p=!0,y=r&$i?new rt:void 0;for(i.set(e,t),i.set(t,e);++g<a;){var h=e[g],x=t[g];if(n)var j=s?n(x,h,g,t,e,i):n(h,x,g,e,t,i);if(j!==void 0){if(j)continue;p=!1;break}if(y){if(!Si(t,function(z,M){if(!Ti(y,M)&&(h===z||o(h,z,r,n,i)))return y.push(M)})){p=!1;break}}else if(!(h===x||o(h,x,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function Di(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function ji(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ei=1,Fi=2,Oi="[object Boolean]",Ai="[object Date]",Mi="[object Error]",ki="[object Map]",Ri="[object Number]",Ii="[object RegExp]",zi="[object Set]",Li="[object String]",Wi="[object Symbol]",Ni="[object ArrayBuffer]",Hi="[object DataView]",Fr=Pe?Pe.prototype:void 0,$t=Fr?Fr.valueOf:void 0;function Bi(e,t,r,n,o,i,s){switch(r){case Hi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ni:return!(e.byteLength!=t.byteLength||!i(new tt(e),new tt(t)));case Oi:case Ai:case Ri:return Be(+e,+t);case Mi:return e.name==t.name&&e.message==t.message;case Ii:case Li:return e==t+"";case ki:var a=Di;case zi:var c=n&Ei;if(a||(a=ji),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Fi,s.set(e,t);var f=Er(a(e),a(t),n,o,i,s);return s.delete(e),f;case Wi:if($t)return $t.call(e)==$t.call(t)}return!1}var Vi=1,Ui=Object.prototype,Yi=Ui.hasOwnProperty;function qi(e,t,r,n,o,i){var s=r&Vi,a=Sr(e),c=a.length,u=Sr(t),f=u.length;if(c!=f&&!s)return!1;for(var g=c;g--;){var p=a[g];if(!(s?p in t:Yi.call(t,p)))return!1}var y=i.get(e),h=i.get(t);if(y&&h)return y==t&&h==e;var x=!0;i.set(e,t),i.set(t,e);for(var j=s;++g<c;){p=a[g];var z=e[p],M=t[p];if(n)var R=s?n(M,z,p,t,e,i):n(z,M,p,e,t,i);if(!(R===void 0?z===M||o(z,M,r,n,i):R)){x=!1;break}j||(j=p=="constructor")}if(x&&!j){var U=e.constructor,q=t.constructor;U!=q&&"constructor"in e&&"constructor"in t&&!(typeof U=="function"&&U instanceof U&&typeof q=="function"&&q instanceof q)&&(x=!1)}return i.delete(e),i.delete(t),x}var Gi=1,Or="[object Arguments]",Ar="[object Array]",nt="[object Object]",Xi=Object.prototype,Mr=Xi.hasOwnProperty;function Ki(e,t,r,n,o,i){var s=fe(e),a=fe(t),c=s?Ar:$e(e),u=a?Ar:$e(t);c=c==Or?nt:c,u=u==Or?nt:u;var f=c==nt,g=u==nt,p=c==u;if(p&&Ze(e)){if(!Ze(t))return!1;s=!0,f=!1}if(p&&!f)return i||(i=new Se),s||Ct(e)?Er(e,t,r,n,o,i):Bi(e,t,c,r,n,o,i);if(!(r&Gi)){var y=f&&Mr.call(e,"__wrapped__"),h=g&&Mr.call(t,"__wrapped__");if(y||h){var x=y?e.value():e,j=h?t.value():t;return i||(i=new Se),o(x,j,r,n,i)}}return p?(i||(i=new Se),qi(e,t,r,n,o,i)):!1}function kr(e,t,r,n,o){return e===t?!0:e==null||t==null||!be(e)&&!be(t)?e!==e&&t!==t:Ki(e,t,r,n,kr,o)}function Ji(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var c=s[++o];if(r(i[c],c,i)===!1)break}return t}}var Zi=Ji();function Dt(e,t,r){(r!==void 0&&!Be(e[t],r)||r===void 0&&!(t in e))&&vt(e,t,r)}function Qi(e){return be(e)&&Je(e)}function jt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ea(e){return co(e,br(e))}function ta(e,t,r,n,o,i,s){var a=jt(e,r),c=jt(t,r),u=s.get(c);if(u){Dt(e,r,u);return}var f=i?i(a,c,r+"",e,t,s):void 0,g=f===void 0;if(g){var p=fe(c),y=!p&&Ze(c),h=!p&&!y&&Ct(c);f=c,p||y||h?fe(a)?f=a:Qi(a)?f=Jn(a):y?(g=!1,f=si(c)):h?(g=!1,f=yi(c)):f=[]:Js(c)||_t(c)?(f=a,_t(a)?f=ea(a):(!pe(a)||oe(a))&&(f=_i(c))):g=!1}g&&(s.set(c,f),o(f,c,n,i,s),s.delete(c)),Dt(e,r,f)}function Rr(e,t,r,n,o){e!==t&&Zi(t,function(i,s){if(o||(o=new Se),pe(i))ta(e,t,s,r,Rr,n,o);else{var a=n?n(jt(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),Dt(e,s,a)}},br)}var ra="[object String]";function Ir(e){return typeof e=="string"||!fe(e)&&be(e)&&we(e)==ra}var na="[object Boolean]";function Et(e){return e===!0||e===!1||be(e)&&we(e)==na}function ot(e,t){return kr(e,t)}var oa="[object Number]";function sa(e){return typeof e=="number"||be(e)&&we(e)==oa}function zr(e){return e==null}function ia(e){return e===null}var De=go(function(e,t,r){Rr(e,t,r)});function aa(e,t,r,n){if(!pe(e))return e;t=Hs(t,e);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var c=Vs(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=s){var f=a[c];u=void 0,u===void 0&&(u=pe(f)?f:bt(t[o+1])?[]:{})}or(a,c,u),a=a[c]}return e}function Lr(e,t,r){return e==null?e:aa(e,t,r)}function la(e){const{inherit:t=!0}=e,{extendActionsProps:r}=Vr();return{actionsProps:{...De(De({items:[],max:10},t?r:{}),e)}}}function Wr(e){return"component"in e}function ca(e){return"render"in e}function ua(e){const{type:t,disabled:r,items:n,max:o}=e,i=n.map(a=>{const c={...a};return Wr(c)&&(c.componentProps={type:t,disabled:r,...c.componentProps}),c}),s=sa(o)&&o>=0;return{showActionItems:i.slice(0,s?o:i.length),ellipsisActionItems:i.slice(s?o:i.length)}}const fa=e=>{const{componentProps:t}=e,r=()=>{const{...n}=t;return n};return m.jsx(O.Button,{...r()})},da=e=>{const{componentProps:t}=e,n=(()=>{const{dropDownItems:o,onClick:i,...s}=t;return s})();return m.jsx(O.Dropdown,{disabled:n.disabled,menu:{items:(t==null?void 0:t.dropDownItems)||[],onClick:t==null?void 0:t.onClick},trigger:["click"],children:m.jsx("div",{children:m.jsxs(O.Button,{...n,children:[n.children,m.jsx(ye.CaretDownOutlined,{})]})})})},st=new Map;st.set("Button",fa),st.set("Dropdown",da);function Nr(){const{setExtendActionsComp:e}=Vr();return e(st),{renderContent:d.useCallback((r,n)=>{const o=Wr(r),i=ca(r);if(o){const s=st.get(r.component);return m.jsx(s,{...r},n)}return i?m.jsx("div",{children:r.render},n):null},[])}}const Hr=d.createContext({}),pa=e=>{const{extendProps:t,extendComp:r}=e.value;return m.jsx(Hr.Provider,{value:{extendProps:t,extendComp:r},children:e.children})},qe=()=>d.useContext(Hr),Br=e=>{const[t,r]=d.useState(e),n=d.useRef(null);return d.useEffect(()=>{n.current&&(n.current(),n.current=null)},[t]),[t,i=>new Promise((s,a)=>{r(c=>{const u=typeof i=="function"?i(c):i;return n.current=s,u})})]},Vr=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.actions;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendActionsProps:e==null?void 0:e.actions,setExtendActionsComp:r}},{useToken:ha}=O.theme,ga=({items:e,actionsProps:t})=>{const{type:r,disabled:n}=t,{renderContent:o}=Nr(),{token:i}=ha(),s={backgroundColor:i.colorBgElevated,borderRadius:i.borderRadiusLG,boxShadow:i.boxShadowSecondary},a=()=>m.jsx("div",{style:s,children:m.jsx(O.Space,{style:{padding:8},children:e==null?void 0:e.map((c,u)=>o(c,u))})});return m.jsx(O.Dropdown,{disabled:n,menu:{items:[]},dropdownRender:a,trigger:["click"],children:m.jsxs(O.Button,{type:r,children:["更多",m.jsx(ye.CaretDownOutlined,{})]})})},it=e=>{const{actionsProps:t}=la(e),{showActionItems:r,ellipsisActionItems:n}=ua(t),{renderContent:o}=Nr();return t!=null&&t.render?t.render:m.jsxs(d.Fragment,{children:[r==null?void 0:r.map((i,s)=>o(i,s)),n!=null&&n.length?m.jsx(ga,{actionsProps:t,items:n}):null]})};function ma(e,t){const{okText:r,cancelText:n,onCancel:o,onOk:i,okProps:s,cancelProps:a}=e;return{footerActions:{disabled:t,max:2,items:[{component:"Button",componentProps:{...a,children:n,onClick:o}},{component:"Button",componentProps:{type:"primary",loading:t,...s,children:r,onClick:i}}]}}}const ba=e=>{const{extendDialogProps:t}=va(),r={width:700,okText:"确定",cancelText:"取消",getPopperContainer:()=>document.body},n={...De(De(r,t),e)};return{dialogProps:{...n,getPopperContainer:()=>{const i=n.getPopperContainer();return n.mask?document.body:i}},baseDialogProps:r}},va=()=>{const{extendProps:e}=qe();return{extendDialogProps:e==null?void 0:e.dialog}},ya=(e,t,r,n)=>{const{onOpen:o,onClose:i}=t;return{open:async()=>{e||(o&&o(),await r(!0))},close:()=>{r(!1),n(!1),i&&i()}}},_a=({initWidth:e,initHeight:t,setDialogChangeRecord:r})=>{const[n,o]=d.useState(e.current),[i,s]=d.useState(t.current);return{dialogWidth:n,dialogHeight:i,setDialogSize:({width:c,height:u})=>{r({width:n,height:i}),c!==void 0&&o(c),u!==void 0&&s(u)}}},wa=({initLeft:e,initTop:t,setDialogChangeRecord:r})=>{const[n,o]=d.useState(e.current),[i,s]=d.useState(t.current);return{dialogLeft:n,dialogTop:i,setDialogPosition:({left:c,top:u})=>{r({left:n,top:i}),c!==void 0&&o(c),u!==void 0&&s(u)}}},Ur=({containerSizeTarget:e,dialogHeaderRef:t,dialogRef:r,setDialogPosition:n})=>{const o=d.useRef(0),i=d.useRef(0),s=f=>{const g=f.getBoundingClientRect(),p=g.width,y=g.height,h=-.5*p,x=-.5*y;return{translateX:h,translateY:x}},a=d.useCallback(f=>{const{offsetLeft:g,offsetTop:p}=r.current;o.current=f.clientX-g,i.current=f.clientY-p,document.addEventListener("mousemove",c),document.addEventListener("mouseup",u)},[]),c=d.useCallback(f=>{const g=r.current,{translateX:p,translateY:y}=s(g);let h=f.clientX-o.current,x=f.clientY-i.current;const j=-p,z=-y,M=e.current.scrollWidth-g.offsetWidth-p,R=e.current.scrollHeight-g.offsetHeight-y;h<j&&(h=j),h>M&&(h=M),x<z&&(x=z),x>R&&(x=R),n({left:h,top:x})},[]),u=d.useCallback(()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)},[]);return d.useEffect(()=>{const f=t.current;return f.addEventListener("mousedown",a),()=>{f.removeEventListener("mousedown",a)}},[]),{}},Ca=({containerSizeTarget:e,dialogChangeRecord:t,close:r,setDialogSize:n,setDialogPosition:o})=>{const[i,s]=d.useState(!1),[a,c]=d.useState(!1);return{minimizeVisible:i,maximizeVisible:a,onMinimize:()=>{s(!0)},onMaximize:y=>{if(y==="minimize"&&s(!1),y==="maximize"){const{scrollWidth:h,scrollHeight:x}=e.current,j=Math.floor(h),z=Math.floor(x),M=Math.floor(h/2),R=Math.floor(x/2);n({width:j,height:z}),o({top:R,left:M}),c(!0)}},onRecovery:()=>{const{top:y,left:h,width:x,height:j}=t.current;n({width:x,height:j}),o({top:y,left:h}),c(!1)},onClose:()=>{s(!1),c(!1),r()}}},xa=({visible:e,containerSizeTarget:t,dialogHeight:r,dialogRef:n,dialogHeaderRef:o,dialogFooterRef:i})=>{const{clientHeight:s,scrollHeight:a}=t.current,[c,u]=d.useState(0),[f,g]=d.useState("unset"),p=(y,h)=>{var q,X;const z=(q=o.current)==null?void 0:q.offsetHeight,M=(X=i.current)==null?void 0:X.offsetHeight;let R=y-z-M-0;const U=h-z-M-0;return R>U&&(R=U),R};return d.useEffect(()=>{var y;if(c===s){console.log("触发了dialogMaxHeight改变");const h=(y=n.current)==null?void 0:y.getBoundingClientRect().height;g(p(h,s)),u("unset")}},[c]),d.useEffect(()=>{r!=="unset"&&r!==0&&(console.log("触发了重新设置contentMaxHeight",r),g(p(r,r>s?a:s)),u("unset"))},[r]),d.useEffect(()=>{e?u(s):(u(0),g("unset"))},[e]),{dialogMaxHeight:c,contentMaxHeight:f}},Sa=()=>{const[e,t]=d.useState(160),[r,n]=d.useState(60),o=d.useRef(null);return{minimizeTop:r,minimizeLeft:e,minimizeRef:o,setMinimizePosition:({left:s,top:a})=>{s!==void 0&&t(s),a!==void 0&&n(a)}}},Ta=({visible:e,dialogRef:t,minimizeRef:r,container:n})=>{const o={xphDialog:"xph--dialog",xphDialogWrapper:"xph--dialog--wrapper",xphMinimizeDialog:"xph--dialog--minimize"},i=(a,c)=>{console.log("触发插入"),a.querySelector(`.${o.xphDialogWrapper}`).style.opacity="unset",a.querySelector(`.${o.xphMinimizeDialog}`).style.opacity="unset",c.querySelector(`.${o.xphDialogWrapper}`).style.opacity=.7,c.querySelector(`.${o.xphMinimizeDialog}`).style.opacity=.7;const u=document.createElement("div");u.style.visibility="hidden",c.parentNode.insertBefore(u,c.nextSibling),c.parentNode.insertBefore(a,u),c.parentNode.removeChild(u)},s=a=>{var f,g;const c=n.querySelectorAll(`.${o.xphDialog}`),u=c[c.length-1];if(((f=t.current)==null?void 0:f.parentNode)!==u&&(i((g=t.current)==null?void 0:g.parentNode,u),a)){const p=a.target;p.tagName==="INPUT"&&p.focus&&p.focus()}};return d.useEffect(()=>{var a,c;return(a=t.current)==null||a.addEventListener("mousedown",s,!1),(c=r.current)==null||c.addEventListener("mousedown",s,!1),()=>{var u,f;(u=t.current)==null||u.removeEventListener("mousedown",s,!1),(f=r.current)==null||f.removeEventListener("mousedown",s,!1)}},[]),d.useEffect(()=>{if(e)s();else{const a=Array.from(n.querySelectorAll(`.${o.xphDialog}`)),c=a.map(p=>p.querySelector(`.${o.xphDialogWrapper}`)).filter(p=>p!==null),u=a.map(p=>p.querySelector(`.${o.xphMinimizeDialog}`)).filter(p=>p!==null),f=c.filter(p=>p.style.display==="flex"),g=u.filter(p=>p.style.display==="flex");if(f.length){i(f[f.length-1].parentNode,a[a.length-1]);return}if(g.length){i(g[g.length-1].parentNode,a[a.length-1]);return}}},[e]),{dialogTopShowClassConfig:o}},Pa=({initWidth:e,initHeight:t,initLeft:r,initTop:n,curPropsWidth:o,curPropsHeight:i,setDialogSize:s,setDialogPosition:a})=>{d.useEffect(()=>{o!==e.current&&(console.log("重新设置了宽度"),s({width:o})),i!==t.current&&(console.log("重新设置了高度"),s({height:i}))},[o,i]),d.useEffect(()=>{o!==e.current&&(console.log("重新设置了左边位置"),a({left:r.current})),i!==t.current&&(console.log("重新设置了上边位置"),a({top:n.current}))},[o,i])},$a=()=>{const e=d.useRef({left:0,top:0,width:0,height:0});return{dialogChangeRecord:e,setDialogChangeRecord:({left:r,top:n,width:o,height:i})=>{const{left:s,top:a,width:c,height:u}=e.current;e.current={left:r??s,top:n??a,width:o??c,height:i??u}}}},Da=({containerSizeTarget:e,dialogRef:t,minResizeRecord:r,setDialogSize:n,setDialogPosition:o})=>{const i=d.useCallback(()=>m.jsx("div",{ref:s,style:{position:"absolute",border:"4px dashed #ccc",display:"none"}}),[]),s=d.useRef(null),a=d.useRef(),c=d.useRef(!1),[u,f]=d.useState(!1),g=d.useRef(0),p=d.useRef(0),y=(B,F)=>{c.current=!0,f(!0),a.current=F;const{clientX:E,clientY:_}=B;g.current=E,p.current=_;const S=parseFloat(t.current.style.left),L=parseFloat(t.current.style.top),W=t.current.offsetWidth,w=t.current.offsetHeight;s.current.style.display="block",s.current.style.left=`${S-.5*W}px`,s.current.style.top=`${L-.5*w}px`,s.current.style.width=`${W}px`,s.current.style.height=`${w}px`},h=B=>{if(c.current){const{clientX:F,clientY:E}=B,_=F-g.current,S=E-p.current,L=parseFloat(s.current.style.left),W=parseFloat(s.current.style.top),w=s.current.offsetWidth,v=s.current.offsetHeight,C=r.current.width,D=r.current.height,T=e.current.scrollWidth,k=e.current.scrollHeight;let $=w,A=v,I=L,H=W;switch(a.current){case"lt":{$=$-_,A=A-S,H=H+S,I=I+_,$<C&&($=w,I=L),A<D&&(A=v,H=W),I<0&&(I=0,$=w),H<0&&(H=0,A=v);break}case"rt":{$=$+_,A=A-S,H=H+S,I=L,$<C&&($=w),A<D&&(A=v,H=W),$>T-I&&($=T-I),H<0&&(H=0,A=v);break}case"rb":{$=$+_,A=A+S,H=W,I=L,$<C&&($=w),A<D&&(A=v),$>T-I&&($=T-I),A>k-H&&(A=k-H);break}case"lb":{$=$-_,A=A+S,H=W,I=I+_,$<C&&($=w,I=L),A<D&&(A=v),I<0&&(I=0,$=w),A>k-H&&(A=k-H);break}}s.current.style.left=`${I}px`,s.current.style.top=`${H}px`,s.current.style.width=`${$}px`,s.current.style.height=`${A}px`,g.current=F,p.current=E}},x=()=>{if(c.current){c.current=!1,f(!1),s.current.style.display="none";const{left:B,top:F,width:E,height:_}=s.current.style,S=parseFloat(B)+.5*parseFloat(E),L=parseFloat(F)+.5*parseFloat(_),W=parseFloat(E),w=parseFloat(_);o({left:S,top:L}),n({width:W,height:w})}},j=B=>y(B,"lt"),z=B=>y(B,"rt"),M=B=>y(B,"rb"),R=B=>y(B,"lb"),U=d.useCallback(B=>{h(B)},[]),q=d.useCallback(()=>{x()},[]),X=d.useCallback(()=>{x()},[]);return d.useEffect(()=>(document.body.addEventListener("mousemove",U),document.body.addEventListener("mouseup",q),document.body.addEventListener("mouseleave",X),()=>{document.body.removeEventListener("mousemove",U),document.body.removeEventListener("mouseup",q),document.body.removeEventListener("mouseleave",X)}),[]),{resizingState:u,DashedBox:i,onMousedownResizeLt:j,onMousedownResizeRt:z,onMousedownResizeRb:M,onMousedownResizeLb:R}},ja=({container:e,dialogProps:t,baseDialogProps:r})=>{const[n,o]=d.useState(0),i=()=>{o(F=>F+1)};d.useEffect(()=>{const F=new ResizeObserver(i);return F.observe(e),()=>{F.unobserve(e),F.disconnect()}},[e]);const{containerSizeTarget:s,setContainerSizeTarget:a}=Fa({container:e}),{width:c,height:u}=r,{width:f,height:g}=t,p=f||c,y=g||u,{clientWidth:h,clientHeight:x}=s.current,j=p?p>h?h:p:0,z=y?y>x?x:y:"unset",M=d.useRef(j),R=d.useRef(z),U=F=>{M.current=F.width,R.current=F.height},q=d.useRef(Math.floor(h/2)),X=d.useRef(Math.floor(x/2)),B=F=>{q.current=F.left,X.current=F.top};return d.useEffect(()=>{n!==0&&(console.log("触发了内部parentResizeRecord"),a(),U({width:j,height:z}),B({left:Math.floor(h/2),top:Math.floor(x/2)}))},[n]),{containerSizeTarget:s,parentResizeRecord:n,initLeft:q,initTop:X,initWidth:M,initHeight:R,curPropsWidth:j,curPropsHeight:z,setInitPosition:B,setInitSize:U}},Ea=(e,t,r,n)=>{const o=d.useRef(null);return d.useEffect(()=>{if(e){const i=t.current.offsetWidth,s=t.current.offsetHeight;o.current={width:i,height:s}}else o.current=null},[r,n,e]),{minResizeRecord:o}},Fa=({container:e})=>{const t=e===document.body,r=d.useRef({clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight});return{containerSizeTarget:r,setContainerSizeTarget:()=>{r.current={clientWidth:t?window.innerWidth:e.clientWidth,clientHeight:t?window.innerHeight:e.clientHeight,scrollWidth:t?window.innerWidth:e.scrollWidth,scrollHeight:t?window.innerHeight:e.scrollHeight}}}},Ft={"minimize-windows":"_minimize-windows_12u3y_1","minimize-windows-title":"_minimize-windows-title_12u3y_43","minimize-windows-operate":"_minimize-windows-operate_12u3y_55"},Oa=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.ShrinkOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Yr=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.FullscreenOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),Aa=({onClick:e})=>m.jsx(O.Button,{type:"link",onClick:e,icon:m.jsx(ye.FullscreenExitOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),qr=({onClick:e,disabled:t})=>m.jsx(O.Button,{type:"link",onClick:e,disabled:t,icon:m.jsx(ye.CloseOutlined,{style:{fontSize:"22px",cursor:"pointer"}})}),{useToken:Ma}=O.theme,ka=d.forwardRef(({title:e,left:t,top:r,visible:n,loading:o,onMaximize:i,onClosesquare:s,className:a},c)=>{const{token:u}=Ma(),f={borderRadius:u.borderRadiusLG};return m.jsxs("div",{style:{display:n?"flex":"none",left:t,top:r,...f},className:`${Ft["minimize-windows"]} ${a}`,ref:c,children:[m.jsx("div",{className:Ft["minimize-windows-title"],title:e,children:e}),m.jsxs("div",{className:Ft["minimize-windows-operate"],children:[m.jsx(Yr,{onClick:i}),m.jsx(qr,{onClick:s,disabled:o})]})]})}),le={"xph-dialog-mask":"_xph-dialog-mask_128q2_1","xph-dialog-wrapper":"_xph-dialog-wrapper_128q2_23",dialog__header:"_dialog__header_128q2_45","dialog__header-btns":"_dialog__header-btns_128q2_63",dialog__main:"_dialog__main_128q2_71",dialog__footer:"_dialog__footer_128q2_85",dialog__resize:"_dialog__resize_128q2_99","dialog__resize-lt":"_dialog__resize-lt_128q2_113","dialog__resize-rt":"_dialog__resize-rt_128q2_125","dialog__resize-rb":"_dialog__resize-rb_128q2_137","dialog__resize-lb":"_dialog__resize-lb_128q2_149"},{useToken:Ra}=O.theme,Ia=d.forwardRef((e,t)=>{console.log("render Dialog==============================================");const{token:r}=Ra(),n={borderRadius:r.borderRadiusLG},{children:o,baseDialogProps:i,mask:s,title:a,renderFooter:c,renderTitle:u,getPopperContainer:f}=e,g=f(),[p,y]=Br(!1),[h,x]=d.useState(!1),{open:j,close:z}=ya(p,e,y,x),{footerActions:M}=ma(e,h),R=d.useRef(null),U=d.useRef(null),q=d.useRef(null),X=d.useRef(null),{containerSizeTarget:B,parentResizeRecord:F,initLeft:E,initTop:_,initWidth:S,initHeight:L,curPropsWidth:W,curPropsHeight:w}=ja({container:g,dialogProps:e,baseDialogProps:i}),{dialogChangeRecord:v,setDialogChangeRecord:C}=$a(),{dialogWidth:D,dialogHeight:T,setDialogSize:k}=_a({initWidth:S,initHeight:L,setDialogChangeRecord:C}),{dialogLeft:$,dialogTop:A,setDialogPosition:I}=wa({initTop:_,initLeft:E,setDialogChangeRecord:C}),{dialogMaxHeight:H,contentMaxHeight:re}=xa({visible:p,containerSizeTarget:B,dialogHeight:T,dialogRef:R,dialogHeaderRef:U,dialogFooterRef:X}),{minResizeRecord:se}=Ea(p,R,D,T),{minimizeLeft:he,minimizeTop:de,minimizeRef:ie,setMinimizePosition:ce}=Sa(),{minimizeVisible:ee,maximizeVisible:ge,onMaximize:ve,onMinimize:je,onRecovery:kt,onClose:Ee}=Ca({containerSizeTarget:B,dialogChangeRecord:v,close:z,setDialogSize:k,setDialogPosition:I}),Me=()=>{console.log("触发了initDialog"),k({width:S.current,height:L.current}),I({left:E.current,top:_.current}),ce({left:160,top:60})};d.useEffect(()=>{F!==0&&(console.log("触发了外部parentResizeRecord"),Me())},[F]),Pa({initWidth:S,initHeight:L,initLeft:E,initTop:_,curPropsWidth:W,curPropsHeight:w,setDialogSize:k,setDialogPosition:I}),Ur({containerSizeTarget:B,dialogHeaderRef:U,dialogRef:R,setDialogPosition:I}),Ur({containerSizeTarget:B,dialogHeaderRef:ie,dialogRef:ie,setDialogPosition:ce});const{dialogTopShowClassConfig:Re}=Ta({visible:p,container:g,dialogRef:R,minimizeRef:ie}),{resizingState:Ie,DashedBox:It,onMousedownResizeLt:zt,onMousedownResizeRt:Ge,onMousedownResizeRb:Lt,onMousedownResizeLb:Wt}=Da({containerSizeTarget:B,dialogRef:R,minResizeRecord:se,setDialogSize:k,setDialogPosition:I});return d.useImperativeHandle(t,()=>({open:j,close:Ee,setLoading:x,getVisible:()=>p})),m.jsxs("div",{className:Re.xphDialog,children:[s&&p?m.jsx("div",{className:le["xph-dialog-mask"]}):null,m.jsx(ka,{visible:ee,className:`${Re.xphMinimizeDialog}`,loading:h,ref:ie,left:he,top:de,title:a,onMaximize:()=>ve("minimize"),onClosesquare:Ee}),m.jsxs("div",{ref:R,className:`${le["xph-dialog-wrapper"]} ${Re.xphDialogWrapper}`,style:{display:p&&!ee?"flex":"none",left:$,top:A,width:D,height:T,maxHeight:H,opacity:Ie?.2:"unset",...n},children:[m.jsxs("div",{ref:U,className:le.dialog__header,children:[m.jsx("div",{children:u?u():a}),m.jsxs("div",{className:le["dialog__header-btns"],children:[m.jsx(Oa,{onClick:je}),ge?m.jsx(Aa,{onClick:kt}):m.jsx(Yr,{onClick:()=>ve("maximize")}),m.jsx(qr,{onClick:Ee,disabled:h})]})]}),m.jsx("div",{ref:q,className:le.dialog__main,style:{maxHeight:re},children:m.jsx(O.Spin,{spinning:h,children:p?o:null})}),c?m.jsx("div",{ref:X,children:c({loading:h})}):m.jsx("div",{ref:X,className:le.dialog__footer,children:m.jsx(it,{...M})}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-lt"]}`,onMouseDown:zt}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-rt"]}`,onMouseDown:Ge}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-rb"]}`,onMouseDown:Lt}),m.jsx("div",{className:`${le.dialog__resize} ${le["dialog__resize-lb"]}`,onMouseDown:Wt})]}),m.jsx(It,{})]})}),za=(e,t)=>{const{children:r,...n}=e,{baseDialogProps:o,dialogProps:i}=ba(n),{getPopperContainer:s}=i;return console.log("render XphDialog=============================================="),m.jsx(Xr,{getPopperContainer:s,children:m.jsx(Ia,{...i,baseDialogProps:o,ref:t,children:r})})},Gr=d.forwardRef(za),Xr=({children:e,getPopperContainer:t})=>{const[r,n]=d.useState(null);return d.useEffect(()=>{const o=t();n(o)},[]),r?mn.createPortal(e,r):null};function Ot(e){return"component"in e}function At(e){return"render"in e}function La(e){return e.includes("Input")||e.includes("Complete")?"请输入":e.includes("Picker")||e.includes("Select")||e.includes("Cascader")||e.includes("Checkbox")||e.includes("Radio")||e.includes("Switch")?"请选择":""}function Wa(e,t,r){["DatePicker","MonthPicker","WeekPicker","TimePicker"].includes(t)?e.type=r?"string":"object":["RangePicker","Upload","CheckboxGroup","TimePicker"].includes(t)?e.type="array":["InputNumber"].includes(t)&&(e.type="number")}const Na=["DatePicker","MonthPicker","RangePicker","WeekPicker","TimePicker"],Ha=e=>{const{show:t,ifShow:r,required:n,disabled:o,componentProps:i}=e;return!!(oe(t)||oe(r)||oe(n)||oe(o)||oe(i)||At(e))},Ba=e=>["application/json","application/javascript","text/plain","text/html","text/css"].includes(e)?`${e}; charset=utf-8`:e,Va=(e,t,r)=>{const n=d.useRef(null),o=d.useRef(null),{handleCollapseChangeFalse:i}=r.current||{},{show:s,ifShow:a}=e;let c=!0,u=!0;if(Et(s)&&(c=s),Et(a)&&(u=a),oe(s)){c=s({model:t});const f=zr(n.current)?c:n.current;d.useEffect(()=>{ot(c,f)||i&&i()},[t])}if(oe(a)){u=a({model:t});const f=zr(o.current)?u:o.current;d.useEffect(()=>{ot(u,f)||i&&i()},[t])}return n.current=c,o.current=u,{isShow:c,isIfShow:u}},Ua=(e,t)=>{const{collapsible:r,collapseNum:n}=e,[o,i]=d.useState(!!(r&&t>=n));return{itemCollapse:o,setItemCollapse:i}},Ya=({item:e,model:t,isShow:r,componentProps:n})=>{const{rules:o=[],label:i,required:s}=e;let a=o;const c=Ot(e),u=c?La(e.component)+i:"";function f(h,x){const j=h.message||u;return x===void 0||ia(x)||Array.isArray(x)&&x.length===0||typeof x=="string"&&x.trim()===""||typeof x=="object"&&Reflect.has(x,"checked")&&Reflect.has(x,"halfChecked")&&Array.isArray(x.checked)&&Array.isArray(x.halfChecked)&&x.checked.length===0&&x.halfChecked.length===0?Promise.reject(j):Promise.resolve()}const g=oe(s)?s({model:t}):s;g&&(!a||a.length===0?a=[{required:g,validator:f}]:a.findIndex(x=>Reflect.has(x,"required"))===-1&&a.push({required:g,validator:f}));const p=a.findIndex(h=>Reflect.has(h,"required")&&!Reflect.has(h,"validator"));if(p!==-1){const h=a[p];if(r||(h.required=!1),c){const{component:x}=e;Reflect.has(h,"type")||(h.type=x==="InputNumber"?"number":"string"),h.message=h.message||u,(x.includes("Input")||x.includes("Textarea"))&&(h.whitespace=!0);const j=n.valueFormat;Wa(h,x,j)}}const y=a.findIndex(h=>h.max);return y!==-1&&!a[y].validator&&(a[y].message=a[y].message||`字符数应小于${a[y].max}位`),{rules:a}},qa=(e,t,r)=>{const{disabled:n}=e;let o=!1;const{disabled:i}=t;return oe(i)&&(o=i({model:r})),Et(i)&&(o=i),{disabled:Reflect.has(t,"disabled")?o:n}},Ga=(e,t)=>{const r={},{componentProps:n={}}=e;return oe(n)&&Object.assign(r,n({model:t})),Object.assign(r,n),{componentProps:r}},Xa=(e,t)=>{const{colProps:r={}}=e,{colProps:n={span:24}}=t;return{colProps:{...n,...r}}},Ka=({formProps:e})=>{const{items:t}=e;return{formItems:t.map(n=>({...n}))}},Ja=(e,t)=>{const r=a=>(Object.keys(a).forEach(c=>{Object.defineProperty(a,c,{value:a[c],writable:!1,enumerable:!0,configurable:!1})}),a),n={};e.items.forEach(a=>{n[a.name]=a.initialValue});const o=Ha(t),i=o?O.Form.useWatch(a=>r(a)):null;return{rewritingModel:d.useMemo(()=>i||r(n),[i]),isusewatch:o}},Za=()=>{const e=d.useRef(null);function t(n){e.current=n}const r={getFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.getFieldsValue(...n)},setFieldsValue:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.setFieldsValue(...n)},resetFields:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.resetFields(...n)},validator:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.validator(...n)},scrollToField:(...n)=>{if(!e.current)throw new Error("表单还没初始化完成");return e.current.scrollToField(...n)}};return d.useEffect(()=>(console.log("ParentComponent is mounted====================================="),()=>{console.log("ParentComponent is unmounted===================================="),e.current=null}),[]),[t,r]};var Kr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(bn,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",g="month",p="quarter",y="year",h="date",x="Invalid Date",j=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var v=["th","st","nd","rd"],C=w%100;return"["+w+(v[(C-20)%10]||v[C]||v[0])+"]"}},R=function(w,v,C){var D=String(w);return!D||D.length>=v?w:""+Array(v+1-D.length).join(C)+w},U={s:R,z:function(w){var v=-w.utcOffset(),C=Math.abs(v),D=Math.floor(C/60),T=C%60;return(v<=0?"+":"-")+R(D,2,"0")+":"+R(T,2,"0")},m:function w(v,C){if(v.date()<C.date())return-w(C,v);var D=12*(C.year()-v.year())+(C.month()-v.month()),T=v.clone().add(D,g),k=C-T<0,$=v.clone().add(D+(k?-1:1),g);return+(-(D+(C-T)/(k?T-$:$-T))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:g,y,w:f,d:u,D:h,h:c,m:a,s,ms:i,Q:p}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},q="en",X={};X[q]=M;var B="$isDayjsObject",F=function(w){return w instanceof L||!(!w||!w[B])},E=function w(v,C,D){var T;if(!v)return q;if(typeof v=="string"){var k=v.toLowerCase();X[k]&&(T=k),C&&(X[k]=C,T=k);var $=v.split("-");if(!T&&$.length>1)return w($[0])}else{var A=v.name;X[A]=v,T=A}return!D&&T&&(q=T),T||!D&&q},_=function(w,v){if(F(w))return w.clone();var C=typeof v=="object"?v:{};return C.date=w,C.args=arguments,new L(C)},S=U;S.l=E,S.i=F,S.w=function(w,v){return _(w,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var L=function(){function w(C){this.$L=E(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[B]=!0}var v=w.prototype;return v.parse=function(C){this.$d=function(D){var T=D.date,k=D.utc;if(T===null)return new Date(NaN);if(S.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var $=T.match(j);if($){var A=$[2]-1||0,I=($[7]||"0").substring(0,3);return k?new Date(Date.UTC($[1],A,$[3]||1,$[4]||0,$[5]||0,$[6]||0,I)):new Date($[1],A,$[3]||1,$[4]||0,$[5]||0,$[6]||0,I)}}return new Date(T)}(C),this.init()},v.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return this.$d.toString()!==x},v.isSame=function(C,D){var T=_(C);return this.startOf(D)<=T&&T<=this.endOf(D)},v.isAfter=function(C,D){return _(C)<this.startOf(D)},v.isBefore=function(C,D){return this.endOf(D)<_(C)},v.$g=function(C,D,T){return S.u(C)?this[D]:this.set(T,C)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(C,D){var T=this,k=!!S.u(D)||D,$=S.p(C),A=function(ce,ee){var ge=S.w(T.$u?Date.UTC(T.$y,ee,ce):new Date(T.$y,ee,ce),T);return k?ge:ge.endOf(u)},I=function(ce,ee){return S.w(T.toDate()[ce].apply(T.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(ee)),T)},H=this.$W,re=this.$M,se=this.$D,he="set"+(this.$u?"UTC":"");switch($){case y:return k?A(1,0):A(31,11);case g:return k?A(1,re):A(0,re+1);case f:var de=this.$locale().weekStart||0,ie=(H<de?H+7:H)-de;return A(k?se-ie:se+(6-ie),re);case u:case h:return I(he+"Hours",0);case c:return I(he+"Minutes",1);case a:return I(he+"Seconds",2);case s:return I(he+"Milliseconds",3);default:return this.clone()}},v.endOf=function(C){return this.startOf(C,!1)},v.$set=function(C,D){var T,k=S.p(C),$="set"+(this.$u?"UTC":""),A=(T={},T[u]=$+"Date",T[h]=$+"Date",T[g]=$+"Month",T[y]=$+"FullYear",T[c]=$+"Hours",T[a]=$+"Minutes",T[s]=$+"Seconds",T[i]=$+"Milliseconds",T)[k],I=k===u?this.$D+(D-this.$W):D;if(k===g||k===y){var H=this.clone().set(h,1);H.$d[A](I),H.init(),this.$d=H.set(h,Math.min(this.$D,H.daysInMonth())).$d}else A&&this.$d[A](I);return this.init(),this},v.set=function(C,D){return this.clone().$set(C,D)},v.get=function(C){return this[S.p(C)]()},v.add=function(C,D){var T,k=this;C=Number(C);var $=S.p(D),A=function(re){var se=_(k);return S.w(se.date(se.date()+Math.round(re*C)),k)};if($===g)return this.set(g,this.$M+C);if($===y)return this.set(y,this.$y+C);if($===u)return A(1);if($===f)return A(7);var I=(T={},T[a]=n,T[c]=o,T[s]=r,T)[$]||1,H=this.$d.getTime()+C*I;return S.w(H,this)},v.subtract=function(C,D){return this.add(-1*C,D)},v.format=function(C){var D=this,T=this.$locale();if(!this.isValid())return T.invalidDate||x;var k=C||"YYYY-MM-DDTHH:mm:ssZ",$=S.z(this),A=this.$H,I=this.$m,H=this.$M,re=T.weekdays,se=T.months,he=T.meridiem,de=function(ee,ge,ve,je){return ee&&(ee[ge]||ee(D,k))||ve[ge].slice(0,je)},ie=function(ee){return S.s(A%12||12,ee,"0")},ce=he||function(ee,ge,ve){var je=ee<12?"AM":"PM";return ve?je.toLowerCase():je};return k.replace(z,function(ee,ge){return ge||function(ve){switch(ve){case"YY":return String(D.$y).slice(-2);case"YYYY":return S.s(D.$y,4,"0");case"M":return H+1;case"MM":return S.s(H+1,2,"0");case"MMM":return de(T.monthsShort,H,se,3);case"MMMM":return de(se,H);case"D":return D.$D;case"DD":return S.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return de(T.weekdaysMin,D.$W,re,2);case"ddd":return de(T.weekdaysShort,D.$W,re,3);case"dddd":return re[D.$W];case"H":return String(A);case"HH":return S.s(A,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return ce(A,I,!0);case"A":return ce(A,I,!1);case"m":return String(I);case"mm":return S.s(I,2,"0");case"s":return String(D.$s);case"ss":return S.s(D.$s,2,"0");case"SSS":return S.s(D.$ms,3,"0");case"Z":return $}return null}(ee)||$.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(C,D,T){var k,$=this,A=S.p(D),I=_(C),H=(I.utcOffset()-this.utcOffset())*n,re=this-I,se=function(){return S.m($,I)};switch(A){case y:k=se()/12;break;case g:k=se();break;case p:k=se()/3;break;case f:k=(re-H)/6048e5;break;case u:k=(re-H)/864e5;break;case c:k=re/o;break;case a:k=re/n;break;case s:k=re/r;break;default:k=re}return T?k:S.a(k)},v.daysInMonth=function(){return this.endOf(g).$D},v.$locale=function(){return X[this.$L]},v.locale=function(C,D){if(!C)return this.$L;var T=this.clone(),k=E(C,D,!0);return k&&(T.$L=k),T},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},w}(),W=L.prototype;return _.prototype=W,[["$ms",i],["$s",s],["$m",a],["$H",c],["$W",u],["$M",g],["$y",y],["$D",h]].forEach(function(w){W[w[1]]=function(v){return this.$g(v,w[0],w[1])}}),_.extend=function(w,v){return w.$i||(w(v,L,_),w.$i=!0),_},_.locale=E,_.isDayjs=F,_.unix=function(w){return _(1e3*w)},_.en=X[q],_.Ls=X,_.p={},_})})(Kr);var Qa=Kr.exports;const at=vn(Qa);function el(e,t={}){const r=/^\[(.+)\]$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const i=[];return o.forEach((s,a)=>{Lr(i,a,t[s.trim()])}),i.filter(Boolean).length?i:void 0}}}function tl(e,t={}){const r=/^\{(.+)\}$/;if(r.test(e)){const n=e.match(r);if(n&&n[1]){const o=n[1].split(",");if(!o.length)return;const i={};return o.forEach(s=>{Lr(i,s.trim(),t[s.trim()])}),Object.values(i).filter(Boolean).length?i:void 0}}}function rl(e,t){const r=t.fieldMapToTime;if(!r||!Array.isArray(r))return e;for(const[n,[o,i],s="YYYY-MM-DD"]of r){if(!n||!o||!i)continue;if(!e[n]){Reflect.deleteProperty(e,n);continue}const[a,c]=e[n],[u,f]=Array.isArray(s)?s:[s,s];e[o]=at(a).format(u),e[i]=at(c).format(f),Reflect.deleteProperty(e,n)}return e}const nl=(e,t,r)=>{const n=e.filter(s=>s.name);return{handleFormatRenderValues:s=>{const a={},c=[];return n.forEach(u=>{const f=Reflect.has(s,u.name),g=el(u.name,s)||tl(u.name,s);if(f||g){const p=g||s[u.name];if(Ot(u))if(Na.includes(u.component)){if(fe(p)){const y=[];for(const h of p)y.push(h?at(h):null);a[u.name]=y}else a[u.name]=p?at(p):null;c.push(u.name)}else a[u.name]=p,c.push(u.name);At(u)&&(a[u.name]=p,c.push(u.name))}}),{renderValues:a,validKeys:c}},handleFormatReturnValues:s=>{var c,u,f,g,p;if(!pe(s))return{};const a={};for(const y of Object.entries(s)){let[,h]=y;const[x]=y;if(!x||fe(h)&&h.length===0||oe(h))continue;const{transformDateFunc:j}=t,z=(f=(u=(c=r.current)==null?void 0:c.get(x))==null?void 0:u.current)==null?void 0:f.componentProps,M=z==null?void 0:z.valueFormat;if(pe(h)){const R=h;R.format&&(h=j==null?void 0:j(R,M))}fe(h)&&((g=h[0])!=null&&g.format)&&((p=h[1])!=null&&p.format)&&(h=h.map(R=>j==null?void 0:j(R,M))),Ir(h)&&(h===""?h=void 0:h=h.trim()),a[x]=h}return rl(a,t)}}},ol=(e,t,r)=>({getFieldsValue:(...c)=>r(e.getFieldsValue(...c)),setFieldsValue:c=>{const{renderValues:u,validKeys:f}=t(c);e.setFieldsValue(u),e.validateFields(f)},resetFields:async()=>e.resetFields(),validator:async c=>e.validateFields(c).then(u=>r(u)),scrollToField:async(c,u)=>e.scrollToField(c,u)}),sl=e=>{const{extendFormProps:t}=Jr();return{formProps:{...De(De({collapseNum:5,colon:!1,items:[],labelWrap:!0,transformDateFunc:(o,i)=>{var s;return((s=o==null?void 0:o.format)==null?void 0:s.call(o,i||"YYYY-MM-DD HH:mm:ss"))??o},fieldMapToTime:[]},t),e)}}},lt=e=>{const{immediate:t=!0,params:r,api:n,apiCallback:o,isUseWatch:i}=e,s=d.useRef(!0),a=d.useRef(r),c=()=>{n&&oe(n)&&(r?n(r).then(o):n().then(o),a.current=r)};return d.useEffect(()=>{s.current&&(t&&c(),s.current=!1),!s.current&&i&&(ot(r,a.current)||t&&c())},[r]),{getApiData:c}},il=(e,t)=>{const{collapsible:r,collapseNum:n}=e,o=d.useRef();return{collapsible:r,collapseNum:n,collapseRef:o,onClickCollapseToTrue:()=>{var a;(a=t.current)==null||a.forEach(c=>{if(c.current){const{itemIndex:u}=c.current;u>=n&&r&&c.current.setItemCollapse(!0)}})},onClickCollapseToFalse:()=>{var a;(a=t.current)==null||a.forEach(c=>{if(c.current){const{itemCollapse:u}=c.current;u&&c.current.setItemCollapse(!1)}})}}},Jr=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.form;o&&Object.keys(o).forEach(i=>{n.set(i,o[i])})};return{extendFormProps:e==null?void 0:e.form,setExtendFormComp:r}},al=e=>{console.log("render ApiSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=p=>{p&&!n&&u(),i&&i(p)},g=()=>{const{api:p,params:y,immediate:h,isusewatch:x,...j}=e;return j};return m.jsx(O.Select,{...g(),options:a,onDropdownVisibleChange:f})},ll=e=>{console.log("render ApiTreeSelect");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=p=>{p&&!n&&u(),i&&i(p)},g=()=>{const{api:p,params:y,immediate:h,isusewatch:x,...j}=e;return j};return m.jsx(O.TreeSelect,{...g(),treeData:a,onDropdownVisibleChange:f})},cl=e=>{console.log("render ApiTransfer");const{api:t,params:r,isusewatch:n}=e,o=n==="true",[i,s]=d.useState([]);lt({api:t,params:r,apiCallback:s,isUseWatch:o});const a=()=>{const{api:c,params:u,isusewatch:f,...g}=e;return g};return m.jsx(O.Transfer,{...a(),dataSource:i})},ul=e=>{console.log("render ApiAutoComplete");const{api:t,params:r,immediate:n=!0,isusewatch:o,onDropdownVisibleChange:i}=e,s=o==="true",[a,c]=d.useState([]),{getApiData:u}=lt({api:t,immediate:n,params:r,apiCallback:c,isUseWatch:s}),f=p=>{p&&!n&&u(),i&&i(p)},g=()=>{const{api:p,params:y,immediate:h,isusewatch:x,...j}=e;return j};return m.jsx(O.AutoComplete,{...g(),options:a,onDropdownVisibleChange:f})},Te={String:"String","String[]":"String[]","File[]":"File[]",FileList:"FileList"},fl=e=>{console.log("render AutoUpload"),console.log(ft());const t="",{api:r,maxCount:n=1,maxSize:o=2,listType:i="picture-card",openCrop:s=!1,data:a,returnType:c=Te.String,value:u=t,onChange:f}=e,g=d.useRef(!0),p=d.useRef(0),y=d.useRef([]),[h,x]=d.useState([]),j=F=>{y.current=F,x([...F])},z=()=>{const{api:F,maxCount:E,maxSize:_,openCrop:S,beforeUpload:L,fileList:W,returnType:w,...v}=e;return v},M=F=>{const E=F.size/1024/1024<o;E||O.message.error(`文件大小超过:${o}M, 请重试`);const _=y.current.length+p.current<n;return _||O.message.error(`文件数量不能超过${n}个`),E&&_&&p.current++,E&&_&&R(F),O.Upload.LIST_IGNORE},R=F=>{s?(O.message.error("暂时不支持裁剪功能,后续兼容。。。。"),U({file:F})):U({file:F})},U=F=>{r?r({file:F.file,...a}).then(E=>{j([...y.current,...E])}).finally(()=>{p.current--}):(Object.assign(F.file,{status:"done",url:URL.createObjectURL(new Blob([F.file],{type:Ba(F.file.type)}))}),j([...y.current,F.file]),p.current--)},q=F=>{const{file:E,fileList:_}=F,{status:S}=E;switch(S){case"removed":{j([..._]);break}}},X=F=>{const E=S=>{const L=S.split("/"),W=L[L.length-1],[w]=W.split("?");return w};return{uid:(S=>{const L=y.current.find(W=>W.url===S);return L?L.uid:ft()})(F),name:E(F),url:F,status:"done"}},B=()=>{switch(c){case Te.String:return h.map(F=>F.url).join(",");case Te["String[]"]:return h.map(F=>F.url);case Te["File[]"]:return[...h];case Te.FileList:return[...h]}};return d.useEffect(()=>{const F=B();if(ot(F,u))return;let E=[];switch(c){case Te.String:{E=(u||"").split(",").filter(_=>_).map(_=>X(_));break}case Te["String[]"]:{E=(u||[]).map(_=>X(_));break}case Te["File[]"]:{E=(u||[]).map(_=>_);break}case Te.FileList:{E=(u||[]).map(_=>_);break}}j(E)},[u]),d.useEffect(()=>{if(g.current){g.current=!1;return}const F=B();f==null||f(F)},[h]),m.jsx(O.Upload,{listType:i,...z(),fileList:h,beforeUpload:M,onChange:q,children:"上传"})},J=new Map;J.set("Input",O.Input),J.set("ApiSelect",al),J.set("Select",O.Select),J.set("InputNumber",O.InputNumber),J.set("ApiTreeSelect",ll),J.set("TreeSelect",O.TreeSelect),J.set("ApiTransfer",cl),J.set("Transfer",O.Transfer),J.set("Switch",O.Switch),J.set("Button",O.Button),J.set("Radio",O.Radio),J.set("RadioGroup",O.Radio.Group),J.set("Checkbox",O.Checkbox),J.set("CheckboxGroup",O.Checkbox.Group),J.set("Cascader",O.Cascader),J.set("TimePicker",O.TimePicker),J.set("DatePicker",O.DatePicker),J.set("MonthPicker",O.DatePicker.MonthPicker),J.set("WeekPicker",O.DatePicker.WeekPicker),J.set("RangePicker",O.DatePicker.RangePicker),J.set("InputPassword",O.Input.Password),J.set("InputTextArea",O.Input.TextArea),J.set("ApiAutoComplete",ul),J.set("AutoComplete",O.AutoComplete),J.set("Upload",O.Upload),J.set("AutoUpload",fl);const Zr={"form-item-force":"_form-item-force_1hsf3_1","form-item-hidden":"_form-item-hidden_1hsf3_9"},dl=d.forwardRef(({itemIndex:e,itemProps:t,methods:r,formProps:n,collapseRef:o},i)=>{console.log("render FormItem",t.name);const{rewritingModel:s,isusewatch:a}=Ja(n,t),{isIfShow:c,isShow:u}=Va(t,s,o),{colProps:f}=Xa(t,n),{componentProps:g}=Ga(t,s),{rules:p}=Ya({item:t,model:s,isShow:u,componentProps:g}),{disabled:y}=qa(n,t,s),{itemCollapse:h,setItemCollapse:x}=Ua(n,e),{name:j,label:z,wrapperCol:M,labelCol:R,valuePropName:U,initialValue:q,forceRow:X}=t;d.useImperativeHandle(i,()=>({itemIndex:e,componentProps:g,itemCollapse:h,setItemCollapse:x}));const B=()=>({name:j,label:z,rules:p,wrapperCol:M,labelCol:R,valuePropName:U,initialValue:q}),{setExtendFormComp:F}=Jr();F(J);const E=Ot(t),_=At(t),S=()=>{if(E){const L=J.get(t.component);return m.jsx(L,{...g,disabled:y,isusewatch:a.toString()})}return _?t.render({model:s,name:j,disabled:y,methods:r,componentProps:g}):null};return m.jsxs(d.Fragment,{children:[X?m.jsx("div",{className:Zr["form-item-force"]}):null,c?m.jsx(O.Col,{...f,className:u&&!h?void 0:Zr["form-item-hidden"],children:m.jsx(O.Form.Item,{...B(),children:S()})}):null]})}),pl={"collapse-wrapper":"_collapse-wrapper_ylm01_1"},hl=d.forwardRef(({collapsible:e,onClickExpand:t,onClickFold:r},n)=>{const[o,i]=d.useState(e),s=d.useMemo(()=>o,[o]),a=()=>{r(),i(!0)},c=()=>{t(),i(!1)};return d.useImperativeHandle(n,()=>({handleCollapseChangeFalse:c})),m.jsx("div",{className:pl["collapse-wrapper"],children:s?m.jsx(O.Button,{onClick:c,type:"link",icon:m.jsx(ye.DownOutlined,{}),children:"展开"}):m.jsx(O.Button,{onClick:a,type:"link",icon:m.jsx(ye.UpOutlined,{}),children:"折叠"})})}),gl={"group-wrapper":"_group-wrapper_g8zqi_1"},ml=({formProps:e})=>{const{renderActions:t}=e;return m.jsx("div",{className:gl["group-wrapper"],children:t==null?void 0:t()})},bl={"xph-form-action":"_xph-form-action_8ws73_1"},vl=(e,t)=>{console.log("render Form");const[r]=O.Form.useForm(),{formProps:n}=sl(e),{formItems:o}=Ka({formProps:n}),i=d.useRef(new Map),{collapsible:s,collapseNum:a,collapseRef:c,onClickCollapseToFalse:u,onClickCollapseToTrue:f}=il(n,i),{handleFormatRenderValues:g,handleFormatReturnValues:p}=nl(o,n,i),{setFieldsValue:y,getFieldsValue:h,resetFields:x,validator:j,scrollToField:z}=ol(r,g,p),M=()=>{const{layout:U,wrapperCol:q,labelCol:X,colon:B,disabled:F,labelWrap:E,labelAlign:_,scrollToFirstError:S,size:L}=n;return{layout:U,wrapperCol:q,labelCol:X,colon:B,disabled:F,labelWrap:E,labelAlign:_,scrollToFirstError:S,size:L}},R={setFieldsValue:y,getFieldsValue:h,resetFields:x,validator:j,scrollToField:z};return d.useImperativeHandle(t,()=>({...R})),d.useEffect(()=>(console.log("Form is mounted======================="),n.register&&n.register(R),()=>{console.log("Form is unmounted========================="),i.current.clear()}),[]),m.jsxs(O.Form,{form:r,...M(),children:[m.jsx(O.Row,{children:o.map((U,q)=>(i.current.has(U.name)||i.current.set(U.name,d.createRef()),m.jsx(dl,{ref:i.current.get(U.name),itemIndex:q,itemProps:U,formProps:n,methods:R,collapseRef:c},q)))}),m.jsxs("div",{className:bl["xph-form-action"],children:[m.jsx(ml,{formProps:n}),s?m.jsx(hl,{ref:c,collapsible:o.length>a,onClickExpand:u,onClickFold:f}):null]})]})},Mt=d.forwardRef(vl),yl=d.memo(Mt),_l=d.forwardRef((e,t)=>{const{renderActions:r,showSearch:n,tableRef:o}=e,[i,s]=d.useState(!1),a=d.useRef(null),c=()=>{const{reloadData:p}=o.current;p()},u=()=>{const{resetData:p}=o.current;p()},f=d.useCallback(()=>m.jsxs("div",{style:{width:"100%",display:"flex"},children:[m.jsx("div",{style:{flex:1,width:0},children:r==null?void 0:r()}),n&&m.jsxs("div",{style:{display:"flex",gap:"8px"},children:[m.jsx(O.Button,{type:"primary",icon:m.jsx(ye.SearchOutlined,{}),onClick:c,children:"搜索"}),m.jsx(O.Button,{icon:m.jsx(ye.ReloadOutlined,{}),onClick:u,children:"重置"})]})]}),[n,r]),g=()=>{const{renderActions:p,...y}=e;return{...y,renderActions:f}};return d.useImperativeHandle(t,()=>({setFormLoading:s,...a.current})),m.jsx(O.Spin,{spinning:i,children:m.jsx(yl,{ref:a,...g()})})}),wl=d.memo(Mt),Cl=(e,t)=>{const r=d.useRef(null),n=d.useRef(null),{formProps:o}=e,s=(()=>{const{formProps:f,...g}=e;return g})(),a=d.useRef(null),c=async()=>{const{onOk:f,renderFooter:g}=s;if(!g){const{ok:p,data:y}=a.current;if(p){n.current.validator().then(async h=>{r.current.setLoading(!0),await p({values:n.current.getFieldsValue()}).then(j=>j).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),a.current=null)});return}if(f){n.current.validator().then(async h=>{r.current.setLoading(!0),await f({values:h,data:y}).then(j=>(console.log(j),j)).finally(()=>{r.current.setLoading(!1)})!==!1&&(r.current.close(),a.current=null)});return}r.current.close(),a.current=null}},u=async()=>{const{onCancel:f,renderFooter:g}=s;if(!g){const{cancel:p,data:y}=a.current;if(p){if(await p({values:n.current.getFieldsValue(!0)})===!1)return;r.current.close(),a.current=null;return}if(f){if(await f({values:n.current.getFieldsValue(!0),data:y})===!1)return;r.current.close(),a.current=null;return}r.current.close(),a.current=null}};return d.useImperativeHandle(t,()=>({open:async f=>{if(r.current.getVisible())return;const{renderFooter:p}=s;return!p&&(a.current=f),r.current.open().then(()=>{n.current.setFieldsValue(f.data||{})})},close:(...f)=>r.current.close(...f),setLoading:(...f)=>r.current.setLoading(...f),getVisible:(...f)=>r.current.getVisible(...f),getFieldsValue:(...f)=>n.current.getFieldsValue(...f),setFieldsValue:(...f)=>n.current.setFieldsValue(...f),resetFields:(...f)=>n.current.resetFields(...f),validator:(...f)=>n.current.validator(...f),scrollToField:(...f)=>n.current.scrollToField(...f)})),m.jsx(Gr,{...s,ref:r,onOk:c,onCancel:u,children:m.jsx(wl,{...o,ref:n})})},Qr=d.forwardRef(Cl);function xl({searchForm:e}){return{searchFormRef:d.useRef(null),searchFormProps:e}}function Sl(e){return"cellFunc"in e}function Tl(e){return"children"in e}const{useToken:Pl}=O.theme,$l=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t,{url:i,onClick:s}=n,{token:a}=Pl(),c={color:a.colorLink,cursor:"pointer"},u=()=>{if(r.mainClick&&r.mainClick(),s){s();return}if(i){window.open(i,"_blank");return}};return m.jsx(e,{...r,mainClick:u,mainStyle:Object.assign(c,(r==null?void 0:r.mainStyle)||{})})},Dl={"cellfunc-actions":"_cellfunc-actions_14drt_1"},jl=(e,t,r)=>{const{curComponentProps:n,cellFuncProps:o}=t;return m.jsx("div",{className:Dl["cellfunc-actions"],children:m.jsx(it,{...n})})},{useToken:El}=O.theme,Fl={0:{color:"orange",backgroundColor:"unset",border:"1px solid orange"},1:{color:"purple",backgroundColor:"unset",border:"1px solid purple"},2:{color:"blue",backgroundColor:"unset",border:"1px solid blue"},3:{color:"green",backgroundColor:"unset",border:"1px solid green"},4:{color:"red",backgroundColor:"unset",border:"1px solid red"},5:{color:"pink",backgroundColor:"unset",border:"1px solid pink"},6:{color:"cyan",backgroundColor:"unset",border:"1px solid cyan"},7:{color:"magenta",backgroundColor:"unset",border:"1px solid magenta"},8:{color:"yellow",backgroundColor:"unset",border:"1px solid yellow"},9:{color:"teal",backgroundColor:"unset",border:"1px solid teal"},10:{color:"brown",backgroundColor:"unset",border:"1px solid brown"},11:{color:"gray",backgroundColor:"unset",border:"1px solid gray"},12:{color:"olive",backgroundColor:"unset",border:"1px solid olive"},13:{color:"navy",backgroundColor:"unset",border:"1px solid navy"},14:{color:"lime",backgroundColor:"unset",border:"1px solid lime"},15:{color:"maroon",backgroundColor:"unset",border:"1px solid maroon"}},Ol=(e,t,r)=>e.reduce((n,o,i)=>{var u;const s=`${t.dataIndex}${o.value}`,a=(u=o.config)==null?void 0:u.color,c=a?r[a]??{color:a,backgroundColor:"unset",border:`1px solid ${a}`}:Fl[i]||{};return n[s]={color:c.color,backgroundColor:c.backgroundColor,border:c.border},n},{}),en={link:{Comp:$l},actions:{Comp:jl},tag:{Comp:(e,t,r)=>{const{curComponentProps:n,cellFuncProps:{renderPrams:{text:o,column:i}}}=t,{token:s}=El(),{enums:a}=n,c={primary:{color:s.colorPrimary,backgroundColor:s.colorPrimaryBg,border:`1px solid ${s.colorPrimary}`},success:{color:s.colorSuccess,backgroundColor:s.colorSuccessBg,border:`1px solid ${s.colorSuccess}`},warning:{color:s.colorWarning,backgroundColor:s.colorWarningBg,border:`1px solid ${s.colorWarning}`},info:{color:s.colorInfo,backgroundColor:s.colorInfoBg,border:`1px solid ${s.colorInfo}`},error:{color:s.colorError,backgroundColor:s.colorErrorBg,border:`1px solid ${s.colorError}`}},f=Ol(a,i,c)[`${String(i.dataIndex)}${o}`]||{},g={padding:"0 8px",borderRadius:s.borderRadiusLG,fontSize:s.fontSizeSM,...f},p=()=>{var h;return(h=a.find(x=>x.value===o))==null?void 0:h.label};return m.jsx(e,{...r,mainHandleText:p,mainStyle:Object.assign((r==null?void 0:r.mainStyle)||{},g)})}}},Al=(e,t)=>{var o;const{renderPrams:{text:r}}=e,n=(o=t==null?void 0:t.mainHandleText)==null?void 0:o.call(t);return m.jsx("span",{onClick:t==null?void 0:t.mainClick,style:t==null?void 0:t.mainStyle,children:n??r})},Ml=e=>{const{setExtendTableCellComp:t}=rn();t(en);const{dslConfig:r}=e;let n=Al.bind(null,e),o=0;for(;o<r.length;){const i=o++,s=en[r[i].component];s&&(n=s.Comp.bind(null,n,{curComponentProps:r[i].componentProps||{},cellFuncProps:e}))}return m.jsx(n,{})};function tn(e){return e.map(t=>{let r={...t};if(Sl(r)){const{cellFunc:n,...o}=r;r={...o,render:(...i)=>{const s=oe(n),[a,c,u]=i,f={text:a,record:c,index:u,column:JSON.parse(JSON.stringify(o))},g=s?n(f):n;return m.jsx(Ml,{dslConfig:g,renderPrams:f})}}}return Tl(r)&&r.children&&Array.isArray(r.children)&&(r.children=tn(r.children)),r})}function kl(e){const{columns:t}=e.table,r=tn(t);return console.log(r),{columns:r}}const Rl=e=>{const{extendTableProps:t}=rn();return{tableProps:{...De(De({table:{columns:[],fullHeight:!1,autoRequest:!0,pagination:{pageSize:20,total:0,showTotal:o=>`共:${o} 条`,current:1,pageSizeOptions:[10,20,50,100],showSizeChanger:!0,showQuickJumper:!0},requestFields:{pageSize:"pageSize",current:"current"},responseFields:{current:"current",list:"data",total:"total"}},crudFormDialog:void 0,searchForm:{showSearch:!0,items:[]}},t),e)}}};function Il(e){const{pagination:t,autoPagination:r}=e.table,[n,o]=d.useState(t),i=d.useRef(t),s=d.useMemo(()=>n&&(r===!0||r===void 0)||!1,[n]);return{pagination:{model:n,update:c=>{if(!i.current)return;const u={...i.current,...c};o(u),i.current=u},show:s},lastPaginationState:i}}function zl(e,t){const{api:r,formatDataSource:n,autoPagination:o,onChange:i,requestFields:s,responseFields:a}=e.table,c=e.onPaginationChange,{pagination:u,lastPaginationState:f}=Il(e),[g,p]=d.useState({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),y=d.useRef({loading:!1,dataSource:[],selection:[],backupsDataSource:[]}),h={model:g,update:E=>{var S;const _={...y.current,...E};p(_),y.current=_,(S=t.current)==null||S.setFormLoading(_.loading)}},x=async()=>{d.useEffect(()=>{const{autoRequest:E}=e.table,{validator:_}=t.current;E&&_().then(S=>{R({searchFormParams:S})})},[])},j=async({searchFormParams:E,paginationParams:_})=>{const S={...E,[`${s.current}`]:f.current.current,[`${s.pageSize}`]:f.current.pageSize,..._?{[`${s.current}`]:_.current,[`${s.pageSize}`]:_.pageSize}:{}};return r(S).then(L=>{const{current:W,list:w,total:v}=dt(a,L);h.update({dataSource:n?n(w):w}),u.update({total:v,current:W,pageSize:S[`${s.pageSize}`]})}).finally(()=>{h.update({loading:!1})})},z=async({searchFormParams:E,paginationParams:_})=>{const S={...E};return r(S).then(L=>{const{list:W}=dt(a,L),w=n?n(W):W;h.update({selection:[],dataSource:w}),u.update({current:1,total:W.length})}).finally(()=>{h.update({loading:!1})})},M=async({searchFormParams:E,paginationParams:_})=>{var L;const S={...E};if(_){const{current:W,pageSize:w}=_;u.update({current:W,pageSize:w});const v=(W-1)*w,C=v+w,D=(L=y.current.backupsDataSource)==null?void 0:L.slice(v,C);return h.update({loading:!1,selection:[],dataSource:D})}else return r(S).then(W=>{let w=n?n(W):W;const v=[...w],C=0,D=C+f.current.pageSize;w=w.slice(C,D),h.update({selection:[],dataSource:w,backupsDataSource:v}),u.update({current:1,total:W.length})}).finally(()=>{h.update({loading:!1})})},R=async({searchFormParams:E,paginationParams:_})=>{if(h.update({loading:!0,selection:[]}),r)switch(!!f.current){case!0:return o===!0?M({searchFormParams:E,paginationParams:_}):o===!1?z({searchFormParams:E,paginationParams:_}):j({searchFormParams:E,paginationParams:_});case!1:return z({searchFormParams:E,paginationParams:_})}return h.update({loading:!1})};return{table:h,pagination:u,firstGetTableData:x,onPaginationChange:(E,_)=>{const{validator:S}=t.current;S().then(L=>{R({searchFormParams:L,paginationParams:{current:E,pageSize:_}})}),c&&c(E,_)},onAllChange:async(...E)=>{const[_,S,L,W]=E,w=[];for(let v=0;v<w.length&&!w[v]();v++);i&&i(S,L,W)},resetData:async()=>{const{resetFields:E,validator:_}=t.current;return E().then(async()=>{const S=await _();return R({searchFormParams:S})})},resetAllData:async()=>{const{resetFields:E,validator:_}=t.current;return E().then(async()=>{const S={};if(f.current){const{pageSize:L}=f.current;o===void 0&&(S.paginationParams={current:1,pageSize:L})}return S.searchFormParams=await _(),R(S)})},reloadData:async()=>{const{validator:E}=t.current;return E().then(_=>R({searchFormParams:_}))}}}const Ll=(e,t)=>{const{onRowSelectionChange:r}=e,{rowSelection:n}=e.table,o=()=>{if(Ir(n))return{type:n,onChange:(i,s,a)=>{t.update({selection:s}),r&&r(i,s)}};if(pe(n)){const{onChange:i}=n;return{...n,onChange:(s,a,c)=>{t.update({selection:a}),i&&i(s,a,c),r&&r(s,a)}}}return n};return{rowSelection:o(),getNewRowSelection:o}};function Wl(e,t){const{scroll:r,virtual:n}=e.table,o=d.useRef(null),[i,s]=d.useState(0),[a,c]=d.useState(0);d.useEffect(()=>{const f=()=>{o.current&&(s(o.current.offsetWidth),c(o.current.offsetHeight))};f();const g=new ResizeObserver(f);return o.current&&g.observe(o.current),()=>{g&&o.current&&g.unobserve(o.current)}},[]);const u=d.useMemo(()=>t?n?{x:i,y:a-70,...r}:{x:"max-content",y:a-70,...r}:{x:"max-content",...r},[a]);return{divRef:o,scroll:u}}function Nl(e,t){const{toolbar:r}=e.table;return{getTopToolbarBindProps:()=>{if(oe(r)){const o=r({loading:t.model.loading,selection:t.model.selection});return{...o,disabled:t.model.loading||o.disabled}}return{...r,disabled:t.model.loading||(r==null?void 0:r.disabled)}}}}const rn=()=>{const{extendProps:e,extendComp:t}=qe(),r=n=>{const o=t==null?void 0:t.tableCellFunc;o&&Object.keys(o).forEach(i=>{const s=o[i];n[i]={Comp:s}})};return{extendTableProps:e==null?void 0:e.table,setExtendTableCellComp:r}},Hl=({crudFormDialog:e})=>({crudFormDialogRef:d.useRef(null),crudFormProps:e}),ct={"main-container":"_main-container_1yx5k_1",container__toolbar:"_container__toolbar_1yx5k_13",container__table:"_container__table_1yx5k_27",container__pagination:"_container__pagination_1yx5k_35"},Bl=d.forwardRef(({tableProps:e,searchFormRef:t,fullHeight:r},n)=>{const{columns:o}=kl(e),i=d.useRef(null),{table:s,pagination:a,firstGetTableData:c,onPaginationChange:u,onAllChange:f,resetData:g,resetAllData:p,reloadData:y}=zl(e,t),{rowSelection:h}=Ll(e,s),{divRef:x,scroll:j}=Wl(e,r),{getTopToolbarBindProps:z}=Nl(e,s),M=()=>{const{autoRequest:R,api:U,formatDataSource:q,autoPagination:X,columns:B,scroll:F,pagination:E,rowSelection:_,onChange:S,...L}=e.table;return L};return c(),d.useImperativeHandle(n,()=>({resetData:g,resetAllData:p,reloadData:y,...i.current})),console.log("render Table"),m.jsxs("div",{className:r?ct["main-container"]:void 0,children:[m.jsx("div",{className:ct.container__toolbar,children:m.jsx(it,{...z()})}),m.jsx("div",{ref:x,className:r?ct.container__table:void 0,children:m.jsx(O.Table,{ref:i,...M(),loading:s.model.loading,columns:o,dataSource:s.model.dataSource,pagination:!1,rowSelection:h,scroll:j,onChange:f})}),a.show?m.jsx("div",{className:ct.container__pagination,children:m.jsx(O.Pagination,{disabled:s.model.loading,...a.model,onChange:u})}):null]})}),nn={"xph-table-full-wrapper":"_xph-table-full-wrapper_mdv0g_1","full-wrapper__table":"_full-wrapper__table_mdv0g_13"},Vl=(e,t)=>{const{tableProps:r}=Rl(e),n=d.useRef(null),{searchFormRef:o,searchFormProps:i}=xl(r),{crudFormDialogRef:s,crudFormProps:a}=Hl(r);let{fullHeight:c}=r.table;const{virtual:u}=r.table;return u&&(c=!0),d.useImperativeHandle(t,()=>({...n.current,...s.current})),m.jsxs("div",{className:c?nn["xph-table-full-wrapper"]:void 0,children:[m.jsx("div",{children:m.jsx(_l,{ref:o,tableRef:n,...i})}),m.jsx("div",{className:c?nn["full-wrapper__table"]:void 0,children:m.jsx(Bl,{ref:n,searchFormRef:o,fullHeight:c,tableProps:r})}),a?m.jsx(Qr,{ref:s,...a}):null]})},Ul=d.forwardRef(Vl);Y.XphActions=it,Y.XphCrudFormDialog=Qr,Y.XphDialog=Gr,Y.XphExtendCompPropsProvider=pa,Y.XphForm=Mt,Y.XphPortal=Xr,Y.XphTable=Ul,Y.buildUUID=ft,Y.getValueByPath=Yt,Y.getValuesByPathObj=dt,Y.useAsyncState=Br,Y.useXphExtendCompProps=qe,Y.useXphForm=Za,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
@@ -1,6 +1,6 @@
1
1
  import { IDialogProps } from '../types';
2
2
 
3
- declare const useDialogActions: (dialogProps: IDialogProps, setVisible: Function, setLoading: Function) => {
3
+ declare const useDialogActions: (visible: boolean, dialogProps: IDialogProps, setVisible: Function, setLoading: Function) => {
4
4
  open: () => Promise<void>;
5
5
  close: () => void;
6
6
  };
@@ -28,4 +28,5 @@ export interface IDialogActionType {
28
28
  open: () => Promise<void>;
29
29
  close: () => void;
30
30
  setLoading: (loading: boolean) => void;
31
+ getVisible: () => boolean;
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xph-crud",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",