zmdms-webui 0.0.39 → 0.0.40
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/es/applayoutheader/appLayoutHeader.d.ts +0 -1
- package/dist/es/applayoutheader/appLayoutHeader.js +2 -2
- package/dist/es/applayoutheader/setting/index.js +2 -2
- package/dist/es/applayoutheader/setting/userInfo.js +4 -1
- package/dist/es/applayoutsider/LayoutSiderContext.js +7 -0
- package/dist/es/applayoutsider/appLayoutSider.d.ts +0 -6
- package/dist/es/applayoutsider/appLayoutSider.js +12 -3
- package/dist/es/applayoutsider/menu/MainMenu.js +14 -8
- package/dist/es/applayoutsider/menu/SubMenu.js +29 -6
- package/dist/es/applayoutsider/menu/hook.js +122 -0
- package/dist/es/applayoutsider/menu/index.js +3 -18
- package/dist/es/config/LayoutContext.d.ts +22 -0
- package/dist/es/config/LayoutContext.js +6 -0
- package/dist/es/descriptions/descriptions.js +1 -1
- package/dist/es/formitem/formItem.js +4 -8
- package/dist/index.build.d.ts +1 -0
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/dist/index.es.js +1 -0
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&e.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(j);var N=k(j.exports),P=function(e){var n=e.fileId,o=e.fileName,a=e.isPublic,s=e.API_BASEURL,c=e.onClick,l=D(e,["fileId","fileName","isPublic","API_BASEURL","onClick"]),u=r.useState(!1),d=u[0],f=u[1];return t.jsx(R,O({type:"link",loading:d,onClick:function(e){return E(void 0,void 0,void 0,(function(){return T(this,(function(t){return n?(f(!0),[2,i.downloadFile(n,o||"",{API_BASEURL:s,open:a}).then((function(t){c&&c(e,{result:!0}),f(!1)})).catch((function(t){c&&c(e,{result:!1}),f(!1)}))]):[2]}))}))}},l))};P.displayName="ZTXK_WEBUI_ButtonDownload";var A=function(e){var o=e.fetchHandle,a=e.onClick,s=D(e,["fetchHandle","onClick"]),c=r.useState(!1),l=c[0],u=c[1];return t.jsx(R,O({type:"primary",loading:l,onClick:function(e){return E(void 0,void 0,void 0,(function(){var t,r;return T(this,(function(s){switch(s.label){case 0:u(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,o()];case 2:return t=s.sent(),i.exportBolb(t).then((function(t){t.result&&n.message.info(t.msg),a&&a(e,{result:!0})})).catch((function(t){a&&a(e,{result:!1}),n.message.error((null==t?void 0:t.msg)||"导出失败!")})),u(!1),[3,4];case 3:return r=s.sent(),u(!1),[2,r];case 4:return[2]}}))}))}},s))};A.displayName="ZTXK_WEBUI_ButtonExport";var R=function(e){var r,i=e.type,o=e.className,a=e.disabled,s=e.size,c=e.danger,l=e.onClick,u=D(e,["type","className","disabled","size","danger","onClick"]),d=N("zt-btn",o,((r={})["zt-btn-".concat(i)]=i,r["zt-btn-disabled"]=a,r["zt-btn-".concat(s)]=s,r["zt-btn-dangerous"]=c,r)),f={canClick:!0};return t.jsx(n.Button,O({className:d,type:i,disabled:a,size:s,danger:c,onClick:function(e){return E(void 0,void 0,void 0,(function(){var t;return T(this,(function(n){switch(n.label){case 0:if(!f.canClick)return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),f.canClick=!1,l?[4,l(e)]:[3,3];case 2:n.sent(),n.label=3;case 3:return f.canClick=!0,[3,5];case 4:throw t=n.sent(),f.canClick=!0,t;case 5:return[2]}}))}))}},u))};R.displayName="ZTXK_WEBUI_Button",R.Group=n.Button.Group,R.Download=P,R.Export=A;var M=r.memo(r.forwardRef((function(e,r){return t.jsx(n.Input,O({},e,{ref:r}))})));M.displayName="ZTXK_WEBUI_Input",M.Group=n.Input.Group,M.Search=n.Input.Search,M.TextArea=n.Input.TextArea,M.Password=n.Input.Password;function z(e,t,n){return e&&!isNaN(Number(e))&&!t.current&&n?Number(e).toFixed(n):e}function L(e,t){if(!e)return e;var n=e.lastIndexOf("."),r=e,i="";return-1!==n&&(r=e.substring(0,n),i=e.substring(n+1)),t&&(i=i.length<t?i:i.substring(0,t)),i?r+"."+i:r}var _=function(e,i){var o=e.formatterType,a=(e.currencySymbol,e.formatter),s=e.parser,c=e.precision,l=e.onBlur,u=e.onFocus,d=D(e,["formatterType","currencySymbol","formatter","parser","precision","onBlur","onFocus"]),f=r.useRef(!1),h=function(e,t,n,r){return"currency"===e?{formatter:function(e){return function(e){if(null!=e){var t=e.toString(),n="",r="";t.startsWith("-")&&(n="-",t=t.slice(1));var i=t.indexOf(".");-1!==i?(e=t.slice(0,i),r=t.slice(i)):e=t;for(var o="",a=e.toString(),s=a.length,c=s-1;c>=0;c--)o=(s-c)%3==0?0===c?a[c]+o:","+a[c]+o:a[c]+o;return n+o+r}return e}(z(e,n,r))},parser:function(e){return L(e.replace(/(,*)/g,""),r)},precision:3}:"percent"===e?{formatter:function(e){var t=z(e,n,r);return"".concat(t,"%")},parser:function(e){return e?e.replace("%",""):Number(e)},precision:2}:"thousands"===e?{formatter:function(e){var t=z(e,n,r);return"".concat(t,"‰")},parser:function(e){return e?e.replace("‰",""):Number(e)},precision:2}:{formatter:function(e){return z(e,n,r)},parser:function(e){return L(e,r)},precision:r}}(o,0,f,c),p=h.formatter,g=h.parser,m=h.precision;return t.jsx(n.InputNumber,O({formatter:a||p,parser:s||g,precision:null!=c?c:m,onBlur:function(e){f.current=!1,l&&l(e)},onFocus:function(e){f.current=!0,u&&u(e)}},d,{ref:i}))};_.displayName="ZTXK_WEBUI_InputNumber";var F=r.memo(r.forwardRef(_)),H={};function B(e,t){}function U(e,t){}function W(e,t,n){t||H[n]||(e(!1,n),H[n]=!0)}function K(e,t){W(B,e,t)}function q(e,t){W(U,e,t)}K.preMessage=function(e){},K.resetWarned=function(){H={}},K.noteOnce=q,o.extend(d),o.extend(u),o.extend(a),o.extend(s),o.extend(c),o.extend(l),o.extend((function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return r.bind(this)(t)}}));var V={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},$=function(e){return V[e]||e.split("_")[0]},Z=function(){q(!1,"Not match any format. Please help to fire a issue about this.")},G={getNow:function(){return o()},getFixedDate:function(e){return o(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return o().locale($(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale($(e)).weekday(0)},getWeek:function(e,t){return t.locale($(e)).week()},getShortWeekDays:function(e){return o().locale($(e)).localeData().weekdaysMin()},getShortMonths:function(e){return o().locale($(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale($(e)).format(n)},parse:function(e,t,n){for(var r=$(e),i=0;i<n.length;i+=1){var a=n[i],s=t;if(a.includes("wo")||a.includes("Wo")){for(var c=s.split("-")[0],l=s.split("-")[1],u=o(c,"YYYY").startOf("year").locale(r),d=0;d<=52;d+=1){var f=u.add(d,"week");if(f.format("Wo")===l)return f}return Z(),null}var h=o(s,a).locale(r);if(h.isValid())return h}return t&&Z(),null}}},X=f(G),Y=h(G),J=r.forwardRef((function(e,n){return t.jsx(X,O({},e,{picker:"time",mode:void 0,ref:n}))}));J.displayName="TimePicker";var Q=r.createContext({locale:"zh-cn"});function ee(e,t){for(var n="",r=t.length,i=0;i<e.length;i++){var o=e.charAt(i),a=t.charAt(i%r);n+=String.fromCharCode(o.charCodeAt(0)+a.charCodeAt(0))}return n}function te(e,t){for(var n="",r=t.length,i=0;i<e.length;i++){var o=e.charAt(i),a=t.charAt(i%r);n+=String.fromCharCode(o.charCodeAt(0)-a.charCodeAt(0))}return n}var ne=n.Form.Item,re="6fr6x",ie="PUsvG",oe="kVhfO",ae="simide",se=function(e){var i=e.loginLogo,o=e.loginBg,a=e.onFinishHandle,s=e.loading,c=n.Form.useForm()[0];r.useEffect((function(){var e=localStorage.getItem(re);if(e)try{var t=JSON.parse(e),n=te(t[ie],ae),r=te(t[oe],ae);n&&r&&c.setFieldsValue({username:n,password:r,remember:!0})}catch(e){console.log(e)}}),[c]);return t.jsx("div",O({className:"login-wrap",style:{backgroundImage:"url(".concat(o,")")}},{children:t.jsxs(n.Form,O({form:c,requiredMark:!1,layout:"vertical",className:"login-form",onFinish:function(e){var t;e.remember&&localStorage.setItem(re,JSON.stringify(((t={})[ie]=ee(e.username,ae),t[oe]=ee(e.password,ae),t))),a&&a(e)}},{children:[t.jsx("div",O({className:"login-logo"},{children:t.jsx("img",{src:i,title:"浙商中拓ERP",alt:"zszt_logo"})})),t.jsx(ne,O({label:"请输入您的账号",name:"username",rules:[{required:!0,message:"请输入您的账号"}]},{children:t.jsx(M,{size:"large",autoComplete:"username",prefix:t.jsx(yn,{type:"icon-yonghu",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx(ne,O({label:"请输入您的密码",name:"password",rules:[{required:!0,message:"请输入您的密码"}]},{children:t.jsx(M.Password,{size:"large",autoComplete:"current-password",prefix:t.jsx(yn,{type:"icon-mima",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx(ne,{children:t.jsx(R,O({htmlType:"submit",block:!0,className:"form__item--button",loading:s},{children:"登录"}))}),t.jsxs("div",O({className:"form__item--remember"},{children:[t.jsx(ne,O({name:"remember",valuePropName:"checked"},{children:t.jsx(n.Checkbox,{children:"记住密码"})})),t.jsx("div",O({className:"form__item--remember-forget"},{children:"忘记密码"}))]}))]}))}))};se.displayName="ZTXK_WEBUI_Login";var ce=r.createContext({});function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function ue(e){var t=function(e,t){if("object"!==le(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===le(t)?t:String(t)}function de(e,t,n){return(t=ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ve(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function ye(e){return e<=1?"".concat(100*Number(e),"%"):e}function be(e){return 1===e.length?"0"+e:String(e)}function xe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function we(e){return Se(e)/255}function Se(e){return parseInt(e,16)}var Ce={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 Oe(e){var t,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,c=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Ce[e])e=Ce[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Ie.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Ie.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Ie.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Ie.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Ie.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Ie.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Ie.hex8.exec(e),n)return{r:Se(n[1]),g:Se(n[2]),b:Se(n[3]),a:we(n[4]),format:t?"name":"hex8"};if(n=Ie.hex6.exec(e),n)return{r:Se(n[1]),g:Se(n[2]),b:Se(n[3]),format:t?"name":"hex"};if(n=Ie.hex4.exec(e),n)return{r:Se(n[1]+n[1]),g:Se(n[2]+n[2]),b:Se(n[3]+n[3]),a:we(n[4]+n[4]),format:t?"name":"hex8"};if(n=Ie.hex3.exec(e),n)return{r:Se(n[1]+n[1]),g:Se(n[2]+n[2]),b:Se(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(ke(e.r)&&ke(e.g)&&ke(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*ve(t,255),g:255*ve(n,255),b:255*ve(r,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ke(e.h)&&ke(e.s)&&ke(e.v)?(a=ye(e.s),s=ye(e.v),i=function(e,t,n){e=6*ve(e,360),t=ve(t,100),n=ve(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,a,o,o,s,n][c],g:255*[s,n,n,a,o,o][c],b:255*[o,o,s,n,n,a][c]}}(e.h,a,s),l=!0,u="hsv"):ke(e.h)&&ke(e.s)&&ke(e.l)&&(a=ye(e.s),c=ye(e.l),i=function(e,t,n){var r,i,o;if(e=ve(e,360),t=ve(t,100),n=ve(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=xe(s,a,e+1/3),i=xe(s,a,e),o=xe(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,a,c),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(o),{ok:l,format:e.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var De="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Ee="[\\s|\\(]+(".concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")\\s*\\)?"),Te="[\\s|\\(]+(".concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")\\s*\\)?"),Ie={CSS_UNIT:new RegExp(De),rgb:new RegExp("rgb"+Ee),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+Ee),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+Ee),hsva:new RegExp("hsva"+Te),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 ke(e){return Boolean(Ie.CSS_UNIT.exec(String(e)))}var je=2,Ne=.16,Pe=.05,Ae=.05,Re=.15,Me=5,ze=4,Le=[{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 _e(e){var t=function(e,t,n){e=ve(e,255),t=ve(t,255),n=ve(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,c=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Fe(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n,r){var i=[be(Math.round(e).toString(16)),be(Math.round(t).toString(16)),be(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,n,r,!1))}function He(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-je*t:Math.round(e.h)+je*t:n?Math.round(e.h)+je*t:Math.round(e.h)-je*t)<0?r+=360:r>=360&&(r-=360),r}function Be(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Ne*t:t===ze?e.s+Ne:e.s+Pe*t)>1&&(r=1),n&&t===Me&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Ue(e,t,n){var r;return(r=n?e.v+Ae*t:e.v-Re*t)>1&&(r=1),Number(r.toFixed(2))}function We(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Oe(e),i=Me;i>0;i-=1){var o=_e(r),a=Fe(Oe({h:He(o,i,!0),s:Be(o,i,!0),v:Ue(o,i,!0)}));n.push(a)}n.push(Fe(r));for(var s=1;s<=ze;s+=1){var c=_e(r),l=Fe(Oe({h:He(c,s),s:Be(c,s),v:Ue(c,s)}));n.push(l)}return"dark"===t.theme?Le.map((function(e){var r,i,o,a=e.index,s=e.opacity;return Fe((r=Oe(t.backgroundColor||"#141414"),i=Oe(n[a]),o=100*s/100,{r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b}))})):n}var Ke={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"},qe={},Ve={};Object.keys(Ke).forEach((function(e){qe[e]=We(Ke[e]),qe[e].primary=qe[e][5],Ve[e]=We(Ke[e],{theme:"dark",backgroundColor:"#141414"}),Ve[e].primary=Ve[e][5]}));var $e="data-rc-order",Ze="rc-util-key",Ge=new Map;function Xe(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Ze}function Ye(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Je(e){return Array.from((Ge.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute($e,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r)),null!=n&&n.nonce&&(i.nonce=null==n?void 0:n.nonce),i.innerHTML=e;var o=Ye(t),a=o.firstChild;if(r){if("queue"===r){var s=Je(o).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute($e))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Ge.get(e);if(!n||!function(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}(document,n)){var r=Qe("",t),i=r.parentNode;Ge.set(e,i),e.removeChild(r)}}(Ye(n),n);var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Je(Ye(t)).find((function(n){return n.getAttribute(Xe(t))===e}))}(t,n);if(r){var i,o,a;if(null!==(i=n.csp)&&void 0!==i&&i.nonce&&r.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))r.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var s=Qe(e,n);return s.setAttribute(Xe(n),t),s}function tt(e,t){K(e,"[@ant-design/icons] ".concat(t))}function nt(e){return"object"===le(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===le(e.icon)||"function"==typeof e.icon)}function rt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else t[n]=r;return t}),{})}function it(e,t,n){return n?r.createElement(e.tag,he(he({key:t},rt(e.attrs)),n),(e.children||[]).map((function(n,r){return it(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.createElement(e.tag,he({key:t},rt(e.attrs)),(e.children||[]).map((function(n,r){return it(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function ot(e){return We(e)[0]}function at(e){return e?Array.isArray(e)?e:[e]:[]}var st={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",t=r.useContext(ce).csp;r.useEffect((function(){et(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])},lt=["icon","className","onClick","style","primaryColor","secondaryColor"],ut={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var dt=function(e){var t=e.icon,n=e.className,r=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=me(e,lt),c=ut;if(o&&(c={primaryColor:o,secondaryColor:a||ot(o)}),ct(),tt(nt(t),"icon should be icon definiton, but got ".concat(t)),!nt(t))return null;var l=t;return l&&"function"==typeof l.icon&&(l=he(he({},l),{},{icon:l.icon(c.primaryColor,c.secondaryColor)})),it(l.icon,"svg-".concat(l.name),he({className:n,onClick:r,style:i,"data-icon":l.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};dt.displayName="IconReact",dt.getTwoToneColors=function(){return he({},ut)},dt.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;ut.primaryColor=t,ut.secondaryColor=n||ot(t),ut.calculated=!!n};var ft=dt;function ht(e){var t=ge(at(e),2),n=t[0],r=t[1];return ft.setTwoToneColors({primaryColor:n,secondaryColor:r})}var pt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ht("#1890ff");var gt=S.forwardRef((function(e,t){var n,r=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,l=e.twoToneColor,u=me(e,pt),d=S.useContext(ce),f=d.prefixCls,h=void 0===f?"anticon":f,p=d.rootClassName,g=N(p,h,(de(n={},"".concat(h,"-").concat(i.name),!!i.name),de(n,"".concat(h,"-spin"),!!o||"loading"===i.name),n),r),m=s;void 0===m&&c&&(m=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,y=ge(at(l),2),b=y[0],x=y[1];return S.createElement("span",he(he({role:"img","aria-label":i.name},u),{},{ref:t,tabIndex:m,onClick:c,className:g}),S.createElement(ft,{icon:i,primaryColor:b,secondaryColor:x,style:v}))}));gt.displayName="AntdIcon",gt.getTwoToneColor=function(){var e=ft.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},gt.setTwoToneColor=ht;var mt=gt,vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"},yt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:vt}))};yt.displayName="ArrowsAltOutlined";var bt=S.forwardRef(yt),xt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},wt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:xt}))};wt.displayName="CaretDownOutlined";var St=S.forwardRef(wt),Ct={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Ot=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Ct}))};Ot.displayName="CaretUpOutlined";var Dt=S.forwardRef(Ot),Et={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"},Tt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Et}))};Tt.displayName="CopyOutlined";var It=S.forwardRef(Tt),kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},jt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:kt}))};jt.displayName="DownOutlined";var Nt=S.forwardRef(jt),Pt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},At=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Pt}))};At.displayName="LogoutOutlined";var Rt=S.forwardRef(At),Mt={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"},zt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Mt}))};zt.displayName="MinusOutlined";var Lt=S.forwardRef(zt),_t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Ft=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:_t}))};Ft.displayName="MinusSquareOutlined";var Ht=S.forwardRef(Ft),Bt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-24 500c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H416c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM472 436h400v152H472V436zM80 646c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"}}]},name:"pic-right",theme:"outlined"},Ut=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Bt}))};Ut.displayName="PicRightOutlined";var Wt=S.forwardRef(Ut),Kt={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"},qt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Kt}))};qt.displayName="PlusOutlined";var Vt=S.forwardRef(qt),$t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},Zt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:$t}))};Zt.displayName="SettingOutlined";var Gt=S.forwardRef(Zt),Xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"},Yt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Xt}))};Yt.displayName="ShrinkOutlined";var Jt=S.forwardRef(Yt),Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},en=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Qt}))};en.displayName="UnlockOutlined";var tn=S.forwardRef(en),nn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},rn=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:nn}))};rn.displayName="UploadOutlined";var on=S.forwardRef(rn),an={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},sn=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:an}))};sn.displayName="UserOutlined";var cn=S.forwardRef(sn),ln={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z"}}]},name:"vertical-align-bottom",theme:"outlined"},un=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:ln}))};un.displayName="VerticalAlignBottomOutlined";var dn=S.forwardRef(un),fn=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],hn=S.forwardRef((function(e,t){var n=e.className,r=e.component,i=e.viewBox,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,l=e.children,u=me(e,fn);tt(Boolean(r||l),"Should have `component` prop or `children`."),ct();var d=S.useContext(ce),f=d.prefixCls,h=void 0===f?"anticon":f,p=d.rootClassName,g=N(p,h,n),m=N(de({},"".concat(h,"-spin"),!!o)),v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,y=he(he({},st),{},{className:m,style:v,viewBox:i});i||delete y.viewBox;var b=s;return void 0===b&&c&&(b=-1),S.createElement("span",he(he({role:"img"},u),{},{ref:t,tabIndex:b,onClick:c,className:g}),r?S.createElement(r,he({},y),l):l?(tt(Boolean(i)||1===S.Children.count(l)&&S.isValidElement(l)&&"use"===S.Children.only(l).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),S.createElement("svg",he(he({},y),{},{viewBox:i}),l)):null)}));hn.displayName="AntdIcon";var pn=hn,gn=["type","children"],mn=new Set;function vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e[n];if(t=r,Boolean("string"==typeof t&&t.length&&!mn.has(t))){var i=document.createElement("script");i.setAttribute("src",r),i.setAttribute("data-namespace",r),e.length>n+1&&(i.onload=function(){vn(e,n+1)},i.onerror=function(){vn(e,n+1)}),mn.add(r),document.body.appendChild(i)}}var yn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,r=void 0===n?{}:n;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?vn(t.reverse()):vn([t]));var i=S.forwardRef((function(e,t){var n=e.type,i=e.children,o=me(e,gn),a=null;return e.type&&(a=S.createElement("use",{xlinkHref:"#".concat(n)})),i&&(a=i),S.createElement(pn,he(he(he({},r),o),{},{ref:t}),a)}));return i.displayName="Iconfont",i}({scriptUrl:["//at.alicdn.com/t/c/font_4078313_tg40lf02k9.js"]});const bn=r.createContext({dragDropManager:void 0});function xn(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var wn="function"==typeof Symbol&&Symbol.observable||"@@observable",Sn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Cn={INIT:"@@redux/INIT"+Sn(),REPLACE:"@@redux/REPLACE"+Sn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Sn()}};function On(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(xn(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(xn(1));return n(On)(e,t)}if("function"!=typeof e)throw new Error(xn(2));var i=e,o=t,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error(xn(3));return o}function d(e){if("function"!=typeof e)throw new Error(xn(4));if(c)throw new Error(xn(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw new Error(xn(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(xn(7));if(void 0===e.type)throw new Error(xn(8));if(c)throw new Error(xn(9));try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:Cn.INIT}),(r={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(xn(10));i=e,f({type:Cn.REPLACE})}})[wn]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(xn(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[wn]=function(){return this},e},r}function Dn(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,(function(){return n[r++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function En(e){return"object"==typeof e}const Tn="dnd-core/INIT_COORDS",In="dnd-core/BEGIN_DRAG",kn="dnd-core/PUBLISH_DRAG_SOURCE",jn="dnd-core/HOVER",Nn="dnd-core/DROP",Pn="dnd-core/END_DRAG";function An(e,t){return{type:Tn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Rn={type:Tn,payload:{clientOffset:null,sourceClientOffset:null}};function Mn(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:i,getSourceClientOffset:o}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(An(i)),function(e,t,n){Dn(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Dn(n.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,s);const c=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==c)return void e.dispatch(Rn);let l=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){Dn("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),l=o(c)}e.dispatch(An(i,l));const u=s.getSource(c).beginDrag(a,c);if(null==u)return;!function(e){Dn(En(e),"Item must be an object.")}(u),s.pinSource(c);const d=s.getSourceType(c);return{type:In,payload:{itemType:d,item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}}}}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zn(e,t,n[t])}))}return e}function _n(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Dn(e.isDragging(),"Cannot call drop while not dragging."),Dn(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);i.forEach(((i,o)=>{const a=function(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;(function(e){Dn(void 0===e||En(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:r.getDropResult());return o}(i,o,r,n),s={type:Nn,payload:{dropResult:Ln({},t,a)}};e.dispatch(s)}))}}function Fn(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Dn(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:Pn}}}function Hn(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function Bn(e){return function(t,{clientOffset:n}={}){!function(e){Dn(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];Hn(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){Dn(t.isDragging(),"Cannot call hover while not dragging."),Dn(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];Dn(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");Dn(n.getTarget(r),"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}(r,i,o),{type:jn,payload:{targetIds:r,clientOffset:n||null}}}}function Un(e){return function(){if(e.getMonitor().isDragging())return{type:kn}}}class Wn{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:Mn(e),publishDragSource:Un(e),hover:Bn(e),drop:_n(e),endDrag:Fn(e)}}(this);return Object.keys(n).reduce(((r,i)=>{const o=n[i];var a;return r[i]=(a=o,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function Kn(e,t){return{x:e.x-t.x,y:e.y-t.y}}const qn=[],Vn=[];qn.__IS_NONE__=!0,Vn.__IS_ALL__=!0;class $n{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Dn("function"==typeof e,"listener must be a function."),Dn(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===r||i===r+1&&!function(e,t){return e!==qn&&(e===Vn||void 0===t||(n=e,t.filter((e=>n.indexOf(e)>-1))).length>0);var n}(t.dirtyHandlerIds,n);o||e()}finally{r=i}}))}subscribeToOffsetChange(e){Dn("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Dn(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(Dn(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return Hn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(Dn(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Hn(r,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return n?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?Kn((o=r,{x:(i=t).x+o.x,y:i.y+o.y}),n):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?Kn(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const Zn="undefined"!=typeof global?global:self,Gn=Zn.MutationObserver||Zn.WebKitMutationObserver;function Xn(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const Yn="function"==typeof Gn?function(e){let t=1;const n=new Gn(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:Xn;class Jn{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Qn=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Yn(this.flush),this.requestErrorThrow=Xn((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},er=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new Jn(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(Qn.registerPendingError);const tr="dnd-core/ADD_SOURCE",nr="dnd-core/ADD_TARGET",rr="dnd-core/REMOVE_SOURCE",ir="dnd-core/REMOVE_TARGET";function or(e,t){t&&Array.isArray(e)?e.forEach((e=>or(e,!1))):Dn("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ar;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ar||(ar={}));let sr=0;function cr(e){const t=(sr++).toString();switch(e){case ar.SOURCE:return`S${t}`;case ar.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function lr(e){switch(e[0]){case"S":return ar.SOURCE;case"T":return ar.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function ur(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}class dr{addSource(e,t){or(e),function(e){Dn("function"==typeof e.canDrag,"Expected canDrag to be a function."),Dn("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Dn("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(ar.SOURCE,e,t);return this.store.dispatch(function(e){return{type:tr,payload:{sourceId:e}}}(n)),n}addTarget(e,t){or(e,!0),function(e){Dn("function"==typeof e.canDrop,"Expected canDrop to be a function."),Dn("function"==typeof e.hover,"Expected hover to be a function."),Dn("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(ar.TARGET,e,t);return this.store.dispatch(function(e){return{type:nr,payload:{targetId:e}}}(n)),n}containsHandler(e){return ur(this.dragSources,e)||ur(this.dropTargets,e)}getSource(e,t=!1){Dn(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Dn(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Dn(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Dn(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return lr(e)===ar.SOURCE}isTargetId(e){return lr(e)===ar.TARGET}removeSource(e){var t;Dn(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:rr,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},Qn.enqueueTask(er.create(t))}removeTarget(e){Dn(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:ir,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Dn(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Dn(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=cr(e);return this.types.set(r,t),e===ar.SOURCE?this.dragSources.set(r,n):e===ar.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const fr=(e,t)=>e===t;function hr(e=qn,t){switch(t.type){case jn:break;case tr:case nr:case ir:case rr:return qn;default:return Vn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach(((e,t)=>{1===e&&i.push(t)})),i}(n,r),o=i.length>0||!function(e,t,n=fr){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!o)return qn;const a=r[r.length-1],s=n[n.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function mr(e=gr,t){const{payload:n}=t;switch(t.type){case Tn:case In:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case jn:return r=e.clientOffset,i=n.clientOffset,!r&&!i||r&&i&&r.x===i.x&&r.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pr(e,t,n[t])}))}return e}({},e,{clientOffset:n.clientOffset});case Pn:case Nn:return gr;default:return e}var r,i}function vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vr(e,t,n[t])}))}return e}const br={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function xr(e=br,t){const{payload:n}=t;switch(t.type){case In:return yr({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case kn:return yr({},e,{isSourcePublic:!0});case jn:return yr({},e,{targetIds:n.targetIds});case ir:return-1===e.targetIds.indexOf(n.targetId)?e:yr({},e,{targetIds:(r=e.targetIds,i=n.targetId,r.filter((e=>e!==i)))});case Nn:return yr({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Pn:return yr({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,i}function wr(e=0,t){switch(t.type){case tr:case nr:return e+1;case rr:case ir:return e-1;default:return e}}function Sr(e=0){return e+1}function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Cr(e,t,n[t])}))}return e}function Dr(e={},t){return{dirtyHandlerIds:hr(e.dirtyHandlerIds,{type:t.type,payload:Or({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",i=[],r.split(".").reduce(((e,t)=>e&&e[t]?e[t]:i||null),n))})}),dragOffset:mr(e.dragOffset,t),refCount:wr(e.refCount,t),dragOperation:xr(e.dragOperation,t),stateId:Sr(e.stateId)};var n,r,i}function Er(e,t=void 0,n={},r=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return On(Dr,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),o=new $n(i,new dr(i)),a=new Wn(i,o),s=e(a,t,n);return a.receiveBackend(s),a}function Tr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}let Ir=0;const kr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var jr=r.memo((function(e){var{children:n}=e,i=Tr(e,["children"]);const[o,a]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=Nr(),n,r){const i=t;i[kr]||(i[kr]={dragDropManager:Er(e,t,n,r)});return i[kr]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(i);return r.useEffect((()=>{if(a){const e=Nr();return++Ir,()=>{0==--Ir&&(e[kr]=null)}}}),[]),t.jsx(bn.Provider,{value:o,children:n})}));function Nr(){return"undefined"!=typeof global?global:window}var Pr=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},Ar=k(Pr);const Rr="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function Mr(e,t,n){const[i,o]=function(e,t,n){const[i,o]=r.useState((()=>t(e))),a=r.useCallback((()=>{const r=t(e);Ar(i,r)||(o(r),n&&n())}),[i,e,n]);return Rr(a),[i,a]}(e,t,n);return Rr((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})}),[e,o]),i}function zr(e,t,n){return Mr(t,e||(()=>({})),(()=>n.reconnect()))}function Lr(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),r.useMemo((()=>"function"==typeof e?e():e),n)}function _r(e){return r.useMemo((()=>e.hooks.dragSource()),[e])}function Fr(e){return r.useMemo((()=>e.hooks.dragPreview()),[e])}let Hr=!1,Br=!1;class Ur{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Dn(!Hr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Hr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Hr=!1}}isDragging(){if(!this.sourceId)return!1;Dn(!Br,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Br=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Br=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Wr=!1;class Kr{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Dn(!Wr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Wr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Wr=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function qr(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<o.length;a++){const c=o[a];if(!s(c))return!1;const l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,!1===i||void 0===i&&l!==u)return!1}return!0}function Vr(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function $r(e){return(t=null,n=null)=>{if(!r.isValidElement(t)){const r=t;return e(r,n),r}const i=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,t){const n=e.ref;return Dn("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?r.cloneElement(e,{ref:e=>{Gr(n,e),Gr(t,e)}}):r.cloneElement(e,{ref:t})}(i,n?t=>e(t,n):e)}}function Zr(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=$r(r);t[n]=()=>e}})),t}function Gr(e,t){"function"==typeof e?e(t):e.current=t}class Xr{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!qr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!qr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Zr({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Vr(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Vr(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Yr{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!qr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Zr({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Vr(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Jr(){const{dragDropManager:e}=r.useContext(bn);return Dn(null!=e,"Expected drag drop context"),e}class Qr{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function ei(e,t,n){const i=Jr(),o=function(e,t,n){const i=r.useMemo((()=>new Qr(e,t,n)),[t,n]);return r.useEffect((()=>{i.spec=e}),[e]),i}(e,t,n),a=function(e){return r.useMemo((()=>{const t=e.type;return Dn(null!=t,"spec.type must be defined"),t}),[e])}(e);Rr((function(){if(null!=a){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}}),[i,t,n,o,a])}function ti(e,t){const n=Lr(e,t);Dn(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=Jr();return r.useMemo((()=>new Ur(e)),[e])}(),o=function(e,t){const n=Jr(),i=r.useMemo((()=>new Xr(n.getBackend())),[n]);return Rr((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),Rr((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(n.options,n.previewOptions);return ei(n,i,o),[zr(n.collect,i,o),_r(o),Fr(o)]}function ni(e){return r.useMemo((()=>e.hooks.dropTarget()),[e])}class ri{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function ii(e,t,n){const i=Jr(),o=function(e,t){const n=r.useMemo((()=>new ri(e,t)),[t]);return r.useEffect((()=>{n.spec=e}),[e]),n}(e,t),a=function(e){const{accept:t}=e;return r.useMemo((()=>(Dn(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);Rr((function(){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}),[i,t,o,n,a.map((e=>e.toString())).join("|")])}function oi(e,t){const n=Lr(e,t),i=function(){const e=Jr();return r.useMemo((()=>new Kr(e)),[e])}(),o=function(e){const t=Jr(),n=r.useMemo((()=>new Yr(t.getBackend())),[t]);return Rr((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return ii(n,i,o),[zr(n.collect,i,o),ni(o)]}function ai(e){let t=null;return()=>(null==t&&(t=e()),t)}class si{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const i=[];return n.forEach((e=>i.push(e))),i}(this.entered.filter((t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e)))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter((e=>e!==r))),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ci{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})}))}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach((n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const li="__NATIVE_FILE__",ui="__NATIVE_URL__",di="__NATIVE_TEXT__",fi="__NATIVE_HTML__";var hi=Object.freeze({__proto__:null,FILE:li,HTML:fi,TEXT:di,URL:ui});function pi(e,t,n){const r=t.reduce(((t,n)=>t||e.getData(n)),"");return null!=r?r:n}const gi={[li]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[fi]:{exposeProperties:{html:(e,t)=>pi(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[ui]:{exposeProperties:{urls:(e,t)=>pi(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[di]:{exposeProperties:{text:(e,t)=>pi(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function mi(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(gi).filter((e=>{const n=gi[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some((e=>t.indexOf(e)>-1))}))[0]||null}const vi=ai((()=>/firefox/i.test(navigator.userAgent))),yi=ai((()=>Boolean(window.safari)));class bi{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:i,c3s:o}=this;let a=t.length-1;if(e===t[a])return n[a];let s,c=0,l=o.length-1;for(;c<=l;){s=Math.floor(.5*(c+l));const r=t[s];if(r<e)c=s+1;else{if(!(r>e))return n[s];l=s-1}}a=Math.max(0,l);const u=e-t[a],d=u*u;return n[a]+r[a]*u+i[a]*d+o[a]*u*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort(((t,n)=>e[t]<e[n]?-1:1));const i=[],o=[];let a,s;for(let r=0;r<n-1;r++)a=e[r+1]-e[r],s=t[r+1]-t[r],i.push(a),o.push(s/a);const c=[o[0]];for(let e=0;e<i.length-1;e++){const t=o[e],n=o[e+1];if(t*n<=0)c.push(0);else{a=i[e];const r=i[e+1],o=a+r;c.push(3*o/((o+r)/t+(o+a)/n))}}c.push(o[o.length-1]);const l=[],u=[];let d;for(let e=0;e<c.length-1;e++){d=o[e];const t=c[e],n=1/i[e],r=t+c[e+1]-d-d;l.push((d-t-r)*n),u.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=c,this.c2s=l,this.c3s=u}}const xi=1;function wi(e){const t=e.nodeType===xi?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Si(e){return{x:e.clientX,y:e.clientY}}function Ci(e,t,n,r,i){const o="IMG"===(a=t).nodeName&&(vi()||!(null===(s=document.documentElement)||void 0===s?void 0:s.contains(a)));var a,s;const c=wi(o?e:t),l={x:n.x-c.x,y:n.y-c.y},{offsetWidth:u,offsetHeight:d}=e,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:p,dragPreviewHeight:g}=function(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return yi()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,t,u,d),{offsetX:m,offsetY:v}=i,y=0===v||v;return{x:0===m||m?m:new bi([0,.5,1],[l.x,l.x/u*p,l.x+p-u]).interpolate(f),y:y?v:(()=>{let e=new bi([0,.5,1],[l.y,l.y/d*g,l.y+g-d]).interpolate(h);return yi()&&o&&(e+=(window.devicePixelRatio-1)*g),e})()}}class Oi{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function Di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Di(e,t,n[t])}))}return e}class Ti{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ei({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Ei({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(hi).some((t=>hi[t]===e))}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=gi[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new ci(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout((()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&wi(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Si(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,i=mi(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){const{anchorX:e,anchorY:o,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=Ci(t,i,n,{anchorX:e,anchorY:o},{offsetX:a,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(i)this.beginDragNativeItem(i);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=mi(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Si(e)});t.some((e=>this.monitor.canDropOnTarget(e)))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Si(e),this.scheduleHover(t);(t||[]).some((e=>this.monitor.canDropOnTarget(e)))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):mi(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Si(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Oi(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new si(this.isNodeInDocument)}}const Ii=function(e,t,n){return new Ti(e,t,n)};var ki={exports:{}};!function(e,t){function n(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var r="object"==typeof process&&!0;function i(e,t){if(!e){if(r)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=i;var o=Object.prototype.hasOwnProperty,a=Array.prototype.splice,s=Object.prototype.toString;function c(e){return s.call(e).slice(8,-1)}var l=Object.assign||function(e,t){return u(t).forEach((function(n){o.call(t,n)&&(e[n]=t[n])})),e},u="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?l(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?l(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=l({},h),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||i(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),i("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var a=e;return u(r).forEach((function(t){if(o.call(n.commands,t)){var i=e===a;a=n.commands[t](r[t],a,r,e),i&&n.isEquals(a,e)&&(a=e)}else{var s="Map"===c(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),l="Map"===c(a)?a.get(t):a[t];n.isEquals(s,l)&&(void 0!==s||o.call(e,t))||(a===e&&(a=d(e)),"Map"===c(a)?a.set(t,s):a[t]=s)}})),a},e}();t.Context=f;var h={$push:function(e,t,n){return g(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return g(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,o){return function(e,t){i(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+n(e)})),v(t.$splice)}(t,r),e.forEach((function(e){v(e),t===o&&e.length&&(t=d(o)),a.apply(t,e)})),t},$set:function(e,t,n){return function(e){i(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){m(e,"$toggle");var n=e.length?d(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return m(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=d(r)),delete t[e])})),t},$add:function(e,t,n,r){return y(t,"$add"),m(e,"$add"),"Map"===c(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=d(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=d(r)),t.add(e)})),t},$remove:function(e,t,n,r){return y(t,"$remove"),m(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=d(r)),t.delete(e)})),t},$merge:function(e,t,r,o){var a,s;return a=t,i((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(s)})),i(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+n(a)})),u(e).forEach((function(n){e[n]!==t[n]&&(t===o&&(t=d(o)),t[n]=e[n])})),t},$apply:function(e,t){var r;return i("function"==typeof(r=e),(function(){return"update(): expected spec of $apply to be a function; got "+n(r)+"."})),e(t)}},p=new f;function g(e,t,r){i(Array.isArray(e),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(e)+"."})),m(t[r],r)}function m(e,t){i(Array.isArray(e),(function(){return"update(): expected spec of "+n(t)+" to be an array; got "+n(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){i(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var r=c(e);i("Map"===r||"Set"===r,(function(){return"update(): "+n(t)+" expects a target of type Set or Map; got "+n(r)}))}t.isEquals=p.update.isEquals,t.extend=p.extend,t.default=p.update,t.default.default=e.exports=l(t.default,t)}(ki,ki.exports);var ji=k(ki.exports),Ni=function(e){var n=e.type,i=e.onMoveItem,o=e.index,a=e.id,s=e.children,c=e.style,l=e.className,u=r.useRef(null),d=N("zt-sortable",l,{}),f=oi({accept:n,hover:function(e,t){var n;if(u.current){var r=e.index,a=o;if(r!==a){var s=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(s.bottom-s.top)/2,l=t.getClientOffset().y-s.top;r<a&&l<c||r>a&&l>c||(i(r,a),e.index=a)}}}}),h=f[1],p=ti({type:n,item:function(){return{id:a,index:o}},collect:function(e){return{isDragging:e.isDragging()}}}),g=p[0].isDragging?0:1;return(0,p[1])(h(u)),t.jsx("div",O({ref:u,className:d,style:O(O({},c),{opacity:g})},{children:s}))},Pi=500;function Ai(e,t,n){if(e&&t&&Array.isArray(n)){var r=[];try{r=(JSON.parse(localStorage.getItem(t)||"{}")||{})[e]}catch(e){console.log(e)}var i=Array.isArray(r)&&r.length>0?r:[];return r&&0!==r.length?n.forEach((function(e,t){var n=O({checked:!0},e),r=i.find((function(e){return e.key===n.key}));r?(r.label=n.label,r.isFind=!0):i.push(O(O({},n),{isFind:!0}))})):n.forEach((function(e){var t=O(O({},e),{checked:void 0===e.checked||e.checked});i.push(O(O({},t),{isFind:!0}))})),i.filter((function(e){return e.isFind})).map((function(e){var t=O({},e);return Reflect.deleteProperty(t,"isFind"),t}))}return[]}function Ri(e,t,n,i,o,a,s){var c=r.useState(!1),l=c[0],u=c[1],d=r.useCallback((function(){return e=i,t="".concat(i,"_lru_key"),function(n,r){var i={},o=[];try{i=JSON.parse(localStorage.getItem(e)||"{}")||{},o=JSON.parse(localStorage.getItem(t)||"[]")||[]}catch(e){console.error(e)}o.length!==Object.keys(i).length&&(o=Object.keys(i));var a=o.findIndex((function(e){return e===n}));if(-1!==a?(o.splice(a,1),o.push(n)):o.push(n),o.length>Pi){var s=o.shift();try{delete i[s]}catch(e){}}i[n]=r,localStorage.setItem(e,JSON.stringify(i)),localStorage.setItem(t,JSON.stringify(o))};var e,t}),[i]),f=r.useCallback((function(){u(!1),o(e)}),[o,e]),h=r.useCallback((function(){u(!1),t(a),s(a),o(a),d()(n,a)}),[a,t,n,d,o]),p=r.useCallback((function(e){u(!1),t(e),o(e),s(e),d()(n,e)}),[t,n,d,o]);return{visible:l,setVisible:u,onClose:f,onReset:h,onSure:p}}var Mi=function(e,i){var o=e.list,a=e.dynamicKey,s=e.parentDynamicKey,c=e.title,l=void 0===c?"自定义配置":c,u=e.onCurrentListChange,d=function(e,t,n){var i=r.useMemo((function(){return Ai(e,t,n)}),[e,t,n]),o=r.useState(i),a=o[0],s=o[1],c=r.useState(i),l=c[0],u=c[1];return r.useEffect((function(){i&&(s(i),u(i))}),[i]),{currentDynamicList:a,setCurrentDynamicList:s,tempDynamicList:l,setTempDynamicList:u}}(a,s,o),f=d.currentDynamicList,h=d.setCurrentDynamicList,p=d.tempDynamicList,g=d.setTempDynamicList,m=Ri(f,h,a,s,g,o,u),v=m.visible,y=m.setVisible,b=m.onClose,x=m.onReset,w=m.onSure;r.useImperativeHandle(i,(function(){return{setVisible:y}}));var S=r.useMemo((function(){var e=[];return p.forEach((function(t){t.checked&&e.push(t.key)})),e}),[p]),C=r.useCallback((function(e,t){g((function(n){var r=n[e];return ji(n,{$splice:[[e,1],[t,0,r]]})}))}),[g]),D=function(){w&&w(p)};return t.jsx(n.Drawer,O({className:"dynamic-drawer",title:t.jsxs("div",{children:[t.jsx(Gt,{style:{fontSize:16}}),t.jsxs("span",O({className:"search-drawer--title-text"},{children:[l,t.jsx("span",{children:"(拖拽排序)"})]}))]}),width:300,placement:"right",open:v,closable:!1,maskClosable:!1,footer:t.jsxs(t.Fragment,{children:[t.jsx(R,O({type:"default",onClick:b},{children:"取消"})),t.jsx(R,O({type:"default",onClick:x},{children:"重置"})),t.jsx(R,O({type:"primary",onClick:D},{children:"确定"}))]})},{children:t.jsx(jr,O({backend:Ii,context:window},{children:t.jsx(n.Checkbox.Group,O({value:S,onChange:function(e){var t=p.map((function(e){return O({},e)}))||[];t.forEach((function(t){e.find((function(e){return e===t.key}))?t.checked=!0:t.checked=!1})),g(t)}},{children:p.map((function(e,r){return t.jsx(Ni,O({type:"search-drawer",index:r,onMoveItem:C},{children:t.jsx(n.Checkbox,O({value:e.key,disabled:e.disabled},{children:e.label||e.key}))}),e.key)}))}))}))}))};Mi.displayName="ZTXK_WEBUI_DynamicDrawer";var zi=r.memo(r.forwardRef(Mi)),Li=function(e,n){var i=e.dynamicKey,o=e.parentDynamicKey,a=e.defaultList,s=e.children,c=e.title,l=e.onCurrentListChange,u=e.hiddenOperationIcon,d=r.useState(a),f=d[0],h=d[1],p=r.useRef({});return r.useImperativeHandle(n,(function(){return{getCurrentDynamicList:function(e){return Ai(i,o,e)},setList:h,setVisible:function(e){var t;null===(t=p.current)||void 0===t||t.setVisible(e)}}})),Array.isArray(f)&&f.length>0?t.jsxs("div",O({className:"ztxk-dynamic-setting"},{children:[u?null:t.jsx("div",O({onClick:function(){var e;return null===(e=p.current)||void 0===e?void 0:e.setVisible(!0)}},{children:s||t.jsx(Gt,{style:{fontSize:18,color:"#768696"}})})),t.jsx(zi,{list:f,dynamicKey:i,parentDynamicKey:o,ref:p,title:c,onCurrentListChange:l})]})):null};Li.displayName="ZTXK_WEBUI_DynamicSetting";var _i=r.memo(r.forwardRef(Li));var Fi=r.memo((function(e){var n=e.items,r=e.outsideState;return t.jsx(t.Fragment,{children:Array.isArray(n)?null==n?void 0:n.map((function(e,n){return t.jsx($i,O({index:n},e,{outsideState:r}),"".concat(e.name||n))})):null})})),Hi=r.memo((function(e){var n=e.children,r=e.value;return t.jsx("div",O({className:"ztxk-form--detault-dom"},{children:n||(r||"— —")}))})),Bi="ztxk-webui-dynamic-form",Ui=r.memo((function(e){var i=e.form,o=e.bottomBorder,a=e.isFlex,s=void 0===a||a,c=e.wrapClassName,l=e.leftClassName;e.itemClassName;var u=e.rightWrapVisible,d=e.rightClassName,f=e.children,h=e.dynamicKey,p=e.formPreferences,g=e.items,m=e.outsideState,v=e.onValuesChange,y=e.onResetHandle,b=e.onSearchHandle,x=e.type,w=D(e,["form","bottomBorder","isFlex","wrapClassName","leftClassName","itemClassName","rightWrapVisible","rightClassName","children","dynamicKey","formPreferences","items","outsideState","onValuesChange","onResetHandle","onSearchHandle","type"]),S=function(e,t){return{configInfoItems:r.useMemo((function(){return e?null==t?void 0:t.map((function(t){var n,r,i,o=t.name,a=t.configName||o;return O(O({},t),{isDisplay:null===(n=e[a])||void 0===n?void 0:n.isDisplay,isRequired:null===(r=e[a])||void 0===r?void 0:r.isRequired,isChangeable:null===(i=e[a])||void 0===i?void 0:i.isChangeable})})):t}),[e,t])}}(p,g).configInfoItems,C=function(e,t,n){var i=r.useRef({}),o=r.useMemo((function(){var n=[];return t&&e&&(n=e.map((function(e){return{key:e.name,label:e.label,disabled:!0===e.dynamicDisabled,checked:!1!==e.isDisplay}}))),n}),[t,e]);r.useEffect((function(){var e,r;n&&t&&(null===(r=null===(e=i.current)||void 0===e?void 0:e.setList)||void 0===r||r.call(e,o))}),[n,t]);var a=r.useState((function(){return Ai(t,Bi,o)})),s=a[0],c=a[1],l=r.useCallback((function(e){c(e)}),[]),u=r.useMemo((function(){var t=[];return Array.isArray(s)&&s.length>0&&s.forEach((function(n){var r=n.key,i=n.checked,o=null==e?void 0:e.find((function(e){return(null==e?void 0:e.name)===r}));o&&(o.isDisplay=!!i,t.push(o))})),t}),[e,s]);return{dynamicList:o,currentDynamicList:s,onCurrentListChange:l,newItems:u,dynamicSettingRef:i}}(S,h,p),E=C.dynamicList,T=C.onCurrentListChange,I=C.newItems,k=C.dynamicSettingRef,j=N("ztxk-form",c,{"ztxk-form--bottom-border":o,"ztxk-form--list":"list"===x}),P=N("ztxk-form__left",l,{"ztxk-form__left--flex":s}),A=N("ztxk-form__right",d),M=r.useMemo((function(){var e={};if(g)for(var t=0;t<g.length;t++){var n=g[t];"string"==typeof n.name&&n.shouldUpdateNames&&n.shouldUpdateClear&&(e[n.name]="boolean"==typeof n.shouldUpdateClear?n.shouldUpdateNames:n.shouldUpdateClear)}return e}),[g]),z=r.useCallback((function(e,t){if(e){var n=Object.keys(e);Object.keys(M).forEach((function(e){var t,r,o=M[e]?M[e]:[];n.find((function(e){return o.includes(e)}))&&(null===(r=null==i?void 0:i.setFieldsValue)||void 0===r||r.call(i,((t={})[e]=void 0,t)))}))}v&&v(e,t)}),[v,M,i]),L=function(e,t){var n=t.onResetHandle,i=t.onSearchHandle;return{onResetHandleInner:r.useCallback((function(){null==e||e.resetFields(),n&&n()}),[e,n]),onSearchHandleInner:r.useCallback((function(){var t=null==e?void 0:e.getFieldsValue();i&&i(t)}),[e,i])}}(i,{onSearchHandle:b,onResetHandle:y}),_=L.onSearchHandleInner,F=L.onResetHandleInner;return t.jsxs(n.Form,O({form:i,onValuesChange:z},w,{className:j},{children:[t.jsx("div",O({className:P},{children:g?t.jsx(Fi,{items:h?I:S,outsideState:m}):f})),h?t.jsx(_i,{dynamicKey:h,parentDynamicKey:Bi,defaultList:E,onCurrentListChange:T,ref:k}):null,u?t.jsxs("div",O({className:A},{children:[t.jsx(R,O({type:"default",onClick:F},{children:"重置"})),t.jsx(R,O({type:"primary",onClick:_},{children:"查询"}))]})):null]}))}));function Wi(e,t,n){return function e(t,r){if(t===r)return!0;if((null==t?void 0:t.$$typeof)&&(null==r?void 0:r.$$typeof))return(null==t?void 0:t.key)===(null==r?void 0:r.key);if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var i=0;i<t.length;i++)if(!e(t[i],r[i]))return!1;return!0}if(t&&r&&"object"==typeof t&&"object"==typeof r){var o=Object.keys(t);return o.length===Object.keys(r).length&&o.every((function(i){return!(!n||!n.includes(i))||e(t[i],r[i])}))}return!1}(e,t)}Ui.displayName="ZTXK_WEBUI_Form",Ui.useForm=n.Form.useForm,Ui.Item=n.Form.Item,Ui.List=n.Form.List,Ui.ErrorList=n.Form.ErrorList,Ui.Provider=n.Form.Provider,Ui.useFormInstance=n.Form.useFormInstance,Ui.useWatch=n.Form.useWatch,Ui.DefaultDom=Hi;var Ki=function(e){var r,i=e.children,o=e.isDisplay,a=e.isRequired,s=e.isChangeable,c=e.isStress,l=e.preNode,u=e.nextNode;e.dynamicDisabled;var d=e.hiddenBorder,f=e.singleSelectShowBorder,h=e.hiddenLabel,p=e.width,g=e.className,m=e.itemClassName,v=e.render,y=e.shouldUpdateNames;e.shouldUpdateClear;var b=e.dependencies,x=e.shouldUpdate;e.index,e.outsideState,e.shouldUpdateBeOutsideState;var w=e.nonForm,S=D(e,["children","isDisplay","isRequired","isChangeable","isStress","preNode","nextNode","dynamicDisabled","hiddenBorder","singleSelectShowBorder","hiddenLabel","width","className","itemClassName","render","shouldUpdateNames","shouldUpdateClear","dependencies","shouldUpdate","index","outsideState","shouldUpdateBeOutsideState","nonForm"]),C=Ui.useFormInstance();if(w)return v?v({},C):t.jsx(n.Col,{className:"ztxk-form__item--collapse",span:24});if(!1===o||"0"===o)return null;if(void 0!==a){var E=!!a,T=Array.isArray(S.rules)?S.rules:[],I=T.findIndex((function(e){return"function"!=typeof e&&(!0===(null==e?void 0:e.required)||!1===(null==e?void 0:e.required))}));if(-1!==I){var k=null===(r=T[I])||void 0===r?void 0:r.message;T.splice(I,1,{required:E,message:k})}else T.unshift({required:E,message:"".concat(S.label," 未填!")});S.rules=T}var j={disabled:!1};void 0!==s&&(j.disabled="0"===s||!s);var P=N("ztxk-form__item",m,{"ztxk-form__item--disabled":j.disabled,"ztxk-form__item--hidden-border":d,"ztxk-form__item--hidden-label":h,"ztxk-form__item--single-show-border":f,"ztxk-form__item--stress":c});if(b)return t.jsxs(Vi,O({width:p,className:g},{children:[l||null,t.jsx(Ui.Item,O({dependencies:b,noStyle:!0},{children:function(e){return t.jsx(Ui.Item,O({},S,{className:P},{children:v&&v(j,e)}))}})),u||null]}));if(x||y){var A=y?function(e,t,n){for(var r=0;r<y.length;r++){var i=y[r];if(e[i]!==t[i])return!0}return"function"==typeof x?x(e,t,n):"boolean"==typeof x&&x}:x;return t.jsxs(Vi,O({width:p,className:g},{children:[l||null,t.jsx(Ui.Item,O({shouldUpdate:A,noStyle:!0},{children:function(e){return S.name?t.jsx(Ui.Item,O({},S,{className:P},{children:v&&v(j,e)})):v&&v(j,e)}})),u||null]}))}return t.jsxs(Vi,O({width:p,className:g},{children:[l||null,t.jsx(Ui.Item,O({},S,{className:P},{children:v?v(j,C):i})),u||null]}))};function qi(e){if("number"==typeof e)return e;switch(e){case"half":return 4;case"all":return 24;case"double":return 16;case"halfAll":return 12;default:return 8}}function Vi(e){var r=e.className,i=e.children,o=e.width,a=N("ztxk-form__item--wrap",r);return t.jsx(n.Col,O({className:a,span:qi(o)},{children:i}))}Ki.displayName="ZTXK_WEBUI_FormItem";var $i=r.memo(Ki,(function(e,t){return(null==t?void 0:t.shouldUpdateBeOutsideState)?!!Wi(e,t,["render","shouldUpdateBeOutsideState","shouldUpdate","outsideState"])&&!t.shouldUpdateBeOutsideState(e.outsideState,t.outsideState):Wi(e,t)}));const Zi=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Gi=(()=>{if("undefined"==typeof document)return!1;const e=Zi[0],t={};for(const n of Zi){const r=n?.[1];if(r in document){for(const[r,i]of n.entries())t[e[r]]=i;return t}}return!1})(),Xi={change:Gi.fullscreenchange,error:Gi.fullscreenerror};let Yi={request:(e=document.documentElement,t)=>new Promise(((n,r)=>{const i=()=>{Yi.off("change",i),n()};Yi.on("change",i);const o=e[Gi.requestFullscreen](t);o instanceof Promise&&o.then(i).catch(r)})),exit:()=>new Promise(((e,t)=>{if(!Yi.isFullscreen)return void e();const n=()=>{Yi.off("change",n),e()};Yi.on("change",n);const r=document[Gi.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})),toggle:(e,t)=>Yi.isFullscreen?Yi.exit():Yi.request(e,t),onchange(e){Yi.on("change",e)},onerror(e){Yi.on("error",e)},on(e,t){const n=Xi[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=Xi[e];n&&document.removeEventListener(n,t,!1)},raw:Gi};Object.defineProperties(Yi,{isFullscreen:{get:()=>Boolean(document[Gi.fullscreenElement])},element:{enumerable:!0,get:()=>document[Gi.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[Gi.fullscreenEnabled])}}),Gi||(Yi={isEnabled:!1});var Ji=Yi;var Qi=function(e){var i=e.loading,o=function(e){var t=r.useState(1),n=t[0],i=t[1];return r.useEffect((function(){e||i(1)}),[e]),r.useEffect((function(){if(e){var t=setInterval((function(){i((function(e){return e+1}))}),1e3);return function(){t&&clearInterval(t)}}}),[e]),{countTimer:n}}(i).countTimer;return t.jsx(n.Spin,{spinning:i,size:"large",tip:"".concat(o),className:"ztxk-container__loading",style:{display:i?"flex":"none"}})},eo=r.memo((function(e){var n=e.children,r=e.isMarginTop,i=e.className,o=N("ztxk-container--btn-wrap",i,{"btn-wrap--margin-top":r});return t.jsx("div",O({className:o},{children:n}))})),to=r.memo((function(e){var n=e.className,r=e.isFlex,i=e.children,o=e.loading,a=e.footerDom,s=N("ztxk-container__content",n,{"ztxk-container__content--flex":r});return t.jsxs("div",O({className:"ztxk-container"},{children:[t.jsx(Qi,{loading:o}),t.jsx("div",O({className:s},{children:i})),t.jsx(ro,{footerDom:a})]}))}));to.displayName="ZTXK_WEBUI_ContainerMemo",to.ButtonWrap=eo;var no=["10","20","30","100"],ro=r.memo((function(e){var n=e.children,r=e.className,i=e.align,o=void 0===i?"left":i,a=e.footerDom,s=N("ztxk-footer",r);return t.jsx("footer",O({className:s,style:{justifyContent:"left"===o?"flex-start":"center"===o?"center":"flex-end"}},{children:a?t.jsxs("div",O({className:"ztxk-footer--group"},{children:[a.map((function(e,n){var r=e.DOMType,i=e.render;if("button"===r){var o=e.type,a=void 0===o?"primary":o,s=e.loading,c=e.disabled,l=e.onClick;return t.jsx(R,O({type:a,loading:s,disabled:c,onClick:l},{children:e.text}),n)}if("pagination"===r){var u=e.total,d=e.pageSize,f=e.current,h=e.onChange,p=e.onShowSizeChange,g=e.pageSizeOptions;return t.jsx(io,{total:u,pageSize:d,current:f,onChange:h,onShowSizeChange:p,showTotal:function(e){return"共".concat(e,"条")},showSizeChanger:!0,pageSizeOptions:g||no},n)}return i?i():null})),n]})):null}))})),io=function(e){var r=e.className,i=D(e,["className"]),o=N("ztxk-pagination",r,{});return t.jsx(n.Pagination,O({className:o},i))},oo="ztxk-webui-dynamic-table",ao=Symbol("table-drag-row"),so=["bottomLeft"],co=["10","20","30","40"],lo="error-td",uo="ascend",fo="descend";var ho=function(e){var n=e.className,r=D(e,["className"]),i=N("ztxk-table__enhance-row",n);return t.jsx("tr",O({className:i},r))},po=function(e){var n=e.className,i=e.style,o=e.index,a=e.moveRow,s=D(e,["className","style","index","moveRow"]),c=function(e,t){var n=r.useRef(null),i=oi((function(){return{accept:ao,collect:function(e){return(e.getItem()||{}).index,{}},drop:function(n){if(!t)throw new Error("请定义移动行后触发的函数 onmoveRow");t(n.index,e)}}}),[e])[1],o=ti({type:ao,item:{index:e},collect:function(e){return{isDragging:e.isDragging()}},canDrag:function(e){var t;return!(null===(t=document.activeElement)||void 0===t?void 0:t.tagName.toLowerCase().match(/input|textarea/))}});return i((0,o[1])(n)),{ref:n}}(o,a).ref,l=N("ztxk-table__enhance-row",n);return t.jsx("tr",O({ref:c,style:O({cursor:"move"},i),className:l},s))};function go(e,t){var n=null==e?void 0:e.current;return n?n.pageSize*(n.page-1)+(t||0):t}var mo=function(e){var n=e.record,i=e.index,o=e.editable,a=e.editableConfig,s=e.dataIndex;e.title;var c=e.onEditableSave;e.onMouseEnter,e.onMouseLeave;var l=e.children,u=e.currentPage,d=e.isValidate,f=D(e,["record","index","editable","editableConfig","dataIndex","title","onEditableSave","onMouseEnter","onMouseLeave","children","currentPage","isValidate"]),h=go(u,i),p=r.useState(n?n[s]:void 0),g=p[0],m=p[1],v=function(){var e=r.useState(!1),t=e[0],n=e[1];return{editing:t,toggleEdit:function(){n(!t)}}}(),y=v.editing,b=v.toggleEdit,x=function(e){var t=r.useRef();return r.useEffect((function(){e&&t.current.focus()}),[e]),t}(y),w=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n;e.current&&(null===(n=(t=e.current.classList).contains)||void 0===n?void 0:n.call(t,lo))&&e.current.classList.remove(lo)}),[]);return{tdRef:e,removeErrorClass:t}}(),S=w.tdRef,C=w.removeErrorClass,E=function(e){var t;if(!c)throw Error("如果开启了editable, 那么必须传递 onEditableSave属性 来更改表格数据!");b(),c(O(O({},n),((t={})[s]=g,t)),h,s)};if(o){var T=a||{type:"input"},I=T.type,k=D(T,["type"]),j=null;return"input"===I&&(j=t.jsx(M,O({value:g,onChange:function(e){m(e.target.value),d&&C()},onPressEnter:E,onBlur:E,ref:x},k))),"inputNumber"===I&&(j=t.jsx(F,O({value:g,onChange:function(e){m(e),d&&C()},onPressEnter:E,onBlur:E,ref:x},k))),t.jsx("td",O({ref:S},f,{children:y?t.jsx("div",O({className:"ztxk-table__enhance-cell"},{children:j})):t.jsx("div",O({className:"ztxk-table__enhance-cell-wrap",onClick:b},{children:l}))}))}return t.jsx("td",O({ref:S},f,{children:l}))},vo=r.memo((function(e){var n=e.dynamicSettingRef;return t.jsx(Wt,{onClick:function(){var e;null===(e=null==n?void 0:n.current)||void 0===e||e.setVisible(!0)}})})),yo=r.memo((function(e){var r=e.onAddAndDel;return t.jsx(n.Popconfirm,O({title:"确定删除所有吗?",onConfirm:function(){return r&&r("delAll",0)}},{children:t.jsx(Ht,{title:"删除所有行"})}))})),bo=r.memo((function(e){var r=e.isAdd,i=e.isDel,o=e.onAddAndDel,a=e.index;return t.jsxs(t.Fragment,{children:[r?t.jsx("div",O({className:"ztxk-column--adddel-icon"},{children:t.jsx(Vt,{title:"新增一行",onClick:function(){o&&o("add",a)}})})):null,i?t.jsx("div",O({className:"ztxk-column--adddel-icon"},{children:t.jsx(n.Popconfirm,O({title:"确定删除吗?",onConfirm:function(){return o&&o("del",a)}},{children:t.jsx(Lt,{title:"删除一行"})}))})):null]})}));var xo=r.memo((function(e){var r=e.copyKey,i=e.dataSourceRef;return t.jsxs("div",O({onClick:function(){!function(e,t){var r,i;if(Array.isArray(t)){var o=t.map((function(t){if("string"==typeof e)return t[e];var n="";return e.forEach((function(e){return n+=t[e]})),n})).join("\n");try{if((null===navigator||void 0===navigator?void 0:navigator.clipboard)&&window.isSecureContext)null===(i=null===(r=navigator.clipboard)||void 0===r?void 0:r.writeText(o))||void 0===i||i.then((function(){n.message.info("复制成功!")}));else{var a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand?(n.message.info("复制成功!"),document.execCommand("copy")):n.message.info("复制失败!请手工复制\n ".concat(o)),document.body.removeChild(a)}}catch(e){n.message.info("复制失败!请手工复制\n ".concat(o))}}}(r,i.current)}},{children:[t.jsx(It,{type:"icon-copy",style:{fontSize:"16px"},className:"thead-icon"}),"复制整列"]}))})),wo=r.memo((function(e){var r=e.isFillDown,i=e.dataSourceRef,o=e.dataKey,a=e.onTableChange;return t.jsx(n.Tooltip,O({title:"点击往下填充,会将该列的第一条数据往下填充覆盖至所有数据的该列都应用此值"},{children:t.jsxs("div",O({onClick:function(){if(!Array.isArray(null==i?void 0:i.current)||(null==i?void 0:i.current.length)<=1||!r)n.message.info("数据不需要填充!");else{var e=[],t=i.current[0][o],s=!1;!0===r?e=i.current.map((function(e){var n;return e[o]!==t&&(s=!0),O(O({},e),((n={})[o]=t,n))})):(s=!0,e=i.current.map((function(e,n){return r({index:n,text:t,record:e})}))),s&&a&&a(e,i.current,{type:"fillDown"})}}},{children:[t.jsx(dn,{style:{fontSize:"16px"},className:"thead-icon"}),"往下填充"]}))}))})),So=r.memo((function(e){var r=e.copyKey,i=e.dataSourceRef,o=e.isFillDown,a=e.dataKey,s=e.onTableChange,c=[];return("string"==typeof r||Array.isArray(r))&&c.push({key:"copy",label:t.jsx(xo,{copyKey:r,dataSourceRef:i})}),o&&c.push({key:"fill",label:t.jsx(wo,{dataKey:a,isFillDown:o,dataSourceRef:i,onTableChange:s})}),t.jsx(t.Fragment,{children:c.length>0?t.jsx(n.Dropdown,O({menu:{items:c},trigger:["click"]},{children:t.jsx(R,{type:"link",icon:t.jsx(Nt,{}),title:"一些工具方法"})})):null})})),Co=function(e){var n=e.title,i=e.field,o=e.onChange,a=e.customOrder,s=e.setCustomOrder,c=a&&(null==a?void 0:a.field)===i?null==a?void 0:a.order:null,l=r.useMemo((function(){return c===uo?"点击降序":c===fo?"取消排序":"点击升序"}),[c]);return t.jsxs("div",O({className:"ztxk-table--sorter"},{children:[t.jsx("div",O({className:"ztxk-table--sorter-title"},{children:"function"==typeof n?n({}):n})),t.jsxs("div",O({className:"ztxk-table--sorter-icon",onClick:function(e){var t;e.stopPropagation(),s(c===uo?{field:i,order:t=fo}:c===fo?{field:i,order:t=null}:{field:i,order:t=uo}),o&&o({field:i,order:t})},title:l},{children:[t.jsx(Dt,{className:N("ant-table-column-sorter-up",{active:c===uo})}),t.jsx(St,{className:N("ant-table-column-sorter-down",{active:c===fo})})]}))]}))};function Oo(e,n){var r=n.dynamicKey,i=n.currentDynamicList,o=n.dataSourceRef,a=n.onEditableSave,s=n.isEdit,c=n.isAdd,l=n.isDel,u=n.dynamicSettingRef,d=n.onAddAndDel,f=n.getRefreshScuCell,h=n.isDelAll,p=n.currentPage,g=n.onTableChange,m=n.order,v=n.setOrder,y=n.customSortHandle,b=function(e,t){if(Array.isArray(t)&&t.length>0&&e){var n=[],r=[],i=[];return t.forEach((function(t){var n=t.key,i=t.checked,o=e.find((function(e){return(e.key===n||(null==e?void 0:e.dataIndex)===n)&&i}));o&&r.push(o)})),e.filter((function(e){return e.fixed})).forEach((function(e){"left"===e.fixed?n.push(e):"right"===e.fixed&&i.push(e)})),I(I(I([],n,!0),r,!0),i,!0)}return e}(e,i),x=[];if(Array.isArray(b)){if(b.forEach((function(e){var n=O(O({},e),{__title:e.title}),r=n.isCopy,i=n.editable,c=n.editableConfig,l=n.title,u=n.key,d=n.validate,h=n.isRequire,b=n.isFillDown,w=n.isOrder,S=u||(null==n?void 0:n.dataIndex);if(w&&(n.title=t.jsx(Co,{title:l,field:S,onChange:y,customOrder:m,setCustomOrder:v})),(b||r)&&(n.title=t.jsx("div",O({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:t.jsxs(t.Fragment,{children:[n.title,t.jsx(So,{copyKey:!0===r?S:r,dataSourceRef:o,isFillDown:b,dataKey:S,onTableChange:g})]})}))),h&&(n.title=t.jsxs(t.Fragment,{children:[t.jsx("i",O({className:"ztxk-column--required"},{children:"*"})),n.title]})),i&&s&&(n.onCell=function(e,t){return{record:e,index:t,editable:i,editableConfig:c,dataIndex:S,title:l,onEditableSave:a,currentPage:p,isValidate:!!d}}),n.shouldCellUpdate){var C=n.shouldCellUpdate;n.shouldCellUpdate=function(e,t){return!(!f||!f())||C(e,t)}}n.render||n.editable||(n.render=function(e,t,n){return"object"==typeof e||null==e||""===e?"— —":e}),x.push(n)})),c||l){var w={title:function(){return h?t.jsx(yo,{}):null},width:52,fixed:"left",align:"center",render:function(e,n,r){return t.jsx(bo,{isAdd:c,isDel:l,index:r,onAddAndDel:d})}};x.unshift(w)}r&&(x[0].title=function(){return c||l?t.jsxs(t.Fragment,{children:[h?t.jsx(yo,{}):null,t.jsx(vo,{dynamicSettingRef:u})]}):t.jsx(vo,{dynamicSettingRef:u})})}return{newColumns:x}}function Do(e,i,o){var a=o.summaryFixed,s=o.rowSelection,c=o.expandable,l=o.isAdd,u=o.isDel,d=!!c,f=!(!l&&!u),h=Number(!!s)+Number(d),p=r.useCallback((function(r){var o=function(e,t,n){var r=[],i=n.fillNumber,o=n.columns;Array.isArray(e)&&e.forEach((function(e){var n=e.type,a=e.fields,s=e.title;switch(n){case"subtotal":if(!Array.isArray(a))return;if(0===a.length)return;var c=function(e,t){if(!Array.isArray(t))return null;var n={};return t.forEach((function(r,i){e.forEach((function(e){if("string"==typeof e){var o=Number(null==r?void 0:r[e]);o=isNaN(o)?0:o;var a=(null==n?void 0:n[e])||0;n[e]=a?Eo(a,o):o}else{var s=e.key,c=e.showKey,l=e.toFixedNum,u=e.value,d=e.callback;o=Number(null==r?void 0:r[s]);o=isNaN(o)?0:o;var f=(null==n?void 0:n[s])||0;if(u)if(Array.isArray(u))n[s]=u.map((function(e,t){var n=Array.isArray(l)?l[t]:l,r=Number(e);return isNaN(r)||"number"!=typeof n?e:r.toFixed(n)}));else{var h=Number(u);n[s]="number"==typeof l?isNaN(h)?u:h.toFixed(l):u}else if(c)if("string"==typeof c){var p=Number(null==r?void 0:r[c]);p=isNaN(p)?0:p,n[s]=f?"number"==typeof l?Eo(f,p).toFixed(l):Eo(f,p):"number"==typeof l?p.toFixed(l):p}else n[s]=c.map((function(e,t){var n=Number(null==r?void 0:r[e]);n=isNaN(n)?0:n;var i=Array.isArray(l)?l[t]:l;if(f){var o=Number(f[t]);return"number"==typeof i?Eo(o,n).toFixed(i):Eo(o,n)}return"number"==typeof i?n.toFixed(i):n}));else n[s]=f?"number"==typeof l?Eo(f,o).toFixed(l):Eo(f,o):"number"==typeof l?o.toFixed(l):o;d&&i===t.length-1&&(n[s]=d(n[s]))}}))})),n}(a,t),l=[],u=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){l.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),u.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(l.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),u.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"小计",titleIndex:0+i,key:"subtotal",list:Array(i).fill(void 0).concat(l),columnList:Array(i).fill(void 0).concat(u)});break;case"total":if(!Array.isArray(a))return;if(0===a.length)return;var d=function(e){var t={};return e.forEach((function(e){if("object"==typeof e){var n=e.key,r=e.toFixedNum,i=e.value,o=e.callback;if(null!=i)if(Array.isArray(i))t[n]=i.map((function(e,t){var n=Number(e);n=isNaN(n)?0:n;var i=Array.isArray(r)?r[t]:r;return"number"==typeof i?n.toFixed(i):e}));else{var a=Number(i);a=isNaN(a)?0:a,t[n]="number"==typeof r?a.toFixed(r):i}else t[n]=0;o&&(t[n]=o(t[n]))}})),t}(a),f=[],h=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),h.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),h.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"总计",titleIndex:0+i,key:"total",list:Array(i).fill(void 0).concat(f),columnList:Array(i).fill(void 0).concat(h)})}}));return r}(e,r,{fillNumber:h,columns:i});return t.jsx(n.Table.Summary,O({fixed:a},{children:o.map((function(e){var r=e.title,i=e.key,o=e.titleIndex,a=e.list;return t.jsx(n.Table.Summary.Row,{children:Array.isArray(a)&&a.map((function(e,i){return o+Number(f)===i?t.jsx(n.Table.Summary.Cell,O({index:i},{children:r}),i):t.jsx(n.Table.Summary.Cell,O({index:i},{children:t.jsx("div",{children:e})}),i)}))},i)}))}))}),[e,h,i,a,f]);return e?p:void 0}function Eo(e,t){return e+t}function To(e,t){return e.querySelector(t)}function Io(e,t,n){var r;return E(this,void 0,void 0,(function(){var i,o,a,s,c,l,u,d,f,h,p,g,m;return T(this,(function(v){switch(v.label){case 0:if(i=n.getCurrentTable,o=n.rowSelection,a=n.expandable,s=n.tableName,c=n.isInnerPagination,l=n.setCurrent,u=n.pageSize,!Array.isArray(e)||0===e.length)return console.info("没有数据,无需验证!"),[2];if(!Array.isArray(t))return console.info("columns 不是数组!"),[2];d=[],Array.isArray(t)&&t.forEach((function(e,t){e.validate&&d.push({dataIndex:e.validate.dataIndex||e.dataIndex,title:e.validate.title||e.__title||e.title,validate:e.validate.validate,index:t+(o?1:0)+(a?1:0)})})),f=0,v.label=1;case 1:if(!(f<e.length))return[3,6];h=e[f],p=function(e){var t,n,o,a,p,g,m,v,y,b;return T(this,(function(x){switch(x.label){case 0:if(t=d[e],n=t.dataIndex,o=t.title,a=t.validate,p=t.index,!n)return[2,"break"];if(g=h[n],m=function(e,t,n){var r,o,a,s=i().resultTr[e],c=Array.prototype.slice.call(null==s?void 0:s.children),l="number"==typeof t?c[t]:null;null===(o=null===(r=null==l?void 0:l.classList)||void 0===r?void 0:r.add)||void 0===o||o.call(r,n),null===(a=null==l?void 0:l.scrollIntoView)||void 0===a||a.call(l)},v=f,y=1,c&&(y=Math.ceil((f+1)/u),v-=u*(y-1)),!a)return[3,10];if("function"!=typeof a)return[3,5];x.label=1;case 1:return x.trys.push([1,3,,4]),[4,a(g,h,v+1,o)];case 2:return x.sent(),[3,4];case 3:return b=x.sent(),c?(l(y),setTimeout((function(){m(v,p,lo)}))):m(f,p,lo),[2,{value:Promise.reject(b)}];case 4:return[3,9];case 5:return(null===(r=null==a?void 0:a.pattern)||void 0===r?void 0:r.test(g))?[3,9]:c?(l(y),setTimeout((function(){m(v,p,lo)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})]):[3,7];case 6:return x.sent(),[3,9];case 7:return m(f,p,lo),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})];case 8:x.sent(),x.label=9;case 9:return[3,14];case 10:return""!==g&&null!=g?[3,14]:c?(l(y),setTimeout((function(){m(v,p,lo)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:p})]):[3,12];case 11:return x.sent(),[3,14];case 12:return m(f,p,lo),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:p})];case 13:x.sent(),x.label=14;case 14:return[2]}}))},g=0,v.label=2;case 2:return g<d.length?[5,p(g)]:[3,5];case 3:if("object"==typeof(m=v.sent()))return[2,m.value];if("break"===m)return[3,5];v.label=4;case 4:return g++,[3,2];case 5:return f++,[3,1];case 6:return[2]}}))}))}var ko=r.memo((function(e){var i=e.className,o=e.bordered,a=void 0===o||o,s=e.pagination,c=void 0!==s&&s,l=e.isFlex;e.tablePreferences;var u=e.dynamicKey,d=e.columns,f=e.dataSource,h=e.onTableChange,p=e.isEdit,g=e.isMove,m=e.isAdd,v=e.addMode,y=e.addCallback,b=e.isDel,x=e.isDelAll,w=void 0===x||x,S=e.isAddAndDelAuto,C=e.summaryConfig,I=e.summaryFixed,k=void 0===I||I,j=e.isInnerPagination,P=e.innerPaginationPageSize,A=void 0===P?30:P,R=e.innerPaginationPosition,M=void 0===R?so:R,z=e.innerPaginationPageSizeOptions,L=void 0===z?co:z,_=e.tableRefHandle,F=e.tableName,H=D(e,["className","bordered","pagination","isFlex","tablePreferences","dynamicKey","columns","dataSource","onTableChange","isEdit","isMove","isAdd","addMode","addCallback","isDel","isDelAll","isAddAndDelAuto","summaryConfig","summaryFixed","isInnerPagination","innerPaginationPageSize","innerPaginationPosition","innerPaginationPageSizeOptions","tableRefHandle","tableName"]),B=N("ztxk-table",i,{"ztxk-table--flex":l}),U=r.useRef();r.useEffect((function(){U.current=f}),[f]);var W,K,q=function(e,t){var n=r.useRef(null),i=r.useMemo((function(){return function(e,t){var n=[];return e&&t&&t.forEach((function(e){var t=e,r=t.key,i=t.dataIndex,o=t.title,a=t.dynamicDisabled;if(!t.fixed){var s=r||i;n.push({key:s,label:o,disabled:!0===a})}})),n}(t,e)}),[t,e]),o=r.useState((function(){return Ai(t,oo,i)})),a=o[0],s=o[1],c=r.useCallback((function(e){s(e)}),[]);return{defaultDynamicList:i,currentDynamicList:a,onCurrentListChange:c,dynamicSettingRef:n}}(d,u),V=q.defaultDynamicList,$=q.onCurrentListChange,Z=q.currentDynamicList,G=q.dynamicSettingRef,X=(W=r.useRef(null),K=r.useRef(),{refreshScuCell:r.useCallback((function(){K.current=!0}),[]),getRefreshScuCell:r.useCallback((function(){return!!K.current&&(W.current&&(clearTimeout(W.current),W.current=null),W.current=setTimeout((function(){K.current=!1})),!0)}),[])}),Y=X.refreshScuCell,J=X.getRefreshScuCell,Q=function(e,t,n){var i=r.useRef(null),o=r.useState(1),a=o[0],s=o[1],c=r.useState(t),l=c[0],u=c[1],d=n.innerPaginationPageSizeOptions,f=n.innerPaginationPosition;return r.useEffect((function(){e&&(i.current={page:a,pageSize:Number(l)})}),[e,a,l]),r.useEffect((function(){e||(i.current=null)}),[e]),{paginationConfig:r.useMemo((function(){return{current:a,pageSize:l,onChange:function(t,n){e&&(s(t),u(n))},hideOnSinglePage:!0,position:d,defaultPageSize:l,pageSizeOptions:f}}),[e,a,l,d,f]),currentPage:i,setCurrent:s,pageSize:l,current:a}}(j,A,{innerPaginationPosition:M,innerPaginationPageSizeOptions:L}),ee=Q.paginationConfig,te=Q.currentPage,ne=Q.setCurrent,re=Q.pageSize,ie=function(e,t){return r.useCallback((function(n,r,i,o){var a,s=null===(a=e.current)||void 0===a?void 0:a.slice();s[r][i]!==n[i]&&(s[r]=n,t&&t(s,e.current,{type:"edit",currentIndex:r}))}),[e,t])}(U,h),oe=function(e,t,n){var i=n.isMove,o=n.refreshScuCell,a=n.currentPage,s=r.useCallback((function(n,r){var i,s=go(a,n),c=go(a,r);if(s!==c){var l=null===(i=e.current)||void 0===i?void 0:i.slice(),u=l[s],d=ji(l,{$splice:[[s,1],[c,0,u]]});o&&o(),t&&t(d,e.current,{type:"move",dragIndex:s,hoverIndex:c})}}),[e,t,o,a]),c=r.useCallback((function(e,t){return{index:t,moveRow:s}}),[s]);return{onRow:i?c:void 0}}(U,h,{isMove:g,refreshScuCell:Y,currentPage:te}).onRow,ae=function(e,t,n){var i=n.rowKey,o=n.addMode,a=n.addCallback,s=n.refreshScuCell,c=n.isAddAndDelAuto,l=n.currentPage;return r.useCallback((function(n,r){var u,d,f,h=go(l,r),p=null===(f=e.current)||void 0===f?void 0:f.slice();if("delAll"!==n){c&&(s&&s(),t&&t(p,e.current,{type:n,currentIndex:h}));var g=p[h],m=a?a(g,{index:h}):{};if("add"===n){var v={};v=O("blank"===o?((u={})[String(i)]="".concat(Date.now(),"-").concat(h),u.__INNER__ADD__DATA=!0,u):O(O({},g),((d={})[String(i)]="".concat(Date.now(),"-").concat(h),d.__INNER__ADD__DATA=!0,d)),m),p.splice(h+1,0,v)}else"del"===n&&p.splice(h,1);s&&s(),t&&t(p,e.current,{type:n,currentIndex:h})}else Array.isArray(p)&&p.length>0&&(s&&s(),t&&t([],e.current,{type:n,currentIndex:h}))}),[a,o,e,t,i,s,c,l])}(U,h,{rowKey:e.rowKey,addMode:v,addCallback:y,refreshScuCell:Y,isAddAndDelAuto:S,currentPage:te}),se=function(e,t,n){var i=n.refreshScuCell,o=r.useState(null),a=o[0],s=o[1],c=r.useState(void 0),l=c[0],u=c[1],d=r.useRef(!0),f=r.useCallback((function(n){if(Array.isArray(e)&&e.length>1){var r=n.field,o=n.order,a=function(e,t){var n=e[r]-t[r];return isNaN(n)?e[r]<t[r]?-1:e[r]>t[r]?1:0:n};if("ascend"===o){var c=e.slice().sort((function(e,t){return a(e,t)}));s(c),d.current=!0,i&&i(),t&&t(c,e,{type:"sort"})}else"descend"===o?(c=e.slice().sort((function(e,t){return-a(e,t)})),s(c),d.current=!0,i&&i(),t&&t(c,e,{type:"sort"})):s(null)}}),[e,t,i]);return r.useEffect((function(){d.current||(s(null),u(void 0)),d.current=!1}),[e]),{sortDataSource:a,setSortDataSource:s,order:l,setOrder:u,customSortHandle:f}}(f,h,{refreshScuCell:Y,currentPage:te}),ce=se.sortDataSource,le=se.order,ue=se.setOrder,de=se.customSortHandle,fe=Oo(d,{dynamicKey:u,currentDynamicList:Z,dataSource:f,dataSourceRef:U,onEditableSave:ie,isEdit:p,isAdd:m,isDel:b,dynamicSettingRef:G,onAddAndDel:ae,getRefreshScuCell:J,isDelAll:w,currentPage:te,onTableChange:h,order:le,setOrder:ue,customSortHandle:de}).newColumns,he=Do(C,fe,{summaryFixed:k,rowSelection:e.rowSelection,expandable:e.expandable,isAdd:m,isDel:b}),pe=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n=To(e.current,".ant-table-content");n||(n=To(e.current,".ant-table-container"));var r=To(n,".ant-table-tbody"),i=null==r?void 0:r.children,o=Array.prototype.slice.call(i);return{tableBody:r,resultTr:(null===(t=null==o?void 0:o.filter)||void 0===t?void 0:t.call(o,(function(e){return e.className.includes("ant-table-row")})))||[]}}),[]),n=r.useCallback((function(e){try{var n=t().resultTr;if("number"==typeof e)for(var r=n[e].querySelectorAll("td"),i=0;i<r.length;i++)r[i].classList.remove(lo);else for(i=0;i<n.length;i++){r=n[i].querySelectorAll("td");for(var o=0;o<r.length;o++)r[o].classList.remove(lo)}}catch(e){console.log(e)}}),[t]);return{tableRef:e,getCurrentTable:t,clearErrorClass:n}}(),ge=pe.tableRef,me=pe.getCurrentTable,ve=pe.clearErrorClass,ye=r.useMemo((function(){var e=void 0;return p&&(e={body:{row:ho,cell:mo}}),g&&(e={body:{row:po,cell:p?mo:void 0}}),e}),[p,g]);r.useImperativeHandle(_,(function(){return{getRealyIndex:function(e){return go(te,e)},getDynamicList:function(){return Z},tableValidate:function(){return E(void 0,void 0,void 0,(function(){return T(this,(function(t){switch(t.label){case 0:return ve(),[4,Io(f,fe,{getCurrentTable:me,rowSelection:!!e.rowSelection,expandable:!!e.expandable,tableName:F,isInnerPagination:j,setCurrent:ne,pageSize:re})];case 1:return[2,t.sent()]}}))}))},clearErrorClass:ve}}));var be=t.jsx(n.Table,O({className:B,bordered:a,dataSource:ce||f,columns:fe,components:ye,onRow:oe,summary:he,pagination:j?c||ee:c},H));return t.jsxs("div",O({style:l?{position:"relative",overflow:"hidden",flex:1}:{position:"relative",overflow:"hidden"},ref:ge},{children:[g?t.jsx(jr,O({backend:Ii,context:window},{children:be})):be,u?t.jsx(_i,{parentDynamicKey:oo,dynamicKey:u,defaultList:V,onCurrentListChange:$,ref:G,hiddenOperationIcon:!0}):null]}))}));ko.displayName="ZTXK_WEBUI_Table",ko.SELECTION_COLUMN=n.Table.SELECTION_COLUMN,ko.EXPAND_COLUMN=n.Table.EXPAND_COLUMN,ko.SELECTION_ALL=n.Table.SELECTION_ALL,ko.SELECTION_INVERT=n.Table.SELECTION_INVERT,ko.SELECTION_NONE=n.Table.SELECTION_NONE,ko.Column=n.Table.Column,ko.ColumnGroup=n.Table.ColumnGroup,ko.Summary=n.Table.Summary;var jo=r.memo((function(e){var r,i=e.className,o=e.isHeader,a=e.isContent,s=e.marginTop,c=void 0!==s&&s,l=e.marginBottom,u=void 0===l||l,d=D(e,["className","isHeader","isContent","marginTop","marginBottom"]),f=N("ztxk-tabs",i,((r={})["ztxk-tabs--header"]=o,r["ztxk-tabs--content"]=a,r["ztxk-tabs--marginTop"]=c,r["ztxk-tabs--marginBottom"]=u,r));return t.jsx(n.Tabs,O({type:o?"editable-card":a?"card":void 0,hideAdd:!!o||void 0,className:f},d))}));function No(e,t){e.update((function(e){return O(O({},e),{cancelButtonProps:O(O({},e.cancelButtonProps||{}),t)})}))}jo.displayName="ZTXK_WEBUI_Tabs",jo.TabPane=n.Tabs.TabPane;var Po=r.forwardRef((function(e,i){var o=e.className,a=e.defaultOpen,s=e.defaultTitle,c=e.defaultConfirmMsg,l=e.defaultConfirmOkText,u=e.defaultType,d=e.confirmPreHandle,f=e.confirmOnOk,h=e.onOk,p=e.footer,g=e.onOkValidate,m=D(e,["className","defaultOpen","defaultTitle","defaultConfirmMsg","defaultConfirmOkText","defaultType","confirmPreHandle","confirmOnOk","onOk","footer","onOkValidate"]),v=N("ztxk-modal",o),y=r.useState(a),b=y[0],x=y[1],w=r.useState(s),S=w[0],C=w[1],I=r.useState(),k=I[0],j=I[1],P=r.useState(!1),A=P[0],R=P[1],M=r.useState(c),z=M[0],L=M[1],_=r.useState(l),F=_[0],H=_[1],B=r.useState(u),U=B[0],W=B[1],K=r.useCallback((function(){x(!1)}),[]),q=r.useCallback((function(){return E(void 0,void 0,void 0,(function(){var e,t,r,i,o,a;return T(this,(function(s){switch(s.label){case 0:if(e=!0,!g)return[3,4];j(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),e=!1,[4,g(U)];case 2:return s.sent(),e=!0,j(!1),[3,4];case 3:return t=s.sent(),j(!1),console.log(t),r=t.errorFields,i=t.errors,r&&n.message.warning(r[0].errors+""),i&&n.message.warning(i),[3,4];case 4:return e?(A?(o=d&&d(U),a=n.Modal.confirm({title:(null==o?void 0:o.confirmMsg)?o.confirmMsg:z,okText:(null==o?void 0:o.confirmOkText)?o.confirmOkText:F||"确认保存",keyboard:!1,maskClosable:!1,onOk:f?function(){return No(a,{loading:!0}),f(U).then((function(){No(a,{loading:!1}),x(!1)})).catch((function(e){No(a,{loading:!1})}))}:void 0})):h&&(j(!0),h(U).then((function(){j(!1),x(!1)})).catch((function(e){j(!1)}))),[2]):[2]}}))}))}),[A,g,d,z,F,f,U,h]);return r.useImperativeHandle(i,(function(){return{open:function(e){(null==e?void 0:e.title)&&C(e.title),(null==e?void 0:e.confirmMsg)&&L(e.confirmMsg),(null==e?void 0:e.confirmOkText)&&H(e.confirmOkText),(null==e?void 0:e.type)&&W(e.type),"boolean"==typeof(null==e?void 0:e.isConfirm)&&R(e.isConfirm),x(!0)},close:function(){x(!1)},getType:function(){return U},setConfirmMsg:H}})),t.jsx(n.Modal,O({open:b,onCancel:K,className:v,okText:"保存",onOk:p?void 0:q,width:"70%",title:S,keyboard:!1,maskClosable:!1,confirmLoading:k,cancelButtonProps:{loading:k},footer:p},m))}));Po.displayName="ZTXK_WEBUI_ModalComponent",Po.info=n.Modal.info,Po.success=n.Modal.success,Po.error=n.Modal.error,Po.warning=n.Modal.warning,Po.confirm=n.Modal.confirm,Po.destroyAll=n.Modal.destroyAll;var Ao=function(e){var r=e.children,i=e.className,o=e.border,a=e.isBg,s=D(e,["children","className","border","isBg"]),c=N("ztxk-grid",i,{"ztxk-grid--border":o,"ztxk-grid--background":a});return t.jsx(n.Row,O({className:c},s,{gutter:0},{children:r}))};Ao.displayName="ZTXK_WEBUI_DetailList",Ao.Item=function(e){var r=e.children,i=e.className,o=e.title,a=e.colon,s=void 0===a||a,c=e.span,l=e.titleSpan,u=e.titleProps,d=e.textProps,f=e.showDiff,h=e.isEllipsis,p=void 0===h||h,g=e.isBlod,m=N("ztxk-grid-item",i);return t.jsxs(t.Fragment,{children:[t.jsxs(n.Col,O({className:m+" ztxk-grid-item--title",span:l||3,title:o},u,{children:[t.jsx("span",O({className:"ztxk-grid-item--title-text"},{children:o})),t.jsx("span",O({className:"ztxk-grid-item--title-colon"},{children:s&&":"}))]})),t.jsx(n.Col,O({className:f?m+" ztxk-grid-item--text ztxk-grid-item--diff"+"".concat(p?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"):m+" ztxk-grid-item--text"+"".concat(p?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"),span:l?c-l:c-3,title:"string"==typeof r?r:void 0,style:{fontWeight:g?"bold":"normal"}},d,{children:r}))]})};var Ro=function(e){var r=e.children,i=e.layoutSliderRender,o=e.layoutHeaderRender;return t.jsxs(n.Layout,O({className:"zmdms-container"},{children:[i,t.jsxs(n.Layout,O({className:"zmdms-content"},{children:[o,t.jsx(n.Layout.Content,O({className:"zmdms-content--content"},{children:r}))]}))]}))};Ro.displayName="ZTXK_WEBUI_AppLayout";var Mo=r.memo(Ro),zo=function(e){var i=e.tabs,o=e.activeTab,a=e.deleteTabHandle,s=e.setActiveTab,c=e.deleteTabsHandle,l=r.useCallback((function(e){1!==i.length?a(e):n.message.warning("最后一页不可关闭!")}),[a,i]),u=r.useMemo((function(){return[{label:"关闭",key:"closeCurrent"},{label:"关闭其他",key:"closeOther"},{label:"关闭右侧",key:"closeRight"}]}),[]),d=r.useCallback((function(e,t){if(console.log(e,t),"closeCurrent"===e)l(t.key);else if("closeOther"===e){if(i.length>1){var n=i.findIndex((function(e){return e.key===t.key})),r=i.slice();r.splice(n,1),o!==t.key?c&&c(t,{deleteTabs:r,isGo:!0,deleteType:"other",currentIndex:n}):c&&c(t,{deleteTabs:r,isGo:!1,deleteType:"other",currentIndex:n})}}else if("closeRight"===e){n=i.findIndex((function(e){return e.key===t.key}));var a=i.slice(n+1);a.find((function(e){return e.key===o}))?c&&c(t,{deleteTabs:a,isGo:!0,deleteType:"right",currentIndex:n}):c&&c(t,{deleteTabs:a,isGo:!1,deleteType:"right",currentIndex:n})}}),[l,i,o,c]),f=r.useMemo((function(){return Array.isArray(i)?i.map((function(e){return{key:e.key,label:t.jsx(n.Dropdown,O({trigger:["contextMenu"],menu:{items:u,onClick:function(t){t.domEvent.stopPropagation(),d(t.key,e)}}},{children:t.jsx(p.Link,O({to:e.path},{children:e.label}))}))}})):[]}),[i,u,d]);return t.jsx(jo,{items:f,activeKey:o,isHeader:!0,onTabClick:function(e){s(e)},onEdit:function(e){l(e)}})},Lo=r.memo((function(){var e=r.useRef(null),n=function(e,t){var n=r.useState(!1),i=n[0],o=n[1];return r.useEffect((function(){if(e.current){var n=e.current,r=function(){if(Ji.isEnabled){var e=Ji;(null==t?void 0:t.current)?e.toggle(t.current):e.toggle()}};return n.addEventListener("click",r),function(){n.removeEventListener("click",r)}}}),[e,t]),r.useEffect((function(){if(Ji.isEnabled){var e=Ji,t=function(){e.isFullscreen?o(!0):o(!1)};return e.on("change",t),function(){e.off("change",t)}}}),[]),i}(e);return t.jsx("div",O({className:"full-screen",ref:e,title:n?"退出全屏":"全屏"},{children:n?t.jsx(Jt,{}):t.jsx(bt,{})}))})),_o=function(e){var r=e.userInfo,i=e.logout,o=[{label:t.jsxs("div",{children:[t.jsx(cn,{style:{marginRight:5}})," 账号信息"]}),key:"info"},{label:t.jsxs("div",{children:[t.jsx(tn,{style:{marginRight:5}})," 修改密码"]}),key:"password"},{type:"divider"},{label:t.jsxs("div",O({onClick:function(){i&&i()}},{children:[t.jsx(Rt,{style:{marginRight:5}})," 退出系统"]})),key:"logout"}];return t.jsx(n.Dropdown,O({menu:{items:o},placement:"bottomLeft"},{children:t.jsxs("div",O({className:"user-operation"},{children:[t.jsx(cn,{}),t.jsx("span",{children:null==r?void 0:r.realName})]}))}))},Fo=function(e){var n=e.userInfo,r=e.logout;return t.jsxs("div",O({className:"zmdms-content--header-info"},{children:[t.jsx(Lo,{}),t.jsx(_o,{userInfo:n,logout:r})]}))},Ho=function(e){var r=e.tabs,i=e.activeTab,o=e.deleteTabHandle,a=e.deleteTabsHandle,s=e.setActiveTab,c=e.userInfo,l=e.logout;return t.jsxs(n.Layout.Header,O({className:"zmdms-content--header"},{children:[t.jsx(zo,{tabs:r,activeTab:i,deleteTabHandle:o,deleteTabsHandle:a,setActiveTab:s}),t.jsx(Fo,{userInfo:c,logout:l})]}))};Ho.displayName="ZTXK_WEBUI_AppLayoutHeader";var Bo=r.memo(Ho),Uo=r.memo((function(e){var n=e.logo;return t.jsx("div",O({className:"zmdms-logo"},{children:t.jsx("img",{src:n,title:"浙商中拓ERP",alt:"zszt_logo"})}))})),Wo=function(e){var i=e.userMenus,o=e.onMouseEnter,a=e.onMainLinkClick,s=e.addTab,c=e.getPrefixByAppId,l=r.useCallback((function(e){var n=e.system,r=e.path,i=c(n),o="/"===r?"/":i?"/".concat(i).concat(r):r;if("index"===e.type){var a=i?"/".concat(i).concat(r):r;return t.jsx(p.Link,O({to:a,onClick:function(){s&&s({key:a,path:a,label:e.name})}},{children:e.name}))}return"/"===o?e.name:t.jsx(p.Link,O({to:o,onClick:function(){s&&s({key:o,path:o,label:e.name})}},{children:e.name}))}),[s,c]),u=r.useMemo((function(){var e;return Array.isArray(i)?1===i.length?((null===(e=i[0])||void 0===e?void 0:e.children)||[]).map((function(e){return{label:l(e),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null}})):i.map((function(e){var n=e.children;return{label:t.jsx("span",O({title:e.name},{children:e.name})),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null,children:n?n.map((function(e){return{label:l(e),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null}})):null}})):(console.error("用户主菜单没有按预期传入对应数据!"),[])}),[i,l]),d=r.useCallback((function(e){var t=e.key;a(t)}),[a]);return t.jsx(n.Menu,{className:"zmdms-menu--main",items:u,inlineIndent:10,mode:"inline",onMouseEnter:o,onClick:d})},Ko=r.memo(r.forwardRef((function(e,i){var o=e.marginLeft,a=e.subMenus,s=e.subMenuWidth,c=e.layoutSiderRef,l=e.addTab,u=e.getPrefixByAppId,d=r.useState(),f=d[0],h=d[1],g=r.useState(),m=g[0],v=g[1],y=r.useCallback((function(){v((function(e){return c.current.style.marginRight=e?0:"".concat(s,"px"),!e}))}),[c,s]),b=t.jsxs(R,O({type:"link",onClick:y},{children:[t.jsx(yn,{type:"icon-toggle",style:{fontSize:"18px"}}),m?"浮动":"固定"]}));r.useImperativeHandle(i,(function(){return{setVisible:function(e){m||h(e)}}}));var x=r.useMemo((function(){var e=function(n,r,i){return void 0===r&&(r=[]),void 0===i&&(i=1),i>=3?null:(i++,Array.isArray(n)&&n.forEach((function(n){var o=n.system,a=n.path,s=u(o),c="/"===a?"/":s?"/".concat(s).concat(a):a,d={label:"/"===c?n.name:t.jsx(p.Link,O({to:c,onClick:function(){l({key:c,path:c,label:n.name})}},{children:n.name})),title:n.name,key:n.id,children:Array.isArray(n.children)&&n.children.length>0?e(n.children,[],i):null};r.push(d)})),r)};return e(a)}),[a,l,u]);return t.jsx(n.Drawer,O({mask:!1,placement:"left",width:s,zIndex:99,closable:!1,open:f,className:"zmdms-menu--sub",style:{marginLeft:o},footer:b},{children:t.jsx(n.Menu,{inlineIndent:10,mode:"inline",items:x})}))}))),qo=[],Vo=r.memo((function(e){var n=e.width,i=e.subMenuWidth,o=e.layoutSiderRef,a=e.userMenus,s=e.userSubMenus,c=e.addTab,l=e.logo,u=e.getPrefixByAppId,d=r.useRef({}),f=r.useState(qo),h=f[0],p=f[1],g=r.useCallback((function(){var e;null===(e=d.current)||void 0===e||e.setVisible(!0)}),[]),m=r.useCallback((function(e){e?s&&p(s[e]):p(qo)}),[s]),v=r.useCallback((function(){var e;null===(e=d.current)||void 0===e||e.setVisible(!1)}),[]);return t.jsxs("div",O({className:"zmdms-menu",onMouseLeave:v},{children:[t.jsx(Uo,{logo:l}),t.jsx(Wo,{userMenus:a,onMouseEnter:g,onMainLinkClick:m,addTab:c,getPrefixByAppId:u}),t.jsx(Ko,{ref:d,marginLeft:n,subMenuWidth:i,subMenus:h,layoutSiderRef:o,addTab:c,getPrefixByAppId:u})]}))})),$o=function(e){var i=e.siderWidth,o=void 0===i?118:i,a=e.subMenuWidth,s=void 0===a?162:a,c=e.userMenus,l=e.userSubMenus,u=e.addTab,d=e.siderBg,f=e.logo,h=e.apps,p=r.useRef(),g=r.useCallback((function(e){if(Array.isArray(h)&&h.length>0){var t=h.find((function(t){return t.appId+""==e+""}));if(t)return t.name}return null}),[h]);return t.jsx(n.Layout.Sider,O({className:"zmdms-sider",collapsedWidth:"0",collapsible:!0,trigger:null,width:o,ref:p,style:{backgroundImage:"url(".concat(d,")")}},{children:t.jsx(Vo,{width:o,subMenuWidth:s,layoutSiderRef:p,userMenus:c,userSubMenus:l,addTab:u,logo:f,getPrefixByAppId:g})}))};$o.displayName="ZTXK_WEBUI_AppLayoutSider";var Zo=r.memo($o),Go=function(e){var r,i=e.statusBtnConfig,o=e.authUserBtns,a=e.callback,s=function(e){a&&a(e)};return t.jsx(t.Fragment,{children:null===(r=i||[])||void 0===r?void 0:r.map((function(e){var r=e.authority,i=e.confirmMsg,a=e.type,c=e.name,l=D(e,["authority","confirmMsg","type","name"]),u=!1;return u="boolean"==typeof r?r:void 0===r||!!o.find((function(e){return e.code===r})),i?t.jsx(n.Popconfirm,O({title:i,cancelText:"否",okText:"是",onConfirm:function(){return s(a)}},{children:t.jsx(R,O({type:"link",style:{height:28},disabled:!u},l,{children:c}))}),a):t.jsx(R,O({type:"link",style:{height:28},onClick:function(){return s(a)},disabled:!u},l,{children:c}),a)}))})};function Xo(e){return e?"string"==typeof e?e:e instanceof Array?e.map((function(e){var t;return Xo("string"==typeof e?e:(null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.children)||"")})).join(" "):Xo(e):""}Go.displayName="ZTXK_WEBUI_OperationBtn";var Yo=r.memo(r.forwardRef((function(e,o){var a,s=e.list,c=e.defaultList,l=e.dataKey,u=void 0===l?"id":l,d=e.titleKey,f=void 0===d?"name":d,h=e.joinKey,p=e.joinStr,m=void 0===p?"-":p,v=e.lineFeedKey,y=e.lineFeedStr,b=void 0===y?"-":y,x=e.showAll,w=e.children,S=e.disabledValues,C=e.dropdownMatchSelectWidth,E=void 0===C?100:C,T=e.onChange,I=e.onSearch,k=e.isRemoteSearch,j=e.dropdownButton,N=e.dropdownRender,P=D(e,["list","defaultList","dataKey","titleKey","joinKey","joinStr","lineFeedKey","lineFeedStr","showAll","children","disabledValues","dropdownMatchSelectWidth","onChange","onSearch","isRemoteSearch","dropdownButton","dropdownRender"]),A=function(e){var n=e.list,r=e.defaultList,o=e.dataKey,a=void 0===o?"id":o,s=e.titleKey,c=void 0===s?"name":s,l=e.joinKey,u=e.joinStr,d=e.lineFeedKey,f=e.lineFeedStr,h=e.showAll,p=e.children,g=e.disabledValues,m=function(e,t){if(!t)return e;var n=(null==e?void 0:e.slice())||[];t.forEach((function(e,t){if(e){var r=n.findIndex((function(t){return t&&a&&t[a]===e[a]}));if(-1===r)n.push(e);else{var i=O({},e);c&&!i[c]&&Reflect.deleteProperty(i,c),a&&!i[a]&&Reflect.deleteProperty(i,a),n.splice(r,1,O(O({},n[r]),i))}}else console.error("默认数据中有空值 位置再defalutList中第".concat(t+1,"项"))}))}(n,r);return{resultList:m,renderChildren:function(){return p||(Array.isArray(m)?t.jsxs(t.Fragment,{children:[h&&t.jsx(Yo.Option,O({title:"全部",value:""},{children:"全部"})),null==m?void 0:m.map((function(e,n){if(!e)return console.error("默认数据中有空值 位置再list中第".concat(n+1,"项")),null;var r=e[a],o=e[a],s=i.unescapeString(e[c]),h=[],p=[];l&&(h=Array.isArray(l)?l.map((function(t){return i.unescapeString(e[t])})):e[l]?[i.unescapeString(e[l])]:[]),d&&(p=Array.isArray(d)?d.map((function(t){return i.unescapeString(e[t])})):e[d]?[i.unescapeString(e[d])]:[]),Array.isArray(h)?h.unshift(s):h=[s];var m=null==e?void 0:e.disabled;return Array.isArray(g)&&g.includes(o)&&(m=!0),t.jsxs(Yo.Option,O({value:o,title:s,disabled:m},{children:[Array.isArray(h)?null==h?void 0:h.join(u):"",Array.isArray(p)&&p.length>0?t.jsx("div",O({className:"ztxk-select--feed-item"},{children:null==p?void 0:p.join(f)})):""]}),"".concat(r).concat(n))}))]}):null)}}}({list:s,defaultList:c,dataKey:u,titleKey:f,joinKey:h,joinStr:m,lineFeedKey:v,lineFeedStr:b,showAll:x,children:w,disabledValues:S}),R=A.renderChildren,M=A.resultList,z=(a=j,r.useCallback((function(e){return t.jsxs(t.Fragment,{children:[e,t.jsx(n.Divider,{style:{marginTop:0,marginBottom:"4px"}}),t.jsx("div",O({style:{padding:"0 4px"}},{children:a}))]})}),[a])),L=r.useCallback((function(e){I&&I(e)}),[I]),_=g(L,400);return t.jsx(n.Select,O({showArrow:!0,dropdownMatchSelectWidth:E,onChange:function(t,n){if(Array.isArray(M)&&0!==M.length){var r,i=u;r="multiple"===e.mode?null==(r=t.map((function(e){return M.find((function(t){return!!t&&(null!=t[i]&&t[i]===e)}))})))?void 0:r.filter((function(e){return e})):M.find((function(e){return!!e&&(null!=e[i]&&e[i]===t)})),T&&T(t,n,r)}else T&&T(t,n)},showSearch:!0,onSearch:_,filterOption:!k&&function(e,t){var n=Xo(null==t?void 0:t.children);return(null==n?void 0:n.toLowerCase().indexOf(e.toLowerCase().trim()))>=0},dropdownRender:N||(j?z:void 0)},P,{ref:o},{children:R()}))})));Yo.displayName="ZTXK_WEBUI_Select",Yo.SECRET_COMBOBOX_MODE_DO_NOT_USE=n.Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,Yo.Option=n.Select.Option,Yo.OptGroup=n.Select.OptGroup;var Jo=["exe"];var Qo=r.forwardRef((function(e,a){var s=e.dataSource,c=e.action,l=e.headers,u=e.data,d=e.method,f=e.setInnerFileList,h=e.isPublic,p=e.API_BASEURL,g=void 0===p?"":p,m=e.FILE_API_BASEURL,v=void 0===m?"":m,y=e.maxPreviewSize,b=void 0===y?20971520:y,x=e.isPreview,w=e.isDelete,S=e.isDownload,C=r.useState(!1),D=C[0],I=C[1],k=r.useState(),j=k[0],N=k[1],P=S,A=w&&!x,M=function(e,t,r){return E(void 0,void 0,void 0,(function(){var o,a,c;return T(this,(function(l){switch(l.label){case 0:switch(o=t.attachId,a=t.attachName,e){case"download":return[3,1];case"preview":return[3,7];case"delete":return[3,8]}return[3,9];case 1:f((function(e){var n=e.slice();return n.splice(r,1,O(O({},t),{loading:!0})),n})),l.label=2;case 2:return l.trys.push([2,4,5,6]),[4,i.downloadFile(o,a,{API_BASEURL:g,open:h})];case 3:return l.sent(),[3,6];case 4:return c=l.sent(),console.log(c),[3,6];case 5:return f((function(e){var n=e.slice();return n.splice(r,1,O(O({},t),{loading:!1})),n})),[7];case 6:return[3,9];case 7:return t.attachSize>b?n.message.info("文件大于".concat(i.formatUnit(b),",暂不支持在线预览,请先下载后查看")):i.previewFile(o,a,{API_BASEURL:v,fileList:s}),[3,9];case 8:return N((function(e){if(Array.isArray(e)){var n=e.slice(),r=n.findIndex((function(e){return e.attachId===t.attachId}));return n.splice(r,1),n}})),f((function(e){var t=e.slice();return t.splice(r,1),t})),[3,9];case 9:return[2]}}))}))},z=[{title:"序号",width:60,key:"index",fixed:"left",render:function(e,t,n){return"".concat(n+1)}},{title:"文件名称",width:140,dataIndex:"attachName",key:"attachName",render:function(e,n,r){return t.jsx(R,O({type:"link",onClick:function(){return M("preview",n,r)}},{children:e}))}},{title:"文件大小",width:120,dataIndex:"attachSize",key:"attachSize",render:function(e){return e?i.formatUnit(e):"— —"}},{title:"上传时间",width:120,dataIndex:"uploadTime",key:"uploadTime",render:function(e){return o(e).format("YYYY-MM-DD HH:mm:ss")}},{title:"上传人",width:100,dataIndex:"uploadUser",key:"uploadUser"},{title:"上传进度",width:160,render:function(e,r,i){var o="error"===r.status?"exception":void 0;return"error"===r.status?t.jsx(R,O({type:"link",style:{color:"#ff4d4f"},onClick:function(){return _(r,i)}},{children:"文件上传失败,重新上传"})):t.jsx(n.Progress,{percent:null==r?void 0:r.percent,status:o})}},{title:"操作",width:120,ellipsis:!1,fixed:"right",render:function(e,t,n){return L(e,t,n)}}];x&&z.splice(5,1);var L=function(e,n,r){var i=null==n?void 0:n.operationAuth,o=n.loading,a=[];return i?(i.indexOf("2")&&P&&a.push({name:"下载",type:"download",loading:o}),i.indexOf("1")&&a.push({name:"预览",type:"preview"}),i.indexOf("3")&&A&&a.push({name:"删除",type:"delete",confirmMsg:"确认删除该附件吗?",loading:o})):(P&&a.push({name:"下载",type:"download",loading:o}),a.push({name:"预览",type:"preview"}),A&&a.push({name:"删除",type:"delete",confirmMsg:"确认删除该附件吗?",loading:o})),t.jsx(Go,{statusBtnConfig:a,callback:function(e){return M(e,n,r)}})},_=function(e,t){I(!0),function(e){return E(this,void 0,void 0,(function(){var t,r,o,a,s,c,l,u=this;return T(this,(function(d){return t=e.action,r=e.data,o=e.headers,a=e.file,s=e.method,c=void 0===s?"POST":s,l=e.onProgress,t?[2,new Promise((function(e,s){return E(u,void 0,void 0,(function(){var u,d,f,h,p,g,m,v,y,b,x;return T(this,(function(w){switch(w.label){case 0:if((u=new FormData).append("file",a),r)for(d=Object.keys(r),f=Object.values(r),h=0;h<d.length;h++)f[h]&&u.append(d[h],f[h]);return p=t,"string"==typeof t?[3,2]:[4,t(a)];case 1:p=w.sent(),w.label=2;case 2:if((g=new XMLHttpRequest).open(c,p,!0),g.addEventListener("readystatechange",(function(){if(4===g.readyState)if(200===g.status){var t=JSON.parse(g.responseText);t||n.message.warning("文件上传失败!");var r=t.code,i=t.data,o=t.msg;200===r?e(i):(s(),n.message.warning(o||"文件上传失败!"))}else try{var a=JSON.parse(g.response);s(),n.message.warning(a.msg||"文件上传失败!")}catch(e){console.log(e)}})),g.upload.addEventListener("progress",(function(e){var t=e.loaded,n=e.total,r=i.exactRound(i.times(i.divide(t,n),100),2);l(r)})),o)for(m=0,v=Object.entries(o);m<v.length;m++)y=v[m],b=y[0],"string"==typeof(x=y[1])&&g.setRequestHeader(b,x);return g.send(u),[2]}}))}))}))]:[2,null]}))}))}({action:c,headers:l,data:u,method:d,file:e.originFileObj,onProgress:function(n){f((function(r){var i=r.slice();return i.splice(t,1,O(O({},e),{status:"uploading",percent:n})),i}))}}).then((function(n){I(!1),f((function(r){var i=r.slice();return i.splice(t,1,O(O({},e),{attachId:null==n?void 0:n.attachId,status:"done",percent:"100%"})),i}))})).catch((function(n){I(!1),f((function(n){var r=n.slice();return r.splice(t,1,O(O({},e),{status:"error",percent:"0"})),r}))}))},F=r.useMemo((function(){return{type:"checkbox",onChange:function(e,t){N(t.map((function(e){var t=O({},e);return Reflect.deleteProperty(t,"loading"),t})))}}}),[]);return r.useImperativeHandle(a,(function(){return{getChecked:function(){return j},setLoading:function(e){I(e)},setChecked:N}})),t.jsx(ko,{columns:z,rowKey:"uid",dataSource:s,loading:D,rowSelection:P||A?F:null})}));const ea=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ta=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(ea);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},na=e=>"*"===e||"x"===e||"X"===e,ra=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},ia=(e,t)=>{if(na(e)||na(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(ra(e),ra(t));return n>r?1:n<r?-1:0},oa=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=ia(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0};var aa,sa,ca,la,ua,da,fa,ha,pa,ga,ma,va,ya,ba,xa,wa=!1;function Sa(){if(!wa){wa=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(va=/\b(iPhone|iP[ao]d)/.exec(e),ya=/\b(iP[ao]d)/.exec(e),ga=/Android/i.exec(e),ba=/FBAN\/\w+;/i.exec(e),xa=/Mobile/i.exec(e),ma=!!/Win64/.exec(e),t){(aa=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(aa=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);da=r?parseFloat(r[1])+4:aa,sa=t[2]?parseFloat(t[2]):NaN,ca=t[3]?parseFloat(t[3]):NaN,(la=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),ua=t&&t[1]?parseFloat(t[1]):NaN):ua=NaN}else aa=sa=ca=ua=la=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);fa=!i||parseFloat(i[1].replace("_","."))}else fa=!1;ha=!!n[2],pa=!!n[3]}else fa=ha=pa=!1}}var Ca,Oa={ie:function(){return Sa()||aa},ieCompatibilityMode:function(){return Sa()||da>aa},ie64:function(){return Oa.ie()&&ma},firefox:function(){return Sa()||sa},opera:function(){return Sa()||ca},webkit:function(){return Sa()||la},safari:function(){return Oa.webkit()},chrome:function(){return Sa()||ua},windows:function(){return Sa()||ha},osx:function(){return Sa()||fa},linux:function(){return Sa()||pa},iphone:function(){return Sa()||va},mobile:function(){return Sa()||va||ya||ga||xa},nativeApp:function(){return Sa()||ba},android:function(){return Sa()||ga},ipad:function(){return Sa()||ya}},Da=Oa,Ea=!("undefined"==typeof window||!window.document||!window.document.createElement),Ta={canUseDOM:Ea,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:Ea&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:Ea&&!!window.screen,isInWorker:!Ea};Ta.canUseDOM&&(Ca=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
|
|
6
|
+
*/!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&e.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(j);var N=k(j.exports),P=function(e){var n=e.fileId,o=e.fileName,a=e.isPublic,s=e.API_BASEURL,c=e.onClick,l=D(e,["fileId","fileName","isPublic","API_BASEURL","onClick"]),u=r.useState(!1),d=u[0],f=u[1];return t.jsx(R,O({type:"link",loading:d,onClick:function(e){return E(void 0,void 0,void 0,(function(){return T(this,(function(t){return n?(f(!0),[2,i.downloadFile(n,o||"",{API_BASEURL:s,open:a}).then((function(t){c&&c(e,{result:!0}),f(!1)})).catch((function(t){c&&c(e,{result:!1}),f(!1)}))]):[2]}))}))}},l))};P.displayName="ZTXK_WEBUI_ButtonDownload";var A=function(e){var o=e.fetchHandle,a=e.onClick,s=D(e,["fetchHandle","onClick"]),c=r.useState(!1),l=c[0],u=c[1];return t.jsx(R,O({type:"primary",loading:l,onClick:function(e){return E(void 0,void 0,void 0,(function(){var t,r;return T(this,(function(s){switch(s.label){case 0:u(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,o()];case 2:return t=s.sent(),i.exportBolb(t).then((function(t){t.result&&n.message.info(t.msg),a&&a(e,{result:!0})})).catch((function(t){a&&a(e,{result:!1}),n.message.error((null==t?void 0:t.msg)||"导出失败!")})),u(!1),[3,4];case 3:return r=s.sent(),u(!1),[2,r];case 4:return[2]}}))}))}},s))};A.displayName="ZTXK_WEBUI_ButtonExport";var R=function(e){var r,i=e.type,o=e.className,a=e.disabled,s=e.size,c=e.danger,l=e.onClick,u=D(e,["type","className","disabled","size","danger","onClick"]),d=N("zt-btn",o,((r={})["zt-btn-".concat(i)]=i,r["zt-btn-disabled"]=a,r["zt-btn-".concat(s)]=s,r["zt-btn-dangerous"]=c,r)),f={canClick:!0};return t.jsx(n.Button,O({className:d,type:i,disabled:a,size:s,danger:c,onClick:function(e){return E(void 0,void 0,void 0,(function(){var t;return T(this,(function(n){switch(n.label){case 0:if(!f.canClick)return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),f.canClick=!1,l?[4,l(e)]:[3,3];case 2:n.sent(),n.label=3;case 3:return f.canClick=!0,[3,5];case 4:throw t=n.sent(),f.canClick=!0,t;case 5:return[2]}}))}))}},u))};R.displayName="ZTXK_WEBUI_Button",R.Group=n.Button.Group,R.Download=P,R.Export=A;var M=r.memo(r.forwardRef((function(e,r){return t.jsx(n.Input,O({},e,{ref:r}))})));M.displayName="ZTXK_WEBUI_Input",M.Group=n.Input.Group,M.Search=n.Input.Search,M.TextArea=n.Input.TextArea,M.Password=n.Input.Password;function z(e,t,n){return e&&!isNaN(Number(e))&&!t.current&&n?Number(e).toFixed(n):e}function L(e,t){if(!e)return e;var n=e.lastIndexOf("."),r=e,i="";return-1!==n&&(r=e.substring(0,n),i=e.substring(n+1)),t&&(i=i.length<t?i:i.substring(0,t)),i?r+"."+i:r}var _=function(e,i){var o=e.formatterType,a=(e.currencySymbol,e.formatter),s=e.parser,c=e.precision,l=e.onBlur,u=e.onFocus,d=D(e,["formatterType","currencySymbol","formatter","parser","precision","onBlur","onFocus"]),f=r.useRef(!1),h=function(e,t,n,r){return"currency"===e?{formatter:function(e){return function(e){if(null!=e){var t=e.toString(),n="",r="";t.startsWith("-")&&(n="-",t=t.slice(1));var i=t.indexOf(".");-1!==i?(e=t.slice(0,i),r=t.slice(i)):e=t;for(var o="",a=e.toString(),s=a.length,c=s-1;c>=0;c--)o=(s-c)%3==0?0===c?a[c]+o:","+a[c]+o:a[c]+o;return n+o+r}return e}(z(e,n,r))},parser:function(e){return L(e.replace(/(,*)/g,""),r)},precision:3}:"percent"===e?{formatter:function(e){var t=z(e,n,r);return"".concat(t,"%")},parser:function(e){return e?e.replace("%",""):Number(e)},precision:2}:"thousands"===e?{formatter:function(e){var t=z(e,n,r);return"".concat(t,"‰")},parser:function(e){return e?e.replace("‰",""):Number(e)},precision:2}:{formatter:function(e){return z(e,n,r)},parser:function(e){return L(e,r)},precision:r}}(o,0,f,c),p=h.formatter,g=h.parser,m=h.precision;return t.jsx(n.InputNumber,O({formatter:a||p,parser:s||g,precision:null!=c?c:m,onBlur:function(e){f.current=!1,l&&l(e)},onFocus:function(e){f.current=!0,u&&u(e)}},d,{ref:i}))};_.displayName="ZTXK_WEBUI_InputNumber";var F=r.memo(r.forwardRef(_)),H={};function B(e,t){}function U(e,t){}function K(e,t,n){t||H[n]||(e(!1,n),H[n]=!0)}function W(e,t){K(B,e,t)}function q(e,t){K(U,e,t)}W.preMessage=function(e){},W.resetWarned=function(){H={}},W.noteOnce=q,o.extend(d),o.extend(u),o.extend(a),o.extend(s),o.extend(c),o.extend(l),o.extend((function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return r.bind(this)(t)}}));var V={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},$=function(e){return V[e]||e.split("_")[0]},Z=function(){q(!1,"Not match any format. Please help to fire a issue about this.")},G={getNow:function(){return o()},getFixedDate:function(e){return o(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return o().locale($(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale($(e)).weekday(0)},getWeek:function(e,t){return t.locale($(e)).week()},getShortWeekDays:function(e){return o().locale($(e)).localeData().weekdaysMin()},getShortMonths:function(e){return o().locale($(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale($(e)).format(n)},parse:function(e,t,n){for(var r=$(e),i=0;i<n.length;i+=1){var a=n[i],s=t;if(a.includes("wo")||a.includes("Wo")){for(var c=s.split("-")[0],l=s.split("-")[1],u=o(c,"YYYY").startOf("year").locale(r),d=0;d<=52;d+=1){var f=u.add(d,"week");if(f.format("Wo")===l)return f}return Z(),null}var h=o(s,a).locale(r);if(h.isValid())return h}return t&&Z(),null}}},X=f(G),Y=h(G),J=r.forwardRef((function(e,n){return t.jsx(X,O({},e,{picker:"time",mode:void 0,ref:n}))}));J.displayName="TimePicker";var Q=r.createContext({locale:"zh-cn"});function ee(e,t){for(var n="",r=t.length,i=0;i<e.length;i++){var o=e.charAt(i),a=t.charAt(i%r);n+=String.fromCharCode(o.charCodeAt(0)+a.charCodeAt(0))}return n}function te(e,t){for(var n="",r=t.length,i=0;i<e.length;i++){var o=e.charAt(i),a=t.charAt(i%r);n+=String.fromCharCode(o.charCodeAt(0)-a.charCodeAt(0))}return n}var ne=n.Form.Item,re="6fr6x",ie="PUsvG",oe="kVhfO",ae="simide",se=function(e){var i=e.loginLogo,o=e.loginBg,a=e.onFinishHandle,s=e.loading,c=n.Form.useForm()[0];r.useEffect((function(){var e=localStorage.getItem(re);if(e)try{var t=JSON.parse(e),n=te(t[ie],ae),r=te(t[oe],ae);n&&r&&c.setFieldsValue({username:n,password:r,remember:!0})}catch(e){console.log(e)}}),[c]);return t.jsx("div",O({className:"login-wrap",style:{backgroundImage:"url(".concat(o,")")}},{children:t.jsxs(n.Form,O({form:c,requiredMark:!1,layout:"vertical",className:"login-form",onFinish:function(e){var t;e.remember&&localStorage.setItem(re,JSON.stringify(((t={})[ie]=ee(e.username,ae),t[oe]=ee(e.password,ae),t))),a&&a(e)}},{children:[t.jsx("div",O({className:"login-logo"},{children:t.jsx("img",{src:i,title:"浙商中拓ERP",alt:"zszt_logo"})})),t.jsx(ne,O({label:"请输入您的账号",name:"username",rules:[{required:!0,message:"请输入您的账号"}]},{children:t.jsx(M,{size:"large",autoComplete:"username",prefix:t.jsx(yn,{type:"icon-yonghu",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx(ne,O({label:"请输入您的密码",name:"password",rules:[{required:!0,message:"请输入您的密码"}]},{children:t.jsx(M.Password,{size:"large",autoComplete:"current-password",prefix:t.jsx(yn,{type:"icon-mima",style:{fontSize:"14px",color:"rgba(0,0,0,.65)"}})})})),t.jsx(ne,{children:t.jsx(R,O({htmlType:"submit",block:!0,className:"form__item--button",loading:s},{children:"登录"}))}),t.jsxs("div",O({className:"form__item--remember"},{children:[t.jsx(ne,O({name:"remember",valuePropName:"checked"},{children:t.jsx(n.Checkbox,{children:"记住密码"})})),t.jsx("div",O({className:"form__item--remember-forget"},{children:"忘记密码"}))]}))]}))}))};se.displayName="ZTXK_WEBUI_Login";var ce=r.createContext({});function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function ue(e){var t=function(e,t){if("object"!==le(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===le(t)?t:String(t)}function de(e,t,n){return(t=ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ve(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function ye(e){return e<=1?"".concat(100*Number(e),"%"):e}function be(e){return 1===e.length?"0"+e:String(e)}function xe(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function we(e){return Se(e)/255}function Se(e){return parseInt(e,16)}var Ce={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 Oe(e){var t,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,c=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Ce[e])e=Ce[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Ie.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Ie.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Ie.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Ie.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Ie.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Ie.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Ie.hex8.exec(e),n)return{r:Se(n[1]),g:Se(n[2]),b:Se(n[3]),a:we(n[4]),format:t?"name":"hex8"};if(n=Ie.hex6.exec(e),n)return{r:Se(n[1]),g:Se(n[2]),b:Se(n[3]),format:t?"name":"hex"};if(n=Ie.hex4.exec(e),n)return{r:Se(n[1]+n[1]),g:Se(n[2]+n[2]),b:Se(n[3]+n[3]),a:we(n[4]+n[4]),format:t?"name":"hex8"};if(n=Ie.hex3.exec(e),n)return{r:Se(n[1]+n[1]),g:Se(n[2]+n[2]),b:Se(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"==typeof e&&(ke(e.r)&&ke(e.g)&&ke(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*ve(t,255),g:255*ve(n,255),b:255*ve(r,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ke(e.h)&&ke(e.s)&&ke(e.v)?(a=ye(e.s),s=ye(e.v),i=function(e,t,n){e=6*ve(e,360),t=ve(t,100),n=ve(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,a,o,o,s,n][c],g:255*[s,n,n,a,o,o][c],b:255*[o,o,s,n,n,a][c]}}(e.h,a,s),l=!0,u="hsv"):ke(e.h)&&ke(e.s)&&ke(e.l)&&(a=ye(e.s),c=ye(e.l),i=function(e,t,n){var r,i,o;if(e=ve(e,360),t=ve(t,100),n=ve(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=xe(s,a,e+1/3),i=xe(s,a,e),o=xe(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,a,c),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(o),{ok:l,format:e.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var De="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Ee="[\\s|\\(]+(".concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")\\s*\\)?"),Te="[\\s|\\(]+(".concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")[,|\\s]+(").concat(De,")\\s*\\)?"),Ie={CSS_UNIT:new RegExp(De),rgb:new RegExp("rgb"+Ee),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+Ee),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+Ee),hsva:new RegExp("hsva"+Te),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 ke(e){return Boolean(Ie.CSS_UNIT.exec(String(e)))}var je=2,Ne=.16,Pe=.05,Ae=.05,Re=.15,Me=5,ze=4,Le=[{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 _e(e){var t=function(e,t,n){e=ve(e,255),t=ve(t,255),n=ve(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,c=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Fe(e){var t=e.r,n=e.g,r=e.b;return"#".concat(function(e,t,n,r){var i=[be(Math.round(e).toString(16)),be(Math.round(t).toString(16)),be(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}(t,n,r,!1))}function He(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-je*t:Math.round(e.h)+je*t:n?Math.round(e.h)+je*t:Math.round(e.h)-je*t)<0?r+=360:r>=360&&(r-=360),r}function Be(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Ne*t:t===ze?e.s+Ne:e.s+Pe*t)>1&&(r=1),n&&t===Me&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Ue(e,t,n){var r;return(r=n?e.v+Ae*t:e.v-Re*t)>1&&(r=1),Number(r.toFixed(2))}function Ke(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Oe(e),i=Me;i>0;i-=1){var o=_e(r),a=Fe(Oe({h:He(o,i,!0),s:Be(o,i,!0),v:Ue(o,i,!0)}));n.push(a)}n.push(Fe(r));for(var s=1;s<=ze;s+=1){var c=_e(r),l=Fe(Oe({h:He(c,s),s:Be(c,s),v:Ue(c,s)}));n.push(l)}return"dark"===t.theme?Le.map((function(e){var r,i,o,a=e.index,s=e.opacity;return Fe((r=Oe(t.backgroundColor||"#141414"),i=Oe(n[a]),o=100*s/100,{r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b}))})):n}var We={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"},qe={},Ve={};Object.keys(We).forEach((function(e){qe[e]=Ke(We[e]),qe[e].primary=qe[e][5],Ve[e]=Ke(We[e],{theme:"dark",backgroundColor:"#141414"}),Ve[e].primary=Ve[e][5]}));var $e="data-rc-order",Ze="rc-util-key",Ge=new Map;function Xe(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Ze}function Ye(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Je(e){return Array.from((Ge.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute($e,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r)),null!=n&&n.nonce&&(i.nonce=null==n?void 0:n.nonce),i.innerHTML=e;var o=Ye(t),a=o.firstChild;if(r){if("queue"===r){var s=Je(o).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute($e))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function et(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Ge.get(e);if(!n||!function(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}(document,n)){var r=Qe("",t),i=r.parentNode;Ge.set(e,i),e.removeChild(r)}}(Ye(n),n);var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Je(Ye(t)).find((function(n){return n.getAttribute(Xe(t))===e}))}(t,n);if(r){var i,o,a;if(null!==(i=n.csp)&&void 0!==i&&i.nonce&&r.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce))r.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce;return r.innerHTML!==e&&(r.innerHTML=e),r}var s=Qe(e,n);return s.setAttribute(Xe(n),t),s}function tt(e,t){W(e,"[@ant-design/icons] ".concat(t))}function nt(e){return"object"===le(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===le(e.icon)||"function"==typeof e.icon)}function rt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else t[n]=r;return t}),{})}function it(e,t,n){return n?r.createElement(e.tag,he(he({key:t},rt(e.attrs)),n),(e.children||[]).map((function(n,r){return it(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.createElement(e.tag,he({key:t},rt(e.attrs)),(e.children||[]).map((function(n,r){return it(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function ot(e){return Ke(e)[0]}function at(e){return e?Array.isArray(e)?e:[e]:[]}var st={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ct=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",t=r.useContext(ce).csp;r.useEffect((function(){et(e,"@ant-design-icons",{prepend:!0,csp:t})}),[])},lt=["icon","className","onClick","style","primaryColor","secondaryColor"],ut={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var dt=function(e){var t=e.icon,n=e.className,r=e.onClick,i=e.style,o=e.primaryColor,a=e.secondaryColor,s=me(e,lt),c=ut;if(o&&(c={primaryColor:o,secondaryColor:a||ot(o)}),ct(),tt(nt(t),"icon should be icon definiton, but got ".concat(t)),!nt(t))return null;var l=t;return l&&"function"==typeof l.icon&&(l=he(he({},l),{},{icon:l.icon(c.primaryColor,c.secondaryColor)})),it(l.icon,"svg-".concat(l.name),he({className:n,onClick:r,style:i,"data-icon":l.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};dt.displayName="IconReact",dt.getTwoToneColors=function(){return he({},ut)},dt.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;ut.primaryColor=t,ut.secondaryColor=n||ot(t),ut.calculated=!!n};var ft=dt;function ht(e){var t=ge(at(e),2),n=t[0],r=t[1];return ft.setTwoToneColors({primaryColor:n,secondaryColor:r})}var pt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ht("#1890ff");var gt=S.forwardRef((function(e,t){var n,r=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,l=e.twoToneColor,u=me(e,pt),d=S.useContext(ce),f=d.prefixCls,h=void 0===f?"anticon":f,p=d.rootClassName,g=N(p,h,(de(n={},"".concat(h,"-").concat(i.name),!!i.name),de(n,"".concat(h,"-spin"),!!o||"loading"===i.name),n),r),m=s;void 0===m&&c&&(m=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,y=ge(at(l),2),b=y[0],x=y[1];return S.createElement("span",he(he({role:"img","aria-label":i.name},u),{},{ref:t,tabIndex:m,onClick:c,className:g}),S.createElement(ft,{icon:i,primaryColor:b,secondaryColor:x,style:v}))}));gt.displayName="AntdIcon",gt.getTwoToneColor=function(){var e=ft.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},gt.setTwoToneColor=ht;var mt=gt,vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"},yt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:vt}))};yt.displayName="ArrowsAltOutlined";var bt=S.forwardRef(yt),xt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},wt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:xt}))};wt.displayName="CaretDownOutlined";var St=S.forwardRef(wt),Ct={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Ot=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Ct}))};Ot.displayName="CaretUpOutlined";var Dt=S.forwardRef(Ot),Et={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"},Tt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Et}))};Tt.displayName="CopyOutlined";var It=S.forwardRef(Tt),kt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},jt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:kt}))};jt.displayName="DownOutlined";var Nt=S.forwardRef(jt),Pt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},At=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Pt}))};At.displayName="LogoutOutlined";var Rt=S.forwardRef(At),Mt={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"},zt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Mt}))};zt.displayName="MinusOutlined";var Lt=S.forwardRef(zt),_t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Ft=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:_t}))};Ft.displayName="MinusSquareOutlined";var Ht=S.forwardRef(Ft),Bt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-24 500c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H416c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h512zM472 436h400v152H472V436zM80 646c0 4.4 3.6 8 8 8h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56zm8-204h224c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H88c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"}}]},name:"pic-right",theme:"outlined"},Ut=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Bt}))};Ut.displayName="PicRightOutlined";var Kt=S.forwardRef(Ut),Wt={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"},qt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Wt}))};qt.displayName="PlusOutlined";var Vt=S.forwardRef(qt),$t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},Zt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:$t}))};Zt.displayName="SettingOutlined";var Gt=S.forwardRef(Zt),Xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z"}}]},name:"shrink",theme:"outlined"},Yt=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Xt}))};Yt.displayName="ShrinkOutlined";var Jt=S.forwardRef(Yt),Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"},en=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:Qt}))};en.displayName="UnlockOutlined";var tn=S.forwardRef(en),nn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},rn=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:nn}))};rn.displayName="UploadOutlined";var on=S.forwardRef(rn),an={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},sn=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:an}))};sn.displayName="UserOutlined";var cn=S.forwardRef(sn),ln={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z"}}]},name:"vertical-align-bottom",theme:"outlined"},un=function(e,t){return S.createElement(mt,he(he({},e),{},{ref:t,icon:ln}))};un.displayName="VerticalAlignBottomOutlined";var dn=S.forwardRef(un),fn=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],hn=S.forwardRef((function(e,t){var n=e.className,r=e.component,i=e.viewBox,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,l=e.children,u=me(e,fn);tt(Boolean(r||l),"Should have `component` prop or `children`."),ct();var d=S.useContext(ce),f=d.prefixCls,h=void 0===f?"anticon":f,p=d.rootClassName,g=N(p,h,n),m=N(de({},"".concat(h,"-spin"),!!o)),v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,y=he(he({},st),{},{className:m,style:v,viewBox:i});i||delete y.viewBox;var b=s;return void 0===b&&c&&(b=-1),S.createElement("span",he(he({role:"img"},u),{},{ref:t,tabIndex:b,onClick:c,className:g}),r?S.createElement(r,he({},y),l):l?(tt(Boolean(i)||1===S.Children.count(l)&&S.isValidElement(l)&&"use"===S.Children.only(l).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),S.createElement("svg",he(he({},y),{},{viewBox:i}),l)):null)}));hn.displayName="AntdIcon";var pn=hn,gn=["type","children"],mn=new Set;function vn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e[n];if(t=r,Boolean("string"==typeof t&&t.length&&!mn.has(t))){var i=document.createElement("script");i.setAttribute("src",r),i.setAttribute("data-namespace",r),e.length>n+1&&(i.onload=function(){vn(e,n+1)},i.onerror=function(){vn(e,n+1)}),mn.add(r),document.body.appendChild(i)}}var yn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,r=void 0===n?{}:n;t&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(t)?vn(t.reverse()):vn([t]));var i=S.forwardRef((function(e,t){var n=e.type,i=e.children,o=me(e,gn),a=null;return e.type&&(a=S.createElement("use",{xlinkHref:"#".concat(n)})),i&&(a=i),S.createElement(pn,he(he(he({},r),o),{},{ref:t}),a)}));return i.displayName="Iconfont",i}({scriptUrl:["//at.alicdn.com/t/c/font_4078313_tg40lf02k9.js"]});const bn=r.createContext({dragDropManager:void 0});function xn(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var wn="function"==typeof Symbol&&Symbol.observable||"@@observable",Sn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Cn={INIT:"@@redux/INIT"+Sn(),REPLACE:"@@redux/REPLACE"+Sn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Sn()}};function On(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(xn(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(xn(1));return n(On)(e,t)}if("function"!=typeof e)throw new Error(xn(2));var i=e,o=t,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error(xn(3));return o}function d(e){if("function"!=typeof e)throw new Error(xn(4));if(c)throw new Error(xn(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw new Error(xn(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),a=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(xn(7));if(void 0===e.type)throw new Error(xn(8));if(c)throw new Error(xn(9));try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:Cn.INIT}),(r={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(xn(10));i=e,f({type:Cn.REPLACE})}})[wn]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(xn(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[wn]=function(){return this},e},r}function Dn(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,(function(){return n[r++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function En(e){return"object"==typeof e}const Tn="dnd-core/INIT_COORDS",In="dnd-core/BEGIN_DRAG",kn="dnd-core/PUBLISH_DRAG_SOURCE",jn="dnd-core/HOVER",Nn="dnd-core/DROP",Pn="dnd-core/END_DRAG";function An(e,t){return{type:Tn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Rn={type:Tn,payload:{clientOffset:null,sourceClientOffset:null}};function Mn(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:i,getSourceClientOffset:o}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(An(i)),function(e,t,n){Dn(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){Dn(n.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,s);const c=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==c)return void e.dispatch(Rn);let l=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");!function(e){Dn("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(o),l=o(c)}e.dispatch(An(i,l));const u=s.getSource(c).beginDrag(a,c);if(null==u)return;!function(e){Dn(En(e),"Item must be an object.")}(u),s.pinSource(c);const d=s.getSourceType(c);return{type:In,payload:{itemType:d,item:u,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}}}}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zn(e,t,n[t])}))}return e}function _n(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Dn(e.isDragging(),"Cannot call drop while not dragging."),Dn(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const i=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);i.forEach(((i,o)=>{const a=function(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;(function(e){Dn(void 0===e||En(e),"Drop result must either be an object or undefined.")})(o),void 0===o&&(o=0===t?{}:r.getDropResult());return o}(i,o,r,n),s={type:Nn,payload:{dropResult:Ln({},t,a)}};e.dispatch(s)}))}}function Fn(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Dn(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:Pn}}}function Hn(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function Bn(e){return function(t,{clientOffset:n}={}){!function(e){Dn(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),i=e.getMonitor(),o=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];Hn(t.getTargetType(i),n)||e.splice(r,1)}}(r,o,i.getItemType()),function(e,t,n){Dn(t.isDragging(),"Cannot call hover while not dragging."),Dn(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];Dn(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");Dn(n.getTarget(r),"Expected targetIds to be registered.")}}(r,i,o),function(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}(r,i,o),{type:jn,payload:{targetIds:r,clientOffset:n||null}}}}function Un(e){return function(){if(e.getMonitor().isDragging())return{type:kn}}}class Kn{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:Mn(e),publishDragSource:Un(e),hover:Bn(e),drop:_n(e),endDrag:Fn(e)}}(this);return Object.keys(n).reduce(((r,i)=>{const o=n[i];var a;return r[i]=(a=o,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function Wn(e,t){return{x:e.x-t.x,y:e.y-t.y}}const qn=[],Vn=[];qn.__IS_NONE__=!0,Vn.__IS_ALL__=!0;class $n{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Dn("function"==typeof e,"listener must be a function."),Dn(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),i=t.stateId;try{const o=i===r||i===r+1&&!function(e,t){return e!==qn&&(e===Vn||void 0===t||(n=e,t.filter((e=>n.indexOf(e)>-1))).length>0);var n}(t.dirtyHandlerIds,n);o||e()}finally{r=i}}))}subscribeToOffsetChange(e){Dn("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Dn(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(Dn(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return Hn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(Dn(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!Hn(r,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return n?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?Wn((o=r,{x:(i=t).x+o.x,y:i.y+o.y}),n):null;var i,o}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?Wn(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const Zn="undefined"!=typeof global?global:self,Gn=Zn.MutationObserver||Zn.WebKitMutationObserver;function Xn(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const Yn="function"==typeof Gn?function(e){let t=1;const n=new Gn(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:Xn;class Jn{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Qn=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Yn(this.flush),this.requestErrorThrow=Xn((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},er=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new Jn(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(Qn.registerPendingError);const tr="dnd-core/ADD_SOURCE",nr="dnd-core/ADD_TARGET",rr="dnd-core/REMOVE_SOURCE",ir="dnd-core/REMOVE_TARGET";function or(e,t){t&&Array.isArray(e)?e.forEach((e=>or(e,!1))):Dn("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ar;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(ar||(ar={}));let sr=0;function cr(e){const t=(sr++).toString();switch(e){case ar.SOURCE:return`S${t}`;case ar.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function lr(e){switch(e[0]){case"S":return ar.SOURCE;case"T":return ar.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function ur(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}class dr{addSource(e,t){or(e),function(e){Dn("function"==typeof e.canDrag,"Expected canDrag to be a function."),Dn("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Dn("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(ar.SOURCE,e,t);return this.store.dispatch(function(e){return{type:tr,payload:{sourceId:e}}}(n)),n}addTarget(e,t){or(e,!0),function(e){Dn("function"==typeof e.canDrop,"Expected canDrop to be a function."),Dn("function"==typeof e.hover,"Expected hover to be a function."),Dn("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(ar.TARGET,e,t);return this.store.dispatch(function(e){return{type:nr,payload:{targetId:e}}}(n)),n}containsHandler(e){return ur(this.dragSources,e)||ur(this.dropTargets,e)}getSource(e,t=!1){Dn(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Dn(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Dn(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Dn(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return lr(e)===ar.SOURCE}isTargetId(e){return lr(e)===ar.TARGET}removeSource(e){var t;Dn(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:rr,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},Qn.enqueueTask(er.create(t))}removeTarget(e){Dn(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:ir,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Dn(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Dn(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=cr(e);return this.types.set(r,t),e===ar.SOURCE?this.dragSources.set(r,n):e===ar.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const fr=(e,t)=>e===t;function hr(e=qn,t){switch(t.type){case jn:break;case tr:case nr:case ir:case rr:return qn;default:return Vn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach(((e,t)=>{1===e&&i.push(t)})),i}(n,r),o=i.length>0||!function(e,t,n=fr){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!o)return qn;const a=r[r.length-1],s=n[n.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function mr(e=gr,t){const{payload:n}=t;switch(t.type){case Tn:case In:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case jn:return r=e.clientOffset,i=n.clientOffset,!r&&!i||r&&i&&r.x===i.x&&r.y===i.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pr(e,t,n[t])}))}return e}({},e,{clientOffset:n.clientOffset});case Pn:case Nn:return gr;default:return e}var r,i}function vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){vr(e,t,n[t])}))}return e}const br={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function xr(e=br,t){const{payload:n}=t;switch(t.type){case In:return yr({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case kn:return yr({},e,{isSourcePublic:!0});case jn:return yr({},e,{targetIds:n.targetIds});case ir:return-1===e.targetIds.indexOf(n.targetId)?e:yr({},e,{targetIds:(r=e.targetIds,i=n.targetId,r.filter((e=>e!==i)))});case Nn:return yr({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Pn:return yr({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,i}function wr(e=0,t){switch(t.type){case tr:case nr:return e+1;case rr:case ir:return e-1;default:return e}}function Sr(e=0){return e+1}function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Cr(e,t,n[t])}))}return e}function Dr(e={},t){return{dirtyHandlerIds:hr(e.dirtyHandlerIds,{type:t.type,payload:Or({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",i=[],r.split(".").reduce(((e,t)=>e&&e[t]?e[t]:i||null),n))})}),dragOffset:mr(e.dragOffset,t),refCount:wr(e.refCount,t),dragOperation:xr(e.dragOperation,t),stateId:Sr(e.stateId)};var n,r,i}function Er(e,t=void 0,n={},r=!1){const i=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return On(Dr,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),o=new $n(i,new dr(i)),a=new Kn(i,o),s=e(a,t,n);return a.receiveBackend(s),a}function Tr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}let Ir=0;const kr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var jr=r.memo((function(e){var{children:n}=e,i=Tr(e,["children"]);const[o,a]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=Nr(),n,r){const i=t;i[kr]||(i[kr]={dragDropManager:Er(e,t,n,r)});return i[kr]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(i);return r.useEffect((()=>{if(a){const e=Nr();return++Ir,()=>{0==--Ir&&(e[kr]=null)}}}),[]),t.jsx(bn.Provider,{value:o,children:n})}));function Nr(){return"undefined"!=typeof global?global:window}var Pr=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},Ar=k(Pr);const Rr="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function Mr(e,t,n){const[i,o]=function(e,t,n){const[i,o]=r.useState((()=>t(e))),a=r.useCallback((()=>{const r=t(e);Ar(i,r)||(o(r),n&&n())}),[i,e,n]);return Rr(a),[i,a]}(e,t,n);return Rr((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})}),[e,o]),i}function zr(e,t,n){return Mr(t,e||(()=>({})),(()=>n.reconnect()))}function Lr(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),r.useMemo((()=>"function"==typeof e?e():e),n)}function _r(e){return r.useMemo((()=>e.hooks.dragSource()),[e])}function Fr(e){return r.useMemo((()=>e.hooks.dragPreview()),[e])}let Hr=!1,Br=!1;class Ur{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Dn(!Hr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Hr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Hr=!1}}isDragging(){if(!this.sourceId)return!1;Dn(!Br,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Br=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Br=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Kr=!1;class Wr{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Dn(!Kr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Kr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Kr=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function qr(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<o.length;a++){const c=o[a];if(!s(c))return!1;const l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,!1===i||void 0===i&&l!==u)return!1}return!0}function Vr(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function $r(e){return(t=null,n=null)=>{if(!r.isValidElement(t)){const r=t;return e(r,n),r}const i=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,t){const n=e.ref;return Dn("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?r.cloneElement(e,{ref:e=>{Gr(n,e),Gr(t,e)}}):r.cloneElement(e,{ref:t})}(i,n?t=>e(t,n):e)}}function Zr(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=$r(r);t[n]=()=>e}})),t}function Gr(e,t){"function"==typeof e?e(t):e.current=t}class Xr{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!qr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!qr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Zr({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Vr(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Vr(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Yr{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!qr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Zr({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Vr(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Jr(){const{dragDropManager:e}=r.useContext(bn);return Dn(null!=e,"Expected drag drop context"),e}class Qr{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function ei(e,t,n){const i=Jr(),o=function(e,t,n){const i=r.useMemo((()=>new Qr(e,t,n)),[t,n]);return r.useEffect((()=>{i.spec=e}),[e]),i}(e,t,n),a=function(e){return r.useMemo((()=>{const t=e.type;return Dn(null!=t,"spec.type must be defined"),t}),[e])}(e);Rr((function(){if(null!=a){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}}),[i,t,n,o,a])}function ti(e,t){const n=Lr(e,t);Dn(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=Jr();return r.useMemo((()=>new Ur(e)),[e])}(),o=function(e,t){const n=Jr(),i=r.useMemo((()=>new Xr(n.getBackend())),[n]);return Rr((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),Rr((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(n.options,n.previewOptions);return ei(n,i,o),[zr(n.collect,i,o),_r(o),Fr(o)]}function ni(e){return r.useMemo((()=>e.hooks.dropTarget()),[e])}class ri{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function ii(e,t,n){const i=Jr(),o=function(e,t){const n=r.useMemo((()=>new ri(e,t)),[t]);return r.useEffect((()=>{n.spec=e}),[e]),n}(e,t),a=function(e){const{accept:t}=e;return r.useMemo((()=>(Dn(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);Rr((function(){const[e,r]=function(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}(a,o,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}),[i,t,o,n,a.map((e=>e.toString())).join("|")])}function oi(e,t){const n=Lr(e,t),i=function(){const e=Jr();return r.useMemo((()=>new Wr(e)),[e])}(),o=function(e){const t=Jr(),n=r.useMemo((()=>new Yr(t.getBackend())),[t]);return Rr((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return ii(n,i,o),[zr(n.collect,i,o),ni(o)]}function ai(e){let t=null;return()=>(null==t&&(t=e()),t)}class si{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const i=[];return n.forEach((e=>i.push(e))),i}(this.entered.filter((t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e)))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter((e=>e!==r))),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ci{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})}))}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach((n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const li="__NATIVE_FILE__",ui="__NATIVE_URL__",di="__NATIVE_TEXT__",fi="__NATIVE_HTML__";var hi=Object.freeze({__proto__:null,FILE:li,HTML:fi,TEXT:di,URL:ui});function pi(e,t,n){const r=t.reduce(((t,n)=>t||e.getData(n)),"");return null!=r?r:n}const gi={[li]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[fi]:{exposeProperties:{html:(e,t)=>pi(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[ui]:{exposeProperties:{urls:(e,t)=>pi(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[di]:{exposeProperties:{text:(e,t)=>pi(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function mi(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(gi).filter((e=>{const n=gi[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some((e=>t.indexOf(e)>-1))}))[0]||null}const vi=ai((()=>/firefox/i.test(navigator.userAgent))),yi=ai((()=>Boolean(window.safari)));class bi{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:i,c3s:o}=this;let a=t.length-1;if(e===t[a])return n[a];let s,c=0,l=o.length-1;for(;c<=l;){s=Math.floor(.5*(c+l));const r=t[s];if(r<e)c=s+1;else{if(!(r>e))return n[s];l=s-1}}a=Math.max(0,l);const u=e-t[a],d=u*u;return n[a]+r[a]*u+i[a]*d+o[a]*u*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort(((t,n)=>e[t]<e[n]?-1:1));const i=[],o=[];let a,s;for(let r=0;r<n-1;r++)a=e[r+1]-e[r],s=t[r+1]-t[r],i.push(a),o.push(s/a);const c=[o[0]];for(let e=0;e<i.length-1;e++){const t=o[e],n=o[e+1];if(t*n<=0)c.push(0);else{a=i[e];const r=i[e+1],o=a+r;c.push(3*o/((o+r)/t+(o+a)/n))}}c.push(o[o.length-1]);const l=[],u=[];let d;for(let e=0;e<c.length-1;e++){d=o[e];const t=c[e],n=1/i[e],r=t+c[e+1]-d-d;l.push((d-t-r)*n),u.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=c,this.c2s=l,this.c3s=u}}const xi=1;function wi(e){const t=e.nodeType===xi?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Si(e){return{x:e.clientX,y:e.clientY}}function Ci(e,t,n,r,i){const o="IMG"===(a=t).nodeName&&(vi()||!(null===(s=document.documentElement)||void 0===s?void 0:s.contains(a)));var a,s;const c=wi(o?e:t),l={x:n.x-c.x,y:n.y-c.y},{offsetWidth:u,offsetHeight:d}=e,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:p,dragPreviewHeight:g}=function(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return yi()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(o,t,u,d),{offsetX:m,offsetY:v}=i,y=0===v||v;return{x:0===m||m?m:new bi([0,.5,1],[l.x,l.x/u*p,l.x+p-u]).interpolate(f),y:y?v:(()=>{let e=new bi([0,.5,1],[l.y,l.y/d*g,l.y+g-d]).interpolate(h);return yi()&&o&&(e+=(window.devicePixelRatio-1)*g),e})()}}class Oi{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function Di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ei(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Di(e,t,n[t])}))}return e}class Ti{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ei({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Ei({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(hi).some((t=>hi[t]===e))}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=gi[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new ci(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout((()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&wi(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Si(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,i=mi(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){const{anchorX:e,anchorY:o,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=Ci(t,i,n,{anchorX:e,anchorY:o},{offsetX:a,offsetY:s});r.setDragImage(i,c.x,c.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(i)this.beginDragNativeItem(i);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=mi(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Si(e)});t.some((e=>this.monitor.canDropOnTarget(e)))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Si(e),this.scheduleHover(t);(t||[]).some((e=>this.monitor.canDropOnTarget(e)))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):mi(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Si(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Oi(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new si(this.isNodeInDocument)}}const Ii=function(e,t,n){return new Ti(e,t,n)};var ki={exports:{}};!function(e,t){function n(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var r="object"==typeof process&&!0;function i(e,t){if(!e){if(r)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=i;var o=Object.prototype.hasOwnProperty,a=Array.prototype.splice,s=Object.prototype.toString;function c(e){return s.call(e).slice(8,-1)}var l=Object.assign||function(e,t){return u(t).forEach((function(n){o.call(t,n)&&(e[n]=t[n])})),e},u="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function d(e){return Array.isArray(e)?l(e.constructor(e.length),e):"Map"===c(e)?new Map(e):"Set"===c(e)?new Set(e):e&&"object"==typeof e?l(Object.create(Object.getPrototypeOf(e)),e):e}var f=function(){function e(){this.commands=l({},h),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||i(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),i("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var a=e;return u(r).forEach((function(t){if(o.call(n.commands,t)){var i=e===a;a=n.commands[t](r[t],a,r,e),i&&n.isEquals(a,e)&&(a=e)}else{var s="Map"===c(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),l="Map"===c(a)?a.get(t):a[t];n.isEquals(s,l)&&(void 0!==s||o.call(e,t))||(a===e&&(a=d(e)),"Map"===c(a)?a.set(t,s):a[t]=s)}})),a},e}();t.Context=f;var h={$push:function(e,t,n){return g(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return g(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,o){return function(e,t){i(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+n(e)})),v(t.$splice)}(t,r),e.forEach((function(e){v(e),t===o&&e.length&&(t=d(o)),a.apply(t,e)})),t},$set:function(e,t,n){return function(e){i(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){m(e,"$toggle");var n=e.length?d(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return m(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=d(r)),delete t[e])})),t},$add:function(e,t,n,r){return y(t,"$add"),m(e,"$add"),"Map"===c(t)?e.forEach((function(e){var n=e[0],i=e[1];t===r&&t.get(n)!==i&&(t=d(r)),t.set(n,i)})):e.forEach((function(e){t!==r||t.has(e)||(t=d(r)),t.add(e)})),t},$remove:function(e,t,n,r){return y(t,"$remove"),m(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=d(r)),t.delete(e)})),t},$merge:function(e,t,r,o){var a,s;return a=t,i((s=e)&&"object"==typeof s,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(s)})),i(a&&"object"==typeof a,(function(){return"update(): $merge expects a target of type 'object'; got "+n(a)})),u(e).forEach((function(n){e[n]!==t[n]&&(t===o&&(t=d(o)),t[n]=e[n])})),t},$apply:function(e,t){var r;return i("function"==typeof(r=e),(function(){return"update(): expected spec of $apply to be a function; got "+n(r)+"."})),e(t)}},p=new f;function g(e,t,r){i(Array.isArray(e),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(e)+"."})),m(t[r],r)}function m(e,t){i(Array.isArray(e),(function(){return"update(): expected spec of "+n(t)+" to be an array; got "+n(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){i(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(e)+". Did you forget to wrap your parameters in an array?"}))}function y(e,t){var r=c(e);i("Map"===r||"Set"===r,(function(){return"update(): "+n(t)+" expects a target of type Set or Map; got "+n(r)}))}t.isEquals=p.update.isEquals,t.extend=p.extend,t.default=p.update,t.default.default=e.exports=l(t.default,t)}(ki,ki.exports);var ji=k(ki.exports),Ni=function(e){var n=e.type,i=e.onMoveItem,o=e.index,a=e.id,s=e.children,c=e.style,l=e.className,u=r.useRef(null),d=N("zt-sortable",l,{}),f=oi({accept:n,hover:function(e,t){var n;if(u.current){var r=e.index,a=o;if(r!==a){var s=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect(),c=(s.bottom-s.top)/2,l=t.getClientOffset().y-s.top;r<a&&l<c||r>a&&l>c||(i(r,a),e.index=a)}}}}),h=f[1],p=ti({type:n,item:function(){return{id:a,index:o}},collect:function(e){return{isDragging:e.isDragging()}}}),g=p[0].isDragging?0:1;return(0,p[1])(h(u)),t.jsx("div",O({ref:u,className:d,style:O(O({},c),{opacity:g})},{children:s}))},Pi=500;function Ai(e,t,n){if(e&&t&&Array.isArray(n)){var r=[];try{r=(JSON.parse(localStorage.getItem(t)||"{}")||{})[e]}catch(e){console.log(e)}var i=Array.isArray(r)&&r.length>0?r:[];return r&&0!==r.length?n.forEach((function(e,t){var n=O({checked:!0},e),r=i.find((function(e){return e.key===n.key}));r?(r.label=n.label,r.isFind=!0):i.push(O(O({},n),{isFind:!0}))})):n.forEach((function(e){var t=O(O({},e),{checked:void 0===e.checked||e.checked});i.push(O(O({},t),{isFind:!0}))})),i.filter((function(e){return e.isFind})).map((function(e){var t=O({},e);return Reflect.deleteProperty(t,"isFind"),t}))}return[]}function Ri(e,t,n,i,o,a,s){var c=r.useState(!1),l=c[0],u=c[1],d=r.useCallback((function(){return e=i,t="".concat(i,"_lru_key"),function(n,r){var i={},o=[];try{i=JSON.parse(localStorage.getItem(e)||"{}")||{},o=JSON.parse(localStorage.getItem(t)||"[]")||[]}catch(e){console.error(e)}o.length!==Object.keys(i).length&&(o=Object.keys(i));var a=o.findIndex((function(e){return e===n}));if(-1!==a?(o.splice(a,1),o.push(n)):o.push(n),o.length>Pi){var s=o.shift();try{delete i[s]}catch(e){}}i[n]=r,localStorage.setItem(e,JSON.stringify(i)),localStorage.setItem(t,JSON.stringify(o))};var e,t}),[i]),f=r.useCallback((function(){u(!1),o(e)}),[o,e]),h=r.useCallback((function(){u(!1),t(a),s(a),o(a),d()(n,a)}),[a,t,n,d,o]),p=r.useCallback((function(e){u(!1),t(e),o(e),s(e),d()(n,e)}),[t,n,d,o]);return{visible:l,setVisible:u,onClose:f,onReset:h,onSure:p}}var Mi=function(e,i){var o=e.list,a=e.dynamicKey,s=e.parentDynamicKey,c=e.title,l=void 0===c?"自定义配置":c,u=e.onCurrentListChange,d=function(e,t,n){var i=r.useMemo((function(){return Ai(e,t,n)}),[e,t,n]),o=r.useState(i),a=o[0],s=o[1],c=r.useState(i),l=c[0],u=c[1];return r.useEffect((function(){i&&(s(i),u(i))}),[i]),{currentDynamicList:a,setCurrentDynamicList:s,tempDynamicList:l,setTempDynamicList:u}}(a,s,o),f=d.currentDynamicList,h=d.setCurrentDynamicList,p=d.tempDynamicList,g=d.setTempDynamicList,m=Ri(f,h,a,s,g,o,u),v=m.visible,y=m.setVisible,b=m.onClose,x=m.onReset,w=m.onSure;r.useImperativeHandle(i,(function(){return{setVisible:y}}));var S=r.useMemo((function(){var e=[];return p.forEach((function(t){t.checked&&e.push(t.key)})),e}),[p]),C=r.useCallback((function(e,t){g((function(n){var r=n[e];return ji(n,{$splice:[[e,1],[t,0,r]]})}))}),[g]),D=function(){w&&w(p)};return t.jsx(n.Drawer,O({className:"dynamic-drawer",title:t.jsxs("div",{children:[t.jsx(Gt,{style:{fontSize:16}}),t.jsxs("span",O({className:"search-drawer--title-text"},{children:[l,t.jsx("span",{children:"(拖拽排序)"})]}))]}),width:300,placement:"right",open:v,closable:!1,maskClosable:!1,footer:t.jsxs(t.Fragment,{children:[t.jsx(R,O({type:"default",onClick:b},{children:"取消"})),t.jsx(R,O({type:"default",onClick:x},{children:"重置"})),t.jsx(R,O({type:"primary",onClick:D},{children:"确定"}))]})},{children:t.jsx(jr,O({backend:Ii,context:window},{children:t.jsx(n.Checkbox.Group,O({value:S,onChange:function(e){var t=p.map((function(e){return O({},e)}))||[];t.forEach((function(t){e.find((function(e){return e===t.key}))?t.checked=!0:t.checked=!1})),g(t)}},{children:p.map((function(e,r){return t.jsx(Ni,O({type:"search-drawer",index:r,onMoveItem:C},{children:t.jsx(n.Checkbox,O({value:e.key,disabled:e.disabled},{children:e.label||e.key}))}),e.key)}))}))}))}))};Mi.displayName="ZTXK_WEBUI_DynamicDrawer";var zi=r.memo(r.forwardRef(Mi)),Li=function(e,n){var i=e.dynamicKey,o=e.parentDynamicKey,a=e.defaultList,s=e.children,c=e.title,l=e.onCurrentListChange,u=e.hiddenOperationIcon,d=r.useState(a),f=d[0],h=d[1],p=r.useRef({});return r.useImperativeHandle(n,(function(){return{getCurrentDynamicList:function(e){return Ai(i,o,e)},setList:h,setVisible:function(e){var t;null===(t=p.current)||void 0===t||t.setVisible(e)}}})),Array.isArray(f)&&f.length>0?t.jsxs("div",O({className:"ztxk-dynamic-setting"},{children:[u?null:t.jsx("div",O({onClick:function(){var e;return null===(e=p.current)||void 0===e?void 0:e.setVisible(!0)}},{children:s||t.jsx(Gt,{style:{fontSize:18,color:"#768696"}})})),t.jsx(zi,{list:f,dynamicKey:i,parentDynamicKey:o,ref:p,title:c,onCurrentListChange:l})]})):null};Li.displayName="ZTXK_WEBUI_DynamicSetting";var _i=r.memo(r.forwardRef(Li));var Fi=r.memo((function(e){var n=e.items,r=e.outsideState;return t.jsx(t.Fragment,{children:Array.isArray(n)?null==n?void 0:n.map((function(e,n){return t.jsx($i,O({index:n},e,{outsideState:r}),"".concat(e.name||n))})):null})})),Hi=r.memo((function(e){var n=e.children,r=e.value;return t.jsx("div",O({className:"ztxk-form--detault-dom"},{children:n||(r||"— —")}))})),Bi="ztxk-webui-dynamic-form",Ui=r.memo((function(e){var i=e.form,o=e.bottomBorder,a=e.isFlex,s=void 0===a||a,c=e.wrapClassName,l=e.leftClassName;e.itemClassName;var u=e.rightWrapVisible,d=e.rightClassName,f=e.children,h=e.dynamicKey,p=e.formPreferences,g=e.items,m=e.outsideState,v=e.onValuesChange,y=e.onResetHandle,b=e.onSearchHandle,x=e.type,w=D(e,["form","bottomBorder","isFlex","wrapClassName","leftClassName","itemClassName","rightWrapVisible","rightClassName","children","dynamicKey","formPreferences","items","outsideState","onValuesChange","onResetHandle","onSearchHandle","type"]),S=function(e,t){return{configInfoItems:r.useMemo((function(){return e?null==t?void 0:t.map((function(t){var n,r,i,o=t.name,a=t.configName||o;return O(O({},t),{isDisplay:null===(n=e[a])||void 0===n?void 0:n.isDisplay,isRequired:null===(r=e[a])||void 0===r?void 0:r.isRequired,isChangeable:null===(i=e[a])||void 0===i?void 0:i.isChangeable})})):t}),[e,t])}}(p,g).configInfoItems,C=function(e,t,n){var i=r.useRef({}),o=r.useMemo((function(){var n=[];return t&&e&&(n=e.map((function(e){return{key:e.name,label:e.label,disabled:!0===e.dynamicDisabled,checked:!1!==e.isDisplay}}))),n}),[t,e]);r.useEffect((function(){var e,r;n&&t&&(null===(r=null===(e=i.current)||void 0===e?void 0:e.setList)||void 0===r||r.call(e,o))}),[n,t]);var a=r.useState((function(){return Ai(t,Bi,o)})),s=a[0],c=a[1],l=r.useCallback((function(e){c(e)}),[]),u=r.useMemo((function(){var t=[];return Array.isArray(s)&&s.length>0&&s.forEach((function(n){var r=n.key,i=n.checked,o=null==e?void 0:e.find((function(e){return(null==e?void 0:e.name)===r}));o&&(o.isDisplay=!!i,t.push(o))})),t}),[e,s]);return{dynamicList:o,currentDynamicList:s,onCurrentListChange:l,newItems:u,dynamicSettingRef:i}}(S,h,p),E=C.dynamicList,T=C.onCurrentListChange,I=C.newItems,k=C.dynamicSettingRef,j=N("ztxk-form",c,{"ztxk-form--bottom-border":o,"ztxk-form--list":"list"===x}),P=N("ztxk-form__left",l,{"ztxk-form__left--flex":s}),A=N("ztxk-form__right",d),M=r.useMemo((function(){var e={};if(g)for(var t=0;t<g.length;t++){var n=g[t];"string"==typeof n.name&&n.shouldUpdateNames&&n.shouldUpdateClear&&(e[n.name]="boolean"==typeof n.shouldUpdateClear?n.shouldUpdateNames:n.shouldUpdateClear)}return e}),[g]),z=r.useCallback((function(e,t){if(e){var n=Object.keys(e);Object.keys(M).forEach((function(e){var t,r,o=M[e]?M[e]:[];n.find((function(e){return o.includes(e)}))&&(null===(r=null==i?void 0:i.setFieldsValue)||void 0===r||r.call(i,((t={})[e]=void 0,t)))}))}v&&v(e,t)}),[v,M,i]),L=function(e,t){var n=t.onResetHandle,i=t.onSearchHandle;return{onResetHandleInner:r.useCallback((function(){null==e||e.resetFields(),n&&n()}),[e,n]),onSearchHandleInner:r.useCallback((function(){var t=null==e?void 0:e.getFieldsValue();i&&i(t)}),[e,i])}}(i,{onSearchHandle:b,onResetHandle:y}),_=L.onSearchHandleInner,F=L.onResetHandleInner;return t.jsxs(n.Form,O({form:i,onValuesChange:z},w,{className:j},{children:[t.jsx("div",O({className:P},{children:g?t.jsx(Fi,{items:h?I:S,outsideState:m}):f})),h?t.jsx(_i,{dynamicKey:h,parentDynamicKey:Bi,defaultList:E,onCurrentListChange:T,ref:k}):null,u?t.jsxs("div",O({className:A},{children:[t.jsx(R,O({type:"default",onClick:F},{children:"重置"})),t.jsx(R,O({type:"primary",onClick:_},{children:"查询"}))]})):null]}))}));function Ki(e,t,n){return function e(t,r){if(t===r)return!0;if((null==t?void 0:t.$$typeof)&&(null==r?void 0:r.$$typeof))return(null==t?void 0:t.key)===(null==r?void 0:r.key);if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var i=0;i<t.length;i++)if(!e(t[i],r[i]))return!1;return!0}if(t&&r&&"object"==typeof t&&"object"==typeof r){var o=Object.keys(t);return o.length===Object.keys(r).length&&o.every((function(i){return!(!n||!n.includes(i))||e(t[i],r[i])}))}return!1}(e,t)}Ui.displayName="ZTXK_WEBUI_Form",Ui.useForm=n.Form.useForm,Ui.Item=n.Form.Item,Ui.List=n.Form.List,Ui.ErrorList=n.Form.ErrorList,Ui.Provider=n.Form.Provider,Ui.useFormInstance=n.Form.useFormInstance,Ui.useWatch=n.Form.useWatch,Ui.DefaultDom=Hi;var Wi=function(e){var n,r=e.children,i=e.isDisplay,o=e.isRequired,a=e.isChangeable,s=e.isStress,c=e.preNode,l=e.nextNode;e.dynamicDisabled;var u=e.hiddenBorder,d=e.singleSelectShowBorder,f=e.hiddenLabel,h=e.width,p=e.className,g=e.itemClassName,m=e.render,v=e.shouldUpdateNames;e.shouldUpdateClear;var y=e.dependencies,b=e.shouldUpdate;e.index,e.outsideState,e.shouldUpdateBeOutsideState,e.nonForm;var x=D(e,["children","isDisplay","isRequired","isChangeable","isStress","preNode","nextNode","dynamicDisabled","hiddenBorder","singleSelectShowBorder","hiddenLabel","width","className","itemClassName","render","shouldUpdateNames","shouldUpdateClear","dependencies","shouldUpdate","index","outsideState","shouldUpdateBeOutsideState","nonForm"]),w=Ui.useFormInstance();if(!1===i||"0"===i)return null;if(void 0!==o){var S=!!o,C=Array.isArray(x.rules)?x.rules:[],E=C.findIndex((function(e){return"function"!=typeof e&&(!0===(null==e?void 0:e.required)||!1===(null==e?void 0:e.required))}));if(-1!==E){var T=null===(n=C[E])||void 0===n?void 0:n.message;C.splice(E,1,{required:S,message:T})}else C.unshift({required:S,message:"".concat(x.label," 未填!")});x.rules=C}var I={disabled:!1};void 0!==a&&(I.disabled="0"===a||!a);var k=N("ztxk-form__item",g,{"ztxk-form__item--disabled":I.disabled,"ztxk-form__item--hidden-border":u,"ztxk-form__item--hidden-label":f,"ztxk-form__item--single-show-border":d,"ztxk-form__item--stress":s});if(y)return t.jsxs(Vi,O({width:h,className:p},{children:[c||null,t.jsx(Ui.Item,O({dependencies:y,noStyle:!0},{children:function(e){return t.jsx(Ui.Item,O({},x,{className:k},{children:m&&m(I,e)}))}})),l||null]}));if(void 0!==b||v){var j=v?function(e,t,n){for(var r=0;r<v.length;r++){var i=v[r];if(e[i]!==t[i])return!0}return"function"==typeof b?b(e,t,n):"boolean"==typeof b&&b}:b;return t.jsxs(Vi,O({width:h,className:p},{children:[c||null,t.jsx(Ui.Item,O({shouldUpdate:j,noStyle:!0},{children:function(e){return x.name?t.jsx(Ui.Item,O({},x,{className:k},{children:m&&m(I,e)})):m&&m(I,e)}})),l||null]}))}return t.jsxs(Vi,O({width:h,className:p},{children:[c||null,t.jsx(Ui.Item,O({},x,{className:k},{children:m?m(I,w):r})),l||null]}))};function qi(e){if("number"==typeof e)return e;switch(e){case"half":return 4;case"all":return 24;case"double":return 16;case"halfAll":return 12;default:return 8}}function Vi(e){var r=e.className,i=e.children,o=e.width,a=N("ztxk-form__item--wrap",r);return t.jsx(n.Col,O({className:a,span:qi(o)},{children:i}))}Wi.displayName="ZTXK_WEBUI_FormItem";var $i=r.memo(Wi,(function(e,t){return(null==t?void 0:t.shouldUpdateBeOutsideState)?!!Ki(e,t,["render","shouldUpdateBeOutsideState","shouldUpdate","outsideState"])&&!t.shouldUpdateBeOutsideState(e.outsideState,t.outsideState):Ki(e,t)}));const Zi=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Gi=(()=>{if("undefined"==typeof document)return!1;const e=Zi[0],t={};for(const n of Zi){const r=n?.[1];if(r in document){for(const[r,i]of n.entries())t[e[r]]=i;return t}}return!1})(),Xi={change:Gi.fullscreenchange,error:Gi.fullscreenerror};let Yi={request:(e=document.documentElement,t)=>new Promise(((n,r)=>{const i=()=>{Yi.off("change",i),n()};Yi.on("change",i);const o=e[Gi.requestFullscreen](t);o instanceof Promise&&o.then(i).catch(r)})),exit:()=>new Promise(((e,t)=>{if(!Yi.isFullscreen)return void e();const n=()=>{Yi.off("change",n),e()};Yi.on("change",n);const r=document[Gi.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})),toggle:(e,t)=>Yi.isFullscreen?Yi.exit():Yi.request(e,t),onchange(e){Yi.on("change",e)},onerror(e){Yi.on("error",e)},on(e,t){const n=Xi[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=Xi[e];n&&document.removeEventListener(n,t,!1)},raw:Gi};Object.defineProperties(Yi,{isFullscreen:{get:()=>Boolean(document[Gi.fullscreenElement])},element:{enumerable:!0,get:()=>document[Gi.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[Gi.fullscreenEnabled])}}),Gi||(Yi={isEnabled:!1});var Ji=Yi;var Qi=function(e){var i=e.loading,o=function(e){var t=r.useState(1),n=t[0],i=t[1];return r.useEffect((function(){e||i(1)}),[e]),r.useEffect((function(){if(e){var t=setInterval((function(){i((function(e){return e+1}))}),1e3);return function(){t&&clearInterval(t)}}}),[e]),{countTimer:n}}(i).countTimer;return t.jsx(n.Spin,{spinning:i,size:"large",tip:"".concat(o),className:"ztxk-container__loading",style:{display:i?"flex":"none"}})},eo=r.memo((function(e){var n=e.children,r=e.isMarginTop,i=e.className,o=N("ztxk-container--btn-wrap",i,{"btn-wrap--margin-top":r});return t.jsx("div",O({className:o},{children:n}))})),to=r.memo((function(e){var n=e.className,r=e.isFlex,i=e.children,o=e.loading,a=e.footerDom,s=N("ztxk-container__content",n,{"ztxk-container__content--flex":r});return t.jsxs("div",O({className:"ztxk-container"},{children:[t.jsx(Qi,{loading:o}),t.jsx("div",O({className:s},{children:i})),t.jsx(ro,{footerDom:a})]}))}));to.displayName="ZTXK_WEBUI_ContainerMemo",to.ButtonWrap=eo;var no=["10","20","30","100"],ro=r.memo((function(e){var n=e.children,r=e.className,i=e.align,o=void 0===i?"left":i,a=e.footerDom,s=N("ztxk-footer",r);return t.jsx("footer",O({className:s,style:{justifyContent:"left"===o?"flex-start":"center"===o?"center":"flex-end"}},{children:a?t.jsxs("div",O({className:"ztxk-footer--group"},{children:[a.map((function(e,n){var r=e.DOMType,i=e.render;if("button"===r){var o=e.type,a=void 0===o?"primary":o,s=e.loading,c=e.disabled,l=e.onClick;return t.jsx(R,O({type:a,loading:s,disabled:c,onClick:l},{children:e.text}),n)}if("pagination"===r){var u=e.total,d=e.pageSize,f=e.current,h=e.onChange,p=e.onShowSizeChange,g=e.pageSizeOptions;return t.jsx(io,{total:u,pageSize:d,current:f,onChange:h,onShowSizeChange:p,showTotal:function(e){return"共".concat(e,"条")},showSizeChanger:!0,pageSizeOptions:g||no},n)}return i?i():null})),n]})):null}))})),io=function(e){var r=e.className,i=D(e,["className"]),o=N("ztxk-pagination",r,{});return t.jsx(n.Pagination,O({className:o},i))},oo="ztxk-webui-dynamic-table",ao=Symbol("table-drag-row"),so=["bottomLeft"],co=["10","20","30","40"],lo="error-td",uo="ascend",fo="descend";var ho=function(e){var n=e.className,r=D(e,["className"]),i=N("ztxk-table__enhance-row",n);return t.jsx("tr",O({className:i},r))},po=function(e){var n=e.className,i=e.style,o=e.index,a=e.moveRow,s=D(e,["className","style","index","moveRow"]),c=function(e,t){var n=r.useRef(null),i=oi((function(){return{accept:ao,collect:function(e){return(e.getItem()||{}).index,{}},drop:function(n){if(!t)throw new Error("请定义移动行后触发的函数 onmoveRow");t(n.index,e)}}}),[e])[1],o=ti({type:ao,item:{index:e},collect:function(e){return{isDragging:e.isDragging()}},canDrag:function(e){var t;return!(null===(t=document.activeElement)||void 0===t?void 0:t.tagName.toLowerCase().match(/input|textarea/))}});return i((0,o[1])(n)),{ref:n}}(o,a).ref,l=N("ztxk-table__enhance-row",n);return t.jsx("tr",O({ref:c,style:O({cursor:"move"},i),className:l},s))};function go(e,t){var n=null==e?void 0:e.current;return n?n.pageSize*(n.page-1)+(t||0):t}var mo=function(e){var n=e.record,i=e.index,o=e.editable,a=e.editableConfig,s=e.dataIndex;e.title;var c=e.onEditableSave;e.onMouseEnter,e.onMouseLeave;var l=e.children,u=e.currentPage,d=e.isValidate,f=D(e,["record","index","editable","editableConfig","dataIndex","title","onEditableSave","onMouseEnter","onMouseLeave","children","currentPage","isValidate"]),h=go(u,i),p=r.useState(n?n[s]:void 0),g=p[0],m=p[1],v=function(){var e=r.useState(!1),t=e[0],n=e[1];return{editing:t,toggleEdit:function(){n(!t)}}}(),y=v.editing,b=v.toggleEdit,x=function(e){var t=r.useRef();return r.useEffect((function(){e&&t.current.focus()}),[e]),t}(y),w=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n;e.current&&(null===(n=(t=e.current.classList).contains)||void 0===n?void 0:n.call(t,lo))&&e.current.classList.remove(lo)}),[]);return{tdRef:e,removeErrorClass:t}}(),S=w.tdRef,C=w.removeErrorClass,E=function(e){var t;if(!c)throw Error("如果开启了editable, 那么必须传递 onEditableSave属性 来更改表格数据!");b(),c(O(O({},n),((t={})[s]=g,t)),h,s)};if(o){var T=a||{type:"input"},I=T.type,k=D(T,["type"]),j=null;return"input"===I&&(j=t.jsx(M,O({value:g,onChange:function(e){m(e.target.value),d&&C()},onPressEnter:E,onBlur:E,ref:x},k))),"inputNumber"===I&&(j=t.jsx(F,O({value:g,onChange:function(e){m(e),d&&C()},onPressEnter:E,onBlur:E,ref:x},k))),t.jsx("td",O({ref:S},f,{children:y?t.jsx("div",O({className:"ztxk-table__enhance-cell"},{children:j})):t.jsx("div",O({className:"ztxk-table__enhance-cell-wrap",onClick:b},{children:l}))}))}return t.jsx("td",O({ref:S},f,{children:l}))},vo=r.memo((function(e){var n=e.dynamicSettingRef;return t.jsx(Kt,{onClick:function(){var e;null===(e=null==n?void 0:n.current)||void 0===e||e.setVisible(!0)}})})),yo=r.memo((function(e){var r=e.onAddAndDel;return t.jsx(n.Popconfirm,O({title:"确定删除所有吗?",onConfirm:function(){return r&&r("delAll",0)}},{children:t.jsx(Ht,{title:"删除所有行"})}))})),bo=r.memo((function(e){var r=e.isAdd,i=e.isDel,o=e.onAddAndDel,a=e.index;return t.jsxs(t.Fragment,{children:[r?t.jsx("div",O({className:"ztxk-column--adddel-icon"},{children:t.jsx(Vt,{title:"新增一行",onClick:function(){o&&o("add",a)}})})):null,i?t.jsx("div",O({className:"ztxk-column--adddel-icon"},{children:t.jsx(n.Popconfirm,O({title:"确定删除吗?",onConfirm:function(){return o&&o("del",a)}},{children:t.jsx(Lt,{title:"删除一行"})}))})):null]})}));var xo=r.memo((function(e){var r=e.copyKey,i=e.dataSourceRef;return t.jsxs("div",O({onClick:function(){!function(e,t){var r,i;if(Array.isArray(t)){var o=t.map((function(t){if("string"==typeof e)return t[e];var n="";return e.forEach((function(e){return n+=t[e]})),n})).join("\n");try{if((null===navigator||void 0===navigator?void 0:navigator.clipboard)&&window.isSecureContext)null===(i=null===(r=navigator.clipboard)||void 0===r?void 0:r.writeText(o))||void 0===i||i.then((function(){n.message.info("复制成功!")}));else{var a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand?(n.message.info("复制成功!"),document.execCommand("copy")):n.message.info("复制失败!请手工复制\n ".concat(o)),document.body.removeChild(a)}}catch(e){n.message.info("复制失败!请手工复制\n ".concat(o))}}}(r,i.current)}},{children:[t.jsx(It,{type:"icon-copy",style:{fontSize:"16px"},className:"thead-icon"}),"复制整列"]}))})),wo=r.memo((function(e){var r=e.isFillDown,i=e.dataSourceRef,o=e.dataKey,a=e.onTableChange;return t.jsx(n.Tooltip,O({title:"点击往下填充,会将该列的第一条数据往下填充覆盖至所有数据的该列都应用此值"},{children:t.jsxs("div",O({onClick:function(){if(!Array.isArray(null==i?void 0:i.current)||(null==i?void 0:i.current.length)<=1||!r)n.message.info("数据不需要填充!");else{var e=[],t=i.current[0][o],s=!1;!0===r?e=i.current.map((function(e){var n;return e[o]!==t&&(s=!0),O(O({},e),((n={})[o]=t,n))})):(s=!0,e=i.current.map((function(e,n){return r({index:n,text:t,record:e})}))),s&&a&&a(e,i.current,{type:"fillDown"})}}},{children:[t.jsx(dn,{style:{fontSize:"16px"},className:"thead-icon"}),"往下填充"]}))}))})),So=r.memo((function(e){var r=e.copyKey,i=e.dataSourceRef,o=e.isFillDown,a=e.dataKey,s=e.onTableChange,c=[];return("string"==typeof r||Array.isArray(r))&&c.push({key:"copy",label:t.jsx(xo,{copyKey:r,dataSourceRef:i})}),o&&c.push({key:"fill",label:t.jsx(wo,{dataKey:a,isFillDown:o,dataSourceRef:i,onTableChange:s})}),t.jsx(t.Fragment,{children:c.length>0?t.jsx(n.Dropdown,O({menu:{items:c},trigger:["click"]},{children:t.jsx(R,{type:"link",icon:t.jsx(Nt,{}),title:"一些工具方法"})})):null})})),Co=function(e){var n=e.title,i=e.field,o=e.onChange,a=e.customOrder,s=e.setCustomOrder,c=a&&(null==a?void 0:a.field)===i?null==a?void 0:a.order:null,l=r.useMemo((function(){return c===uo?"点击降序":c===fo?"取消排序":"点击升序"}),[c]);return t.jsxs("div",O({className:"ztxk-table--sorter"},{children:[t.jsx("div",O({className:"ztxk-table--sorter-title"},{children:"function"==typeof n?n({}):n})),t.jsxs("div",O({className:"ztxk-table--sorter-icon",onClick:function(e){var t;e.stopPropagation(),s(c===uo?{field:i,order:t=fo}:c===fo?{field:i,order:t=null}:{field:i,order:t=uo}),o&&o({field:i,order:t})},title:l},{children:[t.jsx(Dt,{className:N("ant-table-column-sorter-up",{active:c===uo})}),t.jsx(St,{className:N("ant-table-column-sorter-down",{active:c===fo})})]}))]}))};function Oo(e,n){var r=n.dynamicKey,i=n.currentDynamicList,o=n.dataSourceRef,a=n.onEditableSave,s=n.isEdit,c=n.isAdd,l=n.isDel,u=n.dynamicSettingRef,d=n.onAddAndDel,f=n.getRefreshScuCell,h=n.isDelAll,p=n.currentPage,g=n.onTableChange,m=n.order,v=n.setOrder,y=n.customSortHandle,b=function(e,t){if(Array.isArray(t)&&t.length>0&&e){var n=[],r=[],i=[];return t.forEach((function(t){var n=t.key,i=t.checked,o=e.find((function(e){return(e.key===n||(null==e?void 0:e.dataIndex)===n)&&i}));o&&r.push(o)})),e.filter((function(e){return e.fixed})).forEach((function(e){"left"===e.fixed?n.push(e):"right"===e.fixed&&i.push(e)})),I(I(I([],n,!0),r,!0),i,!0)}return e}(e,i),x=[];if(Array.isArray(b)){if(b.forEach((function(e){var n=O(O({},e),{__title:e.title}),r=n.isCopy,i=n.editable,c=n.editableConfig,l=n.title,u=n.key,d=n.validate,h=n.isRequire,b=n.isFillDown,w=n.isOrder,S=u||(null==n?void 0:n.dataIndex);if(w&&(n.title=t.jsx(Co,{title:l,field:S,onChange:y,customOrder:m,setCustomOrder:v})),(b||r)&&(n.title=t.jsx("div",O({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:t.jsxs(t.Fragment,{children:[n.title,t.jsx(So,{copyKey:!0===r?S:r,dataSourceRef:o,isFillDown:b,dataKey:S,onTableChange:g})]})}))),h&&(n.title=t.jsxs(t.Fragment,{children:[t.jsx("i",O({className:"ztxk-column--required"},{children:"*"})),n.title]})),i&&s&&(n.onCell=function(e,t){return{record:e,index:t,editable:i,editableConfig:c,dataIndex:S,title:l,onEditableSave:a,currentPage:p,isValidate:!!d}}),n.shouldCellUpdate){var C=n.shouldCellUpdate;n.shouldCellUpdate=function(e,t){return!(!f||!f())||C(e,t)}}n.render||n.editable||(n.render=function(e,t,n){return"object"==typeof e||null==e||""===e?"— —":e}),x.push(n)})),c||l){var w={title:function(){return h?t.jsx(yo,{}):null},width:52,fixed:"left",align:"center",render:function(e,n,r){return t.jsx(bo,{isAdd:c,isDel:l,index:r,onAddAndDel:d})}};x.unshift(w)}r&&(x[0].title=function(){return c||l?t.jsxs(t.Fragment,{children:[h?t.jsx(yo,{}):null,t.jsx(vo,{dynamicSettingRef:u})]}):t.jsx(vo,{dynamicSettingRef:u})})}return{newColumns:x}}function Do(e,i,o){var a=o.summaryFixed,s=o.rowSelection,c=o.expandable,l=o.isAdd,u=o.isDel,d=!!c,f=!(!l&&!u),h=Number(!!s)+Number(d),p=r.useCallback((function(r){var o=function(e,t,n){var r=[],i=n.fillNumber,o=n.columns;Array.isArray(e)&&e.forEach((function(e){var n=e.type,a=e.fields,s=e.title;switch(n){case"subtotal":if(!Array.isArray(a))return;if(0===a.length)return;var c=function(e,t){if(!Array.isArray(t))return null;var n={};return t.forEach((function(r,i){e.forEach((function(e){if("string"==typeof e){var o=Number(null==r?void 0:r[e]);o=isNaN(o)?0:o;var a=(null==n?void 0:n[e])||0;n[e]=a?Eo(a,o):o}else{var s=e.key,c=e.showKey,l=e.toFixedNum,u=e.value,d=e.callback;o=Number(null==r?void 0:r[s]);o=isNaN(o)?0:o;var f=(null==n?void 0:n[s])||0;if(u)if(Array.isArray(u))n[s]=u.map((function(e,t){var n=Array.isArray(l)?l[t]:l,r=Number(e);return isNaN(r)||"number"!=typeof n?e:r.toFixed(n)}));else{var h=Number(u);n[s]="number"==typeof l?isNaN(h)?u:h.toFixed(l):u}else if(c)if("string"==typeof c){var p=Number(null==r?void 0:r[c]);p=isNaN(p)?0:p,n[s]=f?"number"==typeof l?Eo(f,p).toFixed(l):Eo(f,p):"number"==typeof l?p.toFixed(l):p}else n[s]=c.map((function(e,t){var n=Number(null==r?void 0:r[e]);n=isNaN(n)?0:n;var i=Array.isArray(l)?l[t]:l;if(f){var o=Number(f[t]);return"number"==typeof i?Eo(o,n).toFixed(i):Eo(o,n)}return"number"==typeof i?n.toFixed(i):n}));else n[s]=f?"number"==typeof l?Eo(f,o).toFixed(l):Eo(f,o):"number"==typeof l?o.toFixed(l):o;d&&i===t.length-1&&(n[s]=d(n[s]))}}))})),n}(a,t),l=[],u=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){l.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),u.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(l.push(e.key||e.dataIndex?c[e.key||e.dataIndex]:void 0),u.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"小计",titleIndex:0+i,key:"subtotal",list:Array(i).fill(void 0).concat(l),columnList:Array(i).fill(void 0).concat(u)});break;case"total":if(!Array.isArray(a))return;if(0===a.length)return;var d=function(e){var t={};return e.forEach((function(e){if("object"==typeof e){var n=e.key,r=e.toFixedNum,i=e.value,o=e.callback;if(null!=i)if(Array.isArray(i))t[n]=i.map((function(e,t){var n=Number(e);n=isNaN(n)?0:n;var i=Array.isArray(r)?r[t]:r;return"number"==typeof i?n.toFixed(i):e}));else{var a=Number(i);a=isNaN(a)?0:a,t[n]="number"==typeof r?a.toFixed(r):i}else t[n]=0;o&&(t[n]=o(t[n]))}})),t}(a),f=[],h=[];null==o||o.forEach((function(e){e.children?e.children.forEach((function(e){f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),h.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex})})):(f.push(e.key||e.dataIndex?d[e.key||e.dataIndex]:void 0),h.push({key:null==e?void 0:e.key,dataIndex:null==e?void 0:e.dataIndex}))})),r.push({title:s||"总计",titleIndex:0+i,key:"total",list:Array(i).fill(void 0).concat(f),columnList:Array(i).fill(void 0).concat(h)})}}));return r}(e,r,{fillNumber:h,columns:i});return t.jsx(n.Table.Summary,O({fixed:a},{children:o.map((function(e){var r=e.title,i=e.key,o=e.titleIndex,a=e.list;return t.jsx(n.Table.Summary.Row,{children:Array.isArray(a)&&a.map((function(e,i){return o+Number(f)===i?t.jsx(n.Table.Summary.Cell,O({index:i},{children:r}),i):t.jsx(n.Table.Summary.Cell,O({index:i},{children:t.jsx("div",{children:e})}),i)}))},i)}))}))}),[e,h,i,a,f]);return e?p:void 0}function Eo(e,t){return e+t}function To(e,t){return e.querySelector(t)}function Io(e,t,n){var r;return E(this,void 0,void 0,(function(){var i,o,a,s,c,l,u,d,f,h,p,g,m;return T(this,(function(v){switch(v.label){case 0:if(i=n.getCurrentTable,o=n.rowSelection,a=n.expandable,s=n.tableName,c=n.isInnerPagination,l=n.setCurrent,u=n.pageSize,!Array.isArray(e)||0===e.length)return console.info("没有数据,无需验证!"),[2];if(!Array.isArray(t))return console.info("columns 不是数组!"),[2];d=[],Array.isArray(t)&&t.forEach((function(e,t){e.validate&&d.push({dataIndex:e.validate.dataIndex||e.dataIndex,title:e.validate.title||e.__title||e.title,validate:e.validate.validate,index:t+(o?1:0)+(a?1:0)})})),f=0,v.label=1;case 1:if(!(f<e.length))return[3,6];h=e[f],p=function(e){var t,n,o,a,p,g,m,v,y,b;return T(this,(function(x){switch(x.label){case 0:if(t=d[e],n=t.dataIndex,o=t.title,a=t.validate,p=t.index,!n)return[2,"break"];if(g=h[n],m=function(e,t,n){var r,o,a,s=i().resultTr[e],c=Array.prototype.slice.call(null==s?void 0:s.children),l="number"==typeof t?c[t]:null;null===(o=null===(r=null==l?void 0:l.classList)||void 0===r?void 0:r.add)||void 0===o||o.call(r,n),null===(a=null==l?void 0:l.scrollIntoView)||void 0===a||a.call(l)},v=f,y=1,c&&(y=Math.ceil((f+1)/u),v-=u*(y-1)),!a)return[3,10];if("function"!=typeof a)return[3,5];x.label=1;case 1:return x.trys.push([1,3,,4]),[4,a(g,h,v+1,o)];case 2:return x.sent(),[3,4];case 3:return b=x.sent(),c?(l(y),setTimeout((function(){m(v,p,lo)}))):m(f,p,lo),[2,{value:Promise.reject(b)}];case 4:return[3,9];case 5:return(null===(r=null==a?void 0:a.pattern)||void 0===r?void 0:r.test(g))?[3,9]:c?(l(y),setTimeout((function(){m(v,p,lo)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})]):[3,7];case 6:return x.sent(),[3,9];case 7:return m(f,p,lo),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," ").concat((null==a?void 0:a.message)||"填写错误!")})];case 8:x.sent(),x.label=9;case 9:return[3,14];case 10:return""!==g&&null!=g?[3,14]:c?(l(y),setTimeout((function(){m(v,p,lo)})),[4,Promise.reject({errors:"".concat(s||""," 第").concat(v+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:p})]):[3,12];case 11:return x.sent(),[3,14];case 12:return m(f,p,lo),[4,Promise.reject({errors:"".concat(s||""," 第").concat(f+1,"行 ").concat(o," 为空!"),rowIndex:f,colIndex:p})];case 13:x.sent(),x.label=14;case 14:return[2]}}))},g=0,v.label=2;case 2:return g<d.length?[5,p(g)]:[3,5];case 3:if("object"==typeof(m=v.sent()))return[2,m.value];if("break"===m)return[3,5];v.label=4;case 4:return g++,[3,2];case 5:return f++,[3,1];case 6:return[2]}}))}))}var ko=r.memo((function(e){var i=e.className,o=e.bordered,a=void 0===o||o,s=e.pagination,c=void 0!==s&&s,l=e.isFlex;e.tablePreferences;var u=e.dynamicKey,d=e.columns,f=e.dataSource,h=e.onTableChange,p=e.isEdit,g=e.isMove,m=e.isAdd,v=e.addMode,y=e.addCallback,b=e.isDel,x=e.isDelAll,w=void 0===x||x,S=e.isAddAndDelAuto,C=e.summaryConfig,I=e.summaryFixed,k=void 0===I||I,j=e.isInnerPagination,P=e.innerPaginationPageSize,A=void 0===P?30:P,R=e.innerPaginationPosition,M=void 0===R?so:R,z=e.innerPaginationPageSizeOptions,L=void 0===z?co:z,_=e.tableRefHandle,F=e.tableName,H=D(e,["className","bordered","pagination","isFlex","tablePreferences","dynamicKey","columns","dataSource","onTableChange","isEdit","isMove","isAdd","addMode","addCallback","isDel","isDelAll","isAddAndDelAuto","summaryConfig","summaryFixed","isInnerPagination","innerPaginationPageSize","innerPaginationPosition","innerPaginationPageSizeOptions","tableRefHandle","tableName"]),B=N("ztxk-table",i,{"ztxk-table--flex":l}),U=r.useRef();r.useEffect((function(){U.current=f}),[f]);var K,W,q=function(e,t){var n=r.useRef(null),i=r.useMemo((function(){return function(e,t){var n=[];return e&&t&&t.forEach((function(e){var t=e,r=t.key,i=t.dataIndex,o=t.title,a=t.dynamicDisabled;if(!t.fixed){var s=r||i;n.push({key:s,label:o,disabled:!0===a})}})),n}(t,e)}),[t,e]),o=r.useState((function(){return Ai(t,oo,i)})),a=o[0],s=o[1],c=r.useCallback((function(e){s(e)}),[]);return{defaultDynamicList:i,currentDynamicList:a,onCurrentListChange:c,dynamicSettingRef:n}}(d,u),V=q.defaultDynamicList,$=q.onCurrentListChange,Z=q.currentDynamicList,G=q.dynamicSettingRef,X=(K=r.useRef(null),W=r.useRef(),{refreshScuCell:r.useCallback((function(){W.current=!0}),[]),getRefreshScuCell:r.useCallback((function(){return!!W.current&&(K.current&&(clearTimeout(K.current),K.current=null),K.current=setTimeout((function(){W.current=!1})),!0)}),[])}),Y=X.refreshScuCell,J=X.getRefreshScuCell,Q=function(e,t,n){var i=r.useRef(null),o=r.useState(1),a=o[0],s=o[1],c=r.useState(t),l=c[0],u=c[1],d=n.innerPaginationPageSizeOptions,f=n.innerPaginationPosition;return r.useEffect((function(){e&&(i.current={page:a,pageSize:Number(l)})}),[e,a,l]),r.useEffect((function(){e||(i.current=null)}),[e]),{paginationConfig:r.useMemo((function(){return{current:a,pageSize:l,onChange:function(t,n){e&&(s(t),u(n))},hideOnSinglePage:!0,position:d,defaultPageSize:l,pageSizeOptions:f}}),[e,a,l,d,f]),currentPage:i,setCurrent:s,pageSize:l,current:a}}(j,A,{innerPaginationPosition:M,innerPaginationPageSizeOptions:L}),ee=Q.paginationConfig,te=Q.currentPage,ne=Q.setCurrent,re=Q.pageSize,ie=function(e,t){return r.useCallback((function(n,r,i,o){var a,s=null===(a=e.current)||void 0===a?void 0:a.slice();s[r][i]!==n[i]&&(s[r]=n,t&&t(s,e.current,{type:"edit",currentIndex:r}))}),[e,t])}(U,h),oe=function(e,t,n){var i=n.isMove,o=n.refreshScuCell,a=n.currentPage,s=r.useCallback((function(n,r){var i,s=go(a,n),c=go(a,r);if(s!==c){var l=null===(i=e.current)||void 0===i?void 0:i.slice(),u=l[s],d=ji(l,{$splice:[[s,1],[c,0,u]]});o&&o(),t&&t(d,e.current,{type:"move",dragIndex:s,hoverIndex:c})}}),[e,t,o,a]),c=r.useCallback((function(e,t){return{index:t,moveRow:s}}),[s]);return{onRow:i?c:void 0}}(U,h,{isMove:g,refreshScuCell:Y,currentPage:te}).onRow,ae=function(e,t,n){var i=n.rowKey,o=n.addMode,a=n.addCallback,s=n.refreshScuCell,c=n.isAddAndDelAuto,l=n.currentPage;return r.useCallback((function(n,r){var u,d,f,h=go(l,r),p=null===(f=e.current)||void 0===f?void 0:f.slice();if("delAll"!==n){c&&(s&&s(),t&&t(p,e.current,{type:n,currentIndex:h}));var g=p[h],m=a?a(g,{index:h}):{};if("add"===n){var v={};v=O("blank"===o?((u={})[String(i)]="".concat(Date.now(),"-").concat(h),u.__INNER__ADD__DATA=!0,u):O(O({},g),((d={})[String(i)]="".concat(Date.now(),"-").concat(h),d.__INNER__ADD__DATA=!0,d)),m),p.splice(h+1,0,v)}else"del"===n&&p.splice(h,1);s&&s(),t&&t(p,e.current,{type:n,currentIndex:h})}else Array.isArray(p)&&p.length>0&&(s&&s(),t&&t([],e.current,{type:n,currentIndex:h}))}),[a,o,e,t,i,s,c,l])}(U,h,{rowKey:e.rowKey,addMode:v,addCallback:y,refreshScuCell:Y,isAddAndDelAuto:S,currentPage:te}),se=function(e,t,n){var i=n.refreshScuCell,o=r.useState(null),a=o[0],s=o[1],c=r.useState(void 0),l=c[0],u=c[1],d=r.useRef(!0),f=r.useCallback((function(n){if(Array.isArray(e)&&e.length>1){var r=n.field,o=n.order,a=function(e,t){var n=e[r]-t[r];return isNaN(n)?e[r]<t[r]?-1:e[r]>t[r]?1:0:n};if("ascend"===o){var c=e.slice().sort((function(e,t){return a(e,t)}));s(c),d.current=!0,i&&i(),t&&t(c,e,{type:"sort"})}else"descend"===o?(c=e.slice().sort((function(e,t){return-a(e,t)})),s(c),d.current=!0,i&&i(),t&&t(c,e,{type:"sort"})):s(null)}}),[e,t,i]);return r.useEffect((function(){d.current||(s(null),u(void 0)),d.current=!1}),[e]),{sortDataSource:a,setSortDataSource:s,order:l,setOrder:u,customSortHandle:f}}(f,h,{refreshScuCell:Y,currentPage:te}),ce=se.sortDataSource,le=se.order,ue=se.setOrder,de=se.customSortHandle,fe=Oo(d,{dynamicKey:u,currentDynamicList:Z,dataSource:f,dataSourceRef:U,onEditableSave:ie,isEdit:p,isAdd:m,isDel:b,dynamicSettingRef:G,onAddAndDel:ae,getRefreshScuCell:J,isDelAll:w,currentPage:te,onTableChange:h,order:le,setOrder:ue,customSortHandle:de}).newColumns,he=Do(C,fe,{summaryFixed:k,rowSelection:e.rowSelection,expandable:e.expandable,isAdd:m,isDel:b}),pe=function(){var e=r.useRef(),t=r.useCallback((function(){var t,n=To(e.current,".ant-table-content");n||(n=To(e.current,".ant-table-container"));var r=To(n,".ant-table-tbody"),i=null==r?void 0:r.children,o=Array.prototype.slice.call(i);return{tableBody:r,resultTr:(null===(t=null==o?void 0:o.filter)||void 0===t?void 0:t.call(o,(function(e){return e.className.includes("ant-table-row")})))||[]}}),[]),n=r.useCallback((function(e){try{var n=t().resultTr;if("number"==typeof e)for(var r=n[e].querySelectorAll("td"),i=0;i<r.length;i++)r[i].classList.remove(lo);else for(i=0;i<n.length;i++){r=n[i].querySelectorAll("td");for(var o=0;o<r.length;o++)r[o].classList.remove(lo)}}catch(e){console.log(e)}}),[t]);return{tableRef:e,getCurrentTable:t,clearErrorClass:n}}(),ge=pe.tableRef,me=pe.getCurrentTable,ve=pe.clearErrorClass,ye=r.useMemo((function(){var e=void 0;return p&&(e={body:{row:ho,cell:mo}}),g&&(e={body:{row:po,cell:p?mo:void 0}}),e}),[p,g]);r.useImperativeHandle(_,(function(){return{getRealyIndex:function(e){return go(te,e)},getDynamicList:function(){return Z},tableValidate:function(){return E(void 0,void 0,void 0,(function(){return T(this,(function(t){switch(t.label){case 0:return ve(),[4,Io(f,fe,{getCurrentTable:me,rowSelection:!!e.rowSelection,expandable:!!e.expandable,tableName:F,isInnerPagination:j,setCurrent:ne,pageSize:re})];case 1:return[2,t.sent()]}}))}))},clearErrorClass:ve}}));var be=t.jsx(n.Table,O({className:B,bordered:a,dataSource:ce||f,columns:fe,components:ye,onRow:oe,summary:he,pagination:j?c||ee:c},H));return t.jsxs("div",O({style:l?{position:"relative",overflow:"hidden",flex:1}:{position:"relative",overflow:"hidden"},ref:ge},{children:[g?t.jsx(jr,O({backend:Ii,context:window},{children:be})):be,u?t.jsx(_i,{parentDynamicKey:oo,dynamicKey:u,defaultList:V,onCurrentListChange:$,ref:G,hiddenOperationIcon:!0}):null]}))}));ko.displayName="ZTXK_WEBUI_Table",ko.SELECTION_COLUMN=n.Table.SELECTION_COLUMN,ko.EXPAND_COLUMN=n.Table.EXPAND_COLUMN,ko.SELECTION_ALL=n.Table.SELECTION_ALL,ko.SELECTION_INVERT=n.Table.SELECTION_INVERT,ko.SELECTION_NONE=n.Table.SELECTION_NONE,ko.Column=n.Table.Column,ko.ColumnGroup=n.Table.ColumnGroup,ko.Summary=n.Table.Summary;var jo=r.memo((function(e){var r,i=e.className,o=e.isHeader,a=e.isContent,s=e.marginTop,c=void 0!==s&&s,l=e.marginBottom,u=void 0===l||l,d=D(e,["className","isHeader","isContent","marginTop","marginBottom"]),f=N("ztxk-tabs",i,((r={})["ztxk-tabs--header"]=o,r["ztxk-tabs--content"]=a,r["ztxk-tabs--marginTop"]=c,r["ztxk-tabs--marginBottom"]=u,r));return t.jsx(n.Tabs,O({type:o?"editable-card":a?"card":void 0,hideAdd:!!o||void 0,className:f},d))}));function No(e,t){e.update((function(e){return O(O({},e),{cancelButtonProps:O(O({},e.cancelButtonProps||{}),t)})}))}jo.displayName="ZTXK_WEBUI_Tabs",jo.TabPane=n.Tabs.TabPane;var Po=r.forwardRef((function(e,i){var o=e.className,a=e.defaultOpen,s=e.defaultTitle,c=e.defaultConfirmMsg,l=e.defaultConfirmOkText,u=e.defaultType,d=e.confirmPreHandle,f=e.confirmOnOk,h=e.onOk,p=e.footer,g=e.onOkValidate,m=D(e,["className","defaultOpen","defaultTitle","defaultConfirmMsg","defaultConfirmOkText","defaultType","confirmPreHandle","confirmOnOk","onOk","footer","onOkValidate"]),v=N("ztxk-modal",o),y=r.useState(a),b=y[0],x=y[1],w=r.useState(s),S=w[0],C=w[1],I=r.useState(),k=I[0],j=I[1],P=r.useState(!1),A=P[0],R=P[1],M=r.useState(c),z=M[0],L=M[1],_=r.useState(l),F=_[0],H=_[1],B=r.useState(u),U=B[0],K=B[1],W=r.useCallback((function(){x(!1)}),[]),q=r.useCallback((function(){return E(void 0,void 0,void 0,(function(){var e,t,r,i,o,a;return T(this,(function(s){switch(s.label){case 0:if(e=!0,!g)return[3,4];j(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),e=!1,[4,g(U)];case 2:return s.sent(),e=!0,j(!1),[3,4];case 3:return t=s.sent(),j(!1),console.log(t),r=t.errorFields,i=t.errors,r&&n.message.warning(r[0].errors+""),i&&n.message.warning(i),[3,4];case 4:return e?(A?(o=d&&d(U),a=n.Modal.confirm({title:(null==o?void 0:o.confirmMsg)?o.confirmMsg:z,okText:(null==o?void 0:o.confirmOkText)?o.confirmOkText:F||"确认保存",keyboard:!1,maskClosable:!1,onOk:f?function(){return No(a,{loading:!0}),f(U).then((function(){No(a,{loading:!1}),x(!1)})).catch((function(e){No(a,{loading:!1})}))}:void 0})):h&&(j(!0),h(U).then((function(){j(!1),x(!1)})).catch((function(e){j(!1)}))),[2]):[2]}}))}))}),[A,g,d,z,F,f,U,h]);return r.useImperativeHandle(i,(function(){return{open:function(e){(null==e?void 0:e.title)&&C(e.title),(null==e?void 0:e.confirmMsg)&&L(e.confirmMsg),(null==e?void 0:e.confirmOkText)&&H(e.confirmOkText),(null==e?void 0:e.type)&&K(e.type),"boolean"==typeof(null==e?void 0:e.isConfirm)&&R(e.isConfirm),x(!0)},close:function(){x(!1)},getType:function(){return U},setConfirmMsg:H}})),t.jsx(n.Modal,O({open:b,onCancel:W,className:v,okText:"保存",onOk:p?void 0:q,width:"70%",title:S,keyboard:!1,maskClosable:!1,confirmLoading:k,cancelButtonProps:{loading:k},footer:p},m))}));Po.displayName="ZTXK_WEBUI_ModalComponent",Po.info=n.Modal.info,Po.success=n.Modal.success,Po.error=n.Modal.error,Po.warning=n.Modal.warning,Po.confirm=n.Modal.confirm,Po.destroyAll=n.Modal.destroyAll;var Ao=function(e){var r=e.children,i=e.className,o=e.border,a=e.isBg,s=D(e,["children","className","border","isBg"]),c=N("ztxk-grid",i,{"ztxk-grid--border":o,"ztxk-grid--background":a});return t.jsx(n.Row,O({className:c},s,{gutter:0},{children:r}))};Ao.displayName="ZTXK_WEBUI_DetailList",Ao.Item=function(e){var r=e.children,i=e.className,o=e.title,a=e.colon,s=void 0===a||a,c=e.span,l=e.titleSpan,u=e.titleProps,d=e.textProps,f=e.showDiff,h=e.isEllipsis,p=void 0===h||h,g=e.isBlod,m=N("ztxk-grid-item",i);return t.jsxs(t.Fragment,{children:[t.jsxs(n.Col,O({className:m+" ztxk-grid-item--title",span:l||3,title:o},u,{children:[t.jsx("span",O({className:"ztxk-grid-item--title-text"},{children:o})),t.jsx("span",O({className:"ztxk-grid-item--title-colon"},{children:s&&":"}))]})),t.jsx(n.Col,O({className:f?m+" ztxk-grid-item--text ztxk-grid-item--diff"+"".concat(p?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"):m+" ztxk-grid-item--text"+"".concat(p?" ztxk-grid-item--text-ellipsis":" ztxk-grid-item--text-noellipsis"),span:l?c-l:c-3,title:"string"==typeof r?r:void 0,style:{fontWeight:g?"bold":"normal"}},d,{children:r}))]})};var Ro=function(e){var r=e.children,i=e.layoutSliderRender,o=e.layoutHeaderRender;return t.jsxs(n.Layout,O({className:"zmdms-container"},{children:[i,t.jsxs(n.Layout,O({className:"zmdms-content"},{children:[o,t.jsx(n.Layout.Content,O({className:"zmdms-content--content"},{children:r}))]}))]}))};Ro.displayName="ZTXK_WEBUI_AppLayout";var Mo=r.memo(Ro),zo=function(e){var i=e.tabs,o=e.activeTab,a=e.deleteTabHandle,s=e.setActiveTab,c=e.deleteTabsHandle,l=r.useCallback((function(e){1!==i.length?a(e):n.message.warning("最后一页不可关闭!")}),[a,i]),u=r.useMemo((function(){return[{label:"关闭",key:"closeCurrent"},{label:"关闭其他",key:"closeOther"},{label:"关闭右侧",key:"closeRight"}]}),[]),d=r.useCallback((function(e,t){if(console.log(e,t),"closeCurrent"===e)l(t.key);else if("closeOther"===e){if(i.length>1){var n=i.findIndex((function(e){return e.key===t.key})),r=i.slice();r.splice(n,1),o!==t.key?c&&c(t,{deleteTabs:r,isGo:!0,deleteType:"other",currentIndex:n}):c&&c(t,{deleteTabs:r,isGo:!1,deleteType:"other",currentIndex:n})}}else if("closeRight"===e){n=i.findIndex((function(e){return e.key===t.key}));var a=i.slice(n+1);a.find((function(e){return e.key===o}))?c&&c(t,{deleteTabs:a,isGo:!0,deleteType:"right",currentIndex:n}):c&&c(t,{deleteTabs:a,isGo:!1,deleteType:"right",currentIndex:n})}}),[l,i,o,c]),f=r.useMemo((function(){return Array.isArray(i)?i.map((function(e){return{key:e.key,label:t.jsx(n.Dropdown,O({trigger:["contextMenu"],menu:{items:u,onClick:function(t){t.domEvent.stopPropagation(),d(t.key,e)}}},{children:t.jsx(p.Link,O({to:e.path},{children:e.label}))}))}})):[]}),[i,u,d]);return t.jsx(jo,{items:f,activeKey:o,isHeader:!0,onTabClick:function(e){s(e)},onEdit:function(e){l(e)}})},Lo=r.memo((function(){var e=r.useRef(null),n=function(e,t){var n=r.useState(!1),i=n[0],o=n[1];return r.useEffect((function(){if(e.current){var n=e.current,r=function(){if(Ji.isEnabled){var e=Ji;(null==t?void 0:t.current)?e.toggle(t.current):e.toggle()}};return n.addEventListener("click",r),function(){n.removeEventListener("click",r)}}}),[e,t]),r.useEffect((function(){if(Ji.isEnabled){var e=Ji,t=function(){e.isFullscreen?o(!0):o(!1)};return e.on("change",t),function(){e.off("change",t)}}}),[]),i}(e);return t.jsx("div",O({className:"full-screen",ref:e,title:n?"退出全屏":"全屏"},{children:n?t.jsx(Jt,{}):t.jsx(bt,{})}))})),_o=function(e){var i=e.logout,o=r.useContext(as).userInfo,a=[{label:t.jsxs("div",{children:[t.jsx(cn,{style:{marginRight:5}})," 账号信息"]}),key:"info"},{label:t.jsxs("div",{children:[t.jsx(tn,{style:{marginRight:5}})," 修改密码"]}),key:"password"},{type:"divider"},{label:t.jsxs("div",O({onClick:function(){i&&i()}},{children:[t.jsx(Rt,{style:{marginRight:5}})," 退出系统"]})),key:"logout"}];return t.jsx(n.Dropdown,O({menu:{items:a},placement:"bottomLeft"},{children:t.jsxs("div",O({className:"user-operation"},{children:[t.jsx(cn,{}),t.jsx("span",{children:null==o?void 0:o.realName})]}))}))},Fo=function(e){var n=e.logout;return t.jsxs("div",O({className:"zmdms-content--header-info"},{children:[t.jsx(Lo,{}),t.jsx(_o,{logout:n})]}))},Ho=function(e){var r=e.tabs,i=e.activeTab,o=e.deleteTabHandle,a=e.deleteTabsHandle,s=e.setActiveTab,c=e.logout;return t.jsxs(n.Layout.Header,O({className:"zmdms-content--header"},{children:[t.jsx(zo,{tabs:r,activeTab:i,deleteTabHandle:o,deleteTabsHandle:a,setActiveTab:s}),t.jsx(Fo,{logout:c})]}))};Ho.displayName="ZTXK_WEBUI_AppLayoutHeader";var Bo=r.memo(Ho),Uo=r.memo((function(e){var n=e.logo;return t.jsx("div",O({className:"zmdms-logo"},{children:t.jsx("img",{src:n,title:"浙商中拓ERP",alt:"zszt_logo"})}))}));var Ko=r.createContext({}),Wo=function(e){var i=e.onMouseEnter,o=e.addTab,a=e.getPrefixByAppId,s=r.useContext(as),c=s.userMenus,l=s.apps,u=r.useContext(Ko),d=u.mainMenuSelectedKeys,f=u.setMainMenuSelectedKeys,h=function(e,t,n){var i=n.apps,o=r.useRef(!0),a=r.useState([]),s=a[0],c=a[1];return r.useEffect((function(){if(i&&e&&Array.isArray(e))if(o.current)c(e.map((function(e){return e.id+""})));else{var n=t&&t.length>0?t[0]:"";n&&e.find((function(e){var t=e.children;return!!t&&t.find((function(e){return e.id===n&&(o.current||c([e.parentId+""]),!0)}))}))}}),[e,t,i]),{mainMenuOpenKeys:s,onMainMenuOpenChange:function(e){o.current=!1,c(e)}}}(c,d,{apps:l}),g=h.mainMenuOpenKeys,m=h.onMainMenuOpenChange,v=r.useCallback((function(e){var n=e.system,r=e.path,i=a(n),s="/"===r?"/":i?"/".concat(i).concat(r):r;if("index"===e.type){var c=i?"/".concat(i).concat(r):r;return t.jsx(p.Link,O({to:c,onClick:function(){o&&o({key:c,path:c,label:e.name})}},{children:e.name}))}return"/"===s?e.name:t.jsx(p.Link,O({to:s,onClick:function(){o&&o({key:s,path:s,label:e.name})}},{children:e.name}))}),[o,a]),y=r.useMemo((function(){var e;return Array.isArray(c)?1===c.length?((null===(e=c[0])||void 0===e?void 0:e.children)||[]).map((function(e){return{label:v(e),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null}})):c.map((function(e){var n=e.children;return{label:t.jsx("span",O({title:e.name},{children:e.name})),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null,children:n?n.map((function(e){return{label:v(e),title:e.name,key:e.id,icon:e.source?t.jsx(yn,{type:e.source,style:{fontSize:"18px"}}):null}})):null}})):(console.error("用户主菜单没有按预期传入对应数据!"),[])}),[c,v]),b=r.useCallback((function(e){f&&f(e.selectedKeys)}),[f]);return t.jsx(n.Menu,{className:"zmdms-menu--main",items:y,inlineIndent:10,mode:"inline",onMouseEnter:i,selectedKeys:d,onSelect:b,openKeys:g,onOpenChange:m})},qo=[],Vo=r.memo(r.forwardRef((function(e,i){var o=e.marginLeft,a=e.subMenuWidth,s=e.layoutSiderRef,c=e.addTab,l=e.getPrefixByAppId,u=r.useContext(as),d=u.activeTab,f=u.userSubMenus,h=r.useContext(Ko),g=h.mainMenuSelectedKeys,m=h.setMainMenuSelectedKeys,v=r.useMemo((function(){return d?[d]:[]}),[d]),y=r.useMemo((function(){return g&&g.length>0?f[g[0]]:qo}),[g,f]),b=function(e,t,n){var i=n.getPrefixByAppId,o=n.setMainMenuSelectedKeys,a=r.useState([]),s=a[0],c=a[1];return r.useEffect((function(){if(e)for(var n=0,r=Object.entries(e);n<r.length;n++){var a=r[n],s=a[0],l=a[1];if(Array.isArray(l)&&l.find((function(e){var n=e.system,r=e.path,o=i(n);return("/"===r?"/":o?"/".concat(o).concat(r):r)===t?(c([e.parentId]),!0):!(!e.children||!Array.isArray(e.children))&&e.children.find((function(e){var n=e.system,r=e.path,o=i(n);return("/"===r?"/":o?"/".concat(o).concat(r):r)===t&&(c([e.parentId]),!0)}))}))){o&&o([s]);break}}}),[e,t,i,o]),{subMenuOpenKeys:s,onSubMenuOpenChange:function(e){c(e)}}}(f,d,{getPrefixByAppId:l,setMainMenuSelectedKeys:m}),x=b.subMenuOpenKeys,w=b.onSubMenuOpenChange,S=r.useState(),C=S[0],D=S[1],E=r.useState(),T=E[0],I=E[1],k=r.useCallback((function(){I((function(e){return s.current.style.marginRight=e?0:"".concat(a,"px"),!e}))}),[s,a]),j=t.jsxs(R,O({type:"link",onClick:k},{children:[t.jsx(yn,{type:"icon-toggle",style:{fontSize:"18px"}}),T?"浮动":"固定"]}));r.useImperativeHandle(i,(function(){return{setVisible:function(e){T||D(e)}}}));var N=r.useMemo((function(){var e=function(n,r,i){return void 0===r&&(r=[]),void 0===i&&(i=1),i>=3?null:(i++,Array.isArray(n)&&n.forEach((function(n){var o=n.system,a=n.path,s=l(o),u="/"===a?"/":s?"/".concat(s).concat(a):a,d={label:"/"===u?n.name:t.jsx(p.Link,O({to:u,onClick:function(){c({key:u,path:u,label:n.name})}},{children:n.name})),title:n.name,key:"/"===u?n.id:u,children:Array.isArray(n.children)&&n.children.length>0?e(n.children,[],i):null};r.push(d)})),r)};return e(y)}),[y,c,l]);return t.jsx(n.Drawer,O({mask:!1,placement:"left",width:a,zIndex:99,closable:!1,open:C,className:"zmdms-menu--sub",style:{marginLeft:o},footer:j},{children:t.jsx(n.Menu,{inlineIndent:10,selectedKeys:v,mode:"inline",items:N,openKeys:x,onOpenChange:w})}))}))),$o=r.memo((function(e){var n=e.width,i=e.subMenuWidth,o=e.layoutSiderRef,a=e.addTab,s=e.logo,c=e.getPrefixByAppId,l=r.useRef({}),u=r.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!0)}),[]),d=r.useCallback((function(){var e;null===(e=l.current)||void 0===e||e.setVisible(!1)}),[]);return t.jsxs("div",O({className:"zmdms-menu",onMouseLeave:d},{children:[t.jsx(Uo,{logo:s}),t.jsx(Wo,{onMouseEnter:u,addTab:a,getPrefixByAppId:c}),t.jsx(Vo,{ref:l,marginLeft:n,subMenuWidth:i,layoutSiderRef:o,addTab:a,getPrefixByAppId:c})]}))})),Zo=function(e){var i=e.siderWidth,o=void 0===i?118:i,a=e.subMenuWidth,s=void 0===a?162:a,c=e.addTab,l=e.siderBg,u=e.logo,d=r.useContext(as).apps,f=r.useState([]),h=f[0],p=f[1],g=r.useRef(),m=r.useCallback((function(e){if(Array.isArray(d)&&d.length>0){var t=d.find((function(t){return t.appId+""==e+""}));if(t)return t.name}return null}),[d]);return t.jsx(n.Layout.Sider,O({className:"zmdms-sider",collapsedWidth:"0",collapsible:!0,trigger:null,width:o,ref:g,style:{backgroundImage:"url(".concat(l,")")}},{children:t.jsx(Ko.Provider,O({value:{mainMenuSelectedKeys:h,setMainMenuSelectedKeys:p}},{children:t.jsx($o,{width:o,subMenuWidth:s,layoutSiderRef:g,addTab:c,logo:u,getPrefixByAppId:m})}))}))};Zo.displayName="ZTXK_WEBUI_AppLayoutSider";var Go=r.memo(Zo),Xo=function(e){var r,i=e.statusBtnConfig,o=e.authUserBtns,a=e.callback,s=function(e){a&&a(e)};return t.jsx(t.Fragment,{children:null===(r=i||[])||void 0===r?void 0:r.map((function(e){var r=e.authority,i=e.confirmMsg,a=e.type,c=e.name,l=D(e,["authority","confirmMsg","type","name"]),u=!1;return u="boolean"==typeof r?r:void 0===r||!!o.find((function(e){return e.code===r})),i?t.jsx(n.Popconfirm,O({title:i,cancelText:"否",okText:"是",onConfirm:function(){return s(a)}},{children:t.jsx(R,O({type:"link",style:{height:28},disabled:!u},l,{children:c}))}),a):t.jsx(R,O({type:"link",style:{height:28},onClick:function(){return s(a)},disabled:!u},l,{children:c}),a)}))})};function Yo(e){return e?"string"==typeof e?e:e instanceof Array?e.map((function(e){var t;return Yo("string"==typeof e?e:(null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.children)||"")})).join(" "):Yo(e):""}Xo.displayName="ZTXK_WEBUI_OperationBtn";var Jo=r.memo(r.forwardRef((function(e,o){var a,s=e.list,c=e.defaultList,l=e.dataKey,u=void 0===l?"id":l,d=e.titleKey,f=void 0===d?"name":d,h=e.joinKey,p=e.joinStr,m=void 0===p?"-":p,v=e.lineFeedKey,y=e.lineFeedStr,b=void 0===y?"-":y,x=e.showAll,w=e.children,S=e.disabledValues,C=e.dropdownMatchSelectWidth,E=void 0===C?100:C,T=e.onChange,I=e.onSearch,k=e.isRemoteSearch,j=e.dropdownButton,N=e.dropdownRender,P=D(e,["list","defaultList","dataKey","titleKey","joinKey","joinStr","lineFeedKey","lineFeedStr","showAll","children","disabledValues","dropdownMatchSelectWidth","onChange","onSearch","isRemoteSearch","dropdownButton","dropdownRender"]),A=function(e){var n=e.list,r=e.defaultList,o=e.dataKey,a=void 0===o?"id":o,s=e.titleKey,c=void 0===s?"name":s,l=e.joinKey,u=e.joinStr,d=e.lineFeedKey,f=e.lineFeedStr,h=e.showAll,p=e.children,g=e.disabledValues,m=function(e,t){if(!t)return e;var n=(null==e?void 0:e.slice())||[];t.forEach((function(e,t){if(e){var r=n.findIndex((function(t){return t&&a&&t[a]===e[a]}));if(-1===r)n.push(e);else{var i=O({},e);c&&!i[c]&&Reflect.deleteProperty(i,c),a&&!i[a]&&Reflect.deleteProperty(i,a),n.splice(r,1,O(O({},n[r]),i))}}else console.error("默认数据中有空值 位置再defalutList中第".concat(t+1,"项"))}))}(n,r);return{resultList:m,renderChildren:function(){return p||(Array.isArray(m)?t.jsxs(t.Fragment,{children:[h&&t.jsx(Jo.Option,O({title:"全部",value:""},{children:"全部"})),null==m?void 0:m.map((function(e,n){if(!e)return console.error("默认数据中有空值 位置再list中第".concat(n+1,"项")),null;var r=e[a],o=e[a],s=i.unescapeString(e[c]),h=[],p=[];l&&(h=Array.isArray(l)?l.map((function(t){return i.unescapeString(e[t])})):e[l]?[i.unescapeString(e[l])]:[]),d&&(p=Array.isArray(d)?d.map((function(t){return i.unescapeString(e[t])})):e[d]?[i.unescapeString(e[d])]:[]),Array.isArray(h)?h.unshift(s):h=[s];var m=null==e?void 0:e.disabled;return Array.isArray(g)&&g.includes(o)&&(m=!0),t.jsxs(Jo.Option,O({value:o,title:s,disabled:m},{children:[Array.isArray(h)?null==h?void 0:h.join(u):"",Array.isArray(p)&&p.length>0?t.jsx("div",O({className:"ztxk-select--feed-item"},{children:null==p?void 0:p.join(f)})):""]}),"".concat(r).concat(n))}))]}):null)}}}({list:s,defaultList:c,dataKey:u,titleKey:f,joinKey:h,joinStr:m,lineFeedKey:v,lineFeedStr:b,showAll:x,children:w,disabledValues:S}),R=A.renderChildren,M=A.resultList,z=(a=j,r.useCallback((function(e){return t.jsxs(t.Fragment,{children:[e,t.jsx(n.Divider,{style:{marginTop:0,marginBottom:"4px"}}),t.jsx("div",O({style:{padding:"0 4px"}},{children:a}))]})}),[a])),L=r.useCallback((function(e){I&&I(e)}),[I]),_=g(L,400);return t.jsx(n.Select,O({showArrow:!0,dropdownMatchSelectWidth:E,onChange:function(t,n){if(Array.isArray(M)&&0!==M.length){var r,i=u;r="multiple"===e.mode?null==(r=t.map((function(e){return M.find((function(t){return!!t&&(null!=t[i]&&t[i]===e)}))})))?void 0:r.filter((function(e){return e})):M.find((function(e){return!!e&&(null!=e[i]&&e[i]===t)})),T&&T(t,n,r)}else T&&T(t,n)},showSearch:!0,onSearch:_,filterOption:!k&&function(e,t){var n=Yo(null==t?void 0:t.children);return(null==n?void 0:n.toLowerCase().indexOf(e.toLowerCase().trim()))>=0},dropdownRender:N||(j?z:void 0)},P,{ref:o},{children:R()}))})));Jo.displayName="ZTXK_WEBUI_Select",Jo.SECRET_COMBOBOX_MODE_DO_NOT_USE=n.Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,Jo.Option=n.Select.Option,Jo.OptGroup=n.Select.OptGroup;var Qo=["exe"];var ea=r.forwardRef((function(e,a){var s=e.dataSource,c=e.action,l=e.headers,u=e.data,d=e.method,f=e.setInnerFileList,h=e.isPublic,p=e.API_BASEURL,g=void 0===p?"":p,m=e.FILE_API_BASEURL,v=void 0===m?"":m,y=e.maxPreviewSize,b=void 0===y?20971520:y,x=e.isPreview,w=e.isDelete,S=e.isDownload,C=r.useState(!1),D=C[0],I=C[1],k=r.useState(),j=k[0],N=k[1],P=S,A=w&&!x,M=function(e,t,r){return E(void 0,void 0,void 0,(function(){var o,a,c;return T(this,(function(l){switch(l.label){case 0:switch(o=t.attachId,a=t.attachName,e){case"download":return[3,1];case"preview":return[3,7];case"delete":return[3,8]}return[3,9];case 1:f((function(e){var n=e.slice();return n.splice(r,1,O(O({},t),{loading:!0})),n})),l.label=2;case 2:return l.trys.push([2,4,5,6]),[4,i.downloadFile(o,a,{API_BASEURL:g,open:h})];case 3:return l.sent(),[3,6];case 4:return c=l.sent(),console.log(c),[3,6];case 5:return f((function(e){var n=e.slice();return n.splice(r,1,O(O({},t),{loading:!1})),n})),[7];case 6:return[3,9];case 7:return t.attachSize>b?n.message.info("文件大于".concat(i.formatUnit(b),",暂不支持在线预览,请先下载后查看")):i.previewFile(o,a,{API_BASEURL:v,fileList:s}),[3,9];case 8:return N((function(e){if(Array.isArray(e)){var n=e.slice(),r=n.findIndex((function(e){return e.attachId===t.attachId}));return n.splice(r,1),n}})),f((function(e){var t=e.slice();return t.splice(r,1),t})),[3,9];case 9:return[2]}}))}))},z=[{title:"序号",width:60,key:"index",fixed:"left",render:function(e,t,n){return"".concat(n+1)}},{title:"文件名称",width:140,dataIndex:"attachName",key:"attachName",render:function(e,n,r){return t.jsx(R,O({type:"link",onClick:function(){return M("preview",n,r)}},{children:e}))}},{title:"文件大小",width:120,dataIndex:"attachSize",key:"attachSize",render:function(e){return e?i.formatUnit(e):"— —"}},{title:"上传时间",width:120,dataIndex:"uploadTime",key:"uploadTime",render:function(e){return o(e).format("YYYY-MM-DD HH:mm:ss")}},{title:"上传人",width:100,dataIndex:"uploadUser",key:"uploadUser"},{title:"上传进度",width:160,render:function(e,r,i){var o="error"===r.status?"exception":void 0;return"error"===r.status?t.jsx(R,O({type:"link",style:{color:"#ff4d4f"},onClick:function(){return _(r,i)}},{children:"文件上传失败,重新上传"})):t.jsx(n.Progress,{percent:null==r?void 0:r.percent,status:o})}},{title:"操作",width:120,ellipsis:!1,fixed:"right",render:function(e,t,n){return L(e,t,n)}}];x&&z.splice(5,1);var L=function(e,n,r){var i=null==n?void 0:n.operationAuth,o=n.loading,a=[];return i?(i.indexOf("2")&&P&&a.push({name:"下载",type:"download",loading:o}),i.indexOf("1")&&a.push({name:"预览",type:"preview"}),i.indexOf("3")&&A&&a.push({name:"删除",type:"delete",confirmMsg:"确认删除该附件吗?",loading:o})):(P&&a.push({name:"下载",type:"download",loading:o}),a.push({name:"预览",type:"preview"}),A&&a.push({name:"删除",type:"delete",confirmMsg:"确认删除该附件吗?",loading:o})),t.jsx(Xo,{statusBtnConfig:a,callback:function(e){return M(e,n,r)}})},_=function(e,t){I(!0),function(e){return E(this,void 0,void 0,(function(){var t,r,o,a,s,c,l,u=this;return T(this,(function(d){return t=e.action,r=e.data,o=e.headers,a=e.file,s=e.method,c=void 0===s?"POST":s,l=e.onProgress,t?[2,new Promise((function(e,s){return E(u,void 0,void 0,(function(){var u,d,f,h,p,g,m,v,y,b,x;return T(this,(function(w){switch(w.label){case 0:if((u=new FormData).append("file",a),r)for(d=Object.keys(r),f=Object.values(r),h=0;h<d.length;h++)f[h]&&u.append(d[h],f[h]);return p=t,"string"==typeof t?[3,2]:[4,t(a)];case 1:p=w.sent(),w.label=2;case 2:if((g=new XMLHttpRequest).open(c,p,!0),g.addEventListener("readystatechange",(function(){if(4===g.readyState)if(200===g.status){var t=JSON.parse(g.responseText);t||n.message.warning("文件上传失败!");var r=t.code,i=t.data,o=t.msg;200===r?e(i):(s(),n.message.warning(o||"文件上传失败!"))}else try{var a=JSON.parse(g.response);s(),n.message.warning(a.msg||"文件上传失败!")}catch(e){console.log(e)}})),g.upload.addEventListener("progress",(function(e){var t=e.loaded,n=e.total,r=i.exactRound(i.times(i.divide(t,n),100),2);l(r)})),o)for(m=0,v=Object.entries(o);m<v.length;m++)y=v[m],b=y[0],"string"==typeof(x=y[1])&&g.setRequestHeader(b,x);return g.send(u),[2]}}))}))}))]:[2,null]}))}))}({action:c,headers:l,data:u,method:d,file:e.originFileObj,onProgress:function(n){f((function(r){var i=r.slice();return i.splice(t,1,O(O({},e),{status:"uploading",percent:n})),i}))}}).then((function(n){I(!1),f((function(r){var i=r.slice();return i.splice(t,1,O(O({},e),{attachId:null==n?void 0:n.attachId,status:"done",percent:"100%"})),i}))})).catch((function(n){I(!1),f((function(n){var r=n.slice();return r.splice(t,1,O(O({},e),{status:"error",percent:"0"})),r}))}))},F=r.useMemo((function(){return{type:"checkbox",onChange:function(e,t){N(t.map((function(e){var t=O({},e);return Reflect.deleteProperty(t,"loading"),t})))}}}),[]);return r.useImperativeHandle(a,(function(){return{getChecked:function(){return j},setLoading:function(e){I(e)},setChecked:N}})),t.jsx(ko,{columns:z,rowKey:"uid",dataSource:s,loading:D,rowSelection:P||A?F:null})}));const ta=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,na=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(ta);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},ra=e=>"*"===e||"x"===e||"X"===e,ia=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},oa=(e,t)=>{if(ra(e)||ra(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(ia(e),ia(t));return n>r?1:n<r?-1:0},aa=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=oa(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0};var sa,ca,la,ua,da,fa,ha,pa,ga,ma,va,ya,ba,xa,wa,Sa=!1;function Ca(){if(!Sa){Sa=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(ya=/\b(iPhone|iP[ao]d)/.exec(e),ba=/\b(iP[ao]d)/.exec(e),ma=/Android/i.exec(e),xa=/FBAN\/\w+;/i.exec(e),wa=/Mobile/i.exec(e),va=!!/Win64/.exec(e),t){(sa=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(sa=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);fa=r?parseFloat(r[1])+4:sa,ca=t[2]?parseFloat(t[2]):NaN,la=t[3]?parseFloat(t[3]):NaN,(ua=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),da=t&&t[1]?parseFloat(t[1]):NaN):da=NaN}else sa=ca=la=da=ua=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);ha=!i||parseFloat(i[1].replace("_","."))}else ha=!1;pa=!!n[2],ga=!!n[3]}else ha=pa=ga=!1}}var Oa,Da={ie:function(){return Ca()||sa},ieCompatibilityMode:function(){return Ca()||fa>sa},ie64:function(){return Da.ie()&&va},firefox:function(){return Ca()||ca},opera:function(){return Ca()||la},webkit:function(){return Ca()||ua},safari:function(){return Da.webkit()},chrome:function(){return Ca()||da},windows:function(){return Ca()||pa},osx:function(){return Ca()||ha},linux:function(){return Ca()||ga},iphone:function(){return Ca()||ya},mobile:function(){return Ca()||ya||ba||ma||wa},nativeApp:function(){return Ca()||xa},android:function(){return Ca()||ma},ipad:function(){return Ca()||ba}},Ea=Da,Ta=!("undefined"==typeof window||!window.document||!window.document.createElement),Ia={canUseDOM:Ta,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:Ta&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:Ta&&!!window.screen,isInWorker:!Ta};Ia.canUseDOM&&(Oa=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
|
|
7
7
|
/**
|
|
8
8
|
* Checks if an event is supported in the current execution environment.
|
|
9
9
|
*
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* @return {boolean} True if the event is supported.
|
|
18
18
|
* @internal
|
|
19
19
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
20
|
-
*/;var Ia=Da,ka=function(e,t){if(!Ta.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&Ca&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r};function ja(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1==e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}ja.getEventType=function(){return Ia.firefox()?"DOMMouseScroll":ka("wheel")?"wheel":"mousewheel"};var Na=k(ja);function Pa(e,t,n,r,i){void 0===i&&(i=0);var o=Fa(t.width,t.height,i),a=o.width,s=o.height;return{x:Aa(e.x,a,n.width,r),y:Aa(e.y,s,n.height,r)}}function Aa(e,t,n,r){var i=t*r/2-n/2;return Ha(e,-i,i)}function Ra(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Ma(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function za(e,t){return Math.min(e,Math.max(0,t))}function La(e,t){return t}function _a(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Fa(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Ha(e,t,n){return Math.min(Math.max(e,t),n)}function Ba(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var Ua=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=r.createRef(),n.videoRef=r.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,r,i,o){var a=Fa(t.width,t.height,n),s=Ha(r.width/a.width*(100/e.width),i,o);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,i=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}else if(n.props.initialCroppedAreaPixels){var o=function(e,t,n,r,i,o){void 0===n&&(n=0);var a=Fa(t.naturalWidth,t.naturalHeight,n),s=Ha(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),i,o),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=o.crop,i=o.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,r,i,o,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var c=n.containerRect.width/n.containerRect.height,l=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/u,f=void 0;if(s.offsetWidth<l||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":f=c>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":f={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":f={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":f=l>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else f={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=O(O({},f),{naturalWidth:l,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,r,i,o){void 0===o&&(o=0);var a=Fa(e,t,o),s=a.width,c=a.height,l=Math.min(s,n),u=Math.min(c,r);return l>u*i?{width:u*i,height:u}:{width:l,height:l/i}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(o=n.state.cropSize)||void 0===o?void 0:o.height)===h.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),i=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+e.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,i=e.x,o=e.y;n.dragStartPosition={x:i,y:o},n.dragStartCrop=O({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,i=r-n.dragStartPosition.y,o={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+i},a=n.props.restrictPosition?Pa(o,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):o;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),i=Na(e).pixelY,o=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,i=n.props,o=i.crop,a=i.zoom;return{x:(t+o.x)/a,y:(r+o.y)/a}},n.setNewZoom=function(e,t,r){var i=(void 0===r?{}:r).shouldUpdatePosition,o=void 0===i||i;if(n.state.cropSize&&n.props.onZoomChange){var a=Ha(e,n.props.minZoom,n.props.maxZoom);if(o){var s=n.getPointOnContainer(t),c=n.getPointOnMedia(s),l={x:c.x*a-s.x,y:c.y*a-s.y},u=n.props.restrictPosition?Pa(l,n.mediaSize,n.state.cropSize,a,n.props.rotation):l;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=!0);var s=a?za:La,c=Fa(t.width,t.height,o),l=Fa(t.naturalWidth,t.naturalHeight,o),u={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},d=Math.round(s(l.width,u.width*l.width/100)),f=Math.round(s(l.height,u.height*l.height/100)),h=l.width>=l.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:O(O({},h),{x:Math.round(s(l.width-h.width,u.x*l.width/100)),y:Math.round(s(l.height-h.height,u.y*l.height/100))})}}(n.props.restrictPosition?Pa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Pa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,i,o,a,s,c,l;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(i=this.props.cropSize)||void 0===i?void 0:i.width)?this.computeSizes():(null===(o=e.crop)||void 0===o?void 0:o.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(l=this.videoRef.current)||void 0===l||l.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Ra(n,r),this.lastPinchRotation=Ma(n,r),this.onDragStart(_a(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),i=t.getTouchPoint(e.touches[1]),o=_a(r,i);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=Ra(r,i),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,o,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=Ma(r,i),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,i=t.video,o=t.mediaProps,a=t.transform,s=t.crop,c=s.x,l=s.y,u=t.rotation,d=t.zoom,f=t.cropShape,h=t.showGrid,p=t.style,g=p.containerStyle,m=p.cropAreaStyle,v=p.mediaStyle,y=t.classes,b=y.containerClassName,x=y.cropAreaClassName,w=y.mediaClassName,S=t.objectFit;return r.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:Ba("reactEasyCrop_Container",b)},n?r.createElement("img",O({alt:"",className:Ba("reactEasyCrop_Image","contain"===S&&"reactEasyCrop_Contain","horizontal-cover"===S&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===S&&"reactEasyCrop_Cover_Vertical","auto-cover"===S&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),w)},o,{src:n,ref:this.imageRef,style:O(O({},v),{transform:a||"translate(".concat(c,"px, ").concat(l,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),onLoad:this.onMediaLoad})):i&&r.createElement("video",O({autoPlay:!0,loop:!0,muted:!0,className:Ba("reactEasyCrop_Video","contain"===S&&"reactEasyCrop_Contain","horizontal-cover"===S&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===S&&"reactEasyCrop_Cover_Vertical","auto-cover"===S&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),w)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:O(O({},v),{transform:a||"translate(".concat(c,"px, ").concat(l,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return r.createElement("source",O({key:e.src},e))}))),this.state.cropSize&&r.createElement("div",{style:O(O({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ba("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",h&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(r.Component);const Wa="img-crop",Ka=.1,qa=.01,Va=r.forwardRef(((e,n)=>{const{cropperRef:i,zoomSlider:o,rotationSlider:a,aspectSlider:s,showReset:c,resetBtnText:l,modalImage:u,aspect:d,minZoom:f,maxZoom:h,cropShape:p,showGrid:g,cropperProps:m}=e,[v,y]=r.useState(1),[w,S]=r.useState(0),[C,O]=r.useState(d),D=1!==v||0!==w||C!==d,E=()=>{y(1),S(0),O(d)},[T,I]=r.useState({x:0,y:0}),k=r.useRef({width:0,height:0,x:0,y:0}),j=r.useCallback(((e,t)=>{k.current=t}),[]);r.useImperativeHandle(n,(()=>({rotation:w,cropPixelsRef:k,onReset:E})));const N="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",P="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",A="[flex:1]";return t.jsxs(t.Fragment,{children:[t.jsx(Ua,Object.assign({},m,{ref:i,image:u,crop:T,zoom:v,rotation:w,aspect:C,minZoom:f,maxZoom:h,zoomWithScroll:o,cropShape:p,showGrid:g,onCropChange:I,onZoomChange:y,onRotationChange:S,onCropComplete:j,classes:{containerClassName:`${Wa}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${Wa}-media`}})),o&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-zoom ${N}`},{children:[t.jsx("button",Object.assign({className:P,onClick:()=>y(v-Ka),disabled:v-Ka<f},{children:"-"})),t.jsx(x,{className:A,min:f,max:h,step:Ka,value:v,onChange:y}),t.jsx("button",Object.assign({className:P,onClick:()=>y(v+Ka),disabled:v+Ka>h},{children:"+"}))]})),a&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-rotation ${N}`},{children:[t.jsx("button",Object.assign({className:`${P} [font-size:16px]`,onClick:()=>S(w-1),disabled:-180===w},{children:"↺"})),t.jsx(x,{className:A,min:-180,max:180,step:1,value:w,onChange:S}),t.jsx("button",Object.assign({className:`${P} [font-size:16px]`,onClick:()=>S(w+1),disabled:180===w},{children:"↻"}))]})),s&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-aspect ${N}`},{children:[t.jsx("button",Object.assign({className:P,onClick:()=>O(C-qa),disabled:C-qa<.5},{children:"↕️"})),t.jsx(x,{className:A,min:.5,max:2,step:qa,value:C,onChange:O}),t.jsx("button",Object.assign({className:P,onClick:()=>O(C+qa),disabled:C+qa>2},{children:"↔️"}))]})),c&&(o||a||s)&&t.jsx(b,Object.assign({className:"[bottom:20px] [position:absolute]",style:D?{}:{opacity:.3,pointerEvents:"none"},onClick:E},{children:l}))]})}));var $a=r.memo(Va);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.grid{display:grid}.\\!\\[position\\:relative\\]{position:relative!important}.\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.disabled\\:\\[cursor\\:default\\]:disabled{cursor:default}.disabled\\:\\[opacity\\:20\\%\\]:disabled{opacity:20%}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]~section:first-of-type{margin-top:16px}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]~section:last-of-type{margin-bottom:16px}");const Za=-1===((e,t)=>{const n=ta(e),r=ta(t),i=n.pop(),o=r.pop(),a=oa(n,r);return 0!==a?a:i&&o?oa(i.split("."),o.split(".")):i||o?i?-1:1:0})(n.version,"4.23.0")?"visible":"open",Ga=(e,t,n)=>t in e?(console.error(`\`${t}\` is deprecated, please use \`${n}\` instead`),e[t]):e[n],Xa=r.forwardRef(((e,n)=>{const{quality:i=.4,fillColor:o="white",zoomSlider:a=!0,rotationSlider:s=!1,aspectSlider:c=!1,showReset:l=!1,resetText:u,aspect:d=1,minZoom:f=1,maxZoom:h=3,cropShape:p="rect",showGrid:g=!1,cropperProps:m,modalClassName:b,modalTitle:x,modalWidth:w,modalOk:S,modalCancel:C,onModalOk:O,onModalCancel:T,modalProps:I,beforeCrop:k,children:j}=e,N=Ga(e,"zoom","zoomSlider")||!0,P=Ga(e,"rotate","rotationSlider")||!1,A=Ga(e,"shape","cropShape")||"rect",R=Ga(e,"grid","showGrid")||!1;"onUploadFail"in e&&console.error("`onUploadFail` is removed, because the only way it is called, is when the file is rejected by beforeUpload"),Ga(e,"modalMaskTransitionName","modalProps.maskTransitionName"),Ga(e,"modalTransitionName","modalProps.transitionName");const M=r.useRef({});M.current.onModalOk=O,M.current.onModalCancel=T,M.current.beforeCrop=k;const z=r.useRef(null),L=r.useCallback((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),i=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${Wa}-media`),{width:a,height:s,x:c,y:l}=z.current.cropPixelsRef.current;if(P&&0!==z.current.rotation){const{naturalWidth:e,naturalHeight:t}=i,u=z.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),f=Math.abs(Math.cos(u)),h=e*f+t*d,p=t*f+e*d;n.width=h,n.height=p,r.fillStyle=o,r.fillRect(0,0,h,p);const g=h/2,m=p/2;r.translate(g,m),r.rotate(u),r.translate(-g,-m);const v=(h-e)/2,y=(p-t)/2;r.drawImage(i,0,0,e,t,v,y,e,t);const b=r.getImageData(0,0,h,p);n.width=a,n.height=s,r.putImageData(b,-c,-l)}else n.width=a,n.height=s,r.fillStyle=o,r.fillRect(0,0,a,s),r.drawImage(i,c,l,a,s,0,0,a,s);return n}),[o,P]),[_,F]=r.useState(""),H=r.useRef(),B=r.useRef(),U=r.useMemo((()=>{const e=Array.isArray(j)?j[0]:j,t=e.props,{beforeUpload:n,accept:r}=t,o=D(t,["beforeUpload","accept"]);return Object.assign(Object.assign({},e),{props:Object.assign(Object.assign({},o),{accept:r||"image/*",beforeUpload:(e,t)=>new Promise((r=>E(void 0,void 0,void 0,(function*(){if("function"==typeof M.current.beforeCrop)try{const n=yield M.current.beforeCrop(e,t);if(!0!==n)return r(n)}catch(e){return r(e)}const o=new FileReader;o.addEventListener("load",(()=>{"string"==typeof o.result&&F(o.result)})),o.readAsDataURL(e),H.current=()=>{var e,t;F(""),z.current.onReset(),r(y.LIST_IGNORE),null===(t=(e=M.current).onModalCancel)||void 0===t||t.call(e)},B.current=t=>E(void 0,void 0,void 0,(function*(){F(""),z.current.onReset();const o=L(t.target),{type:a,name:s,uid:c}=e;o.toBlob((e=>E(void 0,void 0,void 0,(function*(){var t,i,o,l,u,d;const f=new File([e],s,{type:a});if(Object.assign(f,{uid:c}),"function"!=typeof n)return r(f),void(null===(i=(t=M.current).onModalOk)||void 0===i||i.call(t,f));try{const e=yield n(f,[f]),t=!0===e?f:e;r(t),null===(l=(o=M.current).onModalOk)||void 0===l||l.call(o,t)}catch(e){r(e),null===(d=(u=M.current).onModalOk)||void 0===d||d.call(u,e)}}))),a,i)}))}))))})})}),[j,L,i]),W=r.useMemo((()=>{const e={};return void 0!==w&&(e.width=w),void 0!==S&&(e.okText=S),void 0!==C&&(e.cancelText=C),e}),[C,S,w]),K=`${Wa}-modal${b?` ${b}`:""}`,q="zh-CN"===("undefined"==typeof window?"":window.navigator.language),V=x||(q?"编辑图片":"Edit image"),$=u||(q?"重置":"Reset");return t.jsxs(t.Fragment,{children:[U,_&&t.jsx(v,Object.assign({},I,W,{[Za]:!0},{title:V,onCancel:H.current,onOk:B.current,wrapClassName:K,maskClosable:!1,destroyOnClose:!0},{children:t.jsx($a,{ref:z,cropperRef:n,zoomSlider:N,rotationSlider:P,aspectSlider:c,showReset:l,resetBtnText:$,modalImage:_,aspect:d,minZoom:f,maxZoom:h,cropShape:A,showGrid:R,cropperProps:m})}))]})}));var Ya=r.memo(r.forwardRef((function(e,o){var a=e.children,s=e.btnText,c=e.className,l=e.showTip,u=void 0===l||l,d=e.maxSize,f=void 0===d?104857600:d,h=e.showTable,p=e.acceptList,g=e.beforeUpload,v=e.onChange,y=e.API_BASEURL,b=void 0===y?"":y,x=e.FILE_API_BASEURL,w=void 0===x?"":x,S=e.action,C=e.headers,I=e.data,k=e.userName,j=e.fileList,P=e.isPublic,A=e.maxPreviewSize,M=e.isPreview,z=e.isDownload,L=e.isDelete,_=e.zipName,F=void 0===_?"批量下载-".concat(Date.now(),".zip"):_,H=e.isImage,B=D(e,["children","btnText","className","showTip","maxSize","showTable","acceptList","beforeUpload","onChange","API_BASEURL","FILE_API_BASEURL","action","headers","data","userName","fileList","isPublic","maxPreviewSize","isPreview","isDownload","isDelete","zipName","isImage"]),U=B.maxCount,W=B.listType,K=B.method,q=N("ztxk-upload",c,{}),V=i.formatUnit(f),$=r.useRef({}),Z=r.useRef({}),G=r.useState(),X=G[0],Y=G[1],J=function(e){var t=e.acceptList,o=e.maxSize,a=e.maxSizeStr,s=e.beforeUpload,c=e.isImage;return r.useCallback((function(e,r){var l=e.name,u=e.size,d=i.getFileExtension(l)[1];if(s){var f=s(e,r);if(f)return f}if(0===u)return n.message.warning("不能上传空文件!"),Ya.LIST_IGNORE;if(c&&!i.isImageExtension(d))return n.message.warning("不能上传非图片格式的文件!"),Ya.LIST_IGNORE;var h=t||[];return h.length>0&&!h.includes(d)||0===h.length&&Jo.includes(d)?(n.message.warning("不支持 ".concat(d," 文件格式")),Ya.LIST_IGNORE):o&&u>o?(n.message.warning("文件超出 ".concat(a,"!")),Ya.LIST_IGNORE):Promise.resolve(e)}),[t,o,a,s,c])}({acceptList:p,maxSize:f,maxSizeStr:V,beforeUpload:g,isImage:H}),Q=function(e){var t=e.onChange,n=e.userName,i=e.fileList,o=r.useState(),a=o[0],s=o[1];r.useEffect((function(){i&&s(i)}),[i]);var c=r.useCallback((function(e){var r,i,o,a,c=e.file,l=e.fileList,u=O({attachId:null===(i=null===(r=null==c?void 0:c.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.attachId,attachName:(null==c?void 0:c.name)?null==c?void 0:c.name:null===(a=null===(o=null==c?void 0:c.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.originalName,attachSize:null==c?void 0:c.size,uploadTime:Date.now(),uploadUser:n},c),d=l.map((function(e){var t,r,i=e.size,o=e.name,a=e.response;return O({attachId:null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.attachId,attachName:o||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.originalName),attachSize:i,uploadTime:Date.now(),uploadUser:n},e)}));if(m.flushSync((function(){s(d)})),t&&t({file:u,fileList:d}),d.every((function(e){return"done"===e.status||"error"===e.status}))){var f=l.filter((function(e){return"done"===e.status})),h=l.filter((function(e){return"error"===e.status}));t&&t({file:u,fileList:d,isComplete:!0,successFileList:f,errorFileList:h})}else t&&t({file:u,fileList:d})}),[t,n]);return{innerFileList:a,setInnerFileList:function(e){if(s(e),"function"==typeof e){var n=e(a);t&&t({file:null,fileList:n})}else t&&t({file:null,fileList:e})},onChangeHandle:c}}({onChange:v,userName:k,fileList:j}),ee=Q.onChangeHandle,te=Q.innerFileList,ne=Q.setInnerFileList,re=function(e){var t=e.action,n=e.API_BASEURL,o=void 0===n?"":n,a=e.headers,s=e.data,c=e.isPublic;return{fileAction:t||i.createUploadFileLink({API_BASEURL:o}),fileHeaders:r.useMemo((function(){return O({"Zmdms-Auth":i.getToken()||""},a)}),[a]),fileData:r.useMemo((function(){var e=O({},s);return c&&(e.isAuth="2"),e}),[s,c])}}({action:S,API_BASEURL:b,headers:C,data:I,isPublic:P}),ie=re.fileAction,oe=re.fileHeaders,ae=re.fileData,se=function(e){var t=e.fileList,n=e.userName;return r.useMemo((function(){return null==t?void 0:t.map((function(e,t){var r,i,o,a=e.uid,s=e.size,c=e.name,l=e.attachId,u=e.attachName,d=e.attachSize,f=e.uploadTime,h=e.uploadUser,p=e.response;return O({attachId:l||(null===(r=null==p?void 0:p.data)||void 0===r?void 0:r.attachId),attachName:u||c||(null===(i=null==p?void 0:p.data)||void 0===i?void 0:i.originalName),attachSize:d||s,uploadTime:f||Date.now(),uploadUser:h||n,uid:a||l||(null===(o=null==p?void 0:p.data)||void 0===o?void 0:o.attachId)||"index",percent:100,status:"done"},e)}))}),[t,n])}({fileList:te,userName:k}),ce=t.jsx(n.Upload,O({showUploadList:!1,multiple:!0,beforeUpload:J,onChange:ee,action:ie,headers:oe,data:ae,fileList:te,onPreview:function(e){var t=i.createDownloadLink(e.attachId,{API_BASEURL:b,open:P});Y(t),Z.current.open()}},B,{children:a||(W&&"text"!==W?H&&U&&te&&te.length>=U?null:t.jsxs("div",O({className:"ztxk-upload--picture"},{children:[t.jsx(on,{style:{fontSize:18}}),t.jsx("div",O({style:{marginTop:8}},{children:s||"添加图片"}))]})):t.jsxs(R,O({type:"primary",icon:t.jsx(on,{})},{children:[s||"添加附件",U?"(最多上传".concat(U,"个文件)"):""]})))}));return r.useImperativeHandle(o,(function(){return{getData:function(){var e=te.filter((function(e){return"done"===e.status})),t=te.filter((function(e){return"error"===e.status}));return{fileList:te,successFileList:e,errorFileList:t}}}})),t.jsxs("div",O({className:q},{children:[M?null:t.jsxs(t.Fragment,{children:[H?t.jsx(Xa,O({rotationSlider:!0,showReset:!0,quality:.8,modalClassName:"ztxk-upload-imgcrop"},{children:ce})):ce,u?t.jsxs("span",O({className:"ztxk-upload--tips"},{children:["(单个附件最大支持",V,")"]})):""]}),L&&!M?t.jsx(n.Popconfirm,O({title:"是否删除选中附件?",cancelText:"否",okText:"是",onConfirm:function(){return function(){var e,t,r,i=null===(t=null===(e=$.current)||void 0===e?void 0:e.getChecked)||void 0===t?void 0:t.call(e);i&&0!==i.length?(ne((function(e){return e.filter((function(e){return!i.find((function(t){return t.uid===e.uid}))}))})),null===(r=$.current)||void 0===r||r.setChecked([])):n.message.info("请选择需要操作的数据!")}()}},{children:t.jsx(R,O({type:"primary"},{children:"批量删除"}))})):null,z?t.jsx(n.Dropdown,O({menu:{items:[{label:"压缩",key:"compress"},{label:"不压缩",key:"noCompress"}],onClick:function(e){var t;t=e.key,E(void 0,void 0,void 0,(function(){var e,r,o,a,s,c;return T(this,(function(l){switch(l.label){case 0:if(!(e=null===(o=null===(r=$.current)||void 0===r?void 0:r.getChecked)||void 0===o?void 0:o.call(r))||0===e.length)return n.message.info("请选择需要操作的数据!"),[2];if(null===(a=$.current)||void 0===a||a.setLoading(!0),"compress"!==t)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,i.batchDownloadFiles(e,{API_BASEURL:b,zipName:F})];case 2:return l.sent(),null===(s=$.current)||void 0===s||s.setLoading(!1),[3,4];case 3:return l.sent(),null===(c=$.current)||void 0===c||c.setLoading(!1),[3,4];case 4:return[3,6];case 5:e.forEach((function(e){i.downloadFile(null==e?void 0:e.attachId,null==e?void 0:e.attachName,{API_BASEURL:b,open:P}).then((function(e){var t;null===(t=$.current)||void 0===t||t.setLoading(!1)})).catch((function(e){var t;null===(t=$.current)||void 0===t||t.setLoading(!1)}))})),l.label=6;case 6:return[2]}}))}))}},placement:"bottomLeft"},{children:t.jsx(R,O({type:"primary"},{children:"批量下载"}))})):null,h?t.jsx(Qo,{dataSource:se,action:ie,headers:oe,data:ae,method:K,setInnerFileList:ne,isPublic:P,API_BASEURL:b,FILE_API_BASEURL:w,maxPreviewSize:A,isPreview:M,isDelete:L,isDownload:z,ref:$}):null,H&&t.jsx(Po,O({ref:Z,footer:null,width:"520px"},{children:t.jsx("div",O({style:{textAlign:"center"}},{children:t.jsx("img",{src:X,alt:"预览",style:{maxWidth:"400px",maxHeight:"400px"}})}))}))]}))})));function Ja(e,t,n,r){var i,o={};return e?o=e(t):((i={})[n]=t[n],i[r]=t[r],o=i),o}Ya.displayName="ZTXK_WEBUI_UploadList",Ya.Dragger=n.Upload.Dragger,Ya.LIST_IGNORE=n.Upload.LIST_IGNORE;var Qa=r.memo(r.forwardRef((function(e,i){var o=e.onChange,a=e.isAllData,s=e.dataHandle,c=D(e,["onChange","isAllData","dataHandle"]),l=c.treeData,u=c.fieldNames,d=c.treeNodeLabelProp,f=c.loadData,h=c.treeDataSimpleMode,p=function(e){var t=e.fieldNames,n=e.treeNodeLabelProp,i=void 0===n?"title":n;return{valueKey:r.useMemo((function(){return(null==t?void 0:t.value)||"value"}),[null==t?void 0:t.value]),labelKey:r.useMemo((function(){return(null==t?void 0:t.label)||"label"}),[null==t?void 0:t.label]),childrenKey:r.useMemo((function(){return(null==t?void 0:t.children)||"children"}),[null==t?void 0:t.children]),titleKey:r.useMemo((function(){return i}),[i])}}({fieldNames:u,treeNodeLabelProp:d}),g=function(e){var t=e.dataHandle,n=e.treeData,i=e.isAllData,o=e.valueKey,a=e.titleKey,s=e.childrenKey,c=e.treeDataSimpleMode,l=r.useRef({}),u=r.useRef(0),d=r.useCallback((function(e,t){return(e||[]).map((function(e){var n=e[o],r=e[s],i=l.current[n]=O({parent:t,valueKey:n},e);return i[s]=d(r,i),i}))}),[o,s]);return r.useEffect((function(){i&&n&&(d(u.current?n.slice(u.current):n),c&&(u.current=n.length))}),[n,i,d,c]),{getPath:r.useCallback((function(e){if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r],s="object"==typeof i?i[o]:i,u=l.current[s],d=Ja(t,u,o,a);n.push(d)}return n}s="object"==typeof e?e[o]:e;var f=[];for(u=l.current[s];u;){d=Ja(t,u,o,a),f.unshift(d);var h=u.pId;u=c?l.current[h]:u.parent}return f}),[t,o,a,c])}}({dataHandle:s,treeData:l,isAllData:a,valueKey:p.valueKey,labelKey:p.labelKey,childrenKey:p.childrenKey,titleKey:p.titleKey,loadData:f,treeDataSimpleMode:h}).getPath,m=function(e){var t=e.onChange,n=e.isAllData,i=e.getPath;return{onChangeHandle:r.useCallback((function(e,r,o){if(n){var a=i(e);t&&t(e,r,o,a)}else t&&t(e,r,o)}),[n,t,i])}}({onChange:o,isAllData:a,getPath:g}).onChangeHandle;return t.jsx(n.TreeSelect,O({onChange:m,showCheckedStrategy:n.TreeSelect.SHOW_ALL,maxTagCount:3},c))})));function es(e){var t=e.searchType,n=e.treeData,i=e.childrenKey;return{flatDataList:r.useMemo((function(){if("all"===t)return function(e,t){var n=(t||{}).childrenKey,r=void 0===n?"chidlren":n,i=[];if(Array.isArray(e))for(var o=e.slice(),a=function(){var e=o.shift();if(e){e[r]&&Array.isArray(e[r])&&o.push.apply(o,e[r]);var t={};Object.keys(e).forEach((function(n){n!==r&&(t[n]=e[n])})),i.push(t)}};o.length;)a();return i}(n,{childrenKey:i})}),[t,n,i])}}Qa.displayName="ZTXK_WEBUI_TreeSelect",Qa.SHOW_ALL=n.TreeSelect.SHOW_ALL,Qa.SHOW_CHILD=n.TreeSelect.SHOW_CHILD,Qa.SHOW_PARENT=n.TreeSelect.SHOW_PARENT,Qa.TreeNode=n.TreeSelect.TreeNode;var ts=function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.children&&(i.children.some((function(t){return t.key===e}))?n=i.key:ts(e,i.children)&&(n=ts(e,i.children)))}return n};var ns=r.memo(r.forwardRef((function(e,i){var o=e.searchType,a=e.onSearch,s=e.className,c=D(e,["searchType","onSearch","className"]),l=c.treeData,u=c.fieldNames,d=N("ztxk-tree",s,{}),f=function(e){var t=e.fieldNames;return{valueKey:r.useMemo((function(){return(null==t?void 0:t.key)||"key"}),[null==t?void 0:t.key]),titleKey:r.useMemo((function(){return(null==t?void 0:t.title)||"title"}),[null==t?void 0:t.title]),childrenKey:r.useMemo((function(){return(null==t?void 0:t.children)||"children"}),[null==t?void 0:t.children])}}({fieldNames:u}),h=f.valueKey,p=f.titleKey,g=function(e){var t=e.flatDataList,n=e.treeData,i=e.onSearch,o=e.titleKey,a=e.valueKey,s=e.searchType,c=r.useState(),l=c[0],u=c[1],d=r.useState(),f=d[0],h=d[1],p=r.useCallback((function(e){u(e),h(!1)}),[]);return{onSearchHandle:r.useCallback((function(e){if("lazy"!==s){if(n){var r=t.map((function(t){return t[o].indexOf(e)>-1?ts(t[a],n):null})).filter((function(e,t,n){return e&&n.indexOf(e)===t}));r.length>0&&(u(r),h(!0))}}else i&&i(e)}),[t,o,a,n,i,s]),onExpand:p,expandedKeys:l,autoExpandParent:f}}({treeData:l,flatDataList:es({searchType:o,treeData:l,valueKey:h,childrenKey:f.childrenKey,titleKey:p}).flatDataList,titleKey:p,valueKey:h,searchType:o,onSearch:a}),m=g.onSearchHandle,v=g.expandedKeys,y=g.autoExpandParent,b=g.onExpand;return t.jsxs("div",O({className:d},{children:[o?t.jsx(M.Search,{onSearch:m}):null,t.jsx(n.Tree,O({expandedKeys:v,autoExpandParent:y,onExpand:b},c))]}))})));ns.displayName="ZTXK_WEBUI_Tree",ns.DirectoryTree=n.Tree.DirectoryTree,ns.TreeNode=n.Tree.TreeNode;var rs=function(e){var r=e.className,i=D(e,["className"]),o=N("ztxk-descriptions",r,{});return t.jsx(n.Descriptions,O({column:4,size:"middle",className:o},i))};rs.displayName="ZTXK_WEBUI_Descriptions",rs.Item=n.Descriptions.Item;var is=function(e){var n=e.title,r=e.className,i=e.bordered,o=e.showBg,a=e.justifyContent,s=void 0===a?"space-between":a,c=e.children,l=N("ztxk-title",r,{"ztxk-title--bordered":i,"ztxk-title--background":o});return t.jsxs("div",O({className:l,style:{justifyContent:s}},{children:[t.jsx("div",O({className:"ztxk-title--title"},{children:n})),t.jsx("div",O({className:"ztxk-title--extra"},{children:c}))]}))};is.displayName="ZTXK_WEBUI_Title",Object.defineProperty(e,"Affix",{enumerable:!0,get:function(){return n.Affix}}),Object.defineProperty(e,"Alert",{enumerable:!0,get:function(){return n.Alert}}),Object.defineProperty(e,"Anchor",{enumerable:!0,get:function(){return n.Anchor}}),Object.defineProperty(e,"AutoComplete",{enumerable:!0,get:function(){return n.AutoComplete}}),Object.defineProperty(e,"Avatar",{enumerable:!0,get:function(){return n.Avatar}}),Object.defineProperty(e,"BackTop",{enumerable:!0,get:function(){return n.BackTop}}),Object.defineProperty(e,"Badge",{enumerable:!0,get:function(){return n.Badge}}),Object.defineProperty(e,"Breadcrumb",{enumerable:!0,get:function(){return n.Breadcrumb}}),Object.defineProperty(e,"Card",{enumerable:!0,get:function(){return n.Card}}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return n.Carousel}}),Object.defineProperty(e,"Cascader",{enumerable:!0,get:function(){return n.Cascader}}),Object.defineProperty(e,"Checkbox",{enumerable:!0,get:function(){return n.Checkbox}}),Object.defineProperty(e,"Col",{enumerable:!0,get:function(){return n.Col}}),Object.defineProperty(e,"Collapse",{enumerable:!0,get:function(){return n.Collapse}}),Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return n.Comment}}),Object.defineProperty(e,"ConfigProvider",{enumerable:!0,get:function(){return n.ConfigProvider}}),Object.defineProperty(e,"Divider",{enumerable:!0,get:function(){return n.Divider}}),Object.defineProperty(e,"Drawer",{enumerable:!0,get:function(){return n.Drawer}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return n.Dropdown}}),Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return n.Empty}}),Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return n.Grid}}),Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return n.Image}}),Object.defineProperty(e,"Layout",{enumerable:!0,get:function(){return n.Layout}}),Object.defineProperty(e,"List",{enumerable:!0,get:function(){return n.List}}),Object.defineProperty(e,"Mentions",{enumerable:!0,get:function(){return n.Mentions}}),Object.defineProperty(e,"Menu",{enumerable:!0,get:function(){return n.Menu}}),Object.defineProperty(e,"PageHeader",{enumerable:!0,get:function(){return n.PageHeader}}),Object.defineProperty(e,"Popconfirm",{enumerable:!0,get:function(){return n.Popconfirm}}),Object.defineProperty(e,"Popover",{enumerable:!0,get:function(){return n.Popover}}),Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return n.Progress}}),Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return n.Radio}}),Object.defineProperty(e,"Rate",{enumerable:!0,get:function(){return n.Rate}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return n.Result}}),Object.defineProperty(e,"Row",{enumerable:!0,get:function(){return n.Row}}),Object.defineProperty(e,"Segmented",{enumerable:!0,get:function(){return n.Segmented}}),Object.defineProperty(e,"Skeleton",{enumerable:!0,get:function(){return n.Skeleton}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return n.Slider}}),Object.defineProperty(e,"Space",{enumerable:!0,get:function(){return n.Space}}),Object.defineProperty(e,"Spin",{enumerable:!0,get:function(){return n.Spin}}),Object.defineProperty(e,"Statistic",{enumerable:!0,get:function(){return n.Statistic}}),Object.defineProperty(e,"Steps",{enumerable:!0,get:function(){return n.Steps}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return n.Switch}}),Object.defineProperty(e,"Tag",{enumerable:!0,get:function(){return n.Tag}}),Object.defineProperty(e,"Timeline",{enumerable:!0,get:function(){return n.Timeline}}),Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return n.Tooltip}}),Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return n.Transfer}}),Object.defineProperty(e,"Typography",{enumerable:!0,get:function(){return n.Typography}}),Object.defineProperty(e,"Upload",{enumerable:!0,get:function(){return n.Upload}}),Object.defineProperty(e,"message",{enumerable:!0,get:function(){return n.message}}),Object.defineProperty(e,"notification",{enumerable:!0,get:function(){return n.notification}}),e.AppLayout=Mo,e.AppLayoutHeader=Bo,e.AppLayoutSider=Zo,e.Button=R,e.Calendar=Y,e.Container=to,e.DatePicker=X,e.Descriptions=rs,e.DetailList=Ao,e.DynamicSetting=_i,e.Footer=ro,e.Form=Ui,e.FormItem=$i,e.Icon=yn,e.Input=M,e.InputNumber=F,e.Login=se,e.Modal=Po,e.OperationBtn=Go,e.Pagination=io,e.ProtectedRoute=function(e){var n=e.hasAuth,r=void 0===n||n,o=e.element,a=e.backLogin;return i.getToken()?r?o:t.jsx("div",{children:"您没有权限访问当前页面!"}):(console.log("当前页面需要登录! 请登录成功后再进行访问!"),a())},e.Select=Yo,e.SuspenseComponent=function(e){var n=e.children;return t.jsx(r.Suspense,O({fallback:t.jsx("div",{children:"loading..."})},{children:n}))},e.Table=ko,e.Tabs=jo,e.TimePicker=J,e.Title=is,e.Tree=ns,e.TreeSelect=Qa,e.UploadList=Ya,e.ZtxkContext=Q}));
|
|
20
|
+
*/;var ka=Ea,ja=function(e,t){if(!Ia.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&Oa&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r};function Na(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1==e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Na.getEventType=function(){return ka.firefox()?"DOMMouseScroll":ja("wheel")?"wheel":"mousewheel"};var Pa=k(Na);function Aa(e,t,n,r,i){void 0===i&&(i=0);var o=Ha(t.width,t.height,i),a=o.width,s=o.height;return{x:Ra(e.x,a,n.width,r),y:Ra(e.y,s,n.height,r)}}function Ra(e,t,n,r){var i=t*r/2-n/2;return Ba(e,-i,i)}function Ma(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function za(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function La(e,t){return Math.min(e,Math.max(0,t))}function _a(e,t){return t}function Fa(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Ha(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Ba(e,t,n){return Math.min(Math.max(e,t),n)}function Ua(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var Ka=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=r.createRef(),n.videoRef=r.createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,r,i,o){var a=Ha(t.width,t.height,n),s=Ba(r.width/a.width*(100/e.width),i,o);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,i=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}else if(n.props.initialCroppedAreaPixels){var o=function(e,t,n,r,i,o){void 0===n&&(n=0);var a=Ha(t.naturalWidth,t.naturalHeight,n),s=Ba(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),i,o),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=o.crop,i=o.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e,t,r,i,o,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var c=n.containerRect.width/n.containerRect.height,l=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/u,f=void 0;if(s.offsetWidth<l||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":f=c>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":f={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":f={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":f=l>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else f={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=O(O({},f),{naturalWidth:l,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,r,i,o){void 0===o&&(o=0);var a=Ha(e,t,o),s=a.width,c=a.height,l=Math.min(s,n),u=Math.min(c,r);return l>u*i?{width:u*i,height:u}:{width:l,height:l/i}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(o=n.state.cropSize)||void 0===o?void 0:o.height)===h.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),i=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var o=n.gestureRotationStart+e.rotation;n.props.onRotationChange(o)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,i=e.x,o=e.y;n.dragStartPosition={x:i,y:o},n.dragStartCrop=O({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,i=r-n.dragStartPosition.y,o={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+i},a=n.props.restrictPosition?Aa(o,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):o;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),i=Pa(e).pixelY,o=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,i=n.props,o=i.crop,a=i.zoom;return{x:(t+o.x)/a,y:(r+o.y)/a}},n.setNewZoom=function(e,t,r){var i=(void 0===r?{}:r).shouldUpdatePosition,o=void 0===i||i;if(n.state.cropSize&&n.props.onZoomChange){var a=Ba(e,n.props.minZoom,n.props.maxZoom);if(o){var s=n.getPointOnContainer(t),c=n.getPointOnMedia(s),l={x:c.x*a-s.x,y:c.y*a-s.y},u=n.props.restrictPosition?Aa(l,n.mediaSize,n.state.cropSize,a,n.props.rotation):l;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,r,i,o,a){void 0===o&&(o=0),void 0===a&&(a=!0);var s=a?La:_a,c=Ha(t.width,t.height,o),l=Ha(t.naturalWidth,t.naturalHeight,o),u={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},d=Math.round(s(l.width,u.width*l.width/100)),f=Math.round(s(l.height,u.height*l.height/100)),h=l.width>=l.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:O(O({},h),{x:Math.round(s(l.width-h.width,u.x*l.width/100)),y:Math.round(s(l.height-h.height,u.y*l.height/100))})}}(n.props.restrictPosition?Aa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?Aa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,i,o,a,s,c,l;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(i=this.props.cropSize)||void 0===i?void 0:i.width)?this.computeSizes():(null===(o=e.crop)||void 0===o?void 0:o.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(l=this.videoRef.current)||void 0===l||l.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=Ma(n,r),this.lastPinchRotation=za(n,r),this.onDragStart(Fa(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),i=t.getTouchPoint(e.touches[1]),o=Fa(r,i);this.onDrag(o),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=Ma(r,i),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,o,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=za(r,i),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,i=t.video,o=t.mediaProps,a=t.transform,s=t.crop,c=s.x,l=s.y,u=t.rotation,d=t.zoom,f=t.cropShape,h=t.showGrid,p=t.style,g=p.containerStyle,m=p.cropAreaStyle,v=p.mediaStyle,y=t.classes,b=y.containerClassName,x=y.cropAreaClassName,w=y.mediaClassName,S=t.objectFit;return r.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:Ua("reactEasyCrop_Container",b)},n?r.createElement("img",O({alt:"",className:Ua("reactEasyCrop_Image","contain"===S&&"reactEasyCrop_Contain","horizontal-cover"===S&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===S&&"reactEasyCrop_Cover_Vertical","auto-cover"===S&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),w)},o,{src:n,ref:this.imageRef,style:O(O({},v),{transform:a||"translate(".concat(c,"px, ").concat(l,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),onLoad:this.onMediaLoad})):i&&r.createElement("video",O({autoPlay:!0,loop:!0,muted:!0,className:Ua("reactEasyCrop_Video","contain"===S&&"reactEasyCrop_Contain","horizontal-cover"===S&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===S&&"reactEasyCrop_Cover_Vertical","auto-cover"===S&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),w)},o,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:O(O({},v),{transform:a||"translate(".concat(c,"px, ").concat(l,"px) rotate(").concat(u,"deg) scale(").concat(d,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return r.createElement("source",O({key:e.src},e))}))),this.state.cropSize&&r.createElement("div",{style:O(O({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Ua("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",h&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(r.Component);const Wa="img-crop",qa=.1,Va=.01,$a=r.forwardRef(((e,n)=>{const{cropperRef:i,zoomSlider:o,rotationSlider:a,aspectSlider:s,showReset:c,resetBtnText:l,modalImage:u,aspect:d,minZoom:f,maxZoom:h,cropShape:p,showGrid:g,cropperProps:m}=e,[v,y]=r.useState(1),[w,S]=r.useState(0),[C,O]=r.useState(d),D=1!==v||0!==w||C!==d,E=()=>{y(1),S(0),O(d)},[T,I]=r.useState({x:0,y:0}),k=r.useRef({width:0,height:0,x:0,y:0}),j=r.useCallback(((e,t)=>{k.current=t}),[]);r.useImperativeHandle(n,(()=>({rotation:w,cropPixelsRef:k,onReset:E})));const N="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",P="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",A="[flex:1]";return t.jsxs(t.Fragment,{children:[t.jsx(Ka,Object.assign({},m,{ref:i,image:u,crop:T,zoom:v,rotation:w,aspect:C,minZoom:f,maxZoom:h,zoomWithScroll:o,cropShape:p,showGrid:g,onCropChange:I,onZoomChange:y,onRotationChange:S,onCropComplete:j,classes:{containerClassName:`${Wa}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${Wa}-media`}})),o&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-zoom ${N}`},{children:[t.jsx("button",Object.assign({className:P,onClick:()=>y(v-qa),disabled:v-qa<f},{children:"-"})),t.jsx(x,{className:A,min:f,max:h,step:qa,value:v,onChange:y}),t.jsx("button",Object.assign({className:P,onClick:()=>y(v+qa),disabled:v+qa>h},{children:"+"}))]})),a&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-rotation ${N}`},{children:[t.jsx("button",Object.assign({className:`${P} [font-size:16px]`,onClick:()=>S(w-1),disabled:-180===w},{children:"↺"})),t.jsx(x,{className:A,min:-180,max:180,step:1,value:w,onChange:S}),t.jsx("button",Object.assign({className:`${P} [font-size:16px]`,onClick:()=>S(w+1),disabled:180===w},{children:"↻"}))]})),s&&t.jsxs("section",Object.assign({className:`${Wa}-control ${Wa}-control-aspect ${N}`},{children:[t.jsx("button",Object.assign({className:P,onClick:()=>O(C-Va),disabled:C-Va<.5},{children:"↕️"})),t.jsx(x,{className:A,min:.5,max:2,step:Va,value:C,onChange:O}),t.jsx("button",Object.assign({className:P,onClick:()=>O(C+Va),disabled:C+Va>2},{children:"↔️"}))]})),c&&(o||a||s)&&t.jsx(b,Object.assign({className:"[bottom:20px] [position:absolute]",style:D?{}:{opacity:.3,pointerEvents:"none"},onClick:E},{children:l}))]})}));var Za=r.memo($a);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.grid{display:grid}.\\!\\[position\\:relative\\]{position:relative!important}.\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.disabled\\:\\[cursor\\:default\\]:disabled{cursor:default}.disabled\\:\\[opacity\\:20\\%\\]:disabled{opacity:20%}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]~section:first-of-type{margin-top:16px}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]~section:last-of-type{margin-bottom:16px}");const Ga=-1===((e,t)=>{const n=na(e),r=na(t),i=n.pop(),o=r.pop(),a=aa(n,r);return 0!==a?a:i&&o?aa(i.split("."),o.split(".")):i||o?i?-1:1:0})(n.version,"4.23.0")?"visible":"open",Xa=(e,t,n)=>t in e?(console.error(`\`${t}\` is deprecated, please use \`${n}\` instead`),e[t]):e[n],Ya=r.forwardRef(((e,n)=>{const{quality:i=.4,fillColor:o="white",zoomSlider:a=!0,rotationSlider:s=!1,aspectSlider:c=!1,showReset:l=!1,resetText:u,aspect:d=1,minZoom:f=1,maxZoom:h=3,cropShape:p="rect",showGrid:g=!1,cropperProps:m,modalClassName:b,modalTitle:x,modalWidth:w,modalOk:S,modalCancel:C,onModalOk:O,onModalCancel:T,modalProps:I,beforeCrop:k,children:j}=e,N=Xa(e,"zoom","zoomSlider")||!0,P=Xa(e,"rotate","rotationSlider")||!1,A=Xa(e,"shape","cropShape")||"rect",R=Xa(e,"grid","showGrid")||!1;"onUploadFail"in e&&console.error("`onUploadFail` is removed, because the only way it is called, is when the file is rejected by beforeUpload"),Xa(e,"modalMaskTransitionName","modalProps.maskTransitionName"),Xa(e,"modalTransitionName","modalProps.transitionName");const M=r.useRef({});M.current.onModalOk=O,M.current.onModalCancel=T,M.current.beforeCrop=k;const z=r.useRef(null),L=r.useCallback((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),i=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${Wa}-media`),{width:a,height:s,x:c,y:l}=z.current.cropPixelsRef.current;if(P&&0!==z.current.rotation){const{naturalWidth:e,naturalHeight:t}=i,u=z.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),f=Math.abs(Math.cos(u)),h=e*f+t*d,p=t*f+e*d;n.width=h,n.height=p,r.fillStyle=o,r.fillRect(0,0,h,p);const g=h/2,m=p/2;r.translate(g,m),r.rotate(u),r.translate(-g,-m);const v=(h-e)/2,y=(p-t)/2;r.drawImage(i,0,0,e,t,v,y,e,t);const b=r.getImageData(0,0,h,p);n.width=a,n.height=s,r.putImageData(b,-c,-l)}else n.width=a,n.height=s,r.fillStyle=o,r.fillRect(0,0,a,s),r.drawImage(i,c,l,a,s,0,0,a,s);return n}),[o,P]),[_,F]=r.useState(""),H=r.useRef(),B=r.useRef(),U=r.useMemo((()=>{const e=Array.isArray(j)?j[0]:j,t=e.props,{beforeUpload:n,accept:r}=t,o=D(t,["beforeUpload","accept"]);return Object.assign(Object.assign({},e),{props:Object.assign(Object.assign({},o),{accept:r||"image/*",beforeUpload:(e,t)=>new Promise((r=>E(void 0,void 0,void 0,(function*(){if("function"==typeof M.current.beforeCrop)try{const n=yield M.current.beforeCrop(e,t);if(!0!==n)return r(n)}catch(e){return r(e)}const o=new FileReader;o.addEventListener("load",(()=>{"string"==typeof o.result&&F(o.result)})),o.readAsDataURL(e),H.current=()=>{var e,t;F(""),z.current.onReset(),r(y.LIST_IGNORE),null===(t=(e=M.current).onModalCancel)||void 0===t||t.call(e)},B.current=t=>E(void 0,void 0,void 0,(function*(){F(""),z.current.onReset();const o=L(t.target),{type:a,name:s,uid:c}=e;o.toBlob((e=>E(void 0,void 0,void 0,(function*(){var t,i,o,l,u,d;const f=new File([e],s,{type:a});if(Object.assign(f,{uid:c}),"function"!=typeof n)return r(f),void(null===(i=(t=M.current).onModalOk)||void 0===i||i.call(t,f));try{const e=yield n(f,[f]),t=!0===e?f:e;r(t),null===(l=(o=M.current).onModalOk)||void 0===l||l.call(o,t)}catch(e){r(e),null===(d=(u=M.current).onModalOk)||void 0===d||d.call(u,e)}}))),a,i)}))}))))})})}),[j,L,i]),K=r.useMemo((()=>{const e={};return void 0!==w&&(e.width=w),void 0!==S&&(e.okText=S),void 0!==C&&(e.cancelText=C),e}),[C,S,w]),W=`${Wa}-modal${b?` ${b}`:""}`,q="zh-CN"===("undefined"==typeof window?"":window.navigator.language),V=x||(q?"编辑图片":"Edit image"),$=u||(q?"重置":"Reset");return t.jsxs(t.Fragment,{children:[U,_&&t.jsx(v,Object.assign({},I,K,{[Ga]:!0},{title:V,onCancel:H.current,onOk:B.current,wrapClassName:W,maskClosable:!1,destroyOnClose:!0},{children:t.jsx(Za,{ref:z,cropperRef:n,zoomSlider:N,rotationSlider:P,aspectSlider:c,showReset:l,resetBtnText:$,modalImage:_,aspect:d,minZoom:f,maxZoom:h,cropShape:A,showGrid:R,cropperProps:m})}))]})}));var Ja=r.memo(r.forwardRef((function(e,o){var a=e.children,s=e.btnText,c=e.className,l=e.showTip,u=void 0===l||l,d=e.maxSize,f=void 0===d?104857600:d,h=e.showTable,p=e.acceptList,g=e.beforeUpload,v=e.onChange,y=e.API_BASEURL,b=void 0===y?"":y,x=e.FILE_API_BASEURL,w=void 0===x?"":x,S=e.action,C=e.headers,I=e.data,k=e.userName,j=e.fileList,P=e.isPublic,A=e.maxPreviewSize,M=e.isPreview,z=e.isDownload,L=e.isDelete,_=e.zipName,F=void 0===_?"批量下载-".concat(Date.now(),".zip"):_,H=e.isImage,B=D(e,["children","btnText","className","showTip","maxSize","showTable","acceptList","beforeUpload","onChange","API_BASEURL","FILE_API_BASEURL","action","headers","data","userName","fileList","isPublic","maxPreviewSize","isPreview","isDownload","isDelete","zipName","isImage"]),U=B.maxCount,K=B.listType,W=B.method,q=N("ztxk-upload",c,{}),V=i.formatUnit(f),$=r.useRef({}),Z=r.useRef({}),G=r.useState(),X=G[0],Y=G[1],J=function(e){var t=e.acceptList,o=e.maxSize,a=e.maxSizeStr,s=e.beforeUpload,c=e.isImage;return r.useCallback((function(e,r){var l=e.name,u=e.size,d=i.getFileExtension(l)[1];if(s){var f=s(e,r);if(f)return f}if(0===u)return n.message.warning("不能上传空文件!"),Ja.LIST_IGNORE;if(c&&!i.isImageExtension(d))return n.message.warning("不能上传非图片格式的文件!"),Ja.LIST_IGNORE;var h=t||[];return h.length>0&&!h.includes(d)||0===h.length&&Qo.includes(d)?(n.message.warning("不支持 ".concat(d," 文件格式")),Ja.LIST_IGNORE):o&&u>o?(n.message.warning("文件超出 ".concat(a,"!")),Ja.LIST_IGNORE):Promise.resolve(e)}),[t,o,a,s,c])}({acceptList:p,maxSize:f,maxSizeStr:V,beforeUpload:g,isImage:H}),Q=function(e){var t=e.onChange,n=e.userName,i=e.fileList,o=r.useState(),a=o[0],s=o[1];r.useEffect((function(){i&&s(i)}),[i]);var c=r.useCallback((function(e){var r,i,o,a,c=e.file,l=e.fileList,u=O({attachId:null===(i=null===(r=null==c?void 0:c.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.attachId,attachName:(null==c?void 0:c.name)?null==c?void 0:c.name:null===(a=null===(o=null==c?void 0:c.response)||void 0===o?void 0:o.data)||void 0===a?void 0:a.originalName,attachSize:null==c?void 0:c.size,uploadTime:Date.now(),uploadUser:n},c),d=l.map((function(e){var t,r,i=e.size,o=e.name,a=e.response;return O({attachId:null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.attachId,attachName:o||(null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.originalName),attachSize:i,uploadTime:Date.now(),uploadUser:n},e)}));if(m.flushSync((function(){s(d)})),t&&t({file:u,fileList:d}),d.every((function(e){return"done"===e.status||"error"===e.status}))){var f=l.filter((function(e){return"done"===e.status})),h=l.filter((function(e){return"error"===e.status}));t&&t({file:u,fileList:d,isComplete:!0,successFileList:f,errorFileList:h})}else t&&t({file:u,fileList:d})}),[t,n]);return{innerFileList:a,setInnerFileList:function(e){if(s(e),"function"==typeof e){var n=e(a);t&&t({file:null,fileList:n})}else t&&t({file:null,fileList:e})},onChangeHandle:c}}({onChange:v,userName:k,fileList:j}),ee=Q.onChangeHandle,te=Q.innerFileList,ne=Q.setInnerFileList,re=function(e){var t=e.action,n=e.API_BASEURL,o=void 0===n?"":n,a=e.headers,s=e.data,c=e.isPublic;return{fileAction:t||i.createUploadFileLink({API_BASEURL:o}),fileHeaders:r.useMemo((function(){return O({"Zmdms-Auth":i.getToken()||""},a)}),[a]),fileData:r.useMemo((function(){var e=O({},s);return c&&(e.isAuth="2"),e}),[s,c])}}({action:S,API_BASEURL:b,headers:C,data:I,isPublic:P}),ie=re.fileAction,oe=re.fileHeaders,ae=re.fileData,se=function(e){var t=e.fileList,n=e.userName;return r.useMemo((function(){return null==t?void 0:t.map((function(e,t){var r,i,o,a=e.uid,s=e.size,c=e.name,l=e.attachId,u=e.attachName,d=e.attachSize,f=e.uploadTime,h=e.uploadUser,p=e.response;return O({attachId:l||(null===(r=null==p?void 0:p.data)||void 0===r?void 0:r.attachId),attachName:u||c||(null===(i=null==p?void 0:p.data)||void 0===i?void 0:i.originalName),attachSize:d||s,uploadTime:f||Date.now(),uploadUser:h||n,uid:a||l||(null===(o=null==p?void 0:p.data)||void 0===o?void 0:o.attachId)||"index",percent:100,status:"done"},e)}))}),[t,n])}({fileList:te,userName:k}),ce=t.jsx(n.Upload,O({showUploadList:!1,multiple:!0,beforeUpload:J,onChange:ee,action:ie,headers:oe,data:ae,fileList:te,onPreview:function(e){var t=i.createDownloadLink(e.attachId,{API_BASEURL:b,open:P});Y(t),Z.current.open()}},B,{children:a||(K&&"text"!==K?H&&U&&te&&te.length>=U?null:t.jsxs("div",O({className:"ztxk-upload--picture"},{children:[t.jsx(on,{style:{fontSize:18}}),t.jsx("div",O({style:{marginTop:8}},{children:s||"添加图片"}))]})):t.jsxs(R,O({type:"primary",icon:t.jsx(on,{})},{children:[s||"添加附件",U?"(最多上传".concat(U,"个文件)"):""]})))}));return r.useImperativeHandle(o,(function(){return{getData:function(){var e=te.filter((function(e){return"done"===e.status})),t=te.filter((function(e){return"error"===e.status}));return{fileList:te,successFileList:e,errorFileList:t}}}})),t.jsxs("div",O({className:q},{children:[M?null:t.jsxs(t.Fragment,{children:[H?t.jsx(Ya,O({rotationSlider:!0,showReset:!0,quality:.8,modalClassName:"ztxk-upload-imgcrop"},{children:ce})):ce,u?t.jsxs("span",O({className:"ztxk-upload--tips"},{children:["(单个附件最大支持",V,")"]})):""]}),L&&!M?t.jsx(n.Popconfirm,O({title:"是否删除选中附件?",cancelText:"否",okText:"是",onConfirm:function(){return function(){var e,t,r,i=null===(t=null===(e=$.current)||void 0===e?void 0:e.getChecked)||void 0===t?void 0:t.call(e);i&&0!==i.length?(ne((function(e){return e.filter((function(e){return!i.find((function(t){return t.uid===e.uid}))}))})),null===(r=$.current)||void 0===r||r.setChecked([])):n.message.info("请选择需要操作的数据!")}()}},{children:t.jsx(R,O({type:"primary"},{children:"批量删除"}))})):null,z?t.jsx(n.Dropdown,O({menu:{items:[{label:"压缩",key:"compress"},{label:"不压缩",key:"noCompress"}],onClick:function(e){var t;t=e.key,E(void 0,void 0,void 0,(function(){var e,r,o,a,s,c;return T(this,(function(l){switch(l.label){case 0:if(!(e=null===(o=null===(r=$.current)||void 0===r?void 0:r.getChecked)||void 0===o?void 0:o.call(r))||0===e.length)return n.message.info("请选择需要操作的数据!"),[2];if(null===(a=$.current)||void 0===a||a.setLoading(!0),"compress"!==t)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,i.batchDownloadFiles(e,{API_BASEURL:b,zipName:F})];case 2:return l.sent(),null===(s=$.current)||void 0===s||s.setLoading(!1),[3,4];case 3:return l.sent(),null===(c=$.current)||void 0===c||c.setLoading(!1),[3,4];case 4:return[3,6];case 5:e.forEach((function(e){i.downloadFile(null==e?void 0:e.attachId,null==e?void 0:e.attachName,{API_BASEURL:b,open:P}).then((function(e){var t;null===(t=$.current)||void 0===t||t.setLoading(!1)})).catch((function(e){var t;null===(t=$.current)||void 0===t||t.setLoading(!1)}))})),l.label=6;case 6:return[2]}}))}))}},placement:"bottomLeft"},{children:t.jsx(R,O({type:"primary"},{children:"批量下载"}))})):null,h?t.jsx(ea,{dataSource:se,action:ie,headers:oe,data:ae,method:W,setInnerFileList:ne,isPublic:P,API_BASEURL:b,FILE_API_BASEURL:w,maxPreviewSize:A,isPreview:M,isDelete:L,isDownload:z,ref:$}):null,H&&t.jsx(Po,O({ref:Z,footer:null,width:"520px"},{children:t.jsx("div",O({style:{textAlign:"center"}},{children:t.jsx("img",{src:X,alt:"预览",style:{maxWidth:"400px",maxHeight:"400px"}})}))}))]}))})));function Qa(e,t,n,r){var i,o={};return e?o=e(t):((i={})[n]=t[n],i[r]=t[r],o=i),o}Ja.displayName="ZTXK_WEBUI_UploadList",Ja.Dragger=n.Upload.Dragger,Ja.LIST_IGNORE=n.Upload.LIST_IGNORE;var es=r.memo(r.forwardRef((function(e,i){var o=e.onChange,a=e.isAllData,s=e.dataHandle,c=D(e,["onChange","isAllData","dataHandle"]),l=c.treeData,u=c.fieldNames,d=c.treeNodeLabelProp,f=c.loadData,h=c.treeDataSimpleMode,p=function(e){var t=e.fieldNames,n=e.treeNodeLabelProp,i=void 0===n?"title":n;return{valueKey:r.useMemo((function(){return(null==t?void 0:t.value)||"value"}),[null==t?void 0:t.value]),labelKey:r.useMemo((function(){return(null==t?void 0:t.label)||"label"}),[null==t?void 0:t.label]),childrenKey:r.useMemo((function(){return(null==t?void 0:t.children)||"children"}),[null==t?void 0:t.children]),titleKey:r.useMemo((function(){return i}),[i])}}({fieldNames:u,treeNodeLabelProp:d}),g=function(e){var t=e.dataHandle,n=e.treeData,i=e.isAllData,o=e.valueKey,a=e.titleKey,s=e.childrenKey,c=e.treeDataSimpleMode,l=r.useRef({}),u=r.useRef(0),d=r.useCallback((function(e,t){return(e||[]).map((function(e){var n=e[o],r=e[s],i=l.current[n]=O({parent:t,valueKey:n},e);return i[s]=d(r,i),i}))}),[o,s]);return r.useEffect((function(){i&&n&&(d(u.current?n.slice(u.current):n),c&&(u.current=n.length))}),[n,i,d,c]),{getPath:r.useCallback((function(e){if(Array.isArray(e)){for(var n=[],r=0;r<e.length;r++){var i=e[r],s="object"==typeof i?i[o]:i,u=l.current[s],d=Qa(t,u,o,a);n.push(d)}return n}s="object"==typeof e?e[o]:e;var f=[];for(u=l.current[s];u;){d=Qa(t,u,o,a),f.unshift(d);var h=u.pId;u=c?l.current[h]:u.parent}return f}),[t,o,a,c])}}({dataHandle:s,treeData:l,isAllData:a,valueKey:p.valueKey,labelKey:p.labelKey,childrenKey:p.childrenKey,titleKey:p.titleKey,loadData:f,treeDataSimpleMode:h}).getPath,m=function(e){var t=e.onChange,n=e.isAllData,i=e.getPath;return{onChangeHandle:r.useCallback((function(e,r,o){if(n){var a=i(e);t&&t(e,r,o,a)}else t&&t(e,r,o)}),[n,t,i])}}({onChange:o,isAllData:a,getPath:g}).onChangeHandle;return t.jsx(n.TreeSelect,O({onChange:m,showCheckedStrategy:n.TreeSelect.SHOW_ALL,maxTagCount:3},c))})));function ts(e){var t=e.searchType,n=e.treeData,i=e.childrenKey;return{flatDataList:r.useMemo((function(){if("all"===t)return function(e,t){var n=(t||{}).childrenKey,r=void 0===n?"chidlren":n,i=[];if(Array.isArray(e))for(var o=e.slice(),a=function(){var e=o.shift();if(e){e[r]&&Array.isArray(e[r])&&o.push.apply(o,e[r]);var t={};Object.keys(e).forEach((function(n){n!==r&&(t[n]=e[n])})),i.push(t)}};o.length;)a();return i}(n,{childrenKey:i})}),[t,n,i])}}es.displayName="ZTXK_WEBUI_TreeSelect",es.SHOW_ALL=n.TreeSelect.SHOW_ALL,es.SHOW_CHILD=n.TreeSelect.SHOW_CHILD,es.SHOW_PARENT=n.TreeSelect.SHOW_PARENT,es.TreeNode=n.TreeSelect.TreeNode;var ns=function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.children&&(i.children.some((function(t){return t.key===e}))?n=i.key:ns(e,i.children)&&(n=ns(e,i.children)))}return n};var rs=r.memo(r.forwardRef((function(e,i){var o=e.searchType,a=e.onSearch,s=e.className,c=D(e,["searchType","onSearch","className"]),l=c.treeData,u=c.fieldNames,d=N("ztxk-tree",s,{}),f=function(e){var t=e.fieldNames;return{valueKey:r.useMemo((function(){return(null==t?void 0:t.key)||"key"}),[null==t?void 0:t.key]),titleKey:r.useMemo((function(){return(null==t?void 0:t.title)||"title"}),[null==t?void 0:t.title]),childrenKey:r.useMemo((function(){return(null==t?void 0:t.children)||"children"}),[null==t?void 0:t.children])}}({fieldNames:u}),h=f.valueKey,p=f.titleKey,g=function(e){var t=e.flatDataList,n=e.treeData,i=e.onSearch,o=e.titleKey,a=e.valueKey,s=e.searchType,c=r.useState(),l=c[0],u=c[1],d=r.useState(),f=d[0],h=d[1],p=r.useCallback((function(e){u(e),h(!1)}),[]);return{onSearchHandle:r.useCallback((function(e){if("lazy"!==s){if(n){var r=t.map((function(t){return t[o].indexOf(e)>-1?ns(t[a],n):null})).filter((function(e,t,n){return e&&n.indexOf(e)===t}));r.length>0&&(u(r),h(!0))}}else i&&i(e)}),[t,o,a,n,i,s]),onExpand:p,expandedKeys:l,autoExpandParent:f}}({treeData:l,flatDataList:ts({searchType:o,treeData:l,valueKey:h,childrenKey:f.childrenKey,titleKey:p}).flatDataList,titleKey:p,valueKey:h,searchType:o,onSearch:a}),m=g.onSearchHandle,v=g.expandedKeys,y=g.autoExpandParent,b=g.onExpand;return t.jsxs("div",O({className:d},{children:[o?t.jsx(M.Search,{onSearch:m}):null,t.jsx(n.Tree,O({expandedKeys:v,autoExpandParent:y,onExpand:b},c))]}))})));rs.displayName="ZTXK_WEBUI_Tree",rs.DirectoryTree=n.Tree.DirectoryTree,rs.TreeNode=n.Tree.TreeNode;var is=function(e){var r=e.className,i=D(e,["className"]),o=N("ztxk-descriptions",r,{});return t.jsx(n.Descriptions,O({column:3,size:"middle",className:o},i))};is.displayName="ZTXK_WEBUI_Descriptions",is.Item=n.Descriptions.Item;var os=function(e){var n=e.title,r=e.className,i=e.bordered,o=e.showBg,a=e.justifyContent,s=void 0===a?"space-between":a,c=e.children,l=N("ztxk-title",r,{"ztxk-title--bordered":i,"ztxk-title--background":o});return t.jsxs("div",O({className:l,style:{justifyContent:s}},{children:[t.jsx("div",O({className:"ztxk-title--title"},{children:n})),t.jsx("div",O({className:"ztxk-title--extra"},{children:c}))]}))};os.displayName="ZTXK_WEBUI_Title";var as=r.createContext({});Object.defineProperty(e,"Affix",{enumerable:!0,get:function(){return n.Affix}}),Object.defineProperty(e,"Alert",{enumerable:!0,get:function(){return n.Alert}}),Object.defineProperty(e,"Anchor",{enumerable:!0,get:function(){return n.Anchor}}),Object.defineProperty(e,"AutoComplete",{enumerable:!0,get:function(){return n.AutoComplete}}),Object.defineProperty(e,"Avatar",{enumerable:!0,get:function(){return n.Avatar}}),Object.defineProperty(e,"BackTop",{enumerable:!0,get:function(){return n.BackTop}}),Object.defineProperty(e,"Badge",{enumerable:!0,get:function(){return n.Badge}}),Object.defineProperty(e,"Breadcrumb",{enumerable:!0,get:function(){return n.Breadcrumb}}),Object.defineProperty(e,"Card",{enumerable:!0,get:function(){return n.Card}}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return n.Carousel}}),Object.defineProperty(e,"Cascader",{enumerable:!0,get:function(){return n.Cascader}}),Object.defineProperty(e,"Checkbox",{enumerable:!0,get:function(){return n.Checkbox}}),Object.defineProperty(e,"Col",{enumerable:!0,get:function(){return n.Col}}),Object.defineProperty(e,"Collapse",{enumerable:!0,get:function(){return n.Collapse}}),Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return n.Comment}}),Object.defineProperty(e,"ConfigProvider",{enumerable:!0,get:function(){return n.ConfigProvider}}),Object.defineProperty(e,"Divider",{enumerable:!0,get:function(){return n.Divider}}),Object.defineProperty(e,"Drawer",{enumerable:!0,get:function(){return n.Drawer}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return n.Dropdown}}),Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return n.Empty}}),Object.defineProperty(e,"Grid",{enumerable:!0,get:function(){return n.Grid}}),Object.defineProperty(e,"Image",{enumerable:!0,get:function(){return n.Image}}),Object.defineProperty(e,"Layout",{enumerable:!0,get:function(){return n.Layout}}),Object.defineProperty(e,"List",{enumerable:!0,get:function(){return n.List}}),Object.defineProperty(e,"Mentions",{enumerable:!0,get:function(){return n.Mentions}}),Object.defineProperty(e,"Menu",{enumerable:!0,get:function(){return n.Menu}}),Object.defineProperty(e,"PageHeader",{enumerable:!0,get:function(){return n.PageHeader}}),Object.defineProperty(e,"Popconfirm",{enumerable:!0,get:function(){return n.Popconfirm}}),Object.defineProperty(e,"Popover",{enumerable:!0,get:function(){return n.Popover}}),Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return n.Progress}}),Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return n.Radio}}),Object.defineProperty(e,"Rate",{enumerable:!0,get:function(){return n.Rate}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return n.Result}}),Object.defineProperty(e,"Row",{enumerable:!0,get:function(){return n.Row}}),Object.defineProperty(e,"Segmented",{enumerable:!0,get:function(){return n.Segmented}}),Object.defineProperty(e,"Skeleton",{enumerable:!0,get:function(){return n.Skeleton}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return n.Slider}}),Object.defineProperty(e,"Space",{enumerable:!0,get:function(){return n.Space}}),Object.defineProperty(e,"Spin",{enumerable:!0,get:function(){return n.Spin}}),Object.defineProperty(e,"Statistic",{enumerable:!0,get:function(){return n.Statistic}}),Object.defineProperty(e,"Steps",{enumerable:!0,get:function(){return n.Steps}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return n.Switch}}),Object.defineProperty(e,"Tag",{enumerable:!0,get:function(){return n.Tag}}),Object.defineProperty(e,"Timeline",{enumerable:!0,get:function(){return n.Timeline}}),Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return n.Tooltip}}),Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return n.Transfer}}),Object.defineProperty(e,"Typography",{enumerable:!0,get:function(){return n.Typography}}),Object.defineProperty(e,"Upload",{enumerable:!0,get:function(){return n.Upload}}),Object.defineProperty(e,"message",{enumerable:!0,get:function(){return n.message}}),Object.defineProperty(e,"notification",{enumerable:!0,get:function(){return n.notification}}),e.AppLayout=Mo,e.AppLayoutHeader=Bo,e.AppLayoutSider=Go,e.Button=R,e.Calendar=Y,e.Container=to,e.DatePicker=X,e.Descriptions=is,e.DetailList=Ao,e.DynamicSetting=_i,e.Footer=ro,e.Form=Ui,e.FormItem=$i,e.Icon=yn,e.Input=M,e.InputNumber=F,e.LayoutContext=as,e.Login=se,e.Modal=Po,e.OperationBtn=Xo,e.Pagination=io,e.ProtectedRoute=function(e){var n=e.hasAuth,r=void 0===n||n,o=e.element,a=e.backLogin;return i.getToken()?r?o:t.jsx("div",{children:"您没有权限访问当前页面!"}):(console.log("当前页面需要登录! 请登录成功后再进行访问!"),a())},e.Select=Jo,e.SuspenseComponent=function(e){var n=e.children;return t.jsx(r.Suspense,O({fallback:t.jsx("div",{children:"loading..."})},{children:n}))},e.Table=ko,e.Tabs=jo,e.TimePicker=J,e.Title=os,e.Tree=rs,e.TreeSelect=es,e.UploadList=Ja,e.ZtxkContext=Q}));
|