@next-bricks/advanced 0.45.4 → 0.45.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +25 -25
- package/dist/chunks/1512.42419e90.js +2 -0
- package/dist/chunks/1512.42419e90.js.map +1 -0
- package/dist/chunks/{main.37018447.js → main.bd03b29a.js} +2 -2
- package/dist/chunks/{main.37018447.js.map → main.bd03b29a.js.map} +1 -1
- package/dist/examples.json +10 -10
- package/dist/index.c328b14d.js +2 -0
- package/dist/{index.ec91e9a0.js.map → index.c328b14d.js.map} +1 -1
- package/dist/manifest.json +434 -434
- package/dist/types.json +938 -938
- package/package.json +2 -2
- package/dist/chunks/1512.778c85af.js +0 -2
- package/dist/chunks/1512.778c85af.js.map +0 -1
- package/dist/index.ec91e9a0.js +0 -2
package/dist/bricks.json
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/advanced",
|
|
3
3
|
"bricks": [
|
|
4
|
+
"advanced.general-cascader",
|
|
4
5
|
"advanced.general-table",
|
|
5
6
|
"advanced.capture-snapshot",
|
|
6
|
-
"advanced.pdf-viewer"
|
|
7
|
-
"advanced.general-cascader"
|
|
7
|
+
"advanced.pdf-viewer"
|
|
8
8
|
],
|
|
9
9
|
"elements": [
|
|
10
|
-
"eo-
|
|
11
|
-
"eo-workbench-layout",
|
|
10
|
+
"eo-cascader",
|
|
12
11
|
"eo-workbench-layout-v2",
|
|
13
|
-
"eo-
|
|
14
|
-
"eo-tree",
|
|
12
|
+
"eo-table",
|
|
15
13
|
"eo-tree-select",
|
|
14
|
+
"eo-tree",
|
|
16
15
|
"eo-text-tooltip",
|
|
17
|
-
"eo-
|
|
16
|
+
"eo-next-table",
|
|
17
|
+
"eo-workbench-layout"
|
|
18
18
|
],
|
|
19
19
|
"processors": [],
|
|
20
20
|
"editors": [],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"eo-
|
|
23
|
-
"eo-icon"
|
|
24
|
-
|
|
25
|
-
"advanced.general-table": [
|
|
26
|
-
"eo-icon"
|
|
22
|
+
"eo-cascader": [
|
|
23
|
+
"eo-icon",
|
|
24
|
+
"eo-form-item"
|
|
27
25
|
],
|
|
28
|
-
"
|
|
29
|
-
"eo-button",
|
|
30
|
-
"eo-dropdown-button",
|
|
26
|
+
"advanced.general-cascader": [
|
|
31
27
|
"eo-icon",
|
|
32
|
-
"eo-
|
|
33
|
-
"basic.show-dialog"
|
|
28
|
+
"eo-form-item"
|
|
34
29
|
],
|
|
35
30
|
"eo-workbench-layout-v2": [
|
|
36
31
|
"eo-button",
|
|
@@ -38,21 +33,26 @@
|
|
|
38
33
|
"basic.show-dialog",
|
|
39
34
|
"eo-icon"
|
|
40
35
|
],
|
|
41
|
-
"eo-
|
|
42
|
-
"eo-
|
|
36
|
+
"eo-table": [
|
|
37
|
+
"eo-icon"
|
|
38
|
+
],
|
|
39
|
+
"advanced.general-table": [
|
|
40
|
+
"eo-icon"
|
|
43
41
|
],
|
|
44
42
|
"eo-tree-select": [
|
|
45
43
|
"eo-icon",
|
|
46
44
|
"eo-form-item"
|
|
47
45
|
],
|
|
48
|
-
"eo-
|
|
49
|
-
"eo-
|
|
50
|
-
"eo-form-item"
|
|
46
|
+
"eo-next-table": [
|
|
47
|
+
"eo-link"
|
|
51
48
|
],
|
|
52
|
-
"
|
|
49
|
+
"eo-workbench-layout": [
|
|
50
|
+
"eo-button",
|
|
51
|
+
"eo-dropdown-button",
|
|
53
52
|
"eo-icon",
|
|
54
|
-
"eo-
|
|
53
|
+
"eo-checkbox",
|
|
54
|
+
"basic.show-dialog"
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
|
-
"filePath": "bricks/advanced/dist/index.
|
|
57
|
+
"filePath": "bricks/advanced/dist/index.c328b14d.js"
|
|
58
58
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_advanced=globalThis.webpackChunk_next_bricks_advanced||[]).push([[1512],{5414:(e,t,n)=>{n.d(t,{FN:()=>o,Mk:()=>r}),n(56550);const r=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return t&&o?function(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}(n,t,o):n},o=e=>{let{transform:t}=e;return{...t,x:0}}},16768:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(95694),o=n(58133),i=n(79154),a=n(73459);var l=n(19509),s=n(53443),c=n(94597),u=n(64425);var d=n(97043),g=n(45907),f=n(6127);const h=(e,t)=>new f.Y(e).setA(t).toRgbString(),v=(e,t)=>new f.Y(e).lighten(t).toHexString(),p=e=>{const t=(0,d.cM)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},b=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:h(r,.85),colorTextSecondary:h(r,.65),colorTextTertiary:h(r,.45),colorTextQuaternary:h(r,.25),colorFill:h(r,.18),colorFillSecondary:h(r,.12),colorFillTertiary:h(r,.08),colorFillQuaternary:h(r,.04),colorBgSolid:h(r,.95),colorBgSolidHover:h(r,1),colorBgSolidActive:h(r,.9),colorBgElevated:v(n,12),colorBgContainer:v(n,8),colorBgLayout:v(n,0),colorBgSpotlight:v(n,26),colorBgBlur:h(r,.04),colorBorder:v(n,26),colorBorderSecondary:v(n,19)}},m={defaultSeed:s.sb.token,useToken:function(){const[e,t,n]=(0,l.Ay)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:o.A,darkAlgorithm:(e,t)=>{const n=Object.keys(i.r).map((t=>{const n=(0,d.cM)(e[t],{theme:"dark"});return new Array(10).fill(1).reduce(((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}),r=null!=t?t:(0,o.A)(e);return Object.assign(Object.assign(Object.assign({},r),n),(0,g.A)(e,{generateColorPalettes:p,generateNeutralColorPalettes:b}))},compactAlgorithm:(e,t)=>{const n=null!=t?t:(0,o.A)(e),r=n.fontSizeSM,i=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){const{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,u.A)(r)),{controlHeight:i}),(0,c.A)(Object.assign(Object.assign({},n),{controlHeight:i})))},getDesignToken:e=>{const t=(null==e?void 0:e.algorithm)?(0,r.an)(e.algorithm):(0,r.an)(o.A),n=Object.assign(Object.assign({},i.A),null==e?void 0:e.token);return(0,r.lO)(n,{override:null==e?void 0:e.token},t,a.A)},defaultConfig:s.sb,_internalContext:s.vG}},56550:(e,t,n)=>{n.d(t,{$$:()=>v,Es:()=>f,KG:()=>b,Ks:()=>M,Ll:()=>l,Re:()=>R,Sw:()=>i,TW:()=>g,WQ:()=>D,YG:()=>x,YN:()=>p,ZC:()=>y,_q:()=>h,ag:()=>T,e_:()=>S,jn:()=>o,kx:()=>E,l6:()=>a,lk:()=>m,sb:()=>u,wz:()=>c,xZ:()=>d,zk:()=>s});var r=n(18769);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 g(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const f=i?r.useLayoutEffect:r.useEffect;function h(e){const t=(0,r.useRef)(e);return f((()=>{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 v(){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 p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return f((()=>{n.current!==e&&(n.current=e)}),t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=h(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 w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[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 D=C(1),R=C(-1);function E(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function S(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(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 function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const M=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[M.Translate.toString(e),M.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),k="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T(e){return e.matches(k)?e:e.querySelector(k)}},81380:(e,t,n)=>{n.d(t,{Mp:()=>Be,vL:()=>Q,AN:()=>ie,fp:()=>C,Sj:()=>T,fF:()=>We,PM:()=>Fe,zM:()=>_e,MS:()=>p,FR:()=>b});var r=n(18769),o=n.n(r),i=n(59435),a=n(56550);const l={display:"none"};function s(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:l},n)}function c(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)}const u=(0,r.createContext)(null),d={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 "},g={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=g,container:n,hiddenTextDescribedById:l,screenReaderInstructions:f=d}=e;const{announce:h,announcement:v}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=(0,a.YG)("DndLiveRegion"),[b,m]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{m(!0)}),[]),function(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((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])),!b)return null;const y=o().createElement(o().Fragment,null,o().createElement(s,{id:l,value:f.draggable}),o().createElement(c,{id:p,announcement:v}));return n?(0,i.createPortal)(y,n):y}var h;function v(){}function p(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function b(){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 y(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 x(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 C=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=x(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(a=x(r),l=o,Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)));i.push({id:t,data:{droppableContainer:e,value:n}})}}var a,l;return i.sort(y)};function D(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 R=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=D(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(w)};function E(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m}function S(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 M=S(1);const k={ignoreTransform:!1};function T(e,t){void 0===t&&(t=k);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.zk)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(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}(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 N(e){return T(e,{ignoreTransform:!0})}function A(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.wz)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.sb)(o)||(0,a.xZ)(o))return n;if(n.includes(o))return n;const i=(0,a.zk)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.zk)(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.zk)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function O(e){const[t]=A(e,1);return null!=t?t:null}function I(e){return a.Sw&&e?(0,a.l6)(e)?e:(0,a.Ll)(e)?(0,a.wz)(e)||e===(0,a.TW)(e).scrollingElement?window:(0,a.sb)(e)?e:null:null:null}function L(e){return(0,a.l6)(e)?e.scrollX:e.scrollLeft}function z(e){return(0,a.l6)(e)?e.scrollY:e.scrollTop}function B(e){return{x:L(e),y:z(e)}}var j;function P(e){return!(!a.Sw||!e)&&e===document.scrollingElement}function Y(e){const t={x:0,y:0},n=P(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"}(j||(j={}));const F={x:.2,y:.2};function W(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=F);const{isTop:c,isBottom:u,isLeft:d,isRight:g}=Y(e),f={x:0,y:0},h={x:0,y:0},v=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+v?(f.y=j.Backward,h.y=r*Math.abs((t.top+v-i)/v)):!u&&s>=t.bottom-v&&(f.y=j.Forward,h.y=r*Math.abs((t.bottom-v-s)/v)),!g&&l>=t.right-p?(f.x=j.Forward,h.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(f.x=j.Backward,h.x=r*Math.abs((t.left+p-a)/p)),{direction:f,speed:h}}function K(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 X(e){return e.reduce(((e,t)=>(0,a.WQ)(e,B(t))),m)}const _=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+L(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+z(t)),0)}]];class U{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=A(t),r=X(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of _)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 G{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 H(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 q,Q;function $(e){e.preventDefault()}function J(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"}(q||(q={})),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"}(Q||(Q={}));const V={start:[Q.Space,Q.Enter],cancel:[Q.Esc],end:[Q.Space,Q.Enter,Q.Tab]},Z=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Q.Right:return{...n,x:n.x+25};case Q.Left:return{...n,x:n.x-25};case Q.Down:return{...n,y:n.y+25};case Q.Up:return{...n,y:n.y-25}}};class ee{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 G((0,a.TW)(t)),this.windowListeners=new G((0,a.zk)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(q.Resize,this.handleCancel),this.windowListeners.add(q.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(q.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=T),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);O(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(m)}handleKeyDown(e){if((0,a.kx)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=V,coordinateGetter:i=Z,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.Re)(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:g}=Y(n),f=K(n),h={x:Math.min(o===Q.Right?f.right-f.width/2:f.right,Math.max(o===Q.Right?f.left:f.left+f.width/2,d.x)),y:Math.min(o===Q.Down?f.bottom-f.height/2:f.bottom,Math.max(o===Q.Down?f.top:f.top+f.height/2,d.y))},v=o===Q.Right&&!a||o===Q.Left&&!s,p=o===Q.Down&&!c||o===Q.Up&&!i;if(v&&h.x!==d.x){const e=n.scrollLeft+t.x,i=o===Q.Right&&e<=u.x||o===Q.Left&&e>=g.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===Q.Right?n.scrollLeft-u.x:n.scrollLeft-g.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(p&&h.y!==d.y){const e=n.scrollTop+t.y,i=o===Q.Down&&e<=u.y||o===Q.Up&&e>=g.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===Q.Down?n.scrollTop-u.y:n.scrollTop-g.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,a.WQ)((0,a.Re)(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 te(e){return Boolean(e&&"distance"in e)}function ne(e){return Boolean(e&&"delay"in e)}ee.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=V,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 re{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.zk)(e);return e instanceof t?e:(0,a.TW)(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.TW)(i),this.documentListeners=new G(this.document),this.listeners=new G(n),this.windowListeners=new G((0,a.zk)(i)),this.initialCoordinates=null!=(r=(0,a.e_)(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(q.Resize,this.handleCancel),this.windowListeners.add(q.DragStart,$),this.windowListeners.add(q.VisibilityChange,this.handleCancel),this.windowListeners.add(q.ContextMenu,$),this.documentListeners.add(q.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ne(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(te(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(q.Click,J,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(q.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.e_)(e))?t:m,c=(0,a.Re)(r,s);if(!n&&l){if(te(l)){if(null!=l.tolerance&&H(c,l.tolerance))return this.handleCancel();if(H(c,l.distance))return this.handleStart()}return ne(l)&&H(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===Q.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const oe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ie extends re{constructor(e){const{event:t}=e,n=(0,a.TW)(t.target);super(e,oe,n)}}ie.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 ae={move:{name:"mousemove"},end:{name:"mouseup"}};var le;!function(e){e[e.RightClick=2]="RightClick"}(le||(le={})),class extends re{constructor(e){super(e,ae,(0,a.TW)(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==le.RightClick&&(null==r||r({event:n}),!0)}}];const se={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};var ce,ue;(class extends re{constructor(e){super(e,se)}static setup(){return window.addEventListener(se.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(se.move.name,e)};function e(){}}}).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"}(ce||(ce={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(ue||(ue={}));const de={x:{[j.Backward]:!1,[j.Forward]:!1},y:{[j.Backward]:!1,[j.Forward]:!1}};var ge,fe;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(ge||(ge={})),function(e){e.Optimized="optimized"}(fe||(fe={}));const he=new Map;function ve(e,t){return(0,a.KG)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function pe(e){let{callback:t,disabled:n}=e;const o=(0,a._q)(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 be(e){return new U(T(e),e)}function me(e,t,n){void 0===t&&(t=be);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._q)(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=pe({callback:l});return(0,a.Es)((()=>{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 ye=[];function we(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.Re)(e,n.current):m}function xe(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 Ce=[];const De=[{sensor:ie,options:{}},{sensor:ee,options:{}}],Re={current:{}},Ee={draggable:{measure:N},droppable:{measure:N,strategy:ge.WhileDragging,frequency:fe.Optimized},dragOverlay:{measure:T}};class Se 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 Me={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Se,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:v},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ee,measureDroppableContainers:v,windowRect:null,measuringScheduled:!1},ke={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:v,draggableNodes:new Map,over:null,measureDroppableContainers:v},Te=(0,r.createContext)(ke),Ne=(0,r.createContext)(Me);function Ae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Se}}}function Oe(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 Se(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 Se(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 Se(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ie(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(Te),l=(0,a.ZC)(o),s=(0,a.ZC)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,a.kx)(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.ag)(e);if(t){t.focus();break}}}))}}),[o,t,i,s,l]),null}const Le=(0,r.createContext)({...m,scaleX:1,scaleY:1});var ze;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(ze||(ze={}));const Be=(0,r.memo)((function(e){var t,n,l,s;let{id:c,accessibility:d,autoScroll:g=!0,children:v,sensors:p=De,collisionDetection:b=R,measuring:y,modifiers:w,...x}=e;const C=(0,r.useReducer)(Oe,void 0,Ae),[D,S]=C,[k,N]=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]}(),[L,z]=(0,r.useState)(ze.Uninitialized),Y=L===ze.Initialized,{draggable:{active:F,nodes:K,translate:_},droppable:{containers:G}}=D,H=null!=F?K.get(F):null,q=(0,r.useRef)({initial:null,translated:null}),Q=(0,r.useMemo)((()=>{var e;return null!=F?{id:F,data:null!=(e=null==H?void 0:H.data)?e:Re,rect:q}:null}),[F,H]),$=(0,r.useRef)(null),[J,V]=(0,r.useState)(null),[Z,ee]=(0,r.useState)(null),te=(0,a.YN)(x,Object.values(x)),ne=(0,a.YG)("DndDescribedBy",c),re=(0,r.useMemo)((()=>G.getEnabled()),[G]),oe=(ie=y,(0,r.useMemo)((()=>({draggable:{...Ee.draggable,...null==ie?void 0:ie.draggable},droppable:{...Ee.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...Ee.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:ae,measureDroppableContainers:le,measuringScheduled:se}=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,g=(0,r.useRef)(e),f=function(){switch(d){case ge.Always:return!1;case ge.BeforeDragging:return n;default:return!n}}(),h=(0,a.YN)(f),v=(0,r.useCallback)((function(e){void 0===e&&(e=[]),h.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[h]),p=(0,r.useRef)(null),b=(0,a.KG)((t=>{if(f&&!n)return he;if(!t||t===he||g.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(u(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,l,n,f,u]);return(0,r.useEffect)((()=>{g.current=e}),[e]),(0,r.useEffect)((()=>{f||v()}),[n,f]),(0,r.useEffect)((()=>{l&&l.length>0&&s(null)}),[JSON.stringify(l)]),(0,r.useEffect)((()=>{f||"number"!=typeof c||null!==p.current||(p.current=setTimeout((()=>{v(),p.current=null}),c))}),[c,f,v,...o]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:null!=l}}(re,{dragging:Y,dependencies:[_.x,_.y],config:oe.droppable}),fe=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.KG)((e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(K,F),be=(0,r.useMemo)((()=>Z?(0,a.e_)(Z):null),[Z]),Se=function(){const e=!1===(null==J?void 0:J.autoScrollEnabled),t="object"==typeof g?!1===g.enabled:!1===g,n=Y&&!e&&!t;return"object"==typeof g?{...g,enabled:n}:{enabled:n}}(),Me=function(e,t){return ve(e,t)}(fe,oe.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.Es)((()=>{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=E(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=O(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:null!=F?K.get(F):null,config:Se.layoutShiftCompensation,initialRect:Me,measure:oe.draggable.measure});const ke=me(fe,oe.draggable.measure,Me),Be=me(fe?fe.parentElement:null),je=(0,r.useRef)({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:K,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=G.getNodeFor(null==(t=je.current.over)?void 0:t.id),Ye=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=pe({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,a.sb)(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=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.sb)(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[s,c]=(0,a.lk)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:oe.dragOverlay.measure}),Fe=null!=(n=Ye.nodeRef.current)?n:fe,We=Y?null!=(l=Ye.rect)?l:ke:null,Ke=Boolean(Ye.nodeRef.current&&Ye.rect),Xe=E(_e=Ke?null:ke,ve(_e));var _e;const Ue=xe(Fe?(0,a.zk)(Fe):null),Ge=function(e){const t=(0,r.useRef)(e),n=(0,a.KG)((n=>e?n&&n!==ye&&e&&t.current&&e.parentNode===t.current.parentNode?n:A(e):ye),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(Y?null!=Pe?Pe:fe:null),He=function(e,t){void 0===t&&(t=T);const[n]=e,o=xe(n?(0,a.zk)(n):null),[i,l]=(0,r.useState)(Ce);function s(){l((()=>e.length?e.map((e=>P(e)?o:new U(t(e),e))):Ce))}const c=pe({callback:s});return(0,a.Es)((()=>{null==c||c.disconnect(),s(),e.forEach((e=>null==c?void 0:c.observe(e)))}),[e]),i}(Ge),qe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(w,{transform:{x:_.x-Xe.x,y:_.y-Xe.y,scaleX:1,scaleY:1},activatorEvent:Z,active:Q,activeNodeRect:ke,containerNodeRect:Be,draggingNodeRect:We,over:je.current.over,overlayNodeRect:Ye.rect,scrollableAncestors:Ge,scrollableAncestorRects:He,windowRect:Ue}),Qe=be?(0,a.WQ)(be,_):null,$e=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)((e=>{const t=I(e.target);t&&n((e=>e?(e.set(t,B(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=I(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,B(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=I(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,a.WQ)(e,t)),m):X(e):m),[e,t])}(Ge),Je=we($e),Ve=we($e,[ke]),Ze=(0,a.WQ)(qe,Je),et=We?M(We,qe):null,tt=Q&&et?b({active:Q,collisionRect:et,droppableRects:ae,droppableContainers:re,pointerCoordinates:Qe}):null,nt=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(tt),[rt,ot]=(0,r.useState)(null),it=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Ke?qe:(0,a.WQ)(qe,Ve),null!=(s=null==rt?void 0:rt.rect)?s:null,ke),at=(0,r.useRef)(null),lt=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==$.current)return;const o=K.get($.current);if(!o)return;const a=e.nativeEvent,l=new n({active:$.current,activeNode:o,event:a,options:r,context:je,onAbort(e){if(!K.get(e))return;const{onDragAbort:t}=te.current,n={id:e};null==t||t(n),k({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!K.get(e))return;const{onDragPending:o}=te.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),k({type:"onDragPending",event:i})},onStart(e){const t=$.current;if(null==t)return;const n=K.get(t);if(!n)return;const{onDragStart:r}=te.current,o={activatorEvent:a,active:{id:t,data:n.data,rect:q}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),z(ze.Initializing),S({type:h.DragStart,initialCoordinates:e,active:t}),k({type:"onDragStart",event:o}),V(at.current),ee(a)}))},onMove(e){S({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}=je.current;let l=null;if(t&&o){const{cancelDrop:i}=te.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)}$.current=null,(0,i.unstable_batchedUpdates)((()=>{S({type:e}),z(ze.Uninitialized),ot(null),V(null),ee(null),at.current=null;const t=e===h.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=te.current[t];null==e||e(l),k({type:t,event:l})}}))}}at.current=l}),[K]),st=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=K.get(r);if(null!==$.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},$.current=r,lt(n,t))}),[K,lt]),ct=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])}(p,st);!function(e){(0,r.useEffect)((()=>{if(!a.Sw)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})))}(p),(0,a.Es)((()=>{ke&&L===ze.Initializing&&z(ze.Initialized)}),[ke,L]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:o}=je.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Ze.x,y:Ze.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),k({type:"onDragMove",event:a})}))}),[Ze.x,Ze.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=je.current;if(!e||null==$.current||!t||!o)return;const{onDragOver:a}=te.current,l=r.get(nt),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)((()=>{ot(s),null==a||a(c),k({type:"onDragOver",event:c})}))}),[nt]),(0,a.Es)((()=>{je.current={activatorEvent:Z,active:Q,activeNode:fe,collisionRect:et,collisions:tt,droppableRects:ae,draggableNodes:K,draggingNode:Fe,draggingNodeRect:We,droppableContainers:G,over:rt,scrollableAncestors:Ge,scrollAdjustedTranslate:Ze},q.current={initial:We,translated:et}}),[Q,fe,tt,et,K,Fe,We,ae,G,rt,Ge,Ze]),function(e){let{acceleration:t,activator:n=ce.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:s=5,order:c=ue.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:g,delta:f,threshold:h}=e;const v=function(e){let{delta:t,disabled:n}=e;const r=(0,a.ZC)(t);return(0,a.KG)((e=>{if(n||!r||!e)return de;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[j.Backward]:e.x[j.Backward]||-1===o,[j.Forward]:e.x[j.Forward]||1===o},y:{[j.Backward]:e.y[j.Backward]||-1===i,[j.Forward]:e.y[j.Forward]||1===i}}}),[n,t,r])}({delta:f,disabled:!l}),[p,b]=(0,a.$$)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case ce.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ce.DraggableRect:return i}}),[n,i,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)}),[]),D=(0,r.useMemo)((()=>c===ue.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of D){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=g[n];if(!r)continue;const{direction:i,speed:a}=W(e,r,w,t,h);for(const e of["x","y"])v[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,p(C,s),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()}),[t,C,o,b,l,s,JSON.stringify(w),JSON.stringify(v),p,d,D,g,JSON.stringify(h)])}({...Se,delta:_,draggingRect:et,pointerCoordinates:Qe,scrollableAncestors:Ge,scrollableAncestorRects:He});const ut=(0,r.useMemo)((()=>({active:Q,activeNode:fe,activeNodeRect:ke,activatorEvent:Z,collisions:tt,containerNodeRect:Be,dragOverlay:Ye,draggableNodes:K,droppableContainers:G,droppableRects:ae,over:rt,measureDroppableContainers:le,scrollableAncestors:Ge,scrollableAncestorRects:He,measuringConfiguration:oe,measuringScheduled:se,windowRect:Ue})),[Q,fe,ke,Z,tt,Be,Ye,K,G,ae,rt,le,Ge,He,oe,se,Ue]),dt=(0,r.useMemo)((()=>({activatorEvent:Z,activators:ct,active:Q,activeNodeRect:ke,ariaDescribedById:{draggable:ne},dispatch:S,draggableNodes:K,over:rt,measureDroppableContainers:le})),[Z,ct,Q,ke,S,ne,K,rt,le]);return o().createElement(u.Provider,{value:N},o().createElement(Te.Provider,{value:dt},o().createElement(Ne.Provider,{value:ut},o().createElement(Le.Provider,{value:it},v)),o().createElement(Ie,{disabled:!1===(null==d?void 0:d.restoreFocus)})),o().createElement(f,{...d,hiddenTextDescribedById:ne}))})),je=(0,r.createContext)(null),Pe="button",Ye="Draggable";function Fe(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=(0,a.YG)(Ye),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:g,draggableNodes:f,over:h}=(0,r.useContext)(Te),{role:v=Pe,roleDescription:p="draggable",tabIndex:b=0}=null!=i?i:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?Le:je),[w,x]=(0,a.lk)(),[C,D]=(0,a.lk)(),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.YN)(n);return(0,a.Es)((()=>(f.set(t,{id:t,key:l,node:w,activatorNode:C,data:E}),()=>{const e=f.get(t);e&&e.key===l&&f.delete(t)})),[f,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:v,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||v!==Pe)||void 0,"aria-roledescription":p,"aria-describedby":g.draggable})),[o,v,b,m,p,g.draggable]),isDragging:m,listeners:o?void 0:R,node:w,over:h,setNodeRef:x,setActivatorNodeRef:D,transform:y}}function We(){return(0,r.useContext)(Ne)}const Ke="Droppable",Xe={timeout:25};function _e(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=(0,a.YG)(Ke),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Te),g=(0,r.useRef)({disabled:n}),f=(0,r.useRef)(!1),v=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...Xe,...i},w=(0,a.YN)(null!=m?m:o),x=pe({callback:(0,r.useCallback)((()=>{f.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null}),y)):f.current=!0}),[y]),disabled:b||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),f.current=!1),e&&x.observe(e))}),[x]),[D,R]=(0,a.lk)(C),E=(0,a.YN)(t);return(0,r.useEffect)((()=>{x&&D.current&&(x.disconnect(),f.current=!1,x.observe(D.current))}),[D,x]),(0,r.useEffect)((()=>(c({type:h.RegisterDroppable,element:{id:o,key:l,disabled:n,node:D,rect:v,data:E}}),()=>c({type:h.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==g.current.disabled&&(c({type:h.SetDroppableDisabled,id:o,key:l,disabled:n}),g.current.disabled=n)}),[o,l,n,c]),{active:s,rect:v,isOver:(null==u?void 0:u.id)===o,node:D,over:u,setNodeRef:R}}},87046:(e,t,n)=>{n.d(t,{_G:()=>g,be:()=>l,gB:()=>v,gl:()=>C});var r=n(18769),o=n.n(r),i=n(81380),a=n(56550);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){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function c(e){return null!==e&&e>=0}const u=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},d={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,...d}: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,...d}:o<n&&o>=a?{x:0,y:l.height+s,...d}:{x:0,y:0,...d}},f="Sortable",h=o().createContext({activeIndex:-1,containerId:f,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:u,disabled:{draggable:!1,droppable:!1}});function v(e){let{children:t,id:n,items:l,strategy:c=u,disabled:d=!1}=e;const{active:g,dragOverlay:v,droppableRects:p,over:b,measureDroppableContainers:m}=(0,i.fF)(),y=(0,a.YG)(f,n),w=Boolean(null!==v.rect),x=(0,r.useMemo)((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),C=null!=g,D=g?x.indexOf(g.id):-1,R=b?x.indexOf(b.id):-1,E=(0,r.useRef)(x),S=!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}(x,E.current),M=-1!==R&&-1===D||S,k=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(d);(0,a.Es)((()=>{S&&C&&m(x)}),[S,x,C,m]),(0,r.useEffect)((()=>{E.current=x}),[x]);const T=(0,r.useMemo)((()=>({activeIndex:D,containerId:y,disabled:k,disableTransforms:M,items:x,overIndex:R,useDragOverlay:w,sortedRects:s(x,p),strategy:c})),[D,y,k.draggable,k.droppable,M,x,R,p,w,c]);return o().createElement(h.Provider,{value:T},t)}const p=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},b=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))},m={duration:200,easing:"ease"},y="transform",w=a.Ks.Transition.toString({property:y,duration:0,easing:"linear"}),x={roleDescription:"sortable"};function C(e){let{animateLayoutChanges:t=b,attributes:n,disabled:o,data:l,getNewIndex:s=p,id:u,strategy:d,resizeObserverConfig:g,transition:f=m}=e;const{items:v,containerId:C,activeIndex:D,disabled:R,disableTransforms:E,sortedRects:S,overIndex:M,useDragOverlay:k,strategy:T}=(0,r.useContext)(h),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,R),A=v.indexOf(u),O=(0,r.useMemo)((()=>({sortable:{containerId:C,index:A,items:v},...l})),[C,l,A,v]),I=(0,r.useMemo)((()=>v.slice(v.indexOf(u))),[v,u]),{rect:L,node:z,isOver:B,setNodeRef:j}=(0,i.zM)({id:u,data:O,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...g}}),{active:P,activatorEvent:Y,activeNodeRect:F,attributes:W,setNodeRef:K,listeners:X,isDragging:_,over:U,setActivatorNodeRef:G,transform:H}=(0,i.PM)({id:u,data:O,attributes:{...x,...n},disabled:N.draggable}),q=(0,a.jn)(j,K),Q=Boolean(P),$=Q&&!E&&c(D)&&c(M),J=!k&&_,V=J&&$?H:null,Z=$?null!=V?V:(null!=d?d:T)({rects:S,activeNodeRect:F,activeIndex:D,overIndex:M,index:A}):null,ee=c(D)&&c(M)?s({id:u,items:v,activeIndex:D,overIndex:M}):A,te=null==P?void 0:P.id,ne=(0,r.useRef)({activeId:te,items:v,newIndex:ee,containerId:C}),re=v!==ne.current.items,oe=t({active:P,containerId:C,isDragging:_,isSorting:Q,id:u,index:A,items:v,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:f,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.Es)((()=>{if(!t&&n!==u.current&&o.current){const e=l.current;if(e){const t=(0,i.Sj)(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:A,node:z,rect:L});return(0,r.useEffect)((()=>{Q&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),C!==ne.current.containerId&&(ne.current.containerId=C),v!==ne.current.items&&(ne.current.items=v)}),[Q,ee,C,v]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:P,activeIndex:D,attributes:W,data:O,rect:L,index:A,newIndex:ee,items:v,isOver:B,isSorting:Q,isDragging:_,listeners:X,node:z,overIndex:M,over:U,setNodeRef:q,setActivatorNodeRef:G,setDroppableNodeRef:j,setDraggableNodeRef:K,transform:null!=ie?ie:Z,transition:ie||re&&ne.current.newIndex===A?w:J&&!(0,a.kx)(Y)||!f?void 0:Q||oe?a.Ks.Transition.toString({...f,property:y}):void 0}}i.vL.Down,i.vL.Right,i.vL.Up,i.vL.Left}}]);
|
|
2
|
+
//# sourceMappingURL=1512.42419e90.js.map
|