@mingfuyun/star-allinone 0.0.7 → 0.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../components/MFTablePro/components/TableActions/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;CACnC;AAED,UAAU,iBAAiB,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAC9B,MAAM,EACN,OAAO,EACP,OAAc,EACd,QAAY,GACb,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAgFtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../components/MFTablePro/components/TableActions/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAClD,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC;CACnC;AAED,UAAU,iBAAiB,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAC9B,MAAM,EACN,OAAO,EACP,OAAc,EACd,QAAY,GACb,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAkFtB"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ant-design/icons"),require("@ant-design/pro-components"),function(){try{return require("@umijs/max")}catch(e){}}(),require("antd"),require("react"),require("react-dom"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["@ant-design/icons","@ant-design/pro-components","@umijs/max","antd","react","react-dom","react/jsx-runtime"],t):"object"==typeof exports?exports.MFYAllInOne=t(require("@ant-design/icons"),require("@ant-design/pro-components"),function(){try{return require("@umijs/max")}catch(e){}}(),require("antd"),require("react"),require("react-dom"),require("react/jsx-runtime")):e.MFYAllInOne=t(e["@ant-design/icons"],e["@ant-design/pro-components"],e["@umijs/max"],e.antd,e.React,e.ReactDOM,e["react/jsx-runtime"])}(this,(e,t,n,r,o,i,a)=>(()=>{"use strict";var l=[,(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(2),o=n(3),i=n(4),a=n(5),l=n(6),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},c=["minute","hour","day","month","week"],u={display:"block",lineHeight:2};const d=(0,a.forwardRef)(function(e,t){var n=e.cronExpression,d=(0,a.useState)(""),f=d[0],h=d[1],v=(0,a.useState)({minute:1,hour:1,day:1,month:1,week:1}),p=v[0],g=v[1],m=(0,a.useState)({minute:{min:1,max:2},hour:{min:0,max:1},day:{min:1,max:2},month:{min:1,max:2},week:{min:2,max:3}}),b=m[0],y=m[1],x=(0,a.useState)({minute:{start:0,end:1},hour:{start:0,end:1},day:{start:1,end:1},month:{start:1,end:1},week:{start:1,end:1}}),w=x[0],C=x[1],S=(0,a.useState)({minute:[],hour:[],day:[],month:[],week:[]}),R=S[0],E=S[1],k=(0,a.useRef)(null),j=(0,a.useState)(void 0),D=j[0],O=j[1],N=function(e,t){switch(e){case"minute":return{minute:t};case"hour":return{hour:t};case"day":return{day:t};case"month":return{month:t};case"week":return{week:t};default:return{}}},I=function(){return f},M=function(){g({minute:1,hour:1,day:1,month:1,week:1}),y({minute:{min:1,max:2},hour:{min:0,max:1},day:{min:1,max:2},month:{min:1,max:2},week:{min:2,max:3}}),C({minute:{start:0,end:1},hour:{start:0,end:1},day:{start:1,end:1},month:{start:1,end:1},week:{start:1,end:1}}),E({minute:[],hour:[],day:[],month:[],week:[]}),h("")},T=function(e,t){for(var n=[],r=e;r<=t;r++)n.push({label:r,value:r});return n},A=function(e){for(var t=[],n=["","一","二","三","四","五","六","日"],r=1;r<=e;r++)t.push({label:"星期".concat(n[r]),value:r+1===8?1:r+1});return t},P=function(e,t){switch(t){case"week":g(s(s(s({},p),{day:2}),N(t,e.target.value)));break;case"day":g(s(s(s({},p),{week:2}),N(t,e.target.value)));break;default:g(s(s({},p),N(t,e.target.value)))}},L=function(e,t,n){var r,o;n(s(s({},R),((r={})[t]=e,r))),g(s(s({},p),((o={})[t]="point",o)))},z=function(e,t,n){var r=b;r[t]="max"===n?{max:e,min:r[t].min}:{max:r[t].max,min:e},y(s(s({},b),N(t,r[t])))},B=function(e,t,n){var r=w;r[t]="start"===n?{start:e,end:r[t].end}:{start:r[t].start,end:e},C(s(s({},w),N(t,r[t])))};return(0,a.useEffect)(function(){n?function(e){h(e);var t=e.split(" "),n={},r={},o={},i={};t.forEach(function(e,t){if(-1!==e.indexOf("/")&&-1!==e.indexOf("-")){n[c[t]]="loop";var a=e.split("/")[0],l=a.split("-")[0];o[c[t]]={start:"*"===a?0:Number(l),end:Number(e.split("/")[1])}}else-1!==e.indexOf("*")?n[c[t]]="*":-1!==e.indexOf("-")?(n[c[t]]="period",r[c[t]]={min:Number(e.split("-")[0]),max:Number(e.split("-")[1])}):(n[c[t]]="point",i[c[t]]=e.split(",").map(function(e){return Number(e)}))}),y(s(s({},b),r)),C(s(s({},w),o)),E(s(s({},R),i)),g(s(s({},p),n))}(n):M()},[n]),(0,a.useEffect)(function(){!function(){var e={};c.forEach(function(t){return e=s(s({},e),function(e){var t=p[e],n=b[e],r=w[e],o=R[e],i="";switch(t){case"*":default:i="*";break;case"point":for(var a=0,l=o;a<l.length;a++)i=i+l[a]+",";i=i.substring(0,i.length-1);break;case"period":i=n.min+"-"+n.max;break;case"loop":i=r.start+"-"+{minute:59,hour:23,day:31,month:12,week:7}[e]+"/"+r.end}return N(e,i)}(t))});var t=e.minute,n=e.hour,r=e.day,o=e.month,i=e.week;h(t+" "+n+" "+r+" "+o+" "+i)}()},[p,b,w]),(0,a.useImperativeHandle)(t,function(){return{refGetCron:I,resetCronState:M,getValidateStatus:function(){return D}}}),(0,a.useEffect)(function(){var e;!function(e){(0,i.isValidCron)(e)?null==O||O("success"):null==O||O("error")}(f),null===(e=k.current)||void 0===e||e.setFieldsValue({cronText:f})},[f]),(0,r.jsxs)("div",{className:l.default.cronCom,children:[(0,r.jsx)(o.Tabs,{type:"card",items:[{label:"分",key:"minute",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{value:p.minute,onChange:function(e){return P(e,"minute")},children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每分执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:58,value:b.minute.min,onChange:function(e){return z(e,"minute","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:59,value:b.minute.max,onChange:function(e){return z(e,"minute","max")}}),"分"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:58,value:w.minute.start,onChange:function(e){return B(e,"minute","start")}}),"分开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:58,value:w.minute.end,onChange:function(e){return B(e,"minute","end")}}),"分执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.minute,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择分钟",onChange:function(e){return L(e,"minute",E)},options:T(0,59)})})]})]})})},{label:"时",key:"hour",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"hour")},value:p.hour,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每小时执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:22,value:b.hour.min,onChange:function(e){return z(e,"hour","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:23,value:b.hour.max,onChange:function(e){return z(e,"hour","max")}}),"时"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:22,value:w.hour.start,onChange:function(e){return B(e,"hour","start")}}),"时开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:22,value:w.hour.end,onChange:function(e){return B(e,"hour","end")}}),"时执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.hour,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择小时",onChange:function(e){return L(e,"hour",E)},options:T(0,23)})})]})]})})},{label:"日",key:"day",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"day")},value:p.day,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每日执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:30,value:b.day.min,onChange:function(e){return z(e,"day","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:31,value:b.day.max,onChange:function(e){return z(e,"day","max")}}),"日"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:31,value:w.day.start,onChange:function(e){return B(e,"day","start")}}),"日开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:31,value:w.day.end,onChange:function(e){return B(e,"day","end")}}),"日执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.day,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择日期",onChange:function(e){return L(e,"day",E)},options:T(1,31)})})]})]})})},{label:"月",key:"month",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"month")},value:p.month,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每月执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:11,value:b.month.min,onChange:function(e){return z(e,"month","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:12,value:b.month.max,onChange:function(e){return z(e,"month","max")}}),"月"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:12,value:w.month.start,onChange:function(e){return B(e,"month","start")}}),"月开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:12,value:w.month.end,onChange:function(e){return B(e,"month","end")}}),"月执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.month,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择月份",onChange:function(e){return L(e,"month",E)},options:T(1,12)})})]})]})})},{label:"周",key:"week",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"week")},value:p.week,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每周执行"}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Radio,{style:u,value:"period",children:"周期从 周"})}),(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Select,{style:{marginTop:7},allowClear:!0,value:b.week.min,placeholder:"请选择周",onChange:function(e){return z(e,"week","min")},options:A(7)})}),(0,r.jsx)(o.Col,{className:l.default.weekFont,children:"- 周"}),(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Select,{style:{marginTop:7},allowClear:!0,value:b.week.max,placeholder:"请选择周",onChange:function(e){return z(e,"week","max")},options:A(7)})})]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.week,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择周",onChange:function(e){return L(e,"week",E)},options:A(7)})})]})]})})}]}),(0,r.jsx)(o.Form,{className:l.default.cronPreview,ref:k,children:(0,r.jsx)(o.Form.Item,{label:"预览",name:"cronText",className:l.default.cronPreviewItem,hasFeedback:!0,validateStatus:D,children:(0,r.jsx)(o.Input,{readOnly:!0,style:{width:150}})})})]})})},e=>{e.exports=a},e=>{e.exports=r},function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidCron=void 0;var r=function(e){return/^\d+$/.test(e)?Number(e):NaN},o=function(e){return"?"===e},i=function(e,t,n){return e>=t&&e<=n},a=function(e,t,n){return-1===e.search(/[^\d-,\/*]/)&&e.split(",").every(function(e){var o=e.split("/");if(e.trim().endsWith("/"))return!1;if(o.length>2)return!1;var a=o[0],l=o[1];return function(e,t,n){var o=e.split("-");switch(o.length){case 1:return function(e){return"*"===e}(e)||i(r(e),t,n);case 2:var a=o.map(function(e){return r(e)}),l=a[0],s=a[1];return l<=s&&i(l,t,n)&&i(s,t,n);default:return!1}}(a,t,n)&&function(e){return void 0===e||-1===e.search(/[^\d]/)&&r(e)>0}(l)})},l={jan:"1",feb:"2",mar:"3",apr:"4",may:"5",jun:"6",jul:"7",aug:"8",sep:"9",oct:"10",nov:"11",dec:"12"},s={sun:"0",mon:"1",tue:"2",wed:"3",thu:"4",fri:"5",sat:"6"},c={alias:!1,seconds:!1,allowBlankDay:!1,allowSevenAsSunday:!1,allowNthWeekdayOfMonth:!1};t.isValidCron=function(e,t){var u=n(n({},c),t),d=function(e){return e.trim().split(/\s+/)}(e);if(d.length>(u.seconds?6:5)||d.length<5)return!1;var f=[];if(6===d.length){var h=d.shift();h&&f.push(function(e){return a(e,0,59)}(h))}var v=d[0],p=d[1],g=d[2],m=d[3],b=d[4];return f.push(function(e){return a(e,0,59)}(v)),f.push(function(e){return a(e,0,23)}(p)),f.push(function(e,t){return t&&o(e)||a(e,1,31)}(g,u.allowBlankDay)),f.push(function(e,t){if(-1!==e.search(/\/[a-zA-Z]/))return!1;if(t){var n=e.toLowerCase().replace(/[a-z]{3}/g,function(e){return void 0===l[e]?e:l[e]});return a(n,1,12)}return a(e,1,12)}(m,u.alias)),f.push(function(e,t){var n=t.allowBlankDay,l=t.alias,c=t.allowSevenAsSunday,u=t.allowNthWeekdayOfMonth;if(n&&o(e))return!0;if(!n&&o(e))return!1;if(-1!==e.search(/\/[a-zA-Z]/))return!1;var d=l?e.toLowerCase().replace(/[a-z]{3}/g,function(e){return void 0===s[e]?e:s[e]}):e,f=c?7:6,h=d.split("#");if(u&&h.length>=2){var v=h[0],p=h[1];return 0===h.slice(2).length&&i(r(p),1,5)&&i(r(v),0,f)}return a(d,0,f)}(b,u)),f.push(function(e,t,n){return!(n&&o(e)&&o(t))}(g,b,u.allowBlankDay)),f.every(Boolean)}},e=>{e.exports=o},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={cronCom:"e7oYFhCg",weekFont:"JfHnCB3v",cronPreview:"LtUTe0iw",cronPreviewItem:"Rycw1CzW"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(2),o=n(5),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e){return(0,o.forwardRef)(function(t,n){var a=(0,o.useState)(!1),l=a[0],s=a[1],c=(0,o.useRef)(null);(0,o.useImperativeHandle)(n,function(){return{show:function(e){c.current=e,s(!0)},hide:function(){s(!1)}}});var u=function(){s(!1)},d=(0,o.useMemo)(function(){return(0,r.jsx)(e,i({},t,{visible:l,handleCancel:u},c.current))},[l]);return(0,r.jsx)(r.Fragment,{children:l?d:null})})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(2),o=n(3);n(9);const i=function(e){var t=e.title,n=e.open,i=e.onClose,a=e.onConfirm,l=e.children,s=e.width,c=e.closable,u=e.cancelText,d=e.okText,f=e.footer,h=e.className,v=e.extra,p=void 0===v?null:v;return(0,r.jsx)(o.Drawer,{title:(0,r.jsx)("div",{style:{float:"left"},children:t}),placement:"right",className:h,closable:c,onClose:i,width:s,open:n,footer:f||(0,r.jsx)("div",{className:"custom-footer",children:(0,r.jsxs)(o.Space,{children:[(0,r.jsx)(o.Button,{onClick:i,children:u||"取消"}),(0,r.jsx)(o.Button,{type:"primary",onClick:a,children:d||"确定"})]})}),extra:p,children:l})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={"custom-footer":"e78eQqzW"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(2),o=n(3),i=n(5);function a(e){var t=e.children,n=e.onError,a=(0,i.useState)({hasError:!1}),l=a[0],s=a[1],c=(0,i.useCallback)(function(e,t){s({hasError:!0,error:e,errorInfo:t}),n&&n(e,t),console.error("Error caught by boundary:",e,t)},[n]);return(0,i.useEffect)(function(){var e=function(e){c(e,{isAsync:!0,timestamp:(new Date).toISOString()})},t=function(t){t.preventDefault(),e(t.reason)},n=function(t){t.preventDefault(),e(t.error)};return window.addEventListener("unhandledrejection",t),window.addEventListener("error",n),function(){window.removeEventListener("unhandledrejection",t),window.removeEventListener("error",n)}},[c]),l.hasError&&l.error?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.Result,{status:"error",title:"System Failed",subTitle:"Please check and modify the following information before resubmitting.",extra:[(0,r.jsx)(o.Button,{type:"primary",onClick:function(){return window.location.reload()},children:"刷新页面"},"console")]})}):(0,r.jsx)(r.Fragment,{children:t})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var r=n(2),o=n(3),i=n(5),a=n.n(i),l=(n(12),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});const s=a().memo(function(e){var t=e.title,n=e.visible,i=e.onOk,a=e.onCancel,s=e.children,c=e.width,u=e.afterClose,d=e.okText,f=e.confirmLoading,h=void 0!==f&&f,v=e.footer,p=void 0===v?void 0:v,g=e.wrapClassName,m=void 0===g?"":g,b=e.cancelText,y=e.className,x=void 0===y?"":y,w=e.keyboard,C=void 0===w||w,S=e.maskClosable,R=void 0===S||S,E=e.mask,k=void 0===E||E,j=e.getContainer,D=e.closable,O=void 0===D||D,N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["title","visible","onOk","onCancel","children","width","afterClose","okText","confirmLoading","footer","wrapClassName","cancelText","className","keyboard","maskClosable","mask","getContainer","closable"]);return(0,r.jsx)(o.Modal,l({mask:k,width:c||320,title:t,open:n,onOk:i,onCancel:a,wrapClassName:"".concat(m," base-modal"),centered:!0,afterClose:u,okText:d||"确定",cancelText:b||"取消",confirmLoading:h,footer:p,destroyOnClose:!0,className:x,keyboard:C,maskClosable:R,getContainer:j,closable:O},N,{children:s}))})},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={"base-modal":"CxPW7ExN","ant-modal-content":"z6YlwWqq","ant-modal-header":"zchHCvCS","ant-modal-body":"bbgQiDnW","ant-modal-title":"_1_pO_m4v","ant-modal-close-x":"INZqkK6a","ant-modal-footer":"FIdaNzCU","ant-btn":"meCBkyo5","ant-dropdown-trigger":"BRgReB6h"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var r=n(5),o=n.n(r),i=n(2),a=n(14),l=n(15),s=n(16),c=n(20),u=n(21),d=n(18),f=n(3),h=n(22),v=n(25),p=n(26),g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}s((r=r.apply(e,t||[])).next())})},b=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},y=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},x=o().createContext({}),w=function(){var e=(0,r.useContext)(x),t=e.setActivatorNodeRef,n=e.listeners;return(0,i.jsx)(f.Button,g({type:"text",size:"small",icon:(0,i.jsx)(a.HolderOutlined,{}),style:{cursor:"move"},ref:t},n))},C=function(e){var t=(0,u.useSortable)({id:e["data-row-key"]}),n=t.attributes,o=t.listeners,a=t.setNodeRef,l=t.setActivatorNodeRef,s=t.transform,c=t.transition,f=t.isDragging,h=g(g(g({},e.style),{transform:d.CSS.Translate.toString(s),transition:c}),f?{position:"relative",zIndex:9999}:{}),v=(0,r.useMemo)(function(){return{setActivatorNodeRef:l,listeners:o}},[l,o]);return(0,i.jsx)(x.Provider,{value:v,children:(0,i.jsx)("tr",g({},e,{ref:a,style:h},n))})},S=o().memo(function(e){return(0,r.createElement)(C,g({},e,{key:e["data-row-key"]}))}),R=(0,p.default)(f.Button);const E=(0,r.forwardRef)(function(e,t){var n=e.columns,o=e.form,a=e.multiFooter,d=e.toolBarRender,p=e.headerTitle,x=e.dataSource,C=e.onChange,E=e.fetchData,k=e.yHeight,j=e.labelWidth,D=e.searchButton,O=e.onSubmit,N=e.enableDrag,I=e.options,M=e.handleDragFuc,T=e.searchShow,A=void 0===T||T,P=e.rowSelection,L=e.queryParams,z=e.searchParams,B=e.rowKey,F=e.customPageSize,W=e.pagination,K=e.tableAlertRender,U=void 0!==K&&K,q=e.selectedRows,_=e.actionColumn,Y=e.onRow,H=e.beforeSearchSubmit,X=e.scroll,V=e.span,G=e.columnsStateKey,J=e.columnsIgnoreKeys,Q=e.defaultColumnKeys,Z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["columns","form","multiFooter","toolBarRender","headerTitle","dataSource","onChange","fetchData","yHeight","labelWidth","searchButton","onSubmit","enableDrag","options","handleDragFuc","searchShow","rowSelection","queryParams","searchParams","rowKey","customPageSize","pagination","tableAlertRender","selectedRows","actionColumn","onRow","beforeSearchSubmit","scroll","span","columnsStateKey","columnsIgnoreKeys","defaultColumnKeys"]),$=(0,r.useRef)(null),ee=(0,r.useState)([]),te=ee[0],ne=ee[1],re=(0,r.useState)(function(){var e=G?localStorage.getItem(G):null;if(e)return JSON.parse(e);var t=null==n?void 0:n.filter(function(e){return!e.hideInTable}),r={};return G?(null==t||t.forEach(function(e){(null==e?void 0:e.key)&&(null==J?void 0:J.includes(null==e?void 0:e.key))?r[null==e?void 0:e.key]={show:!0,disable:{checkbox:!0}}:(null==Q?void 0:Q.includes(null==e?void 0:e.key))?r[null==e?void 0:e.key]={show:!0}:r[null==e?void 0:e.key]={show:!1}}),r):(null==t||t.forEach(function(e){r[null==e?void 0:e.key]={show:!0}}),r)}),oe=re[0],ie=re[1];(0,r.useEffect)(function(){G&&localStorage.setItem(G,JSON.stringify(oe))},[oe]),(0,r.useEffect)(function(){ne(x||[])},[x]),(0,r.useImperativeHandle)(t,function(){return{reload:function(){return m(void 0,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:return[4,null===(e=$.current)||void 0===e?void 0:e.reload()];case 1:return t.sent(),[2]}})})},reloadAndReset:function(){return m(void 0,void 0,void 0,function(){var e,t;return b(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=$.current)||void 0===e?void 0:e.reloadAndRest)||void 0===t?void 0:t.call(e)];case 1:return n.sent(),[2]}})})}}});var ae=(0,h.default)().filterAuthItems,le=(0,r.useMemo)(function(){var e=y([],n||[],!0),t=ae((null==_?void 0:_.actions)||[]);if(_&&t.length>0){var r={title:"操作",dataIndex:"option",valueType:"option",fixed:"right",width:70*t.length,render:function(e,n){return t.length>0?(0,i.jsx)(v.TableActions,{record:n,actions:t,maxCount:_.maxCount}):null}};e.push(r)}return N&&(e=y([{key:"dragTag",align:"center",hideInSearch:!0,width:80,render:function(){return(0,i.jsx)(w,{})}}],e,!0)),e},[N,n,_]);return(0,i.jsxs)(i.Fragment,{children:[N?(0,i.jsx)(s.DndContext,{modifiers:[c.restrictToVerticalAxis],onDragEnd:function(e){var t=e.active,n=e.over;if(t.id!==(null==n?void 0:n.id)){var r=te.findIndex(function(e){return e.id===t.id}),o=te[r],i=te.findIndex(function(e){return e.id===(null==n?void 0:n.id)}),a=te[i],l=(0,u.arrayMove)(te,r,i);ne(l),null==M||M(o,a,l)}},children:(0,i.jsx)(u.SortableContext,{items:te.map(function(e){return e.id||""}),strategy:u.verticalListSortingStrategy,children:(0,i.jsx)(l.ProTable,g({headerTitle:p,actionRef:$,rowKey:B,form:o,options:I,virtual:k,components:{body:{row:S}},pagination:!1!==W&&g({defaultPageSize:10,showSizeChanger:!0,pageSizeOptions:["10","20","50","100"],showTotal:function(e){return"共 ".concat(e," 条")},showQuickJumper:!0},"object"==typeof W?W:{}),dataSource:te,onSubmit:O,tableAlertRender:U,request:function(e,t){return m(void 0,void 0,void 0,function(){var n,r,o,i,a,l,s,c,u,d;return b(this,function(f){switch(f.label){case 0:return delete(n=g({},e)).current,delete n.pageSize,delete n.search,r=Object.keys(t)[0],[4,null==E?void 0:E(g(g(g({page:e.current,page_size:F||e.pageSize,sort_by:t[r]&&("ascend"===t[r]?r:"-"+r),search:e.search},z),L),n))];case 1:return o=f.sent(),0===(null===(a=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.list)||void 0===a?void 0:a.length)&&e.current>1?((null===(l=null==$?void 0:$.current)||void 0===l?void 0:l.setPageInfo)&&$.current.setPageInfo({current:e.current-1}),[4,null===(s=$.current)||void 0===s?void 0:s.reload(!1)]):[3,3];case 2:return f.sent(),[3,4];case 3:ne((null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.list)||[]),f.label=4;case 4:return[2,{data:(null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.list)||[],success:0===(null==o?void 0:o.code),total:(null===(d=null==o?void 0:o.data)||void 0===d?void 0:d.total)||0}]}})})},search:!!A&&{labelWidth:j,span:V||6,optionRender:function(e,t,n){return y(y([],n,!0),[null==D?void 0:D.map(function(e){return(0,i.jsx)(R,{type:e.type,permission:e.permission,onClick:e.onClick,children:e.text},e.key)})],!1)}},toolBarRender:!!d&&function(){return null==d?void 0:d.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)})},onChange:C,scroll:{y:k},columns:le,rowSelection:P&&g(g({},P),{getCheckboxProps:function(e){var t;return g({},null===(t=P.getCheckboxProps)||void 0===t?void 0:t.call(P,e))}}),onRow:Y,beforeSearchSubmit:H},Z))})}):(0,i.jsx)(l.ProTable,g({headerTitle:p,actionRef:$,rowKey:B,form:o,options:I,virtual:k,dataSource:x,pagination:!1!==W&&g({defaultPageSize:10,showSizeChanger:!0,pageSizeOptions:["10","20","50","100"],showTotal:function(e){return"共 ".concat(e," 条")},showQuickJumper:!0},"object"==typeof W?W:{}),tableAlertRender:U,onSubmit:O,request:function(e,t){return m(void 0,void 0,void 0,function(){var n,r,o,i,a,l,s,c,u,d;return b(this,function(f){switch(f.label){case 0:return delete(n=g({},e)).current,delete n.pageSize,delete n.search,r=Object.keys(t)[0],[4,null==E?void 0:E(g(g(g({page:e.current,page_size:F||e.pageSize,sort_by:t[r]&&("ascend"===t[r]?r:"-"+r),search:e.search},z),L),n))];case 1:return o=f.sent(),0===(null===(a=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.list)||void 0===a?void 0:a.length)&&e.current>1?((null===(l=null==$?void 0:$.current)||void 0===l?void 0:l.setPageInfo)&&$.current.setPageInfo({current:e.current-1}),[4,null===(s=$.current)||void 0===s?void 0:s.reload(!1)]):[3,3];case 2:return f.sent(),[3,4];case 3:ne((null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.list)||[]),f.label=4;case 4:return[2,{data:(null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.list)||[],success:0===(null==o?void 0:o.code),total:(null===(d=null==o?void 0:o.data)||void 0===d?void 0:d.total)||0}]}})})},search:!!A&&{labelWidth:j,span:V||6,optionRender:function(e,t,n){return y(y([],n,!0),[null==D?void 0:D.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,children:e.text},e.key)})],!1)}},toolBarRender:!!d&&function(){return null==d?void 0:d.map(function(e){return e.isPopover&&e.popoverProps?(0,r.createElement)(f.Popconfirm,g({},e.popoverProps,{key:e.key}),(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)):(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)})},onChange:C,scroll:X||{y:k},columns:le,rowSelection:P&&g(g({},P),{getCheckboxProps:function(e){var t;return g({},null===(t=P.getCheckboxProps)||void 0===t?void 0:t.call(P,e))}}),onRow:Y,beforeSearchSubmit:H,columnsState:{value:oe,onChange:ie}},Z)),q&&q.length>0&&(null==a?void 0:a.length)>0&&(0,i.jsx)(l.FooterToolbar,{extra:(0,i.jsxs)("div",{children:["已选择"," ",(0,i.jsx)("a",{style:{fontWeight:600,color:"#e80808"},children:q.length})," ","项"]}),children:a&&(null==a?void 0:a.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,children:e.text},e.key)}))})]})})},t=>{t.exports=e},e=>{e.exports=t},(e,t,n)=>{n.r(t),n.d(t,{AutoScrollActivator:()=>ye,DndContext:()=>Ve,DragOverlay:()=>ht,KeyboardCode:()=>re,KeyboardSensor:()=>se,MeasuringFrequency:()=>Se,MeasuringStrategy:()=>Ce,MouseSensor:()=>ge,PointerSensor:()=>he,TouchSensor:()=>be,TraversalOrder:()=>xe,applyModifiers:()=>Ye,closestCenter:()=>E,closestCorners:()=>k,defaultAnnouncements:()=>d,defaultCoordinates:()=>m,defaultDropAnimation:()=>ut,defaultDropAnimationSideEffects:()=>ct,defaultKeyboardCoordinateGetter:()=>le,defaultScreenReaderInstructions:()=>u,getClientRect:()=>L,getFirstCollision:()=>S,getScrollableAncestors:()=>B,pointerWithin:()=>N,rectIntersection:()=>D,useDndContext:()=>$e,useDndMonitor:()=>c,useDraggable:()=>Ze,useDroppable:()=>nt,useSensor:()=>p,useSensors:()=>g});var r=n(5),o=n.n(r),i=n(17),a=n(18),l=n(19);const s=(0,r.createContext)(null);function c(e){const t=(0,r.useContext)(s);(0,r.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}const u={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=d,container:n,hiddenTextDescribedById:s,screenReaderInstructions:f=u}=e;const{announce:h,announcement:v}=(0,l.useAnnouncement)(),p=(0,a.useUniqueId)("DndLiveRegion"),[g,m]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{m(!0)},[]),c((0,r.useMemo)(()=>({onDragStart(e){let{active:n}=e;h(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&h(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;h(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;h(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;h(t.onDragCancel({active:n,over:r}))}}),[h,t])),!g)return null;const b=o().createElement(o().Fragment,null,o().createElement(l.HiddenText,{id:s,value:f.draggable}),o().createElement(l.LiveRegion,{id:p,announcement:v}));return n?(0,i.createPortal)(b,n):b}var h;function v(){}function p(e,t){return(0,r.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(h||(h={}));const m=Object.freeze({x:0,y:0});function b(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y(e,t){const n=(0,a.getEventCoordinates)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function S(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function R(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const E=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=R(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=b(R(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(x)},k=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=o.reduce((e,t,r)=>e+b(n[r],t),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(x)};function j(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const D=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=j(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(w)};function O(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const N=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const e of t){const{id:t}=e,i=n.get(t);if(i&&O(r,i)){const n=C(i).reduce((e,t)=>e+b(r,t),0),a=Number((n/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:a}})}}return o.sort(x)};function I(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function M(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const T=M(1);function A(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const P={ignoreTransform:!1};function L(e,t){void 0===t&&(t=P);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=A(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:l,bottom:s,right:c}}function z(e){return L(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.isDocument)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.isHTMLElement)(o)||(0,a.isSVGElement)(o))return n;if(n.includes(o))return n;const i=(0,a.getWindow)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function F(e){const[t]=B(e,1);return null!=t?t:null}function W(e){return a.canUseDOM&&e?(0,a.isWindow)(e)?e:(0,a.isNode)(e)?(0,a.isDocument)(e)||e===(0,a.getOwnerDocument)(e).scrollingElement?window:(0,a.isHTMLElement)(e)?e:null:null:null}function K(e){return(0,a.isWindow)(e)?e.scrollX:e.scrollLeft}function U(e){return(0,a.isWindow)(e)?e.scrollY:e.scrollTop}function q(e){return{x:K(e),y:U(e)}}var _;function Y(e){return!(!a.canUseDOM||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=Y(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(_||(_={}));const X={x:.2,y:.2};function V(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=X);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=H(e),h={x:0,y:0},v={x:0,y:0},p=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+p?(h.y=_.Backward,v.y=r*Math.abs((t.top+p-i)/p)):!u&&s>=t.bottom-p&&(h.y=_.Forward,v.y=r*Math.abs((t.bottom-p-s)/p)),!f&&l>=t.right-g?(h.x=_.Forward,v.x=r*Math.abs((t.right-g-l)/g)):!d&&a<=t.left+g&&(h.x=_.Backward,v.x=r*Math.abs((t.left+g-a)/g)),{direction:h,speed:v}}function G(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function J(e){return e.reduce((e,t)=>(0,a.add)(e,q(t)),m)}function Q(e,t){if(void 0===t&&(t=L),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);F(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Z=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+K(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+U(t),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=J(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Z)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ee{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function te(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ne,re;function oe(e){e.preventDefault()}function ie(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ne||(ne={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(re||(re={}));const ae={start:[re.Space,re.Enter],cancel:[re.Esc],end:[re.Space,re.Enter,re.Tab]},le=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case re.Right:return{...n,x:n.x+25};case re.Left:return{...n,x:n.x-25};case re.Down:return{...n,y:n.y+25};case re.Up:return{...n,y:n.y-25}}};class se{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ee((0,a.getOwnerDocument)(t)),this.windowListeners=new ee((0,a.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ne.Resize,this.handleCancel),this.windowListeners.add(ne.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ne.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Q(n),t(m)}handleKeyDown(e){if((0,a.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=ae,coordinateGetter:i=le,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:m;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,a.subtract)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=H(n),h=G(n),v={x:Math.min(o===re.Right?h.right-h.width/2:h.right,Math.max(o===re.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===re.Down?h.bottom-h.height/2:h.bottom,Math.max(o===re.Down?h.top:h.top+h.height/2,d.y))},p=o===re.Right&&!a||o===re.Left&&!s,g=o===re.Down&&!c||o===re.Up&&!i;if(p&&v.x!==d.x){const e=n.scrollLeft+t.x,i=o===re.Right&&e<=u.x||o===re.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===re.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(g&&v.y!==d.y){const e=n.scrollTop+t.y,i=o===re.Down&&e<=u.y||o===re.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===re.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,a.add)((0,a.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ce(e){return Boolean(e&&"distance"in e)}function ue(e){return Boolean(e&&"delay"in e)}se.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ae,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class de{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.getWindow)(e);return e instanceof t?e:(0,a.getOwnerDocument)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=(0,a.getOwnerDocument)(i),this.documentListeners=new ee(this.document),this.listeners=new ee(n),this.windowListeners=new ee((0,a.getWindow)(i)),this.initialCoordinates=null!=(r=(0,a.getEventCoordinates)(o))?r:m,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ne.Resize,this.handleCancel),this.windowListeners.add(ne.DragStart,oe),this.windowListeners.add(ne.VisibilityChange,this.handleCancel),this.windowListeners.add(ne.ContextMenu,oe),this.documentListeners.add(ne.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ue(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(ce(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ne.Click,ie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ne.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,a.getEventCoordinates)(e))?t:m,c=(0,a.subtract)(r,s);if(!n&&l){if(ce(l)){if(null!=l.tolerance&&te(c,l.tolerance))return this.handleCancel();if(te(c,l.distance))return this.handleStart()}return ue(l)&&te(c,l.tolerance)?this.handleCancel():void this.handlePending(l,c)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===re.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const fe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class he extends de{constructor(e){const{event:t}=e,n=(0,a.getOwnerDocument)(t.target);super(e,fe,n)}}he.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const ve={move:{name:"mousemove"},end:{name:"mouseup"}};var pe;!function(e){e[e.RightClick=2]="RightClick"}(pe||(pe={}));class ge extends de{constructor(e){super(e,ve,(0,a.getOwnerDocument)(e.event.target))}}ge.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==pe.RightClick&&(null==r||r({event:n}),!0)}}];const me={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class be extends de{constructor(e){super(e,me)}static setup(){return window.addEventListener(me.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(me.move.name,e)};function e(){}}}var ye,xe;be.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ye||(ye={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const we={x:{[_.Backward]:!1,[_.Forward]:!1},y:{[_.Backward]:!1,[_.Forward]:!1}};var Ce,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ce||(Ce={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const Re=new Map;function Ee(e,t){return(0,a.useLazyMemo)(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function ke(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return(0,r.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function je(e){return new $(L(e),e)}function De(e,t,n){void 0===t&&(t=je);const[o,i]=(0,r.useState)(null);function l(){i(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return(0,r.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),c=ke({callback:l});return(0,a.useIsomorphicLayoutEffect)(()=>{l(),e?(null==c||c.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==s||s.disconnect())},[e]),o}const Oe=[];function Ne(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{n.current=null},t),(0,r.useEffect)(()=>{const t=e!==m;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?(0,a.subtract)(e,n.current):m}function Ie(e){return(0,r.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Me=[];function Te(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.isHTMLElement)(t)?t:e}const Ae=[{sensor:he,options:{}},{sensor:se,options:{}}],Pe={current:{}},Le={draggable:{measure:z},droppable:{measure:z,strategy:Ce.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:L}};class ze extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Be={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ze,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:v},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Le,measureDroppableContainers:v,windowRect:null,measuringScheduled:!1},Fe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:v,draggableNodes:new Map,over:null,measureDroppableContainers:v},We=(0,r.createContext)(Fe),Ke=(0,r.createContext)(Be);function Ue(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ze}}}function qe(e,t){switch(t.type){case h.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case h.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case h.DragEnd:case h.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case h.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ze(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case h.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new ze(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case h.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new ze(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function _e(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(We),l=(0,a.usePrevious)(o),s=(0,a.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)(()=>{if(!t&&!o&&l&&null!=s){if(!(0,a.isKeyboardEvent)(l))return;if(document.activeElement===l.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,a.findFirstFocusableNode)(e);if(t){t.focus();break}}})}},[o,t,i,s,l]),null}function Ye(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const He=(0,r.createContext)({...m,scaleX:1,scaleY:1});var Xe;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Xe||(Xe={}));const Ve=(0,r.memo)(function(e){var t,n,l,c;let{id:u,accessibility:d,autoScroll:v=!0,children:p,sensors:g=Ae,collisionDetection:b=D,measuring:y,modifiers:x,...w}=e;const C=(0,r.useReducer)(qe,void 0,Ue),[R,E]=C,[k,j]=function(){const[e]=(0,r.useState)(()=>new Set),t=(0,r.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,r.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[O,N]=(0,r.useState)(Xe.Uninitialized),M=O===Xe.Initialized,{draggable:{active:A,nodes:P,translate:z},droppable:{containers:K}}=R,U=null!=A?P.get(A):null,H=(0,r.useRef)({initial:null,translated:null}),X=(0,r.useMemo)(()=>{var e;return null!=A?{id:A,data:null!=(e=null==U?void 0:U.data)?e:Pe,rect:H}:null},[A,U]),G=(0,r.useRef)(null),[Q,Z]=(0,r.useState)(null),[ee,te]=(0,r.useState)(null),ne=(0,a.useLatestValue)(w,Object.values(w)),re=(0,a.useUniqueId)("DndDescribedBy",u),oe=(0,r.useMemo)(()=>K.getEnabled(),[K]),ie=(ae=y,(0,r.useMemo)(()=>({draggable:{...Le.draggable,...null==ae?void 0:ae.draggable},droppable:{...Le.droppable,...null==ae?void 0:ae.droppable},dragOverlay:{...Le.dragOverlay,...null==ae?void 0:ae.dragOverlay}}),[null==ae?void 0:ae.draggable,null==ae?void 0:ae.droppable,null==ae?void 0:ae.dragOverlay]));var ae;const{droppableRects:le,measureDroppableContainers:se,measuringScheduled:ce}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,s]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=i,f=(0,r.useRef)(e),h=function(){switch(d){case Ce.Always:return!1;case Ce.BeforeDragging:return n;default:return!n}}(),v=(0,a.useLatestValue)(h),p=(0,r.useCallback)(function(e){void 0===e&&(e=[]),v.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[v]),g=(0,r.useRef)(null),m=(0,a.useLazyMemo)(t=>{if(h&&!n)return Re;if(!t||t===Re||f.current!==e||null!=l){const t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new $(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,l,n,h,u]);return(0,r.useEffect)(()=>{f.current=e},[e]),(0,r.useEffect)(()=>{h||p()},[n,h]),(0,r.useEffect)(()=>{l&&l.length>0&&s(null)},[JSON.stringify(l)]),(0,r.useEffect)(()=>{h||"number"!=typeof c||null!==g.current||(g.current=setTimeout(()=>{p(),g.current=null},c))},[c,h,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:null!=l}}(oe,{dragging:M,dependencies:[z.x,z.y],config:ie.droppable}),ue=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.useLazyMemo)(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(P,A),de=(0,r.useMemo)(()=>ee?(0,a.getEventCoordinates)(ee):null,[ee]),fe=function(){const e=!1===(null==Q?void 0:Q.autoScrollEnabled),t="object"==typeof v?!1===v.enabled:!1===v,n=M&&!e&&!t;return"object"==typeof v?{...v,enabled:n}:{enabled:n}}(),he=function(e,t){return Ee(e,t)}(ue,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof i?{x:i,y:i}:i;(0,a.useIsomorphicLayoutEffect)(()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=I(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=F(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,s,c,o,n])}({activeNode:null!=A?P.get(A):null,config:fe.layoutShiftCompensation,initialRect:he,measure:ie.draggable.measure});const ve=De(ue,ie.draggable.measure,he),pe=De(ue?ue.parentElement:null),ge=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),me=K.getNodeFor(null==(t=ge.current.over)?void 0:t.id),be=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=ke({callback:(0,r.useCallback)(e=>{for(const{target:n}of e)if((0,a.isHTMLElement)(n)){o(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),l=(0,r.useCallback)(e=>{const n=Te(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)},[t,i]),[s,c]=(0,a.useNodeRef)(l);return(0,r.useMemo)(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}({measure:ie.dragOverlay.measure}),Se=null!=(n=be.nodeRef.current)?n:ue,je=M?null!=(l=be.rect)?l:ve:null,ze=Boolean(be.nodeRef.current&&be.rect),Be=I(Fe=ze?null:ve,Ee(Fe));var Fe;const Ve=Ie(Se?(0,a.getWindow)(Se):null),Ge=function(e){const t=(0,r.useRef)(e),n=(0,a.useLazyMemo)(n=>e?n&&n!==Oe&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Oe,[e]);return(0,r.useEffect)(()=>{t.current=e},[e]),n}(M?null!=me?me:ue:null),Je=function(e,t){void 0===t&&(t=L);const[n]=e,o=Ie(n?(0,a.getWindow)(n):null),[i,l]=(0,r.useState)(Me);function s(){l(()=>e.length?e.map(e=>Y(e)?o:new $(t(e),e)):Me)}const c=ke({callback:s});return(0,a.useIsomorphicLayoutEffect)(()=>{null==c||c.disconnect(),s(),e.forEach(e=>null==c?void 0:c.observe(e))},[e]),i}(Ge),Qe=Ye(x,{transform:{x:z.x-Be.x,y:z.y-Be.y,scaleX:1,scaleY:1},activatorEvent:ee,active:X,activeNodeRect:ve,containerNodeRect:pe,draggingNodeRect:je,over:ge.current.over,overlayNodeRect:be.rect,scrollableAncestors:Ge,scrollableAncestorRects:Je,windowRect:Ve}),Ze=de?(0,a.add)(de,z):null,$e=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)(e=>{const t=W(e.target);t&&n(e=>e?(e.set(t,q(t)),new Map(e)):null)},[]);return(0,r.useEffect)(()=>{const t=o.current;if(e!==t){r(t);const a=e.map(e=>{const t=W(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,q(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=W(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,r.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,a.add)(e,t),m):J(e):m,[e,t])}(Ge),et=Ne($e),tt=Ne($e,[ve]),nt=(0,a.add)(Qe,et),rt=je?T(je,Qe):null,ot=X&&rt?b({active:X,collisionRect:rt,droppableRects:le,droppableContainers:oe,pointerCoordinates:Ze}):null,it=S(ot,"id"),[at,lt]=(0,r.useState)(null),st=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ze?Qe:(0,a.add)(Qe,tt),null!=(c=null==at?void 0:at.rect)?c:null,ve),ct=(0,r.useRef)(null),ut=(0,r.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==G.current)return;const o=P.get(G.current);if(!o)return;const a=e.nativeEvent,l=new n({active:G.current,activeNode:o,event:a,options:r,context:ge,onAbort(e){if(!P.get(e))return;const{onDragAbort:t}=ne.current,n={id:e};null==t||t(n),k({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!P.get(e))return;const{onDragPending:o}=ne.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),k({type:"onDragPending",event:i})},onStart(e){const t=G.current;if(null==t)return;const n=P.get(t);if(!n)return;const{onDragStart:r}=ne.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:H}};(0,i.unstable_batchedUpdates)(()=>{null==r||r(o),N(Xe.Initializing),E({type:h.DragStart,initialCoordinates:e,active:t}),k({type:"onDragStart",event:o}),Z(ct.current),te(a)})},onMove(e){E({type:h.DragMove,coordinates:e})},onEnd:s(h.DragEnd),onCancel:s(h.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=ge.current;let l=null;if(t&&o){const{cancelDrop:i}=ne.current;l={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===h.DragEnd&&"function"==typeof i&&await Promise.resolve(i(l))&&(e=h.DragCancel)}G.current=null,(0,i.unstable_batchedUpdates)(()=>{E({type:e}),N(Xe.Uninitialized),lt(null),Z(null),te(null),ct.current=null;const t=e===h.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=ne.current[t];null==e||e(l),k({type:t,event:l})}})}}ct.current=l},[P]),dt=(0,r.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,i=P.get(r);if(null!==G.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},G.current=r,ut(n,t))},[P,ut]),ft=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(g,dt);!function(e){(0,r.useEffect)(()=>{if(!a.canUseDOM)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(g),(0,a.useIsomorphicLayoutEffect)(()=>{ve&&O===Xe.Initializing&&N(Xe.Initialized)},[ve,O]),(0,r.useEffect)(()=>{const{onDragMove:e}=ne.current,{active:t,activatorEvent:n,collisions:r,over:o}=ge.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:nt.x,y:nt.y},over:o};(0,i.unstable_batchedUpdates)(()=>{null==e||e(a),k({type:"onDragMove",event:a})})},[nt.x,nt.y]),(0,r.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=ge.current;if(!e||null==G.current||!t||!o)return;const{onDragOver:a}=ne.current,l=r.get(it),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,i.unstable_batchedUpdates)(()=>{lt(s),null==a||a(c),k({type:"onDragOver",event:c})})},[it]),(0,a.useIsomorphicLayoutEffect)(()=>{ge.current={activatorEvent:ee,active:X,activeNode:ue,collisionRect:rt,collisions:ot,droppableRects:le,draggableNodes:P,draggingNode:Se,draggingNodeRect:je,droppableContainers:K,over:at,scrollableAncestors:Ge,scrollAdjustedTranslate:nt},H.current={initial:je,translated:rt}},[X,ue,ot,rt,P,Se,je,le,K,at,Ge,nt]),function(e){let{acceleration:t,activator:n=ye.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:s=5,order:c=xe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:h,threshold:v}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=(0,a.usePrevious)(t);return(0,a.useLazyMemo)(e=>{if(n||!r||!e)return we;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[_.Backward]:e.x[_.Backward]||-1===o,[_.Forward]:e.x[_.Forward]||1===o},y:{[_.Backward]:e.y[_.Backward]||-1===i,[_.Forward]:e.y[_.Forward]||1===i}}},[n,t,r])}({delta:h,disabled:!l}),[g,m]=(0,a.useInterval)(),b=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),x=(0,r.useMemo)(()=>{switch(n){case ye.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ye.DraggableRect:return i}},[n,i,u]),w=(0,r.useRef)(null),C=(0,r.useCallback)(()=>{const e=w.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)},[]),S=(0,r.useMemo)(()=>c===xe.TreeOrder?[...d].reverse():d,[c,d]);(0,r.useEffect)(()=>{if(l&&d.length&&x){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=V(e,r,x,t,v);for(const e of["x","y"])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return m(),w.current=e,g(C,s),b.current=a,void(y.current=i)}b.current={x:0,y:0},y.current={x:0,y:0},m()}else m()},[t,C,o,m,l,s,JSON.stringify(x),JSON.stringify(p),g,d,S,f,JSON.stringify(v)])}({...fe,delta:z,draggingRect:rt,pointerCoordinates:Ze,scrollableAncestors:Ge,scrollableAncestorRects:Je});const ht=(0,r.useMemo)(()=>({active:X,activeNode:ue,activeNodeRect:ve,activatorEvent:ee,collisions:ot,containerNodeRect:pe,dragOverlay:be,draggableNodes:P,droppableContainers:K,droppableRects:le,over:at,measureDroppableContainers:se,scrollableAncestors:Ge,scrollableAncestorRects:Je,measuringConfiguration:ie,measuringScheduled:ce,windowRect:Ve}),[X,ue,ve,ee,ot,pe,be,P,K,le,at,se,Ge,Je,ie,ce,Ve]),vt=(0,r.useMemo)(()=>({activatorEvent:ee,activators:ft,active:X,activeNodeRect:ve,ariaDescribedById:{draggable:re},dispatch:E,draggableNodes:P,over:at,measureDroppableContainers:se}),[ee,ft,X,ve,E,re,P,at,se]);return o().createElement(s.Provider,{value:j},o().createElement(We.Provider,{value:vt},o().createElement(Ke.Provider,{value:ht},o().createElement(He.Provider,{value:st},p)),o().createElement(_e,{disabled:!1===(null==d?void 0:d.restoreFocus)})),o().createElement(f,{...d,hiddenTextDescribedById:re}))}),Ge=(0,r.createContext)(null),Je="button",Qe="Draggable";function Ze(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=(0,a.useUniqueId)(Qe),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:h,over:v}=(0,r.useContext)(We),{role:p=Je,roleDescription:g="draggable",tabIndex:m=0}=null!=i?i:{},b=(null==u?void 0:u.id)===t,y=(0,r.useContext)(b?He:Ge),[x,w]=(0,a.useNodeRef)(),[C,S]=(0,a.useNodeRef)(),R=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(s,t),E=(0,a.useLatestValue)(n);return(0,a.useIsomorphicLayoutEffect)(()=>(h.set(t,{id:t,key:l,node:x,activatorNode:C,data:E}),()=>{const e=h.get(t);e&&e.key===l&&h.delete(t)}),[h,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!b||p!==Je)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable}),[o,p,m,b,g,f.draggable]),isDragging:b,listeners:o?void 0:R,node:x,over:v,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function $e(){return(0,r.useContext)(Ke)}const et="Droppable",tt={timeout:25};function nt(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=(0,a.useUniqueId)(et),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(We),f=(0,r.useRef)({disabled:n}),v=(0,r.useRef)(!1),p=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:m,updateMeasurementsFor:b,timeout:y}={...tt,...i},x=(0,a.useLatestValue)(null!=b?b:o),w=ke({callback:(0,r.useCallback)(()=>{v.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),g.current=null},y)):v.current=!0},[y]),disabled:m||!s}),C=(0,r.useCallback)((e,t)=>{w&&(t&&(w.unobserve(t),v.current=!1),e&&w.observe(e))},[w]),[S,R]=(0,a.useNodeRef)(C),E=(0,a.useLatestValue)(t);return(0,r.useEffect)(()=>{w&&S.current&&(w.disconnect(),v.current=!1,w.observe(S.current))},[S,w]),(0,r.useEffect)(()=>(c({type:h.RegisterDroppable,element:{id:o,key:l,disabled:n,node:S,rect:p,data:E}}),()=>c({type:h.UnregisterDroppable,key:l,id:o})),[o]),(0,r.useEffect)(()=>{n!==f.current.disabled&&(c({type:h.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)},[o,l,n,c]),{active:s,rect:p,isOver:(null==u?void 0:u.id)===o,node:S,over:u,setNodeRef:R}}function rt(e){let{animation:t,children:n}=e;const[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null),u=(0,a.usePrevious)(n);return n||i||!u||l(u),(0,a.useIsomorphicLayoutEffect)(()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then(()=>{l(null)}):l(null)},[t,i,s]),o().createElement(o().Fragment,null,n,i?(0,r.cloneElement)(i,{ref:c}):null)}const ot={x:0,y:0,scaleX:1,scaleY:1};function it(e){let{children:t}=e;return o().createElement(We.Provider,{value:Fe},o().createElement(He.Provider,{value:ot},t))}const at={position:"fixed",touchAction:"none"},lt=e=>(0,a.isKeyboardEvent)(e)?"transform 250ms ease":void 0,st=(0,r.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:l,className:s,rect:c,style:u,transform:d,transition:f=lt}=e;if(!c)return null;const h=i?d:{...d,scaleX:1,scaleY:1},v={...at,width:c.width,height:c.height,top:c.top,left:c.left,transform:a.CSS.Transform.toString(h),transformOrigin:i&&r?y(r,c):void 0,transition:"function"==typeof f?f(r):f,...u};return o().createElement(n,{className:s,style:v,ref:t},l)}),ct=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},ut={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.CSS.Transform.toString(t)},{transform:a.CSS.Transform.toString(n)}]},sideEffects:ct({styles:{active:{opacity:"0"}}})};let dt=0;function ft(e){return(0,r.useMemo)(()=>{if(null!=e)return dt++,dt},[e])}const ht=o().memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:l,transition:s,modifiers:c,wrapperElement:u="div",className:d,zIndex:f=999}=e;const{activatorEvent:h,active:v,activeNodeRect:p,containerNodeRect:g,draggableNodes:m,droppableContainers:b,dragOverlay:y,over:x,measuringConfiguration:w,scrollableAncestors:C,scrollableAncestorRects:S,windowRect:R}=$e(),E=(0,r.useContext)(He),k=ft(null==v?void 0:v.id),j=Ye(c,{activatorEvent:h,active:v,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:y.rect,over:x,overlayNodeRect:y.rect,scrollableAncestors:C,scrollableAncestorRects:S,transform:E,windowRect:R}),D=Ee(p),O=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,a.useEvent)((e,i)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=Te(i);if(!c)return;const{transform:u}=(0,a.getWindow)(i).getComputedStyle(i),d=A(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ut,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},h=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[v]=h,p=h[h.length-1];if(JSON.stringify(v)===JSON.stringify(p))return;const g=null==r?void 0:r({active:i,dragOverlay:a,...s}),m=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==g||g(),e()}})}}(t);return Q(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})})}({config:i,draggableNodes:m,droppableContainers:b,measuringConfiguration:w}),N=D?y.setRef:void 0;return o().createElement(it,null,o().createElement(rt,{animation:O},v&&k?o().createElement(st,{key:k,id:v.id,ref:N,as:u,activatorEvent:h,adjustScale:t,className:d,transition:s,rect:D,style:{zIndex:f,...l},transform:j},n):null))})},e=>{e.exports=i},(e,t,n)=>{n.r(t),n.d(t,{CSS:()=>O,add:()=>S,canUseDOM:()=>i,findFirstFocusableNode:()=>I,getEventCoordinates:()=>D,getOwnerDocument:()=>f,getWindow:()=>s,hasViewportRelativeCoordinates:()=>E,isDocument:()=>c,isHTMLElement:()=>u,isKeyboardEvent:()=>k,isNode:()=>l,isSVGElement:()=>d,isTouchEvent:()=>j,isWindow:()=>a,subtract:()=>R,useCombinedRefs:()=>o,useEvent:()=>v,useInterval:()=>p,useIsomorphicLayoutEffect:()=>h,useLatestValue:()=>g,useLazyMemo:()=>m,useNodeRef:()=>b,usePrevious:()=>y,useUniqueId:()=>w});var r=n(5);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const h=i?r.useLayoutEffect:r.useEffect;function v(e){const t=(0,r.useRef)(e);return h(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function p(){const e=(0,r.useRef)(null);return[(0,r.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return h(()=>{n.current!==e&&(n.current=e)},t),n}function m(e,t){const n=(0,r.useRef)();return(0,r.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function b(e){const t=v(e),n=(0,r.useRef)(null),o=(0,r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}let x={};function w(e,t){return(0,r.useMemo)(()=>{if(t)return t;const n=null==x[e]?0:x[e]+1;return x[e]=n,e+"-"+n},[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const S=C(1),R=C(-1);function E(e){return"clientX"in e&&"clientY"in e}function k(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function j(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}function D(e){if(j(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return E(e)?{x:e.clientX,y:e.clientY}:null}const O=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[O.Translate.toString(e),O.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),N="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function I(e){return e.matches(N)?e:e.querySelector(N)}},(e,t,n)=>{n.r(t),n.d(t,{HiddenText:()=>a,LiveRegion:()=>l,useAnnouncement:()=>s});var r=n(5),o=n.n(r);const i={display:"none"};function a(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:i},n)}function l(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}function s(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}},(e,t,n)=>{n.r(t),n.d(t,{createSnapModifier:()=>o,restrictToFirstScrollableAncestor:()=>s,restrictToHorizontalAxis:()=>i,restrictToParentElement:()=>l,restrictToVerticalAxis:()=>c,restrictToWindowEdges:()=>u,snapCenterToCursor:()=>d});var r=n(18);function o(e){return t=>{let{transform:n}=t;return{...n,x:Math.ceil(n.x/e)*e,y:Math.ceil(n.y/e)*e}}}const i=e=>{let{transform:t}=e;return{...t,y:0}};function a(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const l=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?a(r,n,t):r},s=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return t&&o?a(n,t,o):n},c=e=>{let{transform:t}=e;return{...t,x:0}},u=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return n&&r?a(t,n,r):t},d=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:o}=e;if(n&&t){const e=(0,r.getEventCoordinates)(t);if(!e)return o;const i=e.x-n.left,a=e.y-n.top;return{...o,x:o.x+i-n.width/2,y:o.y+a-n.height/2}}return o}},(e,t,n)=>{n.r(t),n.d(t,{SortableContext:()=>y,arrayMove:()=>l,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>w,defaultNewIndexGetter:()=>x,hasSortableData:()=>j,horizontalListSortingStrategy:()=>f,rectSortingStrategy:()=>h,rectSwappingStrategy:()=>v,sortableKeyboardCoordinates:()=>O,useSortable:()=>k,verticalListSortingStrategy:()=>g});var r=n(5),o=n.n(r),i=n(16),a=n(18);function l(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function c(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function u(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},f=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const l=null!=(t=n[o])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r&&(o||i)?n<t?o?r.left-(o.left+o.width):i.left-(r.left+r.width):i?i.left-(r.left+r.width):r.left-(o.left+o.width):0}(n,a,o);if(a===o){const e=n[i];return e?{x:o<i?e.left+e.width-(l.left+l.width):e.left-l.left,y:0,...d}:null}return a>o&&a<=i?{x:-l.width-s,y:0,...d}:a<o&&a>=i?{x:l.width+s,y:0,...d}:{x:0,y:0,...d}},h=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=l(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},v=e=>{let t,n,{activeIndex:r,index:o,rects:i,overIndex:a}=e;return o===r&&(t=i[o],n=i[a]),o===a&&(t=i[o],n=i[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},p={scaleX:1,scaleY:1},g=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...p}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-s,...p}:o<n&&o>=a?{x:0,y:l.height+s,...p}:{x:0,y:0,...p}},m="Sortable",b=o().createContext({activeIndex:-1,containerId:m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:l,strategy:s=h,disabled:u=!1}=e;const{active:d,dragOverlay:f,droppableRects:v,over:p,measureDroppableContainers:g}=(0,i.useDndContext)(),y=(0,a.useUniqueId)(m,n),x=Boolean(null!==f.rect),w=(0,r.useMemo)(()=>l.map(e=>"object"==typeof e&&"id"in e?e.id:e),[l]),C=null!=d,S=d?w.indexOf(d.id):-1,R=p?w.indexOf(p.id):-1,E=(0,r.useRef)(w),k=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(w,E.current),j=-1!==R&&-1===S||k,D=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);(0,a.useIsomorphicLayoutEffect)(()=>{k&&C&&g(w)},[k,w,C,g]),(0,r.useEffect)(()=>{E.current=w},[w]);const O=(0,r.useMemo)(()=>({activeIndex:S,containerId:y,disabled:D,disableTransforms:j,items:w,overIndex:R,useDragOverlay:x,sortedRects:c(w,v),strategy:s}),[S,y,D.draggable,D.droppable,j,w,R,v,x,s]);return o().createElement(b.Provider,{value:O},t)}const x=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},w=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r||l!==i&&o===a||!n&&(a===o||t!==s))},C={duration:200,easing:"ease"},S="transform",R=a.CSS.Transition.toString({property:S,duration:0,easing:"linear"}),E={roleDescription:"sortable"};function k(e){let{animateLayoutChanges:t=w,attributes:n,disabled:o,data:l,getNewIndex:s=x,id:c,strategy:d,resizeObserverConfig:f,transition:h=C}=e;const{items:v,containerId:p,activeIndex:g,disabled:m,disableTransforms:y,sortedRects:k,overIndex:j,useDragOverlay:D,strategy:O}=(0,r.useContext)(b),N=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,m),I=v.indexOf(c),M=(0,r.useMemo)(()=>({sortable:{containerId:p,index:I,items:v},...l}),[p,l,I,v]),T=(0,r.useMemo)(()=>v.slice(v.indexOf(c)),[v,c]),{rect:A,node:P,isOver:L,setNodeRef:z}=(0,i.useDroppable)({id:c,data:M,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:B,activatorEvent:F,activeNodeRect:W,attributes:K,setNodeRef:U,listeners:q,isDragging:_,over:Y,setActivatorNodeRef:H,transform:X}=(0,i.useDraggable)({id:c,data:M,attributes:{...E,...n},disabled:N.draggable}),V=(0,a.useCombinedRefs)(z,U),G=Boolean(B),J=G&&!y&&u(g)&&u(j),Q=!D&&_,Z=Q&&J?X:null,$=J?null!=Z?Z:(null!=d?d:O)({rects:k,activeNodeRect:W,activeIndex:g,overIndex:j,index:I}):null,ee=u(g)&&u(j)?s({id:c,items:v,activeIndex:g,overIndex:j}):I,te=null==B?void 0:B.id,ne=(0,r.useRef)({activeId:te,items:v,newIndex:ee,containerId:p}),re=v!==ne.current.items,oe=t({active:B,containerId:p,isDragging:_,isSorting:G,id:c,index:I,items:v,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:h,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:o,rect:l}=e;const[s,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,a.useIsomorphicLayoutEffect)(()=>{if(!t&&n!==u.current&&o.current){const e=l.current;if(e){const t=(0,i.getClientRect)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)},[t,n,o,l]),(0,r.useEffect)(()=>{s&&c(null)},[s]),s}({disabled:!oe,index:I,node:P,rect:A});return(0,r.useEffect)(()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),p!==ne.current.containerId&&(ne.current.containerId=p),v!==ne.current.items&&(ne.current.items=v)},[G,ee,p,v]),(0,r.useEffect)(()=>{if(te===ne.current.activeId)return;if(null!=te&&null==ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout(()=>{ne.current.activeId=te},50);return()=>clearTimeout(e)},[te]),{active:B,activeIndex:g,attributes:K,data:M,rect:A,index:I,newIndex:ee,items:v,isOver:L,isSorting:G,isDragging:_,listeners:q,node:P,overIndex:j,over:Y,setNodeRef:V,setActivatorNodeRef:H,setDroppableNodeRef:z,setDraggableNodeRef:U,transform:null!=ie?ie:$,transition:ie||re&&ne.current.newIndex===I?R:Q&&!(0,a.isKeyboardEvent)(F)||!h?void 0:G||oe?a.CSS.Transition.toString({...h,property:S}):void 0}}function j(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const D=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],O=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:l,over:s,scrollableAncestors:c}}=t;if(D.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case i.KeyboardCode.Down:r.top<a.top&&t.push(n);break;case i.KeyboardCode.Up:r.top>a.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case i.KeyboardCode.Right:r.left<a.left&&t.push(n)}});const f=(0,i.closestCorners)({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let h=(0,i.getFirstCollision)(f,"id");if(h===(null==s?void 0:s.id)&&f.length>1&&(h=f[1].id),null!=h){const e=l.get(n.id),t=l.get(h),s=t?o.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&s&&e&&t){const n=(0,i.getScrollableAncestors)(f).some((e,t)=>c[t]!==e),o=N(e,t),l=(d=t,!(!j(u=e)||!j(d))&&!!N(u,d)&&u.data.current.sortable.index<d.data.current.sortable.index),h=n||!o?{x:0,y:0}:{x:l?r.width-s.width:0,y:l?r.height-s.height:0},v={x:s.left,y:s.top};return h.x&&h.y?v:(0,a.subtract)(v,h)}}}var u,d};function N(e,t){return!(!j(e)||!j(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(23),o=function(e,t){return e.map(function(e){return e.permission?t.includes(e.permission)?e:null:e}).filter(function(e){return null!==e})};function i(){var e=(0,r.getUmiUseAccess)(),t=(e?e():{}).button_permissions,n=void 0===t?[]:t;return{filterAuthItems:function(e){return o(e,n)},permissions:n}}},(e,t,n)=>{var r;function o(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)&&"function"==typeof e.useAccess}function i(){if(void 0!==r)return r;if("undefined"!=typeof window){var e=window.__webpack_require__||n;if(e&&"function"==typeof e)try{if(o(i=e("@umijs/max")))return r=i.useAccess}catch(e){}}if("undefined"!=typeof window){var t=window.__UMI__||window.umi;if(o(t))return r=t.useAccess}try{var i;if(o(i=n(24)))return r=i.useAccess}catch(e){}r=null}n.r(t),n.d(t,{getUmiUseAccess:()=>i})},e=>{if(void 0===n){var t=new Error("Cannot find module 'undefined'");throw t.code="MODULE_NOT_FOUND",t}e.exports=n},(e,t,n)=>{n.r(t),n.d(t,{TableActions:()=>l});var r=n(2),o=n(14),i=n(3),a=i.theme.useToken;function l(e){var t=e.record,n=e.actions,l=e.divider,s=void 0===l||l,c=e.maxCount,u=void 0===c?3:c,d=a().token;if(n.length<=u)return(0,r.jsx)(i.Space,{split:!!s&&(0,r.jsx)(i.Divider,{type:"vertical"}),style:{whiteSpace:"nowrap",display:"flex",flexWrap:"nowrap"},children:n.map(function(e){var n,o,i;return(0,r.jsx)("a",{onClick:function(n){var r,o;n.stopPropagation(),(null===(r=e.disabled)||void 0===r?void 0:r.call(e,t))||null===(o=e.onClick)||void 0===o||o.call(e,t)},className:"action-link",style:{cursor:(null===(n=e.disabled)||void 0===n?void 0:n.call(e,t))?"not-allowed":"pointer",color:(null===(o=e.disabled)||void 0===o?void 0:o.call(e,t))?"#ccc":d.colorPrimary},children:null===(i=e.getText)||void 0===i?void 0:i.call(e,t)},e.key)})});var f=n.slice(0,u-1),h=n.slice(u-1),v=h.map(function(e){var n,r;return{key:e.key,label:null===(n=e.getText)||void 0===n?void 0:n.call(e,t),disabled:null===(r=e.disabled)||void 0===r?void 0:r.call(e,t),onClick:function(){var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,t)}}});return(0,r.jsxs)(i.Space,{split:!!s&&(0,r.jsx)(i.Divider,{type:"vertical"}),className:"table-actions-container",children:[f.map(function(e){return function(e){var n,o,i;return(0,r.jsx)("a",{onClick:function(){var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,t)},style:{cursor:(null===(n=e.disabled)||void 0===n?void 0:n.call(e,t))?"not-allowed":"pointer",color:(null===(o=e.disabled)||void 0===o?void 0:o.call(e,t))?"#ccc":d.colorPrimary},children:null===(i=e.getText)||void 0===i?void 0:i.call(e,t)},e.key)}(e)}),h.length>0&&(0,r.jsx)(i.Dropdown,{menu:{items:v},placement:"bottomRight",children:(0,r.jsx)(i.Button,{type:"link",icon:(0,r.jsx)(o.EllipsisOutlined,{}),style:{padding:0}})})]})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(2),o=n(23),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function l(e){return function(t){var n=t.permission,l=t.fallback,s=void 0===l?null:l,c=a(t,["permission","fallback"]),u=(0,o.getUmiUseAccess)(),d=u?u():null,f=(null==d?void 0:d.button_permissions)||[];return!n||f.includes(n)?(0,r.jsx)(e,i({},c)):s}}}],s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return l[e].call(n.exports,n,n.exports,c),n.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{BaseModal:()=>o.default,Cron:()=>e.default,CustomDrawer:()=>n.default,ErrorBoundary:()=>r.default,HocModal:()=>t.default,MFTablePro:()=>i.default});var e=c(1),t=c(7),n=c(8),r=c(10),o=c(11),i=c(13)})(),u})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ant-design/icons"),require("@ant-design/pro-components"),function(){try{return require("@umijs/max")}catch(e){}}(),require("antd"),require("react"),require("react-dom"),require("react/jsx-runtime")):"function"==typeof define&&define.amd?define(["@ant-design/icons","@ant-design/pro-components","@umijs/max","antd","react","react-dom","react/jsx-runtime"],t):"object"==typeof exports?exports.MFYAllInOne=t(require("@ant-design/icons"),require("@ant-design/pro-components"),function(){try{return require("@umijs/max")}catch(e){}}(),require("antd"),require("react"),require("react-dom"),require("react/jsx-runtime")):e.MFYAllInOne=t(e["@ant-design/icons"],e["@ant-design/pro-components"],e["@umijs/max"],e.antd,e.React,e.ReactDOM,e["react/jsx-runtime"])}(this,(e,t,n,r,o,i,a)=>(()=>{"use strict";var l=[,(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(2),o=n(3),i=n(4),a=n(5),l=n(6),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},c=["minute","hour","day","month","week"],u={display:"block",lineHeight:2};const d=(0,a.forwardRef)(function(e,t){var n=e.cronExpression,d=(0,a.useState)(""),f=d[0],h=d[1],v=(0,a.useState)({minute:1,hour:1,day:1,month:1,week:1}),p=v[0],g=v[1],m=(0,a.useState)({minute:{min:1,max:2},hour:{min:0,max:1},day:{min:1,max:2},month:{min:1,max:2},week:{min:2,max:3}}),b=m[0],y=m[1],x=(0,a.useState)({minute:{start:0,end:1},hour:{start:0,end:1},day:{start:1,end:1},month:{start:1,end:1},week:{start:1,end:1}}),w=x[0],C=x[1],S=(0,a.useState)({minute:[],hour:[],day:[],month:[],week:[]}),R=S[0],E=S[1],k=(0,a.useRef)(null),j=(0,a.useState)(void 0),D=j[0],O=j[1],N=function(e,t){switch(e){case"minute":return{minute:t};case"hour":return{hour:t};case"day":return{day:t};case"month":return{month:t};case"week":return{week:t};default:return{}}},I=function(){return f},M=function(){g({minute:1,hour:1,day:1,month:1,week:1}),y({minute:{min:1,max:2},hour:{min:0,max:1},day:{min:1,max:2},month:{min:1,max:2},week:{min:2,max:3}}),C({minute:{start:0,end:1},hour:{start:0,end:1},day:{start:1,end:1},month:{start:1,end:1},week:{start:1,end:1}}),E({minute:[],hour:[],day:[],month:[],week:[]}),h("")},T=function(e,t){for(var n=[],r=e;r<=t;r++)n.push({label:r,value:r});return n},A=function(e){for(var t=[],n=["","一","二","三","四","五","六","日"],r=1;r<=e;r++)t.push({label:"星期".concat(n[r]),value:r+1===8?1:r+1});return t},P=function(e,t){switch(t){case"week":g(s(s(s({},p),{day:2}),N(t,e.target.value)));break;case"day":g(s(s(s({},p),{week:2}),N(t,e.target.value)));break;default:g(s(s({},p),N(t,e.target.value)))}},L=function(e,t,n){var r,o;n(s(s({},R),((r={})[t]=e,r))),g(s(s({},p),((o={})[t]="point",o)))},z=function(e,t,n){var r=b;r[t]="max"===n?{max:e,min:r[t].min}:{max:r[t].max,min:e},y(s(s({},b),N(t,r[t])))},B=function(e,t,n){var r=w;r[t]="start"===n?{start:e,end:r[t].end}:{start:r[t].start,end:e},C(s(s({},w),N(t,r[t])))};return(0,a.useEffect)(function(){n?function(e){h(e);var t=e.split(" "),n={},r={},o={},i={};t.forEach(function(e,t){if(-1!==e.indexOf("/")&&-1!==e.indexOf("-")){n[c[t]]="loop";var a=e.split("/")[0],l=a.split("-")[0];o[c[t]]={start:"*"===a?0:Number(l),end:Number(e.split("/")[1])}}else-1!==e.indexOf("*")?n[c[t]]="*":-1!==e.indexOf("-")?(n[c[t]]="period",r[c[t]]={min:Number(e.split("-")[0]),max:Number(e.split("-")[1])}):(n[c[t]]="point",i[c[t]]=e.split(",").map(function(e){return Number(e)}))}),y(s(s({},b),r)),C(s(s({},w),o)),E(s(s({},R),i)),g(s(s({},p),n))}(n):M()},[n]),(0,a.useEffect)(function(){!function(){var e={};c.forEach(function(t){return e=s(s({},e),function(e){var t=p[e],n=b[e],r=w[e],o=R[e],i="";switch(t){case"*":default:i="*";break;case"point":for(var a=0,l=o;a<l.length;a++)i=i+l[a]+",";i=i.substring(0,i.length-1);break;case"period":i=n.min+"-"+n.max;break;case"loop":i=r.start+"-"+{minute:59,hour:23,day:31,month:12,week:7}[e]+"/"+r.end}return N(e,i)}(t))});var t=e.minute,n=e.hour,r=e.day,o=e.month,i=e.week;h(t+" "+n+" "+r+" "+o+" "+i)}()},[p,b,w]),(0,a.useImperativeHandle)(t,function(){return{refGetCron:I,resetCronState:M,getValidateStatus:function(){return D}}}),(0,a.useEffect)(function(){var e;!function(e){(0,i.isValidCron)(e)?null==O||O("success"):null==O||O("error")}(f),null===(e=k.current)||void 0===e||e.setFieldsValue({cronText:f})},[f]),(0,r.jsxs)("div",{className:l.default.cronCom,children:[(0,r.jsx)(o.Tabs,{type:"card",items:[{label:"分",key:"minute",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{value:p.minute,onChange:function(e){return P(e,"minute")},children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每分执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:58,value:b.minute.min,onChange:function(e){return z(e,"minute","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:59,value:b.minute.max,onChange:function(e){return z(e,"minute","max")}}),"分"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:58,value:w.minute.start,onChange:function(e){return B(e,"minute","start")}}),"分开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:58,value:w.minute.end,onChange:function(e){return B(e,"minute","end")}}),"分执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.minute,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择分钟",onChange:function(e){return L(e,"minute",E)},options:T(0,59)})})]})]})})},{label:"时",key:"hour",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"hour")},value:p.hour,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每小时执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:22,value:b.hour.min,onChange:function(e){return z(e,"hour","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:23,value:b.hour.max,onChange:function(e){return z(e,"hour","max")}}),"时"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:0,max:22,value:w.hour.start,onChange:function(e){return B(e,"hour","start")}}),"时开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:22,value:w.hour.end,onChange:function(e){return B(e,"hour","end")}}),"时执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.hour,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择小时",onChange:function(e){return L(e,"hour",E)},options:T(0,23)})})]})]})})},{label:"日",key:"day",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"day")},value:p.day,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每日执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:30,value:b.day.min,onChange:function(e){return z(e,"day","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:31,value:b.day.max,onChange:function(e){return z(e,"day","max")}}),"日"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:31,value:w.day.start,onChange:function(e){return B(e,"day","start")}}),"日开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:31,value:w.day.end,onChange:function(e){return B(e,"day","end")}}),"日执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.day,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择日期",onChange:function(e){return L(e,"day",E)},options:T(1,31)})})]})]})})},{label:"月",key:"month",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"month")},value:p.month,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每月执行"}),(0,r.jsxs)(o.Radio,{style:u,value:"period",children:["周期从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:11,value:b.month.min,onChange:function(e){return z(e,"month","min")}}),"-",(0,r.jsx)(o.InputNumber,{size:"small",min:2,max:12,value:b.month.max,onChange:function(e){return z(e,"month","max")}}),"月"]}),(0,r.jsxs)(o.Radio,{style:u,value:"loop",children:["从",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:12,value:w.month.start,onChange:function(e){return B(e,"month","start")}}),"月开始,每",(0,r.jsx)(o.InputNumber,{size:"small",min:1,max:12,value:w.month.end,onChange:function(e){return B(e,"month","end")}}),"月执行一次"]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.month,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择月份",onChange:function(e){return L(e,"month",E)},options:T(1,12)})})]})]})})},{label:"周",key:"week",children:(0,r.jsx)(o.Card,{children:(0,r.jsxs)(o.Radio.Group,{onChange:function(e){return P(e,"week")},value:p.week,children:[(0,r.jsx)(o.Radio,{style:u,value:"*",children:"每周执行"}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Radio,{style:u,value:"period",children:"周期从 周"})}),(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Select,{style:{marginTop:7},allowClear:!0,value:b.week.min,placeholder:"请选择周",onChange:function(e){return z(e,"week","min")},options:A(7)})}),(0,r.jsx)(o.Col,{className:l.default.weekFont,children:"- 周"}),(0,r.jsx)(o.Col,{children:(0,r.jsx)(o.Select,{style:{marginTop:7},allowClear:!0,value:b.week.max,placeholder:"请选择周",onChange:function(e){return z(e,"week","max")},options:A(7)})})]}),(0,r.jsxs)(o.Row,{children:[(0,r.jsx)(o.Radio,{style:u,value:"point",children:"指定"}),(0,r.jsx)(o.Col,{span:18,children:(0,r.jsx)(o.Select,{value:R.week,style:{width:"80%",marginTop:7},mode:"multiple",allowClear:!0,placeholder:"请选择周",onChange:function(e){return L(e,"week",E)},options:A(7)})})]})]})})}]}),(0,r.jsx)(o.Form,{className:l.default.cronPreview,ref:k,children:(0,r.jsx)(o.Form.Item,{label:"预览",name:"cronText",className:l.default.cronPreviewItem,hasFeedback:!0,validateStatus:D,children:(0,r.jsx)(o.Input,{readOnly:!0,style:{width:150}})})})]})})},e=>{e.exports=a},e=>{e.exports=r},function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidCron=void 0;var r=function(e){return/^\d+$/.test(e)?Number(e):NaN},o=function(e){return"?"===e},i=function(e,t,n){return e>=t&&e<=n},a=function(e,t,n){return-1===e.search(/[^\d-,\/*]/)&&e.split(",").every(function(e){var o=e.split("/");if(e.trim().endsWith("/"))return!1;if(o.length>2)return!1;var a=o[0],l=o[1];return function(e,t,n){var o=e.split("-");switch(o.length){case 1:return function(e){return"*"===e}(e)||i(r(e),t,n);case 2:var a=o.map(function(e){return r(e)}),l=a[0],s=a[1];return l<=s&&i(l,t,n)&&i(s,t,n);default:return!1}}(a,t,n)&&function(e){return void 0===e||-1===e.search(/[^\d]/)&&r(e)>0}(l)})},l={jan:"1",feb:"2",mar:"3",apr:"4",may:"5",jun:"6",jul:"7",aug:"8",sep:"9",oct:"10",nov:"11",dec:"12"},s={sun:"0",mon:"1",tue:"2",wed:"3",thu:"4",fri:"5",sat:"6"},c={alias:!1,seconds:!1,allowBlankDay:!1,allowSevenAsSunday:!1,allowNthWeekdayOfMonth:!1};t.isValidCron=function(e,t){var u=n(n({},c),t),d=function(e){return e.trim().split(/\s+/)}(e);if(d.length>(u.seconds?6:5)||d.length<5)return!1;var f=[];if(6===d.length){var h=d.shift();h&&f.push(function(e){return a(e,0,59)}(h))}var v=d[0],p=d[1],g=d[2],m=d[3],b=d[4];return f.push(function(e){return a(e,0,59)}(v)),f.push(function(e){return a(e,0,23)}(p)),f.push(function(e,t){return t&&o(e)||a(e,1,31)}(g,u.allowBlankDay)),f.push(function(e,t){if(-1!==e.search(/\/[a-zA-Z]/))return!1;if(t){var n=e.toLowerCase().replace(/[a-z]{3}/g,function(e){return void 0===l[e]?e:l[e]});return a(n,1,12)}return a(e,1,12)}(m,u.alias)),f.push(function(e,t){var n=t.allowBlankDay,l=t.alias,c=t.allowSevenAsSunday,u=t.allowNthWeekdayOfMonth;if(n&&o(e))return!0;if(!n&&o(e))return!1;if(-1!==e.search(/\/[a-zA-Z]/))return!1;var d=l?e.toLowerCase().replace(/[a-z]{3}/g,function(e){return void 0===s[e]?e:s[e]}):e,f=c?7:6,h=d.split("#");if(u&&h.length>=2){var v=h[0],p=h[1];return 0===h.slice(2).length&&i(r(p),1,5)&&i(r(v),0,f)}return a(d,0,f)}(b,u)),f.push(function(e,t,n){return!(n&&o(e)&&o(t))}(g,b,u.allowBlankDay)),f.every(Boolean)}},e=>{e.exports=o},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={cronCom:"e7oYFhCg",weekFont:"JfHnCB3v",cronPreview:"LtUTe0iw",cronPreviewItem:"Rycw1CzW"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(2),o=n(5),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e){return(0,o.forwardRef)(function(t,n){var a=(0,o.useState)(!1),l=a[0],s=a[1],c=(0,o.useRef)(null);(0,o.useImperativeHandle)(n,function(){return{show:function(e){c.current=e,s(!0)},hide:function(){s(!1)}}});var u=function(){s(!1)},d=(0,o.useMemo)(function(){return(0,r.jsx)(e,i({},t,{visible:l,handleCancel:u},c.current))},[l]);return(0,r.jsx)(r.Fragment,{children:l?d:null})})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(2),o=n(3);n(9);const i=function(e){var t=e.title,n=e.open,i=e.onClose,a=e.onConfirm,l=e.children,s=e.width,c=e.closable,u=e.cancelText,d=e.okText,f=e.footer,h=e.className,v=e.extra,p=void 0===v?null:v;return(0,r.jsx)(o.Drawer,{title:(0,r.jsx)("div",{style:{float:"left"},children:t}),placement:"right",className:h,closable:c,onClose:i,width:s,open:n,footer:f||(0,r.jsx)("div",{className:"custom-footer",children:(0,r.jsxs)(o.Space,{children:[(0,r.jsx)(o.Button,{onClick:i,children:u||"取消"}),(0,r.jsx)(o.Button,{type:"primary",onClick:a,children:d||"确定"})]})}),extra:p,children:l})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={"custom-footer":"e78eQqzW"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(2),o=n(3),i=n(5);function a(e){var t=e.children,n=e.onError,a=(0,i.useState)({hasError:!1}),l=a[0],s=a[1],c=(0,i.useCallback)(function(e,t){s({hasError:!0,error:e,errorInfo:t}),n&&n(e,t),console.error("Error caught by boundary:",e,t)},[n]);return(0,i.useEffect)(function(){var e=function(e){c(e,{isAsync:!0,timestamp:(new Date).toISOString()})},t=function(t){t.preventDefault(),e(t.reason)},n=function(t){t.preventDefault(),e(t.error)};return window.addEventListener("unhandledrejection",t),window.addEventListener("error",n),function(){window.removeEventListener("unhandledrejection",t),window.removeEventListener("error",n)}},[c]),l.hasError&&l.error?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.Result,{status:"error",title:"System Failed",subTitle:"Please check and modify the following information before resubmitting.",extra:[(0,r.jsx)(o.Button,{type:"primary",onClick:function(){return window.location.reload()},children:"刷新页面"},"console")]})}):(0,r.jsx)(r.Fragment,{children:t})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var r=n(2),o=n(3),i=n(5),a=n.n(i),l=(n(12),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)});const s=a().memo(function(e){var t=e.title,n=e.visible,i=e.onOk,a=e.onCancel,s=e.children,c=e.width,u=e.afterClose,d=e.okText,f=e.confirmLoading,h=void 0!==f&&f,v=e.footer,p=void 0===v?void 0:v,g=e.wrapClassName,m=void 0===g?"":g,b=e.cancelText,y=e.className,x=void 0===y?"":y,w=e.keyboard,C=void 0===w||w,S=e.maskClosable,R=void 0===S||S,E=e.mask,k=void 0===E||E,j=e.getContainer,D=e.closable,O=void 0===D||D,N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["title","visible","onOk","onCancel","children","width","afterClose","okText","confirmLoading","footer","wrapClassName","cancelText","className","keyboard","maskClosable","mask","getContainer","closable"]);return(0,r.jsx)(o.Modal,l({mask:k,width:c||320,title:t,open:n,onOk:i,onCancel:a,wrapClassName:"".concat(m," base-modal"),centered:!0,afterClose:u,okText:d||"确定",cancelText:b||"取消",confirmLoading:h,footer:p,destroyOnClose:!0,className:x,keyboard:C,maskClosable:R,getContainer:j,closable:O},N,{children:s}))})},(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r={"base-modal":"CxPW7ExN","ant-modal-content":"z6YlwWqq","ant-modal-header":"zchHCvCS","ant-modal-body":"bbgQiDnW","ant-modal-title":"_1_pO_m4v","ant-modal-close-x":"INZqkK6a","ant-modal-footer":"FIdaNzCU","ant-btn":"meCBkyo5","ant-dropdown-trigger":"BRgReB6h"}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var r=n(5),o=n.n(r),i=n(2),a=n(14),l=n(15),s=n(16),c=n(20),u=n(21),d=n(18),f=n(3),h=n(22),v=n(25),p=n(26),g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}s((r=r.apply(e,t||[])).next())})},b=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},y=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},x=o().createContext({}),w=function(){var e=(0,r.useContext)(x),t=e.setActivatorNodeRef,n=e.listeners;return(0,i.jsx)(f.Button,g({type:"text",size:"small",icon:(0,i.jsx)(a.HolderOutlined,{}),style:{cursor:"move"},ref:t},n))},C=function(e){var t=(0,u.useSortable)({id:e["data-row-key"]}),n=t.attributes,o=t.listeners,a=t.setNodeRef,l=t.setActivatorNodeRef,s=t.transform,c=t.transition,f=t.isDragging,h=g(g(g({},e.style),{transform:d.CSS.Translate.toString(s),transition:c}),f?{position:"relative",zIndex:9999}:{}),v=(0,r.useMemo)(function(){return{setActivatorNodeRef:l,listeners:o}},[l,o]);return(0,i.jsx)(x.Provider,{value:v,children:(0,i.jsx)("tr",g({},e,{ref:a,style:h},n))})},S=o().memo(function(e){return(0,r.createElement)(C,g({},e,{key:e["data-row-key"]}))}),R=(0,p.default)(f.Button);const E=(0,r.forwardRef)(function(e,t){var n=e.columns,o=e.form,a=e.multiFooter,d=e.toolBarRender,p=e.headerTitle,x=e.dataSource,C=e.onChange,E=e.fetchData,k=e.yHeight,j=e.labelWidth,D=e.searchButton,O=e.onSubmit,N=e.enableDrag,I=e.options,M=e.handleDragFuc,T=e.searchShow,A=void 0===T||T,P=e.rowSelection,L=e.queryParams,z=e.searchParams,B=e.rowKey,F=e.customPageSize,W=e.pagination,K=e.tableAlertRender,U=void 0!==K&&K,q=e.selectedRows,_=e.actionColumn,Y=e.onRow,H=e.beforeSearchSubmit,X=e.scroll,V=e.span,G=e.columnsStateKey,J=e.columnsIgnoreKeys,Q=e.defaultColumnKeys,Z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["columns","form","multiFooter","toolBarRender","headerTitle","dataSource","onChange","fetchData","yHeight","labelWidth","searchButton","onSubmit","enableDrag","options","handleDragFuc","searchShow","rowSelection","queryParams","searchParams","rowKey","customPageSize","pagination","tableAlertRender","selectedRows","actionColumn","onRow","beforeSearchSubmit","scroll","span","columnsStateKey","columnsIgnoreKeys","defaultColumnKeys"]),$=(0,r.useRef)(null),ee=(0,r.useState)([]),te=ee[0],ne=ee[1],re=(0,r.useState)(function(){var e=G?localStorage.getItem(G):null;if(e)return JSON.parse(e);var t=null==n?void 0:n.filter(function(e){return!e.hideInTable}),r={};return G?(null==t||t.forEach(function(e){(null==e?void 0:e.key)&&(null==J?void 0:J.includes(null==e?void 0:e.key))?r[null==e?void 0:e.key]={show:!0,disable:{checkbox:!0}}:(null==Q?void 0:Q.includes(null==e?void 0:e.key))?r[null==e?void 0:e.key]={show:!0}:r[null==e?void 0:e.key]={show:!1}}),r):(null==t||t.forEach(function(e){r[null==e?void 0:e.key]={show:!0}}),r)}),oe=re[0],ie=re[1];(0,r.useEffect)(function(){G&&localStorage.setItem(G,JSON.stringify(oe))},[oe]),(0,r.useEffect)(function(){ne(x||[])},[x]),(0,r.useImperativeHandle)(t,function(){return{reload:function(){return m(void 0,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:return[4,null===(e=$.current)||void 0===e?void 0:e.reload()];case 1:return t.sent(),[2]}})})},reloadAndReset:function(){return m(void 0,void 0,void 0,function(){var e,t;return b(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=$.current)||void 0===e?void 0:e.reloadAndRest)||void 0===t?void 0:t.call(e)];case 1:return n.sent(),[2]}})})}}});var ae=(0,h.default)().filterAuthItems,le=(0,r.useMemo)(function(){var e=y([],n||[],!0),t=ae((null==_?void 0:_.actions)||[]);if(_&&t.length>0){var r={title:"操作",dataIndex:"option",valueType:"option",fixed:"right",width:70*t.length,render:function(e,n){return t.length>0?(0,i.jsx)(v.TableActions,{record:n,actions:t,maxCount:_.maxCount}):null}};e.push(r)}return N&&(e=y([{key:"dragTag",align:"center",hideInSearch:!0,width:80,render:function(){return(0,i.jsx)(w,{})}}],e,!0)),e},[N,n,_]);return(0,i.jsxs)(i.Fragment,{children:[N?(0,i.jsx)(s.DndContext,{modifiers:[c.restrictToVerticalAxis],onDragEnd:function(e){var t=e.active,n=e.over;if(t.id!==(null==n?void 0:n.id)){var r=te.findIndex(function(e){return e.id===t.id}),o=te[r],i=te.findIndex(function(e){return e.id===(null==n?void 0:n.id)}),a=te[i],l=(0,u.arrayMove)(te,r,i);ne(l),null==M||M(o,a,l)}},children:(0,i.jsx)(u.SortableContext,{items:te.map(function(e){return e.id||""}),strategy:u.verticalListSortingStrategy,children:(0,i.jsx)(l.ProTable,g({headerTitle:p,actionRef:$,rowKey:B,form:o,options:I,virtual:k,components:{body:{row:S}},pagination:!1!==W&&g({defaultPageSize:10,showSizeChanger:!0,pageSizeOptions:["10","20","50","100"],showTotal:function(e){return"共 ".concat(e," 条")},showQuickJumper:!0},"object"==typeof W?W:{}),dataSource:te,onSubmit:O,tableAlertRender:U,request:function(e,t){return m(void 0,void 0,void 0,function(){var n,r,o,i,a,l,s,c,u,d;return b(this,function(f){switch(f.label){case 0:return delete(n=g({},e)).current,delete n.pageSize,delete n.search,r=Object.keys(t)[0],[4,null==E?void 0:E(g(g(g({page:e.current,page_size:F||e.pageSize,sort_by:t[r]&&("ascend"===t[r]?r:"-"+r),search:e.search},z),L),n))];case 1:return o=f.sent(),0===(null===(a=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.list)||void 0===a?void 0:a.length)&&e.current>1?((null===(l=null==$?void 0:$.current)||void 0===l?void 0:l.setPageInfo)&&$.current.setPageInfo({current:e.current-1}),[4,null===(s=$.current)||void 0===s?void 0:s.reload(!1)]):[3,3];case 2:return f.sent(),[3,4];case 3:ne((null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.list)||[]),f.label=4;case 4:return[2,{data:(null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.list)||[],success:0===(null==o?void 0:o.code),total:(null===(d=null==o?void 0:o.data)||void 0===d?void 0:d.total)||0}]}})})},search:!!A&&{labelWidth:j,span:V||6,optionRender:function(e,t,n){return y(y([],n,!0),[null==D?void 0:D.map(function(e){return(0,i.jsx)(R,{type:e.type,permission:e.permission,onClick:e.onClick,children:e.text},e.key)})],!1)}},toolBarRender:!!d&&function(){return null==d?void 0:d.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)})},onChange:C,scroll:{y:k},columns:le,rowSelection:P&&g(g({},P),{getCheckboxProps:function(e){var t;return g({},null===(t=P.getCheckboxProps)||void 0===t?void 0:t.call(P,e))}}),onRow:Y,beforeSearchSubmit:H},Z))})}):(0,i.jsx)(l.ProTable,g({headerTitle:p,actionRef:$,rowKey:B,form:o,options:I,virtual:k,dataSource:x,pagination:!1!==W&&g({defaultPageSize:10,showSizeChanger:!0,pageSizeOptions:["10","20","50","100"],showTotal:function(e){return"共 ".concat(e," 条")},showQuickJumper:!0},"object"==typeof W?W:{}),tableAlertRender:U,onSubmit:O,request:function(e,t){return m(void 0,void 0,void 0,function(){var n,r,o,i,a,l,s,c,u,d;return b(this,function(f){switch(f.label){case 0:return delete(n=g({},e)).current,delete n.pageSize,delete n.search,r=Object.keys(t)[0],[4,null==E?void 0:E(g(g(g({page:e.current,page_size:F||e.pageSize,sort_by:t[r]&&("ascend"===t[r]?r:"-"+r),search:e.search},z),L),n))];case 1:return o=f.sent(),0===(null===(a=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.list)||void 0===a?void 0:a.length)&&e.current>1?((null===(l=null==$?void 0:$.current)||void 0===l?void 0:l.setPageInfo)&&$.current.setPageInfo({current:e.current-1}),[4,null===(s=$.current)||void 0===s?void 0:s.reload(!1)]):[3,3];case 2:return f.sent(),[3,4];case 3:ne((null===(c=null==o?void 0:o.data)||void 0===c?void 0:c.list)||[]),f.label=4;case 4:return[2,{data:(null===(u=null==o?void 0:o.data)||void 0===u?void 0:u.list)||[],success:0===(null==o?void 0:o.code),total:(null===(d=null==o?void 0:o.data)||void 0===d?void 0:d.total)||0}]}})})},search:!!A&&{labelWidth:j,span:V||6,optionRender:function(e,t,n){return y(y([],n,!0),[null==D?void 0:D.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,children:e.text},e.key)})],!1)}},toolBarRender:!!d&&function(){return null==d?void 0:d.map(function(e){return e.isPopover&&e.popoverProps?(0,r.createElement)(f.Popconfirm,g({},e.popoverProps,{key:e.key}),(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)):(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,disabled:!!e.disabled,children:e.text},e.key)})},onChange:C,scroll:X||{y:k},columns:le,rowSelection:P&&g(g({},P),{getCheckboxProps:function(e){var t;return g({},null===(t=P.getCheckboxProps)||void 0===t?void 0:t.call(P,e))}}),onRow:Y,beforeSearchSubmit:H,columnsState:{value:oe,onChange:ie}},Z)),q&&q.length>0&&(null==a?void 0:a.length)>0&&(0,i.jsx)(l.FooterToolbar,{extra:(0,i.jsxs)("div",{children:["已选择"," ",(0,i.jsx)("a",{style:{fontWeight:600,color:"#e80808"},children:q.length})," ","项"]}),children:a&&(null==a?void 0:a.map(function(e){return(0,i.jsx)(R,{permission:e.permission,type:e.type,onClick:e.onClick,children:e.text},e.key)}))})]})})},t=>{t.exports=e},e=>{e.exports=t},(e,t,n)=>{n.r(t),n.d(t,{AutoScrollActivator:()=>ye,DndContext:()=>Ve,DragOverlay:()=>ht,KeyboardCode:()=>re,KeyboardSensor:()=>se,MeasuringFrequency:()=>Se,MeasuringStrategy:()=>Ce,MouseSensor:()=>ge,PointerSensor:()=>he,TouchSensor:()=>be,TraversalOrder:()=>xe,applyModifiers:()=>Ye,closestCenter:()=>E,closestCorners:()=>k,defaultAnnouncements:()=>d,defaultCoordinates:()=>m,defaultDropAnimation:()=>ut,defaultDropAnimationSideEffects:()=>ct,defaultKeyboardCoordinateGetter:()=>le,defaultScreenReaderInstructions:()=>u,getClientRect:()=>L,getFirstCollision:()=>S,getScrollableAncestors:()=>B,pointerWithin:()=>N,rectIntersection:()=>D,useDndContext:()=>$e,useDndMonitor:()=>c,useDraggable:()=>Ze,useDroppable:()=>nt,useSensor:()=>p,useSensors:()=>g});var r=n(5),o=n.n(r),i=n(17),a=n(18),l=n(19);const s=(0,r.createContext)(null);function c(e){const t=(0,r.useContext)(s);(0,r.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}const u={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=d,container:n,hiddenTextDescribedById:s,screenReaderInstructions:f=u}=e;const{announce:h,announcement:v}=(0,l.useAnnouncement)(),p=(0,a.useUniqueId)("DndLiveRegion"),[g,m]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{m(!0)},[]),c((0,r.useMemo)(()=>({onDragStart(e){let{active:n}=e;h(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&h(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;h(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;h(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;h(t.onDragCancel({active:n,over:r}))}}),[h,t])),!g)return null;const b=o().createElement(o().Fragment,null,o().createElement(l.HiddenText,{id:s,value:f.draggable}),o().createElement(l.LiveRegion,{id:p,announcement:v}));return n?(0,i.createPortal)(b,n):b}var h;function v(){}function p(e,t){return(0,r.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(h||(h={}));const m=Object.freeze({x:0,y:0});function b(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y(e,t){const n=(0,a.getEventCoordinates)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function S(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function R(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const E=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=R(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=b(R(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(x)},k=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=o.reduce((e,t,r)=>e+b(n[r],t),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(x)};function j(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const D=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=j(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(w)};function O(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const N=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const e of t){const{id:t}=e,i=n.get(t);if(i&&O(r,i)){const n=C(i).reduce((e,t)=>e+b(r,t),0),a=Number((n/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:a}})}}return o.sort(x)};function I(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function M(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const T=M(1);function A(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const P={ignoreTransform:!1};function L(e,t){void 0===t&&(t=P);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=A(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:l,bottom:s,right:c}}function z(e){return L(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.isDocument)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.isHTMLElement)(o)||(0,a.isSVGElement)(o))return n;if(n.includes(o))return n;const i=(0,a.getWindow)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=(0,a.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function F(e){const[t]=B(e,1);return null!=t?t:null}function W(e){return a.canUseDOM&&e?(0,a.isWindow)(e)?e:(0,a.isNode)(e)?(0,a.isDocument)(e)||e===(0,a.getOwnerDocument)(e).scrollingElement?window:(0,a.isHTMLElement)(e)?e:null:null:null}function K(e){return(0,a.isWindow)(e)?e.scrollX:e.scrollLeft}function U(e){return(0,a.isWindow)(e)?e.scrollY:e.scrollTop}function q(e){return{x:K(e),y:U(e)}}var _;function Y(e){return!(!a.canUseDOM||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=Y(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(_||(_={}));const X={x:.2,y:.2};function V(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=X);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=H(e),h={x:0,y:0},v={x:0,y:0},p=t.height*o.y,g=t.width*o.x;return!c&&i<=t.top+p?(h.y=_.Backward,v.y=r*Math.abs((t.top+p-i)/p)):!u&&s>=t.bottom-p&&(h.y=_.Forward,v.y=r*Math.abs((t.bottom-p-s)/p)),!f&&l>=t.right-g?(h.x=_.Forward,v.x=r*Math.abs((t.right-g-l)/g)):!d&&a<=t.left+g&&(h.x=_.Backward,v.x=r*Math.abs((t.left+g-a)/g)),{direction:h,speed:v}}function G(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function J(e){return e.reduce((e,t)=>(0,a.add)(e,q(t)),m)}function Q(e,t){if(void 0===t&&(t=L),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);F(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Z=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+K(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+U(t),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=J(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Z)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ee{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function te(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ne,re;function oe(e){e.preventDefault()}function ie(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ne||(ne={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(re||(re={}));const ae={start:[re.Space,re.Enter],cancel:[re.Esc],end:[re.Space,re.Enter,re.Tab]},le=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case re.Right:return{...n,x:n.x+25};case re.Left:return{...n,x:n.x-25};case re.Down:return{...n,y:n.y+25};case re.Up:return{...n,y:n.y-25}}};class se{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ee((0,a.getOwnerDocument)(t)),this.windowListeners=new ee((0,a.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ne.Resize,this.handleCancel),this.windowListeners.add(ne.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ne.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Q(n),t(m)}handleKeyDown(e){if((0,a.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=ae,coordinateGetter:i=le,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:m;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,a.subtract)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=H(n),h=G(n),v={x:Math.min(o===re.Right?h.right-h.width/2:h.right,Math.max(o===re.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===re.Down?h.bottom-h.height/2:h.bottom,Math.max(o===re.Down?h.top:h.top+h.height/2,d.y))},p=o===re.Right&&!a||o===re.Left&&!s,g=o===re.Down&&!c||o===re.Up&&!i;if(p&&v.x!==d.x){const e=n.scrollLeft+t.x,i=o===re.Right&&e<=u.x||o===re.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===re.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(g&&v.y!==d.y){const e=n.scrollTop+t.y,i=o===re.Down&&e<=u.y||o===re.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===re.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,a.add)((0,a.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function ce(e){return Boolean(e&&"distance"in e)}function ue(e){return Boolean(e&&"delay"in e)}se.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ae,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class de{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.getWindow)(e);return e instanceof t?e:(0,a.getOwnerDocument)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=(0,a.getOwnerDocument)(i),this.documentListeners=new ee(this.document),this.listeners=new ee(n),this.windowListeners=new ee((0,a.getWindow)(i)),this.initialCoordinates=null!=(r=(0,a.getEventCoordinates)(o))?r:m,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ne.Resize,this.handleCancel),this.windowListeners.add(ne.DragStart,oe),this.windowListeners.add(ne.VisibilityChange,this.handleCancel),this.windowListeners.add(ne.ContextMenu,oe),this.documentListeners.add(ne.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ue(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(ce(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ne.Click,ie,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ne.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,a.getEventCoordinates)(e))?t:m,c=(0,a.subtract)(r,s);if(!n&&l){if(ce(l)){if(null!=l.tolerance&&te(c,l.tolerance))return this.handleCancel();if(te(c,l.distance))return this.handleStart()}return ue(l)&&te(c,l.tolerance)?this.handleCancel():void this.handlePending(l,c)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===re.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const fe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class he extends de{constructor(e){const{event:t}=e,n=(0,a.getOwnerDocument)(t.target);super(e,fe,n)}}he.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const ve={move:{name:"mousemove"},end:{name:"mouseup"}};var pe;!function(e){e[e.RightClick=2]="RightClick"}(pe||(pe={}));class ge extends de{constructor(e){super(e,ve,(0,a.getOwnerDocument)(e.event.target))}}ge.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==pe.RightClick&&(null==r||r({event:n}),!0)}}];const me={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class be extends de{constructor(e){super(e,me)}static setup(){return window.addEventListener(me.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(me.move.name,e)};function e(){}}}var ye,xe;be.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ye||(ye={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const we={x:{[_.Backward]:!1,[_.Forward]:!1},y:{[_.Backward]:!1,[_.Forward]:!1}};var Ce,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ce||(Ce={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const Re=new Map;function Ee(e,t){return(0,a.useLazyMemo)(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function ke(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return(0,r.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function je(e){return new $(L(e),e)}function De(e,t,n){void 0===t&&(t=je);const[o,i]=(0,r.useState)(null);function l(){i(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const s=function(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return(0,r.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),c=ke({callback:l});return(0,a.useIsomorphicLayoutEffect)(()=>{l(),e?(null==c||c.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==c||c.disconnect(),null==s||s.disconnect())},[e]),o}const Oe=[];function Ne(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{n.current=null},t),(0,r.useEffect)(()=>{const t=e!==m;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?(0,a.subtract)(e,n.current):m}function Ie(e){return(0,r.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Me=[];function Te(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.isHTMLElement)(t)?t:e}const Ae=[{sensor:he,options:{}},{sensor:se,options:{}}],Pe={current:{}},Le={draggable:{measure:z},droppable:{measure:z,strategy:Ce.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:L}};class ze extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Be={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ze,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:v},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Le,measureDroppableContainers:v,windowRect:null,measuringScheduled:!1},Fe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:v,draggableNodes:new Map,over:null,measureDroppableContainers:v},We=(0,r.createContext)(Fe),Ke=(0,r.createContext)(Be);function Ue(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ze}}}function qe(e,t){switch(t.type){case h.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case h.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case h.DragEnd:case h.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case h.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ze(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case h.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new ze(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case h.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new ze(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function _e(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(We),l=(0,a.usePrevious)(o),s=(0,a.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)(()=>{if(!t&&!o&&l&&null!=s){if(!(0,a.isKeyboardEvent)(l))return;if(document.activeElement===l.target)return;const e=i.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,a.findFirstFocusableNode)(e);if(t){t.focus();break}}})}},[o,t,i,s,l]),null}function Ye(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const He=(0,r.createContext)({...m,scaleX:1,scaleY:1});var Xe;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Xe||(Xe={}));const Ve=(0,r.memo)(function(e){var t,n,l,c;let{id:u,accessibility:d,autoScroll:v=!0,children:p,sensors:g=Ae,collisionDetection:b=D,measuring:y,modifiers:x,...w}=e;const C=(0,r.useReducer)(qe,void 0,Ue),[R,E]=C,[k,j]=function(){const[e]=(0,r.useState)(()=>new Set),t=(0,r.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,r.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[O,N]=(0,r.useState)(Xe.Uninitialized),M=O===Xe.Initialized,{draggable:{active:A,nodes:P,translate:z},droppable:{containers:K}}=R,U=null!=A?P.get(A):null,H=(0,r.useRef)({initial:null,translated:null}),X=(0,r.useMemo)(()=>{var e;return null!=A?{id:A,data:null!=(e=null==U?void 0:U.data)?e:Pe,rect:H}:null},[A,U]),G=(0,r.useRef)(null),[Q,Z]=(0,r.useState)(null),[ee,te]=(0,r.useState)(null),ne=(0,a.useLatestValue)(w,Object.values(w)),re=(0,a.useUniqueId)("DndDescribedBy",u),oe=(0,r.useMemo)(()=>K.getEnabled(),[K]),ie=(ae=y,(0,r.useMemo)(()=>({draggable:{...Le.draggable,...null==ae?void 0:ae.draggable},droppable:{...Le.droppable,...null==ae?void 0:ae.droppable},dragOverlay:{...Le.dragOverlay,...null==ae?void 0:ae.dragOverlay}}),[null==ae?void 0:ae.draggable,null==ae?void 0:ae.droppable,null==ae?void 0:ae.dragOverlay]));var ae;const{droppableRects:le,measureDroppableContainers:se,measuringScheduled:ce}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,s]=(0,r.useState)(null),{frequency:c,measure:u,strategy:d}=i,f=(0,r.useRef)(e),h=function(){switch(d){case Ce.Always:return!1;case Ce.BeforeDragging:return n;default:return!n}}(),v=(0,a.useLatestValue)(h),p=(0,r.useCallback)(function(e){void 0===e&&(e=[]),v.current||s(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[v]),g=(0,r.useRef)(null),m=(0,a.useLazyMemo)(t=>{if(h&&!n)return Re;if(!t||t===Re||f.current!==e||null!=l){const t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new $(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,l,n,h,u]);return(0,r.useEffect)(()=>{f.current=e},[e]),(0,r.useEffect)(()=>{h||p()},[n,h]),(0,r.useEffect)(()=>{l&&l.length>0&&s(null)},[JSON.stringify(l)]),(0,r.useEffect)(()=>{h||"number"!=typeof c||null!==g.current||(g.current=setTimeout(()=>{p(),g.current=null},c))},[c,h,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:null!=l}}(oe,{dragging:M,dependencies:[z.x,z.y],config:ie.droppable}),ue=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.useLazyMemo)(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(P,A),de=(0,r.useMemo)(()=>ee?(0,a.getEventCoordinates)(ee):null,[ee]),fe=function(){const e=!1===(null==Q?void 0:Q.autoScrollEnabled),t="object"==typeof v?!1===v.enabled:!1===v,n=M&&!e&&!t;return"object"==typeof v?{...v,enabled:n}:{enabled:n}}(),he=function(e,t){return Ee(e,t)}(ue,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof i?{x:i,y:i}:i;(0,a.useIsomorphicLayoutEffect)(()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=I(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=F(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,s,c,o,n])}({activeNode:null!=A?P.get(A):null,config:fe.layoutShiftCompensation,initialRect:he,measure:ie.draggable.measure});const ve=De(ue,ie.draggable.measure,he),pe=De(ue?ue.parentElement:null),ge=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),me=K.getNodeFor(null==(t=ge.current.over)?void 0:t.id),be=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=ke({callback:(0,r.useCallback)(e=>{for(const{target:n}of e)if((0,a.isHTMLElement)(n)){o(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),l=(0,r.useCallback)(e=>{const n=Te(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)},[t,i]),[s,c]=(0,a.useNodeRef)(l);return(0,r.useMemo)(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}({measure:ie.dragOverlay.measure}),Se=null!=(n=be.nodeRef.current)?n:ue,je=M?null!=(l=be.rect)?l:ve:null,ze=Boolean(be.nodeRef.current&&be.rect),Be=I(Fe=ze?null:ve,Ee(Fe));var Fe;const Ve=Ie(Se?(0,a.getWindow)(Se):null),Ge=function(e){const t=(0,r.useRef)(e),n=(0,a.useLazyMemo)(n=>e?n&&n!==Oe&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Oe,[e]);return(0,r.useEffect)(()=>{t.current=e},[e]),n}(M?null!=me?me:ue:null),Je=function(e,t){void 0===t&&(t=L);const[n]=e,o=Ie(n?(0,a.getWindow)(n):null),[i,l]=(0,r.useState)(Me);function s(){l(()=>e.length?e.map(e=>Y(e)?o:new $(t(e),e)):Me)}const c=ke({callback:s});return(0,a.useIsomorphicLayoutEffect)(()=>{null==c||c.disconnect(),s(),e.forEach(e=>null==c?void 0:c.observe(e))},[e]),i}(Ge),Qe=Ye(x,{transform:{x:z.x-Be.x,y:z.y-Be.y,scaleX:1,scaleY:1},activatorEvent:ee,active:X,activeNodeRect:ve,containerNodeRect:pe,draggingNodeRect:je,over:ge.current.over,overlayNodeRect:be.rect,scrollableAncestors:Ge,scrollableAncestorRects:Je,windowRect:Ve}),Ze=de?(0,a.add)(de,z):null,$e=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)(e=>{const t=W(e.target);t&&n(e=>e?(e.set(t,q(t)),new Map(e)):null)},[]);return(0,r.useEffect)(()=>{const t=o.current;if(e!==t){r(t);const a=e.map(e=>{const t=W(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,q(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=W(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,r.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,a.add)(e,t),m):J(e):m,[e,t])}(Ge),et=Ne($e),tt=Ne($e,[ve]),nt=(0,a.add)(Qe,et),rt=je?T(je,Qe):null,ot=X&&rt?b({active:X,collisionRect:rt,droppableRects:le,droppableContainers:oe,pointerCoordinates:Ze}):null,it=S(ot,"id"),[at,lt]=(0,r.useState)(null),st=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ze?Qe:(0,a.add)(Qe,tt),null!=(c=null==at?void 0:at.rect)?c:null,ve),ct=(0,r.useRef)(null),ut=(0,r.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==G.current)return;const o=P.get(G.current);if(!o)return;const a=e.nativeEvent,l=new n({active:G.current,activeNode:o,event:a,options:r,context:ge,onAbort(e){if(!P.get(e))return;const{onDragAbort:t}=ne.current,n={id:e};null==t||t(n),k({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!P.get(e))return;const{onDragPending:o}=ne.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),k({type:"onDragPending",event:i})},onStart(e){const t=G.current;if(null==t)return;const n=P.get(t);if(!n)return;const{onDragStart:r}=ne.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:H}};(0,i.unstable_batchedUpdates)(()=>{null==r||r(o),N(Xe.Initializing),E({type:h.DragStart,initialCoordinates:e,active:t}),k({type:"onDragStart",event:o}),Z(ct.current),te(a)})},onMove(e){E({type:h.DragMove,coordinates:e})},onEnd:s(h.DragEnd),onCancel:s(h.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=ge.current;let l=null;if(t&&o){const{cancelDrop:i}=ne.current;l={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===h.DragEnd&&"function"==typeof i&&await Promise.resolve(i(l))&&(e=h.DragCancel)}G.current=null,(0,i.unstable_batchedUpdates)(()=>{E({type:e}),N(Xe.Uninitialized),lt(null),Z(null),te(null),ct.current=null;const t=e===h.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=ne.current[t];null==e||e(l),k({type:t,event:l})}})}}ct.current=l},[P]),dt=(0,r.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,i=P.get(r);if(null!==G.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},G.current=r,ut(n,t))},[P,ut]),ft=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(g,dt);!function(e){(0,r.useEffect)(()=>{if(!a.canUseDOM)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(g),(0,a.useIsomorphicLayoutEffect)(()=>{ve&&O===Xe.Initializing&&N(Xe.Initialized)},[ve,O]),(0,r.useEffect)(()=>{const{onDragMove:e}=ne.current,{active:t,activatorEvent:n,collisions:r,over:o}=ge.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:nt.x,y:nt.y},over:o};(0,i.unstable_batchedUpdates)(()=>{null==e||e(a),k({type:"onDragMove",event:a})})},[nt.x,nt.y]),(0,r.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=ge.current;if(!e||null==G.current||!t||!o)return;const{onDragOver:a}=ne.current,l=r.get(it),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,i.unstable_batchedUpdates)(()=>{lt(s),null==a||a(c),k({type:"onDragOver",event:c})})},[it]),(0,a.useIsomorphicLayoutEffect)(()=>{ge.current={activatorEvent:ee,active:X,activeNode:ue,collisionRect:rt,collisions:ot,droppableRects:le,draggableNodes:P,draggingNode:Se,draggingNodeRect:je,droppableContainers:K,over:at,scrollableAncestors:Ge,scrollAdjustedTranslate:nt},H.current={initial:je,translated:rt}},[X,ue,ot,rt,P,Se,je,le,K,at,Ge,nt]),function(e){let{acceleration:t,activator:n=ye.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:s=5,order:c=xe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:h,threshold:v}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=(0,a.usePrevious)(t);return(0,a.useLazyMemo)(e=>{if(n||!r||!e)return we;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[_.Backward]:e.x[_.Backward]||-1===o,[_.Forward]:e.x[_.Forward]||1===o},y:{[_.Backward]:e.y[_.Backward]||-1===i,[_.Forward]:e.y[_.Forward]||1===i}}},[n,t,r])}({delta:h,disabled:!l}),[g,m]=(0,a.useInterval)(),b=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),x=(0,r.useMemo)(()=>{switch(n){case ye.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ye.DraggableRect:return i}},[n,i,u]),w=(0,r.useRef)(null),C=(0,r.useCallback)(()=>{const e=w.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)},[]),S=(0,r.useMemo)(()=>c===xe.TreeOrder?[...d].reverse():d,[c,d]);(0,r.useEffect)(()=>{if(l&&d.length&&x){for(const e of S){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=V(e,r,x,t,v);for(const e of["x","y"])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return m(),w.current=e,g(C,s),b.current=a,void(y.current=i)}b.current={x:0,y:0},y.current={x:0,y:0},m()}else m()},[t,C,o,m,l,s,JSON.stringify(x),JSON.stringify(p),g,d,S,f,JSON.stringify(v)])}({...fe,delta:z,draggingRect:rt,pointerCoordinates:Ze,scrollableAncestors:Ge,scrollableAncestorRects:Je});const ht=(0,r.useMemo)(()=>({active:X,activeNode:ue,activeNodeRect:ve,activatorEvent:ee,collisions:ot,containerNodeRect:pe,dragOverlay:be,draggableNodes:P,droppableContainers:K,droppableRects:le,over:at,measureDroppableContainers:se,scrollableAncestors:Ge,scrollableAncestorRects:Je,measuringConfiguration:ie,measuringScheduled:ce,windowRect:Ve}),[X,ue,ve,ee,ot,pe,be,P,K,le,at,se,Ge,Je,ie,ce,Ve]),vt=(0,r.useMemo)(()=>({activatorEvent:ee,activators:ft,active:X,activeNodeRect:ve,ariaDescribedById:{draggable:re},dispatch:E,draggableNodes:P,over:at,measureDroppableContainers:se}),[ee,ft,X,ve,E,re,P,at,se]);return o().createElement(s.Provider,{value:j},o().createElement(We.Provider,{value:vt},o().createElement(Ke.Provider,{value:ht},o().createElement(He.Provider,{value:st},p)),o().createElement(_e,{disabled:!1===(null==d?void 0:d.restoreFocus)})),o().createElement(f,{...d,hiddenTextDescribedById:re}))}),Ge=(0,r.createContext)(null),Je="button",Qe="Draggable";function Ze(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=(0,a.useUniqueId)(Qe),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:h,over:v}=(0,r.useContext)(We),{role:p=Je,roleDescription:g="draggable",tabIndex:m=0}=null!=i?i:{},b=(null==u?void 0:u.id)===t,y=(0,r.useContext)(b?He:Ge),[x,w]=(0,a.useNodeRef)(),[C,S]=(0,a.useNodeRef)(),R=function(e,t){return(0,r.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(s,t),E=(0,a.useLatestValue)(n);return(0,a.useIsomorphicLayoutEffect)(()=>(h.set(t,{id:t,key:l,node:x,activatorNode:C,data:E}),()=>{const e=h.get(t);e&&e.key===l&&h.delete(t)}),[h,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!b||p!==Je)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable}),[o,p,m,b,g,f.draggable]),isDragging:b,listeners:o?void 0:R,node:x,over:v,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function $e(){return(0,r.useContext)(Ke)}const et="Droppable",tt={timeout:25};function nt(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=(0,a.useUniqueId)(et),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(We),f=(0,r.useRef)({disabled:n}),v=(0,r.useRef)(!1),p=(0,r.useRef)(null),g=(0,r.useRef)(null),{disabled:m,updateMeasurementsFor:b,timeout:y}={...tt,...i},x=(0,a.useLatestValue)(null!=b?b:o),w=ke({callback:(0,r.useCallback)(()=>{v.current?(null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),g.current=null},y)):v.current=!0},[y]),disabled:m||!s}),C=(0,r.useCallback)((e,t)=>{w&&(t&&(w.unobserve(t),v.current=!1),e&&w.observe(e))},[w]),[S,R]=(0,a.useNodeRef)(C),E=(0,a.useLatestValue)(t);return(0,r.useEffect)(()=>{w&&S.current&&(w.disconnect(),v.current=!1,w.observe(S.current))},[S,w]),(0,r.useEffect)(()=>(c({type:h.RegisterDroppable,element:{id:o,key:l,disabled:n,node:S,rect:p,data:E}}),()=>c({type:h.UnregisterDroppable,key:l,id:o})),[o]),(0,r.useEffect)(()=>{n!==f.current.disabled&&(c({type:h.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)},[o,l,n,c]),{active:s,rect:p,isOver:(null==u?void 0:u.id)===o,node:S,over:u,setNodeRef:R}}function rt(e){let{animation:t,children:n}=e;const[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null),u=(0,a.usePrevious)(n);return n||i||!u||l(u),(0,a.useIsomorphicLayoutEffect)(()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then(()=>{l(null)}):l(null)},[t,i,s]),o().createElement(o().Fragment,null,n,i?(0,r.cloneElement)(i,{ref:c}):null)}const ot={x:0,y:0,scaleX:1,scaleY:1};function it(e){let{children:t}=e;return o().createElement(We.Provider,{value:Fe},o().createElement(He.Provider,{value:ot},t))}const at={position:"fixed",touchAction:"none"},lt=e=>(0,a.isKeyboardEvent)(e)?"transform 250ms ease":void 0,st=(0,r.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:l,className:s,rect:c,style:u,transform:d,transition:f=lt}=e;if(!c)return null;const h=i?d:{...d,scaleX:1,scaleY:1},v={...at,width:c.width,height:c.height,top:c.top,left:c.left,transform:a.CSS.Transform.toString(h),transformOrigin:i&&r?y(r,c):void 0,transition:"function"==typeof f?f(r):f,...u};return o().createElement(n,{className:s,style:v,ref:t},l)}),ct=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},ut={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.CSS.Transform.toString(t)},{transform:a.CSS.Transform.toString(n)}]},sideEffects:ct({styles:{active:{opacity:"0"}}})};let dt=0;function ft(e){return(0,r.useMemo)(()=>{if(null!=e)return dt++,dt},[e])}const ht=o().memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:l,transition:s,modifiers:c,wrapperElement:u="div",className:d,zIndex:f=999}=e;const{activatorEvent:h,active:v,activeNodeRect:p,containerNodeRect:g,draggableNodes:m,droppableContainers:b,dragOverlay:y,over:x,measuringConfiguration:w,scrollableAncestors:C,scrollableAncestorRects:S,windowRect:R}=$e(),E=(0,r.useContext)(He),k=ft(null==v?void 0:v.id),j=Ye(c,{activatorEvent:h,active:v,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:y.rect,over:x,overlayNodeRect:y.rect,scrollableAncestors:C,scrollableAncestorRects:S,transform:E,windowRect:R}),D=Ee(p),O=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,a.useEvent)((e,i)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=Te(i);if(!c)return;const{transform:u}=(0,a.getWindow)(i).getComputedStyle(i),d=A(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...ut,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},h=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[v]=h,p=h[h.length-1];if(JSON.stringify(v)===JSON.stringify(p))return;const g=null==r?void 0:r({active:i,dragOverlay:a,...s}),m=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==g||g(),e()}})}}(t);return Q(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})})}({config:i,draggableNodes:m,droppableContainers:b,measuringConfiguration:w}),N=D?y.setRef:void 0;return o().createElement(it,null,o().createElement(rt,{animation:O},v&&k?o().createElement(st,{key:k,id:v.id,ref:N,as:u,activatorEvent:h,adjustScale:t,className:d,transition:s,rect:D,style:{zIndex:f,...l},transform:j},n):null))})},e=>{e.exports=i},(e,t,n)=>{n.r(t),n.d(t,{CSS:()=>O,add:()=>S,canUseDOM:()=>i,findFirstFocusableNode:()=>I,getEventCoordinates:()=>D,getOwnerDocument:()=>f,getWindow:()=>s,hasViewportRelativeCoordinates:()=>E,isDocument:()=>c,isHTMLElement:()=>u,isKeyboardEvent:()=>k,isNode:()=>l,isSVGElement:()=>d,isTouchEvent:()=>j,isWindow:()=>a,subtract:()=>R,useCombinedRefs:()=>o,useEvent:()=>v,useInterval:()=>p,useIsomorphicLayoutEffect:()=>h,useLatestValue:()=>g,useLazyMemo:()=>m,useNodeRef:()=>b,usePrevious:()=>y,useUniqueId:()=>w});var r=n(5);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const h=i?r.useLayoutEffect:r.useEffect;function v(e){const t=(0,r.useRef)(e);return h(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function p(){const e=(0,r.useRef)(null);return[(0,r.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function g(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return h(()=>{n.current!==e&&(n.current=e)},t),n}function m(e,t){const n=(0,r.useRef)();return(0,r.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function b(e){const t=v(e),n=(0,r.useRef)(null),o=(0,r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}let x={};function w(e,t){return(0,r.useMemo)(()=>{if(t)return t;const n=null==x[e]?0:x[e]+1;return x[e]=n,e+"-"+n},[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const S=C(1),R=C(-1);function E(e){return"clientX"in e&&"clientY"in e}function k(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function j(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}function D(e){if(j(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return E(e)?{x:e.clientX,y:e.clientY}:null}const O=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[O.Translate.toString(e),O.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),N="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function I(e){return e.matches(N)?e:e.querySelector(N)}},(e,t,n)=>{n.r(t),n.d(t,{HiddenText:()=>a,LiveRegion:()=>l,useAnnouncement:()=>s});var r=n(5),o=n.n(r);const i={display:"none"};function a(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:i},n)}function l(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}function s(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}},(e,t,n)=>{n.r(t),n.d(t,{createSnapModifier:()=>o,restrictToFirstScrollableAncestor:()=>s,restrictToHorizontalAxis:()=>i,restrictToParentElement:()=>l,restrictToVerticalAxis:()=>c,restrictToWindowEdges:()=>u,snapCenterToCursor:()=>d});var r=n(18);function o(e){return t=>{let{transform:n}=t;return{...n,x:Math.ceil(n.x/e)*e,y:Math.ceil(n.y/e)*e}}}const i=e=>{let{transform:t}=e;return{...t,y:0}};function a(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const l=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?a(r,n,t):r},s=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return t&&o?a(n,t,o):n},c=e=>{let{transform:t}=e;return{...t,x:0}},u=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return n&&r?a(t,n,r):t},d=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:o}=e;if(n&&t){const e=(0,r.getEventCoordinates)(t);if(!e)return o;const i=e.x-n.left,a=e.y-n.top;return{...o,x:o.x+i-n.width/2,y:o.y+a-n.height/2}}return o}},(e,t,n)=>{n.r(t),n.d(t,{SortableContext:()=>y,arrayMove:()=>l,arraySwap:()=>s,defaultAnimateLayoutChanges:()=>w,defaultNewIndexGetter:()=>x,hasSortableData:()=>j,horizontalListSortingStrategy:()=>f,rectSortingStrategy:()=>h,rectSwappingStrategy:()=>v,sortableKeyboardCoordinates:()=>O,useSortable:()=>k,verticalListSortingStrategy:()=>g});var r=n(5),o=n.n(r),i=n(16),a=n(18);function l(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function c(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function u(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},f=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const l=null!=(t=n[o])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r&&(o||i)?n<t?o?r.left-(o.left+o.width):i.left-(r.left+r.width):i?i.left-(r.left+r.width):r.left-(o.left+o.width):0}(n,a,o);if(a===o){const e=n[i];return e?{x:o<i?e.left+e.width-(l.left+l.width):e.left-l.left,y:0,...d}:null}return a>o&&a<=i?{x:-l.width-s,y:0,...d}:a<o&&a>=i?{x:l.width+s,y:0,...d}:{x:0,y:0,...d}},h=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=l(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},v=e=>{let t,n,{activeIndex:r,index:o,rects:i,overIndex:a}=e;return o===r&&(t=i[o],n=i[a]),o===a&&(t=i[o],n=i[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},p={scaleX:1,scaleY:1},g=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...p}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-s,...p}:o<n&&o>=a?{x:0,y:l.height+s,...p}:{x:0,y:0,...p}},m="Sortable",b=o().createContext({activeIndex:-1,containerId:m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:l,strategy:s=h,disabled:u=!1}=e;const{active:d,dragOverlay:f,droppableRects:v,over:p,measureDroppableContainers:g}=(0,i.useDndContext)(),y=(0,a.useUniqueId)(m,n),x=Boolean(null!==f.rect),w=(0,r.useMemo)(()=>l.map(e=>"object"==typeof e&&"id"in e?e.id:e),[l]),C=null!=d,S=d?w.indexOf(d.id):-1,R=p?w.indexOf(p.id):-1,E=(0,r.useRef)(w),k=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(w,E.current),j=-1!==R&&-1===S||k,D=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);(0,a.useIsomorphicLayoutEffect)(()=>{k&&C&&g(w)},[k,w,C,g]),(0,r.useEffect)(()=>{E.current=w},[w]);const O=(0,r.useMemo)(()=>({activeIndex:S,containerId:y,disabled:D,disableTransforms:j,items:w,overIndex:R,useDragOverlay:x,sortedRects:c(w,v),strategy:s}),[S,y,D.draggable,D.droppable,j,w,R,v,x,s]);return o().createElement(b.Provider,{value:O},t)}const x=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},w=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r||l!==i&&o===a||!n&&(a===o||t!==s))},C={duration:200,easing:"ease"},S="transform",R=a.CSS.Transition.toString({property:S,duration:0,easing:"linear"}),E={roleDescription:"sortable"};function k(e){let{animateLayoutChanges:t=w,attributes:n,disabled:o,data:l,getNewIndex:s=x,id:c,strategy:d,resizeObserverConfig:f,transition:h=C}=e;const{items:v,containerId:p,activeIndex:g,disabled:m,disableTransforms:y,sortedRects:k,overIndex:j,useDragOverlay:D,strategy:O}=(0,r.useContext)(b),N=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,m),I=v.indexOf(c),M=(0,r.useMemo)(()=>({sortable:{containerId:p,index:I,items:v},...l}),[p,l,I,v]),T=(0,r.useMemo)(()=>v.slice(v.indexOf(c)),[v,c]),{rect:A,node:P,isOver:L,setNodeRef:z}=(0,i.useDroppable)({id:c,data:M,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:B,activatorEvent:F,activeNodeRect:W,attributes:K,setNodeRef:U,listeners:q,isDragging:_,over:Y,setActivatorNodeRef:H,transform:X}=(0,i.useDraggable)({id:c,data:M,attributes:{...E,...n},disabled:N.draggable}),V=(0,a.useCombinedRefs)(z,U),G=Boolean(B),J=G&&!y&&u(g)&&u(j),Q=!D&&_,Z=Q&&J?X:null,$=J?null!=Z?Z:(null!=d?d:O)({rects:k,activeNodeRect:W,activeIndex:g,overIndex:j,index:I}):null,ee=u(g)&&u(j)?s({id:c,items:v,activeIndex:g,overIndex:j}):I,te=null==B?void 0:B.id,ne=(0,r.useRef)({activeId:te,items:v,newIndex:ee,containerId:p}),re=v!==ne.current.items,oe=t({active:B,containerId:p,isDragging:_,isSorting:G,id:c,index:I,items:v,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:h,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:o,rect:l}=e;const[s,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,a.useIsomorphicLayoutEffect)(()=>{if(!t&&n!==u.current&&o.current){const e=l.current;if(e){const t=(0,i.getClientRect)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)},[t,n,o,l]),(0,r.useEffect)(()=>{s&&c(null)},[s]),s}({disabled:!oe,index:I,node:P,rect:A});return(0,r.useEffect)(()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),p!==ne.current.containerId&&(ne.current.containerId=p),v!==ne.current.items&&(ne.current.items=v)},[G,ee,p,v]),(0,r.useEffect)(()=>{if(te===ne.current.activeId)return;if(null!=te&&null==ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout(()=>{ne.current.activeId=te},50);return()=>clearTimeout(e)},[te]),{active:B,activeIndex:g,attributes:K,data:M,rect:A,index:I,newIndex:ee,items:v,isOver:L,isSorting:G,isDragging:_,listeners:q,node:P,overIndex:j,over:Y,setNodeRef:V,setActivatorNodeRef:H,setDroppableNodeRef:z,setDraggableNodeRef:U,transform:null!=ie?ie:$,transition:ie||re&&ne.current.newIndex===I?R:Q&&!(0,a.isKeyboardEvent)(F)||!h?void 0:G||oe?a.CSS.Transition.toString({...h,property:S}):void 0}}function j(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const D=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],O=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:l,over:s,scrollableAncestors:c}}=t;if(D.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case i.KeyboardCode.Down:r.top<a.top&&t.push(n);break;case i.KeyboardCode.Up:r.top>a.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case i.KeyboardCode.Right:r.left<a.left&&t.push(n)}});const f=(0,i.closestCorners)({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let h=(0,i.getFirstCollision)(f,"id");if(h===(null==s?void 0:s.id)&&f.length>1&&(h=f[1].id),null!=h){const e=l.get(n.id),t=l.get(h),s=t?o.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&s&&e&&t){const n=(0,i.getScrollableAncestors)(f).some((e,t)=>c[t]!==e),o=N(e,t),l=(d=t,!(!j(u=e)||!j(d))&&!!N(u,d)&&u.data.current.sortable.index<d.data.current.sortable.index),h=n||!o?{x:0,y:0}:{x:l?r.width-s.width:0,y:l?r.height-s.height:0},v={x:s.left,y:s.top};return h.x&&h.y?v:(0,a.subtract)(v,h)}}}var u,d};function N(e,t){return!(!j(e)||!j(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(23),o=function(e,t){return e.map(function(e){return e.permission?t.includes(e.permission)?e:null:e}).filter(function(e){return null!==e})};function i(){var e=(0,r.getUmiUseAccess)(),t=(e?e():{}).button_permissions,n=void 0===t?[]:t;return{filterAuthItems:function(e){return o(e,n)},permissions:n}}},(e,t,n)=>{var r;function o(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)&&"function"==typeof e.useAccess}function i(){if(void 0!==r)return r;if("undefined"!=typeof window){var e=window.__webpack_require__||n;if(e&&"function"==typeof e)try{if(o(i=e("@umijs/max")))return r=i.useAccess}catch(e){}}if("undefined"!=typeof window){var t=window.__UMI__||window.umi;if(o(t))return r=t.useAccess}try{var i;if(o(i=n(24)))return r=i.useAccess}catch(e){}r=null}n.r(t),n.d(t,{getUmiUseAccess:()=>i})},e=>{if(void 0===n){var t=new Error("Cannot find module 'undefined'");throw t.code="MODULE_NOT_FOUND",t}e.exports=n},(e,t,n)=>{n.r(t),n.d(t,{TableActions:()=>l});var r=n(2),o=n(14),i=n(3),a=i.theme.useToken;function l(e){var t=e.record,n=e.actions,l=e.divider,s=void 0===l||l,c=e.maxCount,u=void 0===c?3:c,d=a().token,f=n.filter(function(e){var n;return!(null===(n=e.hide)||void 0===n?void 0:n.call(e,t))});if(f.length<=u)return(0,r.jsx)(i.Space,{split:!!s&&(0,r.jsx)(i.Divider,{type:"vertical"}),style:{whiteSpace:"nowrap",display:"flex",flexWrap:"nowrap"},children:n.map(function(e){var n,o,i;return(0,r.jsx)("a",{onClick:function(n){var r,o;n.stopPropagation(),(null===(r=e.disabled)||void 0===r?void 0:r.call(e,t))||null===(o=e.onClick)||void 0===o||o.call(e,t)},className:"action-link",style:{cursor:(null===(n=e.disabled)||void 0===n?void 0:n.call(e,t))?"not-allowed":"pointer",color:(null===(o=e.disabled)||void 0===o?void 0:o.call(e,t))?"#ccc":d.colorPrimary},children:null===(i=e.getText)||void 0===i?void 0:i.call(e,t)},e.key)})});var h=n.slice(0,u-1),v=n.slice(u-1),p=v.map(function(e){var n,r;return{key:e.key,label:null===(n=e.getText)||void 0===n?void 0:n.call(e,t),disabled:null===(r=e.disabled)||void 0===r?void 0:r.call(e,t),onClick:function(){var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,t)}}});return(0,r.jsxs)(i.Space,{split:!!s&&(0,r.jsx)(i.Divider,{type:"vertical"}),className:"table-actions-container",children:[h.map(function(e){return function(e){var n,o,i;return(0,r.jsx)("a",{onClick:function(){var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,t)},style:{cursor:(null===(n=e.disabled)||void 0===n?void 0:n.call(e,t))?"not-allowed":"pointer",color:(null===(o=e.disabled)||void 0===o?void 0:o.call(e,t))?"#ccc":d.colorPrimary},children:null===(i=e.getText)||void 0===i?void 0:i.call(e,t)},e.key)}(e)}),v.length>0&&(0,r.jsx)(i.Dropdown,{menu:{items:p},placement:"bottomRight",children:(0,r.jsx)(i.Button,{type:"link",icon:(0,r.jsx)(o.EllipsisOutlined,{}),style:{padding:0}})})]})}},(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(2),o=n(23),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function l(e){return function(t){var n=t.permission,l=t.fallback,s=void 0===l?null:l,c=a(t,["permission","fallback"]),u=(0,o.getUmiUseAccess)(),d=u?u():null,f=(null==d?void 0:d.button_permissions)||[];return!n||f.includes(n)?(0,r.jsx)(e,i({},c)):s}}}],s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return l[e].call(n.exports,n,n.exports,c),n.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{BaseModal:()=>o.default,Cron:()=>e.default,CustomDrawer:()=>n.default,ErrorBoundary:()=>r.default,HocModal:()=>t.default,MFTablePro:()=>i.default});var e=c(1),t=c(7),n=c(8),r=c(10),o=c(11),i=c(13)})(),u})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingfuyun/star-allinone",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "星系运维前端能力包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",