@chamn/engine 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Uy=Object.defineProperty;var Wy=(e,t,n)=>t in e?Uy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var F=(e,t,n)=>(Wy(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),rn=require("react-dom"),Z=require("antd"),Oe=require("@chamn/model"),or=require("@chamn/layout");function Yp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const q=Yp(v),Gy=Yp(rn);var Do=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ws={exports:{}},_o={};/**
1
+ "use strict";var Hy=Object.defineProperty;var Uy=(e,t,n)=>t in e?Hy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>(Uy(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),Lt=require("react-dom"),Y=require("antd"),be=require("@chamn/model"),Xn=require("@chamn/layout");function Wp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const W=Wp(g),Wy=Wp(Lt);var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hs={exports:{}},fo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -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 xu;function Ky(){if(xu)return _o;xu=1;var e=v,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:p,props:d,_owner:o.current}}return _o.Fragment=n,_o.jsx=i,_o.jsxs=i,_o}var Eo={};/**
9
+ */var wu;function Gy(){if(wu)return fo;wu=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:p,props:d,_owner:o.current}}return fo.Fragment=n,fo.jsx=i,fo.jsxs=i,fo}var po={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,22 +14,22 @@
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 Cu;function qy(){return Cu||(Cu=1,"{}".NODE_ENV!=="production"&&function(){var e=v,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,y="@@iterator";function w(h){if(h===null||typeof h!="object")return null;var R=g&&h[g]||h[y];return typeof R=="function"?R:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(h){{for(var R=arguments.length,k=new Array(R>1?R-1:0),B=1;B<R;B++)k[B-1]=arguments[B];E("error",h,k)}}function E(h,R,k){{var B=b.ReactDebugCurrentFrame,Y=B.getStackAddendum();Y!==""&&(R+="%s",k=k.concat([Y]));var te=k.map(function(W){return String(W)});te.unshift("Warning: "+R),Function.prototype.apply.call(console[h],console,te)}}var C=!1,m=!1,_=!1,O=!1,N=!1,T;T=Symbol.for("react.module.reference");function P(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===a||N||h===o||h===c||h===u||O||h===p||C||m||_||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===l||h.$$typeof===T||h.getModuleId!==void 0))}function M(h,R,k){var B=h.displayName;if(B)return B;var Y=R.displayName||R.name||"";return Y!==""?k+"("+Y+")":k}function D(h){return h.displayName||"Context"}function I(h){if(h==null)return null;if(typeof h.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case s:var R=h;return D(R)+".Consumer";case i:var k=h;return D(k._context)+".Provider";case l:return M(h,h.render,"ForwardRef");case d:var B=h.displayName||null;return B!==null?B:I(h.type)||"Memo";case f:{var Y=h,te=Y._payload,W=Y._init;try{return I(W(te))}catch{return null}}}return null}var A=Object.assign,j=0,L,H,ie,ne,he,$,z;function J(){}J.__reactDisabledLog=!0;function re(){{if(j===0){L=console.log,H=console.info,ie=console.warn,ne=console.error,he=console.group,$=console.groupCollapsed,z=console.groupEnd;var h={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}j++}}function de(){{if(j--,j===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},h,{value:L}),info:A({},h,{value:H}),warn:A({},h,{value:ie}),error:A({},h,{value:ne}),group:A({},h,{value:he}),groupCollapsed:A({},h,{value:$}),groupEnd:A({},h,{value:z})})}j<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=b.ReactCurrentDispatcher,He;function _e(h,R,k){{if(He===void 0)try{throw Error()}catch(Y){var B=Y.stack.trim().match(/\n( *(at )?)/);He=B&&B[1]||""}return`
18
- `+He+h}}var $e=!1,oe;{var Ie=typeof WeakMap=="function"?WeakMap:Map;oe=new Ie}function V(h,R){if(!h||$e)return"";{var k=oe.get(h);if(k!==void 0)return k}var B;$e=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=fe.current,fe.current=null,re();try{if(R){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(Qe){B=Qe}Reflect.construct(h,[],W)}else{try{W.call()}catch(Qe){B=Qe}h.call(W.prototype)}}else{try{throw Error()}catch(Qe){B=Qe}h()}}catch(Qe){if(Qe&&B&&typeof Qe.stack=="string"){for(var U=Qe.stack.split(`
19
- `),me=B.stack.split(`
20
- `),le=U.length-1,ue=me.length-1;le>=1&&ue>=0&&U[le]!==me[ue];)ue--;for(;le>=1&&ue>=0;le--,ue--)if(U[le]!==me[ue]){if(le!==1||ue!==1)do if(le--,ue--,ue<0||U[le]!==me[ue]){var ke=`
21
- `+U[le].replace(" at new "," at ");return h.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",h.displayName)),typeof h=="function"&&oe.set(h,ke),ke}while(le>=1&&ue>=0);break}}}finally{$e=!1,fe.current=te,de(),Error.prepareStackTrace=Y}var Ct=h?h.displayName||h.name:"",Oo=Ct?_e(Ct):"";return typeof h=="function"&&oe.set(h,Oo),Oo}function qe(h,R,k){return V(h,!1)}function Be(h){var R=h.prototype;return!!(R&&R.isReactComponent)}function Ce(h,R,k){if(h==null)return"";if(typeof h=="function")return V(h,Be(h));if(typeof h=="string")return _e(h);switch(h){case c:return _e("Suspense");case u:return _e("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return qe(h.render);case d:return Ce(h.type,R,k);case f:{var B=h,Y=B._payload,te=B._init;try{return Ce(te(Y),R,k)}catch{}}}return""}var nt=Object.prototype.hasOwnProperty,kt={},jt=b.ReactDebugCurrentFrame;function xe(h){if(h){var R=h._owner,k=Ce(h.type,h._source,R?R.type:null);jt.setExtraStackFrame(k)}else jt.setExtraStackFrame(null)}function we(h,R,k,B,Y){{var te=Function.call.bind(nt);for(var W in h)if(te(h,W)){var U=void 0;try{if(typeof h[W]!="function"){var me=Error((B||"React class")+": "+k+" type `"+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[W]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw me.name="Invariant Violation",me}U=h[W](R,W,B,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(le){U=le}U&&!(U instanceof Error)&&(xe(Y),S("%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).",B||"React class",k,W,typeof U),xe(null)),U instanceof Error&&!(U.message in kt)&&(kt[U.message]=!0,xe(Y),S("Failed %s type: %s",k,U.message),xe(null))}}}var Pe=Array.isArray;function ze(h){return Pe(h)}function Mt(h){{var R=typeof Symbol=="function"&&Symbol.toStringTag,k=R&&h[Symbol.toStringTag]||h.constructor.name||"Object";return k}}function mr(h){try{return Gn(h),!1}catch{return!0}}function Gn(h){return""+h}function Kn(h){if(mr(h))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Mt(h)),Gn(h)}var rt=b.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},zt,kn,ct;ct={};function yr(h){if(nt.call(h,"ref")){var R=Object.getOwnPropertyDescriptor(h,"ref").get;if(R&&R.isReactWarning)return!1}return h.ref!==void 0}function wo(h){if(nt.call(h,"key")){var R=Object.getOwnPropertyDescriptor(h,"key").get;if(R&&R.isReactWarning)return!1}return h.key!==void 0}function So(h,R){if(typeof h.ref=="string"&&rt.current&&R&&rt.current.stateNode!==R){var k=I(rt.current.type);ct[k]||(S('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',I(rt.current.type),h.ref),ct[k]=!0)}}function br(h,R){{var k=function(){zt||(zt=!0,S("%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)",R))};k.isReactWarning=!0,Object.defineProperty(h,"key",{get:k,configurable:!0})}}function xo(h,R){{var k=function(){kn||(kn=!0,S("%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)",R))};k.isReactWarning=!0,Object.defineProperty(h,"ref",{get:k,configurable:!0})}}var wr=function(h,R,k,B,Y,te,W){var U={$$typeof:t,type:h,key:R,ref:k,props:W,_owner:te};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:B}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Co(h,R,k,B,Y){{var te,W={},U=null,me=null;k!==void 0&&(Kn(k),U=""+k),wo(R)&&(Kn(R.key),U=""+R.key),yr(R)&&(me=R.ref,So(R,Y));for(te in R)nt.call(R,te)&&!Zt.hasOwnProperty(te)&&(W[te]=R[te]);if(h&&h.defaultProps){var le=h.defaultProps;for(te in le)W[te]===void 0&&(W[te]=le[te])}if(U||me){var ue=typeof h=="function"?h.displayName||h.name||"Unknown":h;U&&br(W,ue),me&&xo(W,ue)}return wr(h,U,me,Y,B,rt.current,W)}}var hn=b.ReactCurrentOwner,qn=b.ReactDebugCurrentFrame;function ve(h){if(h){var R=h._owner,k=Ce(h.type,h._source,R?R.type:null);qn.setExtraStackFrame(k)}else qn.setExtraStackFrame(null)}var Ue;Ue=!1;function We(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function vt(){{if(hn.current){var h=I(hn.current.type);if(h)return`
17
+ */var Su;function Ky(){return Su||(Su=1,"{}".NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var $=h&&_[h]||_[m];return typeof $=="function"?$:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(_){{for(var $=arguments.length,V=new Array($>1?$-1:0),Q=1;Q<$;Q++)V[Q-1]=arguments[Q];E("error",_,V)}}function E(_,$,V){{var Q=y.ReactDebugCurrentFrame,pe=Q.getStackAddendum();pe!==""&&($+="%s",V=V.concat([pe]));var ye=V.map(function(le){return String(le)});ye.unshift("Warning: "+$),Function.prototype.apply.call(console[_],console,ye)}}var x=!1,v=!1,O=!1,C=!1,R=!1,N;N=Symbol.for("react.module.reference");function T(_){return!!(typeof _=="string"||typeof _=="function"||_===r||_===a||R||_===o||_===c||_===u||C||_===p||x||v||O||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===s||_.$$typeof===l||_.$$typeof===N||_.getModuleId!==void 0))}function k(_,$,V){var Q=_.displayName;if(Q)return Q;var pe=$.displayName||$.name||"";return pe!==""?V+"("+pe+")":V}function j(_){return _.displayName||"Context"}function L(_){if(_==null)return null;if(typeof _.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var $=_;return j($)+".Consumer";case i:var V=_;return j(V._context)+".Provider";case l:return k(_,_.render,"ForwardRef");case d:var Q=_.displayName||null;return Q!==null?Q:L(_.type)||"Memo";case f:{var pe=_,ye=pe._payload,le=pe._init;try{return L(le(ye))}catch{return null}}}return null}var M=Object.assign,P=0,D,F,ne,Z,ue,A,I;function G(){}G.__reactDisabledLog=!0;function te(){{if(P===0){D=console.log,F=console.info,ne=console.warn,Z=console.error,ue=console.group,A=console.groupCollapsed,I=console.groupEnd;var _={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}P++}}function ie(){{if(P--,P===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},_,{value:D}),info:M({},_,{value:F}),warn:M({},_,{value:ne}),error:M({},_,{value:Z}),group:M({},_,{value:ue}),groupCollapsed:M({},_,{value:A}),groupEnd:M({},_,{value:I})})}P<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=y.ReactCurrentDispatcher,we;function fe(_,$,V){{if(we===void 0)try{throw Error()}catch(pe){var Q=pe.stack.trim().match(/\n( *(at )?)/);we=Q&&Q[1]||""}return`
18
+ `+we+_}}var Ee=!1,re;{var De=typeof WeakMap=="function"?WeakMap:Map;re=new De}function z(_,$){if(!_||Ee)return"";{var V=re.get(_);if(V!==void 0)return V}var Q;Ee=!0;var pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ye;ye=de.current,de.current=null,te();try{if($){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(cn){Q=cn}Reflect.construct(_,[],le)}else{try{le.call()}catch(cn){Q=cn}_.call(le.prototype)}}else{try{throw Error()}catch(cn){Q=cn}_()}}catch(cn){if(cn&&Q&&typeof cn.stack=="string"){for(var se=cn.stack.split(`
19
+ `),ot=Q.stack.split(`
20
+ `),Be=se.length-1,Fe=ot.length-1;Be>=1&&Fe>=0&&se[Be]!==ot[Fe];)Fe--;for(;Be>=1&&Fe>=0;Be--,Fe--)if(se[Be]!==ot[Fe]){if(Be!==1||Fe!==1)do if(Be--,Fe--,Fe<0||se[Be]!==ot[Fe]){var Rt=`
21
+ `+se[Be].replace(" at new "," at ");return _.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",_.displayName)),typeof _=="function"&&re.set(_,Rt),Rt}while(Be>=1&&Fe>=0);break}}}finally{Ee=!1,de.current=ye,ie(),Error.prepareStackTrace=pe}var ur=_?_.displayName||_.name:"",bu=ur?fe(ur):"";return typeof _=="function"&&re.set(_,bu),bu}function Xe(_,$,V){return z(_,!1)}function Le(_){var $=_.prototype;return!!($&&$.isReactComponent)}function $e(_,$,V){if(_==null)return"";if(typeof _=="function")return z(_,Le(_));if(typeof _=="string")return fe(_);switch(_){case c:return fe("Suspense");case u:return fe("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return Xe(_.render);case d:return $e(_.type,$,V);case f:{var Q=_,pe=Q._payload,ye=Q._init;try{return $e(ye(pe),$,V)}catch{}}}return""}var vt=Object.prototype.hasOwnProperty,an={},sn=y.ReactDebugCurrentFrame;function Me(_){if(_){var $=_._owner,V=$e(_.type,_._source,$?$.type:null);sn.setExtraStackFrame(V)}else sn.setExtraStackFrame(null)}function me(_,$,V,Q,pe){{var ye=Function.call.bind(vt);for(var le in _)if(ye(_,le)){var se=void 0;try{if(typeof _[le]!="function"){var ot=Error((Q||"React class")+": "+V+" type `"+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[le]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ot.name="Invariant Violation",ot}se=_[le]($,le,Q,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Be){se=Be}se&&!(se instanceof Error)&&(Me(pe),S("%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).",Q||"React class",V,le,typeof se),Me(null)),se instanceof Error&&!(se.message in an)&&(an[se.message]=!0,Me(pe),S("Failed %s type: %s",V,se.message),Me(null))}}}var Ae=Array.isArray;function Ge(_){return Ae(_)}function Kt(_){{var $=typeof Symbol=="function"&&Symbol.toStringTag,V=$&&_[Symbol.toStringTag]||_.constructor.name||"Object";return V}}function ua(_){try{return da(_),!1}catch{return!0}}function da(_){return""+_}function fa(_){if(ua(_))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Kt(_)),da(_)}var Ot=y.ReactCurrentOwner,xn={key:!0,ref:!0,__self:!0,__source:!0},Cn,co,Et;Et={};function pa(_){if(vt.call(_,"ref")){var $=Object.getOwnPropertyDescriptor(_,"ref").get;if($&&$.isReactWarning)return!1}return _.ref!==void 0}function qi(_){if(vt.call(_,"key")){var $=Object.getOwnPropertyDescriptor(_,"key").get;if($&&$.isReactWarning)return!1}return _.key!==void 0}function Yi(_,$){if(typeof _.ref=="string"&&Ot.current&&$&&Ot.current.stateNode!==$){var V=L(Ot.current.type);Et[V]||(S('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',L(Ot.current.type),_.ref),Et[V]=!0)}}function ha(_,$){{var V=function(){Cn||(Cn=!0,S("%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)",$))};V.isReactWarning=!0,Object.defineProperty(_,"key",{get:V,configurable:!0})}}function Xi(_,$){{var V=function(){co||(co=!0,S("%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)",$))};V.isReactWarning=!0,Object.defineProperty(_,"ref",{get:V,configurable:!0})}}var ga=function(_,$,V,Q,pe,ye,le){var se={$$typeof:t,type:_,key:$,ref:V,props:le,_owner:ye};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Q}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Ji(_,$,V,Q,pe){{var ye,le={},se=null,ot=null;V!==void 0&&(fa(V),se=""+V),qi($)&&(fa($.key),se=""+$.key),pa($)&&(ot=$.ref,Yi($,pe));for(ye in $)vt.call($,ye)&&!xn.hasOwnProperty(ye)&&(le[ye]=$[ye]);if(_&&_.defaultProps){var Be=_.defaultProps;for(ye in Be)le[ye]===void 0&&(le[ye]=Be[ye])}if(se||ot){var Fe=typeof _=="function"?_.displayName||_.name||"Unknown":_;se&&ha(le,Fe),ot&&Xi(le,Fe)}return ga(_,se,ot,pe,Q,Ot.current,le)}}var uo=y.ReactCurrentOwner,va=y.ReactDebugCurrentFrame;function Pe(_){if(_){var $=_._owner,V=$e(_.type,_._source,$?$.type:null);va.setExtraStackFrame(V)}else va.setExtraStackFrame(null)}var Ze;Ze=!1;function et(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Mt(){{if(uo.current){var _=L(uo.current.type);if(_)return`
22
22
 
23
- Check the render method of \``+h+"`."}return""}}function ut(h){{if(h!==void 0){var R=h.fileName.replace(/^.*[\\\/]/,""),k=h.lineNumber;return`
23
+ Check the render method of \``+_+"`."}return""}}function lt(_){{if(_!==void 0){var $=_.fileName.replace(/^.*[\\\/]/,""),V=_.lineNumber;return`
24
24
 
25
- Check your code at `+R+":"+k+"."}return""}}var it={};function mt(h){{var R=vt();if(!R){var k=typeof h=="string"?h:h.displayName||h.name;k&&(R=`
25
+ Check your code at `+$+":"+V+"."}return""}}var ct={};function _t(_){{var $=Mt();if(!$){var V=typeof _=="string"?_:_.displayName||_.name;V&&($=`
26
26
 
27
- Check the top-level render call using <`+k+">.")}return R}}function At(h,R){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var k=mt(R);if(it[k])return;it[k]=!0;var B="";h&&h._owner&&h._owner!==hn.current&&(B=" It was passed a child from "+I(h._owner.type)+"."),ve(h),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,B),ve(null)}}function st(h,R){{if(typeof h!="object")return;if(ze(h))for(var k=0;k<h.length;k++){var B=h[k];We(B)&&At(B,R)}else if(We(h))h._store&&(h._store.validated=!0);else if(h){var Y=w(h);if(typeof Y=="function"&&Y!==h.entries)for(var te=Y.call(h),W;!(W=te.next()).done;)We(W.value)&&At(W.value,R)}}}function gn(h){{var R=h.type;if(R==null||typeof R=="string")return;var k;if(typeof R=="function")k=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===l||R.$$typeof===d))k=R.propTypes;else return;if(k){var B=I(R);we(k,h.props,"prop",B,h)}else if(R.PropTypes!==void 0&&!Ue){Ue=!0;var Y=I(R);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vn(h){{for(var R=Object.keys(h.props),k=0;k<R.length;k++){var B=R[k];if(B!=="children"&&B!=="key"){ve(h),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",B),ve(null);break}}h.ref!==null&&(ve(h),S("Invalid attribute `ref` supplied to `React.Fragment`."),ve(null))}}function en(h,R,k,B,Y,te){{var W=P(h);if(!W){var U="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).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 me=ut(Y);me?U+=me:U+=vt();var le;h===null?le="null":ze(h)?le="array":h!==void 0&&h.$$typeof===t?(le="<"+(I(h.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):le=typeof h,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",le,U)}var ue=Co(h,R,k,Y,te);if(ue==null)return ue;if(W){var ke=R.children;if(ke!==void 0)if(B)if(ze(ke)){for(var Ct=0;Ct<ke.length;Ct++)st(ke[Ct],h);Object.freeze&&Object.freeze(ke)}else S("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 st(ke,h)}return h===r?vn(ue):gn(ue),ue}}function jn(h,R,k){return en(h,R,k,!0)}function Sr(h,R,k){return en(h,R,k,!1)}var mn=Sr,yn=jn;Eo.Fragment=r,Eo.jsx=mn,Eo.jsxs=yn}()),Eo}"{}".NODE_ENV==="production"?Ws.exports=Ky():Ws.exports=qy();var Zl=Ws.exports;const tt=Zl.Fragment,x=Zl.jsx,se=Zl.jsxs;var Yy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=globalThis&&globalThis.__assign||function(){return Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ye.apply(this,arguments)},Ou={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},_u={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Oa={width:"20px",height:"20px",position:"absolute"},Xy={top:Ye(Ye({},Ou),{top:"-5px"}),right:Ye(Ye({},_u),{left:void 0,right:"-5px"}),bottom:Ye(Ye({},Ou),{top:void 0,bottom:"-5px"}),left:Ye(Ye({},_u),{left:"-5px"}),topRight:Ye(Ye({},Oa),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ye(Ye({},Oa),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ye(Ye({},Oa),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ye(Ye({},Oa),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Jy=function(e){Yy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return x("div",{className:this.props.className||"",style:Ye(Ye({position:"absolute",userSelect:"none"},Xy[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(q.PureComponent),Qy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nn=globalThis&&globalThis.__assign||function(){return nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},nn.apply(this,arguments)},Zy={width:"auto",height:"auto"},_a=function(e,t,n){return Math.max(Math.min(e,n),t)},Eu=function(e,t){return Math.round(e/t)*t},xr=function(e,t){return new RegExp(e,"i").test(t)},Ea=function(e){return!!(e.touches&&e.touches.length)},eb=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Ru=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},es=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Ra=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},tb=function(e,t,n,r,o,a,i){return r=Ra(r,e.width,t,n),o=Ra(o,e.height,t,n),a=Ra(a,e.width,t,n),i=Ra(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},nb=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Nu="__resizable_base__",Tu=function(e){Qy(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(Nu):a.className+=Nu,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Zy},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return es(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?es(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?es(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&xr("left",a),s=o&&xr("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,d=c.lockAspectRatioExtraHeight,f=c.lockAspectRatioExtraWidth,p=l.width,g=l.height,y=d||0,w=f||0;return xr("right",s)&&(p=l.width+(n-l.x)*a/o,u&&(g=(p-w)/this.ratio+y)),xr("left",s)&&(p=l.width-(n-l.x)*a/o,u&&(g=(p-w)/this.ratio+y)),xr("bottom",s)&&(g=l.height+(r-l.y)*a/o,u&&(p=(g-y)*this.ratio+w)),xr("top",s)&&(g=l.height-(r-l.y)*a/o,u&&(p=(g-y)*this.ratio+w)),{newWidth:p,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof a.height>"u"?10:a.height,p=typeof o.height>"u"||o.height<0?r:o.height,g=l||0,y=c||0;if(s){var w=(f-g)*this.ratio+y,b=(p-g)*this.ratio+y,S=(u-y)/this.ratio+g,E=(d-y)/this.ratio+g,C=Math.max(u,w),m=Math.min(d,b),_=Math.max(f,S),O=Math.min(p,E);n=_a(n,C,m),r=_a(r,_,O)}else n=_a(n,u,d),r=_a(r,f,p);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&eb(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&Ea(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:nn(nn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Ea(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=Ea(n)?n.touches[0].clientX:n.clientX,u=Ea(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,p=d.original,g=d.width,y=d.height,w=this.getParentSize(),b=tb(w,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=b.maxWidth,i=b.maxHeight,s=b.minWidth,l=b.minHeight;var S=this.calculateNewSizeFromDirection(c,u),E=S.newHeight,C=S.newWidth,m=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(C=Ru(C,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=Ru(E,this.props.snap.y,this.props.snapGap));var _=this.calculateNewSizeFromAspectRatio(C,E,{width:m.maxWidth,height:m.maxHeight},{width:s,height:l});if(C=_.newWidth,E=_.newHeight,this.props.grid){var O=Eu(C,this.props.grid[0]),N=Eu(E,this.props.grid[1]),T=this.props.snapGap||0;C=T===0||Math.abs(O-C)<=T?O:C,E=T===0||Math.abs(N-E)<=T?N:E}var P={width:C-p.width,height:E-p.height};if(g&&typeof g=="string"){if(g.endsWith("%")){var M=C/w.width*100;C=M+"%"}else if(g.endsWith("vw")){var D=C/this.window.innerWidth*100;C=D+"vw"}else if(g.endsWith("vh")){var I=C/this.window.innerHeight*100;C=I+"vh"}}if(y&&typeof y=="string"){if(y.endsWith("%")){var M=E/w.height*100;E=M+"%"}else if(y.endsWith("vw")){var D=E/this.window.innerWidth*100;E=D+"vw"}else if(y.endsWith("vh")){var I=E/this.window.innerHeight*100;E=I+"vh"}}var A={width:this.createSizeForCssProperty(C,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?A.flexBasis=A.width:this.flexDir==="column"&&(A.flexBasis=A.height),rn.flushSync(function(){r.setState(A)}),this.props.onResize&&this.props.onResize(n,f,this.resizable,P)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:nn(nn({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?x(Jy,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:a&&a[d],className:i&&i[d],children:c&&c[d]?c[d]:null},d):null});return x("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return nb.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=nn(nn(nn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return se(a,{...nn({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&x("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(q.PureComponent);const rb="_workbenchContainer_15alj_2",ob="_topToolBarBox_15alj_8",ab="_topToolBarView_15alj_14",ib="_bodyContent_15alj_17",sb="_leftBox_15alj_23",lb="_pluginIconBar_15alj_29",cb="_pluginIconItem_15alj_34",ub="_active_15alj_44",db="_pluginPanelBoxResizeBox_15alj_60",fb="_pluginHeader_15alj_67",pb="_pluginNameText_15alj_75",hb="_closeBtn_15alj_82",gb="_fixedBtn_15alj_83",vb="_pluginPanelBox_15alj_60",mb="_rightResizeBox_15alj_98",yb="_arrowCursor_15alj_101",bb="_rightBox_15alj_116",wb="_centerBox_15alj_122",Sb="_subTopToolbarBox_15alj_128",xb="_canvasBox_15alj_133",Cb="_scrollBox_15alj_140",Fe={workbenchContainer:rb,topToolBarBox:ob,topToolBarView:ab,bodyContent:ib,leftBox:sb,pluginIconBar:lb,pluginIconItem:cb,active:ub,pluginPanelBoxResizeBox:db,pluginHeader:fb,pluginNameText:pb,closeBtn:hb,fixedBtn:gb,pluginPanelBox:vb,rightResizeBox:mb,arrowCursor:yb,rightBox:bb,centerBox:wb,subTopToolbarBox:Sb,canvasBox:xb,scrollBox:Cb};var Ob=v.createContext({});const Xp=Ob;function Te(e){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function _b(e,t){if(Te(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Te(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jp(e){var t=_b(e,"string");return Te(t)==="symbol"?t:String(t)}function pe(e,t,n){return t=Jp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pu(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qp(e){if(Array.isArray(e))return e}function Eb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Gs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ec(e,t){if(e){if(typeof e=="string")return Gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gs(e,t)}}function Zp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){return Qp(e)||Eb(e,t)||ec(e,t)||Zp()}function Rb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Lr(e,t){if(e==null)return{};var n=Rb(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var eh={exports:{}};/*!
27
+ Check the top-level render call using <`+V+">.")}return $}}function ln(_,$){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var V=_t($);if(ct[V])return;ct[V]=!0;var Q="";_&&_._owner&&_._owner!==uo.current&&(Q=" It was passed a child from "+L(_._owner.type)+"."),Pe(_),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,Q),Pe(null)}}function ut(_,$){{if(typeof _!="object")return;if(Ge(_))for(var V=0;V<_.length;V++){var Q=_[V];et(Q)&&ln(Q,$)}else if(et(_))_._store&&(_._store.validated=!0);else if(_){var pe=b(_);if(typeof pe=="function"&&pe!==_.entries)for(var ye=pe.call(_),le;!(le=ye.next()).done;)et(le.value)&&ln(le.value,$)}}}function $n(_){{var $=_.type;if($==null||typeof $=="string")return;var V;if(typeof $=="function")V=$.propTypes;else if(typeof $=="object"&&($.$$typeof===l||$.$$typeof===d))V=$.propTypes;else return;if(V){var Q=L($);me(V,_.props,"prop",Q,_)}else if($.PropTypes!==void 0&&!Ze){Ze=!0;var pe=L($);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pe||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function In(_){{for(var $=Object.keys(_.props),V=0;V<$.length;V++){var Q=$[V];if(Q!=="children"&&Q!=="key"){Pe(_),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Q),Pe(null);break}}_.ref!==null&&(Pe(_),S("Invalid attribute `ref` supplied to `React.Fragment`."),Pe(null))}}function Ln(_,$,V,Q,pe,ye){{var le=T(_);if(!le){var se="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(se+=" 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 ot=lt(pe);ot?se+=ot:se+=Mt();var Be;_===null?Be="null":Ge(_)?Be="array":_!==void 0&&_.$$typeof===t?(Be="<"+(L(_.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):Be=typeof _,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Be,se)}var Fe=Ji(_,$,V,pe,ye);if(Fe==null)return Fe;if(le){var Rt=$.children;if(Rt!==void 0)if(Q)if(Ge(Rt)){for(var ur=0;ur<Rt.length;ur++)ut(Rt[ur],_);Object.freeze&&Object.freeze(Rt)}else S("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 ut(Rt,_)}return _===r?In(Fe):$n(Fe),Fe}}function cr(_,$,V){return Ln(_,$,V,!0)}function ma(_,$,V){return Ln(_,$,V,!1)}var Bn=ma,zn=cr;po.Fragment=r,po.jsx=Bn,po.jsxs=zn}()),po}"{}".NODE_ENV==="production"?Hs.exports=Gy():Hs.exports=Ky();var Xl=Hs.exports;const Ye=Xl.Fragment,w=Xl.jsx,ee=Xl.jsxs;var qy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=globalThis&&globalThis.__assign||function(){return He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},He.apply(this,arguments)},xu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Cu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ya={width:"20px",height:"20px",position:"absolute"},Yy={top:He(He({},xu),{top:"-5px"}),right:He(He({},Cu),{left:void 0,right:"-5px"}),bottom:He(He({},xu),{top:void 0,bottom:"-5px"}),left:He(He({},Cu),{left:"-5px"}),topRight:He(He({},ya),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:He(He({},ya),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:He(He({},ya),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:He(He({},ya),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Xy=function(e){qy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w("div",{className:this.props.className||"",style:He(He({position:"absolute",userSelect:"none"},Yy[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(W.PureComponent),Jy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=globalThis&&globalThis.__assign||function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Yt.apply(this,arguments)},Qy={width:"auto",height:"auto"},ba=function(e,t,n){return Math.max(Math.min(e,n),t)},Ou=function(e,t){return Math.round(e/t)*t},dr=function(e,t){return new RegExp(e,"i").test(t)},wa=function(e){return!!(e.touches&&e.touches.length)},Zy=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Eu=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Qi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Sa=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},eb=function(e,t,n,r,o,a,i){return r=Sa(r,e.width,t,n),o=Sa(o,e.height,t,n),a=Sa(a,e.width,t,n),i=Sa(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},tb=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],_u="__resizable_base__",Ru=function(e){Jy(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(_u):a.className+=_u,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Qy},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return Qi(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?Qi(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?Qi(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&dr("left",a),s=o&&dr("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,d=c.lockAspectRatioExtraHeight,f=c.lockAspectRatioExtraWidth,p=l.width,h=l.height,m=d||0,b=f||0;return dr("right",s)&&(p=l.width+(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("left",s)&&(p=l.width-(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("bottom",s)&&(h=l.height+(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),dr("top",s)&&(h=l.height-(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof a.height>"u"?10:a.height,p=typeof o.height>"u"||o.height<0?r:o.height,h=l||0,m=c||0;if(s){var b=(f-h)*this.ratio+m,y=(p-h)*this.ratio+m,S=(u-m)/this.ratio+h,E=(d-m)/this.ratio+h,x=Math.max(u,b),v=Math.min(d,y),O=Math.max(f,S),C=Math.min(p,E);n=ba(n,x,v),r=ba(r,O,C)}else n=ba(n,u,d),r=ba(r,f,p);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&Zy(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&wa(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wa(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=wa(n)?n.touches[0].clientX:n.clientX,u=wa(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,p=d.original,h=d.width,m=d.height,b=this.getParentSize(),y=eb(b,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=y.maxWidth,i=y.maxHeight,s=y.minWidth,l=y.minHeight;var S=this.calculateNewSizeFromDirection(c,u),E=S.newHeight,x=S.newWidth,v=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(x=Eu(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=Eu(E,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(x,E,{width:v.maxWidth,height:v.maxHeight},{width:s,height:l});if(x=O.newWidth,E=O.newHeight,this.props.grid){var C=Ou(x,this.props.grid[0]),R=Ou(E,this.props.grid[1]),N=this.props.snapGap||0;x=N===0||Math.abs(C-x)<=N?C:x,E=N===0||Math.abs(R-E)<=N?R:E}var T={width:x-p.width,height:E-p.height};if(h&&typeof h=="string"){if(h.endsWith("%")){var k=x/b.width*100;x=k+"%"}else if(h.endsWith("vw")){var j=x/this.window.innerWidth*100;x=j+"vw"}else if(h.endsWith("vh")){var L=x/this.window.innerHeight*100;x=L+"vh"}}if(m&&typeof m=="string"){if(m.endsWith("%")){var k=E/b.height*100;E=k+"%"}else if(m.endsWith("vw")){var j=E/this.window.innerWidth*100;E=j+"vw"}else if(m.endsWith("vh")){var L=E/this.window.innerHeight*100;E=L+"vh"}}var M={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?M.flexBasis=M.width:this.flexDir==="column"&&(M.flexBasis=M.height),Lt.flushSync(function(){r.setState(M)}),this.props.onResize&&this.props.onResize(n,f,this.resizable,T)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?w(Xy,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:a&&a[d],className:i&&i[d],children:c&&c[d]?c[d]:null},d):null});return w("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return tb.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=Yt(Yt(Yt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return ee(a,{...Yt({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&w("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(W.PureComponent);const nb="_workbenchContainer_b7h5o_2",rb="_topToolBarBox_b7h5o_8",ob="_topToolBarView_b7h5o_14",ab="_bodyContent_b7h5o_17",ib="_leftBox_b7h5o_23",sb="_pluginIconBar_b7h5o_29",lb="_pluginIconItem_b7h5o_34",cb="_active_b7h5o_44",ub="_pluginPanelBoxResizeBox_b7h5o_60",db="_pluginHeader_b7h5o_67",fb="_pluginNameText_b7h5o_75",pb="_closeBtn_b7h5o_82",hb="_fixedBtn_b7h5o_83",gb="_pluginPanelBox_b7h5o_60",vb="_rightResizeBox_b7h5o_98",mb="_arrowCursor_b7h5o_101",yb="_rightBox_b7h5o_116",bb="_centerBox_b7h5o_122",wb="_subTopToolbarBox_b7h5o_128",Sb="_canvasBox_b7h5o_133",xb="_scrollBox_b7h5o_140",Cb="_customViewBox_b7h5o_146",ke={workbenchContainer:nb,topToolBarBox:rb,topToolBarView:ob,bodyContent:ab,leftBox:ib,pluginIconBar:sb,pluginIconItem:lb,active:cb,pluginPanelBoxResizeBox:ub,pluginHeader:db,pluginNameText:fb,closeBtn:pb,fixedBtn:hb,pluginPanelBox:gb,rightResizeBox:vb,arrowCursor:mb,rightBox:yb,centerBox:bb,subTopToolbarBox:wb,canvasBox:Sb,scrollBox:xb,customViewBox:Cb};var Ob=g.createContext({});const Gp=Ob;function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function Eb(e,t){if(Oe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Oe(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kp(e){var t=Eb(e,"string");return Oe(t)==="symbol"?t:String(t)}function ae(e,t,n){return t=Kp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nu(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qp(e){if(Array.isArray(e))return e}function _b(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Us(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jl(e,t){if(e){if(typeof e=="string")return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(e,t)}}function Yp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(e,t){return qp(e)||_b(e,t)||Jl(e,t)||Yp()}function Rb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Rr(e,t){if(e==null)return{};var n=Rb(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Xp={exports:{}};/*!
29
29
  Copyright (c) 2018 Jed Watson.
30
30
  Licensed under the MIT License (MIT), see
31
31
  http://jedwatson.github.io/classnames
32
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(eh);var Nb=eh.exports;const tc=Ql(Nb);function lt(e,t){Tb(e)&&(e="100%");var n=Pb(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Na(e){return Math.min(1,Math.max(0,e))}function Tb(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Pb(e){return typeof e=="string"&&e.indexOf("%")!==-1}function th(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ta(e){return e<=1?"".concat(Number(e)*100,"%"):e}function er(e){return e.length===1?"0"+e:String(e)}function kb(e,t,n){return{r:lt(e,255)*255,g:lt(t,255)*255,b:lt(n,255)*255}}function ku(e,t,n){e=lt(e,255),t=lt(t,255),n=lt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function ts(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jb(e,t,n){var r,o,a;if(e=lt(e,360),t=lt(t,100),n=lt(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=ts(s,i,e+1/3),o=ts(s,i,e),a=ts(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function ai(e,t,n){e=lt(e,255),t=lt(t,255),n=lt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function Mb(e,t,n){e=lt(e,360)*6,t=lt(t,100),n=lt(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],d=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:d*255}}function ii(e,t,n,r){var o=[er(Math.round(e).toString(16)),er(Math.round(t).toString(16)),er(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Ab(e,t,n,r,o){var a=[er(Math.round(e).toString(16)),er(Math.round(t).toString(16)),er(Math.round(n).toString(16)),er(Db(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Db(e){return Math.round(parseFloat(e)*255).toString(16)}function ju(e){return _t(e)/255}function _t(e){return parseInt(e,16)}function $b(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ks={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Wt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Bb(e)),typeof e=="object"&&(bn(e.r)&&bn(e.g)&&bn(e.b)?(t=kb(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):bn(e.h)&&bn(e.s)&&bn(e.v)?(r=Ta(e.s),o=Ta(e.v),t=Mb(e.h,r,o),i=!0,s="hsv"):bn(e.h)&&bn(e.s)&&bn(e.l)&&(r=Ta(e.s),a=Ta(e.l),t=jb(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=th(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ib="[-\\+]?\\d+%?",Lb="[-\\+]?\\d*\\.\\d+%?",Dn="(?:".concat(Lb,")|(?:").concat(Ib,")"),ns="[\\s|\\(]+(".concat(Dn,")[,|\\s]+(").concat(Dn,")[,|\\s]+(").concat(Dn,")\\s*\\)?"),rs="[\\s|\\(]+(".concat(Dn,")[,|\\s]+(").concat(Dn,")[,|\\s]+(").concat(Dn,")[,|\\s]+(").concat(Dn,")\\s*\\)?"),Vt={CSS_UNIT:new RegExp(Dn),rgb:new RegExp("rgb"+ns),rgba:new RegExp("rgba"+rs),hsl:new RegExp("hsl"+ns),hsla:new RegExp("hsla"+rs),hsv:new RegExp("hsv"+ns),hsva:new RegExp("hsva"+rs),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bb(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ks[e])e=Ks[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Vt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Vt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Vt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Vt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vt.hex8.exec(e),n?{r:_t(n[1]),g:_t(n[2]),b:_t(n[3]),a:ju(n[4]),format:t?"name":"hex8"}:(n=Vt.hex6.exec(e),n?{r:_t(n[1]),g:_t(n[2]),b:_t(n[3]),format:t?"name":"hex"}:(n=Vt.hex4.exec(e),n?{r:_t(n[1]+n[1]),g:_t(n[2]+n[2]),b:_t(n[3]+n[3]),a:ju(n[4]+n[4]),format:t?"name":"hex8"}:(n=Vt.hex3.exec(e),n?{r:_t(n[1]+n[1]),g:_t(n[2]+n[2]),b:_t(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function bn(e){return!!Vt.CSS_UNIT.exec(String(e))}var Rt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=$b(t)),this.originalInput=t;var o=Wt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=th(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=ai(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=ai(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=ku(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=ku(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),ii(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ab(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(lt(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(lt(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+ii(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ks);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Na(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Na(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Na(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Na(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Pa=2,Mu=.16,zb=.05,Fb=.05,Vb=.15,nh=5,rh=4,Hb=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Au(e){var t=e.r,n=e.g,r=e.b,o=ai(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function ka(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ii(t,n,r,!1))}function Ub(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Du(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Pa*t:Math.round(e.h)+Pa*t:r=n?Math.round(e.h)+Pa*t:Math.round(e.h)-Pa*t,r<0?r+=360:r>=360&&(r-=360),r}function $u(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Mu*t:t===rh?r=e.s+Mu:r=e.s+zb*t,r>1&&(r=1),n&&t===nh&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Iu(e,t,n){var r;return n?r=e.v+Fb*t:r=e.v-Vb*t,r>1&&(r=1),Number(r.toFixed(2))}function qs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Wt(e),o=nh;o>0;o-=1){var a=Au(r),i=ka(Wt({h:Du(a,o,!0),s:$u(a,o,!0),v:Iu(a,o,!0)}));n.push(i)}n.push(ka(r));for(var s=1;s<=rh;s+=1){var l=Au(r),c=ka(Wt({h:Du(l,s),s:$u(l,s),v:Iu(l,s)}));n.push(c)}return t.theme==="dark"?Hb.map(function(u){var d=u.index,f=u.opacity,p=ka(Ub(Wt(t.backgroundColor||"#141414"),Wt(n[d]),f*100));return p}):n}var os={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},as={},is={};Object.keys(os).forEach(function(e){as[e]=qs(os[e]),as[e].primary=as[e][5],is[e]=qs(os[e],{theme:"dark",backgroundColor:"#141414"}),is[e].primary=is[e][5]});var Ys={},nc=[],Wb=function(t){nc.push(t)};function oh(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=nc.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Gb(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=nc.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function ah(){Ys={}}function ih(e,t,n){!t&&!Ys[n]&&(e(!1,n),Ys[n]=!0)}function Hn(e,t){ih(oh,e,t)}function Kb(e,t){ih(Gb,e,t)}Hn.preMessage=Wb;Hn.resetWarned=ah;Hn.noteOnce=Kb;function cn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qb(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Lu="data-rc-order",Yb="rc-util-key",Xs=new Map;function sh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Yb}function _i(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Xb(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function lh(e){return Array.from((Xs.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function ch(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!cn())return null;var n=t.csp,r=t.prepend,o=document.createElement("style");o.setAttribute(Lu,Xb(r)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=e;var a=_i(t),i=a.firstChild;if(r){if(r==="queue"){var s=lh(a).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(Lu))});if(s.length)return a.insertBefore(o,s[s.length-1].nextSibling),o}a.insertBefore(o,i)}else a.appendChild(o);return o}function uh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=_i(t);return lh(n).find(function(r){return r.getAttribute(sh(t))===e})}function dh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=uh(e,t);if(n){var r=_i(t);r.removeChild(n)}}function Jb(e,t){var n=Xs.get(e);if(!n||!qb(document,n)){var r=ch("",t),o=r.parentNode;Xs.set(e,o),e.removeChild(r)}}function Yo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=_i(n);Jb(r,n);var o=uh(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=ch(e,n);return l.setAttribute(sh(n),t),l}function Qb(e,t){Hn(e,"[@ant-design/icons] ".concat(t))}function Bu(e){return Te(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Te(e.icon)==="object"||typeof e.icon=="function")}function zu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Js(e,t,n){return n?v.createElement(e.tag,G(G({key:t},zu(e.attrs)),n),(e.children||[]).map(function(r,o){return Js(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):v.createElement(e.tag,G({key:t},zu(e.attrs)),(e.children||[]).map(function(r,o){return Js(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function fh(e){return qs(e)[0]}function ph(e){return e?Array.isArray(e)?e:[e]:[]}var Zb=`
32
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Xp);var Nb=Xp.exports;const Ql=Yl(Nb);function tt(e,t){Tb(e)&&(e="100%");var n=Pb(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xa(e){return Math.min(1,Math.max(0,e))}function Tb(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Pb(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Jp(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ca(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gn(e){return e.length===1?"0"+e:String(e)}function kb(e,t,n){return{r:tt(e,255)*255,g:tt(t,255)*255,b:tt(n,255)*255}}function Tu(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function Zi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jb(e,t,n){var r,o,a;if(e=tt(e,360),t=tt(t,100),n=tt(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=Zi(s,i,e+1/3),o=Zi(s,i,e),a=Zi(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function Qa(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function Mb(e,t,n){e=tt(e,360)*6,t=tt(t,100),n=tt(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],d=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:d*255}}function Za(e,t,n,r){var o=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Ab(e,t,n,r,o){var a=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16)),Gn(Db(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Db(e){return Math.round(parseFloat(e)*255).toString(16)}function Pu(e){return yt(e)/255}function yt(e){return parseInt(e,16)}function $b(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ws={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Bt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Bb(e)),typeof e=="object"&&(un(e.r)&&un(e.g)&&un(e.b)?(t=kb(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):un(e.h)&&un(e.s)&&un(e.v)?(r=Ca(e.s),o=Ca(e.v),t=Mb(e.h,r,o),i=!0,s="hsv"):un(e.h)&&un(e.s)&&un(e.l)&&(r=Ca(e.s),a=Ca(e.l),t=jb(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Jp(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ib="[-\\+]?\\d+%?",Lb="[-\\+]?\\d*\\.\\d+%?",_n="(?:".concat(Lb,")|(?:").concat(Ib,")"),es="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),ts="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),Dt={CSS_UNIT:new RegExp(_n),rgb:new RegExp("rgb"+es),rgba:new RegExp("rgba"+ts),hsl:new RegExp("hsl"+es),hsla:new RegExp("hsla"+ts),hsv:new RegExp("hsv"+es),hsva:new RegExp("hsva"+ts),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Bb(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ws[e])e=Ws[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Dt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Dt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Dt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Dt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Dt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Dt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Dt.hex8.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),a:Pu(n[4]),format:t?"name":"hex8"}:(n=Dt.hex6.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),format:t?"name":"hex"}:(n=Dt.hex4.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),a:Pu(n[4]+n[4]),format:t?"name":"hex8"}:(n=Dt.hex3.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function un(e){return!!Dt.CSS_UNIT.exec(String(e))}var wt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=$b(t)),this.originalInput=t;var o=Bt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Jp(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Qa(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Qa(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Tu(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Tu(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Za(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ab(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(tt(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(tt(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Za(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ws);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xa(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xa(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xa(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xa(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Oa=2,ku=.16,zb=.05,Vb=.05,Fb=.15,Qp=5,Zp=4,Hb=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ju(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ea(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function Ub(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Mu(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Oa*t:Math.round(e.h)+Oa*t:r=n?Math.round(e.h)+Oa*t:Math.round(e.h)-Oa*t,r<0?r+=360:r>=360&&(r-=360),r}function Au(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-ku*t:t===Zp?r=e.s+ku:r=e.s+zb*t,r>1&&(r=1),n&&t===Qp&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Du(e,t,n){var r;return n?r=e.v+Vb*t:r=e.v-Fb*t,r>1&&(r=1),Number(r.toFixed(2))}function Gs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=Qp;o>0;o-=1){var a=ju(r),i=Ea(Bt({h:Mu(a,o,!0),s:Au(a,o,!0),v:Du(a,o,!0)}));n.push(i)}n.push(Ea(r));for(var s=1;s<=Zp;s+=1){var l=ju(r),c=Ea(Bt({h:Mu(l,s),s:Au(l,s),v:Du(l,s)}));n.push(c)}return t.theme==="dark"?Hb.map(function(u){var d=u.index,f=u.opacity,p=Ea(Ub(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var ns={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},rs={},os={};Object.keys(ns).forEach(function(e){rs[e]=Gs(ns[e]),rs[e].primary=rs[e][5],os[e]=Gs(ns[e],{theme:"dark",backgroundColor:"#141414"}),os[e].primary=os[e][5]});var Ks={},Zl=[],Wb=function(t){Zl.push(t)};function eh(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Gb(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function th(){Ks={}}function nh(e,t,n){!t&&!Ks[n]&&(e(!1,n),Ks[n]=!0)}function Mn(e,t){nh(eh,e,t)}function Kb(e,t){nh(Gb,e,t)}Mn.preMessage=Wb;Mn.resetWarned=th;Mn.noteOnce=Kb;function en(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qb(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var $u="data-rc-order",Yb="rc-util-key",qs=new Map;function rh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Yb}function yi(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Xb(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function oh(e){return Array.from((qs.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function ah(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!en())return null;var n=t.csp,r=t.prepend,o=document.createElement("style");o.setAttribute($u,Xb(r)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=e;var a=yi(t),i=a.firstChild;if(r){if(r==="queue"){var s=oh(a).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute($u))});if(s.length)return a.insertBefore(o,s[s.length-1].nextSibling),o}a.insertBefore(o,i)}else a.appendChild(o);return o}function ih(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yi(t);return oh(n).find(function(r){return r.getAttribute(rh(t))===e})}function sh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ih(e,t);if(n){var r=yi(t);r.removeChild(n)}}function Jb(e,t){var n=qs.get(e);if(!n||!qb(document,n)){var r=ah("",t),o=r.parentNode;qs.set(e,o),e.removeChild(r)}}function Do(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=yi(n);Jb(r,n);var o=ih(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=ah(e,n);return l.setAttribute(rh(n),t),l}function Qb(e,t){Mn(e,"[@ant-design/icons] ".concat(t))}function Iu(e){return Oe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Oe(e.icon)==="object"||typeof e.icon=="function")}function Lu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Ys(e,t,n){return n?g.createElement(e.tag,H(H({key:t},Lu(e.attrs)),n),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):g.createElement(e.tag,H({key:t},Lu(e.attrs)),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function lh(e){return Gs(e)[0]}function ch(e){return e?Array.isArray(e)?e:[e]:[]}var Zb=`
33
33
  .anticon {
34
34
  display: inline-block;
35
35
  color: inherit;
@@ -83,16 +83,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
83
83
  transform: rotate(360deg);
84
84
  }
85
85
  }
86
- `,e0=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zb,n=v.useContext(Xp),r=n.csp;v.useEffect(function(){Yo(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},t0=["icon","className","onClick","style","primaryColor","secondaryColor"],Io={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function n0(e){var t=e.primaryColor,n=e.secondaryColor;Io.primaryColor=t,Io.secondaryColor=n||fh(t),Io.calculated=!!n}function r0(){return G({},Io)}var Ei=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Lr(t,t0),c=Io;if(i&&(c={primaryColor:i,secondaryColor:s||fh(i)}),e0(),Qb(Bu(n),"icon should be icon definiton, but got ".concat(n)),!Bu(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=G(G({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Js(u.icon,"svg-".concat(u.name),G({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};Ei.displayName="IconReact";Ei.getTwoToneColors=r0;Ei.setTwoToneColors=n0;const rc=Ei;function hh(e){var t=ph(e),n=Ne(t,2),r=n[0],o=n[1];return rc.setTwoToneColors({primaryColor:r,secondaryColor:o})}function o0(){var e=rc.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var a0=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hh("#1890ff");var Ri=q.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Lr(e,a0),d=q.useContext(Xp),f=d.prefixCls,p=f===void 0?"anticon":f,g=d.rootClassName,y=tc(g,p,(n={},pe(n,"".concat(p,"-").concat(o.name),!!o.name),pe(n,"".concat(p,"-spin"),!!a||o.name==="loading"),n),r),w=s;w===void 0&&l&&(w=-1);var b=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,S=ph(c),E=Ne(S,2),C=E[0],m=E[1];return x("span",{...G(G({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:w,onClick:l,className:y}),children:x(rc,{icon:o,primaryColor:C,secondaryColor:m,style:b})})});Ri.displayName="AntdIcon";Ri.getTwoToneColor=o0;Ri.setTwoToneColor=hh;const gt=Ri;var i0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const s0=i0;var gh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:s0})})};gh.displayName="ApartmentOutlined";const l0=q.forwardRef(gh);var c0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const u0=c0;var vh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:u0})})};vh.displayName="AppstoreAddOutlined";const d0=q.forwardRef(vh);var f0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const p0=f0;var mh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:p0})})};mh.displayName="CloseOutlined";const h0=q.forwardRef(mh);var g0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const v0=g0;var yh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:v0})})};yh.displayName="CopyOutlined";const bh=q.forwardRef(yh);var m0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const y0=m0;var wh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:y0})})};wh.displayName="DatabaseOutlined";const b0=q.forwardRef(wh);var w0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const S0=w0;var Sh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:S0})})};Sh.displayName="DeleteOutlined";const oc=q.forwardRef(Sh);var x0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const C0=x0;var xh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:C0})})};xh.displayName="DoubleRightOutlined";const O0=q.forwardRef(xh);var _0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const E0=_0;var Ch=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:E0})})};Ch.displayName="EyeInvisibleOutlined";const Oh=q.forwardRef(Ch);var R0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const N0=R0;var _h=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:N0})})};_h.displayName="EyeOutlined";const T0=q.forwardRef(_h);var P0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const k0=P0;var Eh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:k0})})};Eh.displayName="MinusCircleOutlined";const j0=q.forwardRef(Eh);var M0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const A0=M0;var Rh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:A0})})};Rh.displayName="MinusOutlined";const Nh=q.forwardRef(Rh);var D0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const $0=D0;var Th=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:$0})})};Th.displayName="PlusOutlined";const ac=q.forwardRef(Th);var I0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const L0=I0;var Ph=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:L0})})};Ph.displayName="PushpinOutlined";const B0=q.forwardRef(Ph);var z0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const F0=z0;var kh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:F0})})};kh.displayName="RightOutlined";const V0=q.forwardRef(kh);var H0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const U0=H0;var jh=function(t,n){return x(gt,{...G(G({},t),{},{ref:n,icon:U0})})};jh.displayName="SwapOutlined";const W0=q.forwardRef(jh);function Mh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Mh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Mh(e))&&(r&&(r+=" "),r+=t);return r}function si(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ic=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},li=e=>{const t=[],n=[];return Object.keys(e).forEach(o=>{const a=e[o];Oe.isExpression(a)?n.push({key:o,value:a}):t.push({key:o,value:a})}),{normalProperty:t,expressionProperty:n}},Ah=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],style:(a==null?void 0:a.normal)||{}};Object.keys(a||{}).forEach(s=>{s!=="normal"&&i.media.push({type:"max-width",value:s,style:(a==null?void 0:a[s])||{}})}),r.push(i)}),n.value=r,n},Dh=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{const o={normal:r.style};r.media.forEach(a=>{o[a.value]=a.style}),n[r.state]=o}),n};var G0=Object.defineProperty,K0=(e,t,n)=>t in e?G0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ae=(e,t,n)=>(K0(e,typeof t!="symbol"?t+"":t,n),n);const q0=e=>()=>{console.warn(`${e} need to be implement getComponent`)},Y0=["customPageRootRender"],Fu=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],X0=e=>[...Fu,...Y0].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):Fu.includes(n)&&(t[n]=q0),t},{});var J0=Object.defineProperty,Q0=(e,t,n)=>t in e?J0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ce=(e,t,n)=>(Q0(e,typeof t!="symbol"?t+"":t,n),n),Z0=typeof global=="object"&&global&&global.Object===Object&&global;const $h=Z0;var e1=typeof self=="object"&&self&&self.Object===Object&&self,t1=$h||e1||Function("return this")();const un=t1;var n1=un.Symbol;const It=n1;var Ih=Object.prototype,r1=Ih.hasOwnProperty,o1=Ih.toString,Ro=It?It.toStringTag:void 0;function a1(e){var t=r1.call(e,Ro),n=e[Ro];try{e[Ro]=void 0;var r=!0}catch{}var o=o1.call(e);return r&&(t?e[Ro]=n:delete e[Ro]),o}var i1=Object.prototype,s1=i1.toString;function l1(e){return s1.call(e)}var c1="[object Null]",u1="[object Undefined]",Vu=It?It.toStringTag:void 0;function cr(e){return e==null?e===void 0?u1:c1:Vu&&Vu in Object(e)?a1(e):l1(e)}function ln(e){return e!=null&&typeof e=="object"}var d1="[object Symbol]";function sc(e){return typeof e=="symbol"||ln(e)&&cr(e)==d1}function lc(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var f1=Array.isArray;const Ke=f1;var p1=1/0,Hu=It?It.prototype:void 0,Uu=Hu?Hu.toString:void 0;function Lh(e){if(typeof e=="string")return e;if(Ke(e))return lc(e,Lh)+"";if(sc(e))return Uu?Uu.call(e):"";var t=e+"";return t=="0"&&1/e==-p1?"-0":t}function Xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function cc(e){return e}var h1="[object AsyncFunction]",g1="[object Function]",v1="[object GeneratorFunction]",m1="[object Proxy]";function uc(e){if(!Xt(e))return!1;var t=cr(e);return t==g1||t==v1||t==h1||t==m1}var y1=un["__core-js_shared__"];const ss=y1;var Wu=function(){var e=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function b1(e){return!!Wu&&Wu in e}var w1=Function.prototype,S1=w1.toString;function ur(e){if(e!=null){try{return S1.call(e)}catch{}try{return e+""}catch{}}return""}var x1=/[\\^$.*+?()[\]{}|]/g,C1=/^\[object .+?Constructor\]$/,O1=Function.prototype,_1=Object.prototype,E1=O1.toString,R1=_1.hasOwnProperty,N1=RegExp("^"+E1.call(R1).replace(x1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T1(e){if(!Xt(e)||b1(e))return!1;var t=uc(e)?N1:C1;return t.test(ur(e))}function P1(e,t){return e==null?void 0:e[t]}function dr(e,t){var n=P1(e,t);return T1(n)?n:void 0}var k1=dr(un,"WeakMap");const Qs=k1;var Gu=Object.create,j1=function(){function e(){}return function(t){if(!Xt(t))return{};if(Gu)return Gu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const M1=j1;function A1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function D1(){}function Bh(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $1=800,I1=16,L1=Date.now;function B1(e){var t=0,n=0;return function(){var r=L1(),o=I1-(r-n);if(n=r,o>0){if(++t>=$1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function z1(e){return function(){return e}}var F1=function(){try{var e=dr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ci=F1;var V1=ci?function(e,t){return ci(e,"toString",{configurable:!0,enumerable:!1,value:z1(t),writable:!0})}:cc;const H1=V1;var U1=B1(H1);const zh=U1;function W1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function G1(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function K1(e){return e!==e}function q1(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function Y1(e,t,n){return t===t?q1(e,t,n):G1(e,K1,n)}function X1(e,t){var n=e==null?0:e.length;return!!n&&Y1(e,t,0)>-1}var J1=9007199254740991,Q1=/^(?:0|[1-9]\d*)$/;function Ni(e,t){var n=typeof e;return t=t??J1,!!t&&(n=="number"||n!="symbol"&&Q1.test(e))&&e>-1&&e%1==0&&e<t}function dc(e,t,n){t=="__proto__"&&ci?ci(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function fa(e,t){return e===t||e!==e&&t!==t}var Z1=Object.prototype,ew=Z1.hasOwnProperty;function fc(e,t,n){var r=e[t];(!(ew.call(e,t)&&fa(r,n))||n===void 0&&!(t in e))&&dc(e,t,n)}function eo(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?dc(n,s,l):fc(n,s,l)}return n}var Ku=Math.max;function Fh(e,t,n){return t=Ku(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Ku(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),A1(e,this,s)}}function Vh(e,t){return zh(Fh(e,t,cc),e+"")}var tw=9007199254740991;function pc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tw}function Ti(e){return e!=null&&pc(e.length)&&!uc(e)}function nw(e,t,n){if(!Xt(n))return!1;var r=typeof t;return(r=="number"?Ti(n)&&Ni(t,n.length):r=="string"&&t in n)?fa(n[t],e):!1}function rw(e){return Vh(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&nw(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var ow=Object.prototype;function hc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ow;return e===n}function aw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var iw="[object Arguments]";function qu(e){return ln(e)&&cr(e)==iw}var Hh=Object.prototype,sw=Hh.hasOwnProperty,lw=Hh.propertyIsEnumerable,cw=qu(function(){return arguments}())?qu:function(e){return ln(e)&&sw.call(e,"callee")&&!lw.call(e,"callee")};const Xo=cw;function uw(){return!1}var Uh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yu=Uh&&typeof module=="object"&&module&&!module.nodeType&&module,dw=Yu&&Yu.exports===Uh,Xu=dw?un.Buffer:void 0,fw=Xu?Xu.isBuffer:void 0,pw=fw||uw;const Jo=pw;var hw="[object Arguments]",gw="[object Array]",vw="[object Boolean]",mw="[object Date]",yw="[object Error]",bw="[object Function]",ww="[object Map]",Sw="[object Number]",xw="[object Object]",Cw="[object RegExp]",Ow="[object Set]",_w="[object String]",Ew="[object WeakMap]",Rw="[object ArrayBuffer]",Nw="[object DataView]",Tw="[object Float32Array]",Pw="[object Float64Array]",kw="[object Int8Array]",jw="[object Int16Array]",Mw="[object Int32Array]",Aw="[object Uint8Array]",Dw="[object Uint8ClampedArray]",$w="[object Uint16Array]",Iw="[object Uint32Array]",je={};je[Tw]=je[Pw]=je[kw]=je[jw]=je[Mw]=je[Aw]=je[Dw]=je[$w]=je[Iw]=!0;je[hw]=je[gw]=je[Rw]=je[vw]=je[Nw]=je[mw]=je[yw]=je[bw]=je[ww]=je[Sw]=je[xw]=je[Cw]=je[Ow]=je[_w]=je[Ew]=!1;function Lw(e){return ln(e)&&pc(e.length)&&!!je[cr(e)]}function gc(e){return function(t){return e(t)}}var Wh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Lo=Wh&&typeof module=="object"&&module&&!module.nodeType&&module,Bw=Lo&&Lo.exports===Wh,ls=Bw&&$h.process,zw=function(){try{var e=Lo&&Lo.require&&Lo.require("util").types;return e||ls&&ls.binding&&ls.binding("util")}catch{}}();const Br=zw;var Ju=Br&&Br.isTypedArray,Fw=Ju?gc(Ju):Lw;const vc=Fw;var Vw=Object.prototype,Hw=Vw.hasOwnProperty;function Gh(e,t){var n=Ke(e),r=!n&&Xo(e),o=!n&&!r&&Jo(e),a=!n&&!r&&!o&&vc(e),i=n||r||o||a,s=i?aw(e.length,String):[],l=s.length;for(var c in e)(t||Hw.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ni(c,l)))&&s.push(c);return s}function Kh(e,t){return function(n){return e(t(n))}}var Uw=Kh(Object.keys,Object);const Ww=Uw;var Gw=Object.prototype,Kw=Gw.hasOwnProperty;function qw(e){if(!hc(e))return Ww(e);var t=[];for(var n in Object(e))Kw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Pi(e){return Ti(e)?Gh(e):qw(e)}function Yw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Xw=Object.prototype,Jw=Xw.hasOwnProperty;function Qw(e){if(!Xt(e))return Yw(e);var t=hc(e),n=[];for(var r in e)r=="constructor"&&(t||!Jw.call(e,r))||n.push(r);return n}function pa(e){return Ti(e)?Gh(e,!0):Qw(e)}var Zw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eS=/^\w*$/;function mc(e,t){if(Ke(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||sc(e)?!0:eS.test(e)||!Zw.test(e)||t!=null&&e in Object(t)}var tS=dr(Object,"create");const Qo=tS;function nS(){this.__data__=Qo?Qo(null):{},this.size=0}function rS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oS="__lodash_hash_undefined__",aS=Object.prototype,iS=aS.hasOwnProperty;function sS(e){var t=this.__data__;if(Qo){var n=t[e];return n===oS?void 0:n}return iS.call(t,e)?t[e]:void 0}var lS=Object.prototype,cS=lS.hasOwnProperty;function uS(e){var t=this.__data__;return Qo?t[e]!==void 0:cS.call(t,e)}var dS="__lodash_hash_undefined__";function fS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qo&&t===void 0?dS:t,this}function ar(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ar.prototype.clear=nS;ar.prototype.delete=rS;ar.prototype.get=sS;ar.prototype.has=uS;ar.prototype.set=fS;function pS(){this.__data__=[],this.size=0}function ki(e,t){for(var n=e.length;n--;)if(fa(e[n][0],t))return n;return-1}var hS=Array.prototype,gS=hS.splice;function vS(e){var t=this.__data__,n=ki(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gS.call(t,n,1),--this.size,!0}function mS(e){var t=this.__data__,n=ki(t,e);return n<0?void 0:t[n][1]}function yS(e){return ki(this.__data__,e)>-1}function bS(e,t){var n=this.__data__,r=ki(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _n(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_n.prototype.clear=pS;_n.prototype.delete=vS;_n.prototype.get=mS;_n.prototype.has=yS;_n.prototype.set=bS;var wS=dr(un,"Map");const Zo=wS;function SS(){this.size=0,this.__data__={hash:new ar,map:new(Zo||_n),string:new ar}}function xS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ji(e,t){var n=e.__data__;return xS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CS(e){var t=ji(this,e).delete(e);return this.size-=t?1:0,t}function OS(e){return ji(this,e).get(e)}function _S(e){return ji(this,e).has(e)}function ES(e,t){var n=ji(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function En(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}En.prototype.clear=SS;En.prototype.delete=CS;En.prototype.get=OS;En.prototype.has=_S;En.prototype.set=ES;var RS="Expected a function";function yc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(RS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(yc.Cache||En),n}yc.Cache=En;var NS=500;function TS(e){var t=yc(e,function(r){return n.size===NS&&n.clear(),r}),n=t.cache;return t}var PS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kS=/\\(\\)?/g,jS=TS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(PS,function(n,r,o,a){t.push(o?a.replace(kS,"$1"):r||n)}),t});const MS=jS;function AS(e){return e==null?"":Lh(e)}function to(e,t){return Ke(e)?e:mc(e,t)?[e]:MS(AS(e))}var DS=1/0;function no(e){if(typeof e=="string"||sc(e))return e;var t=e+"";return t=="0"&&1/e==-DS?"-0":t}function Mi(e,t){t=to(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[no(t[n++])];return n&&n==r?e:void 0}function qh(e,t,n){var r=e==null?void 0:Mi(e,t);return r===void 0?n:r}function bc(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Qu=It?It.isConcatSpreadable:void 0;function $S(e){return Ke(e)||Xo(e)||!!(Qu&&e&&e[Qu])}function wc(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=$S),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?wc(s,t-1,n,r,o):bc(o,s):r||(o[o.length]=s)}return o}function IS(e){var t=e==null?0:e.length;return t?wc(e,1):[]}function LS(e){return zh(Fh(e,void 0,IS),e+"")}var BS=Kh(Object.getPrototypeOf,Object);const Sc=BS;var zS="[object Object]",FS=Function.prototype,VS=Object.prototype,Yh=FS.toString,HS=VS.hasOwnProperty,US=Yh.call(Object);function St(e){if(!ln(e)||cr(e)!=zS)return!1;var t=Sc(e);if(t===null)return!0;var n=HS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Yh.call(n)==US}function WS(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function GS(){this.__data__=new _n,this.size=0}function KS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qS(e){return this.__data__.get(e)}function YS(e){return this.__data__.has(e)}var XS=200;function JS(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!Zo||r.length<XS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new En(r)}return n.set(e,t),this.size=n.size,this}function Gt(e){var t=this.__data__=new _n(e);this.size=t.size}Gt.prototype.clear=GS;Gt.prototype.delete=KS;Gt.prototype.get=qS;Gt.prototype.has=YS;Gt.prototype.set=JS;function QS(e,t){return e&&eo(t,Pi(t),e)}function ZS(e,t){return e&&eo(t,pa(t),e)}var Xh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zu=Xh&&typeof module=="object"&&module&&!module.nodeType&&module,ex=Zu&&Zu.exports===Xh,ed=ex?un.Buffer:void 0,td=ed?ed.allocUnsafe:void 0;function Jh(e,t){if(t)return e.slice();var n=e.length,r=td?td(n):new e.constructor(n);return e.copy(r),r}function tx(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Qh(){return[]}var nx=Object.prototype,rx=nx.propertyIsEnumerable,nd=Object.getOwnPropertySymbols,ox=nd?function(e){return e==null?[]:(e=Object(e),tx(nd(e),function(t){return rx.call(e,t)}))}:Qh;const xc=ox;function ax(e,t){return eo(e,xc(e),t)}var ix=Object.getOwnPropertySymbols,sx=ix?function(e){for(var t=[];e;)bc(t,xc(e)),e=Sc(e);return t}:Qh;const Zh=sx;function lx(e,t){return eo(e,Zh(e),t)}function eg(e,t,n){var r=t(e);return Ke(e)?r:bc(r,n(e))}function Zs(e){return eg(e,Pi,xc)}function Cc(e){return eg(e,pa,Zh)}var cx=dr(un,"DataView");const el=cx;var ux=dr(un,"Promise");const tl=ux;var dx=dr(un,"Set");const $r=dx;var rd="[object Map]",fx="[object Object]",od="[object Promise]",ad="[object Set]",id="[object WeakMap]",sd="[object DataView]",px=ur(el),hx=ur(Zo),gx=ur(tl),vx=ur($r),mx=ur(Qs),Xn=cr;(el&&Xn(new el(new ArrayBuffer(1)))!=sd||Zo&&Xn(new Zo)!=rd||tl&&Xn(tl.resolve())!=od||$r&&Xn(new $r)!=ad||Qs&&Xn(new Qs)!=id)&&(Xn=function(e){var t=cr(e),n=t==fx?e.constructor:void 0,r=n?ur(n):"";if(r)switch(r){case px:return sd;case hx:return rd;case gx:return od;case vx:return ad;case mx:return id}return t});const ea=Xn;var yx=Object.prototype,bx=yx.hasOwnProperty;function wx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&bx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Sx=un.Uint8Array;const ui=Sx;function Oc(e){var t=new e.constructor(e.byteLength);return new ui(t).set(new ui(e)),t}function xx(e,t){var n=t?Oc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Cx=/\w*$/;function Ox(e){var t=new e.constructor(e.source,Cx.exec(e));return t.lastIndex=e.lastIndex,t}var ld=It?It.prototype:void 0,cd=ld?ld.valueOf:void 0;function _x(e){return cd?Object(cd.call(e)):{}}function tg(e,t){var n=t?Oc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ex="[object Boolean]",Rx="[object Date]",Nx="[object Map]",Tx="[object Number]",Px="[object RegExp]",kx="[object Set]",jx="[object String]",Mx="[object Symbol]",Ax="[object ArrayBuffer]",Dx="[object DataView]",$x="[object Float32Array]",Ix="[object Float64Array]",Lx="[object Int8Array]",Bx="[object Int16Array]",zx="[object Int32Array]",Fx="[object Uint8Array]",Vx="[object Uint8ClampedArray]",Hx="[object Uint16Array]",Ux="[object Uint32Array]";function Wx(e,t,n){var r=e.constructor;switch(t){case Ax:return Oc(e);case Ex:case Rx:return new r(+e);case Dx:return xx(e,n);case $x:case Ix:case Lx:case Bx:case zx:case Fx:case Vx:case Hx:case Ux:return tg(e,n);case Nx:return new r;case Tx:case jx:return new r(e);case Px:return Ox(e);case kx:return new r;case Mx:return _x(e)}}function ng(e){return typeof e.constructor=="function"&&!hc(e)?M1(Sc(e)):{}}var Gx="[object Map]";function Kx(e){return ln(e)&&ea(e)==Gx}var ud=Br&&Br.isMap,qx=ud?gc(ud):Kx;const Yx=qx;var Xx="[object Set]";function Jx(e){return ln(e)&&ea(e)==Xx}var dd=Br&&Br.isSet,Qx=dd?gc(dd):Jx;const Zx=Qx;var eC=1,tC=2,nC=4,rg="[object Arguments]",rC="[object Array]",oC="[object Boolean]",aC="[object Date]",iC="[object Error]",og="[object Function]",sC="[object GeneratorFunction]",lC="[object Map]",cC="[object Number]",ag="[object Object]",uC="[object RegExp]",dC="[object Set]",fC="[object String]",pC="[object Symbol]",hC="[object WeakMap]",gC="[object ArrayBuffer]",vC="[object DataView]",mC="[object Float32Array]",yC="[object Float64Array]",bC="[object Int8Array]",wC="[object Int16Array]",SC="[object Int32Array]",xC="[object Uint8Array]",CC="[object Uint8ClampedArray]",OC="[object Uint16Array]",_C="[object Uint32Array]",Ee={};Ee[rg]=Ee[rC]=Ee[gC]=Ee[vC]=Ee[oC]=Ee[aC]=Ee[mC]=Ee[yC]=Ee[bC]=Ee[wC]=Ee[SC]=Ee[lC]=Ee[cC]=Ee[ag]=Ee[uC]=Ee[dC]=Ee[fC]=Ee[pC]=Ee[xC]=Ee[CC]=Ee[OC]=Ee[_C]=!0;Ee[iC]=Ee[og]=Ee[hC]=!1;function Bo(e,t,n,r,o,a){var i,s=t&eC,l=t&tC,c=t&nC;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Xt(e))return e;var u=Ke(e);if(u){if(i=wx(e),!s)return Bh(e,i)}else{var d=ea(e),f=d==og||d==sC;if(Jo(e))return Jh(e,s);if(d==ag||d==rg||f&&!o){if(i=l||f?{}:ng(e),!s)return l?lx(e,ZS(i,e)):ax(e,QS(i,e))}else{if(!Ee[d])return o?e:{};i=Wx(e,d,s)}}a||(a=new Gt);var p=a.get(e);if(p)return p;a.set(e,i),Zx(e)?e.forEach(function(w){i.add(Bo(w,t,n,w,e,a))}):Yx(e)&&e.forEach(function(w,b){i.set(b,Bo(w,t,n,b,e,a))});var g=c?l?Cc:Zs:l?pa:Pi,y=u?void 0:g(e);return W1(y||e,function(w,b){y&&(b=w,w=e[b]),fc(i,b,Bo(w,t,n,b,e,a))}),i}var EC=1,RC=4;function ig(e){return Bo(e,EC|RC)}var NC="__lodash_hash_undefined__";function TC(e){return this.__data__.set(e,NC),this}function PC(e){return this.__data__.has(e)}function ta(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new En;++t<n;)this.add(e[t])}ta.prototype.add=ta.prototype.push=TC;ta.prototype.has=PC;function kC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function sg(e,t){return e.has(t)}var jC=1,MC=2;function lg(e,t,n,r,o,a){var i=n&jC,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&MC?new ta:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],y=t[d];if(r)var w=i?r(y,g,d,t,e,a):r(g,y,d,e,t,a);if(w!==void 0){if(w)continue;f=!1;break}if(p){if(!kC(t,function(b,S){if(!sg(p,S)&&(g===b||o(g,b,n,r,a)))return p.push(S)})){f=!1;break}}else if(!(g===y||o(g,y,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function AC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function _c(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var DC=1,$C=2,IC="[object Boolean]",LC="[object Date]",BC="[object Error]",zC="[object Map]",FC="[object Number]",VC="[object RegExp]",HC="[object Set]",UC="[object String]",WC="[object Symbol]",GC="[object ArrayBuffer]",KC="[object DataView]",fd=It?It.prototype:void 0,cs=fd?fd.valueOf:void 0;function qC(e,t,n,r,o,a,i){switch(n){case KC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case GC:return!(e.byteLength!=t.byteLength||!a(new ui(e),new ui(t)));case IC:case LC:case FC:return fa(+e,+t);case BC:return e.name==t.name&&e.message==t.message;case VC:case UC:return e==t+"";case zC:var s=AC;case HC:var l=r&DC;if(s||(s=_c),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=$C,i.set(e,t);var u=lg(s(e),s(t),r,o,a,i);return i.delete(e),u;case WC:if(cs)return cs.call(e)==cs.call(t)}return!1}var YC=1,XC=Object.prototype,JC=XC.hasOwnProperty;function QC(e,t,n,r,o,a){var i=n&YC,s=Zs(e),l=s.length,c=Zs(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:JC.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=i;++d<l;){f=s[d];var b=e[f],S=t[f];if(r)var E=i?r(S,b,f,t,e,a):r(b,S,f,e,t,a);if(!(E===void 0?b===S||o(b,S,n,r,a):E)){y=!1;break}w||(w=f=="constructor")}if(y&&!w){var C=e.constructor,m=t.constructor;C!=m&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof m=="function"&&m instanceof m)&&(y=!1)}return a.delete(e),a.delete(t),y}var ZC=1,pd="[object Arguments]",hd="[object Array]",ja="[object Object]",eO=Object.prototype,gd=eO.hasOwnProperty;function tO(e,t,n,r,o,a){var i=Ke(e),s=Ke(t),l=i?hd:ea(e),c=s?hd:ea(t);l=l==pd?ja:l,c=c==pd?ja:c;var u=l==ja,d=c==ja,f=l==c;if(f&&Jo(e)){if(!Jo(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new Gt),i||vc(e)?lg(e,t,n,r,o,a):qC(e,t,l,n,r,o,a);if(!(n&ZC)){var p=u&&gd.call(e,"__wrapped__"),g=d&&gd.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,w=g?t.value():t;return a||(a=new Gt),o(y,w,n,r,a)}}return f?(a||(a=new Gt),QC(e,t,n,r,o,a)):!1}function Ec(e,t,n,r,o){return e===t?!0:e==null||t==null||!ln(e)&&!ln(t)?e!==e&&t!==t:tO(e,t,n,r,Ec,o)}var nO=1,rO=2;function oO(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Gt;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?Ec(u,c,nO|rO,r,d):f))return!1}}return!0}function cg(e){return e===e&&!Xt(e)}function aO(e){for(var t=Pi(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,cg(o)]}return t}function ug(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function iO(e){var t=aO(e);return t.length==1&&t[0][2]?ug(t[0][0],t[0][1]):function(n){return n===e||oO(n,e,t)}}function sO(e,t){return e!=null&&t in Object(e)}function lO(e,t,n){t=to(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=no(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&pc(o)&&Ni(i,o)&&(Ke(e)||Xo(e)))}function cO(e,t){return e!=null&&lO(e,t,sO)}var uO=1,dO=2;function fO(e,t){return mc(e)&&cg(t)?ug(no(e),t):function(n){var r=qh(n,e);return r===void 0&&r===t?cO(n,e):Ec(t,r,uO|dO)}}function pO(e){return function(t){return t==null?void 0:t[e]}}function hO(e){return function(t){return Mi(t,e)}}function gO(e){return mc(e)?pO(no(e)):hO(e)}function Rc(e){return typeof e=="function"?e:e==null?cc:typeof e=="object"?Ke(e)?fO(e[0],e[1]):iO(e):gO(e)}function vO(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var mO=vO();const yO=mO;function nl(e,t,n){(n!==void 0&&!fa(e[t],n)||n===void 0&&!(t in e))&&dc(e,t,n)}function rl(e){return ln(e)&&Ti(e)}function ol(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function bO(e){return eo(e,pa(e))}function wO(e,t,n,r,o,a,i){var s=ol(e,n),l=ol(t,n),c=i.get(l);if(c){nl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Ke(l),p=!f&&Jo(l),g=!f&&!p&&vc(l);u=l,f||p||g?Ke(s)?u=s:rl(s)?u=Bh(s):p?(d=!1,u=Jh(l,!0)):g?(d=!1,u=tg(l,!0)):u=[]:St(l)||Xo(l)?(u=s,Xo(s)?u=bO(s):(!Xt(s)||uc(s))&&(u=ng(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),nl(e,n,u)}function dg(e,t,n,r,o){e!==t&&yO(t,function(a,i){if(o||(o=new Gt),Xt(a))wO(e,t,i,n,dg,r,o);else{var s=r?r(ol(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),nl(e,i,s)}},pa)}function SO(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function fg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function xO(e,t){return t.length<2?e:Mi(e,WS(t,0,-1))}var CO=rw(function(e,t,n){dg(e,t,n)});const pg=CO;var OO="Expected a function";function _O(e){if(typeof e!="function")throw new TypeError(OO);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function EO(e,t){return t=to(t,e),e=xO(e,t),e==null||delete e[no(fg(t))]}function RO(e){return St(e)?void 0:e}var NO=1,TO=2,PO=4,kO=LS(function(e,t){var n={};if(e==null)return n;var r=!1;t=lc(t,function(a){return a=to(a,e),r||(r=a.length>1),a}),eo(e,Cc(e),n),r&&(n=Bo(n,NO|TO|PO,RO));for(var o=t.length;o--;)EO(n,t[o]);return n});const hg=kO;function jO(e,t,n,r){if(!Xt(e))return e;t=to(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=no(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Xt(u)?u:Ni(t[o+1])?[]:{})}fc(s,l,c),s=s[l]}return e}function MO(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=Mi(e,i);n(s,i)&&jO(a,to(i,e),s)}return a}function AO(e,t){if(e==null)return{};var n=lc(Cc(e),function(r){return[r]});return t=Rc(t),MO(e,n,function(r,o){return t(r,o[0])})}function DO(e,t){return AO(e,_O(Rc(t)))}var $O=1/0,IO=$r&&1/_c(new $r([,-0]))[1]==$O?function(e){return new $r(e)}:D1;const LO=IO;var BO=200;function zO(e,t,n){var r=-1,o=X1,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=SO;else if(a>=BO){var c=t?null:LO(e);if(c)return _c(c);i=!1,o=sg,l=new ta}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var FO=Vh(function(e){var t=fg(e);return rl(t)&&(t=void 0),zO(wc(e,1,rl,!0),Rc(t))});const VO=FO;class gg extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function HO(e){return Kt(e)&&typeof e[Symbol.iterator]=="function"}function Kt(e){return typeof e=="object"&&e!=null}function Tt(e){return typeof e=="string"?JSON.stringify(e):""+e}function UO(e){const{done:t,value:n}=e.next();return t?void 0:n}function WO(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Tt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*vd(e,t,n,r){HO(e)||(e=[e]);for(const o of e){const a=WO(o,t,n,r);a&&(yield a)}}function*Nc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Kt(t.schema)&&Kt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Nc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Kt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}let dn=class{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return vd(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return vd(u,c,this,l)}:this.refiner=()=>[]}assert(t){return vg(t,this)}create(t){return GO(t,this)}is(t){return qO(t,this)}mask(t){return KO(t,this)}validate(t,n){return n===void 0&&(n={}),ro(t,this,n)}};function vg(e,t){const n=ro(e,t);if(n[0])throw n[0]}function GO(e,t){const n=ro(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function KO(e,t){const n=ro(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function qO(e,t){return!ro(e,t)[0]}function ro(e,t,n){n===void 0&&(n={});const r=Nc(e,t,n),o=UO(r);return o[0]?[new gg(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Tc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?wg(a):Se(a)}function Un(e,t){return new dn({type:e,schema:null,validator:t})}function zr(e){return new dn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function mg(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return wg(r);default:return Se(r)}}function Ge(){return Un("any",()=>!0)}function Ve(e){return new dn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Tt(t)}})}function Fr(){return Un("boolean",e=>typeof e=="boolean")}function al(e){const t={},n=e.map(r=>Tt(r)).join();for(const r of e)t[r]=r;return new dn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Tt(r)}})}function yg(){return Un("func",e=>typeof e=="function"||"Expected a function, but received: "+Tt(e))}function bt(e){const t=Tt(e),n=typeof e;return new dn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Tt(r)}})}function YO(){return Un("never",()=>!1)}function bg(){return Un("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Tt(e))}function Se(e){const t=e?Object.keys(e):[],n=YO();return new dn({type:"object",schema:e||null,*entries(r){if(e&&Kt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Kt(r)||"Expected an object, but received: "+Tt(r)},coercer(r){return Kt(r)?{...r}:r}})}function X(e){return new dn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function zo(e,t){return new dn({type:"record",schema:null,*entries(n){if(Kt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Kt(n)||"Expected an object, but received: "+Tt(n)}})}function K(){return Un("string",e=>typeof e=="string"||"Expected a string, but received: "+Tt(e))}function wg(e){const t=Object.keys(e);return new dn({type:"type",schema:e,*entries(n){if(Kt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Kt(n)||"Expected an object, but received: "+Tt(n)}})}function wt(e){const t=e.map(n=>n.type).join(" | ");return new dn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||XO()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Nc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Tt(n),...o]}})}function XO(){return Un("unknown",()=>!0)}const Pc=Se({package:K(),version:K(),name:K(),exportName:X(K()),destructuring:X(Fr()),subName:X(K()),main:X(K()),cssPaths:X(Ve(K()))}),JO=Ve(Pc),QO=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var $t=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))($t||{}),kc=(e=>(e.DESIGN="design",e.SAVE="save",e))(kc||{}),il=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(il||{});const ZO=()=>Un("normalObj",e=>!St(e)||[$t.SLOT,$t.EXPRESSION,$t.FUNCTION].includes(e==null?void 0:e.type)?!1:(ro(e,zo(K(),jc)),!0)),jc=wt([K(),bg(),Fr(),Se({type:bt($t.SLOT),renderType:al([il.FUNC,il.COMP]),params:X(Ve(K())),value:zr(()=>wt([Vr,Ve(Vr)]))}),Se({type:bt($t.EXPRESSION),value:K()}),Se({type:bt($t.FUNCTION),value:K()}),ZO(),Ve(zr(()=>jc))]),md=Se({type:bt($t.EXPRESSION),value:K()}),Vr=Se({id:X(K()),title:X(K()),componentName:K(),props:X(zo(K(),jc)),nodeName:X(K()),state:X(zo(K(),Ge())),children:zr(()=>X(Ve(wt([K(),Vr])))),configure:X(Ge()),css:X(Ge()),style:X(Ge()),classNames:X(Ve(Ge())),refId:X(K()),extra:X(zo(Ge(),Ge())),condition:X(wt([Fr(),md])),loop:X(Se({open:Fr(),data:wt([Ve(Ge()),md]),args:X(Ve(K())),forName:X(K()),forIndex:X(K()),key:X(Ge()),name:X(K())})),methods:X(Ve(Ge()))}),di=wt([K(),Se({label:K(),tip:X(K())})]),e_=Se({type:bt("shape"),value:Ve(Se({name:K(),title:di,valueType:zr(()=>Ai)}))}),t_=Se({type:bt("enums"),value:Ve(K())});Se({type:bt("array"),value:zr(()=>Ai)});const n_=Se({type:bt("array"),value:zr(()=>Ve(Ai))}),Ai=wt([al(["array","boolean","number","object","string"]),al(["component","expression","function"]),e_,t_,n_]),r_=wt([K(),Se({componentName:K(),props:X(Ge()),initialValue:X(Ge()),component:X(Ge())})]),us=Se({name:K(),title:di,valueType:Ai,description:X(K()),defaultValue:Ge(),setters:X(Ve(r_)),condition:X(yg())});wt([K(),yg()]);var sl=(e=>(e.SINGLE="single",e.GROUP="group",e))(sl||{});wt([K(),Se({name:K(),describe:X(K()),params:X(Se({name:K(),description:K()})),template:K()})]);const o_=Se({id:X(K()),title:K(),snapshot:wt([K(),Ge()]),snapshotText:X(K()),description:X(K()),tags:X(Ve(K())),groupName:X(K()),category:X(K()),schema:Tc(mg(Vr,["id"]),Se({componentName:X(K())}))}),a_=Se({componentName:K(),title:K(),screenshot:X(K()),icon:X(K()),tags:X(Ve(K())),groupName:X(K()),category:X(K()),priority:X(bg()),npm:X(Pc),snippets:Ve(o_),props:Ve(wt([us,Se({title:X(di),type:bt("single"),content:us}),Se({title:X(di),type:bt("group"),content:Ve(us)})])),fixedProps:X(Ge()),isContainer:X(wt([Fr(),Se({placeholder:K(),width:K(),height:K()})])),disableEditorDragDom:X(Ge()),isLayout:X(Fr()),rootSelector:X(K()),advanceCustom:X(Ge()),extra:X(zo(Ge(),Ge()))}),i_=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
86
+ `,e0=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zb,n=g.useContext(Gp),r=n.csp;g.useEffect(function(){Do(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},t0=["icon","className","onClick","style","primaryColor","secondaryColor"],Co={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function n0(e){var t=e.primaryColor,n=e.secondaryColor;Co.primaryColor=t,Co.secondaryColor=n||lh(t),Co.calculated=!!n}function r0(){return H({},Co)}var bi=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Rr(t,t0),c=Co;if(i&&(c={primaryColor:i,secondaryColor:s||lh(i)}),e0(),Qb(Iu(n),"icon should be icon definiton, but got ".concat(n)),!Iu(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=H(H({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Ys(u.icon,"svg-".concat(u.name),H({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};bi.displayName="IconReact";bi.getTwoToneColors=r0;bi.setTwoToneColors=n0;const ec=bi;function uh(e){var t=ch(e),n=Ce(t,2),r=n[0],o=n[1];return ec.setTwoToneColors({primaryColor:r,secondaryColor:o})}function o0(){var e=ec.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var a0=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];uh("#1890ff");var wi=W.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Rr(e,a0),d=W.useContext(Gp),f=d.prefixCls,p=f===void 0?"anticon":f,h=d.rootClassName,m=Ql(h,p,(n={},ae(n,"".concat(p,"-").concat(o.name),!!o.name),ae(n,"".concat(p,"-spin"),!!a||o.name==="loading"),n),r),b=s;b===void 0&&l&&(b=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,S=ch(c),E=Ce(S,2),x=E[0],v=E[1];return w("span",{...H(H({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:b,onClick:l,className:m}),children:w(ec,{icon:o,primaryColor:x,secondaryColor:v,style:y})})});wi.displayName="AntdIcon";wi.getTwoToneColor=o0;wi.setTwoToneColor=uh;const st=wi;var i0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const s0=i0;var dh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:s0})})};dh.displayName="ApartmentOutlined";const l0=W.forwardRef(dh);var c0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const u0=c0;var fh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:u0})})};fh.displayName="AppstoreAddOutlined";const d0=W.forwardRef(fh);var f0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const p0=f0;var ph=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:p0})})};ph.displayName="CloseOutlined";const h0=W.forwardRef(ph);var g0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const v0=g0;var hh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:v0})})};hh.displayName="CopyOutlined";const gh=W.forwardRef(hh);var m0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const y0=m0;var vh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:y0})})};vh.displayName="DatabaseOutlined";const b0=W.forwardRef(vh);var w0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const S0=w0;var mh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:S0})})};mh.displayName="DeleteOutlined";const tc=W.forwardRef(mh);var x0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const C0=x0;var yh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:C0})})};yh.displayName="DoubleRightOutlined";const O0=W.forwardRef(yh);var E0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const _0=E0;var bh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:_0})})};bh.displayName="EyeInvisibleOutlined";const wh=W.forwardRef(bh);var R0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const N0=R0;var Sh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:N0})})};Sh.displayName="EyeOutlined";const T0=W.forwardRef(Sh);var P0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const k0=P0;var xh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:k0})})};xh.displayName="MinusCircleOutlined";const j0=W.forwardRef(xh);var M0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const A0=M0;var Ch=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:A0})})};Ch.displayName="MinusOutlined";const Oh=W.forwardRef(Ch);var D0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const $0=D0;var Eh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:$0})})};Eh.displayName="PlusOutlined";const nc=W.forwardRef(Eh);var I0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const L0=I0;var _h=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:L0})})};_h.displayName="PushpinOutlined";const B0=W.forwardRef(_h);var z0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const V0=z0;var Rh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:V0})})};Rh.displayName="RightOutlined";const F0=W.forwardRef(Rh);var H0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const U0=H0;var Nh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:U0})})};Nh.displayName="SwapOutlined";const W0=W.forwardRef(Nh);function Th(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Th(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Th(e))&&(r&&(r+=" "),r+=t);return r}function ei(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const rc=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},ti=e=>{const t=[],n=[];return Object.keys(e).forEach(o=>{const a=e[o];be.isExpression(a)?n.push({key:o,value:a}):t.push({key:o,value:a})}),{normalProperty:t,expressionProperty:n}},Ph=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],style:(a==null?void 0:a.normal)||{}};Object.keys(a||{}).forEach(s=>{s!=="normal"&&i.media.push({type:"max-width",value:s,style:(a==null?void 0:a[s])||{}})}),r.push(i)}),n.value=r,n},kh=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{const o={normal:r.style};r.media.forEach(a=>{o[a.value]=a.style}),n[r.state]=o}),n};var G0=Object.defineProperty,K0=(e,t,n)=>t in e?G0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>(K0(e,typeof t!="symbol"?t+"":t,n),n);const q0=e=>()=>{console.warn(`${e} need to be implement getComponent`)},Y0=["customPageRootRender"],Bu=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],X0=e=>[...Bu,...Y0].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):Bu.includes(n)&&(t[n]=q0),t},{});var J0=Object.defineProperty,Q0=(e,t,n)=>t in e?J0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>(Q0(e,typeof t!="symbol"?t+"":t,n),n),Z0=typeof global=="object"&&global&&global.Object===Object&&global;const jh=Z0;var e1=typeof self=="object"&&self&&self.Object===Object&&self,t1=jh||e1||Function("return this")();const tn=t1;var n1=tn.Symbol;const Pt=n1;var Mh=Object.prototype,r1=Mh.hasOwnProperty,o1=Mh.toString,ho=Pt?Pt.toStringTag:void 0;function a1(e){var t=r1.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var o=o1.call(e);return r&&(t?e[ho]=n:delete e[ho]),o}var i1=Object.prototype,s1=i1.toString;function l1(e){return s1.call(e)}var c1="[object Null]",u1="[object Undefined]",zu=Pt?Pt.toStringTag:void 0;function tr(e){return e==null?e===void 0?u1:c1:zu&&zu in Object(e)?a1(e):l1(e)}function Zt(e){return e!=null&&typeof e=="object"}var d1="[object Symbol]";function oc(e){return typeof e=="symbol"||Zt(e)&&tr(e)==d1}function ac(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var f1=Array.isArray;const Ve=f1;var p1=1/0,Vu=Pt?Pt.prototype:void 0,Fu=Vu?Vu.toString:void 0;function Ah(e){if(typeof e=="string")return e;if(Ve(e))return ac(e,Ah)+"";if(oc(e))return Fu?Fu.call(e):"";var t=e+"";return t=="0"&&1/e==-p1?"-0":t}function Ut(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ic(e){return e}var h1="[object AsyncFunction]",g1="[object Function]",v1="[object GeneratorFunction]",m1="[object Proxy]";function sc(e){if(!Ut(e))return!1;var t=tr(e);return t==g1||t==v1||t==h1||t==m1}var y1=tn["__core-js_shared__"];const as=y1;var Hu=function(){var e=/[^.]+$/.exec(as&&as.keys&&as.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function b1(e){return!!Hu&&Hu in e}var w1=Function.prototype,S1=w1.toString;function nr(e){if(e!=null){try{return S1.call(e)}catch{}try{return e+""}catch{}}return""}var x1=/[\\^$.*+?()[\]{}|]/g,C1=/^\[object .+?Constructor\]$/,O1=Function.prototype,E1=Object.prototype,_1=O1.toString,R1=E1.hasOwnProperty,N1=RegExp("^"+_1.call(R1).replace(x1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T1(e){if(!Ut(e)||b1(e))return!1;var t=sc(e)?N1:C1;return t.test(nr(e))}function P1(e,t){return e==null?void 0:e[t]}function rr(e,t){var n=P1(e,t);return T1(n)?n:void 0}var k1=rr(tn,"WeakMap");const Xs=k1;var Uu=Object.create,j1=function(){function e(){}return function(t){if(!Ut(t))return{};if(Uu)return Uu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const M1=j1;function A1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function D1(){}function Dh(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $1=800,I1=16,L1=Date.now;function B1(e){var t=0,n=0;return function(){var r=L1(),o=I1-(r-n);if(n=r,o>0){if(++t>=$1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function z1(e){return function(){return e}}var V1=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ni=V1;var F1=ni?function(e,t){return ni(e,"toString",{configurable:!0,enumerable:!1,value:z1(t),writable:!0})}:ic;const H1=F1;var U1=B1(H1);const $h=U1;function W1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function G1(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function K1(e){return e!==e}function q1(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function Y1(e,t,n){return t===t?q1(e,t,n):G1(e,K1,n)}function X1(e,t){var n=e==null?0:e.length;return!!n&&Y1(e,t,0)>-1}var J1=9007199254740991,Q1=/^(?:0|[1-9]\d*)$/;function Si(e,t){var n=typeof e;return t=t??J1,!!t&&(n=="number"||n!="symbol"&&Q1.test(e))&&e>-1&&e%1==0&&e<t}function lc(e,t,n){t=="__proto__"&&ni?ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qo(e,t){return e===t||e!==e&&t!==t}var Z1=Object.prototype,ew=Z1.hasOwnProperty;function cc(e,t,n){var r=e[t];(!(ew.call(e,t)&&Qo(r,n))||n===void 0&&!(t in e))&&lc(e,t,n)}function Ur(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?lc(n,s,l):cc(n,s,l)}return n}var Wu=Math.max;function Ih(e,t,n){return t=Wu(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Wu(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),A1(e,this,s)}}function Lh(e,t){return $h(Ih(e,t,ic),e+"")}var tw=9007199254740991;function uc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tw}function xi(e){return e!=null&&uc(e.length)&&!sc(e)}function nw(e,t,n){if(!Ut(n))return!1;var r=typeof t;return(r=="number"?xi(n)&&Si(t,n.length):r=="string"&&t in n)?Qo(n[t],e):!1}function rw(e){return Lh(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&nw(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var ow=Object.prototype;function dc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ow;return e===n}function aw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var iw="[object Arguments]";function Gu(e){return Zt(e)&&tr(e)==iw}var Bh=Object.prototype,sw=Bh.hasOwnProperty,lw=Bh.propertyIsEnumerable,cw=Gu(function(){return arguments}())?Gu:function(e){return Zt(e)&&sw.call(e,"callee")&&!lw.call(e,"callee")};const $o=cw;function uw(){return!1}var zh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ku=zh&&typeof module=="object"&&module&&!module.nodeType&&module,dw=Ku&&Ku.exports===zh,qu=dw?tn.Buffer:void 0,fw=qu?qu.isBuffer:void 0,pw=fw||uw;const Io=pw;var hw="[object Arguments]",gw="[object Array]",vw="[object Boolean]",mw="[object Date]",yw="[object Error]",bw="[object Function]",ww="[object Map]",Sw="[object Number]",xw="[object Object]",Cw="[object RegExp]",Ow="[object Set]",Ew="[object String]",_w="[object WeakMap]",Rw="[object ArrayBuffer]",Nw="[object DataView]",Tw="[object Float32Array]",Pw="[object Float64Array]",kw="[object Int8Array]",jw="[object Int16Array]",Mw="[object Int32Array]",Aw="[object Uint8Array]",Dw="[object Uint8ClampedArray]",$w="[object Uint16Array]",Iw="[object Uint32Array]",_e={};_e[Tw]=_e[Pw]=_e[kw]=_e[jw]=_e[Mw]=_e[Aw]=_e[Dw]=_e[$w]=_e[Iw]=!0;_e[hw]=_e[gw]=_e[Rw]=_e[vw]=_e[Nw]=_e[mw]=_e[yw]=_e[bw]=_e[ww]=_e[Sw]=_e[xw]=_e[Cw]=_e[Ow]=_e[Ew]=_e[_w]=!1;function Lw(e){return Zt(e)&&uc(e.length)&&!!_e[tr(e)]}function fc(e){return function(t){return e(t)}}var Vh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oo=Vh&&typeof module=="object"&&module&&!module.nodeType&&module,Bw=Oo&&Oo.exports===Vh,is=Bw&&jh.process,zw=function(){try{var e=Oo&&Oo.require&&Oo.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}}();const Nr=zw;var Yu=Nr&&Nr.isTypedArray,Vw=Yu?fc(Yu):Lw;const pc=Vw;var Fw=Object.prototype,Hw=Fw.hasOwnProperty;function Fh(e,t){var n=Ve(e),r=!n&&$o(e),o=!n&&!r&&Io(e),a=!n&&!r&&!o&&pc(e),i=n||r||o||a,s=i?aw(e.length,String):[],l=s.length;for(var c in e)(t||Hw.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Si(c,l)))&&s.push(c);return s}function Hh(e,t){return function(n){return e(t(n))}}var Uw=Hh(Object.keys,Object);const Ww=Uw;var Gw=Object.prototype,Kw=Gw.hasOwnProperty;function qw(e){if(!dc(e))return Ww(e);var t=[];for(var n in Object(e))Kw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ci(e){return xi(e)?Fh(e):qw(e)}function Yw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Xw=Object.prototype,Jw=Xw.hasOwnProperty;function Qw(e){if(!Ut(e))return Yw(e);var t=dc(e),n=[];for(var r in e)r=="constructor"&&(t||!Jw.call(e,r))||n.push(r);return n}function Zo(e){return xi(e)?Fh(e,!0):Qw(e)}var Zw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eS=/^\w*$/;function hc(e,t){if(Ve(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oc(e)?!0:eS.test(e)||!Zw.test(e)||t!=null&&e in Object(t)}var tS=rr(Object,"create");const Lo=tS;function nS(){this.__data__=Lo?Lo(null):{},this.size=0}function rS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oS="__lodash_hash_undefined__",aS=Object.prototype,iS=aS.hasOwnProperty;function sS(e){var t=this.__data__;if(Lo){var n=t[e];return n===oS?void 0:n}return iS.call(t,e)?t[e]:void 0}var lS=Object.prototype,cS=lS.hasOwnProperty;function uS(e){var t=this.__data__;return Lo?t[e]!==void 0:cS.call(t,e)}var dS="__lodash_hash_undefined__";function fS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===void 0?dS:t,this}function Jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jn.prototype.clear=nS;Jn.prototype.delete=rS;Jn.prototype.get=sS;Jn.prototype.has=uS;Jn.prototype.set=fS;function pS(){this.__data__=[],this.size=0}function Oi(e,t){for(var n=e.length;n--;)if(Qo(e[n][0],t))return n;return-1}var hS=Array.prototype,gS=hS.splice;function vS(e){var t=this.__data__,n=Oi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():gS.call(t,n,1),--this.size,!0}function mS(e){var t=this.__data__,n=Oi(t,e);return n<0?void 0:t[n][1]}function yS(e){return Oi(this.__data__,e)>-1}function bS(e,t){var n=this.__data__,r=Oi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function vn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vn.prototype.clear=pS;vn.prototype.delete=vS;vn.prototype.get=mS;vn.prototype.has=yS;vn.prototype.set=bS;var wS=rr(tn,"Map");const Bo=wS;function SS(){this.size=0,this.__data__={hash:new Jn,map:new(Bo||vn),string:new Jn}}function xS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ei(e,t){var n=e.__data__;return xS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function CS(e){var t=Ei(this,e).delete(e);return this.size-=t?1:0,t}function OS(e){return Ei(this,e).get(e)}function ES(e){return Ei(this,e).has(e)}function _S(e,t){var n=Ei(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=SS;mn.prototype.delete=CS;mn.prototype.get=OS;mn.prototype.has=ES;mn.prototype.set=_S;var RS="Expected a function";function gc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(RS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(gc.Cache||mn),n}gc.Cache=mn;var NS=500;function TS(e){var t=gc(e,function(r){return n.size===NS&&n.clear(),r}),n=t.cache;return t}var PS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kS=/\\(\\)?/g,jS=TS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(PS,function(n,r,o,a){t.push(o?a.replace(kS,"$1"):r||n)}),t});const MS=jS;function AS(e){return e==null?"":Ah(e)}function Wr(e,t){return Ve(e)?e:hc(e,t)?[e]:MS(AS(e))}var DS=1/0;function Gr(e){if(typeof e=="string"||oc(e))return e;var t=e+"";return t=="0"&&1/e==-DS?"-0":t}function _i(e,t){t=Wr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Gr(t[n++])];return n&&n==r?e:void 0}function Uh(e,t,n){var r=e==null?void 0:_i(e,t);return r===void 0?n:r}function vc(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Xu=Pt?Pt.isConcatSpreadable:void 0;function $S(e){return Ve(e)||$o(e)||!!(Xu&&e&&e[Xu])}function mc(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=$S),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?mc(s,t-1,n,r,o):vc(o,s):r||(o[o.length]=s)}return o}function IS(e){var t=e==null?0:e.length;return t?mc(e,1):[]}function LS(e){return $h(Ih(e,void 0,IS),e+"")}var BS=Hh(Object.getPrototypeOf,Object);const yc=BS;var zS="[object Object]",VS=Function.prototype,FS=Object.prototype,Wh=VS.toString,HS=FS.hasOwnProperty,US=Wh.call(Object);function ht(e){if(!Zt(e)||tr(e)!=zS)return!1;var t=yc(e);if(t===null)return!0;var n=HS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wh.call(n)==US}function WS(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function GS(){this.__data__=new vn,this.size=0}function KS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function qS(e){return this.__data__.get(e)}function YS(e){return this.__data__.has(e)}var XS=200;function JS(e,t){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!Bo||r.length<XS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function zt(e){var t=this.__data__=new vn(e);this.size=t.size}zt.prototype.clear=GS;zt.prototype.delete=KS;zt.prototype.get=qS;zt.prototype.has=YS;zt.prototype.set=JS;function QS(e,t){return e&&Ur(t,Ci(t),e)}function ZS(e,t){return e&&Ur(t,Zo(t),e)}var Gh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ju=Gh&&typeof module=="object"&&module&&!module.nodeType&&module,ex=Ju&&Ju.exports===Gh,Qu=ex?tn.Buffer:void 0,Zu=Qu?Qu.allocUnsafe:void 0;function Kh(e,t){if(t)return e.slice();var n=e.length,r=Zu?Zu(n):new e.constructor(n);return e.copy(r),r}function tx(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function qh(){return[]}var nx=Object.prototype,rx=nx.propertyIsEnumerable,ed=Object.getOwnPropertySymbols,ox=ed?function(e){return e==null?[]:(e=Object(e),tx(ed(e),function(t){return rx.call(e,t)}))}:qh;const bc=ox;function ax(e,t){return Ur(e,bc(e),t)}var ix=Object.getOwnPropertySymbols,sx=ix?function(e){for(var t=[];e;)vc(t,bc(e)),e=yc(e);return t}:qh;const Yh=sx;function lx(e,t){return Ur(e,Yh(e),t)}function Xh(e,t,n){var r=t(e);return Ve(e)?r:vc(r,n(e))}function Js(e){return Xh(e,Ci,bc)}function wc(e){return Xh(e,Zo,Yh)}var cx=rr(tn,"DataView");const Qs=cx;var ux=rr(tn,"Promise");const Zs=ux;var dx=rr(tn,"Set");const Er=dx;var td="[object Map]",fx="[object Object]",nd="[object Promise]",rd="[object Set]",od="[object WeakMap]",ad="[object DataView]",px=nr(Qs),hx=nr(Bo),gx=nr(Zs),vx=nr(Er),mx=nr(Xs),Fn=tr;(Qs&&Fn(new Qs(new ArrayBuffer(1)))!=ad||Bo&&Fn(new Bo)!=td||Zs&&Fn(Zs.resolve())!=nd||Er&&Fn(new Er)!=rd||Xs&&Fn(new Xs)!=od)&&(Fn=function(e){var t=tr(e),n=t==fx?e.constructor:void 0,r=n?nr(n):"";if(r)switch(r){case px:return ad;case hx:return td;case gx:return nd;case vx:return rd;case mx:return od}return t});const zo=Fn;var yx=Object.prototype,bx=yx.hasOwnProperty;function wx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&bx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Sx=tn.Uint8Array;const ri=Sx;function Sc(e){var t=new e.constructor(e.byteLength);return new ri(t).set(new ri(e)),t}function xx(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Cx=/\w*$/;function Ox(e){var t=new e.constructor(e.source,Cx.exec(e));return t.lastIndex=e.lastIndex,t}var id=Pt?Pt.prototype:void 0,sd=id?id.valueOf:void 0;function Ex(e){return sd?Object(sd.call(e)):{}}function Jh(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var _x="[object Boolean]",Rx="[object Date]",Nx="[object Map]",Tx="[object Number]",Px="[object RegExp]",kx="[object Set]",jx="[object String]",Mx="[object Symbol]",Ax="[object ArrayBuffer]",Dx="[object DataView]",$x="[object Float32Array]",Ix="[object Float64Array]",Lx="[object Int8Array]",Bx="[object Int16Array]",zx="[object Int32Array]",Vx="[object Uint8Array]",Fx="[object Uint8ClampedArray]",Hx="[object Uint16Array]",Ux="[object Uint32Array]";function Wx(e,t,n){var r=e.constructor;switch(t){case Ax:return Sc(e);case _x:case Rx:return new r(+e);case Dx:return xx(e,n);case $x:case Ix:case Lx:case Bx:case zx:case Vx:case Fx:case Hx:case Ux:return Jh(e,n);case Nx:return new r;case Tx:case jx:return new r(e);case Px:return Ox(e);case kx:return new r;case Mx:return Ex(e)}}function Qh(e){return typeof e.constructor=="function"&&!dc(e)?M1(yc(e)):{}}var Gx="[object Map]";function Kx(e){return Zt(e)&&zo(e)==Gx}var ld=Nr&&Nr.isMap,qx=ld?fc(ld):Kx;const Yx=qx;var Xx="[object Set]";function Jx(e){return Zt(e)&&zo(e)==Xx}var cd=Nr&&Nr.isSet,Qx=cd?fc(cd):Jx;const Zx=Qx;var eC=1,tC=2,nC=4,Zh="[object Arguments]",rC="[object Array]",oC="[object Boolean]",aC="[object Date]",iC="[object Error]",eg="[object Function]",sC="[object GeneratorFunction]",lC="[object Map]",cC="[object Number]",tg="[object Object]",uC="[object RegExp]",dC="[object Set]",fC="[object String]",pC="[object Symbol]",hC="[object WeakMap]",gC="[object ArrayBuffer]",vC="[object DataView]",mC="[object Float32Array]",yC="[object Float64Array]",bC="[object Int8Array]",wC="[object Int16Array]",SC="[object Int32Array]",xC="[object Uint8Array]",CC="[object Uint8ClampedArray]",OC="[object Uint16Array]",EC="[object Uint32Array]",Se={};Se[Zh]=Se[rC]=Se[gC]=Se[vC]=Se[oC]=Se[aC]=Se[mC]=Se[yC]=Se[bC]=Se[wC]=Se[SC]=Se[lC]=Se[cC]=Se[tg]=Se[uC]=Se[dC]=Se[fC]=Se[pC]=Se[xC]=Se[CC]=Se[OC]=Se[EC]=!0;Se[iC]=Se[eg]=Se[hC]=!1;function Eo(e,t,n,r,o,a){var i,s=t&eC,l=t&tC,c=t&nC;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Ut(e))return e;var u=Ve(e);if(u){if(i=wx(e),!s)return Dh(e,i)}else{var d=zo(e),f=d==eg||d==sC;if(Io(e))return Kh(e,s);if(d==tg||d==Zh||f&&!o){if(i=l||f?{}:Qh(e),!s)return l?lx(e,ZS(i,e)):ax(e,QS(i,e))}else{if(!Se[d])return o?e:{};i=Wx(e,d,s)}}a||(a=new zt);var p=a.get(e);if(p)return p;a.set(e,i),Zx(e)?e.forEach(function(b){i.add(Eo(b,t,n,b,e,a))}):Yx(e)&&e.forEach(function(b,y){i.set(y,Eo(b,t,n,y,e,a))});var h=c?l?wc:Js:l?Zo:Ci,m=u?void 0:h(e);return W1(m||e,function(b,y){m&&(y=b,b=e[y]),cc(i,y,Eo(b,t,n,y,e,a))}),i}var _C=1,RC=4;function ng(e){return Eo(e,_C|RC)}var NC="__lodash_hash_undefined__";function TC(e){return this.__data__.set(e,NC),this}function PC(e){return this.__data__.has(e)}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Vo.prototype.add=Vo.prototype.push=TC;Vo.prototype.has=PC;function kC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function rg(e,t){return e.has(t)}var jC=1,MC=2;function og(e,t,n,r,o,a){var i=n&jC,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&MC?new Vo:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var b=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(p){if(!kC(t,function(y,S){if(!rg(p,S)&&(h===y||o(h,y,n,r,a)))return p.push(S)})){f=!1;break}}else if(!(h===m||o(h,m,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function AC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function xc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var DC=1,$C=2,IC="[object Boolean]",LC="[object Date]",BC="[object Error]",zC="[object Map]",VC="[object Number]",FC="[object RegExp]",HC="[object Set]",UC="[object String]",WC="[object Symbol]",GC="[object ArrayBuffer]",KC="[object DataView]",ud=Pt?Pt.prototype:void 0,ss=ud?ud.valueOf:void 0;function qC(e,t,n,r,o,a,i){switch(n){case KC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case GC:return!(e.byteLength!=t.byteLength||!a(new ri(e),new ri(t)));case IC:case LC:case VC:return Qo(+e,+t);case BC:return e.name==t.name&&e.message==t.message;case FC:case UC:return e==t+"";case zC:var s=AC;case HC:var l=r&DC;if(s||(s=xc),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=$C,i.set(e,t);var u=og(s(e),s(t),r,o,a,i);return i.delete(e),u;case WC:if(ss)return ss.call(e)==ss.call(t)}return!1}var YC=1,XC=Object.prototype,JC=XC.hasOwnProperty;function QC(e,t,n,r,o,a){var i=n&YC,s=Js(e),l=s.length,c=Js(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:JC.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=i;++d<l;){f=s[d];var y=e[f],S=t[f];if(r)var E=i?r(S,y,f,t,e,a):r(y,S,f,e,t,a);if(!(E===void 0?y===S||o(y,S,n,r,a):E)){m=!1;break}b||(b=f=="constructor")}if(m&&!b){var x=e.constructor,v=t.constructor;x!=v&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof v=="function"&&v instanceof v)&&(m=!1)}return a.delete(e),a.delete(t),m}var ZC=1,dd="[object Arguments]",fd="[object Array]",_a="[object Object]",eO=Object.prototype,pd=eO.hasOwnProperty;function tO(e,t,n,r,o,a){var i=Ve(e),s=Ve(t),l=i?fd:zo(e),c=s?fd:zo(t);l=l==dd?_a:l,c=c==dd?_a:c;var u=l==_a,d=c==_a,f=l==c;if(f&&Io(e)){if(!Io(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new zt),i||pc(e)?og(e,t,n,r,o,a):qC(e,t,l,n,r,o,a);if(!(n&ZC)){var p=u&&pd.call(e,"__wrapped__"),h=d&&pd.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,b=h?t.value():t;return a||(a=new zt),o(m,b,n,r,a)}}return f?(a||(a=new zt),QC(e,t,n,r,o,a)):!1}function Cc(e,t,n,r,o){return e===t?!0:e==null||t==null||!Zt(e)&&!Zt(t)?e!==e&&t!==t:tO(e,t,n,r,Cc,o)}var nO=1,rO=2;function oO(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new zt;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?Cc(u,c,nO|rO,r,d):f))return!1}}return!0}function ag(e){return e===e&&!Ut(e)}function aO(e){for(var t=Ci(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ag(o)]}return t}function ig(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function iO(e){var t=aO(e);return t.length==1&&t[0][2]?ig(t[0][0],t[0][1]):function(n){return n===e||oO(n,e,t)}}function sO(e,t){return e!=null&&t in Object(e)}function lO(e,t,n){t=Wr(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=Gr(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&uc(o)&&Si(i,o)&&(Ve(e)||$o(e)))}function cO(e,t){return e!=null&&lO(e,t,sO)}var uO=1,dO=2;function fO(e,t){return hc(e)&&ag(t)?ig(Gr(e),t):function(n){var r=Uh(n,e);return r===void 0&&r===t?cO(n,e):Cc(t,r,uO|dO)}}function pO(e){return function(t){return t==null?void 0:t[e]}}function hO(e){return function(t){return _i(t,e)}}function gO(e){return hc(e)?pO(Gr(e)):hO(e)}function Oc(e){return typeof e=="function"?e:e==null?ic:typeof e=="object"?Ve(e)?fO(e[0],e[1]):iO(e):gO(e)}function vO(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var mO=vO();const yO=mO;function el(e,t,n){(n!==void 0&&!Qo(e[t],n)||n===void 0&&!(t in e))&&lc(e,t,n)}function tl(e){return Zt(e)&&xi(e)}function nl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function bO(e){return Ur(e,Zo(e))}function wO(e,t,n,r,o,a,i){var s=nl(e,n),l=nl(t,n),c=i.get(l);if(c){el(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Ve(l),p=!f&&Io(l),h=!f&&!p&&pc(l);u=l,f||p||h?Ve(s)?u=s:tl(s)?u=Dh(s):p?(d=!1,u=Kh(l,!0)):h?(d=!1,u=Jh(l,!0)):u=[]:ht(l)||$o(l)?(u=s,$o(s)?u=bO(s):(!Ut(s)||sc(s))&&(u=Qh(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),el(e,n,u)}function sg(e,t,n,r,o){e!==t&&yO(t,function(a,i){if(o||(o=new zt),Ut(a))wO(e,t,i,n,sg,r,o);else{var s=r?r(nl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),el(e,i,s)}},Zo)}function SO(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function lg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function xO(e,t){return t.length<2?e:_i(e,WS(t,0,-1))}var CO=rw(function(e,t,n){sg(e,t,n)});const cg=CO;var OO="Expected a function";function EO(e){if(typeof e!="function")throw new TypeError(OO);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function _O(e,t){return t=Wr(t,e),e=xO(e,t),e==null||delete e[Gr(lg(t))]}function RO(e){return ht(e)?void 0:e}var NO=1,TO=2,PO=4,kO=LS(function(e,t){var n={};if(e==null)return n;var r=!1;t=ac(t,function(a){return a=Wr(a,e),r||(r=a.length>1),a}),Ur(e,wc(e),n),r&&(n=Eo(n,NO|TO|PO,RO));for(var o=t.length;o--;)_O(n,t[o]);return n});const ug=kO;function jO(e,t,n,r){if(!Ut(e))return e;t=Wr(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=Gr(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Ut(u)?u:Si(t[o+1])?[]:{})}cc(s,l,c),s=s[l]}return e}function MO(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=_i(e,i);n(s,i)&&jO(a,Wr(i,e),s)}return a}function AO(e,t){if(e==null)return{};var n=ac(wc(e),function(r){return[r]});return t=Oc(t),MO(e,n,function(r,o){return t(r,o[0])})}function DO(e,t){return AO(e,EO(Oc(t)))}var $O=1/0,IO=Er&&1/xc(new Er([,-0]))[1]==$O?function(e){return new Er(e)}:D1;const LO=IO;var BO=200;function zO(e,t,n){var r=-1,o=X1,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=SO;else if(a>=BO){var c=t?null:LO(e);if(c)return xc(c);i=!1,o=rg,l=new Vo}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var VO=Lh(function(e){var t=lg(e);return tl(t)&&(t=void 0),zO(mc(e,1,tl,!0),Oc(t))});const FO=VO;class dg extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function HO(e){return Vt(e)&&typeof e[Symbol.iterator]=="function"}function Vt(e){return typeof e=="object"&&e!=null}function xt(e){return typeof e=="string"?JSON.stringify(e):""+e}function UO(e){const{done:t,value:n}=e.next();return t?void 0:n}function WO(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+xt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*hd(e,t,n,r){HO(e)||(e=[e]);for(const o of e){const a=WO(o,t,n,r);a&&(yield a)}}function*Ec(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Vt(t.schema)&&Vt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Ec(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Vt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class nn{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return hd(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return hd(u,c,this,l)}:this.refiner=()=>[]}assert(t){return fg(t,this)}create(t){return GO(t,this)}is(t){return qO(t,this)}mask(t){return KO(t,this)}validate(t,n){return n===void 0&&(n={}),Kr(t,this,n)}}function fg(e,t){const n=Kr(e,t);if(n[0])throw n[0]}function GO(e,t){const n=Kr(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function KO(e,t){const n=Kr(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function qO(e,t){return!Kr(e,t)[0]}function Kr(e,t,n){n===void 0&&(n={});const r=Ec(e,t,n),o=UO(r);return o[0]?[new dg(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function _c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?vg(a):ve(a)}function An(e,t){return new nn({type:e,schema:null,validator:t})}function Tr(e){return new nn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function pg(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return vg(r);default:return ve(r)}}function ze(){return An("any",()=>!0)}function Ie(e){return new nn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+xt(t)}})}function Pr(){return An("boolean",e=>typeof e=="boolean")}function rl(e){const t={},n=e.map(r=>xt(r)).join();for(const r of e)t[r]=r;return new nn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+xt(r)}})}function hg(){return An("func",e=>typeof e=="function"||"Expected a function, but received: "+xt(e))}function ft(e){const t=xt(e),n=typeof e;return new nn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+xt(r)}})}function YO(){return An("never",()=>!1)}function gg(){return An("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+xt(e))}function ve(e){const t=e?Object.keys(e):[],n=YO();return new nn({type:"object",schema:e||null,*entries(r){if(e&&Vt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Vt(r)||"Expected an object, but received: "+xt(r)},coercer(r){return Vt(r)?{...r}:r}})}function K(e){return new nn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function _o(e,t){return new nn({type:"record",schema:null,*entries(n){if(Vt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function U(){return An("string",e=>typeof e=="string"||"Expected a string, but received: "+xt(e))}function vg(e){const t=Object.keys(e);return new nn({type:"type",schema:e,*entries(n){if(Vt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function pt(e){const t=e.map(n=>n.type).join(" | ");return new nn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||XO()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Ec(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+xt(n),...o]}})}function XO(){return An("unknown",()=>!0)}const Rc=ve({package:U(),version:U(),name:U(),exportName:K(U()),destructuring:K(Pr()),subName:K(U()),main:K(U()),cssPaths:K(Ie(U()))}),JO=Ie(Rc),QO=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var Tt=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Tt||{}),Nc=(e=>(e.DESIGN="design",e.SAVE="save",e))(Nc||{}),ol=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(ol||{});const ZO=()=>An("normalObj",e=>!ht(e)||[Tt.SLOT,Tt.EXPRESSION,Tt.FUNCTION].includes(e==null?void 0:e.type)?!1:(Kr(e,_o(U(),Tc)),!0)),Tc=pt([U(),gg(),Pr(),ve({type:ft(Tt.SLOT),renderType:rl([ol.FUNC,ol.COMP]),params:K(Ie(U())),value:Tr(()=>pt([kr,Ie(kr)]))}),ve({type:ft(Tt.EXPRESSION),value:U()}),ve({type:ft(Tt.FUNCTION),value:U()}),ZO(),Ie(Tr(()=>Tc))]),gd=ve({type:ft(Tt.EXPRESSION),value:U()}),kr=ve({id:K(U()),title:K(U()),componentName:U(),props:K(_o(U(),Tc)),nodeName:K(U()),state:K(_o(U(),ze())),children:Tr(()=>K(Ie(pt([U(),kr])))),configure:K(ze()),css:K(ze()),style:K(ze()),classNames:K(Ie(ze())),refId:K(U()),extra:K(_o(ze(),ze())),condition:K(pt([Pr(),gd])),loop:K(ve({open:Pr(),data:pt([Ie(ze()),gd]),args:K(Ie(U())),forName:K(U()),forIndex:K(U()),key:K(ze()),name:K(U())})),methods:K(Ie(ze()))}),oi=pt([U(),ve({label:U(),tip:K(U())})]),eE=ve({type:ft("shape"),value:Ie(ve({name:U(),title:oi,valueType:Tr(()=>Ri)}))}),tE=ve({type:ft("enums"),value:Ie(U())});ve({type:ft("array"),value:Tr(()=>Ri)});const nE=ve({type:ft("array"),value:Tr(()=>Ie(Ri))}),Ri=pt([rl(["array","boolean","number","object","string"]),rl(["component","expression","function"]),eE,tE,nE]),rE=pt([U(),ve({componentName:U(),props:K(ze()),initialValue:K(ze()),component:K(ze())})]),ls=ve({name:U(),title:oi,valueType:Ri,description:K(U()),defaultValue:ze(),setters:K(Ie(rE)),condition:K(hg())});pt([U(),hg()]);var al=(e=>(e.SINGLE="single",e.GROUP="group",e))(al||{});pt([U(),ve({name:U(),describe:K(U()),params:K(ve({name:U(),description:U()})),template:U()})]);const oE=ve({id:K(U()),title:U(),snapshot:pt([U(),ze()]),snapshotText:K(U()),description:K(U()),tags:K(Ie(U())),groupName:K(U()),category:K(U()),schema:_c(pg(kr,["id"]),ve({componentName:K(U())}))}),aE=ve({componentName:U(),title:U(),screenshot:K(U()),icon:K(U()),tags:K(Ie(U())),groupName:K(U()),category:K(U()),priority:K(gg()),npm:K(Rc),snippets:Ie(oE),props:Ie(pt([ls,ve({title:K(oi),type:ft("single"),content:ls}),ve({title:K(oi),type:ft("group"),content:Ie(ls)})])),fixedProps:K(ze()),isContainer:K(pt([Pr(),ve({placeholder:U(),width:U(),height:U()})])),disableEditorDragDom:K(ze()),isLayout:K(Pr()),rootSelector:K(U()),advanceCustom:K(ze()),extra:K(_o(ze(),ze()))}),iE=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
87
87
  originData: ${JSON.stringify(t)}`):new Error(`${JSON.stringify(t)}
88
88
  data struct format is invalidate`);return o.message||n?console.warn(`${o.message||n}
89
89
  originData: ${JSON.stringify(t)}`):console.warn(`${JSON.stringify(t)}
90
- data struct format is invalidate`),o},Mc=e=>{const{data:t,message:n,throwError:r,dataStruct:o}=e;return i_(({data:a})=>{try{return vg(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof gg&&(s=i.failures().map(l=>`【${l.path.join(".")}】: ${l.message}
91
- `)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var oo=(e=>(e.ROOT_CONTAINER="RootContainer",e))(oo||{});const s_=Se({type:bt($t.FUNCTION),value:K()}),l_=Tc(mg(Vr,["componentName"]),Se({componentName:bt("RootContainer")}));function c_(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ha=c_(),u_=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new ir([]);return t&&(o=t.materialsMode||new ir([])),r&&(Ke(r)?n.value=r.map(a=>new Le(a,{parent:t,materials:o})):St(r)&&n.value.push(new Le(r,{parent:t,materials:o}))),n};class Hr{constructor(t,n){ce(this,"nodeType","SLOT"),ce(this,"rawData"),ce(this,"parent"),ce(this,"emitter",ha),ce(this,"data"),ce(this,"id"),ce(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new ir([]);this.materialsMode=r,this.id=Rn(),this.data=u_(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof Le)return o.export(t);if(St(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return Ke(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}}const Sg=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===sl.SINGLE?t.push(r.content):r.type===sl.GROUP&&(t=[...t,...Sg(r.content)]):t.push(n)}),t},ll=(e,t,n)=>{if(e.type)return e.type===$t.SLOT?new Hr(e,{parent:t,materials:n}):e;if(St(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=cl(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>ll(r,t,n)):e},cl=(e,t,n)=>St(e)?ll(e,t,n):Ke(e)?e.map(r=>ll(r,t,n)):e;class Ln{constructor(t,n,r){ce(this,"nodeType","PROP"),ce(this,"rawData"),ce(this,"parent"),ce(this,"emitter",ha),ce(this,"data"),ce(this,"name"),ce(this,"materialsMode");const o=(r==null?void 0:r.materials)||new ir([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=cl(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=cl(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof Hr)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof Le){const n=t.material;return Sg((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof Ln||o instanceof Hr||o instanceof Le)return o.export(t);if(Ke(o))return o.map(a=>r(a));if(St(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}}const d_=e=>{if(typeof e=="string")return!0;Mc({data:e,dataStruct:Vr,throwError:!1})},yd=(e,t,n=new ir([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??Rn(),children:[],props:{},methods:e.methods||[],configure:pg(e.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(e.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=e.props)==null?void 0:i[a];if(s instanceof Ln){r.props[a]=s;return}r.props[a]=new Ln(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof Le)return a;if(St(a)){const i=a;return new Le(i,{parent:t,materials:n})}else return a}):(e.children instanceof Le&&(r.children=[e.children]),r.children=[new Le(e.children,{parent:t,materials:n})])),r};class Le{constructor(t,n){ce(this,"nodeType","NODE"),ce(this,"rawData"),ce(this,"data"),ce(this,"emitter",ha),ce(this,"parent"),ce(this,"materialsModel"),ce(this,"listenerHandle"),ce(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),d_(t);const r=(n==null?void 0:n.materials)||new ir([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=yd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||Rn()};return new Le(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=yd(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return Dc(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof Le?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const d=qh(s,u,!1);d&&(l[u]=d)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=Ac(c),c}}const bd=(e,t,n)=>{const r={...e,id:Rn(),props:{},componentName:oo.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:pg(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];Ke(e.children)?o=e.children.map(i=>i instanceof Le?i:St(i)?new Le(i,{parent:t,materials:n}):i):e.children instanceof Le?o.push(e.children):e.children&&St(e.children)&&o.push(new Le(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Ln?r.props[i]=l:r.props[i]=new Ln(i,l||"",{parent:t,materials:n})}),r.children=o,r};class na{constructor(t,{parent:n,materials:r}){ce(this,"rawData"),ce(this,"data"),ce(this,"nodeType",oo.ROOT_CONTAINER),ce(this,"emitter",ha),ce(this,"materialsModel"),ce(this,"listenerHandle"),ce(this,"onChangeCbQueue"),ce(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=bd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=bd(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return Dc(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=kc.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=hg(i,["id"]);return s=Ac(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||Rn()};return new na(n,{materials:this.materialsModel,parent:null})}}const Yn=e=>(e==null?void 0:e.type)===$t.EXPRESSION,f_=e=>(e==null?void 0:e.type)===$t.FUNCTION,Rn=()=>Math.random().toString(32).slice(3,9),p_=e=>(e==null?void 0:e.nodeType)==="NODE",ds=e=>(e==null?void 0:e.nodeType)==="PROP",h_=e=>(e==null?void 0:e.nodeType)==="SLOT",Ac=e=>DO(e,t=>St(t)?!Object.keys(t).length:Ke(t)?!t.length:!t);function g_(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof Le){n.push(s);return}if(s instanceof Hr&&a(s.value.value),s instanceof Ln){a(s.value);return}if(St(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(Ke(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof Le))||[];n.push(...i)}}function Dc(e,t){return g_(e,n=>n.id===t)}const v_=e=>{const t=ig(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${Rn()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class m_{constructor(t){ce(this,"rawData"),ce(this,"data"),this.rawData=t,this.data=v_(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(n=>n.id===t)}}const y_=e=>{if(!Ke(e))throw new Error("Materials must be a array");return e.map(t=>new m_(t))},b_=e=>{e==null||e.forEach(t=>{Mc({data:t,dataStruct:a_,throwError:!1})})};class ir{constructor(t){ce(this,"rawData"),ce(this,"data"),ce(this,"usedMaterials",[]),this.rawData=t,b_(t),this.data=y_(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(d=>{const f=d.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(d)});const c=[];i.forEach(d=>{s[d].length&&c.push({name:d,list:s[d]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const w_=Se({version:K(),name:K(),css:X(K()),renderType:X(wt([bt("COMPONENT"),bt("PAGE")])),methods:X(Ve(s_)),componentsMeta:Ve(Tc(Se({componentName:K()}),Pc)),thirdLibs:X(JO),componentsTree:l_,assets:X(Ve(Ge()))}),xg=e=>(Mc({data:e,dataStruct:w_,throwError:!1}),e),fs=(e,t,n)=>({...e,componentsTree:new na(e.componentsTree,{parent:t,materials:n})});class fi{constructor(t,n){ce(this,"nodeType","PAGE"),ce(this,"rawData"),ce(this,"emitter",ha),ce(this,"data"),ce(this,"parent"),ce(this,"materialsModel"),ce(this,"assetPackagesList"),xg(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new ir((n==null?void 0:n.materials)||[]),this.data=fs(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=fs(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=fs(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return Dc(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof na)return console.warn("Not found parent node"),!1;if(a instanceof Ln)return console.warn("CProp can not add node"),!1;if(a instanceof Hr){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof fi)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="BEFORE"?a==null||a.value.children.splice(i,0,t):a==null||a.value.children.splice(i+1,0,t),t.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(St(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new Le(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=Rn();const r=new Le(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof Le?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof Le&&a instanceof Le?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof Hr){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof Le||r instanceof na){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=kc.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var d;return u.package===((d=l.value.npm)==null?void 0:d.package)});return c&&a.push(c),{componentName:l.componentName,...ig(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Ac(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=VO(a,l=>l.package),s=hg(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}oo.ROOT_CONTAINER;var S_=typeof global=="object"&&global&&global.Object===Object&&global;const Cg=S_;var x_=typeof self=="object"&&self&&self.Object===Object&&self,C_=Cg||x_||Function("return this")();const ao=C_;var O_=ao.Symbol;const Ur=O_;var Og=Object.prototype,__=Og.hasOwnProperty,E_=Og.toString,No=Ur?Ur.toStringTag:void 0;function R_(e){var t=__.call(e,No),n=e[No];try{e[No]=void 0;var r=!0}catch{}var o=E_.call(e);return r&&(t?e[No]=n:delete e[No]),o}var N_=Object.prototype,T_=N_.toString;function P_(e){return T_.call(e)}var k_="[object Null]",j_="[object Undefined]",wd=Ur?Ur.toStringTag:void 0;function ga(e){return e==null?e===void 0?j_:k_:wd&&wd in Object(e)?R_(e):P_(e)}function io(e){return e!=null&&typeof e=="object"}var M_="[object Symbol]";function A_(e){return typeof e=="symbol"||io(e)&&ga(e)==M_}function D_(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $_=Array.isArray;const Wr=$_;var I_=1/0,Sd=Ur?Ur.prototype:void 0,xd=Sd?Sd.toString:void 0;function _g(e){if(typeof e=="string")return e;if(Wr(e))return D_(e,_g)+"";if(A_(e))return xd?xd.call(e):"";var t=e+"";return t=="0"&&1/e==-I_?"-0":t}function fr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Eg(e){return e}var L_="[object AsyncFunction]",B_="[object Function]",z_="[object GeneratorFunction]",F_="[object Proxy]";function $c(e){if(!fr(e))return!1;var t=ga(e);return t==B_||t==z_||t==L_||t==F_}var V_=ao["__core-js_shared__"];const ps=V_;var Cd=function(){var e=/[^.]+$/.exec(ps&&ps.keys&&ps.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function H_(e){return!!Cd&&Cd in e}var U_=Function.prototype,W_=U_.toString;function G_(e){if(e!=null){try{return W_.call(e)}catch{}try{return e+""}catch{}}return""}var K_=/[\\^$.*+?()[\]{}|]/g,q_=/^\[object .+?Constructor\]$/,Y_=Function.prototype,X_=Object.prototype,J_=Y_.toString,Q_=X_.hasOwnProperty,Z_=RegExp("^"+J_.call(Q_).replace(K_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eE(e){if(!fr(e)||H_(e))return!1;var t=$c(e)?Z_:q_;return t.test(G_(e))}function tE(e,t){return e==null?void 0:e[t]}function Ic(e,t){var n=tE(e,t);return eE(n)?n:void 0}var Od=Object.create,nE=function(){function e(){}return function(t){if(!fr(t))return{};if(Od)return Od(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const rE=nE;function oE(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function aE(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var iE=800,sE=16,lE=Date.now;function cE(e){var t=0,n=0;return function(){var r=lE(),o=sE-(r-n);if(n=r,o>0){if(++t>=iE)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function uE(e){return function(){return e}}var dE=function(){try{var e=Ic(Object,"defineProperty");return e({},"",{}),e}catch{}}();const pi=dE;var fE=pi?function(e,t){return pi(e,"toString",{configurable:!0,enumerable:!1,value:uE(t),writable:!0})}:Eg;const pE=fE;var hE=cE(pE);const gE=hE;var vE=9007199254740991,mE=/^(?:0|[1-9]\d*)$/;function Rg(e,t){var n=typeof e;return t=t??vE,!!t&&(n=="number"||n!="symbol"&&mE.test(e))&&e>-1&&e%1==0&&e<t}function Lc(e,t,n){t=="__proto__"&&pi?pi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Di(e,t){return e===t||e!==e&&t!==t}var yE=Object.prototype,bE=yE.hasOwnProperty;function wE(e,t,n){var r=e[t];(!(bE.call(e,t)&&Di(r,n))||n===void 0&&!(t in e))&&Lc(e,t,n)}function SE(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Lc(n,s,l):wE(n,s,l)}return n}var _d=Math.max;function xE(e,t,n){return t=_d(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=_d(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),oE(e,this,s)}}function CE(e,t){return gE(xE(e,t,Eg),e+"")}var OE=9007199254740991;function Ng(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=OE}function Bc(e){return e!=null&&Ng(e.length)&&!$c(e)}function _E(e,t,n){if(!fr(n))return!1;var r=typeof t;return(r=="number"?Bc(n)&&Rg(t,n.length):r=="string"&&t in n)?Di(n[t],e):!1}function EE(e){return CE(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&_E(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var RE=Object.prototype;function Tg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||RE;return e===n}function NE(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var TE="[object Arguments]";function Ed(e){return io(e)&&ga(e)==TE}var Pg=Object.prototype,PE=Pg.hasOwnProperty,kE=Pg.propertyIsEnumerable,jE=Ed(function(){return arguments}())?Ed:function(e){return io(e)&&PE.call(e,"callee")&&!kE.call(e,"callee")};const ul=jE;function ME(){return!1}var kg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rd=kg&&typeof module=="object"&&module&&!module.nodeType&&module,AE=Rd&&Rd.exports===kg,Nd=AE?ao.Buffer:void 0,DE=Nd?Nd.isBuffer:void 0,$E=DE||ME;const jg=$E;var IE="[object Arguments]",LE="[object Array]",BE="[object Boolean]",zE="[object Date]",FE="[object Error]",VE="[object Function]",HE="[object Map]",UE="[object Number]",WE="[object Object]",GE="[object RegExp]",KE="[object Set]",qE="[object String]",YE="[object WeakMap]",XE="[object ArrayBuffer]",JE="[object DataView]",QE="[object Float32Array]",ZE="[object Float64Array]",eR="[object Int8Array]",tR="[object Int16Array]",nR="[object Int32Array]",rR="[object Uint8Array]",oR="[object Uint8ClampedArray]",aR="[object Uint16Array]",iR="[object Uint32Array]",Me={};Me[QE]=Me[ZE]=Me[eR]=Me[tR]=Me[nR]=Me[rR]=Me[oR]=Me[aR]=Me[iR]=!0;Me[IE]=Me[LE]=Me[XE]=Me[BE]=Me[JE]=Me[zE]=Me[FE]=Me[VE]=Me[HE]=Me[UE]=Me[WE]=Me[GE]=Me[KE]=Me[qE]=Me[YE]=!1;function sR(e){return io(e)&&Ng(e.length)&&!!Me[ga(e)]}function lR(e){return function(t){return e(t)}}var Mg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fo=Mg&&typeof module=="object"&&module&&!module.nodeType&&module,cR=Fo&&Fo.exports===Mg,hs=cR&&Cg.process,uR=function(){try{var e=Fo&&Fo.require&&Fo.require("util").types;return e||hs&&hs.binding&&hs.binding("util")}catch{}}();const Td=uR;var Pd=Td&&Td.isTypedArray,dR=Pd?lR(Pd):sR;const Ag=dR;var fR=Object.prototype,pR=fR.hasOwnProperty;function hR(e,t){var n=Wr(e),r=!n&&ul(e),o=!n&&!r&&jg(e),a=!n&&!r&&!o&&Ag(e),i=n||r||o||a,s=i?NE(e.length,String):[],l=s.length;for(var c in e)(t||pR.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Rg(c,l)))&&s.push(c);return s}function gR(e,t){return function(n){return e(t(n))}}function vR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mR=Object.prototype,yR=mR.hasOwnProperty;function bR(e){if(!fr(e))return vR(e);var t=Tg(e),n=[];for(var r in e)r=="constructor"&&(t||!yR.call(e,r))||n.push(r);return n}function Dg(e){return Bc(e)?hR(e,!0):bR(e)}var wR=Ic(Object,"create");const ra=wR;function SR(){this.__data__=ra?ra(null):{},this.size=0}function xR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CR="__lodash_hash_undefined__",OR=Object.prototype,_R=OR.hasOwnProperty;function ER(e){var t=this.__data__;if(ra){var n=t[e];return n===CR?void 0:n}return _R.call(t,e)?t[e]:void 0}var RR=Object.prototype,NR=RR.hasOwnProperty;function TR(e){var t=this.__data__;return ra?t[e]!==void 0:NR.call(t,e)}var PR="__lodash_hash_undefined__";function kR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ra&&t===void 0?PR:t,this}function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=SR;sr.prototype.delete=xR;sr.prototype.get=ER;sr.prototype.has=TR;sr.prototype.set=kR;function jR(){this.__data__=[],this.size=0}function $i(e,t){for(var n=e.length;n--;)if(Di(e[n][0],t))return n;return-1}var MR=Array.prototype,AR=MR.splice;function DR(e){var t=this.__data__,n=$i(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():AR.call(t,n,1),--this.size,!0}function $R(e){var t=this.__data__,n=$i(t,e);return n<0?void 0:t[n][1]}function IR(e){return $i(this.__data__,e)>-1}function LR(e,t){var n=this.__data__,r=$i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nn.prototype.clear=jR;Nn.prototype.delete=DR;Nn.prototype.get=$R;Nn.prototype.has=IR;Nn.prototype.set=LR;var BR=Ic(ao,"Map");const $g=BR;function zR(){this.size=0,this.__data__={hash:new sr,map:new($g||Nn),string:new sr}}function FR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ii(e,t){var n=e.__data__;return FR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function VR(e){var t=Ii(this,e).delete(e);return this.size-=t?1:0,t}function HR(e){return Ii(this,e).get(e)}function UR(e){return Ii(this,e).has(e)}function WR(e,t){var n=Ii(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function so(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}so.prototype.clear=zR;so.prototype.delete=VR;so.prototype.get=HR;so.prototype.has=UR;so.prototype.set=WR;function Ig(e){return e==null?"":_g(e)}var GR=gR(Object.getPrototypeOf,Object);const Lg=GR;var KR="[object Object]",qR=Function.prototype,YR=Object.prototype,Bg=qR.toString,XR=YR.hasOwnProperty,JR=Bg.call(Object);function Gr(e){if(!io(e)||ga(e)!=KR)return!1;var t=Lg(e);if(t===null)return!0;var n=XR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Bg.call(n)==JR}function QR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function ZR(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:QR(e,t,n)}var eN="\\ud800-\\udfff",tN="\\u0300-\\u036f",nN="\\ufe20-\\ufe2f",rN="\\u20d0-\\u20ff",oN=tN+nN+rN,aN="\\ufe0e\\ufe0f",iN="\\u200d",sN=RegExp("["+iN+eN+oN+aN+"]");function zg(e){return sN.test(e)}function lN(e){return e.split("")}var Fg="\\ud800-\\udfff",cN="\\u0300-\\u036f",uN="\\ufe20-\\ufe2f",dN="\\u20d0-\\u20ff",fN=cN+uN+dN,pN="\\ufe0e\\ufe0f",hN="["+Fg+"]",dl="["+fN+"]",fl="\\ud83c[\\udffb-\\udfff]",gN="(?:"+dl+"|"+fl+")",Vg="[^"+Fg+"]",Hg="(?:\\ud83c[\\udde6-\\uddff]){2}",Ug="[\\ud800-\\udbff][\\udc00-\\udfff]",vN="\\u200d",Wg=gN+"?",Gg="["+pN+"]?",mN="(?:"+vN+"(?:"+[Vg,Hg,Ug].join("|")+")"+Gg+Wg+")*",yN=Gg+Wg+mN,bN="(?:"+[Vg+dl+"?",dl,Hg,Ug,hN].join("|")+")",wN=RegExp(fl+"(?="+fl+")|"+bN+yN,"g");function SN(e){return e.match(wN)||[]}function xN(e){return zg(e)?SN(e):lN(e)}function CN(e){return function(t){t=Ig(t);var n=zg(t)?xN(t):void 0,r=n?n[0]:t.charAt(0),o=n?ZR(n,1).join(""):t.slice(1);return r[e]()+o}}var ON=CN("toUpperCase");const _N=ON;function EN(e){return _N(Ig(e).toLowerCase())}function RN(){this.__data__=new Nn,this.size=0}function NN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function TN(e){return this.__data__.get(e)}function PN(e){return this.__data__.has(e)}var kN=200;function jN(e,t){var n=this.__data__;if(n instanceof Nn){var r=n.__data__;if(!$g||r.length<kN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new so(r)}return n.set(e,t),this.size=n.size,this}function lo(e){var t=this.__data__=new Nn(e);this.size=t.size}lo.prototype.clear=RN;lo.prototype.delete=NN;lo.prototype.get=TN;lo.prototype.has=PN;lo.prototype.set=jN;var Kg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kd=Kg&&typeof module=="object"&&module&&!module.nodeType&&module,MN=kd&&kd.exports===Kg,jd=MN?ao.Buffer:void 0,Md=jd?jd.allocUnsafe:void 0;function AN(e,t){if(t)return e.slice();var n=e.length,r=Md?Md(n):new e.constructor(n);return e.copy(r),r}var DN=ao.Uint8Array;const Ad=DN;function $N(e){var t=new e.constructor(e.byteLength);return new Ad(t).set(new Ad(e)),t}function IN(e,t){var n=t?$N(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function LN(e){return typeof e.constructor=="function"&&!Tg(e)?rE(Lg(e)):{}}function BN(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var zN=BN();const FN=zN;function pl(e,t,n){(n!==void 0&&!Di(e[t],n)||n===void 0&&!(t in e))&&Lc(e,t,n)}function VN(e){return io(e)&&Bc(e)}function hl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function HN(e){return SE(e,Dg(e))}function UN(e,t,n,r,o,a,i){var s=hl(e,n),l=hl(t,n),c=i.get(l);if(c){pl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Wr(l),p=!f&&jg(l),g=!f&&!p&&Ag(l);u=l,f||p||g?Wr(s)?u=s:VN(s)?u=aE(s):p?(d=!1,u=AN(l,!0)):g?(d=!1,u=IN(l,!0)):u=[]:Gr(l)||ul(l)?(u=s,ul(s)?u=HN(s):(!fr(s)||$c(s))&&(u=LN(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),pl(e,n,u)}function qg(e,t,n,r,o){e!==t&&FN(t,function(a,i){if(o||(o=new lo),fr(a))UN(e,t,i,n,qg,r,o);else{var s=r?r(hl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),pl(e,i,s)}},Dg)}var WN=EE(function(e,t,n){qg(e,t,n)});const GN=WN;function KN(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function qN(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function YN(e){class t extends v.Component{render(){return v.createElement(e,this.props)}}return t.displayName=e.displayName,t}const Cr=(e,t)=>{const n=r=>{const o=`
90
+ data struct format is invalidate`),o},Pc=e=>{const{data:t,message:n,throwError:r,dataStruct:o}=e;return iE(({data:a})=>{try{return fg(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof dg&&(s=i.failures().map(l=>`【${l.path.join(".")}】: ${l.message}
91
+ `)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var qr=(e=>(e.ROOT_CONTAINER="RootContainer",e))(qr||{});const sE=ve({type:ft(Tt.FUNCTION),value:U()}),lE=_c(pg(kr,["componentName"]),ve({componentName:ft("RootContainer")}));function cE(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ea=cE(),uE=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new Qn([]);return t&&(o=t.materialsMode||new Qn([])),r&&(Ve(r)?n.value=r.map(a=>new je(a,{parent:t,materials:o})):ht(r)&&n.value.push(new je(r,{parent:t,materials:o}))),n};class jr{constructor(t,n){oe(this,"nodeType","SLOT"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"id"),oe(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new Qn([]);this.materialsMode=r,this.id=yn(),this.data=uE(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof je)return o.export(t);if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return Ve(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}}const mg=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===al.SINGLE?t.push(r.content):r.type===al.GROUP&&(t=[...t,...mg(r.content)]):t.push(n)}),t},il=(e,t,n)=>{if(e.type)return e.type===Tt.SLOT?new jr(e,{parent:t,materials:n}):e;if(ht(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=sl(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>il(r,t,n)):e},sl=(e,t,n)=>ht(e)?il(e,t,n):Ve(e)?e.map(r=>il(r,t,n)):e;let Mr=class yg{constructor(t,n,r){oe(this,"nodeType","PROP"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"name"),oe(this,"materialsMode");const o=(r==null?void 0:r.materials)||new Qn([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=sl(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=sl(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof jr)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof je){const n=t.material;return mg((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof yg||o instanceof jr||o instanceof je)return o.export(t);if(Ve(o))return o.map(a=>r(a));if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}};const dE=e=>{if(typeof e=="string")return!0;Pc({data:e,dataStruct:kr,throwError:!1})},vd=(e,t,n=new Qn([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??yn(),children:[],props:{},methods:e.methods||[],configure:cg(e.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(e.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=e.props)==null?void 0:i[a];if(s instanceof Mr){r.props[a]=s;return}r.props[a]=new Mr(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof je)return a;if(ht(a)){const i=a;return new je(i,{parent:t,materials:n})}else return a}):(e.children instanceof je&&(r.children=[e.children]),r.children=[new je(e.children,{parent:t,materials:n})])),r};class je{constructor(t,n){oe(this,"nodeType","NODE"),oe(this,"rawData"),oe(this,"data"),oe(this,"emitter",ea),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),dE(t);const r=(n==null?void 0:n.materials)||new Qn([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=vd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||yn()};return new je(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=vd(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return jc(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof je?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const d=Uh(s,u,!1);d&&(l[u]=d)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=kc(c),c}}const md=(e,t,n)=>{const r={...e,id:yn(),props:{},componentName:qr.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:cg(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];Ve(e.children)?o=e.children.map(i=>i instanceof je?i:ht(i)?new je(i,{parent:t,materials:n}):i):e.children instanceof je?o.push(e.children):e.children&&ht(e.children)&&o.push(new je(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Mr?r.props[i]=l:r.props[i]=new Mr(i,l||"",{parent:t,materials:n})}),r.children=o,r};class Fo{constructor(t,{parent:n,materials:r}){oe(this,"rawData"),oe(this,"data"),oe(this,"nodeType",qr.ROOT_CONTAINER),oe(this,"emitter",ea),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),oe(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=md(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=md(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return jc(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=Nc.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=ug(i,["id"]);return s=kc(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||yn()};return new Fo(n,{materials:this.materialsModel,parent:null})}}const Vn=e=>(e==null?void 0:e.type)===Tt.EXPRESSION,fE=e=>(e==null?void 0:e.type)===Tt.FUNCTION,yn=()=>Math.random().toString(32).slice(3,9),pE=e=>(e==null?void 0:e.nodeType)==="NODE",cs=e=>(e==null?void 0:e.nodeType)==="PROP",hE=e=>(e==null?void 0:e.nodeType)==="SLOT",kc=e=>DO(e,t=>ht(t)?!Object.keys(t).length:Ve(t)?!t.length:!t);function gE(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof je){n.push(s);return}if(s instanceof jr&&a(s.value.value),s instanceof Mr){a(s.value);return}if(ht(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(Ve(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof je))||[];n.push(...i)}}function jc(e,t){return gE(e,n=>n.id===t)}const vE=e=>{const t=ng(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${yn()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class mE{constructor(t){oe(this,"rawData"),oe(this,"data"),this.rawData=t,this.data=vE(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(n=>n.id===t)}}const yE=e=>{if(!Ve(e))throw new Error("Materials must be a array");return e.map(t=>new mE(t))},bE=e=>{e==null||e.forEach(t=>{Pc({data:t,dataStruct:aE,throwError:!1})})};let Qn=class{constructor(t){oe(this,"rawData"),oe(this,"data"),oe(this,"usedMaterials",[]),this.rawData=t,bE(t),this.data=yE(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(d=>{const f=d.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(d)});const c=[];i.forEach(d=>{s[d].length&&c.push({name:d,list:s[d]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}};const wE=ve({version:U(),name:U(),css:K(U()),renderType:K(pt([ft("COMPONENT"),ft("PAGE")])),methods:K(Ie(sE)),componentsMeta:Ie(_c(ve({componentName:U()}),Rc)),thirdLibs:K(JO),componentsTree:lE,assets:K(Ie(ze()))}),bg=e=>(Pc({data:e,dataStruct:wE,throwError:!1}),e),us=(e,t,n)=>({...e,componentsTree:new Fo(e.componentsTree,{parent:t,materials:n})});class ai{constructor(t,n){oe(this,"nodeType","PAGE"),oe(this,"rawData"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"assetPackagesList"),bg(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Qn((n==null?void 0:n.materials)||[]),this.data=us(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return jc(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof Fo)return console.warn("Not found parent node"),!1;if(a instanceof Mr)return console.warn("CProp can not add node"),!1;if(a instanceof jr){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ai)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="BEFORE"?a==null||a.value.children.splice(i,0,t):a==null||a.value.children.splice(i+1,0,t),t.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(ht(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new je(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=yn();const r=new je(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof je?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof je&&a instanceof je?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof jr){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof je||r instanceof Fo){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=Nc.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var d;return u.package===((d=l.value.npm)==null?void 0:d.package)});return c&&a.push(c),{componentName:l.componentName,...ng(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:kc(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=FO(a,l=>l.package),s=ug(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}qr.ROOT_CONTAINER;var SE=typeof global=="object"&&global&&global.Object===Object&&global;const wg=SE;var xE=typeof self=="object"&&self&&self.Object===Object&&self,CE=wg||xE||Function("return this")();const Yr=CE;var OE=Yr.Symbol;const Ar=OE;var Sg=Object.prototype,EE=Sg.hasOwnProperty,_E=Sg.toString,go=Ar?Ar.toStringTag:void 0;function RE(e){var t=EE.call(e,go),n=e[go];try{e[go]=void 0;var r=!0}catch{}var o=_E.call(e);return r&&(t?e[go]=n:delete e[go]),o}var NE=Object.prototype,TE=NE.toString;function PE(e){return TE.call(e)}var kE="[object Null]",jE="[object Undefined]",yd=Ar?Ar.toStringTag:void 0;function ta(e){return e==null?e===void 0?jE:kE:yd&&yd in Object(e)?RE(e):PE(e)}function Xr(e){return e!=null&&typeof e=="object"}var ME="[object Symbol]";function AE(e){return typeof e=="symbol"||Xr(e)&&ta(e)==ME}function DE(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $E=Array.isArray;const Dr=$E;var IE=1/0,bd=Ar?Ar.prototype:void 0,wd=bd?bd.toString:void 0;function xg(e){if(typeof e=="string")return e;if(Dr(e))return DE(e,xg)+"";if(AE(e))return wd?wd.call(e):"";var t=e+"";return t=="0"&&1/e==-IE?"-0":t}function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Cg(e){return e}var LE="[object AsyncFunction]",BE="[object Function]",zE="[object GeneratorFunction]",VE="[object Proxy]";function Mc(e){if(!or(e))return!1;var t=ta(e);return t==BE||t==zE||t==LE||t==VE}var FE=Yr["__core-js_shared__"];const ds=FE;var Sd=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function HE(e){return!!Sd&&Sd in e}var UE=Function.prototype,WE=UE.toString;function GE(e){if(e!=null){try{return WE.call(e)}catch{}try{return e+""}catch{}}return""}var KE=/[\\^$.*+?()[\]{}|]/g,qE=/^\[object .+?Constructor\]$/,YE=Function.prototype,XE=Object.prototype,JE=YE.toString,QE=XE.hasOwnProperty,ZE=RegExp("^"+JE.call(QE).replace(KE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e_(e){if(!or(e)||HE(e))return!1;var t=Mc(e)?ZE:qE;return t.test(GE(e))}function t_(e,t){return e==null?void 0:e[t]}function Ac(e,t){var n=t_(e,t);return e_(n)?n:void 0}var xd=Object.create,n_=function(){function e(){}return function(t){if(!or(t))return{};if(xd)return xd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const r_=n_;function o_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a_(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var i_=800,s_=16,l_=Date.now;function c_(e){var t=0,n=0;return function(){var r=l_(),o=s_-(r-n);if(n=r,o>0){if(++t>=i_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function u_(e){return function(){return e}}var d_=function(){try{var e=Ac(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ii=d_;var f_=ii?function(e,t){return ii(e,"toString",{configurable:!0,enumerable:!1,value:u_(t),writable:!0})}:Cg;const p_=f_;var h_=c_(p_);const g_=h_;var v_=9007199254740991,m_=/^(?:0|[1-9]\d*)$/;function Og(e,t){var n=typeof e;return t=t??v_,!!t&&(n=="number"||n!="symbol"&&m_.test(e))&&e>-1&&e%1==0&&e<t}function Dc(e,t,n){t=="__proto__"&&ii?ii(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ni(e,t){return e===t||e!==e&&t!==t}var y_=Object.prototype,b_=y_.hasOwnProperty;function w_(e,t,n){var r=e[t];(!(b_.call(e,t)&&Ni(r,n))||n===void 0&&!(t in e))&&Dc(e,t,n)}function S_(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Dc(n,s,l):w_(n,s,l)}return n}var Cd=Math.max;function x_(e,t,n){return t=Cd(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Cd(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),o_(e,this,s)}}function C_(e,t){return g_(x_(e,t,Cg),e+"")}var O_=9007199254740991;function Eg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=O_}function $c(e){return e!=null&&Eg(e.length)&&!Mc(e)}function E_(e,t,n){if(!or(n))return!1;var r=typeof t;return(r=="number"?$c(n)&&Og(t,n.length):r=="string"&&t in n)?Ni(n[t],e):!1}function __(e){return C_(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&E_(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var R_=Object.prototype;function _g(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||R_;return e===n}function N_(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var T_="[object Arguments]";function Od(e){return Xr(e)&&ta(e)==T_}var Rg=Object.prototype,P_=Rg.hasOwnProperty,k_=Rg.propertyIsEnumerable,j_=Od(function(){return arguments}())?Od:function(e){return Xr(e)&&P_.call(e,"callee")&&!k_.call(e,"callee")};const ll=j_;function M_(){return!1}var Ng=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ed=Ng&&typeof module=="object"&&module&&!module.nodeType&&module,A_=Ed&&Ed.exports===Ng,_d=A_?Yr.Buffer:void 0,D_=_d?_d.isBuffer:void 0,$_=D_||M_;const Tg=$_;var I_="[object Arguments]",L_="[object Array]",B_="[object Boolean]",z_="[object Date]",V_="[object Error]",F_="[object Function]",H_="[object Map]",U_="[object Number]",W_="[object Object]",G_="[object RegExp]",K_="[object Set]",q_="[object String]",Y_="[object WeakMap]",X_="[object ArrayBuffer]",J_="[object DataView]",Q_="[object Float32Array]",Z_="[object Float64Array]",eR="[object Int8Array]",tR="[object Int16Array]",nR="[object Int32Array]",rR="[object Uint8Array]",oR="[object Uint8ClampedArray]",aR="[object Uint16Array]",iR="[object Uint32Array]",Re={};Re[Q_]=Re[Z_]=Re[eR]=Re[tR]=Re[nR]=Re[rR]=Re[oR]=Re[aR]=Re[iR]=!0;Re[I_]=Re[L_]=Re[X_]=Re[B_]=Re[J_]=Re[z_]=Re[V_]=Re[F_]=Re[H_]=Re[U_]=Re[W_]=Re[G_]=Re[K_]=Re[q_]=Re[Y_]=!1;function sR(e){return Xr(e)&&Eg(e.length)&&!!Re[ta(e)]}function lR(e){return function(t){return e(t)}}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,cR=Ro&&Ro.exports===Pg,fs=cR&&wg.process,uR=function(){try{var e=Ro&&Ro.require&&Ro.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const Rd=uR;var Nd=Rd&&Rd.isTypedArray,dR=Nd?lR(Nd):sR;const kg=dR;var fR=Object.prototype,pR=fR.hasOwnProperty;function hR(e,t){var n=Dr(e),r=!n&&ll(e),o=!n&&!r&&Tg(e),a=!n&&!r&&!o&&kg(e),i=n||r||o||a,s=i?N_(e.length,String):[],l=s.length;for(var c in e)(t||pR.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Og(c,l)))&&s.push(c);return s}function gR(e,t){return function(n){return e(t(n))}}function vR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mR=Object.prototype,yR=mR.hasOwnProperty;function bR(e){if(!or(e))return vR(e);var t=_g(e),n=[];for(var r in e)r=="constructor"&&(t||!yR.call(e,r))||n.push(r);return n}function jg(e){return $c(e)?hR(e,!0):bR(e)}var wR=Ac(Object,"create");const Ho=wR;function SR(){this.__data__=Ho?Ho(null):{},this.size=0}function xR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var CR="__lodash_hash_undefined__",OR=Object.prototype,ER=OR.hasOwnProperty;function _R(e){var t=this.__data__;if(Ho){var n=t[e];return n===CR?void 0:n}return ER.call(t,e)?t[e]:void 0}var RR=Object.prototype,NR=RR.hasOwnProperty;function TR(e){var t=this.__data__;return Ho?t[e]!==void 0:NR.call(t,e)}var PR="__lodash_hash_undefined__";function kR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ho&&t===void 0?PR:t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=SR;Zn.prototype.delete=xR;Zn.prototype.get=_R;Zn.prototype.has=TR;Zn.prototype.set=kR;function jR(){this.__data__=[],this.size=0}function Ti(e,t){for(var n=e.length;n--;)if(Ni(e[n][0],t))return n;return-1}var MR=Array.prototype,AR=MR.splice;function DR(e){var t=this.__data__,n=Ti(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():AR.call(t,n,1),--this.size,!0}function $R(e){var t=this.__data__,n=Ti(t,e);return n<0?void 0:t[n][1]}function IR(e){return Ti(this.__data__,e)>-1}function LR(e,t){var n=this.__data__,r=Ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bn.prototype.clear=jR;bn.prototype.delete=DR;bn.prototype.get=$R;bn.prototype.has=IR;bn.prototype.set=LR;var BR=Ac(Yr,"Map");const Mg=BR;function zR(){this.size=0,this.__data__={hash:new Zn,map:new(Mg||bn),string:new Zn}}function VR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pi(e,t){var n=e.__data__;return VR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function FR(e){var t=Pi(this,e).delete(e);return this.size-=t?1:0,t}function HR(e){return Pi(this,e).get(e)}function UR(e){return Pi(this,e).has(e)}function WR(e,t){var n=Pi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jr.prototype.clear=zR;Jr.prototype.delete=FR;Jr.prototype.get=HR;Jr.prototype.has=UR;Jr.prototype.set=WR;function Ag(e){return e==null?"":xg(e)}var GR=gR(Object.getPrototypeOf,Object);const Dg=GR;var KR="[object Object]",qR=Function.prototype,YR=Object.prototype,$g=qR.toString,XR=YR.hasOwnProperty,JR=$g.call(Object);function $r(e){if(!Xr(e)||ta(e)!=KR)return!1;var t=Dg(e);if(t===null)return!0;var n=XR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$g.call(n)==JR}function QR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function ZR(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:QR(e,t,n)}var e2="\\ud800-\\udfff",t2="\\u0300-\\u036f",n2="\\ufe20-\\ufe2f",r2="\\u20d0-\\u20ff",o2=t2+n2+r2,a2="\\ufe0e\\ufe0f",i2="\\u200d",s2=RegExp("["+i2+e2+o2+a2+"]");function Ig(e){return s2.test(e)}function l2(e){return e.split("")}var Lg="\\ud800-\\udfff",c2="\\u0300-\\u036f",u2="\\ufe20-\\ufe2f",d2="\\u20d0-\\u20ff",f2=c2+u2+d2,p2="\\ufe0e\\ufe0f",h2="["+Lg+"]",cl="["+f2+"]",ul="\\ud83c[\\udffb-\\udfff]",g2="(?:"+cl+"|"+ul+")",Bg="[^"+Lg+"]",zg="(?:\\ud83c[\\udde6-\\uddff]){2}",Vg="[\\ud800-\\udbff][\\udc00-\\udfff]",v2="\\u200d",Fg=g2+"?",Hg="["+p2+"]?",m2="(?:"+v2+"(?:"+[Bg,zg,Vg].join("|")+")"+Hg+Fg+")*",y2=Hg+Fg+m2,b2="(?:"+[Bg+cl+"?",cl,zg,Vg,h2].join("|")+")",w2=RegExp(ul+"(?="+ul+")|"+b2+y2,"g");function S2(e){return e.match(w2)||[]}function x2(e){return Ig(e)?S2(e):l2(e)}function C2(e){return function(t){t=Ag(t);var n=Ig(t)?x2(t):void 0,r=n?n[0]:t.charAt(0),o=n?ZR(n,1).join(""):t.slice(1);return r[e]()+o}}var O2=C2("toUpperCase");const E2=O2;function _2(e){return E2(Ag(e).toLowerCase())}function R2(){this.__data__=new bn,this.size=0}function N2(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function T2(e){return this.__data__.get(e)}function P2(e){return this.__data__.has(e)}var k2=200;function j2(e,t){var n=this.__data__;if(n instanceof bn){var r=n.__data__;if(!Mg||r.length<k2-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jr(r)}return n.set(e,t),this.size=n.size,this}function Qr(e){var t=this.__data__=new bn(e);this.size=t.size}Qr.prototype.clear=R2;Qr.prototype.delete=N2;Qr.prototype.get=T2;Qr.prototype.has=P2;Qr.prototype.set=j2;var Ug=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Td=Ug&&typeof module=="object"&&module&&!module.nodeType&&module,M2=Td&&Td.exports===Ug,Pd=M2?Yr.Buffer:void 0,kd=Pd?Pd.allocUnsafe:void 0;function A2(e,t){if(t)return e.slice();var n=e.length,r=kd?kd(n):new e.constructor(n);return e.copy(r),r}var D2=Yr.Uint8Array;const jd=D2;function $2(e){var t=new e.constructor(e.byteLength);return new jd(t).set(new jd(e)),t}function I2(e,t){var n=t?$2(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function L2(e){return typeof e.constructor=="function"&&!_g(e)?r_(Dg(e)):{}}function B2(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var z2=B2();const V2=z2;function dl(e,t,n){(n!==void 0&&!Ni(e[t],n)||n===void 0&&!(t in e))&&Dc(e,t,n)}function F2(e){return Xr(e)&&$c(e)}function fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function H2(e){return S_(e,jg(e))}function U2(e,t,n,r,o,a,i){var s=fl(e,n),l=fl(t,n),c=i.get(l);if(c){dl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Dr(l),p=!f&&Tg(l),h=!f&&!p&&kg(l);u=l,f||p||h?Dr(s)?u=s:F2(s)?u=a_(s):p?(d=!1,u=A2(l,!0)):h?(d=!1,u=I2(l,!0)):u=[]:$r(l)||ll(l)?(u=s,ll(s)?u=H2(s):(!or(s)||Mc(s))&&(u=L2(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),dl(e,n,u)}function Wg(e,t,n,r,o){e!==t&&V2(t,function(a,i){if(o||(o=new Qr),or(a))U2(e,t,i,n,Wg,r,o);else{var s=r?r(fl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),dl(e,i,s)}},jg)}var W2=__(function(e,t,n){Wg(e,t,n)});const G2=W2;function K2(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function q2(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function Y2(e){class t extends g.Component{render(){return g.createElement(e,this.props)}}return t.displayName=e.displayName,t}const fr=(e,t)=>{const n=r=>{const o=`
92
92
  ${Object.keys(t).map(a=>`const ${a} = $$context['${a}'];`).join(`
93
93
  `)}
94
94
  return ${r};
95
- `;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},XN=(e,t,n)=>function(...r){let o;try{o=`
95
+ `;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},X2=(e,t,n)=>function(...r){let o;try{o=`
96
96
  var $$$__args__$$$ = Array.from(arguments);
97
97
  function $$_run_$$() {
98
98
  var $$_f_$$ = ${e||"function () {}"};
@@ -102,7 +102,7 @@ function $$_run_$$() {
102
102
  return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
103
103
  }
104
104
  return $$_run_$$();
105
- `,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Dd=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},$d=e=>{const t={};return Object.keys(e).forEach(n=>{let r=n.replace("-webkit","Webkit");r=r.replace("-ms","ms"),r=r.replace("-moz","Moz"),r=r.replace("-o","O");let o=r.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?EN(a):a)),t[o.join("")]=e[n]}),t},Id=e=>{let t="";return Object.keys(e).forEach(n=>{t+=`${n}:${e[n]};`}),t},JN=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},QN=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},ZN=(e,t)=>QN(e,t),Ma="DYNAMIC",e2=["$$context","$$nodeModel"],Ld=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.delete(i)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},t2=e=>e?Ld(e):Ld;class n2{constructor(){ae(this,"storeMap",new Map)}addStore(t,n){const r=t2(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class r2{constructor(){ae(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}class o2{constructor(){ae(this,"renderMode","normal"),ae(this,"components",{}),ae(this,"storeManager",new n2),ae(this,"variableManager",new r2),ae(this,"runtimeComponentCache",new Map),ae(this,"onGetRef"),ae(this,"onGetComponent"),ae(this,"onComponentMount"),ae(this,"onComponentDestroy"),ae(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return qN(o)||(o=YN(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,d=this.getComponent(u),f=this.convertModelToComponent(d,t.value.componentsTree),p={},g=u.props;return Object.keys(g).forEach(y=>{p[y]=g[y].value}),p.$$context=o,this.render(f,p)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(ds(i))return o(i.value);if(h_(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const d=`${u.id}-${Ma}`;if(this.runtimeComponentCache.get(u.id))return{key:d,component:this.runtimeComponentCache.get(u.id)};const f=this.getComponent(u),p=this.convertModelToComponent(f,u),g=s.params||[];return{component:(...y)=>{const w=Dd(y,g),b=this.getContext({params:w},n);return this.render(p,{$$context:b,key:d})},key:d}};if(Array.isArray(l)){const u=l==null?void 0:l.map(d=>c(d));return(...d)=>u.map(f=>KN(f.component)?v.createElement(f.component,{$$context:n,key:f.key}):f.component(...d))}else return c(l).component}else{if(Yn(i))return Cr(i.value,n||{});if(f_(i))return XN(i.value,n,this.storeManager);if(Gr(i)){let s=i;ds(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;ds(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Wr(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):Gr(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends v.Component{constructor(i){super(i),ae(this,"_CONDITION",!0),ae(this,"_DESIGN_BOX",!1),ae(this,"_NODE_MODEL",n),ae(this,"_NODE_ID",n.id),ae(this,"UNIQUE_ID",`${n.id}_${Rn()}`),ae(this,"targetComponentRef"),ae(this,"listenerHandle",[]),ae(this,"storeState"),ae(this,"storeListenDisposeList",[]),ae(this,"domHeader"),ae(this,"mediaStyleDomMap",{}),ae(this,"variableSpace"),ae(this,"nodeName"),ae(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),ae(this,"getStyleDomById",u=>{const d=this.mediaStyleDomMap;let f=d[u];return f||(f=document.createElement("style"),d[u]=f),f.id=u,f}),ae(this,"addMediaCSS",()=>{var u;let d=this.domHeader;if(d||(d=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=d),!this.domHeader)return;const f=this._NODE_MODEL.value.css;f&&f.value.forEach(p=>{var g;const y=`${this.UNIQUE_ID}_${p.state}`;let w=`.${f.class}`;if(p.state!=="normal"&&(w=`${w}:${p.state}`),Object.keys(p.style).length!==0){const b=this.getStyleDomById(y);b.innerText=`${w} { ${Id(p.style)} }`,d==null||d.appendChild(b)}(g=p.media)!=null&&g.length&&p.media.forEach(b=>{const S=`${y}_${b.type}_${b.value}`,E=this.getStyleDomById(S);E.media=`screen and (${b.type}:${b.value}px)`,E.innerHTML=`${w} { ${Id(b.style)} }`,d==null||d.appendChild(E)})})}),ae(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(d=>{var f;(f=this.domHeader)==null||f.removeChild(u[d])}),this.mediaStyleDomMap={}}),ae(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=v.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,d=>!!Yn(d)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},d=>!!Yn(d));let l=[];[...i,...s].map(d=>{const f=d.val,p=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],g=JN(f.value,p);l=[...l,...g]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(d=>{r.storeManager.getStore(d)||(r.storeManager.addStore(d,()=>({})),console.warn(r.storeManager,d,"not exits"));const f=r.storeManager.connect(d,()=>{this.forceUpdate()});u.push(f)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:T=>r.storeManager.getStateObj(T),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:T=>r.variableManager.get(T).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:T=>r.variableManager.get(T).staticVar};n.value.componentName===oo.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=r.getContext(d,s),p=r.transformProps({methods:n.value.methods},{$$context:f}).methods.reduce((T,P)=>(T[P.name]=P.define,T),{});f.methods=p,this.variableSpace.methods=Object.assign(this.variableSpace.methods,p);const g=n.value.loop;let y=[];if(g&&g.open){this.targetComponentRef.current=[];let T=g.data||[];if(Yn(g.data)){const P=g.data;T=Cr(P.value,f||{})}return y=T.map((...P)=>{var M;const D=P[1],I=[g.forName||"item",g.forIndex||"index"],A=Dd(P,I);let j="loopData";g.name&&(j=`${j}${g.name}`);const L=r.getContext({[j]:A},f),H=r.transformProps(u,{$$context:L}),ie=((M=n.value.classNames)==null?void 0:M.map(J=>{var re;const de=J.name;return Yn(J.status)&&Cr(String(((re=J.status)==null?void 0:re.value)||""),L)?de:""}))||[];let ne=`${H.className??""} ${ie.join(" ")}`.trim();n.value.css&&(ne=`${n.value.css.class} ${ne}`.trim()),H.className=ne;const he=r.transformProps(n.value.style,{$$context:L});n.value.style&&(H.style=$d(he||{}));const{children:$}=H;let z=[];if($!==void 0)delete H.children,z=Array.isArray($)?$:[$];else{const J=[];n.value.children.forEach((re,de)=>{const fe=r.buildComponent(re,{$$context:L,idx:de});J.push(fe)}),z=J}if(H.key=`${H.key}-${D}`,Yn(g.key)){const J=g.key,re=Cr(J.value,L||{});H.key+=`-${re}`}return H.ref=J=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[D]=J},r.render(t,H,...z)}),y}const w=r.transformProps(u,{$$context:f}),{children:b}=w;let S=[];if(b!==void 0)delete w.children,S=Array.isArray(b)?b:[b];else{const T=[];n.value.children.forEach((P,M)=>{const D=r.buildComponent(P,{$$context:f,idx:M});T.push(D)}),S=T}w.ref=this.targetComponentRef;const E=((i=n.value.classNames)==null?void 0:i.map(T=>{var P;const M=T.name;return Yn(T.status)&&Cr(((P=T.status)==null?void 0:P.value)||"",f)?M:""}))||[];let C=`${w.className??""} ${E.join(" ")}`.trim();n.value.css&&(C=`${n.value.css.class} ${C}`.trim()),w.className=C;const m=r.transformProps(n.value.style,{$$context:f});n.value.style&&(w.style=$d(m||{}));let _=n.value.condition??!0;typeof _!="boolean"&&(_=Cr(_.value,f||{}));let O={condition:_,props:w};r.processNodeConfigHook&&(O=r.processNodeConfigHook(O,n));const N=r.render(t,O.props,...S);return this._CONDITION=O.condition,O.condition?N:x("div",{style:{display:"none"},children:N})}}return ae(o,"__CP_TYPE__",Ma),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):p_(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a))i=r.get(a);else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o)}!r.get(a)&&this.renderMode!=="design"&&r.set(a,i);const s=`${a}-${Ma}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(e2.forEach(o=>{o in n&&t.__CP_TYPE__!==Ma&&delete n[o]}),v.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}X0(new o2);const a2=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var i2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gl={exports:{}},To={};/**
105
+ `,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Md=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},Ad=e=>{const t={};return Object.keys(e).forEach(n=>{let r=n.replace("-webkit","Webkit");r=r.replace("-ms","ms"),r=r.replace("-moz","Moz"),r=r.replace("-o","O");let o=r.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?_2(a):a)),t[o.join("")]=e[n]}),t},Dd=e=>{let t="";return Object.keys(e).forEach(n=>{t+=`${n}:${e[n]};`}),t},J2=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},Q2=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},Z2=(e,t)=>Q2(e,t),Ra="DYNAMIC",eN=["$$context","$$nodeModel"],$d=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.delete(i)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},tN=e=>e?$d(e):$d;class nN{constructor(){J(this,"storeMap",new Map)}addStore(t,n){const r=tN(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class rN{constructor(){J(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}class oN{constructor(){J(this,"renderMode","normal"),J(this,"components",{}),J(this,"storeManager",new nN),J(this,"variableManager",new rN),J(this,"runtimeComponentCache",new Map),J(this,"onGetRef"),J(this,"onGetComponent"),J(this,"onComponentMount"),J(this,"onComponentDestroy"),J(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return q2(o)||(o=Y2(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,d=this.getComponent(u),f=this.convertModelToComponent(d,t.value.componentsTree),p={},h=u.props;return Object.keys(h).forEach(m=>{p[m]=h[m].value}),p.$$context=o,this.render(f,p)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(cs(i))return o(i.value);if(hE(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const d=`${u.id}-${Ra}`;if(this.runtimeComponentCache.get(u.id))return{key:d,component:this.runtimeComponentCache.get(u.id)};const f=this.getComponent(u),p=this.convertModelToComponent(f,u),h=s.params||[];return{component:(...m)=>{const b=Md(m,h),y=this.getContext({params:b},n);return this.render(p,{$$context:y,key:d})},key:d}};if(Array.isArray(l)){const u=l==null?void 0:l.map(d=>c(d));return(...d)=>u.map(f=>K2(f.component)?g.createElement(f.component,{$$context:n,key:f.key}):f.component(...d))}else return c(l).component}else{if(Vn(i))return fr(i.value,n||{});if(fE(i))return X2(i.value,n,this.storeManager);if($r(i)){let s=i;cs(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;cs(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Dr(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):$r(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends g.Component{constructor(i){super(i),J(this,"_CONDITION",!0),J(this,"_DESIGN_BOX",!1),J(this,"_NODE_MODEL",n),J(this,"_NODE_ID",n.id),J(this,"UNIQUE_ID",`${n.id}_${yn()}`),J(this,"targetComponentRef"),J(this,"listenerHandle",[]),J(this,"storeState"),J(this,"storeListenDisposeList",[]),J(this,"domHeader"),J(this,"mediaStyleDomMap",{}),J(this,"variableSpace"),J(this,"nodeName"),J(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),J(this,"getStyleDomById",u=>{const d=this.mediaStyleDomMap;let f=d[u];return f||(f=document.createElement("style"),d[u]=f),f.id=u,f}),J(this,"addMediaCSS",()=>{var u;let d=this.domHeader;if(d||(d=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=d),!this.domHeader)return;const f=this._NODE_MODEL.value.css;f&&f.value.forEach(p=>{var h;const m=`${this.UNIQUE_ID}_${p.state}`;let b=`.${f.class}`;if(p.state!=="normal"&&(b=`${b}:${p.state}`),Object.keys(p.style).length!==0){const y=this.getStyleDomById(m);y.innerText=`${b} { ${Dd(p.style)} }`,d==null||d.appendChild(y)}(h=p.media)!=null&&h.length&&p.media.forEach(y=>{const S=`${m}_${y.type}_${y.value}`,E=this.getStyleDomById(S);E.media=`screen and (${y.type}:${y.value}px)`,E.innerHTML=`${b} { ${Dd(y.style)} }`,d==null||d.appendChild(E)})})}),J(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(d=>{var f;(f=this.domHeader)==null||f.removeChild(u[d])}),this.mediaStyleDomMap={}}),J(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=g.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,d=>!!Vn(d)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},d=>!!Vn(d));let l=[];[...i,...s].map(d=>{const f=d.val,p=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],h=J2(f.value,p);l=[...l,...h]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(d=>{r.storeManager.getStore(d)||(r.storeManager.addStore(d,()=>({})),console.warn(r.storeManager,d,"not exits"));const f=r.storeManager.connect(d,()=>{this.forceUpdate()});u.push(f)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:N=>r.storeManager.getStateObj(N),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:N=>r.variableManager.get(N).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:N=>r.variableManager.get(N).staticVar};n.value.componentName===qr.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=r.getContext(d,s),p=r.transformProps({methods:n.value.methods},{$$context:f}).methods.reduce((N,T)=>(N[T.name]=T.define,N),{});f.methods=p,this.variableSpace.methods=Object.assign(this.variableSpace.methods,p);const h=n.value.loop;let m=[];if(h&&h.open){this.targetComponentRef.current=[];let N=h.data||[];if(Vn(h.data)){const T=h.data;N=fr(T.value,f||{})}return m=N.map((...T)=>{var k;const j=T[1],L=[h.forName||"item",h.forIndex||"index"],M=Md(T,L);let P="loopData";h.name&&(P=`${P}${h.name}`);const D=r.getContext({[P]:M},f),F=r.transformProps(u,{$$context:D}),ne=((k=n.value.classNames)==null?void 0:k.map(G=>{var te;const ie=G.name;return Vn(G.status)&&fr(String(((te=G.status)==null?void 0:te.value)||""),D)?ie:""}))||[];let Z=`${F.className??""} ${ne.join(" ")}`.trim();n.value.css&&(Z=`${n.value.css.class} ${Z}`.trim()),F.className=Z;const ue=r.transformProps(n.value.style,{$$context:D});n.value.style&&(F.style=Ad(ue||{}));const{children:A}=F;let I=[];if(A!==void 0)delete F.children,I=Array.isArray(A)?A:[A];else{const G=[];n.value.children.forEach((te,ie)=>{const de=r.buildComponent(te,{$$context:D,idx:ie});G.push(de)}),I=G}if(F.key=`${F.key}-${j}`,Vn(h.key)){const G=h.key,te=fr(G.value,D||{});F.key+=`-${te}`}return F.ref=G=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[j]=G},r.render(t,F,...I)}),m}const b=r.transformProps(u,{$$context:f}),{children:y}=b;let S=[];if(y!==void 0)delete b.children,S=Array.isArray(y)?y:[y];else{const N=[];n.value.children.forEach((T,k)=>{const j=r.buildComponent(T,{$$context:f,idx:k});N.push(j)}),S=N}b.ref=this.targetComponentRef;const E=((i=n.value.classNames)==null?void 0:i.map(N=>{var T;const k=N.name;return Vn(N.status)&&fr(((T=N.status)==null?void 0:T.value)||"",f)?k:""}))||[];let x=`${b.className??""} ${E.join(" ")}`.trim();n.value.css&&(x=`${n.value.css.class} ${x}`.trim()),b.className=x;const v=r.transformProps(n.value.style,{$$context:f});n.value.style&&(b.style=Ad(v||{}));let O=n.value.condition??!0;typeof O!="boolean"&&(O=fr(O.value,f||{}));let C={condition:O,props:b};r.processNodeConfigHook&&(C=r.processNodeConfigHook(C,n));const R=r.render(t,C.props,...S);return this._CONDITION=C.condition,C.condition?R:w("div",{style:{display:"none"},children:R})}}return J(o,"__CP_TYPE__",Ra),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):pE(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a))i=r.get(a);else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o)}!r.get(a)&&this.renderMode!=="design"&&r.set(a,i);const s=`${a}-${Ra}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(eN.forEach(o=>{o in n&&t.__CP_TYPE__!==Ra&&delete n[o]}),g.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}X0(new oN);const aN=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var iN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gg={exports:{}},ki={};/**
106
106
  * @license React
107
107
  * react-jsx-runtime.production.min.js
108
108
  *
@@ -110,41 +110,23 @@ return $$_run_$$();
110
110
  *
111
111
  * This source code is licensed under the MIT license found in the
112
112
  * LICENSE file in the root directory of this source tree.
113
- */var Bd;function s2(){if(Bd)return To;Bd=1;var e=v,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:p,props:d,_owner:o.current}}return To.Fragment=n,To.jsx=i,To.jsxs=i,To}var Aa={};/**
114
- * @license React
115
- * react-jsx-runtime.development.js
116
- *
117
- * Copyright (c) Facebook, Inc. and its affiliates.
118
- *
119
- * This source code is licensed under the MIT license found in the
120
- * LICENSE file in the root directory of this source tree.
121
- */var zd;function l2(){return zd||(zd=1,"{}".NODE_ENV!=="production"&&function(){var e=v,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,y="@@iterator";function w(h){if(h===null||typeof h!="object")return null;var R=g&&h[g]||h[y];return typeof R=="function"?R:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(h){{for(var R=arguments.length,k=new Array(R>1?R-1:0),B=1;B<R;B++)k[B-1]=arguments[B];E("error",h,k)}}function E(h,R,k){{var B=b.ReactDebugCurrentFrame,Y=B.getStackAddendum();Y!==""&&(R+="%s",k=k.concat([Y]));var te=k.map(function(W){return String(W)});te.unshift("Warning: "+R),Function.prototype.apply.call(console[h],console,te)}}var C=!1,m=!1,_=!1,O=!1,N=!1,T;T=Symbol.for("react.module.reference");function P(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===a||N||h===o||h===c||h===u||O||h===p||C||m||_||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===s||h.$$typeof===l||h.$$typeof===T||h.getModuleId!==void 0))}function M(h,R,k){var B=h.displayName;if(B)return B;var Y=R.displayName||R.name||"";return Y!==""?k+"("+Y+")":k}function D(h){return h.displayName||"Context"}function I(h){if(h==null)return null;if(typeof h.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case s:var R=h;return D(R)+".Consumer";case i:var k=h;return D(k._context)+".Provider";case l:return M(h,h.render,"ForwardRef");case d:var B=h.displayName||null;return B!==null?B:I(h.type)||"Memo";case f:{var Y=h,te=Y._payload,W=Y._init;try{return I(W(te))}catch{return null}}}return null}var A=Object.assign,j=0,L,H,ie,ne,he,$,z;function J(){}J.__reactDisabledLog=!0;function re(){{if(j===0){L=console.log,H=console.info,ie=console.warn,ne=console.error,he=console.group,$=console.groupCollapsed,z=console.groupEnd;var h={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}j++}}function de(){{if(j--,j===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},h,{value:L}),info:A({},h,{value:H}),warn:A({},h,{value:ie}),error:A({},h,{value:ne}),group:A({},h,{value:he}),groupCollapsed:A({},h,{value:$}),groupEnd:A({},h,{value:z})})}j<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=b.ReactCurrentDispatcher,He;function _e(h,R,k){{if(He===void 0)try{throw Error()}catch(Y){var B=Y.stack.trim().match(/\n( *(at )?)/);He=B&&B[1]||""}return`
122
- `+He+h}}var $e=!1,oe;{var Ie=typeof WeakMap=="function"?WeakMap:Map;oe=new Ie}function V(h,R){if(!h||$e)return"";{var k=oe.get(h);if(k!==void 0)return k}var B;$e=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=fe.current,fe.current=null,re();try{if(R){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(Qe){B=Qe}Reflect.construct(h,[],W)}else{try{W.call()}catch(Qe){B=Qe}h.call(W.prototype)}}else{try{throw Error()}catch(Qe){B=Qe}h()}}catch(Qe){if(Qe&&B&&typeof Qe.stack=="string"){for(var U=Qe.stack.split(`
123
- `),me=B.stack.split(`
124
- `),le=U.length-1,ue=me.length-1;le>=1&&ue>=0&&U[le]!==me[ue];)ue--;for(;le>=1&&ue>=0;le--,ue--)if(U[le]!==me[ue]){if(le!==1||ue!==1)do if(le--,ue--,ue<0||U[le]!==me[ue]){var ke=`
125
- `+U[le].replace(" at new "," at ");return h.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",h.displayName)),typeof h=="function"&&oe.set(h,ke),ke}while(le>=1&&ue>=0);break}}}finally{$e=!1,fe.current=te,de(),Error.prepareStackTrace=Y}var Ct=h?h.displayName||h.name:"",Oo=Ct?_e(Ct):"";return typeof h=="function"&&oe.set(h,Oo),Oo}function qe(h,R,k){return V(h,!1)}function Be(h){var R=h.prototype;return!!(R&&R.isReactComponent)}function Ce(h,R,k){if(h==null)return"";if(typeof h=="function")return V(h,Be(h));if(typeof h=="string")return _e(h);switch(h){case c:return _e("Suspense");case u:return _e("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return qe(h.render);case d:return Ce(h.type,R,k);case f:{var B=h,Y=B._payload,te=B._init;try{return Ce(te(Y),R,k)}catch{}}}return""}var nt=Object.prototype.hasOwnProperty,kt={},jt=b.ReactDebugCurrentFrame;function xe(h){if(h){var R=h._owner,k=Ce(h.type,h._source,R?R.type:null);jt.setExtraStackFrame(k)}else jt.setExtraStackFrame(null)}function we(h,R,k,B,Y){{var te=Function.call.bind(nt);for(var W in h)if(te(h,W)){var U=void 0;try{if(typeof h[W]!="function"){var me=Error((B||"React class")+": "+k+" type `"+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[W]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw me.name="Invariant Violation",me}U=h[W](R,W,B,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(le){U=le}U&&!(U instanceof Error)&&(xe(Y),S("%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).",B||"React class",k,W,typeof U),xe(null)),U instanceof Error&&!(U.message in kt)&&(kt[U.message]=!0,xe(Y),S("Failed %s type: %s",k,U.message),xe(null))}}}var Pe=Array.isArray;function ze(h){return Pe(h)}function Mt(h){{var R=typeof Symbol=="function"&&Symbol.toStringTag,k=R&&h[Symbol.toStringTag]||h.constructor.name||"Object";return k}}function mr(h){try{return Gn(h),!1}catch{return!0}}function Gn(h){return""+h}function Kn(h){if(mr(h))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Mt(h)),Gn(h)}var rt=b.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},zt,kn,ct;ct={};function yr(h){if(nt.call(h,"ref")){var R=Object.getOwnPropertyDescriptor(h,"ref").get;if(R&&R.isReactWarning)return!1}return h.ref!==void 0}function wo(h){if(nt.call(h,"key")){var R=Object.getOwnPropertyDescriptor(h,"key").get;if(R&&R.isReactWarning)return!1}return h.key!==void 0}function So(h,R){if(typeof h.ref=="string"&&rt.current&&R&&rt.current.stateNode!==R){var k=I(rt.current.type);ct[k]||(S('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',I(rt.current.type),h.ref),ct[k]=!0)}}function br(h,R){{var k=function(){zt||(zt=!0,S("%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)",R))};k.isReactWarning=!0,Object.defineProperty(h,"key",{get:k,configurable:!0})}}function xo(h,R){{var k=function(){kn||(kn=!0,S("%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)",R))};k.isReactWarning=!0,Object.defineProperty(h,"ref",{get:k,configurable:!0})}}var wr=function(h,R,k,B,Y,te,W){var U={$$typeof:t,type:h,key:R,ref:k,props:W,_owner:te};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:B}),Object.defineProperty(U,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U};function Co(h,R,k,B,Y){{var te,W={},U=null,me=null;k!==void 0&&(Kn(k),U=""+k),wo(R)&&(Kn(R.key),U=""+R.key),yr(R)&&(me=R.ref,So(R,Y));for(te in R)nt.call(R,te)&&!Zt.hasOwnProperty(te)&&(W[te]=R[te]);if(h&&h.defaultProps){var le=h.defaultProps;for(te in le)W[te]===void 0&&(W[te]=le[te])}if(U||me){var ue=typeof h=="function"?h.displayName||h.name||"Unknown":h;U&&br(W,ue),me&&xo(W,ue)}return wr(h,U,me,Y,B,rt.current,W)}}var hn=b.ReactCurrentOwner,qn=b.ReactDebugCurrentFrame;function ve(h){if(h){var R=h._owner,k=Ce(h.type,h._source,R?R.type:null);qn.setExtraStackFrame(k)}else qn.setExtraStackFrame(null)}var Ue;Ue=!1;function We(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function vt(){{if(hn.current){var h=I(hn.current.type);if(h)return`
126
-
127
- Check the render method of \``+h+"`."}return""}}function ut(h){{if(h!==void 0){var R=h.fileName.replace(/^.*[\\\/]/,""),k=h.lineNumber;return`
128
-
129
- Check your code at `+R+":"+k+"."}return""}}var it={};function mt(h){{var R=vt();if(!R){var k=typeof h=="string"?h:h.displayName||h.name;k&&(R=`
130
-
131
- Check the top-level render call using <`+k+">.")}return R}}function At(h,R){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var k=mt(R);if(it[k])return;it[k]=!0;var B="";h&&h._owner&&h._owner!==hn.current&&(B=" It was passed a child from "+I(h._owner.type)+"."),ve(h),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,B),ve(null)}}function st(h,R){{if(typeof h!="object")return;if(ze(h))for(var k=0;k<h.length;k++){var B=h[k];We(B)&&At(B,R)}else if(We(h))h._store&&(h._store.validated=!0);else if(h){var Y=w(h);if(typeof Y=="function"&&Y!==h.entries)for(var te=Y.call(h),W;!(W=te.next()).done;)We(W.value)&&At(W.value,R)}}}function gn(h){{var R=h.type;if(R==null||typeof R=="string")return;var k;if(typeof R=="function")k=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===l||R.$$typeof===d))k=R.propTypes;else return;if(k){var B=I(R);we(k,h.props,"prop",B,h)}else if(R.PropTypes!==void 0&&!Ue){Ue=!0;var Y=I(R);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Y||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vn(h){{for(var R=Object.keys(h.props),k=0;k<R.length;k++){var B=R[k];if(B!=="children"&&B!=="key"){ve(h),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",B),ve(null);break}}h.ref!==null&&(ve(h),S("Invalid attribute `ref` supplied to `React.Fragment`."),ve(null))}}function en(h,R,k,B,Y,te){{var W=P(h);if(!W){var U="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).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 me=ut(Y);me?U+=me:U+=vt();var le;h===null?le="null":ze(h)?le="array":h!==void 0&&h.$$typeof===t?(le="<"+(I(h.type)||"Unknown")+" />",U=" Did you accidentally export a JSX literal instead of a component?"):le=typeof h,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",le,U)}var ue=Co(h,R,k,Y,te);if(ue==null)return ue;if(W){var ke=R.children;if(ke!==void 0)if(B)if(ze(ke)){for(var Ct=0;Ct<ke.length;Ct++)st(ke[Ct],h);Object.freeze&&Object.freeze(ke)}else S("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 st(ke,h)}return h===r?vn(ue):gn(ue),ue}}function jn(h,R,k){return en(h,R,k,!0)}function Sr(h,R,k){return en(h,R,k,!1)}var mn=Sr,yn=jn;Aa.Fragment=r,Aa.jsx=mn,Aa.jsxs=yn}()),Aa}"{}".NODE_ENV==="production"?gl.exports=s2():gl.exports=l2();var c2=gl.exports;const u2=c2.jsx,Tn=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},d2=[...a2,...QO],f2=d2.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),v.createElement(t,{...o,...Tn(r)},...a)},e),{}),p2=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=Tn(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},h2=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(v.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),x("canvas",{...r,...Tn(n)})),g2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...Tn(t)},...r)},v2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...Tn(t)},...r)},m2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...Tn(t)},...r)},y2=({$$attributes:e=[],content:t,...n})=>x("span",{...n,...Tn(e),children:t}),b2=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),v.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),u2("div",{...o,...Tn(t),children:a})},w2=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=Tn(t),s={...a,...r.style||{}};return v.createElement(n,{...r,...i,style:s},...o)},S2={RootContainer:({children:e})=>e,...f2,CContainer:b2,CVideo:v2,CAudio:m2,CBlock:p2,CImage:g2,CText:y2,CCanvas:h2,CNativeTag:w2};class x2{constructor(){ae(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class C2 extends v.Component{constructor(t){super(t),ae(this,"refManager"),ae(this,"dynamicComponentInstanceMap",new Map),ae(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),ae(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if(Gr(n)&&xg(n)){const r=n;this.setState({pageModel:new fi(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new fi(t.page)},this.refManager=new x2}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...S2,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class O2 extends v.Component{constructor(t){super(t),ae(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=se("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,se("p",{children:["msg: ",String(this.state.error)]}),x("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),x("div",{style:{display:"none"}})]});return v.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class _2{constructor(){ae(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const E2=e=>{const{node:t}=e,n=v.useMemo(()=>{const s=t.isContainer();return Gr(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return x("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minWidth:"300px",minHeight:"50px",width:a,height:o,...i},children:r})};class W5 extends v.Component{constructor(t){super(t),ae(this,"instanceManager",new _2),ae(this,"renderRef"),ae(this,"dropPlaceholder",E2),ae(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends v.Component{constructor(){super(...arguments),ae(this,"_DESIGN_BOX",!0),ae(this,"_NODE_MODEL",r),ae(this,"_NODE_ID",r.id),ae(this,"_UNIQUE_ID",`${r.id}_${Rn()}`),ae(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){const{children:d=[],onlyRenderChild:f,...p}=this.props;let g=d;return Wr(d)||(g=[d]),!g.filter(Boolean).length&&(r.isContainer()||r.value.componentName===oo.ROOT_CONTAINER)&&g.push(v.createElement(i.dropPlaceholder,{node:r})),f?g:v.createElement(s,p,...g)}}return v.forwardRef(function(u,d){return x(O2,{node:r,targetComponent:c,children:v.createElement(c,{ref:d,...u})})})}),this.renderRef=v.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=Yg(t);if(!n)return null;const r=Xg(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=Gy.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),x(C2,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let d={...c};const f=((s=i.value.configure)==null?void 0:s.devState)||{},p=(l=i.material)==null?void 0:l.value.fixedProps;if(p!==void 0){if(Gr(p))d={...d,...p};else if(typeof p=="function"){const y=p(d);d={...d,...y}}}let g=u;return f.condition===!1&&(g=f.condition),{props:GN(d,f.props||{}),condition:g}},ref:this.renderRef})}}const Yg=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:Yg(e.parentElement)},Xg=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Xg(e.return):null};var R2={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(i2,function(){var n=function(){},r={},o={},a={};function i(f,p){f=f.push?f:[f];var g=[],y=f.length,w=y,b,S,E,C;for(b=function(m,_){_.length&&g.push(m),w--,w||p(g)};y--;){if(S=f[y],E=o[S],E){b(S,E);continue}C=a[S]=a[S]||[],C.push(b)}}function s(f,p){if(f){var g=a[f];if(o[f]=p,!!g)for(;g.length;)g[0](f,p),g.splice(0,1)}}function l(f,p){f.call&&(f={success:f}),p.length?(f.error||n)(p):(f.success||n)(f)}function c(f,p,g,y){var w=document,b=g.async,S=(g.numRetries||0)+1,E=g.before||n,C=f.replace(/[\?|#].*$/,""),m=f.replace(/^(css|img|module|nomodule)!/,""),_,O,N;if(y=y||0,/(^css!|\.css$)/.test(C))N=w.createElement("link"),N.rel="stylesheet",N.href=m,_="hideFocus"in N,_&&N.relList&&(_=0,N.rel="preload",N.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(C))N=w.createElement("img"),N.src=m;else if(N=w.createElement("script"),N.src=m,N.async=b===void 0?!0:b,O="noModule"in N,/^module!/.test(C)){if(!O)return p(f,"l");N.type="module"}else if(/^nomodule!/.test(C)&&O)return p(f,"l");N.onload=N.onerror=N.onbeforeload=function(T){var P=T.type[0];if(_)try{N.sheet.cssText.length||(P="e")}catch(M){M.code!=18&&(P="e")}if(P=="e"){if(y+=1,y<S)return c(f,p,g,y)}else if(N.rel=="preload"&&N.as=="style")return N.rel="stylesheet";p(f,P,T.defaultPrevented)},E(f,N)!==!1&&w.head.appendChild(N)}function u(f,p,g){f=f.push?f:[f];var y=f.length,w=y,b=[],S,E;for(S=function(C,m,_){if(m=="e"&&b.push(C),m=="b")if(_)b.push(C);else return;y--,y||p(b)},E=0;E<w;E++)c(f[E],S,g)}function d(f,p,g){var y,w;if(p&&p.trim&&(y=p),w=(y?g:p)||{},y){if(y in r)throw"LoadJS";r[y]=!0}function b(S,E){u(f,function(C){l(w,C),S&&l({success:S,error:E},C),s(y,C)},w)}if(w.returnPromise)return new Promise(b);b()}return d.ready=function(f,p){return i(f,function(g){l(p,g)}),d},d.done=function(f){s(f,[])},d.reset=function(){r={},o={},a={}},d.isDefined=function(f){return f in r},d})})(R2);const Jg=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},Qg=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,d=l.ReactDOMClient,f=l.CRender,p=o||(a==null?void 0:a.export());if(!p){console.log("page schema is empty");return}const g=[...r,...p.assets||[]];new f.AssetLoader(g,{window:n.getWindow()}).onSuccess(()=>{const w=or.collectVariable(g,l),b=or.flatObject(w),S=ZN(w,p.thirdLibs||[]),E=u==null?void 0:u.createElement(f.DesignRender,{adapter:f==null?void 0:f.ReactAdapter,page:o,pageModel:a,components:{...b,...e},$$context:{thirdLibs:S},onMount:C=>{i(C)}});d.createRoot(c.getElementById("app")).render(E)}).onError(()=>{console.log("资源加载出错")}).load()};var Zg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Do,function(){function n(C,m){if(!(C instanceof m))throw new TypeError("Cannot call a class as a function")}function r(C,m){for(var _=0;_<m.length;_++){var O=m[_];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(C,O.key,O)}}function o(C,m,_){return m&&r(C.prototype,m),_&&r(C,_),C}function a(C,m,_){return m in C?Object.defineProperty(C,m,{value:_,enumerable:!0,configurable:!0,writable:!0}):C[m]=_,C}function i(C,m){var _=Object.keys(C);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(C);m&&(O=O.filter(function(N){return Object.getOwnPropertyDescriptor(C,N).enumerable})),_.push.apply(_,O)}return _}function s(C){for(var m=1;m<arguments.length;m++){var _=arguments[m]!=null?arguments[m]:{};m%2?i(Object(_),!0).forEach(function(O){a(C,O,_[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(_)):i(Object(_)).forEach(function(O){Object.defineProperty(C,O,Object.getOwnPropertyDescriptor(_,O))})}return C}function l(C){return function(m){if(Array.isArray(m))return u(m)}(C)||function(m){if(typeof Symbol<"u"&&Symbol.iterator in Object(m))return Array.from(m)}(C)||c(C)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(C,m){if(C){if(typeof C=="string")return u(C,m);var _=Object.prototype.toString.call(C).slice(8,-1);return _==="Object"&&C.constructor&&(_=C.constructor.name),_==="Map"||_==="Set"?Array.from(C):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?u(C,m):void 0}}function u(C,m){(m==null||m>C.length)&&(m=C.length);for(var _=0,O=new Array(m);_<m;_++)O[_]=C[_];return O}function d(C){if(typeof Symbol>"u"||C[Symbol.iterator]==null){if(Array.isArray(C)||(C=c(C))){var m=0,_=function(){};return{s:_,n:function(){return m>=C.length?{done:!0}:{done:!1,value:C[m++]}},e:function(M){throw M},f:_}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
133
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O,N,T=!0,P=!1;return{s:function(){O=C[Symbol.iterator]()},n:function(){var M=O.next();return T=M.done,M},e:function(M){P=!0,N=M},f:function(){try{T||O.return==null||O.return()}finally{if(P)throw N}}}}var f={};f[f.Fatal=0]="Fatal",f[f.Error=0]="Error",f[f.Warn=1]="Warn",f[f.Log=2]="Log",f[f.Info=3]="Info",f[f.Success=3]="Success",f[f.Debug=4]="Debug",f[f.Trace=5]="Trace",f[f.Silent=-1/0]="Silent",f[f.Verbose=1/0]="Verbose";var p={silent:{level:-1},fatal:{level:f.Fatal},error:{level:f.Error},warn:{level:f.Warn},log:{level:f.Log},info:{level:f.Info},success:{level:f.Success},debug:{level:f.Debug},trace:{level:f.Trace},verbose:{level:f.Trace},ready:{level:f.Info},start:{level:f.Info}};function g(C){return m=C,Object.prototype.toString.call(m)==="[object Object]"&&!(!C.message&&!C.args)&&!C.stack;var m}var y=!1,w=[],b=function(){function C(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var _ in n(this,C),this._reporters=m.reporters||[],this._types=m.types||p,this.level=m.level!==void 0?m.level:3,this._defaults=m.defaults||{},this._async=m.async!==void 0?m.async:void 0,this._stdout=m.stdout,this._stderr=m.stderr,this._mockFn=m.mockFn,this._throttle=m.throttle||1e3,this._throttleMin=m.throttleMin||5,this._types){var O=s(s({type:_},this._types[_]),this._defaults);this[_]=this._wrapLogFn(O),this[_].raw=this._wrapLogFn(O,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return o(C,[{key:"create",value:function(m){return new C(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},m))}},{key:"withDefaults",value:function(m){return this.create({defaults:Object.assign({},this._defaults,m)})}},{key:"withTag",value:function(m){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+m:m})}},{key:"addReporter",value:function(m){return this._reporters.push(m),this}},{key:"removeReporter",value:function(m){if(m){var _=this._reporters.indexOf(m);if(_>=0)return this._reporters.splice(_,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(m){return this._reporters=Array.isArray(m)?m:[m],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var m in this._types)console["__"+m]||(console["__"+m]=console[m]),console[m]=this[m].raw}},{key:"restoreConsole",value:function(){for(var m in this._types)console["__"+m]&&(console[m]=console["__"+m],delete console["__"+m])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(m,_){var O=this;m&&(m.__write||(m.__write=m.write),m.write=function(N){O[_].raw(String(N).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(m){m&&m.__write&&(m.write=m.__write,delete m.__write)}},{key:"pauseLogs",value:function(){y=!0}},{key:"resumeLogs",value:function(){y=!1;var m,_=d(w.splice(0));try{for(_.s();!(m=_.n()).done;){var O=m.value;O[0]._logFn(O[1],O[2])}}catch(N){_.e(N)}finally{_.f()}}},{key:"mockTypes",value:function(m){if(this._mockFn=m||this._mockFn,typeof this._mockFn=="function")for(var _ in this._types)this[_]=this._mockFn(_,this._types[_])||this[_],this[_].raw=this[_]}},{key:"_wrapLogFn",value:function(m,_){var O=this;return function(){for(var N=arguments.length,T=new Array(N),P=0;P<N;P++)T[P]=arguments[P];if(!y)return O._logFn(m,T,_);w.push([O,m,T,_])}}},{key:"_logFn",value:function(m,_,O){var N=this;if(m.level>this.level)return!!this._async&&Promise.resolve(!1);var T=Object.assign({date:new Date,args:[]},m);!O&&_.length===1&&g(_[0])?Object.assign(T,_[0]):T.args=Array.from(_),T.message&&(T.args.unshift(T.message),delete T.message),T.additional&&(Array.isArray(T.additional)||(T.additional=T.additional.split(`
134
- `)),T.args.push(`
135
- `+T.additional.join(`
136
- `)),delete T.additional),T.type=typeof T.type=="string"?T.type.toLowerCase():"",T.tag=typeof T.tag=="string"?T.tag.toLowerCase():"";var P=function(){var A=arguments.length>0&&arguments[0]!==void 0&&arguments[0],j=N._lastLogCount-N._throttleMin;if(N._lastLog&&j>0){var L=l(N._lastLog.args);j>1&&L.push("(repeated ".concat(j," times)")),N._log(s(s({},N._lastLog),{},{args:L})),N._lastLogCount=1}if(A){if(N._lastLog=T,N._async)return N._logAsync(T);N._log(T)}};clearTimeout(this._throttleTimeout);var M=this._lastLogTime?T.date-this._lastLogTime:0;if(this._lastLogTime=T.date,M<this._throttle)try{var D=JSON.stringify([T.type,T.tag,T.args]),I=this._lastLogSerialized===D;if(this._lastLogSerialized=D,I&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(P,this._throttle))}catch{}P(!0)}},{key:"_log",value:function(m){var _,O=d(this._reporters);try{for(O.s();!(_=O.n()).done;)_.value.log(m,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(N){O.e(N)}finally{O.f()}}},{key:"_logAsync",value:function(m){var _=this;return Promise.all(this._reporters.map(function(O){return O.log(m,{async:!0,stdout:_.stdout,stderr:_.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),C}();b.prototype.add=b.prototype.addReporter,b.prototype.remove=b.prototype.removeReporter,b.prototype.clear=b.prototype.removeReporter,b.prototype.withScope=b.prototype.withTag,b.prototype.mock=b.prototype.mockTypes,b.prototype.pause=b.prototype.pauseLogs,b.prototype.resume=b.prototype.resumeLogs;var S,E=function(){function C(m){n(this,C),this.options=Object.assign({},m),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return o(C,[{key:"log",value:function(m){var _=m.level<1?console.__error||console.error:m.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,O=m.type!=="log"?m.type:"",N=m.tag?m.tag:"",T=this.typeColorMap[m.type]||this.levelColorMap[m.level]||this.defaultColor,P=`
137
- background: `.concat(T,`;
113
+ */var sN=g,lN=Symbol.for("react.element"),cN=Symbol.for("react.fragment"),uN=Object.prototype.hasOwnProperty,dN=sN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fN={key:!0,ref:!0,__self:!0,__source:!0};function Kg(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)uN.call(t,r)&&!fN.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:lN,type:e,key:a,ref:i,props:o,_owner:dN.current}}ki.Fragment=cN;ki.jsx=Kg;ki.jsxs=Kg;Gg.exports=ki;var pN=Gg.exports;const hN=pN.jsx,wn=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},gN=[...aN,...QO],vN=gN.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),g.createElement(t,{...o,...wn(r)},...a)},e),{}),mN=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=wn(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},yN=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(g.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),w("canvas",{...r,...wn(n)})),bN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...wn(t)},...r)},wN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...wn(t)},...r)},SN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...wn(t)},...r)},xN=({$$attributes:e=[],content:t,...n})=>w("span",{...n,...wn(e),children:t}),CN=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),g.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),hN("div",{...o,...wn(t),children:a})},ON=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=wn(t),s={...a,...r.style||{}};return g.createElement(n,{...r,...i,style:s},...o)},EN={RootContainer:({children:e})=>e,...vN,CContainer:CN,CVideo:wN,CAudio:SN,CBlock:mN,CImage:bN,CText:xN,CCanvas:yN,CNativeTag:ON};class _N{constructor(){J(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class RN extends g.Component{constructor(t){super(t),J(this,"refManager"),J(this,"dynamicComponentInstanceMap",new Map),J(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),J(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if($r(n)&&bg(n)){const r=n;this.setState({pageModel:new ai(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new ai(t.page)},this.refManager=new _N}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...EN,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class NN extends g.Component{constructor(t){super(t),J(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=ee("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,ee("p",{children:["msg: ",String(this.state.error)]}),w("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),w("div",{style:{display:"none"}})]});return g.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class TN{constructor(){J(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const PN=e=>{const{node:t}=e,n=g.useMemo(()=>{const s=t.isContainer();return $r(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return w("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minWidth:"300px",minHeight:"50px",width:a,height:o,...i},children:r})};class Y5 extends g.Component{constructor(t){super(t),J(this,"instanceManager",new TN),J(this,"renderRef"),J(this,"dropPlaceholder",PN),J(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends g.Component{constructor(){super(...arguments),J(this,"_DESIGN_BOX",!0),J(this,"_NODE_MODEL",r),J(this,"_NODE_ID",r.id),J(this,"_UNIQUE_ID",`${r.id}_${yn()}`),J(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){const{children:d=[],onlyRenderChild:f,...p}=this.props;let h=d;return Dr(d)||(h=[d]),!h.filter(Boolean).length&&(r.isContainer()||r.value.componentName===qr.ROOT_CONTAINER)&&h.push(g.createElement(i.dropPlaceholder,{node:r})),f?h:g.createElement(s,p,...h)}}return g.forwardRef(function(u,d){return w(NN,{node:r,targetComponent:c,children:g.createElement(c,{ref:d,...u})})})}),this.renderRef=g.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=qg(t);if(!n)return null;const r=Yg(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=Wy.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),w(RN,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let d={...c};const f=((s=i.value.configure)==null?void 0:s.devState)||{},p=(l=i.material)==null?void 0:l.value.fixedProps;if(p!==void 0){if($r(p))d={...d,...p};else if(typeof p=="function"){const m=p(d);d={...d,...m}}}let h=u;return f.condition===!1&&(h=f.condition),{props:G2(d,f.props||{}),condition:h}},ref:this.renderRef})}}const qg=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:qg(e.parentElement)},Yg=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Yg(e.return):null};var kN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(iN,function(){var n=function(){},r={},o={},a={};function i(f,p){f=f.push?f:[f];var h=[],m=f.length,b=m,y,S,E,x;for(y=function(v,O){O.length&&h.push(v),b--,b||p(h)};m--;){if(S=f[m],E=o[S],E){y(S,E);continue}x=a[S]=a[S]||[],x.push(y)}}function s(f,p){if(f){var h=a[f];if(o[f]=p,!!h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function l(f,p){f.call&&(f={success:f}),p.length?(f.error||n)(p):(f.success||n)(f)}function c(f,p,h,m){var b=document,y=h.async,S=(h.numRetries||0)+1,E=h.before||n,x=f.replace(/[\?|#].*$/,""),v=f.replace(/^(css|img|module|nomodule)!/,""),O,C,R;if(m=m||0,/(^css!|\.css$)/.test(x))R=b.createElement("link"),R.rel="stylesheet",R.href=v,O="hideFocus"in R,O&&R.relList&&(O=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))R=b.createElement("img"),R.src=v;else if(R=b.createElement("script"),R.src=v,R.async=y===void 0?!0:y,C="noModule"in R,/^module!/.test(x)){if(!C)return p(f,"l");R.type="module"}else if(/^nomodule!/.test(x)&&C)return p(f,"l");R.onload=R.onerror=R.onbeforeload=function(N){var T=N.type[0];if(O)try{R.sheet.cssText.length||(T="e")}catch(k){k.code!=18&&(T="e")}if(T=="e"){if(m+=1,m<S)return c(f,p,h,m)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";p(f,T,N.defaultPrevented)},E(f,R)!==!1&&b.head.appendChild(R)}function u(f,p,h){f=f.push?f:[f];var m=f.length,b=m,y=[],S,E;for(S=function(x,v,O){if(v=="e"&&y.push(x),v=="b")if(O)y.push(x);else return;m--,m||p(y)},E=0;E<b;E++)c(f[E],S,h)}function d(f,p,h){var m,b;if(p&&p.trim&&(m=p),b=(m?h:p)||{},m){if(m in r)throw"LoadJS";r[m]=!0}function y(S,E){u(f,function(x){l(b,x),S&&l({success:S,error:E},x),s(m,x)},b)}if(b.returnPromise)return new Promise(y);y()}return d.ready=function(f,p){return i(f,function(h){l(p,h)}),d},d.done=function(f){s(f,[])},d.reset=function(){r={},o={},a={}},d.isDefined=function(f){return f in r},d})})(kN);const Xg=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},Jg=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,d=l.ReactDOMClient,f=l.CRender,p=o||(a==null?void 0:a.export());if(!p){console.log("page schema is empty");return}const h=[...r,...p.assets||[]];new f.AssetLoader(h,{window:n.getWindow()}).onSuccess(()=>{const b=Xn.collectVariable(h,l),y=Xn.flatObject(b),S=Z2(b,p.thirdLibs||[]),E=u==null?void 0:u.createElement(f.DesignRender,{adapter:f==null?void 0:f.ReactAdapter,page:o,pageModel:a,components:{...y,...e},$$context:{thirdLibs:S},onMount:x=>{i(x)}});d.createRoot(c.getElementById("app")).render(E)}).onError(()=>{console.log("资源加载出错")}).load()};var Qg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(So,function(){function n(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function r(x,v){for(var O=0;O<v.length;O++){var C=v[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(x,C.key,C)}}function o(x,v,O){return v&&r(x.prototype,v),O&&r(x,O),x}function a(x,v,O){return v in x?Object.defineProperty(x,v,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[v]=O,x}function i(x,v){var O=Object.keys(x);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(x);v&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(x,R).enumerable})),O.push.apply(O,C)}return O}function s(x){for(var v=1;v<arguments.length;v++){var O=arguments[v]!=null?arguments[v]:{};v%2?i(Object(O),!0).forEach(function(C){a(x,C,O[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(O)):i(Object(O)).forEach(function(C){Object.defineProperty(x,C,Object.getOwnPropertyDescriptor(O,C))})}return x}function l(x){return function(v){if(Array.isArray(v))return u(v)}(x)||function(v){if(typeof Symbol<"u"&&Symbol.iterator in Object(v))return Array.from(v)}(x)||c(x)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
114
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(x,v){if(x){if(typeof x=="string")return u(x,v);var O=Object.prototype.toString.call(x).slice(8,-1);return O==="Object"&&x.constructor&&(O=x.constructor.name),O==="Map"||O==="Set"?Array.from(x):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?u(x,v):void 0}}function u(x,v){(v==null||v>x.length)&&(v=x.length);for(var O=0,C=new Array(v);O<v;O++)C[O]=x[O];return C}function d(x){if(typeof Symbol>"u"||x[Symbol.iterator]==null){if(Array.isArray(x)||(x=c(x))){var v=0,O=function(){};return{s:O,n:function(){return v>=x.length?{done:!0}:{done:!1,value:x[v++]}},e:function(k){throw k},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
115
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C,R,N=!0,T=!1;return{s:function(){C=x[Symbol.iterator]()},n:function(){var k=C.next();return N=k.done,k},e:function(k){T=!0,R=k},f:function(){try{N||C.return==null||C.return()}finally{if(T)throw R}}}}var f={};f[f.Fatal=0]="Fatal",f[f.Error=0]="Error",f[f.Warn=1]="Warn",f[f.Log=2]="Log",f[f.Info=3]="Info",f[f.Success=3]="Success",f[f.Debug=4]="Debug",f[f.Trace=5]="Trace",f[f.Silent=-1/0]="Silent",f[f.Verbose=1/0]="Verbose";var p={silent:{level:-1},fatal:{level:f.Fatal},error:{level:f.Error},warn:{level:f.Warn},log:{level:f.Log},info:{level:f.Info},success:{level:f.Success},debug:{level:f.Debug},trace:{level:f.Trace},verbose:{level:f.Trace},ready:{level:f.Info},start:{level:f.Info}};function h(x){return v=x,Object.prototype.toString.call(v)==="[object Object]"&&!(!x.message&&!x.args)&&!x.stack;var v}var m=!1,b=[],y=function(){function x(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var O in n(this,x),this._reporters=v.reporters||[],this._types=v.types||p,this.level=v.level!==void 0?v.level:3,this._defaults=v.defaults||{},this._async=v.async!==void 0?v.async:void 0,this._stdout=v.stdout,this._stderr=v.stderr,this._mockFn=v.mockFn,this._throttle=v.throttle||1e3,this._throttleMin=v.throttleMin||5,this._types){var C=s(s({type:O},this._types[O]),this._defaults);this[O]=this._wrapLogFn(C),this[O].raw=this._wrapLogFn(C,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return o(x,[{key:"create",value:function(v){return new x(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},v))}},{key:"withDefaults",value:function(v){return this.create({defaults:Object.assign({},this._defaults,v)})}},{key:"withTag",value:function(v){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+v:v})}},{key:"addReporter",value:function(v){return this._reporters.push(v),this}},{key:"removeReporter",value:function(v){if(v){var O=this._reporters.indexOf(v);if(O>=0)return this._reporters.splice(O,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(v){return this._reporters=Array.isArray(v)?v:[v],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var v in this._types)console["__"+v]||(console["__"+v]=console[v]),console[v]=this[v].raw}},{key:"restoreConsole",value:function(){for(var v in this._types)console["__"+v]&&(console[v]=console["__"+v],delete console["__"+v])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(v,O){var C=this;v&&(v.__write||(v.__write=v.write),v.write=function(R){C[O].raw(String(R).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(v){v&&v.__write&&(v.write=v.__write,delete v.__write)}},{key:"pauseLogs",value:function(){m=!0}},{key:"resumeLogs",value:function(){m=!1;var v,O=d(b.splice(0));try{for(O.s();!(v=O.n()).done;){var C=v.value;C[0]._logFn(C[1],C[2])}}catch(R){O.e(R)}finally{O.f()}}},{key:"mockTypes",value:function(v){if(this._mockFn=v||this._mockFn,typeof this._mockFn=="function")for(var O in this._types)this[O]=this._mockFn(O,this._types[O])||this[O],this[O].raw=this[O]}},{key:"_wrapLogFn",value:function(v,O){var C=this;return function(){for(var R=arguments.length,N=new Array(R),T=0;T<R;T++)N[T]=arguments[T];if(!m)return C._logFn(v,N,O);b.push([C,v,N,O])}}},{key:"_logFn",value:function(v,O,C){var R=this;if(v.level>this.level)return!!this._async&&Promise.resolve(!1);var N=Object.assign({date:new Date,args:[]},v);!C&&O.length===1&&h(O[0])?Object.assign(N,O[0]):N.args=Array.from(O),N.message&&(N.args.unshift(N.message),delete N.message),N.additional&&(Array.isArray(N.additional)||(N.additional=N.additional.split(`
116
+ `)),N.args.push(`
117
+ `+N.additional.join(`
118
+ `)),delete N.additional),N.type=typeof N.type=="string"?N.type.toLowerCase():"",N.tag=typeof N.tag=="string"?N.tag.toLowerCase():"";var T=function(){var M=arguments.length>0&&arguments[0]!==void 0&&arguments[0],P=R._lastLogCount-R._throttleMin;if(R._lastLog&&P>0){var D=l(R._lastLog.args);P>1&&D.push("(repeated ".concat(P," times)")),R._log(s(s({},R._lastLog),{},{args:D})),R._lastLogCount=1}if(M){if(R._lastLog=N,R._async)return R._logAsync(N);R._log(N)}};clearTimeout(this._throttleTimeout);var k=this._lastLogTime?N.date-this._lastLogTime:0;if(this._lastLogTime=N.date,k<this._throttle)try{var j=JSON.stringify([N.type,N.tag,N.args]),L=this._lastLogSerialized===j;if(this._lastLogSerialized=j,L&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(T,this._throttle))}catch{}T(!0)}},{key:"_log",value:function(v){var O,C=d(this._reporters);try{for(C.s();!(O=C.n()).done;)O.value.log(v,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(R){C.e(R)}finally{C.f()}}},{key:"_logAsync",value:function(v){var O=this;return Promise.all(this._reporters.map(function(C){return C.log(v,{async:!0,stdout:O.stdout,stderr:O.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),x}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var S,E=function(){function x(v){n(this,x),this.options=Object.assign({},v),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return o(x,[{key:"log",value:function(v){var O=v.level<1?console.__error||console.error:v.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,C=v.type!=="log"?v.type:"",R=v.tag?v.tag:"",N=this.typeColorMap[v.type]||this.levelColorMap[v.level]||this.defaultColor,T=`
119
+ background: `.concat(N,`;
138
120
  border-radius: 0.5em;
139
121
  color: white;
140
122
  font-weight: bold;
141
123
  padding: 2px 0.5em;
142
- `),M="%c".concat([N,O].filter(Boolean).join(":"));typeof m.args[0]=="string"?_.apply(void 0,["".concat(M,"%c ").concat(m.args[0]),P,""].concat(l(m.args.slice(1)))):_.apply(void 0,[M,P].concat(l(m.args)))}}]),C}();return typeof window<"u"&&window.consola||((S=new b({reporters:[new E]})).Consola=b,S.LogLevel=f,S.BrowserReporter=E,S)})})(Zg);var N2=Zg.exports;const T2=Ql(N2),Ht=T2.create({level:1}),Bn=e=>new Promise(t=>{setTimeout(()=>{t("ok")},e??1e3/60*2)});class P2 extends v.Component{constructor(n){super(n);F(this,"emitter");F(this,"leftPanelContentRef");F(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});F(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});F(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await Bn(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});F(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await Bn(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});F(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});F(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});F(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});F(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});F(this,"replaceBodyView",n=>{this.setState({bodyView:n})});F(this,"replaceRightView",n=>{this.setState({rightView:n})});F(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});F(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});F(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});F(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});F(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||si(),this.leftPanelContentRef=v.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:d,subTopToolBarView:f}=this.state,p={};o||(p.position="absolute",p.left="50px",p.top=0);const g=s.find(C=>C.name===l),y=(g==null?void 0:g.render)||null,{onPluginIconClick:w,toggleRightPanel:b,toggleLeftPanel:S,onLeftBoxResizeStop:E}=this;return se("div",{className:Fe.workbenchContainer,children:[x("div",{className:Fe.topToolBarBox,children:x("div",{className:Fe.topToolBarView,children:d})}),se("div",{className:Fe.bodyContent,children:[se("div",{className:Fe.leftBox,ref:this.leftPanelContentRef,children:[x("div",{className:Fe.pluginIconBar,children:s.map(C=>x("div",{onClick:()=>w(C),className:yt([Fe.pluginIconItem,(g==null?void 0:g.name)===C.name&&Fe.active]),children:C.icon},C.name))}),n&&se(Tu,{className:Fe.pluginPanelBoxResizeBox,size:r,style:p,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:E,children:[se("div",{className:Fe.pluginHeader,children:[x("span",{className:Fe.pluginNameText,children:(g==null?void 0:g.title)||(g==null?void 0:g.name)}),x(Z.Button,{className:yt([Fe.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:x(B0,{className:yt([o&&Fe.active])})}),x(Z.Button,{className:Fe.closeBtn,type:"text",size:"small",onClick:S,children:x(h0,{})})]}),x("div",{className:Fe.pluginPanelBox,children:y})]})]}),se("div",{className:Fe.centerBox,children:[f&&x("div",{className:Fe.subTopToolbarBox,children:f}),x("div",{className:Fe.canvasBox,children:x("div",{className:Fe.scrollBox,children:c})})]}),se("div",{className:Fe.rightResizeBox,children:[x("div",{className:Fe.arrowCursor,onClick:b,children:x(O0,{className:yt([!i&&Fe.active])})}),x("div",{style:{display:i?"block":"none",height:"100%"},children:x(Tu,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(C,m,_,O)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+O.width,height:this.state.rightBoxSize.height}})},children:x("div",{className:Fe.rightBox,children:u})})})]})]})]})}}const k2="_engineContainer_f3ly9_2",j2={engineContainer:k2};function dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jp(r.key),r)}}function ft(e,t,n){return t&&Fd(e.prototype,t),n&&Fd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function an(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vl(e,t){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vl(e,t)}function co(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vl(e,t)}function uo(e,t){if(t&&(Te(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return an(e)}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lt(e)}function ev(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tv(e){return Qp(e)||ev(e)||ec(e)||Zp()}function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vd(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var M2={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},A2=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};dt(this,e),this.init(t,n)}return ft(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||M2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,Hd(Hd({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),on=new A2,zn=function(){function e(){dt(this,e),this.observers={}}return ft(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function Po(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function Ud(e){return e==null?"":""+e}function D2(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function zc(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function Wd(e,t,n){var r=zc(e,t,Object),o=r.obj,a=r.k;o[a]=n}function $2(e,t,n,r){var o=zc(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function hi(e,t){var n=zc(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Gd(e,t,n){var r=hi(e,n);return r!==void 0?r:hi(t,n)}function nv(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):nv(e[r],t[r],n):e[r]=t[r]);return e}function Or(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function L2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return I2[t]}):e}var Li=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,B2=[" ",",","?","!",";"];function z2(e,t,n){t=t||"",n=n||"";var r=B2.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F2(e){var t=V2();return function(){var r=Lt(e),o;if(t){var a=Lt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return uo(this,o)}}function V2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?rv(l,c,n):void 0}o=o[r[a]]}return o}}var H2=function(e){co(n,e);var t=F2(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return dt(this,n),o=t.call(this),Li&&zn.call(an(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return ft(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var d=hi(this.data,u);return d||!c||typeof i!="string"?d:rv(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),Wd(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var d=hi(this.data,u)||{};s?nv(d,i,l):d=Da(Da({},d),i),Wd(this.data,u,d),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Da(Da({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(zn),ov={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qd(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U2(e){var t=W2();return function(){var r=Lt(e),o;if(t){var a=Lt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return uo(this,o)}}function W2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Yd={},Xd=function(e){co(n,e);var t=U2(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return dt(this,n),o=t.call(this),Li&&zn.call(an(o)),D2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,an(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=on.create("translator"),o}return ft(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!z2(o,i,s);if(c&&!u){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(Te(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),d=u.key,f=u.namespaces,p=f[f.length-1],g=a.lng||this.language,y=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(y){var w=a.nsSeparator||this.options.nsSeparator;return l?(b.res="".concat(p).concat(w).concat(d),b):"".concat(p).concat(w).concat(d)}return l?(b.res=d,b):d}var b=this.resolve(o,a),S=b&&b.res,E=b&&b.usedKey||d,C=b&&b.exactUsedKey||d,m=Object.prototype.toString.apply(S),_=["[object Number]","[object Function]","[object RegExp]"],O=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,N=!this.i18nFormat||this.i18nFormat.handleAsObject,T=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(N&&S&&T&&_.indexOf(m)<0&&!(typeof O=="string"&&m==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,S,pt(pt({},a),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(b.res=P,b):P}if(c){var M=m==="[object Array]",D=M?[]:{},I=M?C:E;for(var A in S)if(Object.prototype.hasOwnProperty.call(S,A)){var j="".concat(I).concat(c).concat(A);D[A]=this.translate(j,pt(pt({},a),{joinArrays:!1,ns:f})),D[A]===j&&(D[A]=S[A])}S=D}}else if(N&&typeof O=="string"&&m==="[object Array]")S=S.join(O),S&&(S=this.extendTranslation(S,o,a,i));else{var L=!1,H=!1,ie=a.count!==void 0&&typeof a.count!="string",ne=n.hasDefaultValue(a),he=ie?this.pluralResolver.getSuffix(g,a.count,a):"",$=a["defaultValue".concat(he)]||a.defaultValue;!this.isValidLookup(S)&&ne&&(L=!0,S=$),this.isValidLookup(S)||(H=!0,S=d);var z=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,J=z&&H?void 0:S,re=ne&&$!==S&&this.options.updateMissing;if(H||L||re){if(this.logger.log(re?"updateKey":"missingKey",g,p,d,re?$:S),c){var de=this.resolve(d,pt(pt({},a),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var fe=[],He=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&He&&He[0])for(var _e=0;_e<He.length;_e++)fe.push(He[_e]);else this.options.saveMissingTo==="all"?fe=this.languageUtils.toResolveHierarchy(a.lng||this.language):fe.push(a.lng||this.language);var $e=function(Ie,V,qe){var Be=ne&&qe!==S?qe:J;s.options.missingKeyHandler?s.options.missingKeyHandler(Ie,p,V,Be,re,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(Ie,p,V,Be,re,a),s.emit("missingKey",Ie,p,V,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ie?fe.forEach(function(oe){s.pluralResolver.getSuffixes(oe,a).forEach(function(Ie){$e([oe],d+Ie,a["defaultValue".concat(Ie)]||$)})}):$e(fe,d,$))}S=this.extendTranslation(S,o,a,b,i),H&&S===d&&this.options.appendNamespaceToMissingKey&&(S="".concat(p,":").concat(d)),(H||L)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,L?S:void 0):S=this.options.parseMissingKeyHandler(S))}return l?(b.res=S,b):S}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,pt(pt({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(pt(pt({},i),{interpolation:pt(pt({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(p=pt(pt({},this.options.interpolation.defaultVariables),p)),o=this.interpolator.interpolate(o,p,i.lng||this.language,i),u){var g=o.match(this.interpolator.nestingRegexp),y=g&&g.length;d<y&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var S=arguments.length,E=new Array(S),C=0;C<S;C++)E[C]=arguments[C];return l&&l[0]===E[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var w=i.postProcess||this.options.postProcess,b=typeof w=="string"?[w]:w;return o!=null&&b&&b.length&&i.applyPostProcessor!==!1&&(o=ov.handle(b,o,a,this.options&&this.options.postProcessPassResolved?pt({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!a.isValidLookup(s)){var p=a.extractFromKey(f,i),g=p.key;l=g;var y=p.namespaces;a.options.fallbackNS&&(y=y.concat(a.options.fallbackNS));var w=i.count!==void 0&&typeof i.count!="string",b=w&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),S=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",E=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);y.forEach(function(C){a.isValidLookup(s)||(d=C,!Yd["".concat(E[0],"-").concat(C)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(d)&&(Yd["".concat(E[0],"-").concat(C)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(m){if(!a.isValidLookup(s)){u=m;var _=[g];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(_,g,m,C,i);else{var O;w&&(O=a.pluralResolver.getSuffix(m,i.count,i));var N="".concat(a.options.pluralSeparator,"zero");if(w&&(_.push(g+O),b&&_.push(g+N)),S){var T="".concat(g).concat(a.options.contextSeparator).concat(i.context);_.push(T),w&&(_.push(T+O),b&&_.push(T+N))}}for(var P;P=_.pop();)a.isValidLookup(s)||(c=P,s=a.getResource(m,C,P,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(zn);function gs(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Jd=function(){function e(t){dt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}return ft(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=gs(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=gs(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=gs(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),G2=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],K2={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},q2=["v1","v2","v3"],Qd={zero:0,one:1,two:2,few:3,many:4,other:5};function Y2(){var e={};return G2.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:K2[t.fc]}})}),e}var X2=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};dt(this,e),this.languageUtils=t,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Y2()}return ft(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return Qd[i]-Qd[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!q2.includes(this.options.compatibilityJSON)}}]),e}();function Zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zd(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var J2=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(this,e),this.logger=on.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ft(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:L2,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Or(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Or(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Or(r.nestingPrefix):r.nestingPrefixEscaped||Or("$t("),this.nestingSuffix=r.nestingSuffix?Or(r.nestingSuffix):r.nestingSuffixEscaped||Or(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(w){return w.replace(/\$/g,"$$$$")}var f=function(b){if(b.indexOf(i.formatSeparator)<0){var S=Gd(r,u,b);return i.alwaysFormat?i.format(S,void 0,o,Ft(Ft(Ft({},a),r),{},{interpolationkey:b})):S}var E=b.split(i.formatSeparator),C=E.shift().trim(),m=E.join(i.formatSeparator).trim();return i.format(Gd(r,u,C),m,o,Ft(Ft(Ft({},a),r),{},{interpolationkey:C}))};this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,g=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(b){return d(b)}},{regex:this.regexp,safeValue:function(b){return i.escapeValue?d(i.escape(b)):d(b)}}];return y.forEach(function(w){for(c=0;s=w.regex.exec(n);){var b=s[1].trim();if(l=f(b),l===void 0)if(typeof p=="function"){var S=p(n,s,a);l=typeof S=="string"?S:""}else if(a&&a.hasOwnProperty(b))l="";else if(g){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(b," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=Ud(l));var E=w.safeValue(l);if(n=n.replace(s[0],E),g?(w.regex.lastIndex+=l.length,w.regex.lastIndex-=s[0].length):w.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(p,g){var y=this.nestingOptionsSeparator;if(p.indexOf(y)<0)return p;var w=p.split(new RegExp("".concat(y,"[ ]*{"))),b="{".concat(w[1]);p=w[0],b=this.interpolate(b,l);var S=b.match(/'/g),E=b.match(/"/g);(S&&S.length%2===0&&!E||E.length%2!==0)&&(b=b.replace(/'/g,'"'));try{l=JSON.parse(b),g&&(l=Ft(Ft({},g),l))}catch(C){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),C),"".concat(p).concat(y).concat(b)}return delete l.defaultValue,p}for(;i=this.nestingRegexp.exec(n);){var u=[];l=Ft({},a),l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var f=i[1].split(this.formatSeparator).map(function(p){return p.trim()});i[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=Ud(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,g){return o.format(p,g,a.lng,Ft(Ft({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ef(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q2(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=tv(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function _r(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var Z2=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(this,e),this.logger=on.create("formatter"),this.options=t,this.formats={number:_r(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:_r(function(n,r){var o=new Intl.NumberFormat(n,Mn(Mn({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:_r(function(n,r){var o=new Intl.DateTimeFormat(n,Mn({},r));return function(a){return o.format(a)}}),relativetime:_r(function(n,r){var o=new Intl.RelativeTimeFormat(n,Mn({},r));return function(a){return o.format(a,r.range||"day")}}),list:_r(function(n,r){var o=new Intl.ListFormat(n,Mn({},r));return function(a){return o.format(a)}})},this.init(t)}return ft(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=_r(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=Q2(u),f=d.formatName,p=d.formatOptions;if(i.formats[f]){var g=c;try{var y=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},w=y.locale||y.lng||a.locale||a.lng||o;g=i.formats[f](c,w,Mn(Mn(Mn({},p),a),y))}catch(b){i.logger.warn(b)}return g}else i.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function nf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eT(e){var t=tT();return function(){var r=Lt(e),o;if(t){var a=Lt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return uo(this,o)}}function tT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var rT=function(e){co(n,e);var t=eT(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return dt(this,n),i=t.call(this),Li&&zn.call(an(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=on.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return ft(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},d={},f={};return o.forEach(function(p){var g=!0;a.forEach(function(y){var w="".concat(p,"|").concat(y);!i.reload&&l.store.hasResourceBundle(p,y)?l.state[w]=2:l.state[w]<0||(l.state[w]===1?u[w]===void 0&&(u[w]=!0):(l.state[w]=1,g=!1,u[w]===void 0&&(u[w]=!0),c[w]===void 0&&(c[w]=!0),f[y]===void 0&&(f[y]=!0)))}),g||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(d){$2(d.loaded,[l],c),nT(d,o),a&&d.errors.push(a),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(g){u[f][g]===void 0&&(u[f][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var d=function(y,w){if(s.readingCalls--,s.waitingReads.length>0){var b=s.waitingReads.shift();s.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(y&&w&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(y,w)},f=this.backend[i].bind(this.backend);if(f.length===2){try{var p=f(o,a);p&&typeof p.then=="function"?p.then(function(g){return d(null,g)}).catch(d):d(null,p)}catch(g){d(g)}return}return f(o,a,d)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),d),a.loaded(o,u,d)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var d=nf(nf({},c),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var p;f.length===5?p=f(o,a,i,s,d):p=f(o,a,i,s),p&&typeof p.then=="function"?p.then(function(g){return u(null,g)}).catch(u):u(null,p)}catch(g){u(g)}else f(o,a,i,s,u,d)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(zn);function rf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Te(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Te(t[2])==="object"||Te(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function of(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function af(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?af(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oT(e){var t=aT();return function(){var r=Lt(e),o;if(t){var a=Lt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return uo(this,o)}}function aT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $a(){}function iT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var gi=function(e){co(n,e);var t=oT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(dt(this,n),r=t.call(this),Li&&zn.call(an(r)),r.options=of(o),r.services={},r.logger=on,r.modules={external:[]},iT(an(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),uo(r,an(r));setTimeout(function(){r.init(o,a)},0)}return r}return ft(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=rf();this.options=tn(tn(tn({},s),this.options),of(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=tn(tn({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(b){return b?typeof b=="function"?new b:b:null}if(!this.options.isClone){this.modules.logger?on.init(l(this.modules.logger),this.options):on.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Z2);var u=new Jd(this.options);this.store=new H2(this.options.resources,this.options);var d=this.services;d.logger=on,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new X2(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new J2(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new rT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(b){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];o.emit.apply(o,[b].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Xd(this.services,this.options),this.translator.on("*",function(b){for(var S=arguments.length,E=new Array(S>1?S-1:0),C=1;C<S;C++)E[C-1]=arguments[C];o.emit.apply(o,[b].concat(E))}),this.modules.external.forEach(function(b){b.init&&b.init(o)})}if(this.format=this.options.interpolation.format,i||(i=$a),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(b){o[b]=function(){var S;return(S=o.store)[b].apply(S,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(b){o[b]=function(){var S;return(S=o.store)[b].apply(S,arguments),o}});var y=Po(),w=function(){var S=function(C,m){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),y.resolve(m),i(C,m)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return S(null,o.t.bind(o));o.changeLanguage(o.options.lng,S)};return this.options.resources||!this.options.initImmediate?w():setTimeout(w,0),y}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(p){var g=a.services.languageUtils.toResolveHierarchy(p);g.forEach(function(y){c.indexOf(y)<0&&c.push(y)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=Po();return o||(o=this.languages),a||(a=this.options.ns),i||(i=$a),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&ov.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=Po();this.emit("languageChanging",o);var l=function(f){i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.resolvedLanguage=void 0,i.setResolvedLanguage(f)},c=function(f,p){p?(l(p),i.translator.changeLanguage(p),i.isLanguageChangingTo=void 0,i.emit("languageChanged",p),i.logger.log("languageChanged",p)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(f,function(){return i.t.apply(i,arguments)})},u=function(f){!o&&!f&&i.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:i.services.languageUtils.getBestMatchFromCodes(f);p&&(i.language||l(p),i.translator.language||i.translator.changeLanguage(p),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(p)),i.loadResources(p,function(g){c(g,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,d){var f;if(Te(d)!=="object"){for(var p=arguments.length,g=new Array(p>2?p-2:0),y=2;y<p;y++)g[y-2]=arguments[y];f=s.options.overloadTranslationOptionHandler([u,d].concat(g))}else f=tn({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||i||c.keyPrefix;var w=s.options.keySeparator||".",b=f.keyPrefix?"".concat(f.keyPrefix).concat(w).concat(u):u;return s.t(b,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,g){var y=a.services.backendConnector.state["".concat(p,"|").concat(g)];return y===-1||y===2};if(i.precheck){var d=i.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=Po();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=Po();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Jd(rf());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a,s=tn(tn(tn({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=tn({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Xd(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(zn);pe(gi,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new gi(e,t)});var at=gi.createInstance();at.createInstance=gi.createInstance;at.createInstance;at.dir;at.init;at.loadResources;at.reloadResources;at.use;at.changeLanguage;at.getFixedT;at.t;at.exists;at.setDefaultNamespace;at.hasLoadedNamespace;at.loadNamespaces;at.loadLanguages;function sT(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var sf={};function ml(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&sf[t[0]]||(typeof t[0]=="string"&&(sf[t[0]]=new Date),sT.apply(void 0,t))}function lf(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function lT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function cT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return ml("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):lT(e,t,n)}function uT(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var dT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fT={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},pT=function(t){return fT[t]},hT=function(t){return t.replace(dT,pT)};function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function uf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var yl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hT};function gT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yl=uf(uf({},yl),e)}function vT(){return yl}var av;function mT(e){av=e}function yT(){return av}var bT={type:"3rdParty",init:function(t){gT(t.options.react),mT(t)}},wT=v.createContext(),ST=function(){function e(){dt(this,e),this.usedNamespaces={}}return ft(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?df(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var xT=function(t,n){var r=v.useRef();return v.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function CT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=v.useContext(wT)||{},o=r.i18n,a=r.defaultNS,i=n||o||yT();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new ST),!i){ml("You will need to pass in an i18next instance by using initReactI18next");var s=function(T){return Array.isArray(T)?T[T.length-1]:T},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&ml("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=vs(vs(vs({},vT()),i.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||a||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);var p=(i.isInitialized||i.initializedStoreOnce)&&f.every(function(N){return cT(N,i,c)});function g(){return i.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var y=v.useState(g),w=Ne(y,2),b=w[0],S=w[1],E=f.join(),C=xT(E),m=v.useRef(!0);v.useEffect(function(){var N=c.bindI18n,T=c.bindI18nStore;m.current=!0,!p&&!u&&lf(i,f,function(){m.current&&S(g)}),p&&C&&C!==E&&m.current&&S(g);function P(){m.current&&S(g)}return N&&i&&i.on(N,P),T&&i&&i.store.on(T,P),function(){m.current=!1,N&&i&&N.split(" ").forEach(function(M){return i.off(M,P)}),T&&i&&T.split(" ").forEach(function(M){return i.store.off(M,P)})}},[i,E]);var _=v.useRef(!0);v.useEffect(function(){m.current&&!_.current&&S(g),_.current=!1},[i,d]);var O=[b,i,p];if(O.t=b,O.i18n=i,O.ready=p,p||!p&&!u)return O;throw new Promise(function(N){lf(i,f,function(){N()})})}var OT=["forwardedRef"];function ff(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ff(Object(n),!0).forEach(function(r){pe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ff(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Lr(i,OT),c=CT(e,Ia(Ia({},l),{},{keyPrefix:t.keyPrefix})),u=Ne(c,3),d=u[0],f=u[1],p=u[2],g=Ia(Ia({},l),{},{t:d,i18n:f,tReady:p});return t.withRef&&s?g.ref=s:!t.withRef&&s&&(g.forwardedRef=s),v.createElement(r,g)}o.displayName="withI18nextTranslation(".concat(uT(r),")"),o.WrappedComponent=r;var a=function(s,l){return v.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?v.forwardRef(a):o}}const _T={translation:{"Welcome to React":"欢迎使用 React"}},ET={translation:{"Welcome to React":"Welcome to React and react-i18next"}},RT={zh_CN:_T,en_US:ET};at.use(bT).init({resources:RT,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const iv=at;iv.update=()=>{setTimeout(()=>{at.emit("added")},0)};class NT{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){F(this,"plugins",new Map);F(this,"emitter",si());F(this,"getWorkbench");F(this,"pageModel");F(this,"i18n");F(this,"assets");F(this,"engine");F(this,"customPluginHooks",{});F(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});F(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:si(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const TT={pluginName:"组件库"},PT={pluginName:"Component Store"},pf={zh_CN:TT,en_US:PT},kT="_container_191p3_2",jT="_tabTitle_191p3_23",sv={container:kT,tabTitle:jT},MT="_square_1b87f_2",AT="_componentItem_1b87f_18",DT="_iconImg_1b87f_41",$T="_iconBox_1b87f_45",IT="_iconText_1b87f_54",ko={square:MT,componentItem:AT,iconImg:DT,iconBox:$T,iconText:IT},LT=e=>{const t={[lv]:e.id},n=v.useMemo(()=>e.iconText?x("div",{className:ko.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?x("img",{className:ko.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=x("div",{className:yt([ko.square,e.containerClassName]),children:se("div",{...t,className:ko.componentItem,style:e.style,children:[x("div",{className:ko.iconBox,children:n}),x("span",{children:e.name})]})});return e.description?x(Z.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},lv="data-drag-key",BT="_ListBox_1q7zr_2",zT="_collapsePanel_1q7zr_23",hf={ListBox:BT,collapsePanel:zT},FT=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||"");if(!t.length)return null;const r=v.useMemo(()=>t.map(o=>{const a=o.name||"",i=x("div",{className:hf.collapsePanel,children:o.list.map(s=>x(LT,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[]);return x("div",{className:hf.ListBox,children:x(Z.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})})},cv=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||cv(e.parentElement,t)};var VT=typeof global=="object"&&global&&global.Object===Object&&global;const uv=VT;var HT=typeof self=="object"&&self&&self.Object===Object&&self,UT=uv||HT||Function("return this")();const fn=UT;var WT=fn.Symbol;const Fn=WT;var dv=Object.prototype,GT=dv.hasOwnProperty,KT=dv.toString,jo=Fn?Fn.toStringTag:void 0;function qT(e){var t=GT.call(e,jo),n=e[jo];try{e[jo]=void 0;var r=!0}catch{}var o=KT.call(e);return r&&(t?e[jo]=n:delete e[jo]),o}var YT=Object.prototype,XT=YT.toString;function JT(e){return XT.call(e)}var QT="[object Null]",ZT="[object Undefined]",gf=Fn?Fn.toStringTag:void 0;function pr(e){return e==null?e===void 0?ZT:QT:gf&&gf in Object(e)?qT(e):JT(e)}function hr(e){return e!=null&&typeof e=="object"}var eP="[object Symbol]";function tP(e){return typeof e=="symbol"||hr(e)&&pr(e)==eP}function nP(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var rP=Array.isArray;const Bi=rP;var oP=1/0,vf=Fn?Fn.prototype:void 0,mf=vf?vf.toString:void 0;function fv(e){if(typeof e=="string")return e;if(Bi(e))return nP(e,fv)+"";if(tP(e))return mf?mf.call(e):"";var t=e+"";return t=="0"&&1/e==-oP?"-0":t}function va(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var aP="[object AsyncFunction]",iP="[object Function]",sP="[object GeneratorFunction]",lP="[object Proxy]";function pv(e){if(!va(e))return!1;var t=pr(e);return t==iP||t==sP||t==aP||t==lP}var cP=fn["__core-js_shared__"];const ms=cP;var yf=function(){var e=/[^.]+$/.exec(ms&&ms.keys&&ms.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uP(e){return!!yf&&yf in e}var dP=Function.prototype,fP=dP.toString;function gr(e){if(e!=null){try{return fP.call(e)}catch{}try{return e+""}catch{}}return""}var pP=/[\\^$.*+?()[\]{}|]/g,hP=/^\[object .+?Constructor\]$/,gP=Function.prototype,vP=Object.prototype,mP=gP.toString,yP=vP.hasOwnProperty,bP=RegExp("^"+mP.call(yP).replace(pP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wP(e){if(!va(e)||uP(e))return!1;var t=pv(e)?bP:hP;return t.test(gr(e))}function SP(e,t){return e==null?void 0:e[t]}function vr(e,t){var n=SP(e,t);return wP(n)?n:void 0}var xP=vr(fn,"WeakMap");const bl=xP;var bf=Object.create,CP=function(){function e(){}return function(t){if(!va(t))return{};if(bf)return bf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const OP=CP;function _P(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var EP=function(){try{var e=vr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const wf=EP;function RP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var NP=9007199254740991,TP=/^(?:0|[1-9]\d*)$/;function PP(e,t){var n=typeof e;return t=t??NP,!!t&&(n=="number"||n!="symbol"&&TP.test(e))&&e>-1&&e%1==0&&e<t}function hv(e,t,n){t=="__proto__"&&wf?wf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gv(e,t){return e===t||e!==e&&t!==t}var kP=Object.prototype,jP=kP.hasOwnProperty;function vv(e,t,n){var r=e[t];(!(jP.call(e,t)&&gv(r,n))||n===void 0&&!(t in e))&&hv(e,t,n)}function zi(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?hv(n,s,l):vv(n,s,l)}return n}var MP=9007199254740991;function mv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MP}function yv(e){return e!=null&&mv(e.length)&&!pv(e)}var AP=Object.prototype;function Fc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||AP;return e===n}function DP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var $P="[object Arguments]";function Sf(e){return hr(e)&&pr(e)==$P}var bv=Object.prototype,IP=bv.hasOwnProperty,LP=bv.propertyIsEnumerable,BP=Sf(function(){return arguments}())?Sf:function(e){return hr(e)&&IP.call(e,"callee")&&!LP.call(e,"callee")};const zP=BP;function FP(){return!1}var wv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xf=wv&&typeof module=="object"&&module&&!module.nodeType&&module,VP=xf&&xf.exports===wv,Cf=VP?fn.Buffer:void 0,HP=Cf?Cf.isBuffer:void 0,UP=HP||FP;const Sv=UP;var WP="[object Arguments]",GP="[object Array]",KP="[object Boolean]",qP="[object Date]",YP="[object Error]",XP="[object Function]",JP="[object Map]",QP="[object Number]",ZP="[object Object]",ek="[object RegExp]",tk="[object Set]",nk="[object String]",rk="[object WeakMap]",ok="[object ArrayBuffer]",ak="[object DataView]",ik="[object Float32Array]",sk="[object Float64Array]",lk="[object Int8Array]",ck="[object Int16Array]",uk="[object Int32Array]",dk="[object Uint8Array]",fk="[object Uint8ClampedArray]",pk="[object Uint16Array]",hk="[object Uint32Array]",Ae={};Ae[ik]=Ae[sk]=Ae[lk]=Ae[ck]=Ae[uk]=Ae[dk]=Ae[fk]=Ae[pk]=Ae[hk]=!0;Ae[WP]=Ae[GP]=Ae[ok]=Ae[KP]=Ae[ak]=Ae[qP]=Ae[YP]=Ae[XP]=Ae[JP]=Ae[QP]=Ae[ZP]=Ae[ek]=Ae[tk]=Ae[nk]=Ae[rk]=!1;function gk(e){return hr(e)&&mv(e.length)&&!!Ae[pr(e)]}function Vc(e){return function(t){return e(t)}}var xv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vo=xv&&typeof module=="object"&&module&&!module.nodeType&&module,vk=Vo&&Vo.exports===xv,ys=vk&&uv.process,mk=function(){try{var e=Vo&&Vo.require&&Vo.require("util").types;return e||ys&&ys.binding&&ys.binding("util")}catch{}}();const qr=mk;var Of=qr&&qr.isTypedArray,yk=Of?Vc(Of):gk;const bk=yk;var wk=Object.prototype,Sk=wk.hasOwnProperty;function Cv(e,t){var n=Bi(e),r=!n&&zP(e),o=!n&&!r&&Sv(e),a=!n&&!r&&!o&&bk(e),i=n||r||o||a,s=i?DP(e.length,String):[],l=s.length;for(var c in e)(t||Sk.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PP(c,l)))&&s.push(c);return s}function Ov(e,t){return function(n){return e(t(n))}}var xk=Ov(Object.keys,Object);const Ck=xk;var Ok=Object.prototype,_k=Ok.hasOwnProperty;function Ek(e){if(!Fc(e))return Ck(e);var t=[];for(var n in Object(e))_k.call(e,n)&&n!="constructor"&&t.push(n);return t}function Hc(e){return yv(e)?Cv(e):Ek(e)}function Rk(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Nk=Object.prototype,Tk=Nk.hasOwnProperty;function Pk(e){if(!va(e))return Rk(e);var t=Fc(e),n=[];for(var r in e)r=="constructor"&&(t||!Tk.call(e,r))||n.push(r);return n}function Uc(e){return yv(e)?Cv(e,!0):Pk(e)}var kk=vr(Object,"create");const oa=kk;function jk(){this.__data__=oa?oa(null):{},this.size=0}function Mk(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ak="__lodash_hash_undefined__",Dk=Object.prototype,$k=Dk.hasOwnProperty;function Ik(e){var t=this.__data__;if(oa){var n=t[e];return n===Ak?void 0:n}return $k.call(t,e)?t[e]:void 0}var Lk=Object.prototype,Bk=Lk.hasOwnProperty;function zk(e){var t=this.__data__;return oa?t[e]!==void 0:Bk.call(t,e)}var Fk="__lodash_hash_undefined__";function Vk(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oa&&t===void 0?Fk:t,this}function lr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lr.prototype.clear=jk;lr.prototype.delete=Mk;lr.prototype.get=Ik;lr.prototype.has=zk;lr.prototype.set=Vk;function Hk(){this.__data__=[],this.size=0}function Fi(e,t){for(var n=e.length;n--;)if(gv(e[n][0],t))return n;return-1}var Uk=Array.prototype,Wk=Uk.splice;function Gk(e){var t=this.__data__,n=Fi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Wk.call(t,n,1),--this.size,!0}function Kk(e){var t=this.__data__,n=Fi(t,e);return n<0?void 0:t[n][1]}function qk(e){return Fi(this.__data__,e)>-1}function Yk(e,t){var n=this.__data__,r=Fi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Pn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pn.prototype.clear=Hk;Pn.prototype.delete=Gk;Pn.prototype.get=Kk;Pn.prototype.has=qk;Pn.prototype.set=Yk;var Xk=vr(fn,"Map");const aa=Xk;function Jk(){this.size=0,this.__data__={hash:new lr,map:new(aa||Pn),string:new lr}}function Qk(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vi(e,t){var n=e.__data__;return Qk(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Zk(e){var t=Vi(this,e).delete(e);return this.size-=t?1:0,t}function ej(e){return Vi(this,e).get(e)}function tj(e){return Vi(this,e).has(e)}function nj(e,t){var n=Vi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function fo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fo.prototype.clear=Jk;fo.prototype.delete=Zk;fo.prototype.get=ej;fo.prototype.has=tj;fo.prototype.set=nj;function _v(e){return e==null?"":fv(e)}function Ev(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var rj=Ov(Object.getPrototypeOf,Object);const Wc=rj;var oj="[object Object]",aj=Function.prototype,ij=Object.prototype,Rv=aj.toString,sj=ij.hasOwnProperty,lj=Rv.call(Object);function Hi(e){if(!hr(e)||pr(e)!=oj)return!1;var t=Wc(e);if(t===null)return!0;var n=sj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rv.call(n)==lj}function cj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function uj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:cj(e,t,n)}var dj="\\ud800-\\udfff",fj="\\u0300-\\u036f",pj="\\ufe20-\\ufe2f",hj="\\u20d0-\\u20ff",gj=fj+pj+hj,vj="\\ufe0e\\ufe0f",mj="\\u200d",yj=RegExp("["+mj+dj+gj+vj+"]");function Nv(e){return yj.test(e)}function bj(e){return e.split("")}var Tv="\\ud800-\\udfff",wj="\\u0300-\\u036f",Sj="\\ufe20-\\ufe2f",xj="\\u20d0-\\u20ff",Cj=wj+Sj+xj,Oj="\\ufe0e\\ufe0f",_j="["+Tv+"]",wl="["+Cj+"]",Sl="\\ud83c[\\udffb-\\udfff]",Ej="(?:"+wl+"|"+Sl+")",Pv="[^"+Tv+"]",kv="(?:\\ud83c[\\udde6-\\uddff]){2}",jv="[\\ud800-\\udbff][\\udc00-\\udfff]",Rj="\\u200d",Mv=Ej+"?",Av="["+Oj+"]?",Nj="(?:"+Rj+"(?:"+[Pv,kv,jv].join("|")+")"+Av+Mv+")*",Tj=Av+Mv+Nj,Pj="(?:"+[Pv+wl+"?",wl,kv,jv,_j].join("|")+")",kj=RegExp(Sl+"(?="+Sl+")|"+Pj+Tj,"g");function jj(e){return e.match(kj)||[]}function Mj(e){return Nv(e)?jj(e):bj(e)}function Aj(e){return function(t){t=_v(t);var n=Nv(t)?Mj(t):void 0,r=n?n[0]:t.charAt(0),o=n?uj(n,1).join(""):t.slice(1);return r[e]()+o}}var Dj=Aj("toUpperCase");const $j=Dj;function Dv(e){return $j(_v(e).toLowerCase())}function Ij(){this.__data__=new Pn,this.size=0}function Lj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Bj(e){return this.__data__.get(e)}function zj(e){return this.__data__.has(e)}var Fj=200;function Vj(e,t){var n=this.__data__;if(n instanceof Pn){var r=n.__data__;if(!aa||r.length<Fj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new fo(r)}return n.set(e,t),this.size=n.size,this}function po(e){var t=this.__data__=new Pn(e);this.size=t.size}po.prototype.clear=Ij;po.prototype.delete=Lj;po.prototype.get=Bj;po.prototype.has=zj;po.prototype.set=Vj;function Hj(e,t){return e&&zi(t,Hc(t),e)}function Uj(e,t){return e&&zi(t,Uc(t),e)}var $v=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_f=$v&&typeof module=="object"&&module&&!module.nodeType&&module,Wj=_f&&_f.exports===$v,Ef=Wj?fn.Buffer:void 0,Rf=Ef?Ef.allocUnsafe:void 0;function Gj(e,t){if(t)return e.slice();var n=e.length,r=Rf?Rf(n):new e.constructor(n);return e.copy(r),r}function Kj(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Iv(){return[]}var qj=Object.prototype,Yj=qj.propertyIsEnumerable,Nf=Object.getOwnPropertySymbols,Xj=Nf?function(e){return e==null?[]:(e=Object(e),Kj(Nf(e),function(t){return Yj.call(e,t)}))}:Iv;const Gc=Xj;function Jj(e,t){return zi(e,Gc(e),t)}var Qj=Object.getOwnPropertySymbols,Zj=Qj?function(e){for(var t=[];e;)Ev(t,Gc(e)),e=Wc(e);return t}:Iv;const Lv=Zj;function eM(e,t){return zi(e,Lv(e),t)}function Bv(e,t,n){var r=t(e);return Bi(e)?r:Ev(r,n(e))}function tM(e){return Bv(e,Hc,Gc)}function nM(e){return Bv(e,Uc,Lv)}var rM=vr(fn,"DataView");const xl=rM;var oM=vr(fn,"Promise");const Cl=oM;var aM=vr(fn,"Set");const Ol=aM;var Tf="[object Map]",iM="[object Object]",Pf="[object Promise]",kf="[object Set]",jf="[object WeakMap]",Mf="[object DataView]",sM=gr(xl),lM=gr(aa),cM=gr(Cl),uM=gr(Ol),dM=gr(bl),Jn=pr;(xl&&Jn(new xl(new ArrayBuffer(1)))!=Mf||aa&&Jn(new aa)!=Tf||Cl&&Jn(Cl.resolve())!=Pf||Ol&&Jn(new Ol)!=kf||bl&&Jn(new bl)!=jf)&&(Jn=function(e){var t=pr(e),n=t==iM?e.constructor:void 0,r=n?gr(n):"";if(r)switch(r){case sM:return Mf;case lM:return Tf;case cM:return Pf;case uM:return kf;case dM:return jf}return t});const Kc=Jn;var fM=Object.prototype,pM=fM.hasOwnProperty;function hM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&pM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var gM=fn.Uint8Array;const Af=gM;function qc(e){var t=new e.constructor(e.byteLength);return new Af(t).set(new Af(e)),t}function vM(e,t){var n=t?qc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var mM=/\w*$/;function yM(e){var t=new e.constructor(e.source,mM.exec(e));return t.lastIndex=e.lastIndex,t}var Df=Fn?Fn.prototype:void 0,$f=Df?Df.valueOf:void 0;function bM(e){return $f?Object($f.call(e)):{}}function wM(e,t){var n=t?qc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var SM="[object Boolean]",xM="[object Date]",CM="[object Map]",OM="[object Number]",_M="[object RegExp]",EM="[object Set]",RM="[object String]",NM="[object Symbol]",TM="[object ArrayBuffer]",PM="[object DataView]",kM="[object Float32Array]",jM="[object Float64Array]",MM="[object Int8Array]",AM="[object Int16Array]",DM="[object Int32Array]",$M="[object Uint8Array]",IM="[object Uint8ClampedArray]",LM="[object Uint16Array]",BM="[object Uint32Array]";function zM(e,t,n){var r=e.constructor;switch(t){case TM:return qc(e);case SM:case xM:return new r(+e);case PM:return vM(e,n);case kM:case jM:case MM:case AM:case DM:case $M:case IM:case LM:case BM:return wM(e,n);case CM:return new r;case OM:case RM:return new r(e);case _M:return yM(e);case EM:return new r;case NM:return bM(e)}}function FM(e){return typeof e.constructor=="function"&&!Fc(e)?OP(Wc(e)):{}}var VM="[object Map]";function HM(e){return hr(e)&&Kc(e)==VM}var If=qr&&qr.isMap,UM=If?Vc(If):HM;const WM=UM;var GM="[object Set]";function KM(e){return hr(e)&&Kc(e)==GM}var Lf=qr&&qr.isSet,qM=Lf?Vc(Lf):KM;const YM=qM;var XM=1,JM=2,QM=4,zv="[object Arguments]",ZM="[object Array]",eA="[object Boolean]",tA="[object Date]",nA="[object Error]",Fv="[object Function]",rA="[object GeneratorFunction]",oA="[object Map]",aA="[object Number]",Vv="[object Object]",iA="[object RegExp]",sA="[object Set]",lA="[object String]",cA="[object Symbol]",uA="[object WeakMap]",dA="[object ArrayBuffer]",fA="[object DataView]",pA="[object Float32Array]",hA="[object Float64Array]",gA="[object Int8Array]",vA="[object Int16Array]",mA="[object Int32Array]",yA="[object Uint8Array]",bA="[object Uint8ClampedArray]",wA="[object Uint16Array]",SA="[object Uint32Array]",Re={};Re[zv]=Re[ZM]=Re[dA]=Re[fA]=Re[eA]=Re[tA]=Re[pA]=Re[hA]=Re[gA]=Re[vA]=Re[mA]=Re[oA]=Re[aA]=Re[Vv]=Re[iA]=Re[sA]=Re[lA]=Re[cA]=Re[yA]=Re[bA]=Re[wA]=Re[SA]=!0;Re[nA]=Re[Fv]=Re[uA]=!1;function Za(e,t,n,r,o,a){var i,s=t&XM,l=t&JM,c=t&QM;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!va(e))return e;var u=Bi(e);if(u){if(i=hM(e),!s)return _P(e,i)}else{var d=Kc(e),f=d==Fv||d==rA;if(Sv(e))return Gj(e,s);if(d==Vv||d==zv||f&&!o){if(i=l||f?{}:FM(e),!s)return l?eM(e,Uj(i,e)):Jj(e,Hj(i,e))}else{if(!Re[d])return o?e:{};i=zM(e,d,s)}}a||(a=new po);var p=a.get(e);if(p)return p;a.set(e,i),YM(e)?e.forEach(function(w){i.add(Za(w,t,n,w,e,a))}):WM(e)&&e.forEach(function(w,b){i.set(b,Za(w,t,n,b,e,a))});var g=c?l?nM:tM:l?Uc:Hc,y=u?void 0:g(e);return RP(y||e,function(w,b){y&&(b=w,w=e[b]),vv(i,b,Za(w,t,n,b,e,a))}),i}var xA=1,CA=4;function Bf(e){return Za(e,xA|CA)}const vi="ComponentLib",_l=`plugin:${vi}`,OA=({children:e})=>x("div",{className:sv.tabTitle,children:e});class _A extends v.Component{constructor(n){super(n);F(this,"containerRef");F(this,"disposeList",[]);F(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===vi&&n&&this.registerDragEvent()});F(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const a=r.pageModel,s=o.export.getDnd(),l=new or.Sensor({name:"ComponentListBox",container:n.current}),c=f=>{const p=f.event.target;if(!p)return;const g=cv(p,lv);if(!g)return;const y=a.materialsModel.findSnippetById(g);if(y)return a==null?void 0:a.createNode(y.schema)};l.setCanDrag(async f=>{const p=c(f);return this.props.pluginCtx.pluginManager.get("Designer").then(g=>{const y=g==null?void 0:g.export;y==null||y.selectNode("")}),{...f,extraData:{dropType:"NEW_ADD",dragNode:p}}}),s.registerSensor(l);const u=()=>{const{getWorkbench:f}=this.props.pluginCtx,p=f();p.state.leftBoxFixed||p.closeLeftPanel()};this.disposeList.push(()=>{s.emitter.off("dragStart",u)}),s.emitter.on("dragStart",u);const d=async f=>{const p=c(f);if(!p)return;const{pageModel:g}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async y=>{var T;const w=y==null?void 0:y.export,b=w==null?void 0:w.getSelectedNodeId(),S=g.getNode(b),E=Oe.findContainerNode(S);let C="CHILD_END",m=S??null;if(S)E===S.parent?S.isContainer()?(C="CHILD_END",m=S,g.addNode(p,S,C)):(C="AFTER",m=S):E&&!Oe.isPageModel(E)&&(C="CHILD_END",m=E);else{const P=g.getRootNode();P&&(C="CHILD_END",m=P)}const _=w==null?void 0:w.getInstance(),O=await(_==null?void 0:_.customAdvanceHook.onNewAdd({dragNode:p,dropNode:m,eventObj:{...f,from:f.event,fromSensor:l,pointer:null,fromPointer:null,extraData:{}}}));if(O===!1)return;let N={dragNode:p,dropNode:m,pos:C};typeof O=="object"&&(N={...N,dragNode:O.addNode??N.dragNode,dropNode:O.dropNode??N.dropNode,pos:((T=O.dropPosInfo)==null?void 0:T.pos)??N.pos}),g.addNode(N.dragNode,N.dropNode,N.pos),setTimeout(()=>{w==null||w.selectNode(N.dragNode.id)},200)})};this.disposeList.push(()=>{l.emitter.off("onClick",d)}),l.emitter.on("onClick",d)});this.containerRef=v.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(pf).forEach(s=>{o.addResourceBundle(s,_l,pf[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,r=n.map(o=>({label:x(OA,{children:Dv(o.name)}),key:o.name,children:x(FT,{dataSource:o.list})}));return x("div",{ref:this.containerRef,className:sv.container,children:x(Z.Tabs,{defaultActiveKey:"BaseComponent",items:r,style:{flex:1}})})}}const Hv={name:vi,async init(e){const t=Kr(_l)(_A),n=Kr(_l)(({t:o})=>x(tt,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:x(n,{}),name:"ComponentLib",icon:x(d0,{}),render:x(t,{pluginCtx:e})})},reload:async()=>{console.log(vi,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Uv="Designer",EA={pluginName:"组件库"},RA={pluginName:"Component Store"},zf={zh_CN:EA,en_US:RA},NA="_toolBarBox_h5ljb_2",TA="_item_h5ljb_10",PA="_layoutSelectBox_h5ljb_20",kA="_hoverBox_h5ljb_25",jA="_hoverBoxActive_h5ljb_35",MA="_hoverItem_h5ljb_39",AA="_placeholder_h5ljb_47",On={toolBarBox:NA,item:TA,layoutSelectBox:PA,hoverBox:kA,hoverBoxActive:jA,hoverItem:MA,placeholder:AA},DA=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=v.useState(!1);return se("div",{className:On.layoutSelectBox,children:[x("div",{className:yt([On.hoverBox,r&&On.hoverBoxActive]),children:e.map(a=>x("div",{className:On.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),x("div",{className:On.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},Wv=e=>{var p;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(g=>{var S;const y=g,w=(S=y.materialsModel.findByComponentName(y.value.componentName))==null?void 0:S.value.title,b=y.value.title||w||y.value.componentName||"";return{key:g.id,label:b||"Empty"}}),c=x("div",{className:On.item,onClick:()=>o((s==null?void 0:s.id)||""),children:x(bh,{})}),u=x("div",{className:On.item,onClick:()=>r((s==null?void 0:s.id)||""),children:x(oc,{})}),d=x("div",{className:On.item,onClick:()=>a((s==null?void 0:s.id)||""),children:x(Oh,{})}),f=x(DA,{dataSource:l.reverse(),onSelect:n,children:x("div",{children:(s==null?void 0:s.value.title)||((p=s==null?void 0:s.material)==null?void 0:p.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:d,nodeLayout:f}},$A=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=v.useMemo(()=>Wv(e),[e]);return se("div",{className:On.toolBarBox,children:[o,r,t,n]})},IA=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)Oe.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},LA=({node:e})=>x("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),BA="_hoverTips_k3vn7_2",zA={hoverTips:BA};class FA{constructor(t){F(this,"getPortalViewCtx");F(this,"ctx");F(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await Bn(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await Bn(),n}}class VA extends v.Component{constructor(n){super(n);F(this,"layoutRef");F(this,"customAdvanceHook");F(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));F(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});F(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});F(this,"onNodeDrop",async n=>{var c,u,d,f,p,g,y,w,b,S,E;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((d=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:d.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((g=(p=(f=l.material)==null?void 0:f.value.advanceCustom)==null?void 0:p.onNewAdd)==null?void 0:g.call(p,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((y=a.dropNode)==null?void 0:y.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((w=a.dropNode)==null?void 0:w.id)===((b=a.dragNode)==null?void 0:b.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((S=a.dragNode)==null?void 0:S.id)||"",((E=a==null?void 0:a.dropNode)==null?void 0:E.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var C,m,_;if(l&&await this.onSelectNode(l,null)===!1){(C=r.current)==null||C.selectNode("");return}(_=r.current)==null||_.selectNode(((m=a.dragNode)==null?void 0:m.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});F(this,"onSelectNode",async(n,r)=>{var l,c,u,d;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((d=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:d.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});F(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});F(this,"getGhostView",(n,r)=>{let o=x(LA,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=x(i,{node:n,params:r})),o});F(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});F(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});F(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});F(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});F(this,"getToolbarView",n=>{const o={nodeList:IA(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=Wv(o);let i=x($A,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=x(s,{node:n,context:this.context,toolBarItems:a})),i});F(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:x("div",{className:zA.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});F(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});F(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});F(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?x(tt,{}):x(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});F(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?x(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):x(tt,{})});F(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?x(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):x(tt,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=v.createRef(),this.customAdvanceHook=new FA({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys(zf).forEach(r=>{n.addResourceBundle(r,`plugin:${Uv}`,zf[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:d,selectToolbarView:f,ghostView:p,assets:g,portalView:y,selectRectViewRender:w,hoverRectViewRender:b,dropViewRender:S}=this.state,{pluginCtx:E}=r,C=E.engine.props.renderJSUrl||"./render.umd.js",m={};return w&&(m.selectRectViewRender=this.innerSelectRectViewRender),b&&(m.hoverRectViewRender=this.innerHoverRectViewRender),S&&(m.dropViewRender=this.innerDropViewRender),f&&(m.selectToolbarView=this.state.selectToolbarView),se(tt,{children:[x(or.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:C,...r,hoverToolBarView:d,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...m,ghostView:p,assets:g,pluginCtx:this.props.pluginCtx}),y&&rn.createPortal(y,document.body)]})}}const Gv=e=>{const t=v.createRef();return{name:Uv,async init(n){n.getWorkbench().replaceBodyView(x(VA,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]}}),meta:{engine:{version:"1.0.0"}}}},El=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||El(e.parentElement,t)},Kv=(e,t,n)=>{const r=(o,a)=>{var y,w,b;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(S=>typeof S!="string");const s=(y=n.materialsModel.findByComponentName(o.componentName))==null?void 0:y.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(w=n.getNode(o.id||""))!=null&&w.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:S})=>x("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:S})},d=o.props||{},f=(S,E,C)=>{if(Oe.isJSSlotPropNode(S)){const _=S,O=n.getNode(o.id);let N="";if(O){const D=p(O,[...C,E]);N=Oe.getMTitle(D)}let T=E;N&&(T=Oe.getMTitle(N)||E);const P={title:T,key:`${o.id}-${C.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let M=[];_.value&&!Array.isArray(_.value)?M=[_.value]:M=_.value,P.children=Kv(M,P,n),c.push(P);return}if(Hi(S)){const _=S;Object.keys(_).forEach(O=>{f(_[O],O,[...C,E])})}Array.isArray(S)&&S.forEach((O,N)=>{f(O,String(N),[...C,E])})},p=(S,E)=>{const C=WA(S),m=E.map(_=>String(parseInt(_,10))===_?"$NUM":_);return C[m.join(".")]||""};Object.keys(d).forEach(S=>{f(d[S],S,[])}),c.length>0&&((b=l.children)==null||b.push(u),u.parent=l);const g=i.map(S=>r(S,l))||[];return l.children=[...l.children,...g],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},HA=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=Kv(r,o,t),[o]},bs=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function UA(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const WA=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(Hi(a)){const c=[...i],u=a,d=u.componentName;if(d==="ArraySetter"){const p=((s=u.props)==null?void 0:s.item.setters)||[],g=t[i.join(".")];let y="";typeof g=="string"?y=g:y=g.label,c.push("$NUM"),p.forEach(w=>{y=`${y}`,t[c.join(".")]=y,r(w,c)})}else d==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(g=>{const y=[...c];y.push(g.name),t[y.join(".")]=g.title,(g.setters||[]).forEach(b=>{r(b,[...y])})})}};return n.forEach(a=>{let i=null;Oe.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(d=>{r(d,c)})})}),t};var kr=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(kr||{});const qv=v.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),GA="_contentBox_1vfqn_2",KA="_nodeBox_1vfqn_13",qA="_toolbarBox_1vfqn_17",YA="_iconItem_1vfqn_21",XA="_nodeContent_1vfqn_25",JA="_selected_1vfqn_35",QA="_nodeArrow_1vfqn_38",ZA="_expanded_1vfqn_41",eD="_nodeRenderView_1vfqn_45",tD="_nodeChildren_1vfqn_54",nD="_dropAnchorLine_1vfqn_71",rD="_arrowSpan_1vfqn_80",ht={contentBox:GA,nodeBox:KA,toolbarBox:qA,iconItem:YA,nodeContent:XA,selected:JA,nodeArrow:QA,expanded:ZA,nodeRenderView:eD,nodeChildren:tD,dropAnchorLine:nD,arrowSpan:rD},Tr="data-drag-key",Yv=e=>{var H,ie,ne,he;const t=v.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=v.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:d,onCopyNode:f}=v.useContext(qv),[p,g]=v.useState((H=t.current)==null?void 0:H.titleEditable),[y,w]=v.useState("");t.current.titleEditable=p;const b=s.expandKeys.find($=>$===r.key),S=()=>{let $=s.expandKeys;b?$=$.filter(z=>z!==r.key):$.push(r.key||""),l({expandKeys:$})},E=s.currentSelectNodeKeys.find($=>$===r.key),C=v.useRef(null),m=()=>{var z;if(p){(z=C==null?void 0:C.current)==null||z.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let $=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}E?$=$.filter(J=>J!==r.key):$.push(String(r.key)),c==null||c({keys:$,node:r}),l({currentSelectNodeKeys:$})},_=20,O=_*n,N=r.canBeSelected??!0,T={[Tr]:r.key},P=v.useRef(),M=v.useRef();M.current=s,P.current=$=>{const z=s.expandKeys,J=Array.from(new Set([...z,$]));l({expandKeys:J})};const D=v.useRef(null);v.useEffect(()=>{var J,re;let $=0;(J=D.current)==null||J.addEventListener("mouseenter",()=>{$=window.setTimeout(()=>{var de,fe;((de=M.current)==null?void 0:de.dragState)===kr.DRAGGING&&((fe=P.current)==null||fe.call(P,r.key||""))},.8*1e3)}),(re=D.current)==null||re.addEventListener("mouseleave",()=>{clearTimeout($)});const z=de=>{var fe;if(t.current.titleEditable){if(de.target===((fe=C.current)==null?void 0:fe.input))return;g(!1),I.updateValue()}};return document.addEventListener("click",z),()=>{$&&clearTimeout($),document.removeEventListener("click",z)}},[]);const I=(ie=s.pageModel)==null?void 0:ie.getNode(r.key||""),A=()=>{const $=!a;if(!I)return;const z=I.value.configure.devState??{};z.condition=$,I.value.configure.devState=z,I.updateValue(),i($)};let j=r.title;r.titleViewRender&&(j=r.titleViewRender({item:r,titleView:r.title}));const L=se("div",{className:ht.nodeBox,children:[se("div",{className:yt([ht.nodeContent,E&&N&&ht.selected]),style:{marginLeft:`${-O}px`,paddingLeft:`${O+8}px`},onMouseMove:async()=>{if(!r.key)return;const $=await(d==null?void 0:d()),z=$==null?void 0:$.getDynamicComponentInstances(r.key);typeof(z==null?void 0:z._CONDITION)<"u"&&i(z==null?void 0:z._CONDITION)},children:[(ne=r.children)!=null&&ne.length?x("span",{style:{paddingRight:"5px"},className:ht.arrowSpan,onClickCapture:S,children:x(V0,{className:yt([ht.nodeArrow,b&&ht.expanded])})}):null,se("div",{className:ht.nodeRenderView,...T,ref:D,onClick:m,onDoubleClick:()=>{var re;if(!I)return;const $=I,z=(re=$.materialsModel.findByComponentName($.value.componentName))==null?void 0:re.value.title,J=$.value.title||z||$.value.componentName||"";w(J),g(!0),setTimeout(()=>{var de;(de=C.current)==null||de.focus()},100)},children:[!p&&j,p&&x("div",{style:{paddingRight:"10px"},children:x(Z.Input,{size:"small",maxLength:20,ref:C,value:y,onPressEnter:()=>{g(!1),I.updateValue()},onChange:$=>{I.value.title=$.target.value,w($.target.value)}})})]}),!p&&!r.rootNode&&se("div",{className:ht.toolbarBox,children:[se("div",{className:ht.iconItem,children:[!a&&x(T0,{onClick:A}),a&&x(Oh,{onClick:A})]}),x("div",{className:ht.iconItem,onClick:()=>{f(r.key||"")},children:x(bh,{})}),x("div",{className:ht.iconItem,onClick:()=>{u(r.key||"")},children:x(oc,{})})]})]}),x("div",{className:yt([ht.nodeChildren,E&&ht.selected]),style:{paddingLeft:`${_}px`,height:b?"auto":"0"},children:b&&((he=r.children)==null?void 0:he.map(($,z)=>{const J=`${$.key}-${z}`;return x(Yv,{item:$,paths:[...o,z],level:n+1},J)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:L}):L};class oD extends v.Component{constructor(n){super(n);F(this,"domRef");F(this,"disposeCbList",[]);F(this,"sensor");F(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});F(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=HA(o,r);this.setState({treeData:a})});F(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(bs(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});F(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${Tr}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});F(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);Ht.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));Ht.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});F(this,"containNode",(n,r)=>{let o=null;return bs(n,a=>a.key===r.key?(o=a,!0):!1),o});F(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return bs(r,a=>a.key===n?(o=a,!0):!1),o});F(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new or.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var y;const l=s.event.target;if(!l)return;const c=El(l,Tr);if(!c)return;const u=o.getNode(c),d=this.getTreeNodeByKey(c);if((d==null?void 0:d.canDrag)!==void 0&&(d==null?void 0:d.canDrag)===!1)return;const f=a.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(p===!1)return!1;if(!u){console.log("targetNode not found");return}const g={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof p=="object"&&(g.extraData.dragNode=p.dragNode,g.extraData.dragNodeUID=((y=p.dragNode)==null?void 0:y.id)||""),g}),n.setCanDrop(async s=>{var S;const l=s.event.target;if(!l)return Ht.debug("drop dom not found"),s;const c=El(l,Tr);if(!c)return Ht.debug("targetNodeId dom not found",s,l,Tr),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return Ht.debug("node can not be drop by tree node config"),s;const d=o.getNode(c);if(!d)return Ht.debug("targetNode not found"),s;const f=(S=s.extraData)==null?void 0:S.dragNode;if(!f)return Ht.debug("startNode not found"),s;if((f==null?void 0:f.id)===d.id)return Ht.debug("startNode and dropNode is the same"),s;if(f.contains(d.id))return Ht.debug("startNode contain dropNode"),s;const g=UA({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(g.pos)))return!1;Ht.info("can dropNode",d);const y={...s,extraData:{...s.extraData,dropPosInfo:g,dropNode:d,dropNodeUID:d.id}},w=a.getInstance(),b=await(w==null?void 0:w.customAdvanceHook.canDrop({dragNode:y.extraData.dragNode,dropNode:d,eventObj:{...y,from:y.event,fromSensor:n,fromPointer:y.pointer}}));return b===!1?!1:(typeof b=="object"&&(y.extraData={...y.extraData,...b}),y)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var p,g;const l=s.extraData.dropNode;if(this.setState({dragState:kr.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(p=document.querySelectorAll(`[${Tr}="${l.id}"]`))==null?void 0:p[0];if(!c)return;const u=((g=s.extraData)==null?void 0:g.dropPosInfo)||{},d=c.getBoundingClientRect(),f={x:0,y:0};f.x=d.x,u.pos==="before"?f.y=d.y:u.pos==="after"?f.y=d.y+d.height:(f.y=d.y+d.height,f.x=d.x+20),this.setState({dropPosInfo:f})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:kr.NORMAL})}),this.sensor=n});this.domRef=v.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:kr.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return x(qv.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:se("div",{className:ht.contentBox,ref:this.domRef,children:[n.map((i,s)=>x(Yv,{item:i},i.key+`${s}`)),r===kr.DRAGGING&&o&&x("div",{className:ht.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const aD={pluginName:"大纲树"},iD={pluginName:"Layout Tree"},Ff={zh_CN:aD,en_US:iD},Rl="OutlineTree",ws=`plugin:${Rl}`,sD={name:Rl,async init(e){const{i18n:t}=e;Object.keys(Ff).forEach(a=>{t.addResourceBundle(a,ws,Ff[a],!0,!0)});const n=Kr(ws)(oD),r=Kr(ws)(({t:a})=>x(tt,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:x(r,{}),name:Rl,icon:x(l0,{}),render:x(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},lD="_CFromRenderBox_1vsdm_2",cD={CFromRenderBox:lD},Yc=v.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Xv={},uD=e=>{Object.assign(Xv,e)};class Xc extends v.Component{constructor(n){super(n);F(this,"updateContext");F(this,"getFieldsValue",()=>this.formatValue(this.state.formState));F(this,"setFields",n=>{this.setState({formState:n})});F(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Xv}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return x(Yc.Provider,{value:n,children:r})}}class dD extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function fD(e){return qt(e)&&typeof e[Symbol.iterator]=="function"}function qt(e){return typeof e=="object"&&e!=null}function Pt(e){return typeof e=="string"?JSON.stringify(e):""+e}function pD(e){const{done:t,value:n}=e.next();return t?void 0:n}function hD(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Pt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*Vf(e,t,n,r){fD(e)||(e=[e]);for(const o of e){const a=hD(o,t,n,r);a&&(yield a)}}function*Jc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&qt(t.schema)&&qt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Jc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):qt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class pn{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return Vf(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return Vf(u,c,this,l)}:this.refiner=()=>[]}assert(t){return gD(t,this)}create(t){return vD(t,this)}is(t){return yD(t,this)}mask(t){return mD(t,this)}validate(t,n){return n===void 0&&(n={}),ho(t,this,n)}}function gD(e,t){const n=ho(e,t);if(n[0])throw n[0]}function vD(e,t){const n=ho(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function mD(e,t){const n=ho(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function yD(e,t){return!ho(e,t)[0]}function ho(e,t,n){n===void 0&&(n={});const r=Jc(e,t,n),o=pD(r);return o[0]?[new dD(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function bD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?Zv(a):De(a)}function Wn(e,t){return new pn({type:e,schema:null,validator:t})}function Yr(e){return new pn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function wD(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return Zv(r);default:return De(r)}}function Xe(){return Wn("any",()=>!0)}function et(e){return new pn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Pt(t)}})}function Xr(){return Wn("boolean",e=>typeof e=="boolean")}function Nl(e){const t={},n=e.map(r=>Pt(r)).join();for(const r of e)t[r]=r;return new pn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Pt(r)}})}function Jv(){return Wn("func",e=>typeof e=="function"||"Expected a function, but received: "+Pt(e))}function sn(e){const t=Pt(e),n=typeof e;return new pn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Pt(r)}})}function SD(){return Wn("never",()=>!1)}function Qv(){return Wn("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Pt(e))}function De(e){const t=e?Object.keys(e):[],n=SD();return new pn({type:"object",schema:e||null,*entries(r){if(e&&qt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return qt(r)||"Expected an object, but received: "+Pt(r)},coercer(r){return qt(r)?{...r}:r}})}function ee(e){return new pn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function Ho(e,t){return new pn({type:"record",schema:null,*entries(n){if(qt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return qt(n)||"Expected an object, but received: "+Pt(n)}})}function Q(){return Wn("string",e=>typeof e=="string"||"Expected a string, but received: "+Pt(e))}function Zv(e){const t=Object.keys(e);return new pn({type:"type",schema:e,*entries(n){if(qt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return qt(n)||"Expected an object, but received: "+Pt(n)}})}function Nt(e){const t=e.map(n=>n.type).join(" | ");return new pn({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||xD()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Jc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Pt(n),...o]}})}function xD(){return Wn("unknown",()=>!0)}const em=De({package:Q(),version:Q(),name:Q(),exportName:ee(Q()),destructuring:ee(Xr()),subName:ee(Q()),main:ee(Q()),cssPaths:ee(et(Q()))});et(em);var $n=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))($n||{}),Tl=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(Tl||{});const CD=()=>Wn("normalObj",e=>!Hi(e)||[$n.SLOT,$n.EXPRESSION,$n.FUNCTION].includes(e==null?void 0:e.type)?!1:(ho(e,Ho(Q(),Qc)),!0)),Qc=Nt([Q(),Qv(),Xr(),De({type:sn($n.SLOT),renderType:Nl([Tl.FUNC,Tl.COMP]),params:ee(et(Q())),value:Yr(()=>Nt([mi,et(mi)]))}),De({type:sn($n.EXPRESSION),value:Q()}),De({type:sn($n.FUNCTION),value:Q()}),CD(),et(Yr(()=>Qc))]),Hf=De({type:sn($n.EXPRESSION),value:Q()}),mi=De({id:ee(Q()),title:ee(Q()),componentName:Q(),props:ee(Ho(Q(),Qc)),nodeName:ee(Q()),state:ee(Ho(Q(),Xe())),children:Yr(()=>ee(et(Nt([Q(),mi])))),configure:ee(Xe()),css:ee(Xe()),style:ee(Xe()),classNames:ee(et(Xe())),refId:ee(Q()),extra:ee(Ho(Xe(),Xe())),condition:ee(Nt([Xr(),Hf])),loop:ee(De({open:Xr(),data:Nt([et(Xe()),Hf]),args:ee(et(Q())),forName:ee(Q()),forIndex:ee(Q()),key:ee(Xe()),name:ee(Q())})),methods:ee(et(Xe()))}),OD=e=>Hi(e)?e.label:e,yi=Nt([Q(),De({label:Q(),tip:ee(Q())})]),_D=De({type:sn("shape"),value:et(De({name:Q(),title:yi,valueType:Yr(()=>Ui)}))}),ED=De({type:sn("enums"),value:et(Q())});De({type:sn("array"),value:Yr(()=>Ui)});const RD=De({type:sn("array"),value:Yr(()=>et(Ui))}),Ui=Nt([Nl(["array","boolean","number","object","string"]),Nl(["component","expression","function"]),_D,ED,RD]),ND=Nt([Q(),De({componentName:Q(),props:ee(Xe()),initialValue:ee(Xe()),component:ee(Xe())})]),Ss=De({name:Q(),title:yi,valueType:Ui,description:ee(Q()),defaultValue:Xe(),setters:ee(et(ND)),condition:ee(Jv())});Nt([Q(),Jv()]);Nt([Q(),De({name:Q(),describe:ee(Q()),params:ee(De({name:Q(),description:Q()})),template:Q()})]);const TD=De({id:ee(Q()),title:Q(),snapshot:Nt([Q(),Xe()]),snapshotText:ee(Q()),description:ee(Q()),tags:ee(et(Q())),groupName:ee(Q()),category:ee(Q()),schema:bD(wD(mi,["id"]),De({componentName:ee(Q())}))});De({componentName:Q(),title:Q(),screenshot:ee(Q()),icon:ee(Q()),tags:ee(et(Q())),groupName:ee(Q()),category:ee(Q()),priority:ee(Qv()),npm:ee(em),snippets:et(TD),props:et(Nt([Ss,De({title:ee(yi),type:sn("single"),content:Ss}),De({title:ee(yi),type:sn("group"),content:et(Ss)})])),fixedProps:ee(Xe()),isContainer:ee(Nt([Xr(),De({placeholder:Q(),width:Q(),height:Q()})])),disableEditorDragDom:ee(Xe()),isLayout:ee(Xr()),rootSelector:ee(Q()),advanceCustom:ee(Xe()),extra:ee(Ho(Xe(),Xe()))});const tm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});tm.setterName="字符设置器";const nm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});nm.setterName="数字设置器";const Zc=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function PD(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=v.useRef(null);return v.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),x("div",{style:o,children:x(Xc,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:x(du,{suffix:x("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:x(oc,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function kD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Wi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function go(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function eu(e){return"nodeType"in e}function xt(e){var t,n;return e?go(e)?e:eu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function tu(e){const{Document:t}=xt(e);return e instanceof t}function ma(e){return go(e)?!1:e instanceof xt(e).HTMLElement}function jD(e){return e instanceof xt(e).SVGElement}function vo(e){return e?go(e)?e.document:eu(e)?tu(e)?e:ma(e)?e.ownerDocument:document:document:document}const Jt=Wi?v.useLayoutEffect:v.useEffect;function nu(e){const t=v.useRef(e);return Jt(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function MD(){const e=v.useRef(null),t=v.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ia(e,t){t===void 0&&(t=[e]);const n=v.useRef(e);return Jt(()=>{n.current!==e&&(n.current=e)},t),n}function ya(e,t){const n=v.useRef();return v.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function bi(e){const t=nu(e),n=v.useRef(null),r=v.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Pl(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let xs={};function ba(e,t){return v.useMemo(()=>{if(t)return t;const n=xs[e]==null?0:xs[e]+1;return xs[e]=n,e+"-"+n},[e,t])}function rm(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const Ir=rm(1),sa=rm(-1);function AD(e){return"clientX"in e&&"clientY"in e}function ru(e){if(!e)return!1;const{KeyboardEvent:t}=xt(e.target);return t&&e instanceof t}function DD(e){if(!e)return!1;const{TouchEvent:t}=xt(e.target);return t&&e instanceof t}function kl(e){if(DD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return AD(e)?{x:e.clientX,y:e.clientY}:null}const Jr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Jr.Translate.toString(e),Jr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Uf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $D(e){return e.matches(Uf)?e:e.querySelector(Uf)}const ID={display:"none"};function LD(e){let{id:t,value:n}=e;return x("div",{id:t,style:ID,children:n})}const BD={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function zD(e){let{id:t,announcement:n}=e;return x("div",{id:t,style:BD,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function FD(){const[e,t]=v.useState("");return{announce:v.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const om=v.createContext(null);function VD(e){const t=v.useContext(om);v.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function HD(){const[e]=v.useState(()=>new Set),t=v.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[v.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const UD={draggable:`
124
+ `),k="%c".concat([R,C].filter(Boolean).join(":"));typeof v.args[0]=="string"?O.apply(void 0,["".concat(k,"%c ").concat(v.args[0]),T,""].concat(l(v.args.slice(1)))):O.apply(void 0,[k,T].concat(l(v.args)))}}]),x}();return typeof window<"u"&&window.consola||((S=new y({reporters:[new E]})).Consola=y,S.LogLevel=f,S.BrowserReporter=E,S)})})(Qg);var jN=Qg.exports;const MN=Yl(jN),$t=MN.create({level:1}),Tn=e=>new Promise(t=>{setTimeout(()=>{t("ok")},e??1e3/60*2)});class AN extends g.Component{constructor(n){super(n);B(this,"emitter");B(this,"leftPanelContentRef");B(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});B(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});B(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});B(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});B(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});B(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});B(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});B(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});B(this,"replaceBodyView",n=>{this.setState({bodyView:n})});B(this,"replaceRightView",n=>{this.setState({rightView:n})});B(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});B(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});B(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});B(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});B(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||ei(),this.leftPanelContentRef=g.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null,customViewList:[]}}addCustomView(n){const r=this.state.customViewList;return r.push(n),this.setState({customViewList:[...r]}),()=>{const o=this.state.customViewList.filter(a=>a!==n);this.setState({customViewList:[...o]})}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:d,subTopToolBarView:f,customViewList:p}=this.state,h={};o||(h.position="absolute",h.left="50px",h.top=0);const m=s.find(v=>v.name===l),b=(m==null?void 0:m.render)||null,{onPluginIconClick:y,toggleRightPanel:S,toggleLeftPanel:E,onLeftBoxResizeStop:x}=this;return ee("div",{className:ke.workbenchContainer,children:[w("div",{className:ke.topToolBarBox,children:w("div",{className:ke.topToolBarView,children:d})}),ee("div",{className:ke.bodyContent,children:[ee("div",{className:ke.leftBox,ref:this.leftPanelContentRef,children:[w("div",{className:ke.pluginIconBar,children:s.map(v=>w("div",{onClick:()=>y(v),className:dt([ke.pluginIconItem,(m==null?void 0:m.name)===v.name&&ke.active]),children:v.icon},v.name))}),n&&ee(Ru,{className:ke.pluginPanelBoxResizeBox,size:r,style:h,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:x,children:[ee("div",{className:ke.pluginHeader,children:[w("span",{className:ke.pluginNameText,children:(m==null?void 0:m.title)||(m==null?void 0:m.name)}),w(Y.Button,{className:dt([ke.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:w(B0,{className:dt([o&&ke.active])})}),w(Y.Button,{className:ke.closeBtn,type:"text",size:"small",onClick:E,children:w(h0,{})})]}),w("div",{className:ke.pluginPanelBox,children:b})]})]}),ee("div",{className:ke.centerBox,children:[f&&w("div",{className:ke.subTopToolbarBox,children:f}),w("div",{className:ke.canvasBox,children:w("div",{className:ke.scrollBox,children:c})})]}),ee("div",{className:ke.rightResizeBox,children:[w("div",{className:ke.arrowCursor,onClick:S,children:w(O0,{className:dt([!i&&ke.active])})}),w("div",{style:{display:i?"block":"none",height:"100%"},children:w(Ru,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(v,O,C,R)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+R.width,height:this.state.rightBoxSize.height}})},children:w("div",{className:ke.rightBox,children:u})})})]})]}),Lt.createPortal(w("div",{className:ke.customViewBox,children:p.map(v=>w("div",{style:{pointerEvents:"auto",display:"inline-block"},children:v.view},v.key))}),document.body)]})}}const DN="_engineContainer_f3ly9_2",$N={engineContainer:DN};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kp(r.key),r)}}function rt(e,t,n){return t&&Id(e.prototype,t),n&&Id(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},pl(e,t)}function Zr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pl(e,t)}function eo(e,t){if(t&&(Oe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kt(e)}function Zg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ev(e){return qp(e)||Zg(e)||Jl(e)||Yp()}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var IN={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},LN=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||IN,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,Bd(Bd({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Xt=new LN,Pn=function(){function e(){nt(this,e),this.observers={}}return rt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function vo(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function zd(e){return e==null?"":""+e}function BN(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Ic(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function Vd(e,t,n){var r=Ic(e,t,Object),o=r.obj,a=r.k;o[a]=n}function zN(e,t,n,r){var o=Ic(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function si(e,t){var n=Ic(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Fd(e,t,n){var r=si(e,n);return r!==void 0?r:si(t,n)}function tv(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):tv(e[r],t[r],n):e[r]=t[r]);return e}function pr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var VN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function FN(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return VN[t]}):e}var ji=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,HN=[" ",",","?","!",";"];function UN(e,t,n){t=t||"",n=n||"";var r=HN.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WN(e){var t=GN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function GN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?nv(l,c,n):void 0}o=o[r[a]]}return o}}var KN=function(e){Zr(n,e);var t=WN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return rt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var d=si(this.data,u);return d||!c||typeof i!="string"?d:nv(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),Vd(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var d=si(this.data,u)||{};s?tv(d,i,l):d=Na(Na({},d),i),Vd(this.data,u,d),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Na(Na({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Pn),rv={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qN(e){var t=YN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function YN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wd={},Gd=function(e){Zr(n,e);var t=qN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),BN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Jt(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Xt.create("translator"),o}return rt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!UN(o,i,s);if(c&&!u){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(Oe(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),d=u.key,f=u.namespaces,p=f[f.length-1],h=a.lng||this.language,m=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){var b=a.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(p).concat(b).concat(d),y):"".concat(p).concat(b).concat(d)}return l?(y.res=d,y):d}var y=this.resolve(o,a),S=y&&y.res,E=y&&y.usedKey||d,x=y&&y.exactUsedKey||d,v=Object.prototype.toString.apply(S),O=["[object Number]","[object Function]","[object RegExp]"],C=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,N=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(R&&S&&N&&O.indexOf(v)<0&&!(typeof C=="string"&&v==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,S,at(at({},a),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=T,y):T}if(c){var k=v==="[object Array]",j=k?[]:{},L=k?x:E;for(var M in S)if(Object.prototype.hasOwnProperty.call(S,M)){var P="".concat(L).concat(c).concat(M);j[M]=this.translate(P,at(at({},a),{joinArrays:!1,ns:f})),j[M]===P&&(j[M]=S[M])}S=j}}else if(R&&typeof C=="string"&&v==="[object Array]")S=S.join(C),S&&(S=this.extendTranslation(S,o,a,i));else{var D=!1,F=!1,ne=a.count!==void 0&&typeof a.count!="string",Z=n.hasDefaultValue(a),ue=ne?this.pluralResolver.getSuffix(h,a.count,a):"",A=a["defaultValue".concat(ue)]||a.defaultValue;!this.isValidLookup(S)&&Z&&(D=!0,S=A),this.isValidLookup(S)||(F=!0,S=d);var I=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,G=I&&F?void 0:S,te=Z&&A!==S&&this.options.updateMissing;if(F||D||te){if(this.logger.log(te?"updateKey":"missingKey",h,p,d,te?A:S),c){var ie=this.resolve(d,at(at({},a),{},{keySeparator:!1}));ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var de=[],we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(var fe=0;fe<we.length;fe++)de.push(we[fe]);else this.options.saveMissingTo==="all"?de=this.languageUtils.toResolveHierarchy(a.lng||this.language):de.push(a.lng||this.language);var Ee=function(De,z,Xe){var Le=Z&&Xe!==S?Xe:G;s.options.missingKeyHandler?s.options.missingKeyHandler(De,p,z,Le,te,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(De,p,z,Le,te,a),s.emit("missingKey",De,p,z,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?de.forEach(function(re){s.pluralResolver.getSuffixes(re,a).forEach(function(De){Ee([re],d+De,a["defaultValue".concat(De)]||A)})}):Ee(de,d,A))}S=this.extendTranslation(S,o,a,y,i),F&&S===d&&this.options.appendNamespaceToMissingKey&&(S="".concat(p,":").concat(d)),(F||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,D?S:void 0):S=this.options.parseMissingKeyHandler(S))}return l?(y.res=S,y):S}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,at(at({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(at(at({},i),{interpolation:at(at({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(p=at(at({},this.options.interpolation.defaultVariables),p)),o=this.interpolator.interpolate(o,p,i.lng||this.language,i),u){var h=o.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var S=arguments.length,E=new Array(S),x=0;x<S;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var b=i.postProcess||this.options.postProcess,y=typeof b=="string"?[b]:b;return o!=null&&y&&y.length&&i.applyPostProcessor!==!1&&(o=rv.handle(y,o,a,this.options&&this.options.postProcessPassResolved?at({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!a.isValidLookup(s)){var p=a.extractFromKey(f,i),h=p.key;l=h;var m=p.namespaces;a.options.fallbackNS&&(m=m.concat(a.options.fallbackNS));var b=i.count!==void 0&&typeof i.count!="string",y=b&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),S=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",E=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);m.forEach(function(x){a.isValidLookup(s)||(d=x,!Wd["".concat(E[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(d)&&(Wd["".concat(E[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(v){if(!a.isValidLookup(s)){u=v;var O=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(O,h,v,x,i);else{var C;b&&(C=a.pluralResolver.getSuffix(v,i.count,i));var R="".concat(a.options.pluralSeparator,"zero");if(b&&(O.push(h+C),y&&O.push(h+R)),S){var N="".concat(h).concat(a.options.contextSeparator).concat(i.context);O.push(N),b&&(O.push(N+C),y&&O.push(N+R))}}for(var T;T=O.pop();)a.isValidLookup(s)||(c=T,s=a.getResource(v,x,T,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(Pn);function ps(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Kd=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}return rt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=ps(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),XN=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],JN={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},QN=["v1","v2","v3"],qd={zero:0,one:1,two:2,few:3,many:4,other:5};function ZN(){var e={};return XN.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:JN[t.fc]}})}),e}var eT=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=ZN()}return rt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return qd[i]-qd[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!QN.includes(this.options.compatibilityJSON)}}]),e}();function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var tT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:FN,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?pr(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?pr(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?pr(r.nestingPrefix):r.nestingPrefixEscaped||pr("$t("),this.nestingSuffix=r.nestingSuffix?pr(r.nestingSuffix):r.nestingSuffixEscaped||pr(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var f=function(y){if(y.indexOf(i.formatSeparator)<0){var S=Fd(r,u,y);return i.alwaysFormat?i.format(S,void 0,o,At(At(At({},a),r),{},{interpolationkey:y})):S}var E=y.split(i.formatSeparator),x=E.shift().trim(),v=E.join(i.formatSeparator).trim();return i.format(Fd(r,u,x),v,o,At(At(At({},a),r),{},{interpolationkey:x}))};this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,h=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(y){return d(y)}},{regex:this.regexp,safeValue:function(y){return i.escapeValue?d(i.escape(y)):d(y)}}];return m.forEach(function(b){for(c=0;s=b.regex.exec(n);){var y=s[1].trim();if(l=f(y),l===void 0)if(typeof p=="function"){var S=p(n,s,a);l=typeof S=="string"?S:""}else if(a&&a.hasOwnProperty(y))l="";else if(h){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=zd(l));var E=b.safeValue(l);if(n=n.replace(s[0],E),h?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(p,h){var m=this.nestingOptionsSeparator;if(p.indexOf(m)<0)return p;var b=p.split(new RegExp("".concat(m,"[ ]*{"))),y="{".concat(b[1]);p=b[0],y=this.interpolate(y,l);var S=y.match(/'/g),E=y.match(/"/g);(S&&S.length%2===0&&!E||E.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),h&&(l=At(At({},h),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),x),"".concat(p).concat(m).concat(y)}return delete l.defaultValue,p}for(;i=this.nestingRegexp.exec(n);){var u=[];l=At({},a),l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var f=i[1].split(this.formatSeparator).map(function(p){return p.trim()});i[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,h){return o.format(p,h,a.lng,At(At({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nT(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=ev(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function hr(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var rT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("formatter"),this.options=t,this.formats={number:hr(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:hr(function(n,r){var o=new Intl.NumberFormat(n,On(On({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:hr(function(n,r){var o=new Intl.DateTimeFormat(n,On({},r));return function(a){return o.format(a)}}),relativetime:hr(function(n,r){var o=new Intl.RelativeTimeFormat(n,On({},r));return function(a){return o.format(a,r.range||"day")}}),list:hr(function(n,r){var o=new Intl.ListFormat(n,On({},r));return function(a){return o.format(a)}})},this.init(t)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=hr(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=nT(u),f=d.formatName,p=d.formatOptions;if(i.formats[f]){var h=c;try{var m=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},b=m.locale||m.lng||a.locale||a.lng||o;h=i.formats[f](c,b,On(On(On({},p),a),m))}catch(y){i.logger.warn(y)}return h}else i.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oT(e){var t=aT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function aT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function iT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var sT=function(e){Zr(n,e);var t=oT(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),i=t.call(this),ji&&Pn.call(Jt(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=Xt.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return rt(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},d={},f={};return o.forEach(function(p){var h=!0;a.forEach(function(m){var b="".concat(p,"|").concat(m);!i.reload&&l.store.hasResourceBundle(p,m)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?u[b]===void 0&&(u[b]=!0):(l.state[b]=1,h=!1,u[b]===void 0&&(u[b]=!0),c[b]===void 0&&(c[b]=!0),f[m]===void 0&&(f[m]=!0)))}),h||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(d){zN(d.loaded,[l],c),iT(d,o),a&&d.errors.push(a),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(h){u[f][h]===void 0&&(u[f][h]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var d=function(m,b){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&b&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(m,b)},f=this.backend[i].bind(this.backend);if(f.length===2){try{var p=f(o,a);p&&typeof p.then=="function"?p.then(function(h){return d(null,h)}).catch(d):d(null,p)}catch(h){d(h)}return}return f(o,a,d)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),d),a.loaded(o,u,d)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var d=Qd(Qd({},c),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var p;f.length===5?p=f(o,a,i,s,d):p=f(o,a,i,s),p&&typeof p.then=="function"?p.then(function(h){return u(null,h)}).catch(u):u(null,p)}catch(h){u(h)}else f(o,a,i,s,u,d)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(Pn);function Zd(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Oe(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Oe(t[2])==="object"||Oe(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ef(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lT(e){var t=cT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function cT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(){}function uT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var li=function(e){Zr(n,e);var t=lT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),ji&&Pn.call(Jt(r)),r.options=ef(o),r.services={},r.logger=Xt,r.modules={external:[]},uT(Jt(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),eo(r,Jt(r));setTimeout(function(){r.init(o,a)},0)}return r}return rt(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=Zd();this.options=qt(qt(qt({},s),this.options),ef(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=qt(qt({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xt.init(l(this.modules.logger),this.options):Xt.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=rT);var u=new Kd(this.options);this.store=new KN(this.options.resources,this.options);var d=this.services;d.logger=Xt,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new eT(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new tT(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new sT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Gd(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.external.forEach(function(y){y.init&&y.init(o)})}if(this.format=this.options.interpolation.format,i||(i=Ta),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments),o}});var m=vo(),b=function(){var S=function(x,v){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),m.resolve(v),i(x,v)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return S(null,o.t.bind(o));o.changeLanguage(o.options.lng,S)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),m}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(p){var h=a.services.languageUtils.toResolveHierarchy(p);h.forEach(function(m){c.indexOf(m)<0&&c.push(m)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=vo();return o||(o=this.languages),a||(a=this.options.ns),i||(i=Ta),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&rv.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=vo();this.emit("languageChanging",o);var l=function(f){i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.resolvedLanguage=void 0,i.setResolvedLanguage(f)},c=function(f,p){p?(l(p),i.translator.changeLanguage(p),i.isLanguageChangingTo=void 0,i.emit("languageChanged",p),i.logger.log("languageChanged",p)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(f,function(){return i.t.apply(i,arguments)})},u=function(f){!o&&!f&&i.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:i.services.languageUtils.getBestMatchFromCodes(f);p&&(i.language||l(p),i.translator.language||i.translator.changeLanguage(p),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(p)),i.loadResources(p,function(h){c(h,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,d){var f;if(Oe(d)!=="object"){for(var p=arguments.length,h=new Array(p>2?p-2:0),m=2;m<p;m++)h[m-2]=arguments[m];f=s.options.overloadTranslationOptionHandler([u,d].concat(h))}else f=qt({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||i||c.keyPrefix;var b=s.options.keySeparator||".",y=f.keyPrefix?"".concat(f.keyPrefix).concat(b).concat(u):u;return s.t(y,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,h){var m=a.services.backendConnector.state["".concat(p,"|").concat(h)];return m===-1||m===2};if(i.precheck){var d=i.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=vo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=vo();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Kd(Zd());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=qt(qt(qt({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=qt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Gd(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Pn);ae(li,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new li(e,t)});var Qe=li.createInstance();Qe.createInstance=li.createInstance;Qe.createInstance;Qe.dir;Qe.init;Qe.loadResources;Qe.reloadResources;Qe.use;Qe.changeLanguage;Qe.getFixedT;Qe.t;Qe.exists;Qe.setDefaultNamespace;Qe.hasLoadedNamespace;Qe.loadNamespaces;Qe.loadLanguages;function dT(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var nf={};function hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&nf[t[0]]||(typeof t[0]=="string"&&(nf[t[0]]=new Date),dT.apply(void 0,t))}function rf(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function fT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function pT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return hl("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):fT(e,t,n)}function hT(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var gT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vT={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},mT=function(t){return vT[t]},yT=function(t){return t.replace(gT,mT)};function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function af(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?of(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:yT};function bT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gl=af(af({},gl),e)}function wT(){return gl}var ov;function ST(e){ov=e}function xT(){return ov}var CT={type:"3rdParty",init:function(t){bT(t.options.react),ST(t)}},OT=g.createContext(),ET=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var _T=function(t,n){var r=g.useRef();return g.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function RT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=g.useContext(OT)||{},o=r.i18n,a=r.defaultNS,i=n||o||xT();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new ET),!i){hl("You will need to pass in an i18next instance by using initReactI18next");var s=function(N){return Array.isArray(N)?N[N.length-1]:N},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=hs(hs(hs({},wT()),i.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||a||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);var p=(i.isInitialized||i.initializedStoreOnce)&&f.every(function(R){return pT(R,i,c)});function h(){return i.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var m=g.useState(h),b=Ce(m,2),y=b[0],S=b[1],E=f.join(),x=_T(E),v=g.useRef(!0);g.useEffect(function(){var R=c.bindI18n,N=c.bindI18nStore;v.current=!0,!p&&!u&&rf(i,f,function(){v.current&&S(h)}),p&&x&&x!==E&&v.current&&S(h);function T(){v.current&&S(h)}return R&&i&&i.on(R,T),N&&i&&i.store.on(N,T),function(){v.current=!1,R&&i&&R.split(" ").forEach(function(k){return i.off(k,T)}),N&&i&&N.split(" ").forEach(function(k){return i.store.off(k,T)})}},[i,E]);var O=g.useRef(!0);g.useEffect(function(){v.current&&!O.current&&S(h),O.current=!1},[i,d]);var C=[y,i,p];if(C.t=y,C.i18n=i,C.ready=p,p||!p&&!u)return C;throw new Promise(function(R){rf(i,f,function(){R()})})}var NT=["forwardedRef"];function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Rr(i,NT),c=RT(e,Pa(Pa({},l),{},{keyPrefix:t.keyPrefix})),u=Ce(c,3),d=u[0],f=u[1],p=u[2],h=Pa(Pa({},l),{},{t:d,i18n:f,tReady:p});return t.withRef&&s?h.ref=s:!t.withRef&&s&&(h.forwardedRef=s),g.createElement(r,h)}o.displayName="withI18nextTranslation(".concat(hT(r),")"),o.WrappedComponent=r;var a=function(s,l){return g.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?g.forwardRef(a):o}}const TT={translation:{"Welcome to React":"欢迎使用 React"}},PT={translation:{"Welcome to React":"Welcome to React and react-i18next"}},kT={zh_CN:TT,en_US:PT};Qe.use(CT).init({resources:kT,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const av=Qe;av.update=()=>{setTimeout(()=>{Qe.emit("added")},0)};class jT{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){B(this,"plugins",new Map);B(this,"emitter",ei());B(this,"getWorkbench");B(this,"pageModel");B(this,"i18n");B(this,"assets");B(this,"engine");B(this,"customPluginHooks",{});B(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});B(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:ei(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const MT={pluginName:"组件库"},AT={pluginName:"Component Store"},cf={zh_CN:MT,en_US:AT},DT="_container_191p3_2",$T="_tabTitle_191p3_23",iv={container:DT,tabTitle:$T},IT="_square_1b87f_2",LT="_componentItem_1b87f_18",BT="_iconImg_1b87f_41",zT="_iconBox_1b87f_45",VT="_iconText_1b87f_54",mo={square:IT,componentItem:LT,iconImg:BT,iconBox:zT,iconText:VT},FT=e=>{const t={[sv]:e.id},n=g.useMemo(()=>e.iconText?w("div",{className:mo.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?w("img",{className:mo.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=w("div",{className:dt([mo.square,e.containerClassName]),children:ee("div",{...t,className:mo.componentItem,style:e.style,children:[w("div",{className:mo.iconBox,children:n}),w("span",{children:e.name})]})});return e.description?w(Y.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},sv="data-drag-key",HT="_ListBox_1q7zr_2",UT="_collapsePanel_1q7zr_23",uf={ListBox:HT,collapsePanel:UT},WT=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||"");if(!t.length)return null;const r=g.useMemo(()=>t.map(o=>{const a=o.name||"",i=w("div",{className:uf.collapsePanel,children:o.list.map(s=>w(FT,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[]);return w("div",{className:uf.ListBox,children:w(Y.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})})},lv=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||lv(e.parentElement,t)};var GT=typeof global=="object"&&global&&global.Object===Object&&global;const cv=GT;var KT=typeof self=="object"&&self&&self.Object===Object&&self,qT=cv||KT||Function("return this")();const rn=qT;var YT=rn.Symbol;const kn=YT;var uv=Object.prototype,XT=uv.hasOwnProperty,JT=uv.toString,yo=kn?kn.toStringTag:void 0;function QT(e){var t=XT.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var o=JT.call(e);return r&&(t?e[yo]=n:delete e[yo]),o}var ZT=Object.prototype,eP=ZT.toString;function tP(e){return eP.call(e)}var nP="[object Null]",rP="[object Undefined]",df=kn?kn.toStringTag:void 0;function ar(e){return e==null?e===void 0?rP:nP:df&&df in Object(e)?QT(e):tP(e)}function ir(e){return e!=null&&typeof e=="object"}var oP="[object Symbol]";function aP(e){return typeof e=="symbol"||ir(e)&&ar(e)==oP}function iP(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var sP=Array.isArray;const Mi=sP;var lP=1/0,ff=kn?kn.prototype:void 0,pf=ff?ff.toString:void 0;function dv(e){if(typeof e=="string")return e;if(Mi(e))return iP(e,dv)+"";if(aP(e))return pf?pf.call(e):"";var t=e+"";return t=="0"&&1/e==-lP?"-0":t}function na(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cP="[object AsyncFunction]",uP="[object Function]",dP="[object GeneratorFunction]",fP="[object Proxy]";function fv(e){if(!na(e))return!1;var t=ar(e);return t==uP||t==dP||t==cP||t==fP}var pP=rn["__core-js_shared__"];const gs=pP;var hf=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function hP(e){return!!hf&&hf in e}var gP=Function.prototype,vP=gP.toString;function sr(e){if(e!=null){try{return vP.call(e)}catch{}try{return e+""}catch{}}return""}var mP=/[\\^$.*+?()[\]{}|]/g,yP=/^\[object .+?Constructor\]$/,bP=Function.prototype,wP=Object.prototype,SP=bP.toString,xP=wP.hasOwnProperty,CP=RegExp("^"+SP.call(xP).replace(mP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OP(e){if(!na(e)||hP(e))return!1;var t=fv(e)?CP:yP;return t.test(sr(e))}function EP(e,t){return e==null?void 0:e[t]}function lr(e,t){var n=EP(e,t);return OP(n)?n:void 0}var _P=lr(rn,"WeakMap");const vl=_P;var gf=Object.create,RP=function(){function e(){}return function(t){if(!na(t))return{};if(gf)return gf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const NP=RP;function TP(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var PP=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const vf=PP;function kP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var jP=9007199254740991,MP=/^(?:0|[1-9]\d*)$/;function AP(e,t){var n=typeof e;return t=t??jP,!!t&&(n=="number"||n!="symbol"&&MP.test(e))&&e>-1&&e%1==0&&e<t}function pv(e,t,n){t=="__proto__"&&vf?vf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function hv(e,t){return e===t||e!==e&&t!==t}var DP=Object.prototype,$P=DP.hasOwnProperty;function gv(e,t,n){var r=e[t];(!($P.call(e,t)&&hv(r,n))||n===void 0&&!(t in e))&&pv(e,t,n)}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?pv(n,s,l):gv(n,s,l)}return n}var IP=9007199254740991;function vv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IP}function mv(e){return e!=null&&vv(e.length)&&!fv(e)}var LP=Object.prototype;function Lc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||LP;return e===n}function BP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zP="[object Arguments]";function mf(e){return ir(e)&&ar(e)==zP}var yv=Object.prototype,VP=yv.hasOwnProperty,FP=yv.propertyIsEnumerable,HP=mf(function(){return arguments}())?mf:function(e){return ir(e)&&VP.call(e,"callee")&&!FP.call(e,"callee")};const UP=HP;function WP(){return!1}var bv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yf=bv&&typeof module=="object"&&module&&!module.nodeType&&module,GP=yf&&yf.exports===bv,bf=GP?rn.Buffer:void 0,KP=bf?bf.isBuffer:void 0,qP=KP||WP;const wv=qP;var YP="[object Arguments]",XP="[object Array]",JP="[object Boolean]",QP="[object Date]",ZP="[object Error]",ek="[object Function]",tk="[object Map]",nk="[object Number]",rk="[object Object]",ok="[object RegExp]",ak="[object Set]",ik="[object String]",sk="[object WeakMap]",lk="[object ArrayBuffer]",ck="[object DataView]",uk="[object Float32Array]",dk="[object Float64Array]",fk="[object Int8Array]",pk="[object Int16Array]",hk="[object Int32Array]",gk="[object Uint8Array]",vk="[object Uint8ClampedArray]",mk="[object Uint16Array]",yk="[object Uint32Array]",Ne={};Ne[uk]=Ne[dk]=Ne[fk]=Ne[pk]=Ne[hk]=Ne[gk]=Ne[vk]=Ne[mk]=Ne[yk]=!0;Ne[YP]=Ne[XP]=Ne[lk]=Ne[JP]=Ne[ck]=Ne[QP]=Ne[ZP]=Ne[ek]=Ne[tk]=Ne[nk]=Ne[rk]=Ne[ok]=Ne[ak]=Ne[ik]=Ne[sk]=!1;function bk(e){return ir(e)&&vv(e.length)&&!!Ne[ar(e)]}function Bc(e){return function(t){return e(t)}}var Sv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=Sv&&typeof module=="object"&&module&&!module.nodeType&&module,wk=No&&No.exports===Sv,vs=wk&&cv.process,Sk=function(){try{var e=No&&No.require&&No.require("util").types;return e||vs&&vs.binding&&vs.binding("util")}catch{}}();const Lr=Sk;var wf=Lr&&Lr.isTypedArray,xk=wf?Bc(wf):bk;const Ck=xk;var Ok=Object.prototype,Ek=Ok.hasOwnProperty;function xv(e,t){var n=Mi(e),r=!n&&UP(e),o=!n&&!r&&wv(e),a=!n&&!r&&!o&&Ck(e),i=n||r||o||a,s=i?BP(e.length,String):[],l=s.length;for(var c in e)(t||Ek.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||AP(c,l)))&&s.push(c);return s}function Cv(e,t){return function(n){return e(t(n))}}var _k=Cv(Object.keys,Object);const Rk=_k;var Nk=Object.prototype,Tk=Nk.hasOwnProperty;function Pk(e){if(!Lc(e))return Rk(e);var t=[];for(var n in Object(e))Tk.call(e,n)&&n!="constructor"&&t.push(n);return t}function zc(e){return mv(e)?xv(e):Pk(e)}function kk(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var jk=Object.prototype,Mk=jk.hasOwnProperty;function Ak(e){if(!na(e))return kk(e);var t=Lc(e),n=[];for(var r in e)r=="constructor"&&(t||!Mk.call(e,r))||n.push(r);return n}function Vc(e){return mv(e)?xv(e,!0):Ak(e)}var Dk=lr(Object,"create");const Uo=Dk;function $k(){this.__data__=Uo?Uo(null):{},this.size=0}function Ik(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lk="__lodash_hash_undefined__",Bk=Object.prototype,zk=Bk.hasOwnProperty;function Vk(e){var t=this.__data__;if(Uo){var n=t[e];return n===Lk?void 0:n}return zk.call(t,e)?t[e]:void 0}var Fk=Object.prototype,Hk=Fk.hasOwnProperty;function Uk(e){var t=this.__data__;return Uo?t[e]!==void 0:Hk.call(t,e)}var Wk="__lodash_hash_undefined__";function Gk(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Uo&&t===void 0?Wk:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=$k;er.prototype.delete=Ik;er.prototype.get=Vk;er.prototype.has=Uk;er.prototype.set=Gk;function Kk(){this.__data__=[],this.size=0}function Di(e,t){for(var n=e.length;n--;)if(hv(e[n][0],t))return n;return-1}var qk=Array.prototype,Yk=qk.splice;function Xk(e){var t=this.__data__,n=Di(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Yk.call(t,n,1),--this.size,!0}function Jk(e){var t=this.__data__,n=Di(t,e);return n<0?void 0:t[n][1]}function Qk(e){return Di(this.__data__,e)>-1}function Zk(e,t){var n=this.__data__,r=Di(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sn.prototype.clear=Kk;Sn.prototype.delete=Xk;Sn.prototype.get=Jk;Sn.prototype.has=Qk;Sn.prototype.set=Zk;var ej=lr(rn,"Map");const Wo=ej;function tj(){this.size=0,this.__data__={hash:new er,map:new(Wo||Sn),string:new er}}function nj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $i(e,t){var n=e.__data__;return nj(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rj(e){var t=$i(this,e).delete(e);return this.size-=t?1:0,t}function oj(e){return $i(this,e).get(e)}function aj(e){return $i(this,e).has(e)}function ij(e,t){var n=$i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function to(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}to.prototype.clear=tj;to.prototype.delete=rj;to.prototype.get=oj;to.prototype.has=aj;to.prototype.set=ij;function Ov(e){return e==null?"":dv(e)}function Ev(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var sj=Cv(Object.getPrototypeOf,Object);const Fc=sj;var lj="[object Object]",cj=Function.prototype,uj=Object.prototype,_v=cj.toString,dj=uj.hasOwnProperty,fj=_v.call(Object);function Ii(e){if(!ir(e)||ar(e)!=lj)return!1;var t=Fc(e);if(t===null)return!0;var n=dj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_v.call(n)==fj}function pj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function hj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:pj(e,t,n)}var gj="\\ud800-\\udfff",vj="\\u0300-\\u036f",mj="\\ufe20-\\ufe2f",yj="\\u20d0-\\u20ff",bj=vj+mj+yj,wj="\\ufe0e\\ufe0f",Sj="\\u200d",xj=RegExp("["+Sj+gj+bj+wj+"]");function Rv(e){return xj.test(e)}function Cj(e){return e.split("")}var Nv="\\ud800-\\udfff",Oj="\\u0300-\\u036f",Ej="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Rj=Oj+Ej+_j,Nj="\\ufe0e\\ufe0f",Tj="["+Nv+"]",ml="["+Rj+"]",yl="\\ud83c[\\udffb-\\udfff]",Pj="(?:"+ml+"|"+yl+")",Tv="[^"+Nv+"]",Pv="(?:\\ud83c[\\udde6-\\uddff]){2}",kv="[\\ud800-\\udbff][\\udc00-\\udfff]",kj="\\u200d",jv=Pj+"?",Mv="["+Nj+"]?",jj="(?:"+kj+"(?:"+[Tv,Pv,kv].join("|")+")"+Mv+jv+")*",Mj=Mv+jv+jj,Aj="(?:"+[Tv+ml+"?",ml,Pv,kv,Tj].join("|")+")",Dj=RegExp(yl+"(?="+yl+")|"+Aj+Mj,"g");function $j(e){return e.match(Dj)||[]}function Ij(e){return Rv(e)?$j(e):Cj(e)}function Lj(e){return function(t){t=Ov(t);var n=Rv(t)?Ij(t):void 0,r=n?n[0]:t.charAt(0),o=n?hj(n,1).join(""):t.slice(1);return r[e]()+o}}var Bj=Lj("toUpperCase");const zj=Bj;function Av(e){return zj(Ov(e).toLowerCase())}function Vj(){this.__data__=new Sn,this.size=0}function Fj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Hj(e){return this.__data__.get(e)}function Uj(e){return this.__data__.has(e)}var Wj=200;function Gj(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Wo||r.length<Wj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new to(r)}return n.set(e,t),this.size=n.size,this}function no(e){var t=this.__data__=new Sn(e);this.size=t.size}no.prototype.clear=Vj;no.prototype.delete=Fj;no.prototype.get=Hj;no.prototype.has=Uj;no.prototype.set=Gj;function Kj(e,t){return e&&Ai(t,zc(t),e)}function qj(e,t){return e&&Ai(t,Vc(t),e)}var Dv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sf=Dv&&typeof module=="object"&&module&&!module.nodeType&&module,Yj=Sf&&Sf.exports===Dv,xf=Yj?rn.Buffer:void 0,Cf=xf?xf.allocUnsafe:void 0;function Xj(e,t){if(t)return e.slice();var n=e.length,r=Cf?Cf(n):new e.constructor(n);return e.copy(r),r}function Jj(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function $v(){return[]}var Qj=Object.prototype,Zj=Qj.propertyIsEnumerable,Of=Object.getOwnPropertySymbols,eM=Of?function(e){return e==null?[]:(e=Object(e),Jj(Of(e),function(t){return Zj.call(e,t)}))}:$v;const Hc=eM;function tM(e,t){return Ai(e,Hc(e),t)}var nM=Object.getOwnPropertySymbols,rM=nM?function(e){for(var t=[];e;)Ev(t,Hc(e)),e=Fc(e);return t}:$v;const Iv=rM;function oM(e,t){return Ai(e,Iv(e),t)}function Lv(e,t,n){var r=t(e);return Mi(e)?r:Ev(r,n(e))}function aM(e){return Lv(e,zc,Hc)}function iM(e){return Lv(e,Vc,Iv)}var sM=lr(rn,"DataView");const bl=sM;var lM=lr(rn,"Promise");const wl=lM;var cM=lr(rn,"Set");const Sl=cM;var Ef="[object Map]",uM="[object Object]",_f="[object Promise]",Rf="[object Set]",Nf="[object WeakMap]",Tf="[object DataView]",dM=sr(bl),fM=sr(Wo),pM=sr(wl),hM=sr(Sl),gM=sr(vl),Hn=ar;(bl&&Hn(new bl(new ArrayBuffer(1)))!=Tf||Wo&&Hn(new Wo)!=Ef||wl&&Hn(wl.resolve())!=_f||Sl&&Hn(new Sl)!=Rf||vl&&Hn(new vl)!=Nf)&&(Hn=function(e){var t=ar(e),n=t==uM?e.constructor:void 0,r=n?sr(n):"";if(r)switch(r){case dM:return Tf;case fM:return Ef;case pM:return _f;case hM:return Rf;case gM:return Nf}return t});const Uc=Hn;var vM=Object.prototype,mM=vM.hasOwnProperty;function yM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&mM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var bM=rn.Uint8Array;const Pf=bM;function Wc(e){var t=new e.constructor(e.byteLength);return new Pf(t).set(new Pf(e)),t}function wM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var SM=/\w*$/;function xM(e){var t=new e.constructor(e.source,SM.exec(e));return t.lastIndex=e.lastIndex,t}var kf=kn?kn.prototype:void 0,jf=kf?kf.valueOf:void 0;function CM(e){return jf?Object(jf.call(e)):{}}function OM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var EM="[object Boolean]",_M="[object Date]",RM="[object Map]",NM="[object Number]",TM="[object RegExp]",PM="[object Set]",kM="[object String]",jM="[object Symbol]",MM="[object ArrayBuffer]",AM="[object DataView]",DM="[object Float32Array]",$M="[object Float64Array]",IM="[object Int8Array]",LM="[object Int16Array]",BM="[object Int32Array]",zM="[object Uint8Array]",VM="[object Uint8ClampedArray]",FM="[object Uint16Array]",HM="[object Uint32Array]";function UM(e,t,n){var r=e.constructor;switch(t){case MM:return Wc(e);case EM:case _M:return new r(+e);case AM:return wM(e,n);case DM:case $M:case IM:case LM:case BM:case zM:case VM:case FM:case HM:return OM(e,n);case RM:return new r;case NM:case kM:return new r(e);case TM:return xM(e);case PM:return new r;case jM:return CM(e)}}function WM(e){return typeof e.constructor=="function"&&!Lc(e)?NP(Fc(e)):{}}var GM="[object Map]";function KM(e){return ir(e)&&Uc(e)==GM}var Mf=Lr&&Lr.isMap,qM=Mf?Bc(Mf):KM;const YM=qM;var XM="[object Set]";function JM(e){return ir(e)&&Uc(e)==XM}var Af=Lr&&Lr.isSet,QM=Af?Bc(Af):JM;const ZM=QM;var eA=1,tA=2,nA=4,Bv="[object Arguments]",rA="[object Array]",oA="[object Boolean]",aA="[object Date]",iA="[object Error]",zv="[object Function]",sA="[object GeneratorFunction]",lA="[object Map]",cA="[object Number]",Vv="[object Object]",uA="[object RegExp]",dA="[object Set]",fA="[object String]",pA="[object Symbol]",hA="[object WeakMap]",gA="[object ArrayBuffer]",vA="[object DataView]",mA="[object Float32Array]",yA="[object Float64Array]",bA="[object Int8Array]",wA="[object Int16Array]",SA="[object Int32Array]",xA="[object Uint8Array]",CA="[object Uint8ClampedArray]",OA="[object Uint16Array]",EA="[object Uint32Array]",xe={};xe[Bv]=xe[rA]=xe[gA]=xe[vA]=xe[oA]=xe[aA]=xe[mA]=xe[yA]=xe[bA]=xe[wA]=xe[SA]=xe[lA]=xe[cA]=xe[Vv]=xe[uA]=xe[dA]=xe[fA]=xe[pA]=xe[xA]=xe[CA]=xe[OA]=xe[EA]=!0;xe[iA]=xe[zv]=xe[hA]=!1;function Ga(e,t,n,r,o,a){var i,s=t&eA,l=t&tA,c=t&nA;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!na(e))return e;var u=Mi(e);if(u){if(i=yM(e),!s)return TP(e,i)}else{var d=Uc(e),f=d==zv||d==sA;if(wv(e))return Xj(e,s);if(d==Vv||d==Bv||f&&!o){if(i=l||f?{}:WM(e),!s)return l?oM(e,qj(i,e)):tM(e,Kj(i,e))}else{if(!xe[d])return o?e:{};i=UM(e,d,s)}}a||(a=new no);var p=a.get(e);if(p)return p;a.set(e,i),ZM(e)?e.forEach(function(b){i.add(Ga(b,t,n,b,e,a))}):YM(e)&&e.forEach(function(b,y){i.set(y,Ga(b,t,n,y,e,a))});var h=c?l?iM:aM:l?Vc:zc,m=u?void 0:h(e);return kP(m||e,function(b,y){m&&(y=b,b=e[y]),gv(i,y,Ga(b,t,n,y,e,a))}),i}var _A=1,RA=4;function Df(e){return Ga(e,_A|RA)}const ci="ComponentLib",xl=`plugin:${ci}`,NA=({children:e})=>w("div",{className:iv.tabTitle,children:e});class TA extends g.Component{constructor(n){super(n);B(this,"containerRef");B(this,"disposeList",[]);B(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===ci&&n&&this.registerDragEvent()});B(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const a=r.pageModel,s=o.export.getDnd(),l=new Xn.Sensor({name:"ComponentListBox",container:n.current}),c=f=>{const p=f.event.target;if(!p)return;const h=lv(p,sv);if(!h)return;const m=a.materialsModel.findSnippetById(h);if(m)return a==null?void 0:a.createNode(m.schema)};l.setCanDrag(async f=>{const p=c(f);return this.props.pluginCtx.pluginManager.get("Designer").then(h=>{const m=h==null?void 0:h.export;m==null||m.selectNode("")}),{...f,extraData:{dropType:"NEW_ADD",dragNode:p}}}),s.registerSensor(l);const u=()=>{const{getWorkbench:f}=this.props.pluginCtx,p=f();p.state.leftBoxFixed||p.closeLeftPanel()};this.disposeList.push(()=>{s.emitter.off("dragStart",u)}),s.emitter.on("dragStart",u);const d=async f=>{const p=c(f);if(!p)return;const{pageModel:h}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async m=>{var N;const b=m==null?void 0:m.export,y=b==null?void 0:b.getSelectedNodeId(),S=h.getNode(y),E=be.findContainerNode(S);let x="CHILD_END",v=S??null;if(S)E===S.parent?S.isContainer()?(x="CHILD_END",v=S,h.addNode(p,S,x)):(x="AFTER",v=S):E&&!be.isPageModel(E)&&(x="CHILD_END",v=E);else{const T=h.getRootNode();T&&(x="CHILD_END",v=T)}const O=b==null?void 0:b.getInstance(),C=await(O==null?void 0:O.customAdvanceHook.onNewAdd({dragNode:p,dropNode:v,eventObj:{...f,from:f.event,fromSensor:l,pointer:null,fromPointer:null,extraData:{}}}));if(C===!1)return;let R={dragNode:p,dropNode:v,pos:x};typeof C=="object"&&(R={...R,dragNode:C.addNode??R.dragNode,dropNode:C.dropNode??R.dropNode,pos:((N=C.dropPosInfo)==null?void 0:N.pos)??R.pos}),h.addNode(R.dragNode,R.dropNode,R.pos),setTimeout(()=>{b==null||b.selectNode(R.dragNode.id)},200)})};this.disposeList.push(()=>{l.emitter.off("onClick",d)}),l.emitter.on("onClick",d)});this.containerRef=g.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(cf).forEach(s=>{o.addResourceBundle(s,xl,cf[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,r=n.map(o=>({label:w(NA,{children:Av(o.name)}),key:o.name,children:w(WT,{dataSource:o.list})}));return w("div",{ref:this.containerRef,className:iv.container,children:w(Y.Tabs,{defaultActiveKey:"BaseComponent",items:r,style:{flex:1}})})}}const Fv={name:ci,async init(e){const t=Ir(xl)(TA),n=Ir(xl)(({t:o})=>w(Ye,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:w(n,{}),name:"ComponentLib",icon:w(d0,{}),render:w(t,{pluginCtx:e})})},reload:async()=>{console.log(ci,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Hv="Designer",PA={pluginName:"组件库"},kA={pluginName:"Component Store"},$f={zh_CN:PA,en_US:kA},jA="_toolBarBox_h5ljb_2",MA="_item_h5ljb_10",AA="_layoutSelectBox_h5ljb_20",DA="_hoverBox_h5ljb_25",$A="_hoverBoxActive_h5ljb_35",IA="_hoverItem_h5ljb_39",LA="_placeholder_h5ljb_47",gn={toolBarBox:jA,item:MA,layoutSelectBox:AA,hoverBox:DA,hoverBoxActive:$A,hoverItem:IA,placeholder:LA},BA=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=g.useState(!1);return ee("div",{className:gn.layoutSelectBox,children:[w("div",{className:dt([gn.hoverBox,r&&gn.hoverBoxActive]),children:e.map(a=>w("div",{className:gn.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),w("div",{className:gn.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},Uv=e=>{var p;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(h=>{var S;const m=h,b=(S=m.materialsModel.findByComponentName(m.value.componentName))==null?void 0:S.value.title,y=m.value.title||b||m.value.componentName||"";return{key:h.id,label:y||"Empty"}}),c=w("div",{className:gn.item,onClick:()=>o((s==null?void 0:s.id)||""),children:w(gh,{})}),u=w("div",{className:gn.item,onClick:()=>r((s==null?void 0:s.id)||""),children:w(tc,{})}),d=w("div",{className:gn.item,onClick:()=>a((s==null?void 0:s.id)||""),children:w(wh,{})}),f=w(BA,{dataSource:l.reverse(),onSelect:n,children:w("div",{children:(s==null?void 0:s.value.title)||((p=s==null?void 0:s.material)==null?void 0:p.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:d,nodeLayout:f}},zA=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=g.useMemo(()=>Uv(e),[e]);return ee("div",{className:gn.toolBarBox,children:[o,r,t,n]})},VA=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)be.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},FA=({node:e})=>w("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),HA="_hoverTips_k3vn7_2",UA={hoverTips:HA};class WA{constructor(t){B(this,"getPortalViewCtx");B(this,"ctx");B(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await Tn(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await Tn(),n}}class GA extends g.Component{constructor(n){super(n);B(this,"layoutRef");B(this,"customAdvanceHook");B(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));B(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});B(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});B(this,"onNodeDrop",async n=>{var c,u,d,f,p,h,m,b,y,S,E;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((d=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:d.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((h=(p=(f=l.material)==null?void 0:f.value.advanceCustom)==null?void 0:p.onNewAdd)==null?void 0:h.call(p,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((m=a.dropNode)==null?void 0:m.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((b=a.dropNode)==null?void 0:b.id)===((y=a.dragNode)==null?void 0:y.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((S=a.dragNode)==null?void 0:S.id)||"",((E=a==null?void 0:a.dropNode)==null?void 0:E.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var x,v,O;if(l&&await this.onSelectNode(l,null)===!1){(x=r.current)==null||x.selectNode("");return}(O=r.current)==null||O.selectNode(((v=a.dragNode)==null?void 0:v.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});B(this,"onSelectNode",async(n,r)=>{var l,c,u,d;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((d=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:d.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});B(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});B(this,"getGhostView",(n,r)=>{let o=w(FA,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=w(i,{node:n,params:r})),o});B(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});B(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});B(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});B(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});B(this,"getToolbarView",n=>{const o={nodeList:VA(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=Uv(o);let i=w(zA,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=w(s,{node:n,context:this.context,toolBarItems:a})),i});B(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:w("div",{className:UA.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});B(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});B(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});B(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?w(Ye,{}):w(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});B(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?w(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});B(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?w(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=g.createRef(),this.customAdvanceHook=new WA({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys($f).forEach(r=>{n.addResourceBundle(r,`plugin:${Hv}`,$f[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:d,selectToolbarView:f,ghostView:p,assets:h,portalView:m,selectRectViewRender:b,hoverRectViewRender:y,dropViewRender:S}=this.state,{pluginCtx:E}=r,x=E.engine.props.renderJSUrl||"./render.umd.js",v={};return b&&(v.selectRectViewRender=this.innerSelectRectViewRender),y&&(v.hoverRectViewRender=this.innerHoverRectViewRender),S&&(v.dropViewRender=this.innerDropViewRender),f&&(v.selectToolbarView=this.state.selectToolbarView),ee(Ye,{children:[w(Xn.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:x,...r,hoverToolBarView:d,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...v,ghostView:p,assets:h,pluginCtx:this.props.pluginCtx}),m&&Lt.createPortal(m,document.body)]})}}const Wv=e=>{const t=g.createRef();return{name:Hv,async init(n){n.getWorkbench().replaceBodyView(w(GA,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]},getLayoutRef:()=>{var n;return(n=t.current)==null?void 0:n.layoutRef},getDesignerWindow:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.iframeContainer.getWindow()}}),meta:{engine:{version:"1.0.0"}}}},Cl=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||Cl(e.parentElement,t)},Gv=(e,t,n)=>{const r=(o,a)=>{var m,b,y;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(S=>typeof S!="string");const s=(m=n.materialsModel.findByComponentName(o.componentName))==null?void 0:m.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(b=n.getNode(o.id||""))!=null&&b.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:S})=>w("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:S})},d=o.props||{},f=(S,E,x)=>{if(be.isJSSlotPropNode(S)){const O=S,C=n.getNode(o.id);let R="";if(C){const j=p(C,[...x,E]);R=be.getMTitle(j)}let N=E;R&&(N=be.getMTitle(R)||E);const T={title:N,key:`${o.id}-${x.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let k=[];O.value&&!Array.isArray(O.value)?k=[O.value]:k=O.value,T.children=Gv(k,T,n),c.push(T);return}if(Ii(S)){const O=S;Object.keys(O).forEach(C=>{f(O[C],C,[...x,E])})}Array.isArray(S)&&S.forEach((C,R)=>{f(C,String(R),[...x,E])})},p=(S,E)=>{const x=YA(S),v=E.map(O=>String(parseInt(O,10))===O?"$NUM":O);return x[v.join(".")]||""};Object.keys(d).forEach(S=>{f(d[S],S,[])}),c.length>0&&((y=l.children)==null||y.push(u),u.parent=l);const h=i.map(S=>r(S,l))||[];return l.children=[...l.children,...h],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},KA=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=Gv(r,o,t),[o]},ms=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function qA(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const YA=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(Ii(a)){const c=[...i],u=a,d=u.componentName;if(d==="ArraySetter"){const p=((s=u.props)==null?void 0:s.item.setters)||[],h=t[i.join(".")];let m="";typeof h=="string"?m=h:m=h.label,c.push("$NUM"),p.forEach(b=>{m=`${m}`,t[c.join(".")]=m,r(b,c)})}else d==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(h=>{const m=[...c];m.push(h.name),t[m.join(".")]=h.title,(h.setters||[]).forEach(y=>{r(y,[...m])})})}};return n.forEach(a=>{let i=null;be.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(d=>{r(d,c)})})}),t};var wr=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(wr||{});const Kv=g.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),XA="_contentBox_1tkrj_2",JA="_nodeBox_1tkrj_13",QA="_toolbarBox_1tkrj_17",ZA="_iconItem_1tkrj_21",eD="_nodeContent_1tkrj_25",tD="_selected_1tkrj_35",nD="_nodeArrow_1tkrj_38",rD="_expanded_1tkrj_41",oD="_nodeRenderView_1tkrj_45",aD="_nodeChildren_1tkrj_56",iD="_dropAnchorLine_1tkrj_73",sD="_arrowSpan_1tkrj_82",it={contentBox:XA,nodeBox:JA,toolbarBox:QA,iconItem:ZA,nodeContent:eD,selected:tD,nodeArrow:nD,expanded:rD,nodeRenderView:oD,nodeChildren:aD,dropAnchorLine:iD,arrowSpan:sD},yr="data-drag-key",qv=e=>{var F,ne,Z,ue;const t=g.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=g.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:d,onCopyNode:f}=g.useContext(Kv),[p,h]=g.useState((F=t.current)==null?void 0:F.titleEditable),[m,b]=g.useState("");t.current.titleEditable=p;const y=s.expandKeys.find(A=>A===r.key),S=A=>{let I=s.expandKeys;A!==void 0?A===!0?y||I.push(r.key||""):y&&(I=I.filter(G=>G!==r.key)):y?I=I.filter(G=>G!==r.key):I.push(r.key||""),l({expandKeys:I})},E=s.currentSelectNodeKeys.find(A=>A===r.key),x=g.useRef(null),v=()=>{var I;if(S(!0),p){(I=x==null?void 0:x.current)==null||I.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let A=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}E?A=A.filter(G=>G!==r.key):A.push(String(r.key)),c==null||c({keys:A,node:r}),l({currentSelectNodeKeys:A})},O=20,C=O*n,R=r.canBeSelected??!0,N={[yr]:r.key},T=g.useRef(),k=g.useRef();k.current=s,T.current=A=>{const I=s.expandKeys,G=Array.from(new Set([...I,A]));l({expandKeys:G})};const j=g.useRef(null);g.useEffect(()=>{var ie,de;let A=0;(ie=j.current)==null||ie.addEventListener("mouseenter",()=>{A=window.setTimeout(()=>{var we,fe;((we=k.current)==null?void 0:we.dragState)===wr.DRAGGING&&((fe=T.current)==null||fe.call(T,r.key||""))},.8*1e3)}),(de=j.current)==null||de.addEventListener("mouseleave",()=>{clearTimeout(A)});const I=we=>{var fe;if(t.current.titleEditable){if(we.target===((fe=x.current)==null?void 0:fe.input))return;h(!1),L.updateValue()}};let G;return(async()=>{const we=await e.pluginCtx.pluginManager.get("Designer"),fe=we==null?void 0:we.export,Ee=fe==null?void 0:fe.getDesignerWindow();Ee==null||Ee.addEventListener("click",I),G=Ee||null})(),document.addEventListener("click",I),()=>{A&&clearTimeout(A),document.removeEventListener("click",I),G==null||G.removeEventListener("click",I)}},[]);const L=(ne=s.pageModel)==null?void 0:ne.getNode(r.key||""),M=()=>{const A=!a;if(!L)return;const I=L.value.configure.devState??{};I.condition=A,L.value.configure.devState=I,L.updateValue(),i(A)};let P=r.title;r.titleViewRender&&(P=r.titleViewRender({item:r,titleView:r.title}));const D=ee("div",{className:it.nodeBox,children:[ee("div",{className:dt([it.nodeContent,E&&R&&it.selected]),style:{marginLeft:`${-C}px`,paddingLeft:`${C+8}px`},onMouseMove:async()=>{if(!r.key)return;const A=await(d==null?void 0:d()),I=A==null?void 0:A.getDynamicComponentInstances(r.key);typeof(I==null?void 0:I._CONDITION)<"u"&&i(I==null?void 0:I._CONDITION)},children:[(Z=r.children)!=null&&Z.length?w("span",{style:{paddingRight:"5px"},className:it.arrowSpan,onClickCapture:()=>S(),children:w(F0,{className:dt([it.nodeArrow,y&&it.expanded])})}):null,ee("div",{className:it.nodeRenderView,...N,ref:j,onClick:v,onDoubleClick:()=>{var te;if(!L)return;const A=L,I=(te=A.materialsModel.findByComponentName(A.value.componentName))==null?void 0:te.value.title,G=A.value.title||I||A.value.componentName||"";b(G),h(!0),setTimeout(()=>{var ie;(ie=x.current)==null||ie.focus()},16.66)},children:[!p&&P,p&&w("div",{style:{paddingRight:"10px"},children:w(Y.Input,{size:"small",maxLength:20,style:{},ref:x,value:m,onPressEnter:()=>{h(!1),L.updateValue()},onChange:A=>{L.value.title=A.target.value,b(A.target.value)}})})]}),!p&&!r.rootNode&&ee("div",{className:it.toolbarBox,children:[ee("div",{className:it.iconItem,children:[!a&&w(T0,{onClick:M}),a&&w(wh,{onClick:M})]}),w("div",{className:it.iconItem,onClick:()=>{f(r.key||"")},children:w(gh,{})}),w("div",{className:it.iconItem,onClick:()=>{u(r.key||"")},children:w(tc,{})})]})]}),w("div",{className:dt([it.nodeChildren,E&&it.selected]),style:{paddingLeft:`${O}px`,height:y?"auto":"0"},children:y&&((ue=r.children)==null?void 0:ue.map((A,I)=>{const G=`${A.key}-${I}`;return w(qv,{item:A,paths:[...o,I],level:n+1,pluginCtx:e.pluginCtx},G)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:D}):D};class lD extends g.Component{constructor(n){super(n);B(this,"domRef");B(this,"disposeCbList",[]);B(this,"sensor");B(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});B(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=KA(o,r);this.setState({treeData:a})});B(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(ms(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});B(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${yr}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});B(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);$t.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));$t.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});B(this,"containNode",(n,r)=>{let o=null;return ms(n,a=>a.key===r.key?(o=a,!0):!1),o});B(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return ms(r,a=>a.key===n?(o=a,!0):!1),o});B(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new Xn.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var m;const l=s.event.target;if(!l)return;const c=Cl(l,yr);if(!c)return;const u=o.getNode(c),d=this.getTreeNodeByKey(c);if((d==null?void 0:d.canDrag)!==void 0&&(d==null?void 0:d.canDrag)===!1)return;const f=a.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(p===!1)return!1;if(!u){console.log("targetNode not found");return}const h={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof p=="object"&&(h.extraData.dragNode=p.dragNode,h.extraData.dragNodeUID=((m=p.dragNode)==null?void 0:m.id)||""),h}),n.setCanDrop(async s=>{var S;const l=s.event.target;if(!l)return $t.debug("drop dom not found"),s;const c=Cl(l,yr);if(!c)return $t.debug("targetNodeId dom not found",s,l,yr),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return $t.debug("node can not be drop by tree node config"),s;const d=o.getNode(c);if(!d)return $t.debug("targetNode not found"),s;const f=(S=s.extraData)==null?void 0:S.dragNode;if(!f)return $t.debug("startNode not found"),s;if((f==null?void 0:f.id)===d.id)return $t.debug("startNode and dropNode is the same"),s;if(f.contains(d.id))return $t.debug("startNode contain dropNode"),s;const h=qA({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(h.pos)))return!1;$t.info("can dropNode",d);const m={...s,extraData:{...s.extraData,dropPosInfo:h,dropNode:d,dropNodeUID:d.id}},b=a.getInstance(),y=await(b==null?void 0:b.customAdvanceHook.canDrop({dragNode:m.extraData.dragNode,dropNode:d,eventObj:{...m,from:m.event,fromSensor:n,fromPointer:m.pointer}}));return y===!1?!1:(typeof y=="object"&&(m.extraData={...m.extraData,...y}),m)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var p,h;const l=s.extraData.dropNode;if(this.setState({dragState:wr.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(p=document.querySelectorAll(`[${yr}="${l.id}"]`))==null?void 0:p[0];if(!c)return;const u=((h=s.extraData)==null?void 0:h.dropPosInfo)||{},d=c.getBoundingClientRect(),f={x:0,y:0};f.x=d.x,u.pos==="before"?f.y=d.y:u.pos==="after"?f.y=d.y+d.height:(f.y=d.y+d.height,f.x=d.x+20),this.setState({dropPosInfo:f})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:wr.NORMAL})}),this.sensor=n});this.domRef=g.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:wr.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return w(Kv.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:ee("div",{className:it.contentBox,ref:this.domRef,children:[n.map((i,s)=>w(qv,{item:i,pluginCtx:this.props.pluginCtx},i.key+`${s}`)),r===wr.DRAGGING&&o&&w("div",{className:it.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const cD={pluginName:"大纲树"},uD={pluginName:"Layout Tree"},If={zh_CN:cD,en_US:uD},Ol="OutlineTree",ys=`plugin:${Ol}`,dD={name:Ol,async init(e){const{i18n:t}=e;Object.keys(If).forEach(a=>{t.addResourceBundle(a,ys,If[a],!0,!0)});const n=Ir(ys)(lD),r=Ir(ys)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:Ol,icon:w(l0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},fD="_CFromRenderBox_1vsdm_2",pD={CFromRenderBox:fD},Gc=g.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Yv={},hD=e=>{Object.assign(Yv,e)};class Kc extends g.Component{constructor(n){super(n);B(this,"updateContext");B(this,"getFieldsValue",()=>this.formatValue(this.state.formState));B(this,"setFields",n=>{this.setState({formState:n})});B(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Yv}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return w(Gc.Provider,{value:n,children:r})}}class gD extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function vD(e){return Ft(e)&&typeof e[Symbol.iterator]=="function"}function Ft(e){return typeof e=="object"&&e!=null}function Ct(e){return typeof e=="string"?JSON.stringify(e):""+e}function mD(e){const{done:t,value:n}=e.next();return t?void 0:n}function yD(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Ct(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*Lf(e,t,n,r){vD(e)||(e=[e]);for(const o of e){const a=yD(o,t,n,r);a&&(yield a)}}function*qc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Ft(t.schema)&&Ft(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=qc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Ft(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class on{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return Lf(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return Lf(u,c,this,l)}:this.refiner=()=>[]}assert(t){return bD(t,this)}create(t){return wD(t,this)}is(t){return xD(t,this)}mask(t){return SD(t,this)}validate(t,n){return n===void 0&&(n={}),ro(t,this,n)}}function bD(e,t){const n=ro(e,t);if(n[0])throw n[0]}function wD(e,t){const n=ro(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function SD(e,t){const n=ro(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function xD(e,t){return!ro(e,t)[0]}function ro(e,t,n){n===void 0&&(n={});const r=qc(e,t,n),o=mD(r);return o[0]?[new gD(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function CD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?Qv(a):Te(a)}function Dn(e,t){return new on({type:e,schema:null,validator:t})}function Br(e){return new on({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function OD(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return Qv(r);default:return Te(r)}}function Ue(){return Dn("any",()=>!0)}function qe(e){return new on({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Ct(t)}})}function zr(){return Dn("boolean",e=>typeof e=="boolean")}function El(e){const t={},n=e.map(r=>Ct(r)).join();for(const r of e)t[r]=r;return new on({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Ct(r)}})}function Xv(){return Dn("func",e=>typeof e=="function"||"Expected a function, but received: "+Ct(e))}function Qt(e){const t=Ct(e),n=typeof e;return new on({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Ct(r)}})}function ED(){return Dn("never",()=>!1)}function Jv(){return Dn("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Ct(e))}function Te(e){const t=e?Object.keys(e):[],n=ED();return new on({type:"object",schema:e||null,*entries(r){if(e&&Ft(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Ft(r)||"Expected an object, but received: "+Ct(r)},coercer(r){return Ft(r)?{...r}:r}})}function X(e){return new on({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function To(e,t){return new on({type:"record",schema:null,*entries(n){if(Ft(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function q(){return Dn("string",e=>typeof e=="string"||"Expected a string, but received: "+Ct(e))}function Qv(e){const t=Object.keys(e);return new on({type:"type",schema:e,*entries(n){if(Ft(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function St(e){const t=e.map(n=>n.type).join(" | ");return new on({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||_D()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=qc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Ct(n),...o]}})}function _D(){return Dn("unknown",()=>!0)}const Zv=Te({package:q(),version:q(),name:q(),exportName:X(q()),destructuring:X(zr()),subName:X(q()),main:X(q()),cssPaths:X(qe(q()))});qe(Zv);var Rn=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Rn||{}),_l=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(_l||{});const RD=()=>Dn("normalObj",e=>!Ii(e)||[Rn.SLOT,Rn.EXPRESSION,Rn.FUNCTION].includes(e==null?void 0:e.type)?!1:(ro(e,To(q(),Yc)),!0)),Yc=St([q(),Jv(),zr(),Te({type:Qt(Rn.SLOT),renderType:El([_l.FUNC,_l.COMP]),params:X(qe(q())),value:Br(()=>St([ui,qe(ui)]))}),Te({type:Qt(Rn.EXPRESSION),value:q()}),Te({type:Qt(Rn.FUNCTION),value:q()}),RD(),qe(Br(()=>Yc))]),Bf=Te({type:Qt(Rn.EXPRESSION),value:q()}),ui=Te({id:X(q()),title:X(q()),componentName:q(),props:X(To(q(),Yc)),nodeName:X(q()),state:X(To(q(),Ue())),children:Br(()=>X(qe(St([q(),ui])))),configure:X(Ue()),css:X(Ue()),style:X(Ue()),classNames:X(qe(Ue())),refId:X(q()),extra:X(To(Ue(),Ue())),condition:X(St([zr(),Bf])),loop:X(Te({open:zr(),data:St([qe(Ue()),Bf]),args:X(qe(q())),forName:X(q()),forIndex:X(q()),key:X(Ue()),name:X(q())})),methods:X(qe(Ue()))}),ND=e=>Ii(e)?e.label:e,di=St([q(),Te({label:q(),tip:X(q())})]),TD=Te({type:Qt("shape"),value:qe(Te({name:q(),title:di,valueType:Br(()=>Li)}))}),PD=Te({type:Qt("enums"),value:qe(q())});Te({type:Qt("array"),value:Br(()=>Li)});const kD=Te({type:Qt("array"),value:Br(()=>qe(Li))}),Li=St([El(["array","boolean","number","object","string"]),El(["component","expression","function"]),TD,PD,kD]),jD=St([q(),Te({componentName:q(),props:X(Ue()),initialValue:X(Ue()),component:X(Ue())})]),bs=Te({name:q(),title:di,valueType:Li,description:X(q()),defaultValue:Ue(),setters:X(qe(jD)),condition:X(Xv())});St([q(),Xv()]);St([q(),Te({name:q(),describe:X(q()),params:X(Te({name:q(),description:q()})),template:q()})]);const MD=Te({id:X(q()),title:q(),snapshot:St([q(),Ue()]),snapshotText:X(q()),description:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),schema:CD(OD(ui,["id"]),Te({componentName:X(q())}))});Te({componentName:q(),title:q(),screenshot:X(q()),icon:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),priority:X(Jv()),npm:X(Zv),snippets:qe(MD),props:qe(St([bs,Te({title:X(di),type:Qt("single"),content:bs}),Te({title:X(di),type:Qt("group"),content:qe(bs)})])),fixedProps:X(Ue()),isContainer:X(St([zr(),Te({placeholder:q(),width:q(),height:q()})])),disableEditorDragDom:X(Ue()),isLayout:X(zr()),rootSelector:X(q()),advanceCustom:X(Ue()),extra:X(To(Ue(),Ue()))});const em=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});em.setterName="字符设置器";const tm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});tm.setterName="数字设置器";const Xc=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function AD(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),w("div",{style:o,children:w(Kc,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:w(lu,{suffix:w("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:w(tc,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function DD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Bi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Jc(e){return"nodeType"in e}function gt(e){var t,n;return e?oo(e)?e:Jc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Qc(e){const{Document:t}=gt(e);return e instanceof t}function ra(e){return oo(e)?!1:e instanceof gt(e).HTMLElement}function $D(e){return e instanceof gt(e).SVGElement}function ao(e){return e?oo(e)?e.document:Jc(e)?Qc(e)?e:ra(e)?e.ownerDocument:document:document:document}const Wt=Bi?g.useLayoutEffect:g.useEffect;function Zc(e){const t=g.useRef(e);return Wt(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function ID(){const e=g.useRef(null),t=g.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Go(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Wt(()=>{n.current!==e&&(n.current=e)},t),n}function oa(e,t){const n=g.useRef();return g.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fi(e){const t=Zc(e),n=g.useRef(null),r=g.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Rl(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let ws={};function aa(e,t){return g.useMemo(()=>{if(t)return t;const n=ws[e]==null?0:ws[e]+1;return ws[e]=n,e+"-"+n},[e,t])}function nm(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const _r=nm(1),Ko=nm(-1);function LD(e){return"clientX"in e&&"clientY"in e}function eu(e){if(!e)return!1;const{KeyboardEvent:t}=gt(e.target);return t&&e instanceof t}function BD(e){if(!e)return!1;const{TouchEvent:t}=gt(e.target);return t&&e instanceof t}function Nl(e){if(BD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return LD(e)?{x:e.clientX,y:e.clientY}:null}const Vr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Vr.Translate.toString(e),Vr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),zf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zD(e){return e.matches(zf)?e:e.querySelector(zf)}const VD={display:"none"};function FD(e){let{id:t,value:n}=e;return w("div",{id:t,style:VD,children:n})}const HD={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function UD(e){let{id:t,announcement:n}=e;return w("div",{id:t,style:HD,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function WD(){const[e,t]=g.useState("");return{announce:g.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const rm=g.createContext(null);function GD(e){const t=g.useContext(rm);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function KD(){const[e]=g.useState(()=>new Set),t=g.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[g.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const qD={draggable:`
143
125
  To pick up a draggable item, press the space bar.
144
126
  While dragging, use the arrow keys to move the item.
145
127
  Press space again to drop the item in its new position, or press escape to cancel.
146
- `},WD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function GD(e){let{announcements:t=WD,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=UD}=e;const{announce:a,announcement:i}=FD(),s=ba("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),VD(v.useMemo(()=>({onDragStart(d){let{active:f}=d;a(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:p}=d;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(d){let{active:f,over:p}=d;a(t.onDragOver({active:f,over:p}))},onDragEnd(d){let{active:f,over:p}=d;a(t.onDragEnd({active:f,over:p}))},onDragCancel(d){let{active:f,over:p}=d;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;const u=se(tt,{children:[x(LD,{id:r,value:o.draggable}),x(zD,{id:s,announcement:i})]});return n?rn.createPortal(u,n):u}var Ze;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ze||(Ze={}));function wi(){}function Wf(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function KD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Qt=Object.freeze({x:0,y:0});function qD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function YD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function XD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Gf(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function am(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const JD=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Gf(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Gf(l),u=o.reduce((f,p,g)=>f+qD(c[g],p),0),d=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:d}})}}return a.sort(YD)};function QD(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const ZD=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=QD(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(XD)};function e$(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function im(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Qt}function t$(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const n$=t$(1);function r$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function o$(e,t,n){const r=r$(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const a$={ignoreTransform:!1};function mo(e,t){t===void 0&&(t=a$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=xt(e),{transform:u,transformOrigin:d}=c(e);u&&(n=o$(n,u,d))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Kf(e){return mo(e,{ignoreTransform:!0})}function i$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function s$(e,t){return t===void 0&&(t=xt(e).getComputedStyle(e)),t.position==="fixed"}function l$(e,t){t===void 0&&(t=xt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function Gi(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(tu(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ma(o)||jD(o)||n.includes(o))return n;const{getComputedStyle:a}=xt(o),i=a(o);return o!==e&&l$(o,i)&&n.push(o),s$(o,i)?n:r(o.parentNode)}return e?r(e):n}function sm(e){const[t]=Gi(e,1);return t??null}function Cs(e){return!Wi||!e?null:go(e)?e:eu(e)?tu(e)||e===vo(e).scrollingElement?window:ma(e)?e:null:null}function lm(e){return go(e)?e.scrollX:e.scrollLeft}function cm(e){return go(e)?e.scrollY:e.scrollTop}function jl(e){return{x:lm(e),y:cm(e)}}var ot;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ot||(ot={}));function um(e){return!Wi||!e?!1:e===document.scrollingElement}function dm(e){const t={x:0,y:0},n=um(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const c$={x:.2,y:.2};function u$(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=c$);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=dm(e),p={x:0,y:0},g={x:0,y:0},y={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+y.height?(p.y=ot.Backward,g.y=r*Math.abs((t.top+y.height-a)/y.height)):!u&&l>=t.bottom-y.height&&(p.y=ot.Forward,g.y=r*Math.abs((t.bottom-y.height-l)/y.height)),!f&&s>=t.right-y.width?(p.x=ot.Forward,g.x=r*Math.abs((t.right-y.width-s)/y.width)):!d&&i<=t.left+y.width&&(p.x=ot.Backward,g.x=r*Math.abs((t.left+y.width-i)/y.width)),{direction:p,speed:g}}function d$(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function fm(e){return e.reduce((t,n)=>Ir(t,jl(n)),Qt)}function f$(e){return e.reduce((t,n)=>t+lm(n),0)}function p$(e){return e.reduce((t,n)=>t+cm(n),0)}function h$(e,t){if(t===void 0&&(t=mo),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);sm(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const g$=[["x",["left","right"],f$],["y",["top","bottom"],p$]];class ou{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Gi(n),o=fm(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of g$)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Uo{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function v$(e){const{EventTarget:t}=xt(e);return e instanceof t?e:vo(e)}function Os(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Dt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Dt||(Dt={}));function qf(e){e.preventDefault()}function m$(e){e.stopPropagation()}var ge;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(ge||(ge={}));const pm={start:[ge.Space,ge.Enter],cancel:[ge.Esc],end:[ge.Space,ge.Enter]},y$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ge.Right:return{...n,x:n.x+25};case ge.Left:return{...n,x:n.x-25};case ge.Down:return{...n,y:n.y+25};case ge.Up:return{...n,y:n.y-25}}};class au{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Uo(vo(n)),this.windowListeners=new Uo(xt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&h$(r),n(Qt)}handleKeyDown(t){if(ru(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=pm,coordinateGetter:i=y$,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Qt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const f=sa(d,u),p={x:0,y:0},{scrollableAncestors:g}=r.current;for(const y of g){const w=t.code,{isTop:b,isRight:S,isLeft:E,isBottom:C,maxScroll:m,minScroll:_}=dm(y),O=d$(y),N={x:Math.min(w===ge.Right?O.right-O.width/2:O.right,Math.max(w===ge.Right?O.left:O.left+O.width/2,d.x)),y:Math.min(w===ge.Down?O.bottom-O.height/2:O.bottom,Math.max(w===ge.Down?O.top:O.top+O.height/2,d.y))},T=w===ge.Right&&!S||w===ge.Left&&!E,P=w===ge.Down&&!C||w===ge.Up&&!b;if(T&&N.x!==d.x){const M=y.scrollLeft+f.x,D=w===ge.Right&&M<=m.x||w===ge.Left&&M>=_.x;if(D&&!f.y){y.scrollTo({left:M,behavior:s});return}D?p.x=y.scrollLeft-M:p.x=w===ge.Right?y.scrollLeft-m.x:y.scrollLeft-_.x,p.x&&y.scrollBy({left:-p.x,behavior:s});break}else if(P&&N.y!==d.y){const M=y.scrollTop+f.y,D=w===ge.Down&&M<=m.y||w===ge.Up&&M>=_.y;if(D&&!f.x){y.scrollTo({top:M,behavior:s});return}D?p.y=y.scrollTop-M:p.y=w===ge.Down?y.scrollTop-m.y:y.scrollTop-_.y,p.y&&y.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Ir(sa(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}au.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=pm,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Yf(e){return!!(e&&"distance"in e)}function Xf(e){return!!(e&&"delay"in e)}class iu{constructor(t,n,r){var o;r===void 0&&(r=v$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=vo(i),this.documentListeners=new Uo(this.document),this.listeners=new Uo(r),this.windowListeners=new Uo(xt(i)),this.initialCoordinates=(o=kl(a))!=null?o:Qt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.DragStart,qf),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),this.windowListeners.add(Dt.ContextMenu,qf),this.documentListeners.add(Dt.Keydown,this.handleKeydown),n){if(Yf(n))return;if(Xf(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Dt.Click,m$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=kl(t))!=null?n:Qt,c=sa(o,l);if(!r&&s){if(Xf(s))return Os(c,s.tolerance)?this.handleCancel():void 0;if(Yf(s))return s.tolerance!=null&&Os(c,s.tolerance)?this.handleCancel():Os(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===ge.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const b$={move:{name:"pointermove"},end:{name:"pointerup"}};class su extends iu{constructor(t){const{event:n}=t,r=vo(n.target);super(t,b$,r)}}su.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const w$={move:{name:"mousemove"},end:{name:"mouseup"}};var Ml;(function(e){e[e.RightClick=2]="RightClick"})(Ml||(Ml={}));class S$ extends iu{constructor(t){super(t,w$,vo(t.event.target))}}S$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ml.RightClick?!1:(r==null||r({event:n}),!0)}}];const _s={move:{name:"touchmove"},end:{name:"touchend"}};class x$ extends iu{constructor(t){super(t,_s)}static setup(){return window.addEventListener(_s.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_s.move.name,t)};function t(){}}}x$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Wo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Wo||(Wo={}));var Si;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Si||(Si={}));function C$(e){let{acceleration:t,activator:n=Wo.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=Si.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=_$({delta:d,disabled:!a}),[g,y]=MD(),w=v.useRef({x:0,y:0}),b=v.useRef({x:0,y:0}),S=v.useMemo(()=>{switch(n){case Wo.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Wo.DraggableRect:return o}},[n,o,l]),E=v.useRef(null),C=v.useCallback(()=>{const _=E.current;if(!_)return;const O=w.current.x*b.current.x,N=w.current.y*b.current.y;_.scrollBy(O,N)},[]),m=v.useMemo(()=>s===Si.TreeOrder?[...c].reverse():c,[s,c]);v.useEffect(()=>{if(!a||!c.length||!S){y();return}for(const _ of m){if((r==null?void 0:r(_))===!1)continue;const O=c.indexOf(_),N=u[O];if(!N)continue;const{direction:T,speed:P}=u$(_,N,S,t,f);for(const M of["x","y"])p[M][T[M]]||(P[M]=0,T[M]=0);if(P.x>0||P.y>0){y(),E.current=_,g(C,i),w.current=P,b.current=T;return}}w.current={x:0,y:0},b.current={x:0,y:0},y()},[t,C,r,y,a,i,JSON.stringify(S),JSON.stringify(p),g,c,m,u,JSON.stringify(f)])}const O$={x:{[ot.Backward]:!1,[ot.Forward]:!1},y:{[ot.Backward]:!1,[ot.Forward]:!1}};function _$(e){let{delta:t,disabled:n}=e;const r=Pl(t);return ya(o=>{if(n||!r||!o)return O$;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ot.Backward]:o.x[ot.Backward]||a.x===-1,[ot.Forward]:o.x[ot.Forward]||a.x===1},y:{[ot.Backward]:o.y[ot.Backward]||a.y===-1,[ot.Forward]:o.y[ot.Forward]||a.y===1}}},[n,t,r])}function E$(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return ya(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function R$(e,t){return v.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var la;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(la||(la={}));var Al;(function(e){e.Optimized="optimized"})(Al||(Al={}));const Jf=new Map;function N$(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=v.useState(null),{frequency:s,measure:l,strategy:c}=o,u=v.useRef(e),d=w(),f=ia(d),p=v.useCallback(function(b){b===void 0&&(b=[]),!f.current&&i(S=>S===null?b:S.concat(b.filter(E=>!S.includes(E))))},[f]),g=v.useRef(null),y=ya(b=>{if(d&&!n)return Jf;if(!b||b===Jf||u.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const C=E.node.current,m=C?new ou(l(C),C):null;E.rect.current=m,m&&S.set(E.id,m)}return S}return b},[e,a,n,d,l]);return v.useEffect(()=>{u.current=e},[e]),v.useEffect(()=>{d||p()},[n,d]),v.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),v.useEffect(()=>{d||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},s))},[s,d,p,...r]),{droppableRects:y,measureDroppableContainers:p,measuringScheduled:a!=null};function w(){switch(c){case la.Always:return!1;case la.BeforeDragging:return n;default:return!n}}}function hm(e,t){return ya(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function T$(e,t){return hm(e,t)}function P$(e){let{callback:t,disabled:n}=e;const r=nu(t),o=v.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return v.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Ki(e){let{callback:t,disabled:n}=e;const r=nu(t),o=v.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return v.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function k$(e){return new ou(mo(e),e)}function Qf(e,t,n){t===void 0&&(t=k$);const[r,o]=v.useReducer(s,null),a=P$({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),i=Ki({callback:o});return Jt(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function j$(e){const t=hm(e);return im(e,t)}const Zf=[];function M$(e){const t=v.useRef(e),n=ya(r=>e?r&&r!==Zf&&e&&t.current&&e.parentNode===t.current.parentNode?r:Gi(e):Zf,[e]);return v.useEffect(()=>{t.current=e},[e]),n}function A$(e){const[t,n]=v.useState(null),r=v.useRef(e),o=v.useCallback(a=>{const i=Cs(a.target);i&&n(s=>s?(s.set(i,jl(i)),new Map(s)):null)},[]);return v.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Cs(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,jl(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Cs(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),v.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>Ir(a,i),Qt):fm(e):Qt,[e,t])}function ep(e,t){t===void 0&&(t=[]);const n=v.useRef(null);return v.useEffect(()=>{n.current=null},t),v.useEffect(()=>{const r=e!==Qt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?sa(e,n.current):Qt}function D$(e){v.useEffect(()=>{if(!Wi)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function $$(e,t){return v.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function gm(e){return v.useMemo(()=>e?i$(e):null,[e])}const Es=[];function I$(e,t){t===void 0&&(t=mo);const[n]=e,r=gm(n?xt(n):null),[o,a]=v.useReducer(s,Es),i=Ki({callback:a});return e.length>0&&o===Es&&a(),Jt(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>um(l)?r:new ou(t(l),l)):Es}}function L$(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ma(t)?t:e}function B$(e){let{measure:t}=e;const[n,r]=v.useState(null),o=v.useCallback(c=>{for(const{target:u}of c)if(ma(u)){r(d=>{const f=t(u);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),a=Ki({callback:o}),i=v.useCallback(c=>{const u=L$(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=bi(i);return v.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const z$=[{sensor:su,options:{}},{sensor:au,options:{}}],F$={current:{}},ei={draggable:{measure:Kf},droppable:{measure:Kf,strategy:la.WhileDragging,frequency:Al.Optimized},dragOverlay:{measure:mo}};class Go extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const V$={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Go,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ei,measureDroppableContainers:wi,windowRect:null,measuringScheduled:!1},H$={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:wi,draggableNodes:new Map,over:null,measureDroppableContainers:wi},qi=v.createContext(H$),vm=v.createContext(V$);function U$(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Go}}}function W$(e,t){switch(t.type){case Ze.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ze.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Ze.DragEnd:case Ze.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ze.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Go(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ze.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new Go(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ze.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Go(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function G$(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=v.useContext(qi),a=Pl(r),i=Pl(n==null?void 0:n.id);return v.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!ru(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=$D(u);if(d){d.focus();break}}})}},[r,t,o,i,a]),null}function K$(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function q$(e){return v.useMemo(()=>({draggable:{...ei.draggable,...e==null?void 0:e.draggable},droppable:{...ei.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ei.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Y$(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=v.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;Jt(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=im(u,r);if(i||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=sm(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,i,s,r,n])}const mm=v.createContext({...Qt,scaleX:1,scaleY:1});var An;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(An||(An={}));const tp=v.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=z$,collisionDetection:d=ZD,measuring:f,modifiers:p,...g}=t;const y=v.useReducer(W$,void 0,U$),[w,b]=y,[S,E]=HD(),[C,m]=v.useState(An.Uninitialized),_=C===An.Initialized,{draggable:{active:O,nodes:N,translate:T},droppable:{containers:P}}=w,M=O?N.get(O):null,D=v.useRef({initial:null,translated:null}),I=v.useMemo(()=>{var ve;return O!=null?{id:O,data:(ve=M==null?void 0:M.data)!=null?ve:F$,rect:D}:null},[O,M]),A=v.useRef(null),[j,L]=v.useState(null),[H,ie]=v.useState(null),ne=ia(g,Object.values(g)),he=ba("DndDescribedBy",i),$=v.useMemo(()=>P.getEnabled(),[P]),z=q$(f),{droppableRects:J,measureDroppableContainers:re,measuringScheduled:de}=N$($,{dragging:_,dependencies:[T.x,T.y],config:z.droppable}),fe=E$(N,O),He=v.useMemo(()=>H?kl(H):null,[H]),_e=qn(),$e=T$(fe,z.draggable.measure);Y$({activeNode:O?N.get(O):null,config:_e.layoutShiftCompensation,initialRect:$e,measure:z.draggable.measure});const oe=Qf(fe,z.draggable.measure,$e),Ie=Qf(fe?fe.parentElement:null),V=v.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:J,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),qe=P.getNodeFor((n=V.current.over)==null?void 0:n.id),Be=B$({measure:z.dragOverlay.measure}),Ce=(r=Be.nodeRef.current)!=null?r:fe,nt=_?(o=Be.rect)!=null?o:oe:null,kt=!!(Be.nodeRef.current&&Be.rect),jt=j$(kt?null:oe),xe=gm(Ce?xt(Ce):null),we=M$(_?qe??fe:null),Pe=I$(we),ze=K$(p,{transform:{x:T.x-jt.x,y:T.y-jt.y,scaleX:1,scaleY:1},activatorEvent:H,active:I,activeNodeRect:oe,containerNodeRect:Ie,draggingNodeRect:nt,over:V.current.over,overlayNodeRect:Be.rect,scrollableAncestors:we,scrollableAncestorRects:Pe,windowRect:xe}),Mt=He?Ir(He,T):null,mr=A$(we),Gn=ep(mr),Kn=ep(mr,[oe]),rt=Ir(ze,Gn),Zt=nt?n$(nt,ze):null,zt=I&&Zt?d({active:I,collisionRect:Zt,droppableRects:J,droppableContainers:$,pointerCoordinates:Mt}):null,kn=am(zt,"id"),[ct,yr]=v.useState(null),wo=kt?ze:Ir(ze,Kn),So=e$(wo,(a=ct==null?void 0:ct.rect)!=null?a:null,oe),br=v.useCallback((ve,Ue)=>{let{sensor:We,options:vt}=Ue;if(A.current==null)return;const ut=N.get(A.current);if(!ut)return;const it=ve.nativeEvent,mt=new We({active:A.current,activeNode:ut,event:it,options:vt,context:V,onStart(st){const gn=A.current;if(gn==null)return;const vn=N.get(gn);if(!vn)return;const{onDragStart:en}=ne.current,jn={active:{id:gn,data:vn.data,rect:D}};rn.unstable_batchedUpdates(()=>{en==null||en(jn),m(An.Initializing),b({type:Ze.DragStart,initialCoordinates:st,active:gn}),S({type:"onDragStart",event:jn})})},onMove(st){b({type:Ze.DragMove,coordinates:st})},onEnd:At(Ze.DragEnd),onCancel:At(Ze.DragCancel)});rn.unstable_batchedUpdates(()=>{L(mt),ie(ve.nativeEvent)});function At(st){return async function(){const{active:vn,collisions:en,over:jn,scrollAdjustedTranslate:Sr}=V.current;let mn=null;if(vn&&Sr){const{cancelDrop:yn}=ne.current;mn={activatorEvent:it,active:vn,collisions:en,delta:Sr,over:jn},st===Ze.DragEnd&&typeof yn=="function"&&await Promise.resolve(yn(mn))&&(st=Ze.DragCancel)}A.current=null,rn.unstable_batchedUpdates(()=>{b({type:st}),m(An.Uninitialized),yr(null),L(null),ie(null);const yn=st===Ze.DragEnd?"onDragEnd":"onDragCancel";if(mn){const h=ne.current[yn];h==null||h(mn),S({type:yn,event:mn})}})}}},[N]),xo=v.useCallback((ve,Ue)=>(We,vt)=>{const ut=We.nativeEvent,it=N.get(vt);if(A.current!==null||!it||ut.dndKit||ut.defaultPrevented)return;const mt={active:it};ve(We,Ue.options,mt)===!0&&(ut.dndKit={capturedBy:Ue.sensor},A.current=vt,br(We,Ue))},[N,br]),wr=R$(u,xo);D$(u),Jt(()=>{oe&&C===An.Initializing&&m(An.Initialized)},[oe,C]),v.useEffect(()=>{const{onDragMove:ve}=ne.current,{active:Ue,activatorEvent:We,collisions:vt,over:ut}=V.current;if(!Ue||!We)return;const it={active:Ue,activatorEvent:We,collisions:vt,delta:{x:rt.x,y:rt.y},over:ut};rn.unstable_batchedUpdates(()=>{ve==null||ve(it),S({type:"onDragMove",event:it})})},[rt.x,rt.y]),v.useEffect(()=>{const{active:ve,activatorEvent:Ue,collisions:We,droppableContainers:vt,scrollAdjustedTranslate:ut}=V.current;if(!ve||A.current==null||!Ue||!ut)return;const{onDragOver:it}=ne.current,mt=vt.get(kn),At=mt&&mt.rect.current?{id:mt.id,rect:mt.rect.current,data:mt.data,disabled:mt.disabled}:null,st={active:ve,activatorEvent:Ue,collisions:We,delta:{x:ut.x,y:ut.y},over:At};rn.unstable_batchedUpdates(()=>{yr(At),it==null||it(st),S({type:"onDragOver",event:st})})},[kn]),Jt(()=>{V.current={activatorEvent:H,active:I,activeNode:fe,collisionRect:Zt,collisions:zt,droppableRects:J,draggableNodes:N,draggingNode:Ce,draggingNodeRect:nt,droppableContainers:P,over:ct,scrollableAncestors:we,scrollAdjustedTranslate:rt},D.current={initial:nt,translated:Zt}},[I,fe,zt,Zt,N,Ce,nt,J,P,ct,we,rt]),C$({..._e,delta:T,draggingRect:Zt,pointerCoordinates:Mt,scrollableAncestors:we,scrollableAncestorRects:Pe});const Co=v.useMemo(()=>({active:I,activeNode:fe,activeNodeRect:oe,activatorEvent:H,collisions:zt,containerNodeRect:Ie,dragOverlay:Be,draggableNodes:N,droppableContainers:P,droppableRects:J,over:ct,measureDroppableContainers:re,scrollableAncestors:we,scrollableAncestorRects:Pe,measuringConfiguration:z,measuringScheduled:de,windowRect:xe}),[I,fe,oe,H,zt,Ie,Be,N,P,J,ct,re,we,Pe,z,de,xe]),hn=v.useMemo(()=>({activatorEvent:H,activators:wr,active:I,activeNodeRect:oe,ariaDescribedById:{draggable:he},dispatch:b,draggableNodes:N,over:ct,measureDroppableContainers:re}),[H,wr,I,oe,b,he,N,ct,re]);return se(om.Provider,{value:E,children:[se(qi.Provider,{value:hn,children:[x(vm.Provider,{value:Co,children:x(mm.Provider,{value:So,children:c})}),x(G$,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),x(GD,{...s,hiddenTextDescribedById:he})]});function qn(){const ve=(j==null?void 0:j.autoScrollEnabled)===!1,Ue=typeof l=="object"?l.enabled===!1:l===!1,We=_&&!ve&&!Ue;return typeof l=="object"?{...l,enabled:We}:{enabled:We}}}),X$=v.createContext(null),np="button",J$="Droppable";function ym(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=ba(J$),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=v.useContext(qi),{role:p=np,roleDescription:g="draggable",tabIndex:y=0}=o??{},w=(l==null?void 0:l.id)===t,b=v.useContext(w?mm:X$),[S,E]=bi(),[C,m]=bi(),_=$$(i,t),O=ia(n);Jt(()=>(d.set(t,{id:t,key:a,node:S,activatorNode:C,data:O}),()=>{const T=d.get(t);T&&T.key===a&&d.delete(t)}),[d,t]);const N=v.useMemo(()=>({role:p,tabIndex:y,"aria-disabled":r,"aria-pressed":w&&p===np?!0:void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,p,y,w,g,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:N,isDragging:w,listeners:r?void 0:_,node:S,over:f,setNodeRef:E,setActivatorNodeRef:m,transform:b}}function Q$(){return v.useContext(vm)}const Z$="Droppable",e8={timeout:25};function t8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=ba(Z$),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=v.useContext(qi),u=v.useRef({disabled:n}),d=v.useRef(!1),f=v.useRef(null),p=v.useRef(null),{disabled:g,updateMeasurementsFor:y,timeout:w}={...e8,...o},b=ia(y??r),S=v.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},w)},[w]),E=Ki({callback:S,disabled:g||!i}),C=v.useCallback((N,T)=>{E&&(T&&(E.unobserve(T),d.current=!1),N&&E.observe(N))},[E]),[m,_]=bi(C),O=ia(t);return v.useEffect(()=>{!E||!m.current||(E.disconnect(),d.current=!1,E.observe(m.current))},[m,E]),Jt(()=>(s({type:Ze.RegisterDroppable,element:{id:r,key:a,disabled:n,node:m,rect:f,data:O}}),()=>s({type:Ze.UnregisterDroppable,key:a,id:r})),[r]),v.useEffect(()=>{n!==u.current.disabled&&(s({type:Ze.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:m,over:l,setNodeRef:_}}function lu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function n8(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function La(e){return e!==null&&e>=0}function r8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function o8(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const bm=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=lu(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},wm="Sortable",Sm=v.createContext({activeIndex:-1,containerId:wm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:bm,disabled:{draggable:!1,droppable:!1}});function a8(e){let{children:t,id:n,items:r,strategy:o=bm,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=Q$(),d=ba(wm,n),f=s.rect!==null,p=v.useMemo(()=>r.map(_=>typeof _=="object"&&"id"in _?_.id:_),[r]),g=i!=null,y=i?p.indexOf(i.id):-1,w=c?p.indexOf(c.id):-1,b=v.useRef(p),S=!r8(p,b.current),E=w!==-1&&y===-1||S,C=o8(a);Jt(()=>{S&&g&&u(p)},[S,p,g,u]),v.useEffect(()=>{b.current=p},[p]);const m=v.useMemo(()=>({activeIndex:y,containerId:d,disabled:C,disableTransforms:E,items:p,overIndex:w,useDragOverlay:f,sortedRects:n8(p,l),strategy:o}),[y,d,C.draggable,C.droppable,E,p,w,l,f,o]);return x(Sm.Provider,{value:m,children:t})}const i8=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return lu(n,r,o).indexOf(t)},s8=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},l8={duration:200,easing:"ease"},xm="transform",c8=Jr.Transition.toString({property:xm,duration:0,easing:"linear"}),u8={roleDescription:"sortable"};function d8(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=v.useState(null),s=v.useRef(n);return Jt(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=mo(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),v.useEffect(()=>{a&&i(null)},[a]),a}function f8(e){let{animateLayoutChanges:t=s8,attributes:n,disabled:r,data:o,getNewIndex:a=i8,id:i,strategy:s,resizeObserverConfig:l,transition:c=l8}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:g,sortedRects:y,overIndex:w,useDragOverlay:b,strategy:S}=v.useContext(Sm),E=p8(r,p),C=u.indexOf(i),m=v.useMemo(()=>({sortable:{containerId:d,index:C,items:u},...o}),[d,o,C,u]),_=v.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:O,node:N,isOver:T,setNodeRef:P}=t8({id:i,data:m,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...l}}),{active:M,activatorEvent:D,activeNodeRect:I,attributes:A,setNodeRef:j,listeners:L,isDragging:H,over:ie,setActivatorNodeRef:ne,transform:he}=ym({id:i,data:m,attributes:{...u8,...n},disabled:E.draggable}),$=kD(P,j),z=!!M,J=z&&!g&&La(f)&&La(w),re=!b&&H,de=re&&J?he:null,He=J?de??(s??S)({rects:y,activeNodeRect:I,activeIndex:f,overIndex:w,index:C}):null,_e=La(f)&&La(w)?a({id:i,items:u,activeIndex:f,overIndex:w}):C,$e=M==null?void 0:M.id,oe=v.useRef({activeId:$e,items:u,newIndex:_e,containerId:d}),Ie=u!==oe.current.items,V=t({active:M,containerId:d,isDragging:H,isSorting:z,id:i,index:C,items:u,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:c,wasDragging:oe.current.activeId!=null}),qe=d8({disabled:!V,index:C,node:N,rect:O});return v.useEffect(()=>{z&&oe.current.newIndex!==_e&&(oe.current.newIndex=_e),d!==oe.current.containerId&&(oe.current.containerId=d),u!==oe.current.items&&(oe.current.items=u)},[z,_e,d,u]),v.useEffect(()=>{if($e===oe.current.activeId)return;if($e&&!oe.current.activeId){oe.current.activeId=$e;return}const Ce=setTimeout(()=>{oe.current.activeId=$e},50);return()=>clearTimeout(Ce)},[$e]),{active:M,activeIndex:f,attributes:A,data:m,rect:O,index:C,newIndex:_e,items:u,isOver:T,isSorting:z,isDragging:H,listeners:L,node:N,overIndex:w,over:ie,setNodeRef:$,setActivatorNodeRef:ne,setDroppableNodeRef:P,setDraggableNodeRef:j,transform:qe??He,transition:Be()};function Be(){if(qe||Ie&&oe.current.newIndex===C)return c8;if(!(re&&!ru(D)||!c)&&(z||V))return Jr.Transition.toString({...c,property:xm})}}function p8(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function xi(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const h8=[ge.Down,ge.Right,ge.Up,ge.Left],g8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(h8.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=o.get(d.id);if(f)switch(e.code){case ge.Down:r.top<f.top&&l.push(d);break;case ge.Up:r.top>f.top&&l.push(d);break;case ge.Left:r.left>f.left&&l.push(d);break;case ge.Right:r.left<f.left&&l.push(d);break}});const c=JD({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=am(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=a.get(n.id),f=a.get(u),p=f?o.get(f.id):null,g=f==null?void 0:f.node.current;if(g&&p&&d&&f){const w=Gi(g).some((_,O)=>s[O]!==_),b=Cm(d,f),S=v8(d,f),E=w||!b?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},C={x:p.left,y:p.top};return E.x&&E.y?C:sa(C,E)}}}};function Cm(e,t){return!xi(e)||!xi(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function v8(e,t){return!xi(e)||!xi(t)||!Cm(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const m8=e=>{let{transform:t}=e;return{...t,x:0}},y8="_dragItem_xzliq_2",b8="_sortModalBox_xzliq_13",w8="_addOneBtn_xzliq_19",cu={dragItem:y8,sortModalBox:b8,addOneBtn:w8},S8=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=v.useState([]);v.useEffect(()=>{const f=e.map((p,g)=>({val:p,oldIndex:g,id:Oe.getRandomStr()}));s(f)},[a.open]);const l=KD(Wf(su,{activationConstraint:{distance:15}}),Wf(au,{coordinateGetter:g8}));function c(f){const{active:p,over:g}=f;if(p.id!==(g==null?void 0:g.id)){const y=i.findIndex(E=>E.id===(p==null?void 0:p.id)),w=i.findIndex(E=>E.id===(g==null?void 0:g.id)),b=lu(i,y,w),S=b.map(E=>E.val);s(b),t==null||t(S)}}const[u,d]=v.useState({x:0,y:0,scaleX:1,scaleY:1});return x(Z.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:f=>x(tp,{sensors:l,onDragEnd:({delta:p})=>{const g={...u,...p,x:u.x+((p==null?void 0:p.x)||0),y:u.y+((p==null?void 0:p.y)||0)};d(g)},children:x(x8,{modal:f,transform:u})}),children:x("div",{className:cu.sortModalBox,children:x(tp,{sensors:l,onDragEnd:c,modifiers:[m8],children:x(a8,{items:i,children:i.map(({id:f,val:p},g)=>x(C8,{id:f,index:g,label:p[o||""]},f))})})})})},x8=({modal:e,transform:t})=>{const n=v.useRef(Oe.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=ym({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return x("div",{ref:r,style:{pointerEvents:"auto",transform:Jr.Transform.toString(s)},...o,...a,children:e})},C8=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=f8({id:e.id}),i={transform:Jr.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return x("div",{className:cu.dragItem,ref:r,style:i,...t,...n,children:s})};function O8(e){return Array.isArray(e)?e:[]}const Om=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=v.useMemo(()=>O8(i.value??a),[i.value]),[u,d]=v.useState(!1),f=Zc(n||[{component:"StringSetter"}]);return v.useEffect(()=>{var p;t.setCollapseHeaderExt&&((p=t.setCollapseHeaderExt)==null||p.call(t,x(Z.Button,{type:"text",size:"small",style:{color:"gray"},onClick:g=>{g.preventDefault(),g.stopPropagation(),d(!0)},children:"sort"})))},[]),se(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((p,g)=>x(PD,{style:{paddingBottom:"10px"},index:g,keyPaths:s,value:p,onValueChange:y=>{c[g]=y[g],e==null||e([...c])},setters:f,onDelete:()=>{const y=[...c];y.splice(g),e==null||e(y)}},g)),x(Z.Button,{className:cu.addOneBtn,size:"small",onClick:()=>{const p=[...c];e==null||e([...p,r??""])},children:"Add One"}),x(S8,{label:l,sortLabelKey:o,onValueChange:p=>{e==null||e([...p])},open:u,list:c,keyPaths:s,onCancel:()=>{d(!1)},onOk:()=>{d(!1)}})]})};Om.setterName="数组设置器";const _m=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=v.useRef(null);return v.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Xc,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Zc(s.setters),u=Oe.getMTitle(s.title),d=Oe.getMTitleTip(s.title);return x("div",{children:x(du,{name:s.name,label:u,tips:d,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};_m.setterName="对象设置器";const Em=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:Oe.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};Em.setterName="表达式设置器";const Rm=({onValueChange:e,initialValue:t,setterContext:n,...r})=>x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Rm.setterName="Bool 设置器";const Nm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Nm.setterName="选择设置器";function _8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function op(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rp(Object(n),!0).forEach(function(r){_8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E8(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function R8(e,t){if(e==null)return{};var n=E8(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N8(e,t){return T8(e)||P8(e,t)||k8(e,t)||j8()}function T8(e){if(Array.isArray(e))return e}function P8(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function k8(e,t){if(e){if(typeof e=="string")return ap(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ap(e,t)}}function ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
147
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(n),!0).forEach(function(r){M8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function A8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function $o(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function Ci(e){return{}.toString.call(e).includes("Object")}function D8(e){return!Object.keys(e).length}function ca(e){return typeof e=="function"}function $8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function I8(e,t){return Ci(t)||In("changeType"),Object.keys(t).some(function(n){return!$8(e,n)})&&In("changeField"),t}function L8(e){ca(e)||In("selectorType")}function B8(e){ca(e)||Ci(e)||In("handlerType"),Ci(e)&&Object.values(e).some(function(t){return!ca(t)})&&In("handlersType")}function z8(e){e||In("initialIsRequired"),Ci(e)||In("initialType"),D8(e)&&In("initialContent")}function F8(e,t){throw new Error(e[t]||e.default)}var V8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},In=$o(F8)(V8),Ba={changes:I8,selector:L8,handler:B8,initial:z8};function H8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ba.initial(e),Ba.handler(t);var n={current:e},r=$o(G8)(n,t),o=$o(W8)(n),a=$o(Ba.changes)(e),i=$o(U8)(n);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return Ba.selector(c),c(n.current)}function l(c){A8(r,o,a,i)(c)}return[s,l]}function U8(e,t){return ca(t)?t(e.current):t}function W8(e,t){return e.current=sp(sp({},e.current),t),t}function G8(e,t,n){return ca(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var K8={create:H8},q8={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function Y8(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function X8(e){return{}.toString.call(e).includes("Object")}function J8(e){return e||lp("configIsRequired"),X8(e)||lp("configType"),e.urls?(Q8(),{paths:{vs:e.urls.monacoBase}}):e}function Q8(){console.warn(Tm.deprecation)}function Z8(e,t){throw new Error(e[t]||e.default)}var Tm={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
128
+ `},YD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function XD(e){let{announcements:t=YD,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=qD}=e;const{announce:a,announcement:i}=WD(),s=aa("DndLiveRegion"),[l,c]=g.useState(!1);if(g.useEffect(()=>{c(!0)},[]),GD(g.useMemo(()=>({onDragStart(d){let{active:f}=d;a(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:p}=d;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(d){let{active:f,over:p}=d;a(t.onDragOver({active:f,over:p}))},onDragEnd(d){let{active:f,over:p}=d;a(t.onDragEnd({active:f,over:p}))},onDragCancel(d){let{active:f,over:p}=d;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;const u=ee(Ye,{children:[w(FD,{id:r,value:o.draggable}),w(UD,{id:s,announcement:i})]});return n?Lt.createPortal(u,n):u}var Ke;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ke||(Ke={}));function pi(){}function Vf(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function JD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Gt=Object.freeze({x:0,y:0});function QD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ZD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function e$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ff(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function om(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const t$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ff(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Ff(l),u=o.reduce((f,p,h)=>f+QD(c[h],p),0),d=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:d}})}}return a.sort(ZD)};function n$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const r$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=n$(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(e$)};function o$(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function am(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Gt}function a$(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const i$=a$(1);function s$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function l$(e,t,n){const r=s$(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const c$={ignoreTransform:!1};function io(e,t){t===void 0&&(t=c$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=gt(e),{transform:u,transformOrigin:d}=c(e);u&&(n=l$(n,u,d))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Hf(e){return io(e,{ignoreTransform:!0})}function u$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function d$(e,t){return t===void 0&&(t=gt(e).getComputedStyle(e)),t.position==="fixed"}function f$(e,t){t===void 0&&(t=gt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function zi(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Qc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ra(o)||$D(o)||n.includes(o))return n;const{getComputedStyle:a}=gt(o),i=a(o);return o!==e&&f$(o,i)&&n.push(o),d$(o,i)?n:r(o.parentNode)}return e?r(e):n}function im(e){const[t]=zi(e,1);return t??null}function Ss(e){return!Bi||!e?null:oo(e)?e:Jc(e)?Qc(e)||e===ao(e).scrollingElement?window:ra(e)?e:null:null}function sm(e){return oo(e)?e.scrollX:e.scrollLeft}function lm(e){return oo(e)?e.scrollY:e.scrollTop}function Tl(e){return{x:sm(e),y:lm(e)}}var Je;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Je||(Je={}));function cm(e){return!Bi||!e?!1:e===document.scrollingElement}function um(e){const t={x:0,y:0},n=cm(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const p$={x:.2,y:.2};function h$(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=p$);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=um(e),p={x:0,y:0},h={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+m.height?(p.y=Je.Backward,h.y=r*Math.abs((t.top+m.height-a)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Je.Forward,h.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(p.x=Je.Forward,h.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&i<=t.left+m.width&&(p.x=Je.Backward,h.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:h}}function g$(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function dm(e){return e.reduce((t,n)=>_r(t,Tl(n)),Gt)}function v$(e){return e.reduce((t,n)=>t+sm(n),0)}function m$(e){return e.reduce((t,n)=>t+lm(n),0)}function y$(e,t){if(t===void 0&&(t=io),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);im(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const b$=[["x",["left","right"],v$],["y",["top","bottom"],m$]];class tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zi(n),o=dm(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of b$)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Po{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function w$(e){const{EventTarget:t}=gt(e);return e instanceof t?e:ao(e)}function xs(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Nt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Nt||(Nt={}));function Uf(e){e.preventDefault()}function S$(e){e.stopPropagation()}var ce;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(ce||(ce={}));const fm={start:[ce.Space,ce.Enter],cancel:[ce.Esc],end:[ce.Space,ce.Enter]},x$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ce.Right:return{...n,x:n.x+25};case ce.Left:return{...n,x:n.x-25};case ce.Down:return{...n,y:n.y+25};case ce.Up:return{...n,y:n.y-25}}};class nu{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Po(ao(n)),this.windowListeners=new Po(gt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&y$(r),n(Gt)}handleKeyDown(t){if(eu(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=fm,coordinateGetter:i=x$,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Gt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const f=Ko(d,u),p={x:0,y:0},{scrollableAncestors:h}=r.current;for(const m of h){const b=t.code,{isTop:y,isRight:S,isLeft:E,isBottom:x,maxScroll:v,minScroll:O}=um(m),C=g$(m),R={x:Math.min(b===ce.Right?C.right-C.width/2:C.right,Math.max(b===ce.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(b===ce.Down?C.bottom-C.height/2:C.bottom,Math.max(b===ce.Down?C.top:C.top+C.height/2,d.y))},N=b===ce.Right&&!S||b===ce.Left&&!E,T=b===ce.Down&&!x||b===ce.Up&&!y;if(N&&R.x!==d.x){const k=m.scrollLeft+f.x,j=b===ce.Right&&k<=v.x||b===ce.Left&&k>=O.x;if(j&&!f.y){m.scrollTo({left:k,behavior:s});return}j?p.x=m.scrollLeft-k:p.x=b===ce.Right?m.scrollLeft-v.x:m.scrollLeft-O.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(T&&R.y!==d.y){const k=m.scrollTop+f.y,j=b===ce.Down&&k<=v.y||b===ce.Up&&k>=O.y;if(j&&!f.x){m.scrollTo({top:k,behavior:s});return}j?p.y=m.scrollTop-k:p.y=b===ce.Down?m.scrollTop-v.y:m.scrollTop-O.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,_r(Ko(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}nu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fm,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Wf(e){return!!(e&&"distance"in e)}function Gf(e){return!!(e&&"delay"in e)}class ru{constructor(t,n,r){var o;r===void 0&&(r=w$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=ao(i),this.documentListeners=new Po(this.document),this.listeners=new Po(r),this.windowListeners=new Po(gt(i)),this.initialCoordinates=(o=Nl(a))!=null?o:Gt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.DragStart,Uf),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),this.windowListeners.add(Nt.ContextMenu,Uf),this.documentListeners.add(Nt.Keydown,this.handleKeydown),n){if(Wf(n))return;if(Gf(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Nt.Click,S$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Nt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=Nl(t))!=null?n:Gt,c=Ko(o,l);if(!r&&s){if(Gf(s))return xs(c,s.tolerance)?this.handleCancel():void 0;if(Wf(s))return s.tolerance!=null&&xs(c,s.tolerance)?this.handleCancel():xs(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===ce.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const C$={move:{name:"pointermove"},end:{name:"pointerup"}};class ou extends ru{constructor(t){const{event:n}=t,r=ao(n.target);super(t,C$,r)}}ou.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const O$={move:{name:"mousemove"},end:{name:"mouseup"}};var Pl;(function(e){e[e.RightClick=2]="RightClick"})(Pl||(Pl={}));class E$ extends ru{constructor(t){super(t,O$,ao(t.event.target))}}E$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Pl.RightClick?!1:(r==null||r({event:n}),!0)}}];const Cs={move:{name:"touchmove"},end:{name:"touchend"}};class _$ extends ru{constructor(t){super(t,Cs)}static setup(){return window.addEventListener(Cs.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Cs.move.name,t)};function t(){}}}_$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ko;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ko||(ko={}));var hi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hi||(hi={}));function R$(e){let{acceleration:t,activator:n=ko.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=hi.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=T$({delta:d,disabled:!a}),[h,m]=ID(),b=g.useRef({x:0,y:0}),y=g.useRef({x:0,y:0}),S=g.useMemo(()=>{switch(n){case ko.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ko.DraggableRect:return o}},[n,o,l]),E=g.useRef(null),x=g.useCallback(()=>{const O=E.current;if(!O)return;const C=b.current.x*y.current.x,R=b.current.y*y.current.y;O.scrollBy(C,R)},[]),v=g.useMemo(()=>s===hi.TreeOrder?[...c].reverse():c,[s,c]);g.useEffect(()=>{if(!a||!c.length||!S){m();return}for(const O of v){if((r==null?void 0:r(O))===!1)continue;const C=c.indexOf(O),R=u[C];if(!R)continue;const{direction:N,speed:T}=h$(O,R,S,t,f);for(const k of["x","y"])p[k][N[k]]||(T[k]=0,N[k]=0);if(T.x>0||T.y>0){m(),E.current=O,h(x,i),b.current=T,y.current=N;return}}b.current={x:0,y:0},y.current={x:0,y:0},m()},[t,x,r,m,a,i,JSON.stringify(S),JSON.stringify(p),h,c,v,u,JSON.stringify(f)])}const N$={x:{[Je.Backward]:!1,[Je.Forward]:!1},y:{[Je.Backward]:!1,[Je.Forward]:!1}};function T$(e){let{delta:t,disabled:n}=e;const r=Rl(t);return oa(o=>{if(n||!r||!o)return N$;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Je.Backward]:o.x[Je.Backward]||a.x===-1,[Je.Forward]:o.x[Je.Forward]||a.x===1},y:{[Je.Backward]:o.y[Je.Backward]||a.y===-1,[Je.Forward]:o.y[Je.Forward]||a.y===1}}},[n,t,r])}function P$(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return oa(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function k$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var qo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qo||(qo={}));var kl;(function(e){e.Optimized="optimized"})(kl||(kl={}));const Kf=new Map;function j$(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=g.useState(null),{frequency:s,measure:l,strategy:c}=o,u=g.useRef(e),d=b(),f=Go(d),p=g.useCallback(function(y){y===void 0&&(y=[]),!f.current&&i(S=>S===null?y:S.concat(y.filter(E=>!S.includes(E))))},[f]),h=g.useRef(null),m=oa(y=>{if(d&&!n)return Kf;if(!y||y===Kf||u.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const x=E.node.current,v=x?new tu(l(x),x):null;E.rect.current=v,v&&S.set(E.id,v)}return S}return y},[e,a,n,d,l]);return g.useEffect(()=>{u.current=e},[e]),g.useEffect(()=>{d||p()},[n,d]),g.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),g.useEffect(()=>{d||typeof s!="number"||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(c){case qo.Always:return!1;case qo.BeforeDragging:return n;default:return!n}}}function pm(e,t){return oa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function M$(e,t){return pm(e,t)}function A$(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Vi(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function D$(e){return new tu(io(e),e)}function qf(e,t,n){t===void 0&&(t=D$);const[r,o]=g.useReducer(s,null),a=A$({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),i=Vi({callback:o});return Wt(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function $$(e){const t=pm(e);return am(e,t)}const Yf=[];function I$(e){const t=g.useRef(e),n=oa(r=>e?r&&r!==Yf&&e&&t.current&&e.parentNode===t.current.parentNode?r:zi(e):Yf,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function L$(e){const[t,n]=g.useState(null),r=g.useRef(e),o=g.useCallback(a=>{const i=Ss(a.target);i&&n(s=>s?(s.set(i,Tl(i)),new Map(s)):null)},[]);return g.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Ss(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,Tl(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Ss(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>_r(a,i),Gt):dm(e):Gt,[e,t])}function Xf(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const r=e!==Gt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ko(e,n.current):Gt}function B$(e){g.useEffect(()=>{if(!Bi)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function z$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function hm(e){return g.useMemo(()=>e?u$(e):null,[e])}const Os=[];function V$(e,t){t===void 0&&(t=io);const[n]=e,r=hm(n?gt(n):null),[o,a]=g.useReducer(s,Os),i=Vi({callback:a});return e.length>0&&o===Os&&a(),Wt(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>cm(l)?r:new tu(t(l),l)):Os}}function F$(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ra(t)?t:e}function H$(e){let{measure:t}=e;const[n,r]=g.useState(null),o=g.useCallback(c=>{for(const{target:u}of c)if(ra(u)){r(d=>{const f=t(u);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),a=Vi({callback:o}),i=g.useCallback(c=>{const u=F$(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=fi(i);return g.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const U$=[{sensor:ou,options:{}},{sensor:nu,options:{}}],W$={current:{}},Ka={draggable:{measure:Hf},droppable:{measure:Hf,strategy:qo.WhileDragging,frequency:kl.Optimized},dragOverlay:{measure:io}};class jo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const G$={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ka,measureDroppableContainers:pi,windowRect:null,measuringScheduled:!1},K$={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pi,draggableNodes:new Map,over:null,measureDroppableContainers:pi},Fi=g.createContext(K$),gm=g.createContext(G$);function q$(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jo}}}function Y$(e,t){switch(t.type){case Ke.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ke.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Ke.DragEnd:case Ke.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ke.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new jo(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ke.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new jo(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ke.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new jo(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function X$(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=g.useContext(Fi),a=Rl(r),i=Rl(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!eu(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=zD(u);if(d){d.focus();break}}})}},[r,t,o,i,a]),null}function J$(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function Q$(e){return g.useMemo(()=>({draggable:{...Ka.draggable,...e==null?void 0:e.draggable},droppable:{...Ka.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ka.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Z$(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=g.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;Wt(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=am(u,r);if(i||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=im(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,i,s,r,n])}const vm=g.createContext({...Gt,scaleX:1,scaleY:1});var En;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(En||(En={}));const Jf=g.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=U$,collisionDetection:d=r$,measuring:f,modifiers:p,...h}=t;const m=g.useReducer(Y$,void 0,q$),[b,y]=m,[S,E]=KD(),[x,v]=g.useState(En.Uninitialized),O=x===En.Initialized,{draggable:{active:C,nodes:R,translate:N},droppable:{containers:T}}=b,k=C?R.get(C):null,j=g.useRef({initial:null,translated:null}),L=g.useMemo(()=>{var Pe;return C!=null?{id:C,data:(Pe=k==null?void 0:k.data)!=null?Pe:W$,rect:j}:null},[C,k]),M=g.useRef(null),[P,D]=g.useState(null),[F,ne]=g.useState(null),Z=Go(h,Object.values(h)),ue=aa("DndDescribedBy",i),A=g.useMemo(()=>T.getEnabled(),[T]),I=Q$(f),{droppableRects:G,measureDroppableContainers:te,measuringScheduled:ie}=j$(A,{dragging:O,dependencies:[N.x,N.y],config:I.droppable}),de=P$(R,C),we=g.useMemo(()=>F?Nl(F):null,[F]),fe=va(),Ee=M$(de,I.draggable.measure);Z$({activeNode:C?R.get(C):null,config:fe.layoutShiftCompensation,initialRect:Ee,measure:I.draggable.measure});const re=qf(de,I.draggable.measure,Ee),De=qf(de?de.parentElement:null),z=g.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:G,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=T.getNodeFor((n=z.current.over)==null?void 0:n.id),Le=H$({measure:I.dragOverlay.measure}),$e=(r=Le.nodeRef.current)!=null?r:de,vt=O?(o=Le.rect)!=null?o:re:null,an=!!(Le.nodeRef.current&&Le.rect),sn=$$(an?null:re),Me=hm($e?gt($e):null),me=I$(O?Xe??de:null),Ae=V$(me),Ge=J$(p,{transform:{x:N.x-sn.x,y:N.y-sn.y,scaleX:1,scaleY:1},activatorEvent:F,active:L,activeNodeRect:re,containerNodeRect:De,draggingNodeRect:vt,over:z.current.over,overlayNodeRect:Le.rect,scrollableAncestors:me,scrollableAncestorRects:Ae,windowRect:Me}),Kt=we?_r(we,N):null,ua=L$(me),da=Xf(ua),fa=Xf(ua,[re]),Ot=_r(Ge,da),xn=vt?i$(vt,Ge):null,Cn=L&&xn?d({active:L,collisionRect:xn,droppableRects:G,droppableContainers:A,pointerCoordinates:Kt}):null,co=om(Cn,"id"),[Et,pa]=g.useState(null),qi=an?Ge:_r(Ge,fa),Yi=o$(qi,(a=Et==null?void 0:Et.rect)!=null?a:null,re),ha=g.useCallback((Pe,Ze)=>{let{sensor:et,options:Mt}=Ze;if(M.current==null)return;const lt=R.get(M.current);if(!lt)return;const ct=Pe.nativeEvent,_t=new et({active:M.current,activeNode:lt,event:ct,options:Mt,context:z,onStart(ut){const $n=M.current;if($n==null)return;const In=R.get($n);if(!In)return;const{onDragStart:Ln}=Z.current,cr={active:{id:$n,data:In.data,rect:j}};Lt.unstable_batchedUpdates(()=>{Ln==null||Ln(cr),v(En.Initializing),y({type:Ke.DragStart,initialCoordinates:ut,active:$n}),S({type:"onDragStart",event:cr})})},onMove(ut){y({type:Ke.DragMove,coordinates:ut})},onEnd:ln(Ke.DragEnd),onCancel:ln(Ke.DragCancel)});Lt.unstable_batchedUpdates(()=>{D(_t),ne(Pe.nativeEvent)});function ln(ut){return async function(){const{active:In,collisions:Ln,over:cr,scrollAdjustedTranslate:ma}=z.current;let Bn=null;if(In&&ma){const{cancelDrop:zn}=Z.current;Bn={activatorEvent:ct,active:In,collisions:Ln,delta:ma,over:cr},ut===Ke.DragEnd&&typeof zn=="function"&&await Promise.resolve(zn(Bn))&&(ut=Ke.DragCancel)}M.current=null,Lt.unstable_batchedUpdates(()=>{y({type:ut}),v(En.Uninitialized),pa(null),D(null),ne(null);const zn=ut===Ke.DragEnd?"onDragEnd":"onDragCancel";if(Bn){const _=Z.current[zn];_==null||_(Bn),S({type:zn,event:Bn})}})}}},[R]),Xi=g.useCallback((Pe,Ze)=>(et,Mt)=>{const lt=et.nativeEvent,ct=R.get(Mt);if(M.current!==null||!ct||lt.dndKit||lt.defaultPrevented)return;const _t={active:ct};Pe(et,Ze.options,_t)===!0&&(lt.dndKit={capturedBy:Ze.sensor},M.current=Mt,ha(et,Ze))},[R,ha]),ga=k$(u,Xi);B$(u),Wt(()=>{re&&x===En.Initializing&&v(En.Initialized)},[re,x]),g.useEffect(()=>{const{onDragMove:Pe}=Z.current,{active:Ze,activatorEvent:et,collisions:Mt,over:lt}=z.current;if(!Ze||!et)return;const ct={active:Ze,activatorEvent:et,collisions:Mt,delta:{x:Ot.x,y:Ot.y},over:lt};Lt.unstable_batchedUpdates(()=>{Pe==null||Pe(ct),S({type:"onDragMove",event:ct})})},[Ot.x,Ot.y]),g.useEffect(()=>{const{active:Pe,activatorEvent:Ze,collisions:et,droppableContainers:Mt,scrollAdjustedTranslate:lt}=z.current;if(!Pe||M.current==null||!Ze||!lt)return;const{onDragOver:ct}=Z.current,_t=Mt.get(co),ln=_t&&_t.rect.current?{id:_t.id,rect:_t.rect.current,data:_t.data,disabled:_t.disabled}:null,ut={active:Pe,activatorEvent:Ze,collisions:et,delta:{x:lt.x,y:lt.y},over:ln};Lt.unstable_batchedUpdates(()=>{pa(ln),ct==null||ct(ut),S({type:"onDragOver",event:ut})})},[co]),Wt(()=>{z.current={activatorEvent:F,active:L,activeNode:de,collisionRect:xn,collisions:Cn,droppableRects:G,draggableNodes:R,draggingNode:$e,draggingNodeRect:vt,droppableContainers:T,over:Et,scrollableAncestors:me,scrollAdjustedTranslate:Ot},j.current={initial:vt,translated:xn}},[L,de,Cn,xn,R,$e,vt,G,T,Et,me,Ot]),R$({...fe,delta:N,draggingRect:xn,pointerCoordinates:Kt,scrollableAncestors:me,scrollableAncestorRects:Ae});const Ji=g.useMemo(()=>({active:L,activeNode:de,activeNodeRect:re,activatorEvent:F,collisions:Cn,containerNodeRect:De,dragOverlay:Le,draggableNodes:R,droppableContainers:T,droppableRects:G,over:Et,measureDroppableContainers:te,scrollableAncestors:me,scrollableAncestorRects:Ae,measuringConfiguration:I,measuringScheduled:ie,windowRect:Me}),[L,de,re,F,Cn,De,Le,R,T,G,Et,te,me,Ae,I,ie,Me]),uo=g.useMemo(()=>({activatorEvent:F,activators:ga,active:L,activeNodeRect:re,ariaDescribedById:{draggable:ue},dispatch:y,draggableNodes:R,over:Et,measureDroppableContainers:te}),[F,ga,L,re,y,ue,R,Et,te]);return ee(rm.Provider,{value:E,children:[ee(Fi.Provider,{value:uo,children:[w(gm.Provider,{value:Ji,children:w(vm.Provider,{value:Yi,children:c})}),w(X$,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),w(XD,{...s,hiddenTextDescribedById:ue})]});function va(){const Pe=(P==null?void 0:P.autoScrollEnabled)===!1,Ze=typeof l=="object"?l.enabled===!1:l===!1,et=O&&!Pe&&!Ze;return typeof l=="object"?{...l,enabled:et}:{enabled:et}}}),e8=g.createContext(null),Qf="button",t8="Droppable";function mm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=aa(t8),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=g.useContext(Fi),{role:p=Qf,roleDescription:h="draggable",tabIndex:m=0}=o??{},b=(l==null?void 0:l.id)===t,y=g.useContext(b?vm:e8),[S,E]=fi(),[x,v]=fi(),O=z$(i,t),C=Go(n);Wt(()=>(d.set(t,{id:t,key:a,node:S,activatorNode:x,data:C}),()=>{const N=d.get(t);N&&N.key===a&&d.delete(t)}),[d,t]);const R=g.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&p===Qf?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,m,b,h,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:b,listeners:r?void 0:O,node:S,over:f,setNodeRef:E,setActivatorNodeRef:v,transform:y}}function n8(){return g.useContext(gm)}const r8="Droppable",o8={timeout:25};function a8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=aa(r8),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=g.useContext(Fi),u=g.useRef({disabled:n}),d=g.useRef(!1),f=g.useRef(null),p=g.useRef(null),{disabled:h,updateMeasurementsFor:m,timeout:b}={...o8,...o},y=Go(m??r),S=g.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null},b)},[b]),E=Vi({callback:S,disabled:h||!i}),x=g.useCallback((R,N)=>{E&&(N&&(E.unobserve(N),d.current=!1),R&&E.observe(R))},[E]),[v,O]=fi(x),C=Go(t);return g.useEffect(()=>{!E||!v.current||(E.disconnect(),d.current=!1,E.observe(v.current))},[v,E]),Wt(()=>(s({type:Ke.RegisterDroppable,element:{id:r,key:a,disabled:n,node:v,rect:f,data:C}}),()=>s({type:Ke.UnregisterDroppable,key:a,id:r})),[r]),g.useEffect(()=>{n!==u.current.disabled&&(s({type:Ke.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:v,over:l,setNodeRef:O}}function au(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function i8(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function ka(e){return e!==null&&e>=0}function s8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function l8(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ym=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=au(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},bm="Sortable",wm=g.createContext({activeIndex:-1,containerId:bm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ym,disabled:{draggable:!1,droppable:!1}});function c8(e){let{children:t,id:n,items:r,strategy:o=ym,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=n8(),d=aa(bm,n),f=s.rect!==null,p=g.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,m=i?p.indexOf(i.id):-1,b=c?p.indexOf(c.id):-1,y=g.useRef(p),S=!s8(p,y.current),E=b!==-1&&m===-1||S,x=l8(a);Wt(()=>{S&&h&&u(p)},[S,p,h,u]),g.useEffect(()=>{y.current=p},[p]);const v=g.useMemo(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:E,items:p,overIndex:b,useDragOverlay:f,sortedRects:i8(p,l),strategy:o}),[m,d,x.draggable,x.droppable,E,p,b,l,f,o]);return w(wm.Provider,{value:v,children:t})}const u8=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return au(n,r,o).indexOf(t)},d8=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},f8={duration:200,easing:"ease"},Sm="transform",p8=Vr.Transition.toString({property:Sm,duration:0,easing:"linear"}),h8={roleDescription:"sortable"};function g8(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=g.useState(null),s=g.useRef(n);return Wt(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=io(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),g.useEffect(()=>{a&&i(null)},[a]),a}function v8(e){let{animateLayoutChanges:t=d8,attributes:n,disabled:r,data:o,getNewIndex:a=u8,id:i,strategy:s,resizeObserverConfig:l,transition:c=f8}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:m,overIndex:b,useDragOverlay:y,strategy:S}=g.useContext(wm),E=m8(r,p),x=u.indexOf(i),v=g.useMemo(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),O=g.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:C,node:R,isOver:N,setNodeRef:T}=a8({id:i,data:v,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:k,activatorEvent:j,activeNodeRect:L,attributes:M,setNodeRef:P,listeners:D,isDragging:F,over:ne,setActivatorNodeRef:Z,transform:ue}=mm({id:i,data:v,attributes:{...h8,...n},disabled:E.draggable}),A=DD(T,P),I=!!k,G=I&&!h&&ka(f)&&ka(b),te=!y&&F,ie=te&&G?ue:null,we=G?ie??(s??S)({rects:m,activeNodeRect:L,activeIndex:f,overIndex:b,index:x}):null,fe=ka(f)&&ka(b)?a({id:i,items:u,activeIndex:f,overIndex:b}):x,Ee=k==null?void 0:k.id,re=g.useRef({activeId:Ee,items:u,newIndex:fe,containerId:d}),De=u!==re.current.items,z=t({active:k,containerId:d,isDragging:F,isSorting:I,id:i,index:x,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Xe=g8({disabled:!z,index:x,node:R,rect:C});return g.useEffect(()=>{I&&re.current.newIndex!==fe&&(re.current.newIndex=fe),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[I,fe,d,u]),g.useEffect(()=>{if(Ee===re.current.activeId)return;if(Ee&&!re.current.activeId){re.current.activeId=Ee;return}const $e=setTimeout(()=>{re.current.activeId=Ee},50);return()=>clearTimeout($e)},[Ee]),{active:k,activeIndex:f,attributes:M,data:v,rect:C,index:x,newIndex:fe,items:u,isOver:N,isSorting:I,isDragging:F,listeners:D,node:R,overIndex:b,over:ne,setNodeRef:A,setActivatorNodeRef:Z,setDroppableNodeRef:T,setDraggableNodeRef:P,transform:Xe??we,transition:Le()};function Le(){if(Xe||De&&re.current.newIndex===x)return p8;if(!(te&&!eu(j)||!c)&&(I||z))return Vr.Transition.toString({...c,property:Sm})}}function m8(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function gi(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const y8=[ce.Down,ce.Right,ce.Up,ce.Left],b8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(y8.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=o.get(d.id);if(f)switch(e.code){case ce.Down:r.top<f.top&&l.push(d);break;case ce.Up:r.top>f.top&&l.push(d);break;case ce.Left:r.left>f.left&&l.push(d);break;case ce.Right:r.left<f.left&&l.push(d);break}});const c=t$({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=om(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=a.get(n.id),f=a.get(u),p=f?o.get(f.id):null,h=f==null?void 0:f.node.current;if(h&&p&&d&&f){const b=zi(h).some((O,C)=>s[C]!==O),y=xm(d,f),S=w8(d,f),E=b||!y?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},x={x:p.left,y:p.top};return E.x&&E.y?x:Ko(x,E)}}}};function xm(e,t){return!gi(e)||!gi(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function w8(e,t){return!gi(e)||!gi(t)||!xm(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const S8=e=>{let{transform:t}=e;return{...t,x:0}},x8="_dragItem_xzliq_2",C8="_sortModalBox_xzliq_13",O8="_addOneBtn_xzliq_19",iu={dragItem:x8,sortModalBox:C8,addOneBtn:O8},E8=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=g.useState([]);g.useEffect(()=>{const f=e.map((p,h)=>({val:p,oldIndex:h,id:be.getRandomStr()}));s(f)},[a.open]);const l=JD(Vf(ou,{activationConstraint:{distance:15}}),Vf(nu,{coordinateGetter:b8}));function c(f){const{active:p,over:h}=f;if(p.id!==(h==null?void 0:h.id)){const m=i.findIndex(E=>E.id===(p==null?void 0:p.id)),b=i.findIndex(E=>E.id===(h==null?void 0:h.id)),y=au(i,m,b),S=y.map(E=>E.val);s(y),t==null||t(S)}}const[u,d]=g.useState({x:0,y:0,scaleX:1,scaleY:1});return w(Y.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:f=>w(Jf,{sensors:l,onDragEnd:({delta:p})=>{const h={...u,...p,x:u.x+((p==null?void 0:p.x)||0),y:u.y+((p==null?void 0:p.y)||0)};d(h)},children:w(_8,{modal:f,transform:u})}),children:w("div",{className:iu.sortModalBox,children:w(Jf,{sensors:l,onDragEnd:c,modifiers:[S8],children:w(c8,{items:i,children:i.map(({id:f,val:p},h)=>w(R8,{id:f,index:h,label:p[o||""]},f))})})})})},_8=({modal:e,transform:t})=>{const n=g.useRef(be.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=mm({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return w("div",{ref:r,style:{pointerEvents:"auto",transform:Vr.Transform.toString(s)},...o,...a,children:e})},R8=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=v8({id:e.id}),i={transform:Vr.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return w("div",{className:iu.dragItem,ref:r,style:i,...t,...n,children:s})};function N8(e){return Array.isArray(e)?e:[]}const Cm=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=g.useMemo(()=>N8(i.value??a),[i.value]),[u,d]=g.useState(!1),f=Xc(n||[{component:"StringSetter"}]);return g.useEffect(()=>{var p;t.setCollapseHeaderExt&&((p=t.setCollapseHeaderExt)==null||p.call(t,w(Y.Button,{type:"text",size:"small",style:{color:"gray"},onClick:h=>{h.preventDefault(),h.stopPropagation(),d(!0)},children:"sort"})))},[]),ee(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((p,h)=>w(AD,{style:{paddingBottom:"10px"},index:h,keyPaths:s,value:p,onValueChange:m=>{c[h]=m[h],e==null||e([...c])},setters:f,onDelete:()=>{const m=[...c];m.splice(h),e==null||e(m)}},h)),w(Y.Button,{className:iu.addOneBtn,size:"small",onClick:()=>{const p=[...c];e==null||e([...p,r??""])},children:"Add One"}),w(E8,{label:l,sortLabelKey:o,onValueChange:p=>{e==null||e([...p])},open:u,list:c,keyPaths:s,onCancel:()=>{d(!1)},onOk:()=>{d(!1)}})]})};Cm.setterName="数组设置器";const Om=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Kc,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Xc(s.setters),u=be.getMTitle(s.title),d=be.getMTitleTip(s.title);return w("div",{children:w(lu,{name:s.name,label:u,tips:d,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};Om.setterName="对象设置器";const Em=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:be.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};Em.setterName="表达式设置器";const _m=({onValueChange:e,initialValue:t,setterContext:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});_m.setterName="Bool 设置器";const Rm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Rm.setterName="选择设置器";function T8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(n),!0).forEach(function(r){T8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P8(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function k8(e,t){if(e==null)return{};var n=P8(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function j8(e,t){return M8(e)||A8(e,t)||D8(e,t)||$8()}function M8(e){if(Array.isArray(e))return e}function A8(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function D8(e,t){if(e){if(typeof e=="string")return tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
129
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?np(Object(n),!0).forEach(function(r){I8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):np(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function xo(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function vi(e){return{}.toString.call(e).includes("Object")}function B8(e){return!Object.keys(e).length}function Yo(e){return typeof e=="function"}function z8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function V8(e,t){return vi(t)||Nn("changeType"),Object.keys(t).some(function(n){return!z8(e,n)})&&Nn("changeField"),t}function F8(e){Yo(e)||Nn("selectorType")}function H8(e){Yo(e)||vi(e)||Nn("handlerType"),vi(e)&&Object.values(e).some(function(t){return!Yo(t)})&&Nn("handlersType")}function U8(e){e||Nn("initialIsRequired"),vi(e)||Nn("initialType"),B8(e)&&Nn("initialContent")}function W8(e,t){throw new Error(e[t]||e.default)}var G8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Nn=xo(W8)(G8),ja={changes:V8,selector:F8,handler:H8,initial:U8};function K8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ja.initial(e),ja.handler(t);var n={current:e},r=xo(X8)(n,t),o=xo(Y8)(n),a=xo(ja.changes)(e),i=xo(q8)(n);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return ja.selector(c),c(n.current)}function l(c){L8(r,o,a,i)(c)}return[s,l]}function q8(e,t){return Yo(t)?t(e.current):t}function Y8(e,t){return e.current=rp(rp({},e.current),t),t}function X8(e,t,n){return Yo(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var J8={create:K8},Q8={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function Z8(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function eI(e){return{}.toString.call(e).includes("Object")}function tI(e){return e||op("configIsRequired"),eI(e)||op("configType"),e.urls?(nI(),{paths:{vs:e.urls.monacoBase}}):e}function nI(){console.warn(Nm.deprecation)}function rI(e,t){throw new Error(e[t]||e.default)}var Nm={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
148
130
  You are using deprecated way of configuration.
149
131
 
150
132
  Instead of using
@@ -153,7 +135,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
153
135
  monaco.config({ paths: { vs: '...' } })
154
136
 
155
137
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
156
- `},lp=Y8(Z8)(Tm),eI={config:J8},tI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(a,i){return i(a)},o)}};function Pm(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Pm(e[n],t[n]))}),op(op({},e),t)}var nI={type:"cancelation",msg:"operation is manually canceled"};function Rs(e){var t=!1,n=new Promise(function(r,o){e.then(function(a){return t?o(nI):r(a)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var rI=K8.create({config:q8,isInitialized:!1,resolve:null,reject:null,monaco:null}),km=N8(rI,2),wa=km[0],Yi=km[1];function oI(e){var t=eI.config(e),n=t.monaco,r=R8(t,["monaco"]);dbeugger,Yi(function(o){return{config:Pm(o.config,r),monaco:n}})}function aI(){var e=wa(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Yi({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Rs(Ns);if(window.monaco&&window.monaco.editor)return jm(window.monaco),e.resolve(window.monaco),Rs(Ns);tI(iI,lI)(cI)}return Rs(Ns)}function iI(e){return document.body.appendChild(e)}function sI(e){var t=document.createElement("script");return e&&(t.src=e),t}function lI(e){var t=wa(function(r){var o=r.config,a=r.reject;return{config:o,reject:a}}),n=sI("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function cI(){var e=wa(function(n){var r=n.config,o=n.resolve,a=n.reject;return{config:r,resolve:o,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){jm(n),e.resolve(n)},function(n){e.reject(n)})}function jm(e){wa().monaco||Yi({monaco:e})}function uI(){return wa(function(e){var t=e.monaco;return t})}var Ns=new Promise(function(e,t){return Yi({resolve:e,reject:t})}),Mm={config:oI,init:aI,__getMonacoInstance:uI},dI={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Ts=dI,fI={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},pI=fI;function hI({children:e}){return v.createElement("div",{style:pI.container},e)}var gI=hI,vI=gI;function mI({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return v.createElement("section",{style:{...Ts.wrapper,width:e,height:t},...i},!n&&v.createElement(vI,null,r),v.createElement("div",{ref:o,style:{...Ts.fullWidth,...!n&&Ts.hide},className:a}))}var yI=mI,Am=v.memo(yI);function bI(e){v.useEffect(e,[])}var Dm=bI;function wI(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Et=wI;function Ko(){}function jr(e,t,n,r){return SI(e,r)||xI(e,t,n,r)}function SI(e,t){return e.editor.getModel($m(e,t))}function xI(e,t,n,r){return e.editor.createModel(t,n,r?$m(e,r):void 0)}function $m(e,t){return e.Uri.parse(t)}function CI({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:f="100%",width:p="100%",className:g,wrapperProps:y={},beforeMount:w=Ko,onMount:b=Ko}){let[S,E]=v.useState(!1),[C,m]=v.useState(!0),_=v.useRef(null),O=v.useRef(null),N=v.useRef(null),T=v.useRef(b),P=v.useRef(w),M=v.useRef(!1);Dm(()=>{let j=Mm.init();return j.then(L=>(O.current=L)&&m(!1)).catch(L=>(L==null?void 0:L.type)!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>_.current?A():j.cancel()}),Et(()=>{let j=_.current.getModifiedEditor();j.getOption(O.current.editor.EditorOption.readOnly)?j.setValue(t||""):t!==j.getValue()&&(j.executeEdits("",[{range:j.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),j.pushUndoStop())},[t],S),Et(()=>{var j,L;(L=(j=_.current)==null?void 0:j.getModel())==null||L.original.setValue(e||"")},[e],S),Et(()=>{let{original:j,modified:L}=_.current.getModel();O.current.editor.setModelLanguage(j,r||n||"text"),O.current.editor.setModelLanguage(L,o||n||"text")},[n,r,o],S),Et(()=>{var j;(j=O.current)==null||j.editor.setTheme(c)},[c],S),Et(()=>{var j;(j=_.current)==null||j.updateOptions(d)},[d],S);let D=v.useCallback(()=>{var H;if(!O.current)return;P.current(O.current);let j=jr(O.current,e||"",r||n||"text",a||""),L=jr(O.current,t||"",o||n||"text",i||"");(H=_.current)==null||H.setModel({original:j,modified:L})},[n,t,o,e,r,a,i]),I=v.useCallback(()=>{var j;!M.current&&N.current&&(_.current=O.current.editor.createDiffEditor(N.current,{automaticLayout:!0,...d}),D(),(j=O.current)==null||j.editor.setTheme(c),E(!0),M.current=!0)},[d,c,D]);v.useEffect(()=>{S&&T.current(_.current,O.current)},[S]),v.useEffect(()=>{!C&&!S&&I()},[C,S,I]),Et(()=>{if(_.current&&O.current){let j=_.current.getOriginalEditor(),L=jr(O.current,e||"",r||n||"text",a||"");L!==j.getModel()&&j.setModel(L)}},[a],S),Et(()=>{if(_.current&&O.current){let j=_.current.getModifiedEditor(),L=jr(O.current,t||"",o||n||"text",i||"");L!==j.getModel()&&j.setModel(L)}},[i],S);function A(){var L,H,ie,ne;let j=(L=_.current)==null?void 0:L.getModel();s||((H=j==null?void 0:j.original)==null||H.dispose()),l||((ie=j==null?void 0:j.modified)==null||ie.dispose()),(ne=_.current)==null||ne.dispose()}return v.createElement(Am,{width:p,height:f,isEditorReady:S,loading:u,_ref:N,className:g,wrapperProps:y})}var OI=CI;v.memo(OI);function _I(e){let t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}var EI=_I,za=new Map;function RI({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:y,wrapperProps:w={},beforeMount:b=Ko,onMount:S=Ko,onChange:E,onValidate:C=Ko}){let[m,_]=v.useState(!1),[O,N]=v.useState(!0),T=v.useRef(null),P=v.useRef(null),M=v.useRef(null),D=v.useRef(S),I=v.useRef(b),A=v.useRef(),j=v.useRef(r),L=EI(a),H=v.useRef(!1),ie=v.useRef(!1);Dm(()=>{let $=Mm.init();return $.then(z=>(T.current=z)&&N(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>P.current?he():$.cancel()}),Et(()=>{var z,J,re,de;let $=jr(T.current,e||r||"",t||o||"",a||n||"");$!==((z=P.current)==null?void 0:z.getModel())&&(d&&za.set(L,(J=P.current)==null?void 0:J.saveViewState()),(re=P.current)==null||re.setModel($),d&&((de=P.current)==null||de.restoreViewState(za.get(a))))},[a],m),Et(()=>{var $;($=P.current)==null||$.updateOptions(c)},[c],m),Et(()=>{!P.current||r===void 0||(P.current.getOption(T.current.editor.EditorOption.readOnly)?P.current.setValue(r):r!==P.current.getValue()&&(ie.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),P.current.pushUndoStop(),ie.current=!1))},[r],m),Et(()=>{var z,J;let $=(z=P.current)==null?void 0:z.getModel();$&&o&&((J=T.current)==null||J.editor.setModelLanguage($,o))},[o],m),Et(()=>{var $;s!==void 0&&(($=P.current)==null||$.revealLine(s))},[s],m),Et(()=>{var $;($=T.current)==null||$.editor.setTheme(i)},[i],m);let ne=v.useCallback(()=>{var $;if(!(!M.current||!T.current)&&!H.current){I.current(T.current);let z=a||n,J=jr(T.current,r||e||"",t||o||"",z||"");P.current=($=T.current)==null?void 0:$.editor.create(M.current,{model:J,automaticLayout:!0,...c},u),d&&P.current.restoreViewState(za.get(z)),T.current.editor.setTheme(i),_(!0),H.current=!0}},[e,t,n,r,o,a,c,u,d,i]);v.useEffect(()=>{m&&D.current(P.current,T.current)},[m]),v.useEffect(()=>{!O&&!m&&ne()},[O,m,ne]),j.current=r,v.useEffect(()=>{var $,z;m&&E&&(($=A.current)==null||$.dispose(),A.current=(z=P.current)==null?void 0:z.onDidChangeModelContent(J=>{ie.current||E(P.current.getValue(),J)}))},[m,E]),v.useEffect(()=>{if(m){let $=T.current.editor.onDidChangeMarkers(z=>{var re;let J=(re=P.current.getModel())==null?void 0:re.uri;if(J&&z.find(de=>de.path===J.path)){let de=T.current.editor.getModelMarkers({resource:J});C==null||C(de)}});return()=>{$==null||$.dispose()}}return()=>{}},[m,C]);function he(){var $,z;($=A.current)==null||$.dispose(),f?d&&za.set(a,P.current.saveViewState()):(z=P.current.getModel())==null||z.dispose(),P.current.dispose()}return v.createElement(Am,{width:p,height:g,isEditorReady:m,loading:l,_ref:M,className:y,wrapperProps:w})}var NI=RI,TI=v.memo(NI),PI=TI;const Sa=e=>{const t=r=>{var o;(o=e.beforeMount)==null||o.call(e,r)},n=r=>{var o;(o=e.onDidMount)==null||o.call(e,r)};return x(tt,{children:x(PI,{height:"100%",width:"100%",defaultLanguage:e.language,defaultValue:e.initialValue,beforeMount:t,onMount:n,options:e.options})})},Im=({onValueChange:e,setterContext:t,initialValue:n,...r})=>{const o=v.useRef(null),[a,i]=v.useState(!1),s=()=>{var c;const l=((c=o.current)==null?void 0:c.getValue())||"";try{const u=JSON.parse(l);e(u)}catch(u){console.warn(u)}};return se(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:[x(Z.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),x(Z.Modal,{destroyOnClose:!0,open:a,title:"JSON Editor",width:"800px",onCancel:()=>i(!1),onOk:()=>{s(),i(!1)},style:{},children:x("div",{style:{height:"500px"},children:a&&x(Sa,{onDidMount:l=>{o.current=l},initialValue:JSON.stringify(r.value??(n||{}),null,2),language:"json",options:{automaticLayout:!0,tabSize:2,suggestOnTriggerCharacters:!1}})})})]})};Im.setterName="JSON 设置器";const cp=`
138
+ `},op=Z8(rI)(Nm),oI={config:tI},aI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(a,i){return i(a)},o)}};function Tm(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Tm(e[n],t[n]))}),ep(ep({},e),t)}var iI={type:"cancelation",msg:"operation is manually canceled"};function Es(e){var t=!1,n=new Promise(function(r,o){e.then(function(a){return t?o(iI):r(a)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var sI=J8.create({config:Q8,isInitialized:!1,resolve:null,reject:null,monaco:null}),Pm=j8(sI,2),ia=Pm[0],Hi=Pm[1];function lI(e){var t=oI.config(e),n=t.monaco,r=k8(t,["monaco"]);dbeugger,Hi(function(o){return{config:Tm(o.config,r),monaco:n}})}function cI(){var e=ia(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Hi({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Es(_s);if(window.monaco&&window.monaco.editor)return km(window.monaco),e.resolve(window.monaco),Es(_s);aI(uI,fI)(pI)}return Es(_s)}function uI(e){return document.body.appendChild(e)}function dI(e){var t=document.createElement("script");return e&&(t.src=e),t}function fI(e){var t=ia(function(r){var o=r.config,a=r.reject;return{config:o,reject:a}}),n=dI("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function pI(){var e=ia(function(n){var r=n.config,o=n.resolve,a=n.reject;return{config:r,resolve:o,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){km(n),e.resolve(n)},function(n){e.reject(n)})}function km(e){ia().monaco||Hi({monaco:e})}function hI(){return ia(function(e){var t=e.monaco;return t})}var _s=new Promise(function(e,t){return Hi({resolve:e,reject:t})}),jm={config:lI,init:cI,__getMonacoInstance:hI},gI={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Rs=gI,vI={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mI=vI;function yI({children:e}){return g.createElement("div",{style:mI.container},e)}var bI=yI,wI=bI;function SI({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return g.createElement("section",{style:{...Rs.wrapper,width:e,height:t},...i},!n&&g.createElement(wI,null,r),g.createElement("div",{ref:o,style:{...Rs.fullWidth,...!n&&Rs.hide},className:a}))}var xI=SI,Mm=g.memo(xI);function CI(e){g.useEffect(e,[])}var Am=CI;function OI(e,t,n=!0){let r=g.useRef(!0);g.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var bt=OI;function Mo(){}function Sr(e,t,n,r){return EI(e,r)||_I(e,t,n,r)}function EI(e,t){return e.editor.getModel(Dm(e,t))}function _I(e,t,n,r){return e.editor.createModel(t,n,r?Dm(e,r):void 0)}function Dm(e,t){return e.Uri.parse(t)}function RI({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:f="100%",width:p="100%",className:h,wrapperProps:m={},beforeMount:b=Mo,onMount:y=Mo}){let[S,E]=g.useState(!1),[x,v]=g.useState(!0),O=g.useRef(null),C=g.useRef(null),R=g.useRef(null),N=g.useRef(y),T=g.useRef(b),k=g.useRef(!1);Am(()=>{let P=jm.init();return P.then(D=>(C.current=D)&&v(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>O.current?M():P.cancel()}),bt(()=>{let P=O.current.getModifiedEditor();P.getOption(C.current.editor.EditorOption.readOnly)?P.setValue(t||""):t!==P.getValue()&&(P.executeEdits("",[{range:P.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),P.pushUndoStop())},[t],S),bt(()=>{var P,D;(D=(P=O.current)==null?void 0:P.getModel())==null||D.original.setValue(e||"")},[e],S),bt(()=>{let{original:P,modified:D}=O.current.getModel();C.current.editor.setModelLanguage(P,r||n||"text"),C.current.editor.setModelLanguage(D,o||n||"text")},[n,r,o],S),bt(()=>{var P;(P=C.current)==null||P.editor.setTheme(c)},[c],S),bt(()=>{var P;(P=O.current)==null||P.updateOptions(d)},[d],S);let j=g.useCallback(()=>{var F;if(!C.current)return;T.current(C.current);let P=Sr(C.current,e||"",r||n||"text",a||""),D=Sr(C.current,t||"",o||n||"text",i||"");(F=O.current)==null||F.setModel({original:P,modified:D})},[n,t,o,e,r,a,i]),L=g.useCallback(()=>{var P;!k.current&&R.current&&(O.current=C.current.editor.createDiffEditor(R.current,{automaticLayout:!0,...d}),j(),(P=C.current)==null||P.editor.setTheme(c),E(!0),k.current=!0)},[d,c,j]);g.useEffect(()=>{S&&N.current(O.current,C.current)},[S]),g.useEffect(()=>{!x&&!S&&L()},[x,S,L]),bt(()=>{if(O.current&&C.current){let P=O.current.getOriginalEditor(),D=Sr(C.current,e||"",r||n||"text",a||"");D!==P.getModel()&&P.setModel(D)}},[a],S),bt(()=>{if(O.current&&C.current){let P=O.current.getModifiedEditor(),D=Sr(C.current,t||"",o||n||"text",i||"");D!==P.getModel()&&P.setModel(D)}},[i],S);function M(){var D,F,ne,Z;let P=(D=O.current)==null?void 0:D.getModel();s||((F=P==null?void 0:P.original)==null||F.dispose()),l||((ne=P==null?void 0:P.modified)==null||ne.dispose()),(Z=O.current)==null||Z.dispose()}return g.createElement(Mm,{width:p,height:f,isEditorReady:S,loading:u,_ref:R,className:h,wrapperProps:m})}var NI=RI;g.memo(NI);function TI(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var PI=TI,Ma=new Map;function kI({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:h="100%",className:m,wrapperProps:b={},beforeMount:y=Mo,onMount:S=Mo,onChange:E,onValidate:x=Mo}){let[v,O]=g.useState(!1),[C,R]=g.useState(!0),N=g.useRef(null),T=g.useRef(null),k=g.useRef(null),j=g.useRef(S),L=g.useRef(y),M=g.useRef(),P=g.useRef(r),D=PI(a),F=g.useRef(!1),ne=g.useRef(!1);Am(()=>{let A=jm.init();return A.then(I=>(N.current=I)&&R(!1)).catch(I=>(I==null?void 0:I.type)!=="cancelation"&&console.error("Monaco initialization: error:",I)),()=>T.current?ue():A.cancel()}),bt(()=>{var I,G,te,ie;let A=Sr(N.current,e||r||"",t||o||"",a||n||"");A!==((I=T.current)==null?void 0:I.getModel())&&(d&&Ma.set(D,(G=T.current)==null?void 0:G.saveViewState()),(te=T.current)==null||te.setModel(A),d&&((ie=T.current)==null||ie.restoreViewState(Ma.get(a))))},[a],v),bt(()=>{var A;(A=T.current)==null||A.updateOptions(c)},[c],v),bt(()=>{!T.current||r===void 0||(T.current.getOption(N.current.editor.EditorOption.readOnly)?T.current.setValue(r):r!==T.current.getValue()&&(ne.current=!0,T.current.executeEdits("",[{range:T.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),T.current.pushUndoStop(),ne.current=!1))},[r],v),bt(()=>{var I,G;let A=(I=T.current)==null?void 0:I.getModel();A&&o&&((G=N.current)==null||G.editor.setModelLanguage(A,o))},[o],v),bt(()=>{var A;s!==void 0&&((A=T.current)==null||A.revealLine(s))},[s],v),bt(()=>{var A;(A=N.current)==null||A.editor.setTheme(i)},[i],v);let Z=g.useCallback(()=>{var A;if(!(!k.current||!N.current)&&!F.current){L.current(N.current);let I=a||n,G=Sr(N.current,r||e||"",t||o||"",I||"");T.current=(A=N.current)==null?void 0:A.editor.create(k.current,{model:G,automaticLayout:!0,...c},u),d&&T.current.restoreViewState(Ma.get(I)),N.current.editor.setTheme(i),O(!0),F.current=!0}},[e,t,n,r,o,a,c,u,d,i]);g.useEffect(()=>{v&&j.current(T.current,N.current)},[v]),g.useEffect(()=>{!C&&!v&&Z()},[C,v,Z]),P.current=r,g.useEffect(()=>{var A,I;v&&E&&((A=M.current)==null||A.dispose(),M.current=(I=T.current)==null?void 0:I.onDidChangeModelContent(G=>{ne.current||E(T.current.getValue(),G)}))},[v,E]),g.useEffect(()=>{if(v){let A=N.current.editor.onDidChangeMarkers(I=>{var te;let G=(te=T.current.getModel())==null?void 0:te.uri;if(G&&I.find(ie=>ie.path===G.path)){let ie=N.current.editor.getModelMarkers({resource:G});x==null||x(ie)}});return()=>{A==null||A.dispose()}}return()=>{}},[v,x]);function ue(){var A,I;(A=M.current)==null||A.dispose(),f?d&&Ma.set(a,T.current.saveViewState()):(I=T.current.getModel())==null||I.dispose(),T.current.dispose()}return g.createElement(Mm,{width:p,height:h,isEditorReady:v,loading:l,_ref:k,className:m,wrapperProps:b})}var jI=kI,MI=g.memo(jI),AI=MI;const sa=e=>{const t=r=>{var o;(o=e.beforeMount)==null||o.call(e,r)},n=r=>{var o;(o=e.onDidMount)==null||o.call(e,r)};return w(Ye,{children:w(AI,{height:"100%",width:"100%",defaultLanguage:e.language,defaultValue:e.initialValue,beforeMount:t,onMount:n,options:e.options})})},$m=({onValueChange:e,setterContext:t,initialValue:n,...r})=>{const o=g.useRef(null),[a,i]=g.useState(!1),s=()=>{var c;const l=((c=o.current)==null?void 0:c.getValue())||"";try{const u=JSON.parse(l);e(u)}catch(u){console.warn(u)}};return ee(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{destroyOnClose:!0,open:a,title:"JSON Editor",width:"800px",onCancel:()=>i(!1),onOk:()=>{s(),i(!1)},style:{},children:w("div",{style:{height:"500px"},children:a&&w(sa,{onDidMount:l=>{o.current=l},initialValue:JSON.stringify(r.value??(n||{}),null,2),language:"json",options:{automaticLayout:!0,tabSize:2,suggestOnTriggerCharacters:!1}})})})]})};$m.setterName="JSON 设置器";const ap=`
157
139
  type ContextType = {
158
140
  /** 渲染函数的入口参数 */
159
141
  params?: Record<any, any>;
@@ -199,12 +181,12 @@ type ContextType = {
199
181
 
200
182
  /** 渲染上下文 */
201
183
  declare var $$context: ContextType;
202
- `,Lm=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=v.useRef(null),[a,i]=v.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:Oe.CNodePropsTypeEnum.FUNCTION,value:c})};return se(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:[x(Z.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),x(Z.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:x("div",{style:{height:"100%"},children:a&&x(Sa,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(cp,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(cp,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};Lm.setterName="函数 设置器";const Bm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});Bm.setterName="长文本设置器";const zm=e=>typeof e=="function",kI="{}".NODE_ENV==="development"||"{}".NODE_ENV==="test",Fm=kI;function Vm(e){const t=v.useRef(e);return t.current=e,t}const jI=e=>{Fm&&(zm(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Vm(e);v.useEffect(()=>()=>{t.current()},[])},MI=jI;function AI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hm=AI,DI=typeof Do=="object"&&Do&&Do.Object===Object&&Do,$I=DI,II=$I,LI=typeof self=="object"&&self&&self.Object===Object&&self,BI=II||LI||Function("return this")(),Um=BI,zI=Um,FI=function(){return zI.Date.now()},VI=FI,HI=/\s/;function UI(e){for(var t=e.length;t--&&HI.test(e.charAt(t)););return t}var WI=UI,GI=WI,KI=/^\s+/;function qI(e){return e&&e.slice(0,GI(e)+1).replace(KI,"")}var YI=qI,XI=Um,JI=XI.Symbol,Wm=JI,up=Wm,Gm=Object.prototype,QI=Gm.hasOwnProperty,ZI=Gm.toString,Mo=up?up.toStringTag:void 0;function e6(e){var t=QI.call(e,Mo),n=e[Mo];try{e[Mo]=void 0;var r=!0}catch{}var o=ZI.call(e);return r&&(t?e[Mo]=n:delete e[Mo]),o}var t6=e6,n6=Object.prototype,r6=n6.toString;function o6(e){return r6.call(e)}var a6=o6,dp=Wm,i6=t6,s6=a6,l6="[object Null]",c6="[object Undefined]",fp=dp?dp.toStringTag:void 0;function u6(e){return e==null?e===void 0?c6:l6:fp&&fp in Object(e)?i6(e):s6(e)}var d6=u6;function f6(e){return e!=null&&typeof e=="object"}var p6=f6,h6=d6,g6=p6,v6="[object Symbol]";function m6(e){return typeof e=="symbol"||g6(e)&&h6(e)==v6}var y6=m6,b6=YI,pp=Hm,w6=y6,hp=0/0,S6=/^[-+]0x[0-9a-f]+$/i,x6=/^0b[01]+$/i,C6=/^0o[0-7]+$/i,O6=parseInt;function _6(e){if(typeof e=="number")return e;if(w6(e))return hp;if(pp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=b6(e);var n=x6.test(e);return n||C6.test(e)?O6(e.slice(2),n?2:8):S6.test(e)?hp:+e}var E6=_6,R6=Hm,Ps=VI,gp=E6,N6="Expected a function",T6=Math.max,P6=Math.min;function k6(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(N6);t=gp(t)||0,R6(n)&&(u=!!n.leading,d="maxWait"in n,a=d?T6(gp(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function p(_){var O=r,N=o;return r=o=void 0,c=_,i=e.apply(N,O),i}function g(_){return c=_,s=setTimeout(b,t),u?p(_):i}function y(_){var O=_-l,N=_-c,T=t-O;return d?P6(T,a-N):T}function w(_){var O=_-l,N=_-c;return l===void 0||O>=t||O<0||d&&N>=a}function b(){var _=Ps();if(w(_))return S(_);s=setTimeout(b,y(_))}function S(_){return s=void 0,f&&r?p(_):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function C(){return s===void 0?i:S(Ps())}function m(){var _=Ps(),O=w(_);if(r=arguments,o=this,l=_,O){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(b,t),p(l)}return s===void 0&&(s=setTimeout(b,t)),i}return m.cancel=E,m.flush=C,m}var j6=k6;const M6=Ql(j6);function uu(e,t){var n;Fm&&(zm(e)||console.error(`useDebounceFn expected parameter is a function, got ${typeof e}`));const r=Vm(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,a=v.useMemo(()=>M6((...i)=>r.current(...i),o,t),[]);return MI(()=>{a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}const A6="_inputAuto_gk0d2_2",D6="_active_gk0d2_6",vp={inputAuto:A6,active:D6},Km={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},qm=Km.cssKeyValue,$6=Object.keys(Km.cssKeyValue),Ym=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o,...a})=>{const i=v.useRef(null),[s,l]=v.useState(r??(o||"")),[c,u]=v.useState(!1),d=()=>{e==null||e(s)};v.useLayoutEffect(()=>{l(r)},[r]);const{run:f}=uu(d,{wait:10}),p=v.useMemo(()=>{var y;return(((y=qm[n])==null?void 0:y.values)||[]).map(w=>({value:w}))},[n]);return x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.AutoComplete,{ref:i,popupMatchSelectWidth:200,bordered:!1,value:s,onChange:g=>{l(g),f()},style:{flex:1},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},className:yt([vp.inputAuto,c&&vp.active]),placeholder:"value",options:p})})};Ym.setterName="CSS值设置器";const I6={StringSetter:tm,ArraySetter:Om,ShapeSetter:_m,NumberSetter:nm,ExpressionSetter:Em,BooleanSetter:Rm,SelectSetter:Nm,JSONSetter:Im,FunctionSetter:Lm,TextAreaSetter:Bm,CSSValueSetter:Ym},L6="_fieldBox_nltxm_3",B6="_label_nltxm_11",z6="_tipsLabel_nltxm_25",F6="_content_nltxm_32",Fa={fieldBox:L6,label:B6,tipsLabel:z6,content:F6},Va=e=>{const{children:t,label:n,tips:r,name:o}=e;let a=n;const{formState:i,updateContext:s,updateConditionConfig:l}=v.useContext(Yc);if(v.useEffect(()=>{e.condition&&l(o,e.condition)},[]),v.useEffect(()=>{var g;const p=(e.condition??(()=>!0))(i);(g=e.onConditionValueChange)==null||g.call(e,p)},[i,e]),r){let f=r;typeof r=="function"&&(f=r()),a=x(Z.Tooltip,{title:x("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:f}),color:"rgba(50,50,50,0.8)",children:x("span",{className:Fa.tipsLabel,children:n})})}let c=t;if(v.isValidElement(t)){const f={onValueChange:p=>{s({...i,[o]:p})}};i[o]!==void 0&&(f.value=i[o]),c=v.cloneElement(t,f)}return(e.condition??(()=>!0))(i)?e.noStyle?x(tt,{children:c}):se("div",{className:Fa.fieldBox,children:[x("div",{className:Fa.label,children:a}),x("div",{className:Fa.content,children:c})]}):null},V6="_switchBtn_k17cr_2",H6="_shapeFieldBox_k17cr_8",U6="_collapseHeader_k17cr_9",Ha={switchBtn:V6,shapeFieldBox:H6,collapseHeader:U6},Xm=v.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),du=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var P,M;const[a,i]=v.useState(!0),{customSetterMap:s}=v.useContext(Yc),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:d}=v.useContext(Xm),f={...I6,...s},[p,g]=v.useState(()=>{var I;const D=((I=c[t.join(".")])==null?void 0:I.setter)||"";return[...e].find(A=>A.componentName===D)||e[0]});let y=null;p!=null&&p.componentName&&(y=f[p==null?void 0:p.componentName]||p.component),y||(y=function(){return x("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${p==null?void 0:p.componentName} is not found.`})});const w=e.map(D=>{const I=(D==null?void 0:D.componentName)||"",A=f[I];return{key:D.componentName,label:(A==null?void 0:A.setterName)||D.componentName}}),b=({key:D})=>{const I=e.find(A=>A.componentName===D);I&&(g(I),l==null||l(t,I.componentName))};let S=x("div",{className:Ha.switchBtn,onClick:D=>{D.preventDefault(),D.stopPropagation()},children:x(Z.Dropdown,{trigger:["click"],menu:{selectable:!0,items:w,onClick:b,defaultSelectedKeys:[(p==null?void 0:p.componentName)||""]},children:x(W0,{})})});w.length===1&&(S=null);const E=v.useMemo(()=>{let D={...(p==null?void 0:p.props)||{},initialValue:p==null?void 0:p.initialValue};const I=e.find(A=>A.componentName===(p==null?void 0:p.componentName));return I&&(D={...D,...I.props}),D},[e]),C={formRef:u,pluginCtx:d},[m,_]=v.useState([]),O={condition:n,onConditionValueChange:D=>{i(D)}};let N=null;const T=r===!1||(p==null?void 0:p.hiddenLabel)===!0;return["ArraySetter"].includes((p==null?void 0:p.componentName)||"")?N=x(Z.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:se("div",{className:Ha.collapseHeader,children:[x("span",{style:{flex:1},children:o.label}),m,S]}),children:T?x(y,{...E,setterContext:{...C,keyPaths:[...t],label:o.label,setCollapseHeaderExt:_}}):x(Va,{...o,noStyle:!0,...O,children:x(y,{...E,setterContext:{...C,keyPaths:[...t],label:o.label,setCollapseHeaderExt:_}})})}]}):["ShapeSetter"].includes((p==null?void 0:p.componentName)||"")?N=se("div",{className:Ha.shapeFieldBox,children:[o.prefix??null,((P=p==null?void 0:p.props)==null?void 0:P.collapse)===!1&&se("div",{style:{width:"100%"},children:[!T&&x(Va,{...o,noStyle:!0,...O,children:x(y,{...E,setterContext:{...C,keyPaths:[...t]}})}),T&&x(y,{...E,setterContext:{...C,keyPaths:[...t]}})]}),((M=p==null?void 0:p.props)==null?void 0:M.collapse)!==!1&&x(Z.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:se("div",{className:Ha.collapseHeader,children:[x("span",{style:{flex:1},children:o.label}),S]}),children:x(Va,{...o,noStyle:!0,...O,children:x(y,{...E,setterContext:{...C,keyPaths:[...t]}})})}]}),o.suffix??null]}):N=se("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,!T&&x(Va,{...o,condition:n,onConditionValueChange:D=>{i(D)},children:x(y,{...E,setterContext:{...C,keyPaths:[...t]}})}),T&&x(y,{...E,setterContext:{...C,keyPaths:[...t]}}),S,o.suffix??null]}),x("div",{style:{display:a?"block":"none",overflow:"auto"},children:N})},W6="_CFromRenderBox_13lda_2",G6={CFromRenderBox:W6},K6=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return x(Xm.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x("div",{className:G6.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:x(Xc,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(Oe.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const d=OD(u.title),f=Oe.getMTitleTip(u.title),p=Zc(u.setters),g=[u.name];return x(du,{condition:u.condition,keyPaths:g,setters:p,label:d,name:u.name||"",tips:f},u.name)}})})})})})},fu=v.forwardRef(K6),q6=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=v.useRef(null);v.useEffect(()=>{const d=()=>{var p,g;const f=((p=t==null?void 0:t.getPlainProps)==null?void 0:p.call(t))||{};(g=r.current)==null||g.setFields(f)};d(),t==null||t.emitter.on("onNodeChange",d)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=d=>{t==null||t.updateValue({props:d})},i=(d,f)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[d.join(".")]={name:d.join("."),setter:f})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return x("div",{className:cD.CFromRenderBox,children:x(fu,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},Y6={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>x(q6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},X6=e=>{const{node:t}=e;if(!t)return x(tt,{});const n=t.value.state||{},r=v.useRef(null);v.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return x(tt,{children:x(Sa,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},J6={key:"State",name:"State",view:({node:e,pluginCtx:t})=>x(X6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},Q6="_advanceBox_9o3af_2",Z6={advanceBox:Q6},eL=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
203
- name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:se(tt,{children:["node ",x("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],tL=e=>{var i;const{node:t}=e;if(!t)return x(tt,{});const n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=v.useRef(null);v.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return x("div",{className:Z6.advanceBox,children:x(fu,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:eL,initialValue:{},ref:o,onValueChange:a},t.id)})},nL={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>x(tL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},rL="_rightPanelContainer_1p332_2",oL={rightPanelContainer:rL},aL="_visualPanelBox_6q12v_2",iL="_header_6q12v_5",mp={visualPanelBox:aL,header:iL},sL={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},lL=Object.keys(sL.cssKeyValue),cL="_cssFieldBox_15f2h_2",uL="_row_15f2h_9",dL="_fieldLabel_15f2h_14",fL="_leftBox_15f2h_20",pL="_rightBox_15f2h_23",hL="_inputBox_15f2h_26",gL="_cssBox_15f2h_30",Sn={cssFieldBox:cL,row:uL,fieldLabel:dL,leftBox:fL,rightBox:pL,inputBox:hL,cssBox:gL},vL=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),ks=lL.map(e=>({value:e})),yp=v.forwardRef(function(t,n){var m,_;const[r,o]=v.useState(""),[a,i]=v.useState(""),{mod:s="create"}=t,[l,c]=v.useState({key:((m=t.value)==null?void 0:m.key)||"",value:((_=t.value)==null?void 0:_.value)||{type:Oe.CNodePropsTypeEnum.EXPRESSION,value:""}});v.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[u,d]=v.useState(ks),f=O=>{const N=ks.filter(T=>T.value.includes(O));d(O?N:ks)},p=()=>{t.onValueChange({...l})},{run:g}=uu(p,{wait:20}),[y,w]=v.useState(0);v.useEffect(()=>{vL(l.key,13.33).then(O=>{let N=parseFloat(O);l.key===""&&(N=200),w(N+6)})},[l.key]);const b=v.useRef(null),[S,E]=v.useState({key:!1,value:!1});v.useImperativeHandle(n,()=>({reset:()=>{var O;c({key:"",value:{type:Oe.CNodePropsTypeEnum.EXPRESSION,value:""}}),(O=b.current)==null||O.focus()}}),[]);const C=()=>{var N,T,P;if(l.key===""){o("error");return}if(l.value.value===""){i("error");return}o(""),i("");const O=(N=t.onCreate)==null?void 0:N.call(t,l);(T=O==null?void 0:O.errorKey)!=null&&T.includes("key")&&o("error"),(P=O==null?void 0:O.errorKey)!=null&&P.includes("value")&&i("error")};return x(tt,{children:se("div",{className:Sn.cssFieldBox,children:[se("div",{className:Sn.leftBox,children:[se("div",{className:Sn.row,children:[x("span",{className:Sn.fieldLabel,children:"Name"}),x(Z.AutoComplete,{status:r,disabled:s==="edit",ref:b,onSearch:f,popupMatchSelectWidth:200,value:l.key,onChange:O=>{o(""),c({...l,key:O})},style:{width:`${y}px`},className:yt([Sn.inputBox]),onFocus:()=>{E({key:!0,value:!1})},onBlur:()=>{E({key:!1,value:!1}),g()},placeholder:"property",options:u})]}),se("div",{className:Sn.row,children:[x("span",{className:Sn.fieldLabel,children:"Value"}),x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x(Z.Input,{status:a,value:l.value.value,onChange:O=>{i("");const N={type:Oe.CNodePropsTypeEnum.EXPRESSION,value:O.target.value};c({...l,value:N})},onPressEnter:()=>{g()},onKeyDown:O=>{var N;O.code==="Enter"&&s==="create"&&(C(),(N=b.current)==null||N.focus())}})})]})]}),x("div",{className:Sn.rightBox,children:t.onDelete&&s==="edit"&&x(Z.Button,{size:"small",type:"text",onClick:()=>{var O;(O=t.onDelete)==null||O.call(t)},children:x(Nh,{style:{display:"inline-flex",fontSize:"12px"}})})}),t.onCreate&&s==="create"&&x("div",{children:x(Z.Button,{size:"small",type:"text",icon:x(ac,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:C})})]})})}),mL=v.forwardRef(function(t,n){const[r,o]=v.useState([]);v.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),v.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=v.useState({key:"",value:{type:Oe.CNodePropsTypeEnum.EXPRESSION,value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=v.useRef(null);return x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:se("div",{className:Sn.cssBox,children:[r.map((c,u)=>x("div",{children:x(yp,{value:c,mod:"edit",onValueChange:d=>{if(d.key===""){r.splice(u,1),o([...r]);return}r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),x(yp,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(d=>d.key===c.key))return Z.message.error("The attribute name already exists, please replace"),{errorKey:["key"]};r.push(c),o([...r]),s(r),i({key:"",value:{type:Oe.CNodePropsTypeEnum.EXPRESSION,value:""}})}})]})})}),yL=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:Oe.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],bL=v.forwardRef(function(t,n){return x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:x("div",{children:x(fu,{initialValue:[],properties:yL,onSetterChange:function(){},onValueChange:r=>{var o;(o=t.onValueChange)==null||o.call(t,r.className||[])},defaultSetterConfig:{}})})})});function wL(e){if(Array.isArray(e))return Gs(e)}function SL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
204
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e){return wL(e)||ev(e)||ec(e)||SL()}function pu(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Jm(e,t,n){var r=q.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function xL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(Hn(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&Te(a)==="object"&&Te(i)==="object"){var d=Object.keys(a);return d.length!==Object.keys(i).length?!1:d.every(function(f){return o(a[f],i[f],c)})}return!1}return o(e,t)}var bp="%",CL=function(){function e(t){dt(this,e),pe(this,"instanceId",void 0),pe(this,"cache",new Map),this.instanceId=t}return ft(e,[{key:"get",value:function(n){return this.cache.get(n.join(bp))||null}},{key:"update",value:function(n,r){var o=n.join(bp),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),Dl="data-token-hash",tr="data-css-hash",OL="data-cache-path",Mr="__cssinjs_instance__";function _L(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(tr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[Mr]=o[Mr]||e,o[Mr]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(tr,"]"))).forEach(function(o){var a=o.getAttribute(tr);if(r[a]){if(o[Mr]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new CL(e)}var EL=q.createContext({hashPriority:"low",cache:_L(),defaultCache:!0});const hu=EL;function Oi(e){var t="";return Object.keys(e).forEach(function(n){var r=e[n];t+=n,r&&Te(r)==="object"?t+=Oi(r):t+=r}),t}function RL(e,t){return pu("".concat(t,"_").concat(Oi(e)))}var qo="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Qm="_bAmBoO_";function NL(e,t,n){if(cn()){var r,o;Yo(e,qo);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(Qm);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),dh(qo),i}return!1}var js=void 0;function TL(){return js===void 0&&(js=NL("@layer ".concat(qo," { .").concat(qo,' { content: "').concat(Qm,'"!important; } }'),function(e){e.className=qo})),js}var wp="{}".NODE_ENV!=="test"&&cn()?q.useLayoutEffect:q.useEffect,PL=function(t,n){var r=q.useRef(!0);wp(function(){return t(r.current)},n),wp(function(){return r.current=!1,function(){r.current=!0}},[])},kL=G({},q),Sp=kL.useInsertionEffect,jL=function(t,n,r){q.useMemo(t,r),PL(function(){return n(!0)},r)},ML=Sp?function(e,t,n){return Sp(function(){return e(),t()},n)}:jL;const AL=ML;function DL(){return!1}var $l=!1;function $L(){return $l}const IL="{}".NODE_ENV==="production"?DL:$L;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot){var Ms=window;if(typeof Ms.webpackHotUpdate=="function"){var LL=Ms.webpackHotUpdate;Ms.webpackHotUpdate=function(){return $l=!0,setTimeout(function(){$l=!1},0),LL.apply(void 0,arguments)}}}function Zm(e,t,n,r,o){var a=q.useContext(hu),i=a.cache,s=[e].concat(Vn(t)),l=s.join("_"),c=IL(),u=function(p){i.update(s,function(g){var y=g||[],w=Ne(y,2),b=w[0],S=b===void 0?0:b,E=w[1],C=E;"{}".NODE_ENV!=="production"&&E&&c&&(r==null||r(C,c),C=null);var m=C||n(),_=[S,m];return p?p(_):_})};q.useMemo(function(){return u()},[l]);var d=i.get(s)[1];return AL(function(){o==null||o(d)},function(f){return u(function(p){var g=Ne(p,2),y=g[0],w=g[1];return f&&y===0&&(o==null||o(d)),[y+1,w]}),function(){i.update(s,function(p){var g=p||[],y=Ne(g,2),w=y[0],b=w===void 0?0:w,S=y[1],E=b-1;return E===0?(r==null||r(S,!1),null):[b-1,S]})}},[l]),d}var BL={},zL="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Zn=new Map;function FL(e){Zn.set(e,(Zn.get(e)||0)+1)}function VL(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Dl,'="').concat(e,'"]'));n.forEach(function(r){if(r[Mr]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var HL=0;function UL(e,t){Zn.set(e,(Zn.get(e)||0)-1);var n=Array.from(Zn.keys()),r=n.filter(function(o){var a=Zn.get(o)||0;return a<=0});n.length-r.length>HL&&r.forEach(function(o){VL(o,t),Zn.delete(o)})}var WL=function(t,n,r,o){var a=r.getDerivativeToken(t),i=G(G({},a),n);return o&&(i=o(i)),i};function GL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=v.useContext(hu),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?BL:s,c=n.formatToken,u=q.useMemo(function(){return Object.assign.apply(Object,[{}].concat(Vn(t)))},[t]),d=q.useMemo(function(){return Oi(u)},[u]),f=q.useMemo(function(){return Oi(l)},[l]),p=Zm("token",[i,e.id,d,f],function(){var g=WL(u,l,e,c),y=RL(g,i);g._tokenKey=y,FL(y);var w="".concat(zL,"-").concat(pu(y));return g._hashId=w,[g,w]},function(g){UL(g[0]._tokenKey,o)});return p}var KL={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ey="comm",ty="rule",ny="decl",qL="@import",YL="@keyframes",XL="@layer",JL=Math.abs,gu=String.fromCharCode;function ry(e){return e.trim()}function ti(e,t,n){return e.replace(t,n)}function QL(e,t){return e.indexOf(t)}function ua(e,t){return e.charCodeAt(t)|0}function da(e,t,n){return e.slice(t,n)}function Cn(e){return e.length}function ZL(e){return e.length}function Ua(e,t){return t.push(e),e}var Xi=1,Qr=1,oy=0,Bt=0,Je=0,yo="";function vu(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Xi,column:Qr,length:i,return:"",siblings:s}}function e3(){return Je}function t3(){return Je=Bt>0?ua(yo,--Bt):0,Qr--,Je===10&&(Qr=1,Xi--),Je}function Yt(){return Je=Bt<oy?ua(yo,Bt++):0,Qr++,Je===10&&(Qr=1,Xi++),Je}function nr(){return ua(yo,Bt)}function ni(){return Bt}function Ji(e,t){return da(yo,e,t)}function Il(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function n3(e){return Xi=Qr=1,oy=Cn(yo=e),Bt=0,[]}function r3(e){return yo="",e}function As(e){return ry(Ji(Bt-1,Ll(e===91?e+2:e===40?e+1:e)))}function o3(e){for(;(Je=nr())&&Je<33;)Yt();return Il(e)>2||Il(Je)>3?"":" "}function a3(e,t){for(;--t&&Yt()&&!(Je<48||Je>102||Je>57&&Je<65||Je>70&&Je<97););return Ji(e,ni()+(t<6&&nr()==32&&Yt()==32))}function Ll(e){for(;Yt();)switch(Je){case e:return Bt;case 34:case 39:e!==34&&e!==39&&Ll(Je);break;case 40:e===41&&Ll(e);break;case 92:Yt();break}return Bt}function i3(e,t){for(;Yt()&&e+Je!==47+10;)if(e+Je===42+42&&nr()===47)break;return"/*"+Ji(t,Bt-1)+"*"+gu(e===47?e:Yt())}function s3(e){for(;!Il(nr());)Yt();return Ji(e,Bt)}function l3(e){return r3(ri("",null,null,null,[""],e=n3(e),0,[0],e))}function ri(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,g=0,y=1,w=1,b=1,S=0,E="",C=o,m=a,_=r,O=E;w;)switch(g=S,S=Yt()){case 40:if(g!=108&&ua(O,d-1)==58){QL(O+=ti(As(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:O+=As(S);break;case 9:case 10:case 13:case 32:O+=o3(g);break;case 92:O+=a3(ni()-1,7);continue;case 47:switch(nr()){case 42:case 47:Ua(c3(i3(Yt(),ni()),t,n,l),l);break;default:O+="/"}break;case 123*y:s[c++]=Cn(O)*b;case 125*y:case 59:case 0:switch(S){case 0:case 125:w=0;case 59+u:b==-1&&(O=ti(O,/\f/g,"")),p>0&&Cn(O)-d&&Ua(p>32?Cp(O+";",r,n,d-1,l):Cp(ti(O," ","")+";",r,n,d-2,l),l);break;case 59:O+=";";default:if(Ua(_=xp(O,t,n,c,u,o,s,E,C=[],m=[],d,a),a),S===123)if(u===0)ri(O,t,_,_,C,a,d,s,m);else switch(f===99&&ua(O,3)===110?100:f){case 100:case 108:case 109:case 115:ri(e,_,_,r&&Ua(xp(e,_,_,0,0,o,s,E,o,C=[],d,m),m),o,m,d,s,r?C:m);break;default:ri(O,_,_,_,[""],m,0,s,m)}}c=u=p=0,y=b=1,E=O="",d=i;break;case 58:d=1+Cn(O),p=g;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&t3()==125)continue}switch(O+=gu(S),S*y){case 38:b=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(Cn(O)-1)*b,b=1;break;case 64:nr()===45&&(O+=As(Yt())),f=nr(),u=d=Cn(E=O+=s3(ni())),S++;break;case 45:g===45&&Cn(O)==2&&(y=0)}}return a}function xp(e,t,n,r,o,a,i,s,l,c,u,d){for(var f=o-1,p=o===0?a:[""],g=ZL(p),y=0,w=0,b=0;y<r;++y)for(var S=0,E=da(e,f+1,f=JL(w=i[y])),C=e;S<g;++S)(C=ry(w>0?p[S]+" "+E:ti(E,/&\f/g,p[S])))&&(l[b++]=C);return vu(e,t,n,o===0?ty:s,l,c,u,d)}function c3(e,t,n,r){return vu(e,t,n,ey,gu(e3()),da(e,2,-2),0,r)}function Cp(e,t,n,r,o){return vu(e,t,n,ny,da(e,0,r),da(e,r+1,-1),r,o)}function Bl(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function u3(e,t,n,r){switch(e.type){case XL:if(e.children.length)break;case qL:case ny:return e.return=e.return||e.value;case ey:return"";case YL:return e.return=e.value+"{"+Bl(e.children,r)+"}";case ty:if(!Cn(e.value=e.props.join(",")))return""}return Cn(n=Bl(e.children,r))?e.return=e.value+"{"+n+"}":""}function ay(e,t){var n=t.path,r=t.parentSelectors;Hn(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var d3=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&ay("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},f3=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&ay("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},Op="data-ant-cssinjs-cache-path",iy="_FILE_STYLE__",rr,sy=!0;function p3(){if(!rr&&(rr={},cn())){var e=document.createElement("div");e.className=Op,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=Ne(a,2),s=i[0],l=i[1];rr[s]=l});var n=document.querySelector("style[".concat(Op,"]"));if(n){var r;sy=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function h3(e){return p3(),!!rr[e]}function g3(e){var t=rr[e],n=null;if(t&&cn())if(sy)n=iy;else{var r=document.querySelector("style[".concat(tr,'="').concat(rr[e],'"]'));r?n=r.innerHTML:delete rr[e]}return[n,t]}var _p=cn(),ly="_skip_check_",cy="_multi_value_";function Ep(e){var t=Bl(l3(e),u3);return t.replace(/\{%%%\:[^;];}/g,";")}function v3(e){return Te(e)==="object"&&e&&(ly in e||cy in e)}function m3(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(Vn(l.slice(1))).join(" ")});return a.join(",")}var y3=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,g=p===void 0?[]:p,y="",w={};function b(_){var O=_.getName(s);if(!w[O]){var N=e(_.style,n,{root:!1,parentSelectors:i}),T=Ne(N,1),P=T[0];w[O]="@keyframes ".concat(_.getName(s)).concat(P)}}function S(_){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return _.forEach(function(N){Array.isArray(N)?S(N,O):N&&O.push(N)}),O}var E=S(Array.isArray(t)?t:[t]);if(E.forEach(function(_){var O=typeof _=="string"&&!o?{}:_;if(typeof O=="string")y+="".concat(O,`
205
- `);else if(O._keyframe)b(O);else{var N=f.reduce(function(T,P){var M;return(P==null||(M=P.visit)===null||M===void 0?void 0:M.call(P,T))||T},O);Object.keys(N).forEach(function(T){var P=N[T];if(Te(P)==="object"&&P&&(T!=="animationName"||!P._keyframe)&&!v3(P)){var M=!1,D=T.trim(),I=!1;(o||a)&&s?D.startsWith("@")?M=!0:D=m3(T,s,u):o&&!s&&(D==="&"||D==="")&&(D="",I=!0);var A=e(P,n,{root:I,injectHash:M,parentSelectors:[].concat(Vn(i),[D])}),j=Ne(A,2),L=j[0],H=j[1];w=G(G({},w),H),y+="".concat(D).concat(L)}else{let he=function($,z){"{}".NODE_ENV!=="production"&&(Te(P)!=="object"||!(P!=null&&P[ly]))&&[d3,f3].concat(Vn(g)).forEach(function(de){return de($,z,{path:c,hashId:s,parentSelectors:i})});var J=$.replace(/[A-Z]/g,function(de){return"-".concat(de.toLowerCase())}),re=z;!KL[$]&&typeof re=="number"&&re!==0&&(re="".concat(re,"px")),$==="animationName"&&z!==null&&z!==void 0&&z._keyframe&&(b(z),re=z.getName(s)),y+="".concat(J,":").concat(re,";")};var ie,ne=(ie=P==null?void 0:P.value)!==null&&ie!==void 0?ie:P;Te(P)==="object"&&P!==null&&P!==void 0&&P[cy]&&Array.isArray(ne)?ne.forEach(function($){he(T,$)}):he(T,ne)}})}}),!o)y="{".concat(y,"}");else if(l&&TL()){var C=l.split(","),m=C[C.length-1].trim();y="@layer ".concat(m," {").concat(y,"}"),C.length>1&&(y="@layer ".concat(l,"{%%%:%}").concat(y))}return[y,w]};function b3(e,t){return pu("".concat(e.join("%")).concat(t))}function w3(){return null}function zl(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=q.useContext(hu),l=s.autoClear,c=s.mock,u=s.defaultCache,d=s.hashPriority,f=s.container,p=s.ssrInline,g=s.transformers,y=s.linters,w=s.cache,b=n._tokenKey,S=[b].concat(Vn(r)),E=_p;"{}".NODE_ENV!=="production"&&c!==void 0&&(E=c==="client");var C=Zm("style",S,function(){var T=S.join("|");if(h3(T)){var P=g3(T),M=Ne(P,2),D=M[0],I=M[1];if(D)return[D,b,I,{}]}var A=t(),j=y3(A,{hashId:o,hashPriority:d,layer:a,path:r.join("-"),transformers:g,linters:y}),L=Ne(j,2),H=L[0],ie=L[1],ne=Ep(H),he=b3(S,ne);return[ne,b,he,ie]},function(T,P){var M=Ne(T,3),D=M[2];(P||l)&&_p&&dh(D,{mark:tr})},function(T){var P=Ne(T,4),M=P[0];P[1];var D=P[2],I=P[3];if(E&&M!==iy){var A={mark:tr,prepend:"queue",attachTo:f},j=typeof i=="function"?i():i;j&&(A.csp={nonce:j});var L=Yo(M,D,A);L[Mr]=w.instanceId,L.setAttribute(Dl,b),"{}".NODE_ENV!=="production"&&L.setAttribute(OL,S.join("|")),Object.keys(I).forEach(function(H){Yo(Ep(I[H]),"_effect-".concat(H),A)})}}),m=Ne(C,3),_=m[0],O=m[1],N=m[2];return function(T){var P;if(!p||E||!u)P=x(w3,{});else{var M;P=x("style",{...(M={},pe(M,Dl,O),pe(M,tr,N),M),dangerouslySetInnerHTML:{__html:_}})}return se(tt,{children:[P,T]})}}function S3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var mu=function(){function e(){dt(this,e),pe(this,"cache",void 0),pe(this,"keys",void 0),pe(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return ft(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var d=Ne(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=Ne(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!S3(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();pe(mu,"MAX_CACHE_SIZE",20);pe(mu,"MAX_CACHE_OFFSET",5);var Rp=0,x3=function(){function e(t){dt(this,e),pe(this,"derivatives",void 0),pe(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Rp,t.length===0&&oh(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Rp+=1}return ft(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Ds=new mu;function uy(e){var t=Array.isArray(e)?e:[e];return Ds.has(t)||Ds.set(t,new x3(t)),Ds.get(t)}function Er(e){return e.notSplit=!0,e}Er(["borderTop","borderBottom"]),Er(["borderTop"]),Er(["borderBottom"]),Er(["borderLeft","borderRight"]),Er(["borderLeft"]),Er(["borderRight"]);var C3=v.createContext({});const O3=C3;function Fl(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function dy(e,t,n,r){if(!t.length)return n;var o=tv(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=Vn(e):s=G({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=dy(s[a],i,n,r),s}function $s(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Fl(e,t.slice(0,-1))?e:dy(e,t,n,r)}function _3(e){return Te(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Np(e){return Array.isArray(e)?[]:{}}var E3=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function R3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Np(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Fl(o,i),u=Array.isArray(c);if(u||_3(c)){if(!l.has(c)){l.add(c);var d=Fl(r,i);u?r=$s(r,i,[]):(!d||Te(d)!=="object")&&(r=$s(r,i,Np(c))),E3(c).forEach(function(f){a([].concat(Vn(i),[f]),l)})}}else r=$s(r,i,c)}a([])}),r}function N3(){}let fy=N3;"{}".NODE_ENV!=="production"&&(fy=(e,t,n)=>{Hn(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&ah()});const xa=fy,T3=v.createContext(void 0),P3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var k3={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const j3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},py=j3,M3={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},k3),timePickerLocale:Object.assign({},py)},Tp=M3,Ot="${label} is not a valid ${type}",A3={locale:"en",Pagination:P3,DatePicker:Tp,TimePicker:py,Calendar:Tp,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ot,method:Ot,array:Ot,object:Ot,number:Ot,date:Ot,boolean:Ot,integer:Ot,float:Ot,regexp:Ot,email:Ot,url:Ot,hex:Ot},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},yu=A3;let Is=Object.assign({},yu.Modal);function Pp(e){e?Is=Object.assign(Object.assign({},Is),e):Is=Object.assign({},yu.Modal)}const D3=v.createContext(void 0),hy=D3,gy="internalMark",vy=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&xa(r===gy,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),q.useEffect(()=>(Pp(t&&t.Modal),()=>{Pp()}),[t]);const o=q.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return x(hy.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(vy.displayName="LocaleProvider");const $3=vy,I3="5.6.3",L3=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var Wa=2,kp=.16,B3=.05,z3=.05,F3=.15,my=5,yy=4,V3=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function jp(e){var t=e.r,n=e.g,r=e.b,o=ai(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ga(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ii(t,n,r,!1))}function H3(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Mp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Wa*t:Math.round(e.h)+Wa*t:r=n?Math.round(e.h)+Wa*t:Math.round(e.h)-Wa*t,r<0?r+=360:r>=360&&(r-=360),r}function Ap(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-kp*t:t===yy?r=e.s+kp:r=e.s+B3*t,r>1&&(r=1),n&&t===my&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Dp(e,t,n){var r;return n?r=e.v+z3*t:r=e.v-F3*t,r>1&&(r=1),Number(r.toFixed(2))}function Zr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Wt(e),o=my;o>0;o-=1){var a=jp(r),i=Ga(Wt({h:Mp(a,o,!0),s:Ap(a,o,!0),v:Dp(a,o,!0)}));n.push(i)}n.push(Ga(r));for(var s=1;s<=yy;s+=1){var l=jp(r),c=Ga(Wt({h:Mp(l,s),s:Ap(l,s),v:Dp(l,s)}));n.push(c)}return t.theme==="dark"?V3.map(function(u){var d=u.index,f=u.opacity,p=Ga(H3(Wt(t.backgroundColor||"#141414"),Wt(n[d]),f*100));return p}):n}var Ls={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Bs={},zs={};Object.keys(Ls).forEach(function(e){Bs[e]=Zr(Ls[e]),Bs[e].primary=Bs[e][5],zs[e]=Zr(Ls[e],{theme:"dark",backgroundColor:"#141414"}),zs[e].primary=zs[e][5]});const U3=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},W3=U3;function G3(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const by={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},K3=Object.assign(Object.assign({},by),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
184
+ `,Im=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=g.useRef(null),[a,i]=g.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:be.CNodePropsTypeEnum.FUNCTION,value:c})};return ee(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:w("div",{style:{height:"100%"},children:a&&w(sa,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(ap,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(ap,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};Im.setterName="函数 设置器";const Lm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});Lm.setterName="长文本设置器";const Bm=e=>typeof e=="function",DI="{}".NODE_ENV==="development"||"{}".NODE_ENV==="test",zm=DI;function Vm(e){const t=g.useRef(e);return t.current=e,t}const $I=e=>{zm&&(Bm(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Vm(e);g.useEffect(()=>()=>{t.current()},[])},II=$I;function LI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fm=LI,BI=typeof So=="object"&&So&&So.Object===Object&&So,zI=BI,VI=zI,FI=typeof self=="object"&&self&&self.Object===Object&&self,HI=VI||FI||Function("return this")(),Hm=HI,UI=Hm,WI=function(){return UI.Date.now()},GI=WI,KI=/\s/;function qI(e){for(var t=e.length;t--&&KI.test(e.charAt(t)););return t}var YI=qI,XI=YI,JI=/^\s+/;function QI(e){return e&&e.slice(0,XI(e)+1).replace(JI,"")}var ZI=QI,e6=Hm,t6=e6.Symbol,Um=t6,ip=Um,Wm=Object.prototype,n6=Wm.hasOwnProperty,r6=Wm.toString,bo=ip?ip.toStringTag:void 0;function o6(e){var t=n6.call(e,bo),n=e[bo];try{e[bo]=void 0;var r=!0}catch{}var o=r6.call(e);return r&&(t?e[bo]=n:delete e[bo]),o}var a6=o6,i6=Object.prototype,s6=i6.toString;function l6(e){return s6.call(e)}var c6=l6,sp=Um,u6=a6,d6=c6,f6="[object Null]",p6="[object Undefined]",lp=sp?sp.toStringTag:void 0;function h6(e){return e==null?e===void 0?p6:f6:lp&&lp in Object(e)?u6(e):d6(e)}var g6=h6;function v6(e){return e!=null&&typeof e=="object"}var m6=v6,y6=g6,b6=m6,w6="[object Symbol]";function S6(e){return typeof e=="symbol"||b6(e)&&y6(e)==w6}var x6=S6,C6=ZI,cp=Fm,O6=x6,up=0/0,E6=/^[-+]0x[0-9a-f]+$/i,_6=/^0b[01]+$/i,R6=/^0o[0-7]+$/i,N6=parseInt;function T6(e){if(typeof e=="number")return e;if(O6(e))return up;if(cp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=C6(e);var n=_6.test(e);return n||R6.test(e)?N6(e.slice(2),n?2:8):E6.test(e)?up:+e}var P6=T6,k6=Fm,Ns=GI,dp=P6,j6="Expected a function",M6=Math.max,A6=Math.min;function D6(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(j6);t=dp(t)||0,k6(n)&&(u=!!n.leading,d="maxWait"in n,a=d?M6(dp(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function p(O){var C=r,R=o;return r=o=void 0,c=O,i=e.apply(R,C),i}function h(O){return c=O,s=setTimeout(y,t),u?p(O):i}function m(O){var C=O-l,R=O-c,N=t-C;return d?A6(N,a-R):N}function b(O){var C=O-l,R=O-c;return l===void 0||C>=t||C<0||d&&R>=a}function y(){var O=Ns();if(b(O))return S(O);s=setTimeout(y,m(O))}function S(O){return s=void 0,f&&r?p(O):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function x(){return s===void 0?i:S(Ns())}function v(){var O=Ns(),C=b(O);if(r=arguments,o=this,l=O,C){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),i}return v.cancel=E,v.flush=x,v}var $6=D6;const I6=Yl($6);function su(e,t){var n;zm&&(Bm(e)||console.error(`useDebounceFn expected parameter is a function, got ${typeof e}`));const r=Vm(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,a=g.useMemo(()=>I6((...i)=>r.current(...i),o,t),[]);return II(()=>{a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}const L6="_inputAuto_gk0d2_2",B6="_active_gk0d2_6",fp={inputAuto:L6,active:B6},Gm={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},Km=Gm.cssKeyValue,z6=Object.keys(Gm.cssKeyValue),qm=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o,...a})=>{const i=g.useRef(null),[s,l]=g.useState(r??(o||"")),[c,u]=g.useState(!1),d=()=>{e==null||e(s)};g.useLayoutEffect(()=>{l(r)},[r]);const{run:f}=su(d,{wait:10}),p=g.useMemo(()=>{var m;return(((m=Km[n])==null?void 0:m.values)||[]).map(b=>({value:b}))},[n]);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.AutoComplete,{ref:i,popupMatchSelectWidth:200,bordered:!1,value:s,onChange:h=>{l(h),f()},style:{flex:1},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},className:dt([fp.inputAuto,c&&fp.active]),placeholder:"value",options:p})})};qm.setterName="CSS值设置器";const V6={StringSetter:em,ArraySetter:Cm,ShapeSetter:Om,NumberSetter:tm,ExpressionSetter:Em,BooleanSetter:_m,SelectSetter:Rm,JSONSetter:$m,FunctionSetter:Im,TextAreaSetter:Lm,CSSValueSetter:qm},F6="_fieldBox_nltxm_3",H6="_label_nltxm_11",U6="_tipsLabel_nltxm_25",W6="_content_nltxm_32",Aa={fieldBox:F6,label:H6,tipsLabel:U6,content:W6},Da=e=>{const{children:t,label:n,tips:r,name:o}=e;let a=n;const{formState:i,updateContext:s,updateConditionConfig:l}=g.useContext(Gc);if(g.useEffect(()=>{e.condition&&l(o,e.condition)},[]),g.useEffect(()=>{var h;const p=(e.condition??(()=>!0))(i);(h=e.onConditionValueChange)==null||h.call(e,p)},[i,e]),r){let f=r;typeof r=="function"&&(f=r()),a=w(Y.Tooltip,{title:w("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:f}),color:"rgba(50,50,50,0.8)",children:w("span",{className:Aa.tipsLabel,children:n})})}let c=t;if(g.isValidElement(t)){const f={onValueChange:p=>{s({...i,[o]:p})}};i[o]!==void 0&&(f.value=i[o]),c=g.cloneElement(t,f)}return(e.condition??(()=>!0))(i)?e.noStyle?w(Ye,{children:c}):ee("div",{className:Aa.fieldBox,children:[w("div",{className:Aa.label,children:a}),w("div",{className:Aa.content,children:c})]}):null},G6="_switchBtn_k17cr_2",K6="_shapeFieldBox_k17cr_8",q6="_collapseHeader_k17cr_9",$a={switchBtn:G6,shapeFieldBox:K6,collapseHeader:q6},Ym=g.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),lu=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var T,k;const[a,i]=g.useState(!0),{customSetterMap:s}=g.useContext(Gc),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:d}=g.useContext(Ym),f={...V6,...s},[p,h]=g.useState(()=>{var L;const j=((L=c[t.join(".")])==null?void 0:L.setter)||"";return[...e].find(M=>M.componentName===j)||e[0]});let m=null;p!=null&&p.componentName&&(m=f[p==null?void 0:p.componentName]||p.component),m||(m=function(){return w("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${p==null?void 0:p.componentName} is not found.`})});const b=e.map(j=>{const L=(j==null?void 0:j.componentName)||"",M=f[L];return{key:j.componentName,label:(M==null?void 0:M.setterName)||j.componentName}}),y=({key:j})=>{const L=e.find(M=>M.componentName===j);L&&(h(L),l==null||l(t,L.componentName))};let S=w("div",{className:$a.switchBtn,onClick:j=>{j.preventDefault(),j.stopPropagation()},children:w(Y.Dropdown,{trigger:["click"],menu:{selectable:!0,items:b,onClick:y,defaultSelectedKeys:[(p==null?void 0:p.componentName)||""]},children:w(W0,{})})});b.length===1&&(S=null);const E=g.useMemo(()=>{let j={...(p==null?void 0:p.props)||{},initialValue:p==null?void 0:p.initialValue};const L=e.find(M=>M.componentName===(p==null?void 0:p.componentName));return L&&(j={...j,...L.props}),j},[e]),x={formRef:u,pluginCtx:d},[v,O]=g.useState([]),C={condition:n,onConditionValueChange:j=>{i(j)}};let R=null;const N=r===!1||(p==null?void 0:p.hiddenLabel)===!0;return["ArraySetter"].includes((p==null?void 0:p.componentName)||"")?R=w(Y.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:ee("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),v,S]}),children:N?w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}}):w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}})})}]}):["ShapeSetter"].includes((p==null?void 0:p.componentName)||"")?R=ee("div",{className:$a.shapeFieldBox,children:[o.prefix??null,((T=p==null?void 0:p.props)==null?void 0:T.collapse)===!1&&ee("div",{style:{width:"100%"},children:[!N&&w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}})]}),((k=p==null?void 0:p.props)==null?void 0:k.collapse)!==!1&&w(Y.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:ee("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),S]}),children:w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})})}]}),o.suffix??null]}):R=ee("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,!N&&w(Da,{...o,condition:n,onConditionValueChange:j=>{i(j)},children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}}),S,o.suffix??null]}),w("div",{style:{display:a?"block":"none",overflow:"auto"},children:R})},Y6="_CFromRenderBox_13lda_2",X6={CFromRenderBox:Y6},J6=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return w(Ym.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{className:X6.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:w(Kc,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(be.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const d=ND(u.title),f=be.getMTitleTip(u.title),p=Xc(u.setters),h=[u.name];return w(lu,{condition:u.condition,keyPaths:h,setters:p,label:d,name:u.name||"",tips:f},u.name)}})})})})})},cu=g.forwardRef(J6),Q6=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=g.useRef(null);g.useEffect(()=>{const d=()=>{var p,h;const f=((p=t==null?void 0:t.getPlainProps)==null?void 0:p.call(t))||{};(h=r.current)==null||h.setFields(f)};d(),t==null||t.emitter.on("onNodeChange",d)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=d=>{t==null||t.updateValue({props:d})},i=(d,f)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[d.join(".")]={name:d.join("."),setter:f})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return w("div",{className:pD.CFromRenderBox,children:w(cu,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},Z6={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>w(Q6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},eL=e=>{const{node:t}=e;if(!t)return w(Ye,{});const n=t.value.state||{},r=g.useRef(null);g.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return w(Ye,{children:w(sa,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},tL={key:"State",name:"State",view:({node:e,pluginCtx:t})=>w(eL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},nL="_advanceBox_9o3af_2",rL={advanceBox:nL},oL=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
185
+ name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:ee(Ye,{children:["node ",w("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],aL=e=>{var i;const{node:t}=e;if(!t)return w(Ye,{});const n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=g.useRef(null);g.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return w("div",{className:rL.advanceBox,children:w(cu,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:oL,initialValue:{},ref:o,onValueChange:a},t.id)})},iL={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>w(aL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},sL="_rightPanelContainer_1p332_2",lL={rightPanelContainer:sL},cL="_visualPanelBox_6q12v_2",uL="_header_6q12v_5",pp={visualPanelBox:cL,header:uL},dL={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},fL=Object.keys(dL.cssKeyValue),pL="_cssFieldBox_15f2h_2",hL="_row_15f2h_9",gL="_fieldLabel_15f2h_14",vL="_leftBox_15f2h_20",mL="_rightBox_15f2h_23",yL="_inputBox_15f2h_26",bL="_cssBox_15f2h_30",fn={cssFieldBox:pL,row:hL,fieldLabel:gL,leftBox:vL,rightBox:mL,inputBox:yL,cssBox:bL},wL=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Ts=fL.map(e=>({value:e})),hp=g.forwardRef(function(t,n){var v,O;const[r,o]=g.useState(""),[a,i]=g.useState(""),{mod:s="create"}=t,[l,c]=g.useState({key:((v=t.value)==null?void 0:v.key)||"",value:((O=t.value)==null?void 0:O.value)||{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}});g.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[u,d]=g.useState(Ts),f=C=>{const R=Ts.filter(N=>N.value.includes(C));d(C?R:Ts)},p=()=>{t.onValueChange({...l})},{run:h}=su(p,{wait:20}),[m,b]=g.useState(0);g.useEffect(()=>{wL(l.key,13.33).then(C=>{let R=parseFloat(C);l.key===""&&(R=200),b(R+6)})},[l.key]);const y=g.useRef(null),[S,E]=g.useState({key:!1,value:!1});g.useImperativeHandle(n,()=>({reset:()=>{var C;c({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),(C=y.current)==null||C.focus()}}),[]);const x=()=>{var R,N,T;if(l.key===""){o("error");return}if(l.value.value===""){i("error");return}o(""),i("");const C=(R=t.onCreate)==null?void 0:R.call(t,l);(N=C==null?void 0:C.errorKey)!=null&&N.includes("key")&&o("error"),(T=C==null?void 0:C.errorKey)!=null&&T.includes("value")&&i("error")};return w(Ye,{children:ee("div",{className:fn.cssFieldBox,children:[ee("div",{className:fn.leftBox,children:[ee("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Name"}),w(Y.AutoComplete,{status:r,disabled:s==="edit",ref:y,onSearch:f,popupMatchSelectWidth:200,value:l.key,onChange:C=>{o(""),c({...l,key:C})},style:{width:`${m}px`},className:dt([fn.inputBox]),onFocus:()=>{E({key:!0,value:!1})},onBlur:()=>{E({key:!1,value:!1}),h()},placeholder:"property",options:u})]}),ee("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Value"}),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{status:a,value:l.value.value,onChange:C=>{i("");const R={type:be.CNodePropsTypeEnum.EXPRESSION,value:C.target.value};c({...l,value:R})},onPressEnter:()=>{h()},onKeyDown:C=>{var R;C.code==="Enter"&&s==="create"&&(x(),(R=y.current)==null||R.focus())}})})]})]}),w("div",{className:fn.rightBox,children:t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var C;(C=t.onDelete)==null||C.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:x})})]})})}),SL=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:ee("div",{className:fn.cssBox,children:[r.map((c,u)=>w("div",{children:w(hp,{value:c,mod:"edit",onValueChange:d=>{if(d.key===""){r.splice(u,1),o([...r]);return}r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(hp,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(d=>d.key===c.key))return Y.message.error("The attribute name already exists, please replace"),{errorKey:["key"]};r.push(c),o([...r]),s(r),i({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}})}})]})})}),xL=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:be.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],CL=g.forwardRef(function(t,n){return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{children:w(cu,{initialValue:[],properties:xL,onSetterChange:function(){},onValueChange:r=>{var o;(o=t.onValueChange)==null||o.call(t,r.className||[])},defaultSetterConfig:{}})})})});function OL(e){if(Array.isArray(e))return Us(e)}function EL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
186
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(e){return OL(e)||Zg(e)||Jl(e)||EL()}function uu(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Xm(e,t,n){var r=W.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function _L(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(Mn(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&Oe(a)==="object"&&Oe(i)==="object"){var d=Object.keys(a);return d.length!==Object.keys(i).length?!1:d.every(function(f){return o(a[f],i[f],c)})}return!1}return o(e,t)}var gp="%",RL=function(){function e(t){nt(this,e),ae(this,"instanceId",void 0),ae(this,"cache",new Map),this.instanceId=t}return rt(e,[{key:"get",value:function(n){return this.cache.get(n.join(gp))||null}},{key:"update",value:function(n,r){var o=n.join(gp),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),jl="data-token-hash",Kn="data-css-hash",NL="data-cache-path",xr="__cssinjs_instance__";function TL(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Kn,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[xr]=o[xr]||e,o[xr]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Kn,"]"))).forEach(function(o){var a=o.getAttribute(Kn);if(r[a]){if(o[xr]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new RL(e)}var PL=W.createContext({hashPriority:"low",cache:TL(),defaultCache:!0});const du=PL;function mi(e){var t="";return Object.keys(e).forEach(function(n){var r=e[n];t+=n,r&&Oe(r)==="object"?t+=mi(r):t+=r}),t}function kL(e,t){return uu("".concat(t,"_").concat(mi(e)))}var Ao="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Jm="_bAmBoO_";function jL(e,t,n){if(en()){var r,o;Do(e,Ao);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(Jm);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),sh(Ao),i}return!1}var Ps=void 0;function ML(){return Ps===void 0&&(Ps=jL("@layer ".concat(Ao," { .").concat(Ao,' { content: "').concat(Jm,'"!important; } }'),function(e){e.className=Ao})),Ps}var vp="{}".NODE_ENV!=="test"&&en()?W.useLayoutEffect:W.useEffect,AL=function(t,n){var r=W.useRef(!0);vp(function(){return t(r.current)},n),vp(function(){return r.current=!1,function(){r.current=!0}},[])},DL=H({},W),mp=DL.useInsertionEffect,$L=function(t,n,r){W.useMemo(t,r),AL(function(){return n(!0)},r)},IL=mp?function(e,t,n){return mp(function(){return e(),t()},n)}:$L;const LL=IL;function BL(){return!1}var Ml=!1;function zL(){return Ml}const VL="{}".NODE_ENV==="production"?BL:zL;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot){var ks=window;if(typeof ks.webpackHotUpdate=="function"){var FL=ks.webpackHotUpdate;ks.webpackHotUpdate=function(){return Ml=!0,setTimeout(function(){Ml=!1},0),FL.apply(void 0,arguments)}}}function Qm(e,t,n,r,o){var a=W.useContext(du),i=a.cache,s=[e].concat(jn(t)),l=s.join("_"),c=VL(),u=function(p){i.update(s,function(h){var m=h||[],b=Ce(m,2),y=b[0],S=y===void 0?0:y,E=b[1],x=E;"{}".NODE_ENV!=="production"&&E&&c&&(r==null||r(x,c),x=null);var v=x||n(),O=[S,v];return p?p(O):O})};W.useMemo(function(){return u()},[l]);var d=i.get(s)[1];return LL(function(){o==null||o(d)},function(f){return u(function(p){var h=Ce(p,2),m=h[0],b=h[1];return f&&m===0&&(o==null||o(d)),[m+1,b]}),function(){i.update(s,function(p){var h=p||[],m=Ce(h,2),b=m[0],y=b===void 0?0:b,S=m[1],E=y-1;return E===0?(r==null||r(S,!1),null):[y-1,S]})}},[l]),d}var HL={},UL="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Wn=new Map;function WL(e){Wn.set(e,(Wn.get(e)||0)+1)}function GL(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(jl,'="').concat(e,'"]'));n.forEach(function(r){if(r[xr]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var KL=0;function qL(e,t){Wn.set(e,(Wn.get(e)||0)-1);var n=Array.from(Wn.keys()),r=n.filter(function(o){var a=Wn.get(o)||0;return a<=0});n.length-r.length>KL&&r.forEach(function(o){GL(o,t),Wn.delete(o)})}var YL=function(t,n,r,o){var a=r.getDerivativeToken(t),i=H(H({},a),n);return o&&(i=o(i)),i};function XL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=g.useContext(du),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?HL:s,c=n.formatToken,u=W.useMemo(function(){return Object.assign.apply(Object,[{}].concat(jn(t)))},[t]),d=W.useMemo(function(){return mi(u)},[u]),f=W.useMemo(function(){return mi(l)},[l]),p=Qm("token",[i,e.id,d,f],function(){var h=YL(u,l,e,c),m=kL(h,i);h._tokenKey=m,WL(m);var b="".concat(UL,"-").concat(uu(m));return h._hashId=b,[h,b]},function(h){qL(h[0]._tokenKey,o)});return p}var JL={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Zm="comm",ey="rule",ty="decl",QL="@import",ZL="@keyframes",e3="@layer",t3=Math.abs,fu=String.fromCharCode;function ny(e){return e.trim()}function qa(e,t,n){return e.replace(t,n)}function n3(e,t){return e.indexOf(t)}function Xo(e,t){return e.charCodeAt(t)|0}function Jo(e,t,n){return e.slice(t,n)}function hn(e){return e.length}function r3(e){return e.length}function Ia(e,t){return t.push(e),e}var Ui=1,Fr=1,ry=0,jt=0,We=0,so="";function pu(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Ui,column:Fr,length:i,return:"",siblings:s}}function o3(){return We}function a3(){return We=jt>0?Xo(so,--jt):0,Fr--,We===10&&(Fr=1,Ui--),We}function Ht(){return We=jt<ry?Xo(so,jt++):0,Fr++,We===10&&(Fr=1,Ui++),We}function qn(){return Xo(so,jt)}function Ya(){return jt}function Wi(e,t){return Jo(so,e,t)}function Al(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function i3(e){return Ui=Fr=1,ry=hn(so=e),jt=0,[]}function s3(e){return so="",e}function js(e){return ny(Wi(jt-1,Dl(e===91?e+2:e===40?e+1:e)))}function l3(e){for(;(We=qn())&&We<33;)Ht();return Al(e)>2||Al(We)>3?"":" "}function c3(e,t){for(;--t&&Ht()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return Wi(e,Ya()+(t<6&&qn()==32&&Ht()==32))}function Dl(e){for(;Ht();)switch(We){case e:return jt;case 34:case 39:e!==34&&e!==39&&Dl(We);break;case 40:e===41&&Dl(e);break;case 92:Ht();break}return jt}function u3(e,t){for(;Ht()&&e+We!==47+10;)if(e+We===42+42&&qn()===47)break;return"/*"+Wi(t,jt-1)+"*"+fu(e===47?e:Ht())}function d3(e){for(;!Al(qn());)Ht();return Wi(e,jt)}function f3(e){return s3(Xa("",null,null,null,[""],e=i3(e),0,[0],e))}function Xa(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,b=1,y=1,S=0,E="",x=o,v=a,O=r,C=E;b;)switch(h=S,S=Ht()){case 40:if(h!=108&&Xo(C,d-1)==58){n3(C+=qa(js(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=js(S);break;case 9:case 10:case 13:case 32:C+=l3(h);break;case 92:C+=c3(Ya()-1,7);continue;case 47:switch(qn()){case 42:case 47:Ia(p3(u3(Ht(),Ya()),t,n,l),l);break;default:C+="/"}break;case 123*m:s[c++]=hn(C)*y;case 125*m:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:y==-1&&(C=qa(C,/\f/g,"")),p>0&&hn(C)-d&&Ia(p>32?bp(C+";",r,n,d-1,l):bp(qa(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ia(O=yp(C,t,n,c,u,o,s,E,x=[],v=[],d,a),a),S===123)if(u===0)Xa(C,t,O,O,x,a,d,s,v);else switch(f===99&&Xo(C,3)===110?100:f){case 100:case 108:case 109:case 115:Xa(e,O,O,r&&Ia(yp(e,O,O,0,0,o,s,E,o,x=[],d,v),v),o,v,d,s,r?x:v);break;default:Xa(C,O,O,O,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=C="",d=i;break;case 58:d=1+hn(C),p=h;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&a3()==125)continue}switch(C+=fu(S),S*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(hn(C)-1)*y,y=1;break;case 64:qn()===45&&(C+=js(Ht())),f=qn(),u=d=hn(E=C+=d3(Ya())),S++;break;case 45:h===45&&hn(C)==2&&(m=0)}}return a}function yp(e,t,n,r,o,a,i,s,l,c,u,d){for(var f=o-1,p=o===0?a:[""],h=r3(p),m=0,b=0,y=0;m<r;++m)for(var S=0,E=Jo(e,f+1,f=t3(b=i[m])),x=e;S<h;++S)(x=ny(b>0?p[S]+" "+E:qa(E,/&\f/g,p[S])))&&(l[y++]=x);return pu(e,t,n,o===0?ey:s,l,c,u,d)}function p3(e,t,n,r){return pu(e,t,n,Zm,fu(o3()),Jo(e,2,-2),0,r)}function bp(e,t,n,r,o){return pu(e,t,n,ty,Jo(e,0,r),Jo(e,r+1,-1),r,o)}function $l(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function h3(e,t,n,r){switch(e.type){case e3:if(e.children.length)break;case QL:case ty:return e.return=e.return||e.value;case Zm:return"";case ZL:return e.return=e.value+"{"+$l(e.children,r)+"}";case ey:if(!hn(e.value=e.props.join(",")))return""}return hn(n=$l(e.children,r))?e.return=e.value+"{"+n+"}":""}function oy(e,t){var n=t.path,r=t.parentSelectors;Mn(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var g3=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&oy("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},v3=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&oy("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},wp="data-ant-cssinjs-cache-path",ay="_FILE_STYLE__",Yn,iy=!0;function m3(){if(!Yn&&(Yn={},en())){var e=document.createElement("div");e.className=wp,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=Ce(a,2),s=i[0],l=i[1];Yn[s]=l});var n=document.querySelector("style[".concat(wp,"]"));if(n){var r;iy=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function y3(e){return m3(),!!Yn[e]}function b3(e){var t=Yn[e],n=null;if(t&&en())if(iy)n=ay;else{var r=document.querySelector("style[".concat(Kn,'="').concat(Yn[e],'"]'));r?n=r.innerHTML:delete Yn[e]}return[n,t]}var Sp=en(),sy="_skip_check_",ly="_multi_value_";function xp(e){var t=$l(f3(e),h3);return t.replace(/\{%%%\:[^;];}/g,";")}function w3(e){return Oe(e)==="object"&&e&&(sy in e||ly in e)}function S3(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(jn(l.slice(1))).join(" ")});return a.join(",")}var x3=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,h=p===void 0?[]:p,m="",b={};function y(O){var C=O.getName(s);if(!b[C]){var R=e(O.style,n,{root:!1,parentSelectors:i}),N=Ce(R,1),T=N[0];b[C]="@keyframes ".concat(O.getName(s)).concat(T)}}function S(O){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return O.forEach(function(R){Array.isArray(R)?S(R,C):R&&C.push(R)}),C}var E=S(Array.isArray(t)?t:[t]);if(E.forEach(function(O){var C=typeof O=="string"&&!o?{}:O;if(typeof C=="string")m+="".concat(C,`
187
+ `);else if(C._keyframe)y(C);else{var R=f.reduce(function(N,T){var k;return(T==null||(k=T.visit)===null||k===void 0?void 0:k.call(T,N))||N},C);Object.keys(R).forEach(function(N){var T=R[N];if(Oe(T)==="object"&&T&&(N!=="animationName"||!T._keyframe)&&!w3(T)){var k=!1,j=N.trim(),L=!1;(o||a)&&s?j.startsWith("@")?k=!0:j=S3(N,s,u):o&&!s&&(j==="&"||j==="")&&(j="",L=!0);var M=e(T,n,{root:L,injectHash:k,parentSelectors:[].concat(jn(i),[j])}),P=Ce(M,2),D=P[0],F=P[1];b=H(H({},b),F),m+="".concat(j).concat(D)}else{let ue=function(A,I){"{}".NODE_ENV!=="production"&&(Oe(T)!=="object"||!(T!=null&&T[sy]))&&[g3,v3].concat(jn(h)).forEach(function(ie){return ie(A,I,{path:c,hashId:s,parentSelectors:i})});var G=A.replace(/[A-Z]/g,function(ie){return"-".concat(ie.toLowerCase())}),te=I;!JL[A]&&typeof te=="number"&&te!==0&&(te="".concat(te,"px")),A==="animationName"&&I!==null&&I!==void 0&&I._keyframe&&(y(I),te=I.getName(s)),m+="".concat(G,":").concat(te,";")};var ne,Z=(ne=T==null?void 0:T.value)!==null&&ne!==void 0?ne:T;Oe(T)==="object"&&T!==null&&T!==void 0&&T[ly]&&Array.isArray(Z)?Z.forEach(function(A){ue(N,A)}):ue(N,Z)}})}}),!o)m="{".concat(m,"}");else if(l&&ML()){var x=l.split(","),v=x[x.length-1].trim();m="@layer ".concat(v," {").concat(m,"}"),x.length>1&&(m="@layer ".concat(l,"{%%%:%}").concat(m))}return[m,b]};function C3(e,t){return uu("".concat(e.join("%")).concat(t))}function O3(){return null}function Il(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=W.useContext(du),l=s.autoClear,c=s.mock,u=s.defaultCache,d=s.hashPriority,f=s.container,p=s.ssrInline,h=s.transformers,m=s.linters,b=s.cache,y=n._tokenKey,S=[y].concat(jn(r)),E=Sp;"{}".NODE_ENV!=="production"&&c!==void 0&&(E=c==="client");var x=Qm("style",S,function(){var N=S.join("|");if(y3(N)){var T=b3(N),k=Ce(T,2),j=k[0],L=k[1];if(j)return[j,y,L,{}]}var M=t(),P=x3(M,{hashId:o,hashPriority:d,layer:a,path:r.join("-"),transformers:h,linters:m}),D=Ce(P,2),F=D[0],ne=D[1],Z=xp(F),ue=C3(S,Z);return[Z,y,ue,ne]},function(N,T){var k=Ce(N,3),j=k[2];(T||l)&&Sp&&sh(j,{mark:Kn})},function(N){var T=Ce(N,4),k=T[0];T[1];var j=T[2],L=T[3];if(E&&k!==ay){var M={mark:Kn,prepend:"queue",attachTo:f},P=typeof i=="function"?i():i;P&&(M.csp={nonce:P});var D=Do(k,j,M);D[xr]=b.instanceId,D.setAttribute(jl,y),"{}".NODE_ENV!=="production"&&D.setAttribute(NL,S.join("|")),Object.keys(L).forEach(function(F){Do(xp(L[F]),"_effect-".concat(F),M)})}}),v=Ce(x,3),O=v[0],C=v[1],R=v[2];return function(N){var T;if(!p||E||!u)T=w(O3,{});else{var k;T=w("style",{...(k={},ae(k,jl,C),ae(k,Kn,R),k),dangerouslySetInnerHTML:{__html:O}})}return ee(Ye,{children:[T,N]})}}function E3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var hu=function(){function e(){nt(this,e),ae(this,"cache",void 0),ae(this,"keys",void 0),ae(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return rt(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var d=Ce(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=Ce(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!E3(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();ae(hu,"MAX_CACHE_SIZE",20);ae(hu,"MAX_CACHE_OFFSET",5);var Cp=0,_3=function(){function e(t){nt(this,e),ae(this,"derivatives",void 0),ae(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Cp,t.length===0&&eh(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Cp+=1}return rt(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Ms=new hu;function cy(e){var t=Array.isArray(e)?e:[e];return Ms.has(t)||Ms.set(t,new _3(t)),Ms.get(t)}function gr(e){return e.notSplit=!0,e}gr(["borderTop","borderBottom"]),gr(["borderTop"]),gr(["borderBottom"]),gr(["borderLeft","borderRight"]),gr(["borderLeft"]),gr(["borderRight"]);var R3=g.createContext({});const N3=R3;function Ll(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function uy(e,t,n,r){if(!t.length)return n;var o=ev(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=jn(e):s=H({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=uy(s[a],i,n,r),s}function As(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Ll(e,t.slice(0,-1))?e:uy(e,t,n,r)}function T3(e){return Oe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Op(e){return Array.isArray(e)?[]:{}}var P3=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function k3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Op(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Ll(o,i),u=Array.isArray(c);if(u||T3(c)){if(!l.has(c)){l.add(c);var d=Ll(r,i);u?r=As(r,i,[]):(!d||Oe(d)!=="object")&&(r=As(r,i,Op(c))),P3(c).forEach(function(f){a([].concat(jn(i),[f]),l)})}}else r=As(r,i,c)}a([])}),r}function j3(){}let dy=j3;"{}".NODE_ENV!=="production"&&(dy=(e,t,n)=>{Mn(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&th()});const la=dy,M3=g.createContext(void 0),A3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var D3={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const $3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fy=$3,I3={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},D3),timePickerLocale:Object.assign({},fy)},Ep=I3,mt="${label} is not a valid ${type}",L3={locale:"en",Pagination:A3,DatePicker:Ep,TimePicker:fy,Calendar:Ep,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mt,method:mt,array:mt,object:mt,number:mt,date:mt,boolean:mt,integer:mt,float:mt,regexp:mt,email:mt,url:mt,hex:mt},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},gu=L3;let Ds=Object.assign({},gu.Modal);function _p(e){e?Ds=Object.assign(Object.assign({},Ds),e):Ds=Object.assign({},gu.Modal)}const B3=g.createContext(void 0),py=B3,hy="internalMark",gy=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(r===hy,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),W.useEffect(()=>(_p(t&&t.Modal),()=>{_p()}),[t]);const o=W.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return w(py.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(gy.displayName="LocaleProvider");const z3=gy,V3="5.6.3",F3=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var La=2,Rp=.16,H3=.05,U3=.05,W3=.15,vy=5,my=4,G3=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Np(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ba(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function K3(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Tp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-La*t:Math.round(e.h)+La*t:r=n?Math.round(e.h)+La*t:Math.round(e.h)-La*t,r<0?r+=360:r>=360&&(r-=360),r}function Pp(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Rp*t:t===my?r=e.s+Rp:r=e.s+H3*t,r>1&&(r=1),n&&t===vy&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function kp(e,t,n){var r;return n?r=e.v+U3*t:r=e.v-W3*t,r>1&&(r=1),Number(r.toFixed(2))}function Hr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=vy;o>0;o-=1){var a=Np(r),i=Ba(Bt({h:Tp(a,o,!0),s:Pp(a,o,!0),v:kp(a,o,!0)}));n.push(i)}n.push(Ba(r));for(var s=1;s<=my;s+=1){var l=Np(r),c=Ba(Bt({h:Tp(l,s),s:Pp(l,s),v:kp(l,s)}));n.push(c)}return t.theme==="dark"?G3.map(function(u){var d=u.index,f=u.opacity,p=Ba(K3(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var $s={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Is={},Ls={};Object.keys($s).forEach(function(e){Is[e]=Hr($s[e]),Is[e].primary=Is[e][5],Ls[e]=Hr($s[e],{theme:"dark",backgroundColor:"#141414"}),Ls[e].primary=Ls[e][5]});const q3=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Y3=q3;function X3(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const yy={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},J3=Object.assign(Object.assign({},yy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
206
188
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
207
- 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Qi=K3;function q3(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),p=n(a),g=n(i),y=n(s),w=r(c,u);return Object.assign(Object.assign({},w),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorBgMask:new Rt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Y3=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}},X3=Y3;function J3(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},X3(r))}const wn=(e,t)=>new Rt(e).setAlpha(t).toRgbString(),Ao=(e,t)=>new Rt(e).darken(t).toHexString(),Q3=e=>{const t=Zr(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Z3=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:wn(r,.88),colorTextSecondary:wn(r,.65),colorTextTertiary:wn(r,.45),colorTextQuaternary:wn(r,.25),colorFill:wn(r,.15),colorFillSecondary:wn(r,.06),colorFillTertiary:wn(r,.04),colorFillQuaternary:wn(r,.02),colorBgLayout:Ao(n,4),colorBgContainer:Ao(n,0),colorBgElevated:Ao(n,0),colorBgSpotlight:wn(r,.85),colorBorder:Ao(n,15),colorBorderSecondary:Ao(n,6)}};function e4(e){const t=new Array(10).fill(null).map((n,r)=>{const o=r-1,a=e*Math.pow(2.71828,o/5),i=r>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const t4=e=>{const t=e4(e),n=t.map(o=>o.size),r=t.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},n4=t4;function r4(e){const t=Object.keys(by).map(n=>{const r=Zr(e[n]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${n}-${i+1}`]=r[i],o[`${n}${i+1}`]=r[i],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),q3(e,{generateColorPalettes:Q3,generateNeutralColorPalettes:Z3})),n4(e.fontSize)),G3(e)),W3(e)),J3(e))}function Fs(e){return e>=0&&e<=255}function Ka(e,t){const{r:n,g:r,b:o,a}=new Rt(e).toRgb();if(a<1)return e;const{r:i,g:s,b:l}=new Rt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Fs(u)&&Fs(d)&&Fs(f))return new Rt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Rt({r:n,g:r,b:o,a:1}).toRgbString()}var o4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function a4(e){const{override:t}=e,n=o4(e,["override"]),r=Object.assign({},t);Object.keys(Qi).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),a=480,i=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Ka(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Ka(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Ka(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*4,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Ka(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
189
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Gi=J3;function Q3(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),p=n(a),h=n(i),m=n(s),b=r(c,u);return Object.assign(Object.assign({},b),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorBgMask:new wt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Z3=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}},e4=Z3;function t4(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},e4(r))}const dn=(e,t)=>new wt(e).setAlpha(t).toRgbString(),wo=(e,t)=>new wt(e).darken(t).toHexString(),n4=e=>{const t=Hr(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},r4=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:dn(r,.88),colorTextSecondary:dn(r,.65),colorTextTertiary:dn(r,.45),colorTextQuaternary:dn(r,.25),colorFill:dn(r,.15),colorFillSecondary:dn(r,.06),colorFillTertiary:dn(r,.04),colorFillQuaternary:dn(r,.02),colorBgLayout:wo(n,4),colorBgContainer:wo(n,0),colorBgElevated:wo(n,0),colorBgSpotlight:dn(r,.85),colorBorder:wo(n,15),colorBorderSecondary:wo(n,6)}};function o4(e){const t=new Array(10).fill(null).map((n,r)=>{const o=r-1,a=e*Math.pow(2.71828,o/5),i=r>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const a4=e=>{const t=o4(e),n=t.map(o=>o.size),r=t.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},i4=a4;function s4(e){const t=Object.keys(yy).map(n=>{const r=Hr(e[n]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${n}-${i+1}`]=r[i],o[`${n}${i+1}`]=r[i],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Q3(e,{generateColorPalettes:n4,generateNeutralColorPalettes:r4})),i4(e.fontSize)),X3(e)),Y3(e)),t4(e))}function Bs(e){return e>=0&&e<=255}function za(e,t){const{r:n,g:r,b:o,a}=new wt(e).toRgb();if(a<1)return e;const{r:i,g:s,b:l}=new wt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Bs(u)&&Bs(d)&&Bs(f))return new wt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new wt({r:n,g:r,b:o,a:1}).toRgbString()}var l4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function c4(e){const{override:t}=e,n=l4(e,["override"]),r=Object.assign({},t);Object.keys(Gi).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),a=480,i=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:za(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:za(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:za(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*4,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:za(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
208
190
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
209
191
  0 3px 6px -4px rgba(0, 0, 0, 0.12),
210
192
  0 9px 28px 8px rgba(0, 0, 0, 0.05)
@@ -217,9 +199,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
217
199
  0 1px 6px -1px rgba(0, 0, 0, 0.02),
218
200
  0 2px 4px 0 rgba(0, 0, 0, 0.02)
219
201
  `,screenXS:a,screenXSMin:a,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
220
- 0 1px 2px -2px ${new Rt("rgba(0, 0, 0, 0.16)").toRgbString()},
221
- 0 3px 6px 0 ${new Rt("rgba(0, 0, 0, 0.12)").toRgbString()},
222
- 0 5px 12px 4px ${new Rt("rgba(0, 0, 0, 0.09)").toRgbString()}
202
+ 0 1px 2px -2px ${new wt("rgba(0, 0, 0, 0.16)").toRgbString()},
203
+ 0 3px 6px 0 ${new wt("rgba(0, 0, 0, 0.12)").toRgbString()},
204
+ 0 5px 12px 4px ${new wt("rgba(0, 0, 0, 0.09)").toRgbString()}
223
205
  `,boxShadowDrawerRight:`
224
206
  -6px 0 16px 0 rgba(0, 0, 0, 0.08),
225
207
  -3px 0 6px -4px rgba(0, 0, 0, 0.12),
@@ -236,31 +218,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
236
218
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
237
219
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
238
220
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
239
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}function oi(e){var t=q.useRef(!1),n=q.useState(e),r=Ne(n,2),o=r[0],a=r[1];q.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,l){l&&t.current||a(s)}return[o,i]}const wy="anticon",i4=(e,t)=>t||(e?`ant-${e}`:"ant"),Ca=q.createContext({getPrefixCls:i4,iconPrefixCls:wy}),s4=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),l4=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),c4=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},[`&:active,
240
- &:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),u4=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}};function d4(e,t,n,r){return o=>{const[a,i,s]=bu(),{getPrefixCls:l,iconPrefixCls:c,csp:u}=v.useContext(Ca),d=l(),f={theme:a,token:i,hashId:s,nonce:()=>u==null?void 0:u.nonce};return zl(Object.assign(Object.assign({},f),{path:["Shared",d]}),()=>[{"&":c4(i)}]),[zl(Object.assign(Object.assign({},f),{path:[e,o,c]}),()=>{const{token:p,flush:g}=p4(i),y=Object.assign({},i[e]);if(r!=null&&r.deprecatedTokens){const{deprecatedTokens:m}=r;m.forEach(_=>{let[O,N]=_;var T;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Hn(!(y!=null&&y[O]),`The token '${String(O)}' of ${e} had deprecated, use '${String(N)}' instead.`),(y!=null&&y[O]||y!=null&&y[N])&&((T=y[N])!==null&&T!==void 0||(y[N]=y==null?void 0:y[O]))})}const w=typeof n=="function"?n(Hl(p,y??{})):n,b=Object.assign(Object.assign({},w),y),S=`.${o}`,E=Hl(p,{componentCls:S,prefixCls:o,iconCls:`.${c}`,antCls:`.${d}`},b),C=t(E,{hashId:s,prefixCls:o,rootPrefixCls:d,iconPrefixCls:c,overrideComponentToken:y});return g(e,b),[(r==null?void 0:r.resetStyle)===!1?null:u4(i,o),C]}),s]}}const Sy="{}".NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Vl=!0;function Hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Sy)return Object.assign.apply(Object,[{}].concat(t));Vl=!1;const r={};return t.forEach(o=>{Object.keys(o).forEach(i=>{Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:()=>o[i]})})}),Vl=!0,r}function f4(){}function p4(e){let t,n=e,r=f4;return Sy&&(t=new Set,n=new Proxy(e,{get(o,a){return Vl&&t.add(a),o[a]}}),r=(o,a)=>{Array.from(t)}),{token:n,keys:t,flush:r}}function h4(e,t){return L3.reduce((n,r)=>{const o=e[`${r}1`],a=e[`${r}3`],i=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{})}const g4=uy(r4),xy={token:Qi,hashed:!0},Cy=v.createContext(xy);function bu(){const{token:e,hashed:t,theme:n,components:r}=v.useContext(Cy),o=`${I3}-${t||""}`,a=n||g4,[i,s]=GL(a,[Qi,e],{salt:o,override:Object.assign({override:e},r),formatToken:a4});return[a,i,t?s:""]}const v4=`-ant-${Date.now()}-${Math.random()}`;function m4(e,t){const n={},r=(i,s)=>{let l=i.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(i,s)=>{const l=new Rt(i),c=Zr(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const i=new Rt(t.primaryColor),s=Zr(i.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(i,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(i,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(i,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(i,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(i,c=>c.setAlpha(c.getAlpha()*.12));const l=new Rt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
221
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}function Ja(e){var t=W.useRef(!1),n=W.useState(e),r=Ce(n,2),o=r[0],a=r[1];W.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,l){l&&t.current||a(s)}return[o,i]}const by="anticon",u4=(e,t)=>t||(e?`ant-${e}`:"ant"),ca=W.createContext({getPrefixCls:u4,iconPrefixCls:by}),d4=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),f4=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),p4=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},[`&:active,
222
+ &:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),h4=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}};function g4(e,t,n,r){return o=>{const[a,i,s]=vu(),{getPrefixCls:l,iconPrefixCls:c,csp:u}=g.useContext(ca),d=l(),f={theme:a,token:i,hashId:s,nonce:()=>u==null?void 0:u.nonce};return Il(Object.assign(Object.assign({},f),{path:["Shared",d]}),()=>[{"&":p4(i)}]),[Il(Object.assign(Object.assign({},f),{path:[e,o,c]}),()=>{const{token:p,flush:h}=m4(i),m=Object.assign({},i[e]);if(r!=null&&r.deprecatedTokens){const{deprecatedTokens:v}=r;v.forEach(O=>{let[C,R]=O;var N;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Mn(!(m!=null&&m[C]),`The token '${String(C)}' of ${e} had deprecated, use '${String(R)}' instead.`),(m!=null&&m[C]||m!=null&&m[R])&&((N=m[R])!==null&&N!==void 0||(m[R]=m==null?void 0:m[C]))})}const b=typeof n=="function"?n(zl(p,m??{})):n,y=Object.assign(Object.assign({},b),m),S=`.${o}`,E=zl(p,{componentCls:S,prefixCls:o,iconCls:`.${c}`,antCls:`.${d}`},y),x=t(E,{hashId:s,prefixCls:o,rootPrefixCls:d,iconPrefixCls:c,overrideComponentToken:m});return h(e,y),[(r==null?void 0:r.resetStyle)===!1?null:h4(i,o),x]}),s]}}const wy="{}".NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Bl=!0;function zl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!wy)return Object.assign.apply(Object,[{}].concat(t));Bl=!1;const r={};return t.forEach(o=>{Object.keys(o).forEach(i=>{Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:()=>o[i]})})}),Bl=!0,r}function v4(){}function m4(e){let t,n=e,r=v4;return wy&&(t=new Set,n=new Proxy(e,{get(o,a){return Bl&&t.add(a),o[a]}}),r=(o,a)=>{Array.from(t)}),{token:n,keys:t,flush:r}}function y4(e,t){return F3.reduce((n,r)=>{const o=e[`${r}1`],a=e[`${r}3`],i=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{})}const b4=cy(s4),Sy={token:Gi,hashed:!0},xy=g.createContext(Sy);function vu(){const{token:e,hashed:t,theme:n,components:r}=g.useContext(xy),o=`${V3}-${t||""}`,a=n||b4,[i,s]=XL(a,[Gi,e],{salt:o,override:Object.assign({override:e},r),formatToken:c4});return[a,i,t?s:""]}const w4=`-ant-${Date.now()}-${Math.random()}`;function S4(e,t){const n={},r=(i,s)=>{let l=i.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(i,s)=>{const l=new wt(i),c=Hr(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const i=new wt(t.primaryColor),s=Hr(i.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(i,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(i,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(i,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(i,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(i,c=>c.setAlpha(c.getAlpha()*.12));const l=new wt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
241
223
  :root {
242
224
  ${Object.keys(n).map(i=>`--${e}-${i}: ${n[i]};`).join(`
243
225
  `)}
244
226
  }
245
- `.trim()}function y4(e,t){const n=m4(e,t);cn()?Yo(n,`${v4}-dynamic-theme`):"{}".NODE_ENV!=="production"&&xa(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Ul=q.createContext(!1),b4=e=>{let{children:t,disabled:n}=e;const r=q.useContext(Ul);return x(Ul.Provider,{value:n??r,children:t})},w4=Ul,S4=e=>{const t=v.useContext(Zi);return v.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},x4=S4,Oy=q.createContext(void 0),C4=e=>{let{children:t,size:n}=e;const r=x4(n);return x(Oy.Provider,{value:r,children:t})},Zi=Oy;function O4(){const e=v.useContext(w4),t=v.useContext(Zi);return{componentDisabled:e,componentSize:t}}function _4(e,t){const n=e||{},r=n.inherit===!1||!t?xy:t;return Jm(()=>{if(!e)return t;const a=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(i=>{a[i]=Object.assign(Object.assign({},a[i]),e.components[i])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:a})},[n,r],(a,i)=>a.some((s,l)=>{const c=i[l];return!xL(s,c,!0)}))}function E4(e){return e instanceof HTMLElement||e instanceof SVGElement}function R4(e){return E4(e)?e:e instanceof v.Component?rn.findDOMNode(e):null}var Wl={exports:{}},ye={};/** @license React v16.13.1
227
+ `.trim()}function x4(e,t){const n=S4(e,t);en()?Do(n,`${w4}-dynamic-theme`):"{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Vl=W.createContext(!1),C4=e=>{let{children:t,disabled:n}=e;const r=W.useContext(Vl);return w(Vl.Provider,{value:n??r,children:t})},O4=Vl,E4=e=>{const t=g.useContext(Ki);return g.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},_4=E4,Cy=W.createContext(void 0),R4=e=>{let{children:t,size:n}=e;const r=_4(n);return w(Cy.Provider,{value:r,children:t})},Ki=Cy;function N4(){const e=g.useContext(O4),t=g.useContext(Ki);return{componentDisabled:e,componentSize:t}}function T4(e,t){const n=e||{},r=n.inherit===!1||!t?Sy:t;return Xm(()=>{if(!e)return t;const a=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(i=>{a[i]=Object.assign(Object.assign({},a[i]),e.components[i])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:a})},[n,r],(a,i)=>a.some((s,l)=>{const c=i[l];return!_L(s,c,!0)}))}function P4(e){return e instanceof HTMLElement||e instanceof SVGElement}function k4(e){return P4(e)?e:e instanceof g.Component?Lt.findDOMNode(e):null}var Fl={exports:{}},he={};/** @license React v16.13.1
246
228
  * react-is.production.min.js
247
229
  *
248
230
  * Copyright (c) Facebook, Inc. and its affiliates.
249
231
  *
250
232
  * This source code is licensed under the MIT license found in the
251
233
  * LICENSE file in the root directory of this source tree.
252
- */var $p;function N4(){if($p)return ye;$p=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(m){if(typeof m=="object"&&m!==null){var _=m.$$typeof;switch(_){case t:switch(m=m.type,m){case l:case c:case r:case a:case o:case d:return m;default:switch(m=m&&m.$$typeof,m){case s:case u:case g:case p:case i:return m;default:return _}}case n:return _}}}function C(m){return E(m)===c}return ye.AsyncMode=l,ye.ConcurrentMode=c,ye.ContextConsumer=s,ye.ContextProvider=i,ye.Element=t,ye.ForwardRef=u,ye.Fragment=r,ye.Lazy=g,ye.Memo=p,ye.Portal=n,ye.Profiler=a,ye.StrictMode=o,ye.Suspense=d,ye.isAsyncMode=function(m){return C(m)||E(m)===l},ye.isConcurrentMode=C,ye.isContextConsumer=function(m){return E(m)===s},ye.isContextProvider=function(m){return E(m)===i},ye.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ye.isForwardRef=function(m){return E(m)===u},ye.isFragment=function(m){return E(m)===r},ye.isLazy=function(m){return E(m)===g},ye.isMemo=function(m){return E(m)===p},ye.isPortal=function(m){return E(m)===n},ye.isProfiler=function(m){return E(m)===a},ye.isStrictMode=function(m){return E(m)===o},ye.isSuspense=function(m){return E(m)===d},ye.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===c||m===a||m===o||m===d||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===g||m.$$typeof===p||m.$$typeof===i||m.$$typeof===s||m.$$typeof===u||m.$$typeof===w||m.$$typeof===b||m.$$typeof===S||m.$$typeof===y)},ye.typeOf=E,ye}var be={};/** @license React v16.13.1
234
+ */var jp;function j4(){if(jp)return he;jp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var O=v.$$typeof;switch(O){case t:switch(v=v.type,v){case l:case c:case r:case a:case o:case d:return v;default:switch(v=v&&v.$$typeof,v){case s:case u:case h:case p:case i:return v;default:return O}}case n:return O}}}function x(v){return E(v)===c}return he.AsyncMode=l,he.ConcurrentMode=c,he.ContextConsumer=s,he.ContextProvider=i,he.Element=t,he.ForwardRef=u,he.Fragment=r,he.Lazy=h,he.Memo=p,he.Portal=n,he.Profiler=a,he.StrictMode=o,he.Suspense=d,he.isAsyncMode=function(v){return x(v)||E(v)===l},he.isConcurrentMode=x,he.isContextConsumer=function(v){return E(v)===s},he.isContextProvider=function(v){return E(v)===i},he.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},he.isForwardRef=function(v){return E(v)===u},he.isFragment=function(v){return E(v)===r},he.isLazy=function(v){return E(v)===h},he.isMemo=function(v){return E(v)===p},he.isPortal=function(v){return E(v)===n},he.isProfiler=function(v){return E(v)===a},he.isStrictMode=function(v){return E(v)===o},he.isSuspense=function(v){return E(v)===d},he.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===a||v===o||v===d||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===p||v.$$typeof===i||v.$$typeof===s||v.$$typeof===u||v.$$typeof===b||v.$$typeof===y||v.$$typeof===S||v.$$typeof===m)},he.typeOf=E,he}var ge={};/** @license React v16.13.1
253
235
  * react-is.development.js
254
236
  *
255
237
  * Copyright (c) Facebook, Inc. and its affiliates.
256
238
  *
257
239
  * This source code is licensed under the MIT license found in the
258
240
  * LICENSE file in the root directory of this source tree.
259
- */var Ip;function T4(){return Ip||(Ip=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(V){return typeof V=="string"||typeof V=="function"||V===r||V===c||V===a||V===o||V===d||V===f||typeof V=="object"&&V!==null&&(V.$$typeof===g||V.$$typeof===p||V.$$typeof===i||V.$$typeof===s||V.$$typeof===u||V.$$typeof===w||V.$$typeof===b||V.$$typeof===S||V.$$typeof===y)}function C(V){if(typeof V=="object"&&V!==null){var qe=V.$$typeof;switch(qe){case t:var Be=V.type;switch(Be){case l:case c:case r:case a:case o:case d:return Be;default:var Ce=Be&&Be.$$typeof;switch(Ce){case s:case u:case g:case p:case i:return Ce;default:return qe}}case n:return qe}}}var m=l,_=c,O=s,N=i,T=t,P=u,M=r,D=g,I=p,A=n,j=a,L=o,H=d,ie=!1;function ne(V){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),he(V)||C(V)===l}function he(V){return C(V)===c}function $(V){return C(V)===s}function z(V){return C(V)===i}function J(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function re(V){return C(V)===u}function de(V){return C(V)===r}function fe(V){return C(V)===g}function He(V){return C(V)===p}function _e(V){return C(V)===n}function $e(V){return C(V)===a}function oe(V){return C(V)===o}function Ie(V){return C(V)===d}be.AsyncMode=m,be.ConcurrentMode=_,be.ContextConsumer=O,be.ContextProvider=N,be.Element=T,be.ForwardRef=P,be.Fragment=M,be.Lazy=D,be.Memo=I,be.Portal=A,be.Profiler=j,be.StrictMode=L,be.Suspense=H,be.isAsyncMode=ne,be.isConcurrentMode=he,be.isContextConsumer=$,be.isContextProvider=z,be.isElement=J,be.isForwardRef=re,be.isFragment=de,be.isLazy=fe,be.isMemo=He,be.isPortal=_e,be.isProfiler=$e,be.isStrictMode=oe,be.isSuspense=Ie,be.isValidElementType=E,be.typeOf=C}()),be}"{}".NODE_ENV==="production"?Wl.exports=N4():Wl.exports=T4();var P4=Wl.exports;function k4(e,t){typeof e=="function"?e(t):Te(e)==="object"&&e&&"current"in e&&(e.current=t)}function j4(e){var t,n,r=P4.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}var M4=["children"],_y=q.createContext({});function A4(e){var t=e.children,n=Lr(e,M4);return x(_y.Provider,{value:n,children:t})}function D4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ey(e){var t=D4();return function(){var r=Lt(e),o;if(t){var a=Lt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return uo(this,o)}}var $4=function(e){co(n,e);var t=Ey(n);function n(){return dt(this,n),t.apply(this,arguments)}return ft(n,[{key:"render",value:function(){return this.props.children}}]),n}(q.Component),Qn="none",qa="appear",Ya="enter",Xa="leave",Lp="none",Ut="prepare",Ar="start",Dr="active",wu="end",Ry="prepared";function Bp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function I4(e,t){var n={animationend:Bp("Animation","AnimationEnd"),transitionend:Bp("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var L4=I4(cn(),typeof window<"u"?window:{}),Ny={};if(cn()){var B4=document.createElement("div");Ny=B4.style}var Ja={};function Ty(e){if(Ja[e])return Ja[e];var t=L4[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Ny)return Ja[e]=t[a],Ja[e]}return""}var Py=Ty("animationend"),ky=Ty("transitionend"),jy=!!(Py&&ky),zp=Py||"animationend",Fp=ky||"transitionend";function Vp(e,t){if(!e)return null;if(Te(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const z4=function(e){var t=v.useRef(),n=v.useRef(e);n.current=e;var r=q.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(Fp,r),i.removeEventListener(zp,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(Fp,r),i.addEventListener(zp,r),t.current=i)}return q.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var My=cn()?v.useLayoutEffect:v.useEffect,Ay=function(t){return+setTimeout(t,16)},Dy=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(Ay=function(t){return window.requestAnimationFrame(t)},Dy=function(t){return window.cancelAnimationFrame(t)});var Hp=0,Su=new Map;function $y(e){Su.delete(e)}var Gl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Hp+=1;var r=Hp;function o(a){if(a===0)$y(r),t();else{var i=Ay(function(){o(a-1)});Su.set(r,i)}}return o(n),r};Gl.cancel=function(e){var t=Su.get(e);return $y(t),Dy(t)};const F4=function(){var e=q.useRef(null);function t(){Gl.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Gl(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return q.useEffect(function(){return function(){t()}},[]),[n,t]};var V4=[Ut,Ar,Dr,wu],H4=[Ut,Ry],Iy=!1,U4=!0;function Ly(e){return e===Dr||e===wu}const W4=function(e,t,n){var r=oi(Lp),o=Ne(r,2),a=o[0],i=o[1],s=F4(),l=Ne(s,2),c=l[0],u=l[1];function d(){i(Ut,!0)}var f=t?H4:V4;return My(function(){if(a!==Lp&&a!==wu){var p=f.indexOf(a),g=f[p+1],y=n(a);y===Iy?i(g,!0):g&&c(function(w){function b(){w.isCanceled()||i(g,!0)}y===!0?b():Promise.resolve(y).then(b)})}},[e,a]),q.useEffect(function(){return function(){u()}},[]),[d,a]};function G4(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,g=r.onLeavePrepare,y=r.onAppearStart,w=r.onEnterStart,b=r.onLeaveStart,S=r.onAppearActive,E=r.onEnterActive,C=r.onLeaveActive,m=r.onAppearEnd,_=r.onEnterEnd,O=r.onLeaveEnd,N=r.onVisibleChanged,T=oi(),P=Ne(T,2),M=P[0],D=P[1],I=oi(Qn),A=Ne(I,2),j=A[0],L=A[1],H=oi(null),ie=Ne(H,2),ne=ie[0],he=ie[1],$=v.useRef(!1),z=v.useRef(null);function J(){return n()}var re=v.useRef(!1);function de(){L(Qn,!0),he(null,!0)}function fe(xe){var we=J();if(!(xe&&!xe.deadline&&xe.target!==we)){var Pe=re.current,ze;j===qa&&Pe?ze=m==null?void 0:m(we,xe):j===Ya&&Pe?ze=_==null?void 0:_(we,xe):j===Xa&&Pe&&(ze=O==null?void 0:O(we,xe)),j!==Qn&&Pe&&ze!==!1&&de()}}var He=z4(fe),_e=Ne(He,1),$e=_e[0],oe=function(we){var Pe,ze,Mt;switch(we){case qa:return Pe={},pe(Pe,Ut,f),pe(Pe,Ar,y),pe(Pe,Dr,S),Pe;case Ya:return ze={},pe(ze,Ut,p),pe(ze,Ar,w),pe(ze,Dr,E),ze;case Xa:return Mt={},pe(Mt,Ut,g),pe(Mt,Ar,b),pe(Mt,Dr,C),Mt;default:return{}}},Ie=q.useMemo(function(){return oe(j)},[j]),V=W4(j,!e,function(xe){if(xe===Ut){var we=Ie[Ut];return we?we(J()):Iy}if(Ce in Ie){var Pe;he(((Pe=Ie[Ce])===null||Pe===void 0?void 0:Pe.call(Ie,J(),null))||null)}return Ce===Dr&&($e(J()),u>0&&(clearTimeout(z.current),z.current=setTimeout(function(){fe({deadline:!0})},u))),Ce===Ry&&de(),U4}),qe=Ne(V,2),Be=qe[0],Ce=qe[1],nt=Ly(Ce);re.current=nt,My(function(){D(t);var xe=$.current;$.current=!0;var we;!xe&&t&&s&&(we=qa),xe&&t&&a&&(we=Ya),(xe&&!t&&c||!xe&&d&&!t&&c)&&(we=Xa);var Pe=oe(we);we&&(e||Pe[Ut])?(L(we),Be()):L(Qn)},[t]),v.useEffect(function(){(j===qa&&!s||j===Ya&&!a||j===Xa&&!c)&&L(Qn)},[s,a,c]),v.useEffect(function(){return function(){$.current=!1,clearTimeout(z.current)}},[]);var kt=q.useRef(!1);v.useEffect(function(){M&&(kt.current=!0),M!==void 0&&j===Qn&&((kt.current||M)&&(N==null||N(M)),kt.current=!0)},[M,j]);var jt=ne;return Ie[Ut]&&Ce===Ar&&(jt=G({transition:"none"},jt)),[j,Ce,jt,M??t]}function K4(e){var t=e;Te(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=q.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,g=o.eventProps,y=q.useContext(_y),w=y.motion,b=n(o,w),S=v.useRef(),E=v.useRef();function C(){try{return S.current instanceof HTMLElement?S.current:R4(E.current)}catch{return null}}var m=G4(b,s,C,o),_=Ne(m,4),O=_[0],N=_[1],T=_[2],P=_[3],M=q.useRef(P);P&&(M.current=!0);var D=q.useCallback(function(he){S.current=he,k4(a,he)},[a]),I,A=G(G({},g),{},{visible:s});if(!d)I=null;else if(O===Qn)P?I=d(G({},A),D):!c&&M.current&&p?I=d(G(G({},A),{},{className:p}),D):u||!c&&!p?I=d(G(G({},A),{},{style:{display:"none"}}),D):I=null;else{var j,L;N===Ut?L="prepare":Ly(N)?L="active":N===Ar&&(L="start");var H=Vp(f,"".concat(O,"-").concat(L));I=d(G(G({},A),{},{className:tc(Vp(f,O),(j={},pe(j,H,H&&L),pe(j,f,typeof f=="string"),j)),style:T}),D)}if(q.isValidElement(I)&&j4(I)){var ie=I,ne=ie.ref;ne||(I=q.cloneElement(I,{ref:D}))}return x($4,{ref:E,children:I})});return r.displayName="CSSMotion",r}const q4=K4(jy);var Kl="add",ql="keep",Yl="remove",Vs="removed";function Y4(e){var t;return e&&Te(e)==="object"&&"key"in e?t=e:t={key:e},G(G({},t),{},{key:String(t.key)})}function Xl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Y4)}function X4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=Xl(e),i=Xl(t);a.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=i[d];if(f.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(p){return G(G({},p),{},{status:Kl})})),r=d),n.push(G(G({},f),{},{status:ql})),r+=1,u=!0;break}}u||n.push(G(G({},c),{},{status:Yl}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return G(G({},c),{},{status:Kl})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Yl}),n.forEach(function(u){u.key===c&&(u.status=ql)})}),n}var J4=["component","children","onVisibleChanged","onAllRemoved"],Q4=["status"],Z4=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function e5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q4,n=function(r){co(a,r);var o=Ey(a);function a(){var i;dt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),pe(an(i),"state",{keyEntities:[]}),pe(an(i),"removeKey",function(u){var d=i.state.keyEntities,f=d.map(function(p){return p.key!==u?p:G(G({},p),{},{status:Vs})});return i.setState({keyEntities:f}),f.filter(function(p){var g=p.status;return g!==Vs}).length}),i}return ft(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged,p=c.onAllRemoved,g=Lr(c,J4),y=u||q.Fragment,w={};return Z4.forEach(function(b){w[b]=g[b],delete g[b]}),delete g.keys,x(y,{...g,children:l.map(function(b){var S=b.status,E=Lr(b,Q4),C=S===Kl||S===ql;return v.createElement(t,{...w,key:E.key,visible:C,eventProps:E,onVisibleChanged:function(_){if(f==null||f(_,{key:E.key}),!_){var O=s.removeKey(E.key);O===0&&p&&p()}}},d)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Xl(c),f=X4(u,d);return{keyEntities:f.filter(function(p){var g=u.find(function(y){var w=y.key;return p.key===w});return!(g&&g.status===Vs&&p.status===Yl)})}}}]),a}(q.Component);return pe(n,"defaultProps",{component:"div"}),n}e5(jy);function t5(e){const{children:t}=e,[,n]=bu(),{motion:r}=n,o=q.useRef(!1);return o.current=o.current||r===!1,o.current?x(A4,{motion:r,children:t}):t}const n5=(e,t)=>{const[n,r]=bu();return zl({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},l4()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},r5=n5;var o5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const a5=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],i5="ant";let By;function s5(){return By||i5}function l5(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const c5=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(By=t),r&&l5(r)&&("{}".NODE_ENV!=="production"&&xa(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),y4(s5(),r))},u5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,form:o,locale:a,componentSize:i,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,popupMatchSelectWidth:d,popupOverflow:f,legacyLocale:p,parentContext:g,iconPrefixCls:y,theme:w,componentDisabled:b}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&xa(u===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const S=q.useCallback((j,L)=>{const{prefixCls:H}=e;if(L)return L;const ie=H||g.getPrefixCls("");return j?`${ie}-${j}`:ie},[g.getPrefixCls,e.prefixCls]),E=y||g.iconPrefixCls||wy,C=E!==g.iconPrefixCls,m=n||g.csp,_=r5(E,m),O=_4(w,g.theme),N={csp:m,autoInsertSpaceInButton:r,locale:a||p,direction:s,space:l,virtual:c,popupMatchSelectWidth:d??u,popupOverflow:f,getPrefixCls:S,iconPrefixCls:E,theme:O},T=Object.assign({},g);Object.keys(N).forEach(j=>{N[j]!==void 0&&(T[j]=N[j])}),a5.forEach(j=>{const L=e[j];L&&(T[j]=L)});const P=Jm(()=>T,T,(j,L)=>{const H=Object.keys(j),ie=Object.keys(L);return H.length!==ie.length||H.some(ne=>j[ne]!==L[ne])}),M=q.useMemo(()=>({prefixCls:E,csp:m}),[E,m]);let D=C?_(t):t;const I=q.useMemo(()=>{var j,L,H;return R3(((j=yu.Form)===null||j===void 0?void 0:j.defaultValidateMessages)||{},((H=(L=P.locale)===null||L===void 0?void 0:L.Form)===null||H===void 0?void 0:H.defaultValidateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[P,o==null?void 0:o.validateMessages]);Object.keys(I).length>0&&(D=x(T3.Provider,{value:I,children:t})),a&&(D=x($3,{locale:a,_ANT_MARK__:gy,children:D})),(E||m)&&(D=x(O3.Provider,{value:M,children:D})),i&&(D=x(C4,{size:i,children:D})),D=x(t5,{children:D});const A=q.useMemo(()=>{const j=O||{},{algorithm:L,token:H}=j,ie=o5(j,["algorithm","token"]),ne=L&&(!Array.isArray(L)||L.length>0)?uy(L):void 0;return Object.assign(Object.assign({},ie),{theme:ne,token:Object.assign(Object.assign({},Qi),H)})},[O]);return w&&(D=x(Cy.Provider,{value:A,children:D})),b!==void 0&&(D=x(b4,{disabled:b,children:D})),x(Ca.Provider,{value:P,children:D})},bo=e=>{const t=q.useContext(Ca),n=q.useContext(hy);return x(u5,{...Object.assign({parentContext:t,legacyLocale:n},e)})};bo.ConfigContext=Ca;bo.SizeContext=Zi;bo.config=c5;bo.useConfig=O4;Object.defineProperty(bo,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&xa(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Zi)});"{}".NODE_ENV!=="production"&&(bo.displayName="ConfigProvider");function d5(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Qa=(e,t,n)=>{const r=d5(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},f5=e=>h4(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),p5=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},s4(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},h5=d4("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=Hl(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[p5(a),f5(a),Qa(a,"success","Success"),Qa(a,"processing","Info"),Qa(a,"error","Error"),Qa(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var g5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const v5=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=g5(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=q.useContext(Ca),l=p=>{o==null||o(!r),a==null||a(p)},c=s("tag",t),[u,d]=h5(c),f=tc(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:r},n,d);return u(x("span",{...Object.assign({},i,{className:f,onClick:l})}))},m5=v5,y5="_cssFieldBox_4b8an_2",b5="_inputAuto_4b8an_20",w5="_active_4b8an_23",S5="_cssBox_4b8an_27",Pr={cssFieldBox:y5,inputAuto:b5,active:w5,cssBox:S5},x5=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Hs=$6.map(e=>({value:e})),Up=v.forwardRef(function(t,n){const[r,o]=v.useState(""),[a,i]=v.useState(""),{mode:s="edit"}=t,l=v.useMemo(()=>s==="create",[s]),[c,u]=v.useState({key:t.value.key,value:t.value.value});v.useEffect(()=>{u(t.value)},[t.value]);const[d,f]=v.useState(Hs),[p,g]=v.useState([]),[y,w]=v.useState([]),b=A=>{const j=Hs.filter(L=>L.value.includes(A));f(A?j:Hs)},S=()=>{var L;let A=[];const j=qm[c.key];j&&(A=((L=j.values)==null?void 0:L.map(H=>({value:H})))||[]),g(A),w(A)},E=A=>{const j=y.filter(L=>L.value.includes(A));g(A?j:y)},C=()=>t.allValues.find(A=>A.key===c.key)?(Z.message.error(`${c.key} is exits`),o("error"),!1):!0,m=()=>{var A;l?c.value?(A=t.onCreate)==null||A.call(t,c):i("error"):O()},_=()=>{o(""),i(""),t.onValueChange({...c})},{run:O}=uu(_,{wait:20}),[N,T]=v.useState(0);v.useEffect(()=>{x5(c.key,13.33).then(A=>{let j=parseFloat(A);c.key===""&&(j=200),T(j+6)})},[c.key]);const P=v.useRef(null),M=v.useRef(null),[D,I]=v.useState({key:!1,value:!1});return v.useImperativeHandle(n,()=>({reset:()=>{var A;u({key:"",value:""}),(A=M.current)==null||A.focus()}}),[]),se("div",{className:Pr.cssFieldBox,children:[x(Z.AutoComplete,{ref:M,bordered:!1,disabled:!l,onSearch:b,status:r,popupMatchSelectWidth:200,value:c.key,onChange:A=>{u({...c,key:A}),o("")},style:{width:`${N}px`},className:yt([l&&Pr.inputAuto,l&&D.key&&Pr.active]),onFocus:()=>{I({key:!0,value:!1})},onBlur:()=>{I({key:!1,value:!1}),C()},onKeyDown:A=>{var j;A.code==="Enter"&&C()&&((j=P.current)==null||j.focus())},placeholder:"property",options:d}),x("span",{children:":"}),x(Z.AutoComplete,{bordered:!1,ref:P,status:a,popupMatchSelectWidth:200,value:c.value,onChange:A=>{var j;S(),u({...c,value:A}),i(""),l||((j=t.onCreate)==null||j.call(t,c),O())},style:{flex:1},onFocus:()=>{I({key:!1,value:!0})},onBlur:()=>{I({key:!1,value:!1}),O()},className:yt([Pr.inputAuto,D.value&&Pr.active]),placeholder:"value",onSearch:E,options:p,onKeyDown:A=>{A.code==="Enter"&&m()}}),t.onDelete&&s==="edit"&&x(Z.Button,{size:"small",type:"text",onClick:()=>{var A;(A=t.onDelete)==null||A.call(t)},children:x(Nh,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&x("div",{children:x(Z.Button,{size:"small",type:"text",icon:x(ac,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:m})})]})}),Wp=v.forwardRef(function(t,n){const[r,o]=v.useState([]);v.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),v.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=v.useState({key:"",value:""}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=v.useRef(null);return x(Z.ConfigProvider,{theme:{token:{borderRadius:4}},children:se("div",{className:Pr.cssBox,children:[r.map((c,u)=>x("div",{children:x(Up,{mode:"edit",allValues:r,value:c,onValueChange:d=>{r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),x(Up,{allValues:r,mode:"create",value:a,ref:l,onCreate:c=>{var u;if(c.key&&c.value){const d=r.filter(f=>f.key!==c.key);d.push(c),o(d),s(d),(u=l.current)==null||u.reset(),i({key:"",value:""})}},onValueChange:c=>{i(c)}})]})})}),C5="_stateTag_5a8hc_2",O5="_stateTagClose_5a8hc_5",Gp={stateTag:C5,stateTagClose:O5},_5=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Kp=_5.map(e=>({key:e,label:e})),E5=e=>{const[t,n]=v.useState("normal"),[r]=v.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=v.useRef({}),a=w=>{n(w)},[i,s]=v.useState(["normal"]),l=v.useMemo(()=>Kp.filter(w=>!i.includes(w.key)),[i]),c=v.useMemo(()=>Kp.filter(w=>i.includes(w.key)),[i]),[u,d]=v.useState(e.initialValue??{});v.useEffect(()=>{const w=Object.keys(u);s(w)},[u]);const f=v.useMemo(()=>{const w=u==null?void 0:u[t];if(!w)return{};const b={};return Object.keys(w).forEach(S=>{b[S]=li(w[S]||{}).normalProperty}),b},[t,u]),p=v.useCallback(()=>{Object.keys(o.current).forEach(w=>{var E;const b=(E=o.current)==null?void 0:E[w],S=f[w]||[];b&&b.setValue(S)})},[f]),g=v.useRef();g.current=p,e.handler&&(e.handler.current={setValue:async w=>{var b;d(w),await Bn(),(b=g.current)==null||b.call(g)}}),v.useEffect(()=>{p()},[t]);const y=v.useCallback((w,b)=>{var E;const S={...u,[t]:{...u[t]||{},[w]:ic(b)}};(E=e.onValueChange)==null||E.call(e,S)},[u,t]);return x(tt,{children:se(Z.Card,{size:"small",type:"inner",title:x("span",{style:{fontSize:"12px"},children:"CSS"}),extra:x(Z.Dropdown,{menu:{items:l,onClick:w=>{s(b=>[...b,w.key])}},children:x(ac,{})}),children:[x(Z.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(w=>{const b=t.includes(w.key);return se(m5,{style:{border:b?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:b,onChange:()=>a(w.key),className:Gp.stateTag,children:[w.label,w.key!=="normal"&&x(j0,{className:Gp.stateTagClose,onClick:S=>{S.stopPropagation(),S.preventDefault(),s(E=>E.filter(C=>C!==w.key)),n("normal")}})]},w.key)})}),x(Z.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:x("span",{children:"Normal"}),children:x(Wp,{ref:w=>{o.current.normal=w},onValueChange:w=>y("normal",w),initialValue:f.normal})},...r.map(w=>({key:w.key,label:x("span",{children:w.label}),children:x(Wp,{ref:b=>{o.current[w.key]=b},onValueChange:b=>y(w.key,b)})}))]})]})})},R5=e=>{const t=v.useRef(null),n=e.node;if(!n)return x(tt,{});const r=v.useRef(null),o=v.useRef(null),[a,i]=v.useState({}),s=v.useMemo(()=>li(a),[a]),l=v.useRef();v.useEffect(()=>{const d=()=>{var w,b,S;l.current=n;const f=n.value.style||{};i(f);const{normalProperty:p,expressionProperty:g}=li(f);(w=r.current)==null||w.setValue(p),(b=t.current)==null||b.setValue(g);const y=Dh(n.value.css);(S=o.current)==null||S.setValue(y)};d(),n.emitter.on("onNodeChange",d),n.emitter.on("onReloadPage",d)},[n]);const c=d=>{const f=ic([...d]);i(f),n.value.style=f,n.updateValue()},u=d=>{n.value.css=Ah(`c_${n.id}`,d),n.updateValue()};return se("div",{className:mp.visualPanelBox,children:[x("div",{style:{marginBottom:"10px"},children:x(bL,{onValueChange:d=>{n.value.classNames=d,n.updateValue()}})}),x(Z.Collapse,{defaultActiveKey:["origin-css-edit"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"origin-css-edit",label:x("span",{className:mp.header,children:"Style Variable Bind"}),children:x(mL,{ref:t,initialValue:s.expressionProperty,onValueChange:d=>{c([...s.normalProperty,...d])}})}]}),x(E5,{handler:o,onValueChange:u})]})},N5={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t})=>x(R5,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class T5 extends v.Component{constructor(n){super(n);F(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});F(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});F(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});F(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});F(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},d=a.filter(p=>p.show===void 0?!0:p.show(u)),f=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];d.concat(f),i={panels:a,displayPanels:d}}else i={panels:a,displayPanels:[]};return this.setState(i),i});F(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(d=>d.show===void 0?!0:d.show(i)),l=((u=s.find((d,f)=>f===0))==null?void 0:u.key)||"";s.find(d=>d.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[Y6,N5,J6,nL],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return x("div",{style:{overflow:"hidden"},children:x(Z.Empty,{image:Z.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a};return x("div",{className:oL.rightPanelContainer,children:x(Z.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:x("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const P5="RightPanel",zy=e=>{const t=v.createRef();return{name:P5,async init(n){n.getWorkbench().replaceRightView(x(T5,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},k5={pluginName:"全局状态"},j5={pluginName:"Global State"},qp={zh_CN:k5,en_US:j5},M5="_box_tl0hm_2",A5={box:M5},Jl="GlobalState",Us=`plugin:${Jl}`,D5=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=v.useRef(null);v.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return x("div",{className:A5.box,children:x(Sa,{language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},Fy={name:Jl,async init(e){const{i18n:t}=e;Object.keys(qp).forEach(a=>{t.addResourceBundle(a,Us,qp[a],!0,!0)});const n=Kr(Us)(D5),r=Kr(Us)(({t:a})=>x(tt,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:x(r,{}),name:Jl,icon:x(b0,{}),render:x(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},$5=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=v.useState(!1),a=v.useRef(null);return se(tt,{children:[x("div",{onClick:()=>{o(!0)},children:e.children}),x(Z.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var d;o(!1);const i=(d=a.current)==null?void 0:d.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await Bn();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:x("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:x(Sa,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},I5="History",Vy=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await Bn())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=Bf(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=Bf(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:I5,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},L5=[Gv,sD,Hv,Fy,zy,Vy],B5=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Hv,DEFAULT_PLUGIN_LIST:L5,DesignerPlugin:Gv,DisplaySourceSchema:$5,GlobalStatePanelPlugin:Fy,HistoryPlugin:Vy,RightPanelPlugin:zy},Symbol.toStringTag,{value:"Module"})),xn={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},Rr={name:"width",title:"宽度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},Nr={name:"height",title:"高度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},z5=Oe.HTMl_TAGS.map(e=>({title:Dv(e),componentName:e,props:[xn],snippets:[]})),F5=[{title:"块",componentName:"CBlock",props:[Rr,Nr,{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},xn],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[Rr,Nr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},xn],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},Rr,Nr,xn],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{props:{width:"300px",height:"150px"}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},Rr,Nr,xn],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>x(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{width:"300px",height:"150px",src:"https://vjs.zencdn.net/v/oceans.mp4"}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},Rr,Nr,xn],advanceCustom:{wrapComponent:()=>e=>x("div",{style:{display:"inline-block",fontSize:0},children:x("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},xn],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[Rr,Nr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},xn],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
241
+ */var Mp;function M4(){return Mp||(Mp=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===a||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===h||z.$$typeof===p||z.$$typeof===i||z.$$typeof===s||z.$$typeof===u||z.$$typeof===b||z.$$typeof===y||z.$$typeof===S||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var Xe=z.$$typeof;switch(Xe){case t:var Le=z.type;switch(Le){case l:case c:case r:case a:case o:case d:return Le;default:var $e=Le&&Le.$$typeof;switch($e){case s:case u:case h:case p:case i:return $e;default:return Xe}}case n:return Xe}}}var v=l,O=c,C=s,R=i,N=t,T=u,k=r,j=h,L=p,M=n,P=a,D=o,F=d,ne=!1;function Z(z){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ue(z)||x(z)===l}function ue(z){return x(z)===c}function A(z){return x(z)===s}function I(z){return x(z)===i}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function te(z){return x(z)===u}function ie(z){return x(z)===r}function de(z){return x(z)===h}function we(z){return x(z)===p}function fe(z){return x(z)===n}function Ee(z){return x(z)===a}function re(z){return x(z)===o}function De(z){return x(z)===d}ge.AsyncMode=v,ge.ConcurrentMode=O,ge.ContextConsumer=C,ge.ContextProvider=R,ge.Element=N,ge.ForwardRef=T,ge.Fragment=k,ge.Lazy=j,ge.Memo=L,ge.Portal=M,ge.Profiler=P,ge.StrictMode=D,ge.Suspense=F,ge.isAsyncMode=Z,ge.isConcurrentMode=ue,ge.isContextConsumer=A,ge.isContextProvider=I,ge.isElement=G,ge.isForwardRef=te,ge.isFragment=ie,ge.isLazy=de,ge.isMemo=we,ge.isPortal=fe,ge.isProfiler=Ee,ge.isStrictMode=re,ge.isSuspense=De,ge.isValidElementType=E,ge.typeOf=x}()),ge}"{}".NODE_ENV==="production"?Fl.exports=j4():Fl.exports=M4();var A4=Fl.exports;function D4(e,t){typeof e=="function"?e(t):Oe(e)==="object"&&e&&"current"in e&&(e.current=t)}function $4(e){var t,n,r=A4.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}var I4=["children"],Oy=W.createContext({});function L4(e){var t=e.children,n=Rr(e,I4);return w(Oy.Provider,{value:n,children:t})}function B4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ey(e){var t=B4();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}var z4=function(e){Zr(n,e);var t=Ey(n);function n(){return nt(this,n),t.apply(this,arguments)}return rt(n,[{key:"render",value:function(){return this.props.children}}]),n}(W.Component),Un="none",Va="appear",Fa="enter",Ha="leave",Ap="none",It="prepare",Cr="start",Or="active",mu="end",_y="prepared";function Dp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function V4(e,t){var n={animationend:Dp("Animation","AnimationEnd"),transitionend:Dp("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var F4=V4(en(),typeof window<"u"?window:{}),Ry={};if(en()){var H4=document.createElement("div");Ry=H4.style}var Ua={};function Ny(e){if(Ua[e])return Ua[e];var t=F4[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Ry)return Ua[e]=t[a],Ua[e]}return""}var Ty=Ny("animationend"),Py=Ny("transitionend"),ky=!!(Ty&&Py),$p=Ty||"animationend",Ip=Py||"transitionend";function Lp(e,t){if(!e)return null;if(Oe(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const U4=function(e){var t=g.useRef(),n=g.useRef(e);n.current=e;var r=W.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(Ip,r),i.removeEventListener($p,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(Ip,r),i.addEventListener($p,r),t.current=i)}return W.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var jy=en()?g.useLayoutEffect:g.useEffect,My=function(t){return+setTimeout(t,16)},Ay=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(My=function(t){return window.requestAnimationFrame(t)},Ay=function(t){return window.cancelAnimationFrame(t)});var Bp=0,yu=new Map;function Dy(e){yu.delete(e)}var Hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Bp+=1;var r=Bp;function o(a){if(a===0)Dy(r),t();else{var i=My(function(){o(a-1)});yu.set(r,i)}}return o(n),r};Hl.cancel=function(e){var t=yu.get(e);return Dy(t),Ay(t)};const W4=function(){var e=W.useRef(null);function t(){Hl.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Hl(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return W.useEffect(function(){return function(){t()}},[]),[n,t]};var G4=[It,Cr,Or,mu],K4=[It,_y],$y=!1,q4=!0;function Iy(e){return e===Or||e===mu}const Y4=function(e,t,n){var r=Ja(Ap),o=Ce(r,2),a=o[0],i=o[1],s=W4(),l=Ce(s,2),c=l[0],u=l[1];function d(){i(It,!0)}var f=t?K4:G4;return jy(function(){if(a!==Ap&&a!==mu){var p=f.indexOf(a),h=f[p+1],m=n(a);m===$y?i(h,!0):h&&c(function(b){function y(){b.isCanceled()||i(h,!0)}m===!0?y():Promise.resolve(m).then(y)})}},[e,a]),W.useEffect(function(){return function(){u()}},[]),[d,a]};function X4(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,h=r.onLeavePrepare,m=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,S=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,v=r.onAppearEnd,O=r.onEnterEnd,C=r.onLeaveEnd,R=r.onVisibleChanged,N=Ja(),T=Ce(N,2),k=T[0],j=T[1],L=Ja(Un),M=Ce(L,2),P=M[0],D=M[1],F=Ja(null),ne=Ce(F,2),Z=ne[0],ue=ne[1],A=g.useRef(!1),I=g.useRef(null);function G(){return n()}var te=g.useRef(!1);function ie(){D(Un,!0),ue(null,!0)}function de(Me){var me=G();if(!(Me&&!Me.deadline&&Me.target!==me)){var Ae=te.current,Ge;P===Va&&Ae?Ge=v==null?void 0:v(me,Me):P===Fa&&Ae?Ge=O==null?void 0:O(me,Me):P===Ha&&Ae&&(Ge=C==null?void 0:C(me,Me)),P!==Un&&Ae&&Ge!==!1&&ie()}}var we=U4(de),fe=Ce(we,1),Ee=fe[0],re=function(me){var Ae,Ge,Kt;switch(me){case Va:return Ae={},ae(Ae,It,f),ae(Ae,Cr,m),ae(Ae,Or,S),Ae;case Fa:return Ge={},ae(Ge,It,p),ae(Ge,Cr,b),ae(Ge,Or,E),Ge;case Ha:return Kt={},ae(Kt,It,h),ae(Kt,Cr,y),ae(Kt,Or,x),Kt;default:return{}}},De=W.useMemo(function(){return re(P)},[P]),z=Y4(P,!e,function(Me){if(Me===It){var me=De[It];return me?me(G()):$y}if($e in De){var Ae;ue(((Ae=De[$e])===null||Ae===void 0?void 0:Ae.call(De,G(),null))||null)}return $e===Or&&(Ee(G()),u>0&&(clearTimeout(I.current),I.current=setTimeout(function(){de({deadline:!0})},u))),$e===_y&&ie(),q4}),Xe=Ce(z,2),Le=Xe[0],$e=Xe[1],vt=Iy($e);te.current=vt,jy(function(){j(t);var Me=A.current;A.current=!0;var me;!Me&&t&&s&&(me=Va),Me&&t&&a&&(me=Fa),(Me&&!t&&c||!Me&&d&&!t&&c)&&(me=Ha);var Ae=re(me);me&&(e||Ae[It])?(D(me),Le()):D(Un)},[t]),g.useEffect(function(){(P===Va&&!s||P===Fa&&!a||P===Ha&&!c)&&D(Un)},[s,a,c]),g.useEffect(function(){return function(){A.current=!1,clearTimeout(I.current)}},[]);var an=W.useRef(!1);g.useEffect(function(){k&&(an.current=!0),k!==void 0&&P===Un&&((an.current||k)&&(R==null||R(k)),an.current=!0)},[k,P]);var sn=Z;return De[It]&&$e===Cr&&(sn=H({transition:"none"},sn)),[P,$e,sn,k??t]}function J4(e){var t=e;Oe(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=W.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,h=o.eventProps,m=W.useContext(Oy),b=m.motion,y=n(o,b),S=g.useRef(),E=g.useRef();function x(){try{return S.current instanceof HTMLElement?S.current:k4(E.current)}catch{return null}}var v=X4(y,s,x,o),O=Ce(v,4),C=O[0],R=O[1],N=O[2],T=O[3],k=W.useRef(T);T&&(k.current=!0);var j=W.useCallback(function(ue){S.current=ue,D4(a,ue)},[a]),L,M=H(H({},h),{},{visible:s});if(!d)L=null;else if(C===Un)T?L=d(H({},M),j):!c&&k.current&&p?L=d(H(H({},M),{},{className:p}),j):u||!c&&!p?L=d(H(H({},M),{},{style:{display:"none"}}),j):L=null;else{var P,D;R===It?D="prepare":Iy(R)?D="active":R===Cr&&(D="start");var F=Lp(f,"".concat(C,"-").concat(D));L=d(H(H({},M),{},{className:Ql(Lp(f,C),(P={},ae(P,F,F&&D),ae(P,f,typeof f=="string"),P)),style:N}),j)}if(W.isValidElement(L)&&$4(L)){var ne=L,Z=ne.ref;Z||(L=W.cloneElement(L,{ref:j}))}return w(z4,{ref:E,children:L})});return r.displayName="CSSMotion",r}const Q4=J4(ky);var Ul="add",Wl="keep",Gl="remove",zs="removed";function Z4(e){var t;return e&&Oe(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function Kl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Z4)}function e5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=Kl(e),i=Kl(t);a.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=i[d];if(f.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(p){return H(H({},p),{},{status:Ul})})),r=d),n.push(H(H({},f),{},{status:Wl})),r+=1,u=!0;break}}u||n.push(H(H({},c),{},{status:Gl}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return H(H({},c),{},{status:Ul})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Gl}),n.forEach(function(u){u.key===c&&(u.status=Wl)})}),n}var t5=["component","children","onVisibleChanged","onAllRemoved"],n5=["status"],r5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function o5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q4,n=function(r){Zr(a,r);var o=Ey(a);function a(){var i;nt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),ae(Jt(i),"state",{keyEntities:[]}),ae(Jt(i),"removeKey",function(u){var d=i.state.keyEntities,f=d.map(function(p){return p.key!==u?p:H(H({},p),{},{status:zs})});return i.setState({keyEntities:f}),f.filter(function(p){var h=p.status;return h!==zs}).length}),i}return rt(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged,p=c.onAllRemoved,h=Rr(c,t5),m=u||W.Fragment,b={};return r5.forEach(function(y){b[y]=h[y],delete h[y]}),delete h.keys,w(m,{...h,children:l.map(function(y){var S=y.status,E=Rr(y,n5),x=S===Ul||S===Wl;return g.createElement(t,{...b,key:E.key,visible:x,eventProps:E,onVisibleChanged:function(O){if(f==null||f(O,{key:E.key}),!O){var C=s.removeKey(E.key);C===0&&p&&p()}}},d)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Kl(c),f=e5(u,d);return{keyEntities:f.filter(function(p){var h=u.find(function(m){var b=m.key;return p.key===b});return!(h&&h.status===zs&&p.status===Gl)})}}}]),a}(W.Component);return ae(n,"defaultProps",{component:"div"}),n}o5(ky);function a5(e){const{children:t}=e,[,n]=vu(),{motion:r}=n,o=W.useRef(!1);return o.current=o.current||r===!1,o.current?w(L4,{motion:r,children:t}):t}const i5=(e,t)=>{const[n,r]=vu();return Il({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},f4()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},s5=i5;var l5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const c5=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],u5="ant";let Ly;function d5(){return Ly||u5}function f5(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const p5=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(Ly=t),r&&f5(r)&&("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),x4(d5(),r))},h5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,form:o,locale:a,componentSize:i,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,popupMatchSelectWidth:d,popupOverflow:f,legacyLocale:p,parentContext:h,iconPrefixCls:m,theme:b,componentDisabled:y}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(u===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const S=W.useCallback((P,D)=>{const{prefixCls:F}=e;if(D)return D;const ne=F||h.getPrefixCls("");return P?`${ne}-${P}`:ne},[h.getPrefixCls,e.prefixCls]),E=m||h.iconPrefixCls||by,x=E!==h.iconPrefixCls,v=n||h.csp,O=s5(E,v),C=T4(b,h.theme),R={csp:v,autoInsertSpaceInButton:r,locale:a||p,direction:s,space:l,virtual:c,popupMatchSelectWidth:d??u,popupOverflow:f,getPrefixCls:S,iconPrefixCls:E,theme:C},N=Object.assign({},h);Object.keys(R).forEach(P=>{R[P]!==void 0&&(N[P]=R[P])}),c5.forEach(P=>{const D=e[P];D&&(N[P]=D)});const T=Xm(()=>N,N,(P,D)=>{const F=Object.keys(P),ne=Object.keys(D);return F.length!==ne.length||F.some(Z=>P[Z]!==D[Z])}),k=W.useMemo(()=>({prefixCls:E,csp:v}),[E,v]);let j=x?O(t):t;const L=W.useMemo(()=>{var P,D,F;return k3(((P=gu.Form)===null||P===void 0?void 0:P.defaultValidateMessages)||{},((F=(D=T.locale)===null||D===void 0?void 0:D.Form)===null||F===void 0?void 0:F.defaultValidateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[T,o==null?void 0:o.validateMessages]);Object.keys(L).length>0&&(j=w(M3.Provider,{value:L,children:t})),a&&(j=w(z3,{locale:a,_ANT_MARK__:hy,children:j})),(E||v)&&(j=w(N3.Provider,{value:k,children:j})),i&&(j=w(R4,{size:i,children:j})),j=w(a5,{children:j});const M=W.useMemo(()=>{const P=C||{},{algorithm:D,token:F}=P,ne=l5(P,["algorithm","token"]),Z=D&&(!Array.isArray(D)||D.length>0)?cy(D):void 0;return Object.assign(Object.assign({},ne),{theme:Z,token:Object.assign(Object.assign({},Gi),F)})},[C]);return b&&(j=w(xy.Provider,{value:M,children:j})),y!==void 0&&(j=w(C4,{disabled:y,children:j})),w(ca.Provider,{value:T,children:j})},lo=e=>{const t=W.useContext(ca),n=W.useContext(py);return w(h5,{...Object.assign({parentContext:t,legacyLocale:n},e)})};lo.ConfigContext=ca;lo.SizeContext=Ki;lo.config=p5;lo.useConfig=N4;Object.defineProperty(lo,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ki)});"{}".NODE_ENV!=="production"&&(lo.displayName="ConfigProvider");function g5(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Wa=(e,t,n)=>{const r=g5(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},v5=e=>y4(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),m5=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},d4(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},y5=g4("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=zl(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[m5(a),v5(a),Wa(a,"success","Success"),Wa(a,"processing","Info"),Wa(a,"error","Error"),Wa(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var b5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const w5=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=b5(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=W.useContext(ca),l=p=>{o==null||o(!r),a==null||a(p)},c=s("tag",t),[u,d]=y5(c),f=Ql(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:r},n,d);return u(w("span",{...Object.assign({},i,{className:f,onClick:l})}))},S5=w5,x5="_cssFieldBox_4b8an_2",C5="_inputAuto_4b8an_20",O5="_active_4b8an_23",E5="_cssBox_4b8an_27",br={cssFieldBox:x5,inputAuto:C5,active:O5,cssBox:E5},_5=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Vs=z6.map(e=>({value:e})),zp=g.forwardRef(function(t,n){const[r,o]=g.useState(""),[a,i]=g.useState(""),{mode:s="edit"}=t,l=g.useMemo(()=>s==="create",[s]),[c,u]=g.useState({key:t.value.key,value:t.value.value});g.useEffect(()=>{u(t.value)},[t.value]);const[d,f]=g.useState(Vs),[p,h]=g.useState([]),[m,b]=g.useState([]),y=M=>{const P=Vs.filter(D=>D.value.includes(M));f(M?P:Vs)},S=()=>{var D;let M=[];const P=Km[c.key];P&&(M=((D=P.values)==null?void 0:D.map(F=>({value:F})))||[]),h(M),b(M)},E=M=>{const P=m.filter(D=>D.value.includes(M));h(M?P:m)},x=()=>t.allValues.find(M=>M.key===c.key)?(Y.message.error(`${c.key} is exits`),o("error"),!1):!0,v=()=>{var M;l?c.value?(M=t.onCreate)==null||M.call(t,c):i("error"):C()},O=()=>{o(""),i(""),t.onValueChange({...c})},{run:C}=su(O,{wait:20}),[R,N]=g.useState(0);g.useEffect(()=>{_5(c.key,13.33).then(M=>{let P=parseFloat(M);c.key===""&&(P=200),N(P+6)})},[c.key]);const T=g.useRef(null),k=g.useRef(null),[j,L]=g.useState({key:!1,value:!1});return g.useImperativeHandle(n,()=>({reset:()=>{var M;u({key:"",value:""}),(M=k.current)==null||M.focus()}}),[]),ee("div",{className:br.cssFieldBox,children:[w(Y.AutoComplete,{ref:k,bordered:!1,disabled:!l,onSearch:y,status:r,popupMatchSelectWidth:200,value:c.key,onChange:M=>{u({...c,key:M}),o("")},style:{width:`${R}px`},className:dt([l&&br.inputAuto,l&&j.key&&br.active]),onFocus:()=>{L({key:!0,value:!1})},onBlur:()=>{L({key:!1,value:!1}),x()},onKeyDown:M=>{var P;M.code==="Enter"&&x()&&((P=T.current)==null||P.focus())},placeholder:"property",options:d}),w("span",{children:":"}),w(Y.AutoComplete,{bordered:!1,ref:T,status:a,popupMatchSelectWidth:200,value:c.value,onChange:M=>{var P;S(),u({...c,value:M}),i(""),l||((P=t.onCreate)==null||P.call(t,c),C())},style:{flex:1},onFocus:()=>{L({key:!1,value:!0})},onBlur:()=>{L({key:!1,value:!1}),C()},className:dt([br.inputAuto,j.value&&br.active]),placeholder:"value",onSearch:E,options:p,onKeyDown:M=>{M.code==="Enter"&&v()}}),t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var M;(M=t.onDelete)==null||M.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:v})})]})}),Vp=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:""}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:ee("div",{className:br.cssBox,children:[r.map((c,u)=>w("div",{children:w(zp,{mode:"edit",allValues:r,value:c,onValueChange:d=>{r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(zp,{allValues:r,mode:"create",value:a,ref:l,onCreate:c=>{var u;if(c.key&&c.value){const d=r.filter(f=>f.key!==c.key);d.push(c),o(d),s(d),(u=l.current)==null||u.reset(),i({key:"",value:""})}},onValueChange:c=>{i(c)}})]})})}),R5="_stateTag_5a8hc_2",N5="_stateTagClose_5a8hc_5",Fp={stateTag:R5,stateTagClose:N5},T5=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Hp=T5.map(e=>({key:e,label:e})),P5=e=>{const[t,n]=g.useState("normal"),[r]=g.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=g.useRef({}),a=b=>{n(b)},[i,s]=g.useState(["normal"]),l=g.useMemo(()=>Hp.filter(b=>!i.includes(b.key)),[i]),c=g.useMemo(()=>Hp.filter(b=>i.includes(b.key)),[i]),[u,d]=g.useState(e.initialValue??{});g.useEffect(()=>{const b=Object.keys(u);s(b)},[u]);const f=g.useMemo(()=>{const b=u==null?void 0:u[t];if(!b)return{};const y={};return Object.keys(b).forEach(S=>{y[S]=ti(b[S]||{}).normalProperty}),y},[t,u]),p=g.useCallback(()=>{Object.keys(o.current).forEach(b=>{var E;const y=(E=o.current)==null?void 0:E[b],S=f[b]||[];y&&y.setValue(S)})},[f]),h=g.useRef();h.current=p,e.handler&&(e.handler.current={setValue:async b=>{var y;d(b),await Tn(),(y=h.current)==null||y.call(h)}}),g.useEffect(()=>{p()},[t]);const m=g.useCallback((b,y)=>{var E;const S={...u,[t]:{...u[t]||{},[b]:rc(y)}};(E=e.onValueChange)==null||E.call(e,S)},[u,t]);return w(Ye,{children:ee(Y.Card,{size:"small",type:"inner",title:w("span",{style:{fontSize:"12px"},children:"CSS"}),extra:w(Y.Dropdown,{menu:{items:l,onClick:b=>{s(y=>[...y,b.key])}},children:w(nc,{})}),children:[w(Y.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(b=>{const y=t.includes(b.key);return ee(S5,{style:{border:y?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:y,onChange:()=>a(b.key),className:Fp.stateTag,children:[b.label,b.key!=="normal"&&w(j0,{className:Fp.stateTagClose,onClick:S=>{S.stopPropagation(),S.preventDefault(),s(E=>E.filter(x=>x!==b.key)),n("normal")}})]},b.key)})}),w(Y.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:w("span",{children:"Normal"}),children:w(Vp,{ref:b=>{o.current.normal=b},onValueChange:b=>m("normal",b),initialValue:f.normal})},...r.map(b=>({key:b.key,label:w("span",{children:b.label}),children:w(Vp,{ref:y=>{o.current[b.key]=y},onValueChange:y=>m(b.key,y)})}))]})]})})},k5=e=>{const t=g.useRef(null),n=e.node;if(!n)return w(Ye,{});const r=g.useRef(null),o=g.useRef(null),[a,i]=g.useState({}),s=g.useMemo(()=>ti(a),[a]),l=g.useRef();g.useEffect(()=>{const d=()=>{var b,y,S;l.current=n;const f=n.value.style||{};i(f);const{normalProperty:p,expressionProperty:h}=ti(f);(b=r.current)==null||b.setValue(p),(y=t.current)==null||y.setValue(h);const m=kh(n.value.css);(S=o.current)==null||S.setValue(m)};d(),n.emitter.on("onNodeChange",d),n.emitter.on("onReloadPage",d)},[n]);const c=d=>{const f=rc([...d]);i(f),n.value.style=f,n.updateValue()},u=d=>{n.value.css=Ph(`c_${n.id}`,d),n.updateValue()};return ee("div",{className:pp.visualPanelBox,children:[w("div",{style:{marginBottom:"10px"},children:w(CL,{onValueChange:d=>{n.value.classNames=d,n.updateValue()}})}),w(Y.Collapse,{defaultActiveKey:["origin-css-edit"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"origin-css-edit",label:w("span",{className:pp.header,children:"Style Variable Bind"}),children:w(SL,{ref:t,initialValue:s.expressionProperty,onValueChange:d=>{c([...s.normalProperty,...d])}})}]}),w(P5,{handler:o,onValueChange:u})]})},j5={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t})=>w(k5,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class M5 extends g.Component{constructor(n){super(n);B(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});B(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});B(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});B(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});B(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},d=a.filter(p=>p.show===void 0?!0:p.show(u)),f=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];d.concat(f),i={panels:a,displayPanels:d}}else i={panels:a,displayPanels:[]};return this.setState(i),i});B(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(d=>d.show===void 0?!0:d.show(i)),l=((u=s.find((d,f)=>f===0))==null?void 0:u.key)||"";s.find(d=>d.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[Z6,j5,tL,iL],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return w("div",{style:{overflow:"hidden"},children:w(Y.Empty,{image:Y.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a};return w("div",{className:lL.rightPanelContainer,children:w(Y.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:w("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const A5="RightPanel",By=e=>{const t=g.createRef();return{name:A5,async init(n){n.getWorkbench().replaceRightView(w(M5,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},D5={pluginName:"全局状态"},$5={pluginName:"Global State"},Up={zh_CN:D5,en_US:$5},I5="_box_tl0hm_2",L5={box:I5},ql="GlobalState",Fs=`plugin:${ql}`,B5=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=g.useRef(null);g.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return w("div",{className:L5.box,children:w(sa,{language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},zy={name:ql,async init(e){const{i18n:t}=e;Object.keys(Up).forEach(a=>{t.addResourceBundle(a,Fs,Up[a],!0,!0)});const n=Ir(Fs)(B5),r=Ir(Fs)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:ql,icon:w(b0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},z5=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=g.useState(!1),a=g.useRef(null);return ee(Ye,{children:[w("div",{onClick:()=>{o(!0)},children:e.children}),w(Y.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var d;o(!1);const i=(d=a.current)==null?void 0:d.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await Tn();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:w("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:w(sa,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},V5="History",Vy=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await Tn())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=Df(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=Df(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:V5,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},F5=[Wv,dD,Fv,zy,By,Vy],H5=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Fv,DEFAULT_PLUGIN_LIST:F5,DesignerPlugin:Wv,DisplaySourceSchema:z5,GlobalStatePanelPlugin:zy,HistoryPlugin:Vy,RightPanelPlugin:By},Symbol.toStringTag,{value:"Module"})),pn={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},vr={name:"width",title:"宽度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},mr={name:"height",title:"高度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},U5=be.HTMl_TAGS.map(e=>({title:Av(e),componentName:e,props:[pn],snippets:[]})),W5=[{title:"块",componentName:"CBlock",props:[vr,mr,{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},vr,mr,pn],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{props:{width:"300px",height:"150px"}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>w(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{width:"300px",height:"150px",src:"https://vjs.zencdn.net/v/oceans.mp4"}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],advanceCustom:{wrapComponent:()=>e=>w("div",{style:{display:"inline-block",fontSize:0},children:w("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},pn],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
260
242
  function run () {
261
243
  var ctx = document.getElementById("$[id]").getContext("2d");
262
244
  ctx.font = "48px serif";
263
245
  ctx.fillText("Hello Canvas", 10, 50);
264
246
  }
265
- `}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:Oe.HTMl_TAGS.map(e=>({name:e,value:e}))}}]},xn],isContainer:!0,groupName:"原子组件",snippets:[{title:"HTML",snapshotText:"HTML",category:"基础组件",schema:{props:{htmlTag:"div"}}}]}],V5=[...F5,...z5];class Hy extends v.Component{constructor(n){super(n);F(this,"currentSelectNode");F(this,"pluginManager");F(this,"workbenchRef",v.createRef());F(this,"pageSchema");F(this,"pageModel");F(this,"material");F(this,"emitter");F(this,"updatePage",n=>{this.emitter.emit("updatePage"),console.log(n)});F(this,"updateDesignerAssets",n=>{console.log("updateDesignerAssets",n)});F(this,"updateMaterial",n=>{this.emitter.emit("updateMaterial"),console.log(n)});F(this,"refresh",()=>{this.emitter.emit("refresh"),console.log("refresh engine")});F(this,"getWorkbench",()=>this.workbenchRef.current);this.pageSchema=n.schema,this.material=n.material,this.currentSelectNode=null,window.__CHAMELEON_ENG__=this;try{this.pageModel=new Oe.CPage(this.pageSchema,{materials:this.material||[],assetPackagesList:n.assetPackagesList||[]})}catch(r){console.error(r),this.pageModel=new Oe.CPage(Oe.EmptyPage)}this.emitter=si()}updateCurrentSelectNode(n){this.currentSelectNode=n,this.emitter.emit("onSelectNodeChange",{node:n})}async componentDidMount(){var a,i,s,l,c,u;window.__C_ENGINE__=this;const n=this.props.plugins,r=new NT({engine:this,getWorkbench:()=>this.workbenchRef.current,emitter:this.emitter,pageModel:this.pageModel,i18n:iv,assets:this.props.assetPackagesList||[]});this.pluginManager=r,r.customPlugin("Designer",d=>(d.ctx.config.beforeInitRender=Jg,d.ctx.config.customRender=Qg(this.props.components||{}),d.ctx.config.components=this.props.components,d)),(i=(a=this.props).beforePluginRun)==null||i.call(a,{pluginManager:this.pluginManager});const o=n.map(d=>this.pluginManager.add(d));(l=(s=this.props).onMount)==null||l.call(s,{pluginManager:this.pluginManager,engine:this}),await Promise.all(o),this.pageModel.emitter.on("onReloadPage",()=>{var f;if(!this.currentSelectNode)return;const d=this.pageModel.getNode((f=this.currentSelectNode)==null?void 0:f.id);d&&this.updateCurrentSelectNode(d)}),(u=(c=this.props).onReady)==null||u.call(c,{pluginManager:this.pluginManager,engine:this})}getActiveNode(){var r;if(!((r=this.currentSelectNode)!=null&&r.id))return null;const n=this.pageModel.getNode(this.currentSelectNode.id)??null;return this.currentSelectNode=n,n}render(){return x("div",{className:yt([j2.engineContainer,this.props.className]),style:this.props.style,children:x(P2,{ref:this.workbenchRef,emitter:this.emitter})})}}F(Hy,"version","0.0.25");exports.Engine=Hy;exports.InnerComponentMeta=V5;exports.LOGGER=Ht;exports.beforeInitRender=Jg;exports.formatCSSProperty=li;exports.formatCssToNodeVal=Ah;exports.formatNodeValToEditor=Dh;exports.getDefaultRender=Qg;exports.plugins=B5;exports.registerCustomSetter=uD;exports.styleArr2Obj=ic;exports.waitReactUpdate=Bn;Object.keys(or).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>or[e]})});
247
+ `}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:be.HTMl_TAGS.map(e=>({name:e,value:e}))}}]},pn],isContainer:!0,groupName:"原子组件",snippets:[{title:"HTML",snapshotText:"HTML",category:"基础组件",schema:{props:{htmlTag:"div"}}}]}],G5=[...W5,...U5];class Fy extends g.Component{constructor(n){super(n);B(this,"currentSelectNode");B(this,"pluginManager");B(this,"workbenchRef",g.createRef());B(this,"pageSchema");B(this,"pageModel");B(this,"material");B(this,"emitter");B(this,"updatePage",n=>{this.emitter.emit("updatePage"),console.log(n)});B(this,"updateDesignerAssets",n=>{console.log("updateDesignerAssets",n)});B(this,"updateMaterial",n=>{this.emitter.emit("updateMaterial"),console.log(n)});B(this,"refresh",()=>{this.emitter.emit("refresh"),console.log("refresh engine")});B(this,"getWorkbench",()=>this.workbenchRef.current);this.pageSchema=n.schema,this.material=n.material,this.currentSelectNode=null,window.__CHAMELEON_ENG__=this;try{this.pageModel=new be.CPage(this.pageSchema,{materials:this.material||[],assetPackagesList:n.assetPackagesList||[]})}catch(r){console.error(r),this.pageModel=new be.CPage(be.EmptyPage)}this.emitter=ei()}updateCurrentSelectNode(n){this.currentSelectNode=n,this.emitter.emit("onSelectNodeChange",{node:n})}async componentDidMount(){var a,i,s,l,c,u;window.__C_ENGINE__=this;const n=this.props.plugins,r=new jT({engine:this,getWorkbench:()=>this.workbenchRef.current,emitter:this.emitter,pageModel:this.pageModel,i18n:av,assets:this.props.assetPackagesList||[]});this.pluginManager=r,r.customPlugin("Designer",d=>(d.ctx.config.beforeInitRender=Xg,d.ctx.config.customRender=Jg(this.props.components||{}),d.ctx.config.components=this.props.components,d)),(i=(a=this.props).beforePluginRun)==null||i.call(a,{pluginManager:this.pluginManager});const o=n.map(d=>this.pluginManager.add(d));(l=(s=this.props).onMount)==null||l.call(s,{pluginManager:this.pluginManager,engine:this}),await Promise.all(o),this.pageModel.emitter.on("onReloadPage",()=>{var f;if(!this.currentSelectNode)return;const d=this.pageModel.getNode((f=this.currentSelectNode)==null?void 0:f.id);d&&this.updateCurrentSelectNode(d)}),(u=(c=this.props).onReady)==null||u.call(c,{pluginManager:this.pluginManager,engine:this})}getActiveNode(){var r;if(!((r=this.currentSelectNode)!=null&&r.id))return null;const n=this.pageModel.getNode(this.currentSelectNode.id)??null;return this.currentSelectNode=n,n}render(){return w("div",{className:dt([$N.engineContainer,this.props.className]),style:this.props.style,children:w(AN,{ref:this.workbenchRef,emitter:this.emitter})})}}B(Fy,"version","0.0.27");exports.Engine=Fy;exports.InnerComponentMeta=G5;exports.LOGGER=$t;exports.beforeInitRender=Xg;exports.formatCSSProperty=ti;exports.formatCssToNodeVal=Ph;exports.formatNodeValToEditor=kh;exports.getDefaultRender=Jg;exports.plugins=H5;exports.registerCustomSetter=hD;exports.styleArr2Obj=rc;exports.waitReactUpdate=Tn;Object.keys(Xn).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Xn[e]})});
266
248
  //# sourceMappingURL=index.js.map