diff --git a/assets/index-9ethjUee.js b/assets/index-BUDs3jjp.js similarity index 99% rename from assets/index-9ethjUee.js rename to assets/index-BUDs3jjp.js index 18bf7a6..b2cccf5 100644 --- a/assets/index-9ethjUee.js +++ b/assets/index-BUDs3jjp.js @@ -489,7 +489,7 @@ ${oe.current.stack} -moz-user-select: none; -ms-user-select: none; overflow-anchor: none; - `}}];return{always:Dc(s,"always"),resting:Dc(s,"resting"),dragging:Dc(s,"dragging"),dropAnimating:Dc(s,"dropAnimating"),userCancel:Dc(s,"userCancel")}};const $r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect,K0=()=>{const e=document.querySelector("head");return e||ve(),e},pN=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Bde(e,t){const n=it(()=>Fde(e),[e]),r=A.useRef(null),i=A.useRef(null),o=ke(fn(p=>{const h=i.current;h||ve(),h.textContent=p}),[]),s=ke(p=>{const h=r.current;h||ve(),h.textContent=p},[]);$r(()=>{!r.current&&!i.current||ve();const p=pN(t),h=pN(t);return r.current=p,i.current=h,p.setAttribute(`${Cu}-always`,e),h.setAttribute(`${Cu}-dynamic`,e),K0().appendChild(p),K0().appendChild(h),s(n.always),o(n.resting),()=>{const m=v=>{const x=v.current;x||ve(),K0().removeChild(x),v.current=null};m(r),m(i)}},[t,s,o,n.always,n.resting,e]);const a=ke(()=>o(n.dragging),[o,n.dragging]),u=ke(p=>{if(p==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=ke(()=>{i.current&&o(n.resting)},[o,n.resting]);return it(()=>({dragging:a,dropping:u,resting:c}),[a,u,c])}function v3(e,t){return Array.from(e.querySelectorAll(t))}var x3=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Rg(e){return e instanceof x3(e).HTMLElement}function Hde(e,t){const n=`[${Iu.contextId}="${e}"]`,r=v3(document,n);if(!r.length)return null;const i=r.find(o=>o.getAttribute(Iu.draggableId)===t);return!i||!Rg(i)?null:i}function zde(e){const t=A.useRef({}),n=A.useRef(null),r=A.useRef(null),i=A.useRef(!1),o=ke(function(h,m){const v={id:h,focus:m};return t.current[h]=v,function(){const b=t.current;b[h]!==v&&delete b[h]}},[]),s=ke(function(h){const m=Hde(e,h);m&&m!==document.activeElement&&m.focus()},[e]),a=ke(function(h,m){n.current===h&&(n.current=m)},[]),u=ke(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const h=n.current;h&&s(h)}))},[s]),c=ke(function(h){n.current=null;const m=document.activeElement;m&&m.getAttribute(Iu.draggableId)===h&&(n.current=h)},[]);return $r(()=>(i.current=!0,function(){i.current=!1;const h=r.current;h&&cancelAnimationFrame(h)}),[]),it(()=>({register:o,tryRecordFocus:c,tryRestoreFocusRecorded:u,tryShiftRecord:a}),[o,c,u,a])}function jde(){const e={draggables:{},droppables:{}},t=[];function n(p){return t.push(p),function(){const m=t.indexOf(p);m!==-1&&t.splice(m,1)}}function r(p){t.length&&t.forEach(h=>h(p))}function i(p){return e.draggables[p]||null}function o(p){const h=i(p);return h||ve(),h}const s={register:p=>{e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:(p,h)=>{const m=e.draggables[h.descriptor.id];m&&m.uniqueId===p.uniqueId&&(delete e.draggables[h.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:p=>{const h=p.descriptor.id,m=i(h);m&&p.uniqueId===m.uniqueId&&(delete e.draggables[h],e.droppables[p.descriptor.droppableId]&&r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:p=>!!i(p),getAllByType:p=>Object.values(e.draggables).filter(h=>h.descriptor.type===p)};function a(p){return e.droppables[p]||null}function u(p){const h=a(p);return h||ve(),h}const c={register:p=>{e.droppables[p.descriptor.id]=p},unregister:p=>{const h=a(p.descriptor.id);h&&p.uniqueId===h.uniqueId&&delete e.droppables[p.descriptor.id]},getById:u,findById:a,exists:p=>!!a(p),getAllByType:p=>Object.values(e.droppables).filter(h=>h.descriptor.type===p)};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:c,subscribe:n,clean:d}}function Vde(){const e=it(jde,[]);return A.useEffect(()=>function(){e.clean()},[e]),e}var zb=Q.createContext(null),Nm=()=>{const e=document.body;return e||ve(),e};const Ude={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Wde=e=>`rfd-announcement-${e}`;function Gde(e){const t=it(()=>Wde(e),[e]),n=A.useRef(null);return A.useEffect(function(){const o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),Bf(o.style,Ude),Nm().appendChild(o),function(){setTimeout(function(){const u=Nm();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]),ke(i=>{const o=n.current;if(o){o.textContent=i;return}},[])}const Kde={separator:"::"};function jb(e,t=Kde){const n=Q.useId();return it(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function qde({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Yde({contextId:e,text:t}){const n=jb("hidden-text",{separator:"-"}),r=it(()=>qde({contextId:e,uniqueId:n}),[n,e]);return A.useEffect(function(){const o=document.createElement("div");return o.id=r,o.textContent=t,o.style.display="none",Nm().appendChild(o),function(){const a=Nm();a.contains(o)&&a.removeChild(o)}},[r,t]),r}var Dg=Q.createContext(null);function _3(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),t}function Xde(){let e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&ve();const a={abandon:s};return e=a,a}function i(){e||ve(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}function Kf(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Qde=9,Zde=13,Vb=27,w3=32,Jde=33,epe=34,tpe=35,npe=36,rpe=37,ipe=38,ope=39,spe=40,ape={[Zde]:!0,[Qde]:!0};var b3=e=>{ape[e.keyCode]&&e.preventDefault()};const Lg=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),E3=0,hN=5;function lpe(e,t){return Math.abs(t.x-e.x)>=hN||Math.abs(t.y-e.y)>=hN}const mN={type:"IDLE"};function upe({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:i=>{const{button:o,clientX:s,clientY:a}=i;if(o!==E3)return;const u={x:s,y:a},c=n();if(c.type==="DRAGGING"){i.preventDefault(),c.actions.move(u);return}c.type!=="PENDING"&&ve();const d=c.point;if(!lpe(d,u))return;i.preventDefault();const p=c.actions.fluidLift(u);r({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:i=>{const o=n();if(o.type!=="DRAGGING"){e();return}i.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===Vb){i.preventDefault(),e();return}b3(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const o=n();if(o.type==="IDLE"&&ve(),o.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:Lg,fn:e}]}function cpe(e){const t=A.useRef(mN),n=A.useRef(ws),r=it(()=>({eventName:"mousedown",fn:function(p){if(p.defaultPrevented||p.button!==E3||p.ctrlKey||p.metaKey||p.shiftKey||p.altKey)return;const h=e.findClosestDraggableId(p);if(!h)return;const m=e.tryGetLock(h,s,{sourceEvent:p});if(!m)return;p.preventDefault();const v={x:p.clientX,y:p.clientY};n.current(),c(m,v)}}),[e]),i=it(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>{if(d.defaultPrevented)return;const p=e.findClosestDraggableId(d);if(!p)return;const h=e.findOptionsForDraggable(p);h&&(h.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}),[e]),o=ke(function(){const p={passive:!1,capture:!0};n.current=ui(window,[i,r],p)},[i,r]),s=ke(()=>{t.current.type!=="IDLE"&&(t.current=mN,n.current(),o())},[o]),a=ke(()=>{const d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),u=ke(function(){const p={capture:!0,passive:!1},h=upe({cancel:a,completed:s,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=ui(window,h,p)},[a,s]),c=ke(function(p,h){t.current.type!=="IDLE"&&ve(),t.current={type:"PENDING",point:h,actions:p},u()},[u]);$r(function(){return o(),function(){n.current()}},[o])}function fpe(){}const dpe={[epe]:!0,[Jde]:!0,[npe]:!0,[tpe]:!0};function ppe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===Vb){i.preventDefault(),n();return}if(i.keyCode===w3){i.preventDefault(),r();return}if(i.keyCode===spe){i.preventDefault(),e.moveDown();return}if(i.keyCode===ipe){i.preventDefault(),e.moveUp();return}if(i.keyCode===ope){i.preventDefault(),e.moveRight();return}if(i.keyCode===rpe){i.preventDefault(),e.moveLeft();return}if(dpe[i.keyCode]){i.preventDefault();return}b3(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Lg,fn:n}]}function hpe(e){const t=A.useRef(fpe),n=it(()=>({eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==w3)return;const s=e.findClosestDraggableId(o);if(!s)return;const a=e.tryGetLock(s,d,{sourceEvent:o});if(!a)return;o.preventDefault();let u=!0;const c=a.snapLift();t.current();function d(){u||ve(),u=!1,t.current(),r()}t.current=ui(window,ppe(c,d),{capture:!0,passive:!1})}}),[e]),r=ke(function(){const o={passive:!1,capture:!0};t.current=ui(window,[n],o)},[n]);$r(function(){return r(),function(){t.current()}},[r])}const q0={type:"IDLE"},mpe=120,gpe=.15;function ype({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===Vb&&n.preventDefault(),e()}},{eventName:Lg,fn:e}]}function vpe({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:o,clientY:s}=r.touches[0],a={x:o,y:s};r.preventDefault(),i.actions.move(a)}},{eventName:"touchend",fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const i=n();i.type==="IDLE"&&ve();const o=r.touches[0];if(!o||!(o.force>=gpe))return;const a=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){a&&e();return}if(a){if(i.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:Lg,fn:e}]}function xpe(e){const t=A.useRef(q0),n=A.useRef(ws),r=ke(function(){return t.current},[]),i=ke(function(m){t.current=m},[]),o=it(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const v=e.findClosestDraggableId(m);if(!v)return;const x=e.tryGetLock(v,a,{sourceEvent:m});if(!x)return;const b=m.touches[0],{clientX:y,clientY:_}=b,E={x:y,y:_};n.current(),p(x,E)}}),[e]),s=ke(function(){const m={capture:!0,passive:!1};n.current=ui(window,[o],m)},[o]),a=ke(()=>{const h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),i(q0),n.current(),s())},[s,i]),u=ke(()=>{const h=t.current;a(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[a]),c=ke(function(){const m={capture:!0,passive:!1},v={cancel:u,completed:a,getPhase:r},x=ui(window,vpe(v),m),b=ui(window,ype(v),m);n.current=function(){x(),b()}},[u,r,a]),d=ke(function(){const m=r();m.type!=="PENDING"&&ve();const v=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),p=ke(function(m,v){r().type!=="IDLE"&&ve();const x=setTimeout(d,mpe);i({type:"PENDING",point:v,actions:m,longPressTimerId:x}),c()},[c,r,i,d]);$r(function(){return s(),function(){n.current();const v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(q0))}},[r,s,i]),$r(function(){return ui(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const _pe=["input","button","textarea","select","option","optgroup","video","audio"];function S3(e,t){if(t==null)return!1;if(_pe.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:S3(e,t.parentElement)}function wpe(e,t){const n=t.target;return Rg(n)?S3(e,n):!1}var bpe=e=>Ni(e.getBoundingClientRect()).center;function Epe(e){return e instanceof x3(e).Element}const Spe=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function C3(e,t){return e==null?null:e[Spe](t)?e:C3(e.parentElement,t)}function Cpe(e,t){return e.closest?e.closest(t):C3(e,t)}function Ipe(e){return`[${Iu.contextId}="${e}"]`}function Ape(e,t){const n=t.target;if(!Epe(n))return null;const r=Ipe(e),i=Cpe(n,r);return!i||!Rg(i)?null:i}function Tpe(e,t){const n=Ape(e,t);return n?n.getAttribute(Iu.draggableId):null}function kpe(e,t){const n=`[${W_.contextId}="${e}"]`,i=v3(document,n).find(o=>o.getAttribute(W_.id)===t);return!i||!Rg(i)?null:i}function Npe(e){e.preventDefault()}function Zp({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function I3({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const i=n.draggable.findById(r);return!(!i||!i.options.isEnabled||!h3(t.getState(),r))}function Ope({lockAPI:e,contextId:t,store:n,registry:r,draggableId:i,forceSensorStop:o,sourceEvent:s}){if(!I3({lockAPI:e,store:n,registry:r,draggableId:i}))return null;const u=r.draggable.getById(i),c=kpe(t,u.descriptor.id);if(!c||s&&!u.options.canDragInteractiveElements&&wpe(c,s))return null;const d=e.claim(o||ws);let p="PRE_DRAG";function h(){return u.options.shouldRespectForcePress}function m(){return e.isActive(d)}function v(T,I){Zp({expected:T,phase:p,isLockActive:m,shouldWarn:!0})&&n.dispatch(I())}const x=v.bind(null,"DRAGGING");function b(T){function I(){e.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(I(),ve()),n.dispatch(Cfe(T.liftActionArgs)),p="DRAGGING";function O(M,z={shouldBlockNextClick:!1}){if(T.cleanup(),z.shouldBlockNextClick){const U=ui(window,[{eventName:"click",fn:Npe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(U)}I(),n.dispatch(s3({reason:M}))}return{isActive:()=>Zp({expected:"DRAGGING",phase:p,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,drop:M=>O("DROP",M),cancel:M=>O("CANCEL",M),...T.actions}}function y(T){const I=zf(M=>{x(()=>o3({client:M}))});return{...b({liftActionArgs:{id:i,clientSelection:T,movementMode:"FLUID"},cleanup:()=>I.cancel(),actions:{move:I}}),move:I}}function _(){const T={moveUp:()=>x(Lfe),moveRight:()=>x(Mfe),moveDown:()=>x(Pfe),moveLeft:()=>x($fe)};return b({liftActionArgs:{id:i,clientSelection:bpe(c),movementMode:"SNAP"},cleanup:ws,actions:T})}function E(){Zp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>Zp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:y,snapLift:_,abort:E}}const Rpe=[cpe,hpe,xpe];function Dpe({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const o=[...i?Rpe:[],...r||[]],s=A.useState(()=>Xde())[0],a=ke(function(b,y){Kf(b)&&!Kf(y)&&s.tryAbandon()},[s]);$r(function(){let b=t.getState();return t.subscribe(()=>{const _=t.getState();a(b,_),b=_})},[s,t,a]),$r(()=>s.tryAbandon,[s.tryAbandon]);const u=ke(x=>I3({lockAPI:s,registry:n,store:t,draggableId:x}),[s,n,t]),c=ke((x,b,y)=>Ope({lockAPI:s,registry:n,contextId:e,store:t,draggableId:x,forceSensorStop:b||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[e,s,n,t]),d=ke(x=>Tpe(e,x),[e]),p=ke(x=>{const b=n.draggable.findById(x);return b?b.options:null},[n.draggable]),h=ke(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Lb()))},[s,t]),m=ke(()=>s.isClaimed(),[s]),v=it(()=>({canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:m}),[u,c,d,p,h,m]);for(let x=0;x({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};qm.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Ppe=e=>({...Gf,...e.autoScrollerOptions,durationDampening:{...Gf.durationDampening,...e.autoScrollerOptions}});function Lc(e){return e.current||ve(),e.current}function Mpe(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:o}=e,s=A.useRef(null),a=_3(e),u=ke(()=>Lpe(a.current),[a]),c=ke(()=>Ppe(a.current),[a]),d=Gde(t),p=Yde({contextId:t,text:o}),h=Bde(t,i),m=ke(U=>{Lc(s).dispatch(U)},[]),v=it(()=>Hk({publishWhileDragging:Afe,updateDroppableScroll:kfe,updateDroppableIsEnabled:Nfe,updateDroppableIsCombineEnabled:Ofe,collectionStarting:Tfe},m),[m]),x=Vde(),b=it(()=>yde(x,v),[x,v]),y=it(()=>Lde({scrollWindow:vde,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...Hk({move:o3},m)}),[b.scrollDroppable,m,c]),_=zde(t),E=it(()=>pde({announce:d,autoScroller:y,dimensionMarshal:b,focusMarshal:_,getResponders:u,styleMarshal:h}),[d,y,b,_,u,h]);s.current=E;const C=ke(()=>{const U=Lc(s);U.getState().phase!=="IDLE"&&U.dispatch(Lb())},[]),T=ke(()=>{const U=Lc(s).getState();return U.phase==="DROP_ANIMATING"?!0:U.phase==="IDLE"?!1:U.isDragging},[]),I=it(()=>({isDragging:T,tryAbort:C}),[T,C]);n(I);const O=ke(U=>h3(Lc(s).getState(),U),[]),M=ke(()=>na(Lc(s).getState()),[]),z=it(()=>({marshal:b,focus:_,contextId:t,canLift:O,isMovementAllowed:M,dragHandleUsageInstructionsId:p,registry:x}),[t,b,p,_,O,M,x]);return Dpe({contextId:t,store:E,registry:x,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),A.useEffect(()=>C,[C]),Q.createElement(Dg.Provider,{value:z},Q.createElement(ice,{context:zb,store:E},e.children))}function $pe(){return Q.useId()}function Fpe(e){const t=$pe(),n=e.dragHandleUsageInstructions||Eh.dragHandleUsageInstructions;return Q.createElement(mce,null,r=>Q.createElement(Mpe,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const gN={dragging:5e3,dropAnimating:4500},Bpe=(e,t)=>t?cf.drop(t.duration):e?cf.snap:cf.fluid,Hpe=(e,t)=>{if(e)return t?Wf.opacity.drop:Wf.opacity.combining},zpe=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function jpe(e){const n=e.dimension.client,{offset:r,combineWith:i,dropping:o}=e,s=!!i,a=zpe(e),u=!!o,c=u?V_.drop(r,s):V_.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:Bpe(a,o),transform:c,opacity:Hpe(s,u),zIndex:u?gN.dropAnimating:gN.dragging,pointerEvents:"none"}}function Vpe(e){return{transform:V_.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Upe(e){return e.type==="DRAGGING"?jpe(e):Vpe(e)}function Wpe(e,t,n=pn){const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=L$(i,r),s=Im(o,n),a={client:o,tagName:t.tagName.toLowerCase(),display:r.display},u={x:o.marginBox.width,y:o.marginBox.height};return{descriptor:e,placeholder:a,displaceBy:u,client:o,page:s}}function Gpe(e){const t=jb("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}=e,u=it(()=>({canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}),[o,a,s]),c=ke(m=>{const v=i();return v||ve(),Wpe(n,v,m)},[n,i]),d=it(()=>({uniqueId:t,descriptor:n,options:u,getDimension:c}),[n,c,u,t]),p=A.useRef(d),h=A.useRef(!0);$r(()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current)),[r.draggable]),$r(()=>{if(h.current){h.current=!1;return}const m=p.current;p.current=d,r.draggable.update(d,m)},[d,r.draggable])}var Ub=Q.createContext(null);function Om(e){const t=A.useContext(e);return t||ve(),t}function Kpe(e){e.preventDefault()}const qpe=e=>{const t=A.useRef(null),n=ke((I=null)=>{t.current=I},[]),r=ke(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:o,registry:s}=Om(Dg),{type:a,droppableId:u}=Om(Ub),c=it(()=>({id:e.draggableId,index:e.index,type:a,droppableId:u}),[e.draggableId,e.index,a,u]),{children:d,draggableId:p,isEnabled:h,shouldRespectForcePress:m,canDragInteractiveElements:v,isClone:x,mapped:b,dropAnimationFinished:y}=e;if(!x){const I=it(()=>({descriptor:c,registry:s,getDraggableRef:r,canDragInteractiveElements:v,shouldRespectForcePress:m,isEnabled:h}),[c,s,r,v,m,h]);Gpe(I)}const _=it(()=>h?{tabIndex:0,role:"button","aria-describedby":o,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:Kpe}:null,[i,o,p,h]),E=ke(I=>{b.type==="DRAGGING"&&b.dropping&&I.propertyName==="transform"&&qm.flushSync(y)},[y,b]),C=it(()=>{const I=Upe(b),O=b.type==="DRAGGING"&&b.dropping?E:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":p,style:I,onTransitionEnd:O},dragHandleProps:_}},[i,_,p,b,E,n]),T=it(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Q.createElement(Q.Fragment,null,d(C,b.snapshot,T))};var A3=(e,t)=>e===t,T3=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const Ype=e=>e.combine?e.combine.draggableId:null,Xpe=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function Qpe(){const e=fn((i,o)=>({x:i,y:o})),t=fn((i,o,s=null,a=null,u=null)=>({isDragging:!0,isClone:o,isDropAnimating:!!u,dropAnimation:u,mode:i,draggingOver:s,combineWith:a,combineTargetFor:null})),n=fn((i,o,s,a,u=null,c=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:u,combineWith:c,mode:o,offset:i,dimension:s,forceShouldAnimate:d,snapshot:t(o,a,u,c,null)}}));return(i,o)=>{if(Kf(i)){if(i.critical.draggable.id!==o.draggableId)return null;const s=i.current.client.offset,a=i.dimensions.draggables[o.draggableId],u=Mr(i.impact),c=Xpe(i.impact),d=i.forceShouldAnimate;return n(e(s.x,s.y),i.movementMode,a,o.isClone,u,c,d)}if(i.phase==="DROP_ANIMATING"){const s=i.completed;if(s.result.draggableId!==o.draggableId)return null;const a=o.isClone,u=i.dimensions.draggables[o.draggableId],c=s.result,d=c.mode,p=T3(c),h=Ype(c),v={duration:i.dropDuration,curve:Mb.drop,moveTo:i.newHomeClientOffset,opacity:h?Wf.opacity.drop:null,scale:h?Wf.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:u,dropping:v,draggingOver:p,combineWith:h,mode:d,forceShouldAnimate:null,snapshot:t(d,a,p,h,v)}}}return null}}function k3(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Zpe={mapped:{type:"SECONDARY",offset:pn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:k3(null)}};function Jpe(){const e=fn((s,a)=>({x:s,y:a})),t=fn(k3),n=fn((s,a=null,u)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:u,snapshot:t(a)}})),r=s=>s?n(pn,s,!0):null,i=(s,a,u,c)=>{const d=u.displaced.visible[s],p=!!(c.inVirtualList&&c.effected[s]),h=kg(u),m=h&&h.draggableId===s?a:null;if(!d){if(!p)return r(m);if(u.displaced.invisible[s])return null;const b=Hu(c.displacedBy.point),y=e(b.x,b.y);return n(y,m,!0)}if(p)return r(m);const v=u.displacedBy.point,x=e(v.x,v.y);return n(x,m,d.shouldAnimate)};return(s,a)=>{if(Kf(s))return s.critical.draggable.id===a.draggableId?null:i(a.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const u=s.completed;return u.result.draggableId===a.draggableId?null:i(a.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null}}const ehe=()=>{const e=Qpe(),t=Jpe();return(r,i)=>e(r,i)||t(r,i)||Zpe},the={dropAnimationFinished:a3},nhe=R$(ehe,the,null,{context:zb,areStatePropsEqual:A3})(qpe);function N3(e){return Om(Ub).isUsingCloneFor===e.draggableId&&!e.isClone?null:Q.createElement(nhe,e)}function rhe(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return Q.createElement(N3,Bf({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const O3=e=>t=>e===t,ihe=O3("scroll"),ohe=O3("auto"),yN=(e,t)=>t(e.overflowX)||t(e.overflowY),she=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return yN(n,ihe)||yN(n,ohe)},ahe=()=>!1,R3=e=>e==null?null:e===document.body?ahe()?e:null:e===document.documentElement?null:she(e)?e:R3(e.parentElement);var G_=e=>({x:e.scrollLeft,y:e.scrollTop});const D3=e=>e?window.getComputedStyle(e).position==="fixed"?!0:D3(e.parentElement):!1;var lhe=e=>{const t=R3(e),n=D3(e);return{closestScrollable:t,isFixedOnPage:n}},uhe=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:i,client:o,page:s,closest:a})=>{const u=(()=>{if(!a)return null;const{scrollSize:h,client:m}=a,v=f3({scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:a.page.marginBox,frameClient:m,scrollSize:h,shouldClipSubject:a.shouldClipSubject,scroll:{initial:a.scroll,current:a.scroll,max:v,diff:{value:pn,displacement:pn}}}})(),c=i==="vertical"?kb:U$,d=Su({page:s,withPlaceholder:null,axis:c,frame:u});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:o,page:s,frame:u,subject:d}};const che=(e,t)=>{const n=P$(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,s=i+t.scrollWidth,u=Cb({top:r,right:s,bottom:o,left:i},n.border);return Ib({borderBox:u,margin:n.margin,border:n.border,padding:n.padding})};var fhe=({ref:e,descriptor:t,env:n,windowScroll:r,direction:i,isDropDisabled:o,isCombineEnabled:s,shouldClipSubject:a})=>{const u=n.closestScrollable,c=che(e,u),d=Im(c,r),p=(()=>{if(!u)return null;const m=P$(u),v={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:m,page:Im(m,r),scroll:G_(u),scrollSize:v,shouldClipSubject:a}})();return uhe({descriptor:t,isEnabled:!o,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:i,client:c,page:d,closest:p})};const dhe={passive:!1},phe={passive:!0};var vN=e=>e.shouldPublishImmediately?dhe:phe;const Jp=e=>e&&e.env.closestScrollable||null;function hhe(e){const t=A.useRef(null),n=Om(Dg),r=jb("droppable"),{registry:i,marshal:o}=n,s=_3(e),a=it(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),u=A.useRef(a),c=it(()=>fn((C,T)=>{t.current||ve();const I={x:C,y:T};o.updateDroppableScroll(a.id,I)}),[a.id,o]),d=ke(()=>{const C=t.current;return!C||!C.env.closestScrollable?pn:G_(C.env.closestScrollable)},[]),p=ke(()=>{const C=d();c(C.x,C.y)},[d,c]),h=it(()=>zf(p),[p]),m=ke(()=>{const C=t.current,T=Jp(C);if(C&&T||ve(),C.scrollOptions.shouldPublishImmediately){p();return}h()},[h,p]),v=ke((C,T)=>{t.current&&ve();const I=s.current,O=I.getDroppableRef();O||ve();const M=lhe(O),z={ref:O,descriptor:a,env:M,scrollOptions:T};t.current=z;const U=fhe({ref:O,descriptor:a,env:M,windowScroll:C,direction:I.direction,isDropDisabled:I.isDropDisabled,isCombineEnabled:I.isCombineEnabled,shouldClipSubject:!I.ignoreContainerClipping}),F=M.closestScrollable;return F&&(F.setAttribute(dN.contextId,n.contextId),F.addEventListener("scroll",m,vN(z.scrollOptions))),U},[n.contextId,a,m,s]),x=ke(()=>{const C=t.current,T=Jp(C);return C&&T||ve(),G_(T)},[]),b=ke(()=>{const C=t.current;C||ve();const T=Jp(C);t.current=null,T&&(h.cancel(),T.removeAttribute(dN.contextId),T.removeEventListener("scroll",m,vN(C.scrollOptions)))},[m,h]),y=ke(C=>{const T=t.current;T||ve();const I=Jp(T);I||ve(),I.scrollTop+=C.y,I.scrollLeft+=C.x},[]),_=it(()=>({getDimensionAndWatchScroll:v,getScrollWhileDragging:x,dragStopped:b,scroll:y}),[b,v,x,y]),E=it(()=>({uniqueId:r,descriptor:a,callbacks:_}),[_,a,r]);$r(()=>(u.current=E.descriptor,i.droppable.register(E),()=>{t.current&&b(),i.droppable.unregister(E)}),[_,a,b,E,o,i.droppable]),$r(()=>{t.current&&o.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),$r(()=>{t.current&&o.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Y0(){}const xN={width:0,height:0,margin:wce},mhe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?xN:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},ghe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=mhe({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?cf.placeholder:null}},yhe=e=>{const t=A.useRef(null),n=ke(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:o,contextId:s}=e,[a,u]=A.useState(e.animate==="open");A.useEffect(()=>a?r!=="open"?(n(),u(!1),Y0):t.current?Y0:(t.current=setTimeout(()=>{t.current=null,u(!1)}),n):Y0,[r,a,n]);const c=ke(p=>{p.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),d=ghe({isAnimatingOpenOnMount:a,animate:e.animate,placeholder:e.placeholder});return Q.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":s,onTransitionEnd:c,ref:e.innerRef})};var vhe=Q.memo(yhe);class xhe extends Q.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const _he=e=>{const t=A.useContext(Dg);t||ve();const{contextId:n,isMovementAllowed:r}=t,i=A.useRef(null),o=A.useRef(null),{children:s,droppableId:a,type:u,mode:c,direction:d,ignoreContainerClipping:p,isDropDisabled:h,isCombineEnabled:m,snapshot:v,useClone:x,updateViewportMaxScroll:b,getContainerForClone:y}=e,_=ke(()=>i.current,[]),E=ke((F=null)=>{i.current=F},[]);ke(()=>o.current,[]);const C=ke((F=null)=>{o.current=F},[]),T=ke(()=>{r()&&b({maxScroll:p3()})},[r,b]);hhe({droppableId:a,type:u,mode:c,direction:d,isDropDisabled:h,isCombineEnabled:m,ignoreContainerClipping:p,getDroppableRef:_});const I=it(()=>Q.createElement(xhe,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:F,data:W,animate:Y})=>Q.createElement(vhe,{placeholder:W,onClose:F,innerRef:C,animate:Y,contextId:n,onTransitionEnd:T})),[n,T,e.placeholder,e.shouldAnimatePlaceholder,C]),O=it(()=>({innerRef:E,placeholder:I,droppableProps:{"data-rfd-droppable-id":a,"data-rfd-droppable-context-id":n}}),[n,a,I,E]),M=x?x.dragging.draggableId:null,z=it(()=>({droppableId:a,type:u,isUsingCloneFor:M}),[a,M,u]);function U(){if(!x)return null;const{dragging:F,render:W}=x,Y=Q.createElement(N3,{draggableId:F.draggableId,index:F.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(L,B)=>W(L,B,F));return la.createPortal(Y,y())}return Q.createElement(Ub.Provider,{value:z},s(O,v),U())};function whe(){return document.body||ve(),document.body}const _N={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:whe},L3=e=>{let t={...e},n;for(n in _N)e[n]===void 0&&(t={...t,[n]:_N[n]});return t},X0=(e,t)=>e===t.droppable.type,wN=(e,t)=>t.draggables[e.draggable.id],bhe=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=fn(o=>({draggableId:o.id,type:o.type,source:{index:o.index,droppableId:o.droppableId}})),r=fn((o,s,a,u,c,d)=>{const p=c.descriptor.id;if(c.descriptor.droppableId===o){const v=d?{render:d,dragging:n(c.descriptor)}:null,x={isDraggingOver:a,draggingOverWith:a?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:x,useClone:v}}if(!s)return t;if(!u)return e;const m={isDraggingOver:a,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(o,s)=>{const a=L3(s),u=a.droppableId,c=a.type,d=!a.isDropDisabled,p=a.renderClone;if(Kf(o)){const h=o.critical;if(!X0(c,h))return t;const m=wN(h,o.dimensions),v=Mr(o.impact)===u;return r(u,d,v,v,m,p)}if(o.phase==="DROP_ANIMATING"){const h=o.completed;if(!X0(c,h.critical))return t;const m=wN(h.critical,o.dimensions);return r(u,d,T3(h.result)===u,Mr(h.impact)===u,m,p)}if(o.phase==="IDLE"&&o.completed&&!o.shouldFlush){const h=o.completed;if(!X0(c,h.critical))return t;const m=Mr(h.impact)===u,v=!!(h.impact.at&&h.impact.at.type==="COMBINE"),x=h.critical.droppable.id===u;return m?v?e:t:x?e:t}return t}},Ehe={updateViewportMaxScroll:Dfe},She=R$(bhe,Ehe,(e,t,n)=>({...L3(n),...e,...t}),{context:zb,areStatePropsEqual:A3})(_he);var Che=She;const K_=2**31-1;function P3(e,t,n){const r=n-Date.now();e.current=r<=K_?setTimeout(t,r):setTimeout(()=>P3(e,t,n),K_)}function Ihe(){const e=G1(),t=A.useRef();return hb(()=>clearTimeout(t.current)),A.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(i,o=0){e()&&(n(),o<=K_?t.current=setTimeout(i,o):P3(t,i,Date.now()+o))}return{set:r,clear:n,handleRef:t}},[])}const Ahe={[oi]:"showing",[bu]:"showing show"},M3=A.forwardRef((e,t)=>S.jsx(Da,{...e,ref:t,transitionClasses:Ahe}));M3.displayName="ToastFade";const $3=A.createContext({onClose(){}}),F3=A.forwardRef(({bsPrefix:e,closeLabel:t="Close",closeVariant:n,closeButton:r=!0,className:i,children:o,...s},a)=>{e=Be(e,"toast-header");const u=A.useContext($3),c=Pt(d=>{u==null||u.onClose==null||u.onClose(d)});return S.jsxs("div",{ref:a,...s,className:Te(e,i),children:[o,r&&S.jsx(fd,{"aria-label":t,variant:n,onClick:c,"data-dismiss":"toast"})]})});F3.displayName="ToastHeader";const B3=A.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=Be(t,"toast-body"),S.jsx(n,{ref:i,className:Te(e,t),...r})));B3.displayName="ToastBody";const H3=A.forwardRef(({bsPrefix:e,className:t,transition:n=M3,show:r=!0,animation:i=!0,delay:o=5e3,autohide:s=!1,onClose:a,onEntered:u,onExit:c,onExiting:d,onEnter:p,onEntering:h,onExited:m,bg:v,...x},b)=>{e=Be(e,"toast");const y=A.useRef(o),_=A.useRef(a);A.useEffect(()=>{y.current=o,_.current=a},[o,a]);const E=Ihe(),C=!!(s&&r),T=A.useCallback(()=>{C&&(_.current==null||_.current())},[C]);A.useEffect(()=>{E.set(T,y.current)},[E,T]);const I=A.useMemo(()=>({onClose:a}),[a]),O=!!(n&&i),M=S.jsx("div",{...x,ref:b,className:Te(e,t,v&&`bg-${v}`,!O&&(r?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return S.jsx($3.Provider,{value:I,children:O&&n?S.jsx(n,{in:r,onEnter:p,onEntering:h,onEntered:u,onExit:c,onExiting:d,onExited:m,unmountOnExit:!0,children:M}):M})});H3.displayName="Toast";const bN=Object.assign(H3,{Body:B3,Header:F3}),The={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},z3=A.forwardRef(({bsPrefix:e,position:t,containerPosition:n,className:r,as:i="div",...o},s)=>(e=Be(e,"toast-container"),S.jsx(i,{ref:s,...o,className:Te(e,t&&The[t],n&&`position-${n}`,r)})));z3.displayName="ToastContainer";function khe({id:e,showModal:t,setShowModal:n}){const[r,i]=A.useState(e),[o,s]=A.useState(""),{flowchart:a,renameVariable:u}=Gr(),{getString:c}=sn();A.useEffect(()=>{i(e)},[t]),A.useEffect(()=>{const p="var",h=ud.match(`${p} ${r}`,"Command");if(h.failed()){const m=c("SyntaxError",{pos:h.getInterval().startIdx-p.length-1,expected:D1(h)});s(m)}else{const m=ce.reject(a.variables,{id:e}),v=Wa(h).check(m);s(v!==null?c(v.message,v.payload):"")}},[r]);const d=p=>{p.preventDefault(),setTimeout(()=>{u(e,r.trim())},200),n(!1)};return S.jsx(ct,{show:t,onHide:()=>n(!1),children:S.jsxs(wa,{onSubmit:d,children:[S.jsx(ct.Header,{closeButton:!0,children:S.jsx(ct.Title,{children:c("ModalRenameVariable_Title")})}),S.jsx(ct.Body,{children:S.jsx(HM,{helpText:c("ModalRenameVariable_HelpText"),value:r,setValue:i,problem:c(o)})}),S.jsxs(ct.Footer,{children:[S.jsx(Rn,{variant:"secondary",onClick:()=>n(!1),children:c("Button_Cancel")}),S.jsx(Rn,{variant:"primary",type:"submit",disabled:o!=="",children:c("Button_Rename")})]})]})})}function Nhe({id:e}){const[t,n]=A.useState(!1),{changeVariableType:r,removeVariable:i}=Gr(),{machineState:o}=Ms(),{getString:s}=sn();if(!ce.has(o.memory,e))return S.jsx(S.Fragment,{});const{type:a,value:u}=o.memory[e];return S.jsxs(S.Fragment,{children:[S.jsx(khe,{id:e,showModal:t,setShowModal:n}),S.jsx("td",{children:S.jsx(Rn,{variant:"secondary",size:"sm",className:"font-monospace",onClick:()=>n(!0),children:e})}),S.jsx("td",{style:{minWidth:"6.5em"},children:S.jsx(wa.Select,{size:"sm",value:a,onChange:c=>r(e,c.target.value),children:ce.map(Yn,c=>S.jsx("option",{value:c,children:s(`DataType_${c}`)},c))})}),S.jsx("td",{className:"w-100",children:S.jsx("small",{className:"d-flex p-1 fw-bold font-monospace text-success bg-success bg-opacity-10 border border-success border-opacity-10 rounded-1",children:u===null?"?":JSON.stringify(u)})}),S.jsx("td",{children:S.jsx(Lu,{text:s("VariableList_Remove"),children:S.jsx(Rn,{variant:"danger",size:"sm",onClick:()=>i(e),children:S.jsx("i",{className:"bi bi-trash-fill"})})})})]})}function Ohe(){const{flowchart:e,addVariable:t,reorderVariables:n}=Gr(),{getString:r}=sn(),i=()=>{var s;(s=document.activeElement)==null||s.blur()},o=({source:s,destination:a})=>{n(s.index,a==null?void 0:a.index)};return S.jsxs("div",{className:"d-flex flex-column h-100",children:[S.jsxs("div",{className:"d-flex flex-row justify-content-between align-items-center mb-2 gap-3",children:[S.jsx("span",{className:"fw-semibold",children:r("VariableList_Title")}),S.jsx(Rn,{size:"sm",className:"fw-semibold text-nowrap",onClick:t,children:r("VariableList_Add")})]}),S.jsx("div",{style:{overflowY:"auto",overflowX:"clip"},children:S.jsx(ta,{size:"sm",variant:"borderless",className:"mb-0",children:S.jsx(Fpe,{onDragStart:i,onDragEnd:o,children:S.jsx(Che,{droppableId:"droppable",children:({innerRef:s,droppableProps:a,placeholder:u})=>S.jsxs("tbody",{ref:s,...a,children:[ce.map(e.variables,({id:c},d)=>S.jsx(rhe,{draggableId:`${d}`,index:d,children:({innerRef:p,draggableProps:h,dragHandleProps:m})=>S.jsx("tr",{ref:p,...h,...m,children:S.jsx(Nhe,{id:c})})},d)),u]})})})})})]})}function Rhe(){const{toasts:e}=Wr();return S.jsx(z3,{className:"position-fixed bottom-0 end-0 m-3",children:ce.map(e,(t,n)=>S.jsx(bN,{bg:t.background,className:"text-white",children:S.jsxs(bN.Body,{children:[S.jsx("i",{className:`bi ${t.icon} me-2`})," ",t.message]})},n))})}function Dhe(){const{flowchart:e}=Gr(),{resetMachine:t}=Ms(),n=JSON.stringify(ce.map(e.nodes,i=>ce.pick(i,["id","data"]))),r=JSON.stringify(ce.map(e.edges,i=>ce.pick(i,["source","sourceHandle","target"])));return A.useEffect(()=>{t(e)},[n,r,e.variables]),S.jsx(S.Fragment,{})}function Lhe(){const{importSimpleFlowchart:e}=Gr(),{triggerToast:t}=Wr(),{getString:n}=sn();return A.useEffect(()=>{const r=new URL(window.location.href),i=r.searchParams.get("lzs");if(i!==null)try{const o=Mle(i);e(o),r.searchParams.delete("lzs"),window.history.replaceState({},"",r.toString()),t({message:n("ToastMessage_ImportSuccess"),icon:"bi-check-circle",background:"success"})}catch{t({message:n("ToastMessage_ImportError"),icon:"bi-exclamation-triangle",background:"danger"})}},[]),S.jsx(S.Fragment,{})}function Phe(){const e={backgroundColor:Tt.gray300,background:`repeating-linear-gradient( + `}}];return{always:Dc(s,"always"),resting:Dc(s,"resting"),dragging:Dc(s,"dragging"),dropAnimating:Dc(s,"dropAnimating"),userCancel:Dc(s,"userCancel")}};const $r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?A.useLayoutEffect:A.useEffect,K0=()=>{const e=document.querySelector("head");return e||ve(),e},pN=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Bde(e,t){const n=it(()=>Fde(e),[e]),r=A.useRef(null),i=A.useRef(null),o=ke(fn(p=>{const h=i.current;h||ve(),h.textContent=p}),[]),s=ke(p=>{const h=r.current;h||ve(),h.textContent=p},[]);$r(()=>{!r.current&&!i.current||ve();const p=pN(t),h=pN(t);return r.current=p,i.current=h,p.setAttribute(`${Cu}-always`,e),h.setAttribute(`${Cu}-dynamic`,e),K0().appendChild(p),K0().appendChild(h),s(n.always),o(n.resting),()=>{const m=v=>{const x=v.current;x||ve(),K0().removeChild(x),v.current=null};m(r),m(i)}},[t,s,o,n.always,n.resting,e]);const a=ke(()=>o(n.dragging),[o,n.dragging]),u=ke(p=>{if(p==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=ke(()=>{i.current&&o(n.resting)},[o,n.resting]);return it(()=>({dragging:a,dropping:u,resting:c}),[a,u,c])}function v3(e,t){return Array.from(e.querySelectorAll(t))}var x3=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Rg(e){return e instanceof x3(e).HTMLElement}function Hde(e,t){const n=`[${Iu.contextId}="${e}"]`,r=v3(document,n);if(!r.length)return null;const i=r.find(o=>o.getAttribute(Iu.draggableId)===t);return!i||!Rg(i)?null:i}function zde(e){const t=A.useRef({}),n=A.useRef(null),r=A.useRef(null),i=A.useRef(!1),o=ke(function(h,m){const v={id:h,focus:m};return t.current[h]=v,function(){const b=t.current;b[h]!==v&&delete b[h]}},[]),s=ke(function(h){const m=Hde(e,h);m&&m!==document.activeElement&&m.focus()},[e]),a=ke(function(h,m){n.current===h&&(n.current=m)},[]),u=ke(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const h=n.current;h&&s(h)}))},[s]),c=ke(function(h){n.current=null;const m=document.activeElement;m&&m.getAttribute(Iu.draggableId)===h&&(n.current=h)},[]);return $r(()=>(i.current=!0,function(){i.current=!1;const h=r.current;h&&cancelAnimationFrame(h)}),[]),it(()=>({register:o,tryRecordFocus:c,tryRestoreFocusRecorded:u,tryShiftRecord:a}),[o,c,u,a])}function jde(){const e={draggables:{},droppables:{}},t=[];function n(p){return t.push(p),function(){const m=t.indexOf(p);m!==-1&&t.splice(m,1)}}function r(p){t.length&&t.forEach(h=>h(p))}function i(p){return e.draggables[p]||null}function o(p){const h=i(p);return h||ve(),h}const s={register:p=>{e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:(p,h)=>{const m=e.draggables[h.descriptor.id];m&&m.uniqueId===p.uniqueId&&(delete e.draggables[h.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:p=>{const h=p.descriptor.id,m=i(h);m&&p.uniqueId===m.uniqueId&&(delete e.draggables[h],e.droppables[p.descriptor.droppableId]&&r({type:"REMOVAL",value:p}))},getById:o,findById:i,exists:p=>!!i(p),getAllByType:p=>Object.values(e.draggables).filter(h=>h.descriptor.type===p)};function a(p){return e.droppables[p]||null}function u(p){const h=a(p);return h||ve(),h}const c={register:p=>{e.droppables[p.descriptor.id]=p},unregister:p=>{const h=a(p.descriptor.id);h&&p.uniqueId===h.uniqueId&&delete e.droppables[p.descriptor.id]},getById:u,findById:a,exists:p=>!!a(p),getAllByType:p=>Object.values(e.droppables).filter(h=>h.descriptor.type===p)};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:c,subscribe:n,clean:d}}function Vde(){const e=it(jde,[]);return A.useEffect(()=>function(){e.clean()},[e]),e}var zb=Q.createContext(null),Nm=()=>{const e=document.body;return e||ve(),e};const Ude={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Wde=e=>`rfd-announcement-${e}`;function Gde(e){const t=it(()=>Wde(e),[e]),n=A.useRef(null);return A.useEffect(function(){const o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),Bf(o.style,Ude),Nm().appendChild(o),function(){setTimeout(function(){const u=Nm();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]),ke(i=>{const o=n.current;if(o){o.textContent=i;return}},[])}const Kde={separator:"::"};function jb(e,t=Kde){const n=Q.useId();return it(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function qde({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Yde({contextId:e,text:t}){const n=jb("hidden-text",{separator:"-"}),r=it(()=>qde({contextId:e,uniqueId:n}),[n,e]);return A.useEffect(function(){const o=document.createElement("div");return o.id=r,o.textContent=t,o.style.display="none",Nm().appendChild(o),function(){const a=Nm();a.contains(o)&&a.removeChild(o)}},[r,t]),r}var Dg=Q.createContext(null);function _3(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),t}function Xde(){let e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&ve();const a={abandon:s};return e=a,a}function i(){e||ve(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}function Kf(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const Qde=9,Zde=13,Vb=27,w3=32,Jde=33,epe=34,tpe=35,npe=36,rpe=37,ipe=38,ope=39,spe=40,ape={[Zde]:!0,[Qde]:!0};var b3=e=>{ape[e.keyCode]&&e.preventDefault()};const Lg=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),E3=0,hN=5;function lpe(e,t){return Math.abs(t.x-e.x)>=hN||Math.abs(t.y-e.y)>=hN}const mN={type:"IDLE"};function upe({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:i=>{const{button:o,clientX:s,clientY:a}=i;if(o!==E3)return;const u={x:s,y:a},c=n();if(c.type==="DRAGGING"){i.preventDefault(),c.actions.move(u);return}c.type!=="PENDING"&&ve();const d=c.point;if(!lpe(d,u))return;i.preventDefault();const p=c.actions.fluidLift(u);r({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:i=>{const o=n();if(o.type!=="DRAGGING"){e();return}i.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===Vb){i.preventDefault(),e();return}b3(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const o=n();if(o.type==="IDLE"&&ve(),o.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:Lg,fn:e}]}function cpe(e){const t=A.useRef(mN),n=A.useRef(ws),r=it(()=>({eventName:"mousedown",fn:function(p){if(p.defaultPrevented||p.button!==E3||p.ctrlKey||p.metaKey||p.shiftKey||p.altKey)return;const h=e.findClosestDraggableId(p);if(!h)return;const m=e.tryGetLock(h,s,{sourceEvent:p});if(!m)return;p.preventDefault();const v={x:p.clientX,y:p.clientY};n.current(),c(m,v)}}),[e]),i=it(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>{if(d.defaultPrevented)return;const p=e.findClosestDraggableId(d);if(!p)return;const h=e.findOptionsForDraggable(p);h&&(h.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}),[e]),o=ke(function(){const p={passive:!1,capture:!0};n.current=ui(window,[i,r],p)},[i,r]),s=ke(()=>{t.current.type!=="IDLE"&&(t.current=mN,n.current(),o())},[o]),a=ke(()=>{const d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),u=ke(function(){const p={capture:!0,passive:!1},h=upe({cancel:a,completed:s,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=ui(window,h,p)},[a,s]),c=ke(function(p,h){t.current.type!=="IDLE"&&ve(),t.current={type:"PENDING",point:h,actions:p},u()},[u]);$r(function(){return o(),function(){n.current()}},[o])}function fpe(){}const dpe={[epe]:!0,[Jde]:!0,[npe]:!0,[tpe]:!0};function ppe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===Vb){i.preventDefault(),n();return}if(i.keyCode===w3){i.preventDefault(),r();return}if(i.keyCode===spe){i.preventDefault(),e.moveDown();return}if(i.keyCode===ipe){i.preventDefault(),e.moveUp();return}if(i.keyCode===ope){i.preventDefault(),e.moveRight();return}if(i.keyCode===rpe){i.preventDefault(),e.moveLeft();return}if(dpe[i.keyCode]){i.preventDefault();return}b3(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Lg,fn:n}]}function hpe(e){const t=A.useRef(fpe),n=it(()=>({eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==w3)return;const s=e.findClosestDraggableId(o);if(!s)return;const a=e.tryGetLock(s,d,{sourceEvent:o});if(!a)return;o.preventDefault();let u=!0;const c=a.snapLift();t.current();function d(){u||ve(),u=!1,t.current(),r()}t.current=ui(window,ppe(c,d),{capture:!0,passive:!1})}}),[e]),r=ke(function(){const o={passive:!1,capture:!0};t.current=ui(window,[n],o)},[n]);$r(function(){return r(),function(){t.current()}},[r])}const q0={type:"IDLE"},mpe=120,gpe=.15;function ype({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===Vb&&n.preventDefault(),e()}},{eventName:Lg,fn:e}]}function vpe({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:o,clientY:s}=r.touches[0],a={x:o,y:s};r.preventDefault(),i.actions.move(a)}},{eventName:"touchend",fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const i=n();i.type==="IDLE"&&ve();const o=r.touches[0];if(!o||!(o.force>=gpe))return;const a=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){a&&e();return}if(a){if(i.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:Lg,fn:e}]}function xpe(e){const t=A.useRef(q0),n=A.useRef(ws),r=ke(function(){return t.current},[]),i=ke(function(m){t.current=m},[]),o=it(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const v=e.findClosestDraggableId(m);if(!v)return;const x=e.tryGetLock(v,a,{sourceEvent:m});if(!x)return;const b=m.touches[0],{clientX:y,clientY:_}=b,E={x:y,y:_};n.current(),p(x,E)}}),[e]),s=ke(function(){const m={capture:!0,passive:!1};n.current=ui(window,[o],m)},[o]),a=ke(()=>{const h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),i(q0),n.current(),s())},[s,i]),u=ke(()=>{const h=t.current;a(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[a]),c=ke(function(){const m={capture:!0,passive:!1},v={cancel:u,completed:a,getPhase:r},x=ui(window,vpe(v),m),b=ui(window,ype(v),m);n.current=function(){x(),b()}},[u,r,a]),d=ke(function(){const m=r();m.type!=="PENDING"&&ve();const v=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:v,hasMoved:!1})},[r,i]),p=ke(function(m,v){r().type!=="IDLE"&&ve();const x=setTimeout(d,mpe);i({type:"PENDING",point:v,actions:m,longPressTimerId:x}),c()},[c,r,i,d]);$r(function(){return s(),function(){n.current();const v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),i(q0))}},[r,s,i]),$r(function(){return ui(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const _pe=["input","button","textarea","select","option","optgroup","video","audio"];function S3(e,t){if(t==null)return!1;if(_pe.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:S3(e,t.parentElement)}function wpe(e,t){const n=t.target;return Rg(n)?S3(e,n):!1}var bpe=e=>Ni(e.getBoundingClientRect()).center;function Epe(e){return e instanceof x3(e).Element}const Spe=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function C3(e,t){return e==null?null:e[Spe](t)?e:C3(e.parentElement,t)}function Cpe(e,t){return e.closest?e.closest(t):C3(e,t)}function Ipe(e){return`[${Iu.contextId}="${e}"]`}function Ape(e,t){const n=t.target;if(!Epe(n))return null;const r=Ipe(e),i=Cpe(n,r);return!i||!Rg(i)?null:i}function Tpe(e,t){const n=Ape(e,t);return n?n.getAttribute(Iu.draggableId):null}function kpe(e,t){const n=`[${W_.contextId}="${e}"]`,i=v3(document,n).find(o=>o.getAttribute(W_.id)===t);return!i||!Rg(i)?null:i}function Npe(e){e.preventDefault()}function Zp({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function I3({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const i=n.draggable.findById(r);return!(!i||!i.options.isEnabled||!h3(t.getState(),r))}function Ope({lockAPI:e,contextId:t,store:n,registry:r,draggableId:i,forceSensorStop:o,sourceEvent:s}){if(!I3({lockAPI:e,store:n,registry:r,draggableId:i}))return null;const u=r.draggable.getById(i),c=kpe(t,u.descriptor.id);if(!c||s&&!u.options.canDragInteractiveElements&&wpe(c,s))return null;const d=e.claim(o||ws);let p="PRE_DRAG";function h(){return u.options.shouldRespectForcePress}function m(){return e.isActive(d)}function v(T,I){Zp({expected:T,phase:p,isLockActive:m,shouldWarn:!0})&&n.dispatch(I())}const x=v.bind(null,"DRAGGING");function b(T){function I(){e.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(I(),ve()),n.dispatch(Cfe(T.liftActionArgs)),p="DRAGGING";function O(M,z={shouldBlockNextClick:!1}){if(T.cleanup(),z.shouldBlockNextClick){const U=ui(window,[{eventName:"click",fn:Npe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(U)}I(),n.dispatch(s3({reason:M}))}return{isActive:()=>Zp({expected:"DRAGGING",phase:p,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,drop:M=>O("DROP",M),cancel:M=>O("CANCEL",M),...T.actions}}function y(T){const I=zf(M=>{x(()=>o3({client:M}))});return{...b({liftActionArgs:{id:i,clientSelection:T,movementMode:"FLUID"},cleanup:()=>I.cancel(),actions:{move:I}}),move:I}}function _(){const T={moveUp:()=>x(Lfe),moveRight:()=>x(Mfe),moveDown:()=>x(Pfe),moveLeft:()=>x($fe)};return b({liftActionArgs:{id:i,clientSelection:bpe(c),movementMode:"SNAP"},cleanup:ws,actions:T})}function E(){Zp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>Zp({expected:"PRE_DRAG",phase:p,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:y,snapLift:_,abort:E}}const Rpe=[cpe,hpe,xpe];function Dpe({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const o=[...i?Rpe:[],...r||[]],s=A.useState(()=>Xde())[0],a=ke(function(b,y){Kf(b)&&!Kf(y)&&s.tryAbandon()},[s]);$r(function(){let b=t.getState();return t.subscribe(()=>{const _=t.getState();a(b,_),b=_})},[s,t,a]),$r(()=>s.tryAbandon,[s.tryAbandon]);const u=ke(x=>I3({lockAPI:s,registry:n,store:t,draggableId:x}),[s,n,t]),c=ke((x,b,y)=>Ope({lockAPI:s,registry:n,contextId:e,store:t,draggableId:x,forceSensorStop:b||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[e,s,n,t]),d=ke(x=>Tpe(e,x),[e]),p=ke(x=>{const b=n.draggable.findById(x);return b?b.options:null},[n.draggable]),h=ke(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Lb()))},[s,t]),m=ke(()=>s.isClaimed(),[s]),v=it(()=>({canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:h,isLockClaimed:m}),[u,c,d,p,h,m]);for(let x=0;x({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};qm.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Ppe=e=>({...Gf,...e.autoScrollerOptions,durationDampening:{...Gf.durationDampening,...e.autoScrollerOptions}});function Lc(e){return e.current||ve(),e.current}function Mpe(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:o}=e,s=A.useRef(null),a=_3(e),u=ke(()=>Lpe(a.current),[a]),c=ke(()=>Ppe(a.current),[a]),d=Gde(t),p=Yde({contextId:t,text:o}),h=Bde(t,i),m=ke(U=>{Lc(s).dispatch(U)},[]),v=it(()=>Hk({publishWhileDragging:Afe,updateDroppableScroll:kfe,updateDroppableIsEnabled:Nfe,updateDroppableIsCombineEnabled:Ofe,collectionStarting:Tfe},m),[m]),x=Vde(),b=it(()=>yde(x,v),[x,v]),y=it(()=>Lde({scrollWindow:vde,scrollDroppable:b.scrollDroppable,getAutoScrollerOptions:c,...Hk({move:o3},m)}),[b.scrollDroppable,m,c]),_=zde(t),E=it(()=>pde({announce:d,autoScroller:y,dimensionMarshal:b,focusMarshal:_,getResponders:u,styleMarshal:h}),[d,y,b,_,u,h]);s.current=E;const C=ke(()=>{const U=Lc(s);U.getState().phase!=="IDLE"&&U.dispatch(Lb())},[]),T=ke(()=>{const U=Lc(s).getState();return U.phase==="DROP_ANIMATING"?!0:U.phase==="IDLE"?!1:U.isDragging},[]),I=it(()=>({isDragging:T,tryAbort:C}),[T,C]);n(I);const O=ke(U=>h3(Lc(s).getState(),U),[]),M=ke(()=>na(Lc(s).getState()),[]),z=it(()=>({marshal:b,focus:_,contextId:t,canLift:O,isMovementAllowed:M,dragHandleUsageInstructionsId:p,registry:x}),[t,b,p,_,O,M,x]);return Dpe({contextId:t,store:E,registry:x,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),A.useEffect(()=>C,[C]),Q.createElement(Dg.Provider,{value:z},Q.createElement(ice,{context:zb,store:E},e.children))}function $pe(){return Q.useId()}function Fpe(e){const t=$pe(),n=e.dragHandleUsageInstructions||Eh.dragHandleUsageInstructions;return Q.createElement(mce,null,r=>Q.createElement(Mpe,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const gN={dragging:5e3,dropAnimating:4500},Bpe=(e,t)=>t?cf.drop(t.duration):e?cf.snap:cf.fluid,Hpe=(e,t)=>{if(e)return t?Wf.opacity.drop:Wf.opacity.combining},zpe=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function jpe(e){const n=e.dimension.client,{offset:r,combineWith:i,dropping:o}=e,s=!!i,a=zpe(e),u=!!o,c=u?V_.drop(r,s):V_.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:Bpe(a,o),transform:c,opacity:Hpe(s,u),zIndex:u?gN.dropAnimating:gN.dragging,pointerEvents:"none"}}function Vpe(e){return{transform:V_.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Upe(e){return e.type==="DRAGGING"?jpe(e):Vpe(e)}function Wpe(e,t,n=pn){const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=L$(i,r),s=Im(o,n),a={client:o,tagName:t.tagName.toLowerCase(),display:r.display},u={x:o.marginBox.width,y:o.marginBox.height};return{descriptor:e,placeholder:a,displaceBy:u,client:o,page:s}}function Gpe(e){const t=jb("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}=e,u=it(()=>({canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}),[o,a,s]),c=ke(m=>{const v=i();return v||ve(),Wpe(n,v,m)},[n,i]),d=it(()=>({uniqueId:t,descriptor:n,options:u,getDimension:c}),[n,c,u,t]),p=A.useRef(d),h=A.useRef(!0);$r(()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current)),[r.draggable]),$r(()=>{if(h.current){h.current=!1;return}const m=p.current;p.current=d,r.draggable.update(d,m)},[d,r.draggable])}var Ub=Q.createContext(null);function Om(e){const t=A.useContext(e);return t||ve(),t}function Kpe(e){e.preventDefault()}const qpe=e=>{const t=A.useRef(null),n=ke((I=null)=>{t.current=I},[]),r=ke(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:o,registry:s}=Om(Dg),{type:a,droppableId:u}=Om(Ub),c=it(()=>({id:e.draggableId,index:e.index,type:a,droppableId:u}),[e.draggableId,e.index,a,u]),{children:d,draggableId:p,isEnabled:h,shouldRespectForcePress:m,canDragInteractiveElements:v,isClone:x,mapped:b,dropAnimationFinished:y}=e;if(!x){const I=it(()=>({descriptor:c,registry:s,getDraggableRef:r,canDragInteractiveElements:v,shouldRespectForcePress:m,isEnabled:h}),[c,s,r,v,m,h]);Gpe(I)}const _=it(()=>h?{tabIndex:0,role:"button","aria-describedby":o,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:Kpe}:null,[i,o,p,h]),E=ke(I=>{b.type==="DRAGGING"&&b.dropping&&I.propertyName==="transform"&&qm.flushSync(y)},[y,b]),C=it(()=>{const I=Upe(b),O=b.type==="DRAGGING"&&b.dropping?E:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":p,style:I,onTransitionEnd:O},dragHandleProps:_}},[i,_,p,b,E,n]),T=it(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Q.createElement(Q.Fragment,null,d(C,b.snapshot,T))};var A3=(e,t)=>e===t,T3=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const Ype=e=>e.combine?e.combine.draggableId:null,Xpe=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function Qpe(){const e=fn((i,o)=>({x:i,y:o})),t=fn((i,o,s=null,a=null,u=null)=>({isDragging:!0,isClone:o,isDropAnimating:!!u,dropAnimation:u,mode:i,draggingOver:s,combineWith:a,combineTargetFor:null})),n=fn((i,o,s,a,u=null,c=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:u,combineWith:c,mode:o,offset:i,dimension:s,forceShouldAnimate:d,snapshot:t(o,a,u,c,null)}}));return(i,o)=>{if(Kf(i)){if(i.critical.draggable.id!==o.draggableId)return null;const s=i.current.client.offset,a=i.dimensions.draggables[o.draggableId],u=Mr(i.impact),c=Xpe(i.impact),d=i.forceShouldAnimate;return n(e(s.x,s.y),i.movementMode,a,o.isClone,u,c,d)}if(i.phase==="DROP_ANIMATING"){const s=i.completed;if(s.result.draggableId!==o.draggableId)return null;const a=o.isClone,u=i.dimensions.draggables[o.draggableId],c=s.result,d=c.mode,p=T3(c),h=Ype(c),v={duration:i.dropDuration,curve:Mb.drop,moveTo:i.newHomeClientOffset,opacity:h?Wf.opacity.drop:null,scale:h?Wf.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:u,dropping:v,draggingOver:p,combineWith:h,mode:d,forceShouldAnimate:null,snapshot:t(d,a,p,h,v)}}}return null}}function k3(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const Zpe={mapped:{type:"SECONDARY",offset:pn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:k3(null)}};function Jpe(){const e=fn((s,a)=>({x:s,y:a})),t=fn(k3),n=fn((s,a=null,u)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:u,snapshot:t(a)}})),r=s=>s?n(pn,s,!0):null,i=(s,a,u,c)=>{const d=u.displaced.visible[s],p=!!(c.inVirtualList&&c.effected[s]),h=kg(u),m=h&&h.draggableId===s?a:null;if(!d){if(!p)return r(m);if(u.displaced.invisible[s])return null;const b=Hu(c.displacedBy.point),y=e(b.x,b.y);return n(y,m,!0)}if(p)return r(m);const v=u.displacedBy.point,x=e(v.x,v.y);return n(x,m,d.shouldAnimate)};return(s,a)=>{if(Kf(s))return s.critical.draggable.id===a.draggableId?null:i(a.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const u=s.completed;return u.result.draggableId===a.draggableId?null:i(a.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null}}const ehe=()=>{const e=Qpe(),t=Jpe();return(r,i)=>e(r,i)||t(r,i)||Zpe},the={dropAnimationFinished:a3},nhe=R$(ehe,the,null,{context:zb,areStatePropsEqual:A3})(qpe);function N3(e){return Om(Ub).isUsingCloneFor===e.draggableId&&!e.isClone?null:Q.createElement(nhe,e)}function rhe(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return Q.createElement(N3,Bf({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const O3=e=>t=>e===t,ihe=O3("scroll"),ohe=O3("auto"),yN=(e,t)=>t(e.overflowX)||t(e.overflowY),she=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return yN(n,ihe)||yN(n,ohe)},ahe=()=>!1,R3=e=>e==null?null:e===document.body?ahe()?e:null:e===document.documentElement?null:she(e)?e:R3(e.parentElement);var G_=e=>({x:e.scrollLeft,y:e.scrollTop});const D3=e=>e?window.getComputedStyle(e).position==="fixed"?!0:D3(e.parentElement):!1;var lhe=e=>{const t=R3(e),n=D3(e);return{closestScrollable:t,isFixedOnPage:n}},uhe=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:i,client:o,page:s,closest:a})=>{const u=(()=>{if(!a)return null;const{scrollSize:h,client:m}=a,v=f3({scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:a.page.marginBox,frameClient:m,scrollSize:h,shouldClipSubject:a.shouldClipSubject,scroll:{initial:a.scroll,current:a.scroll,max:v,diff:{value:pn,displacement:pn}}}})(),c=i==="vertical"?kb:U$,d=Su({page:s,withPlaceholder:null,axis:c,frame:u});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:o,page:s,frame:u,subject:d}};const che=(e,t)=>{const n=P$(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,s=i+t.scrollWidth,u=Cb({top:r,right:s,bottom:o,left:i},n.border);return Ib({borderBox:u,margin:n.margin,border:n.border,padding:n.padding})};var fhe=({ref:e,descriptor:t,env:n,windowScroll:r,direction:i,isDropDisabled:o,isCombineEnabled:s,shouldClipSubject:a})=>{const u=n.closestScrollable,c=che(e,u),d=Im(c,r),p=(()=>{if(!u)return null;const m=P$(u),v={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:m,page:Im(m,r),scroll:G_(u),scrollSize:v,shouldClipSubject:a}})();return uhe({descriptor:t,isEnabled:!o,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:i,client:c,page:d,closest:p})};const dhe={passive:!1},phe={passive:!0};var vN=e=>e.shouldPublishImmediately?dhe:phe;const Jp=e=>e&&e.env.closestScrollable||null;function hhe(e){const t=A.useRef(null),n=Om(Dg),r=jb("droppable"),{registry:i,marshal:o}=n,s=_3(e),a=it(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),u=A.useRef(a),c=it(()=>fn((C,T)=>{t.current||ve();const I={x:C,y:T};o.updateDroppableScroll(a.id,I)}),[a.id,o]),d=ke(()=>{const C=t.current;return!C||!C.env.closestScrollable?pn:G_(C.env.closestScrollable)},[]),p=ke(()=>{const C=d();c(C.x,C.y)},[d,c]),h=it(()=>zf(p),[p]),m=ke(()=>{const C=t.current,T=Jp(C);if(C&&T||ve(),C.scrollOptions.shouldPublishImmediately){p();return}h()},[h,p]),v=ke((C,T)=>{t.current&&ve();const I=s.current,O=I.getDroppableRef();O||ve();const M=lhe(O),z={ref:O,descriptor:a,env:M,scrollOptions:T};t.current=z;const U=fhe({ref:O,descriptor:a,env:M,windowScroll:C,direction:I.direction,isDropDisabled:I.isDropDisabled,isCombineEnabled:I.isCombineEnabled,shouldClipSubject:!I.ignoreContainerClipping}),F=M.closestScrollable;return F&&(F.setAttribute(dN.contextId,n.contextId),F.addEventListener("scroll",m,vN(z.scrollOptions))),U},[n.contextId,a,m,s]),x=ke(()=>{const C=t.current,T=Jp(C);return C&&T||ve(),G_(T)},[]),b=ke(()=>{const C=t.current;C||ve();const T=Jp(C);t.current=null,T&&(h.cancel(),T.removeAttribute(dN.contextId),T.removeEventListener("scroll",m,vN(C.scrollOptions)))},[m,h]),y=ke(C=>{const T=t.current;T||ve();const I=Jp(T);I||ve(),I.scrollTop+=C.y,I.scrollLeft+=C.x},[]),_=it(()=>({getDimensionAndWatchScroll:v,getScrollWhileDragging:x,dragStopped:b,scroll:y}),[b,v,x,y]),E=it(()=>({uniqueId:r,descriptor:a,callbacks:_}),[_,a,r]);$r(()=>(u.current=E.descriptor,i.droppable.register(E),()=>{t.current&&b(),i.droppable.unregister(E)}),[_,a,b,E,o,i.droppable]),$r(()=>{t.current&&o.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),$r(()=>{t.current&&o.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Y0(){}const xN={width:0,height:0,margin:wce},mhe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?xN:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},ghe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=mhe({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?cf.placeholder:null}},yhe=e=>{const t=A.useRef(null),n=ke(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:o,contextId:s}=e,[a,u]=A.useState(e.animate==="open");A.useEffect(()=>a?r!=="open"?(n(),u(!1),Y0):t.current?Y0:(t.current=setTimeout(()=>{t.current=null,u(!1)}),n):Y0,[r,a,n]);const c=ke(p=>{p.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),d=ghe({isAnimatingOpenOnMount:a,animate:e.animate,placeholder:e.placeholder});return Q.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":s,onTransitionEnd:c,ref:e.innerRef})};var vhe=Q.memo(yhe);class xhe extends Q.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const _he=e=>{const t=A.useContext(Dg);t||ve();const{contextId:n,isMovementAllowed:r}=t,i=A.useRef(null),o=A.useRef(null),{children:s,droppableId:a,type:u,mode:c,direction:d,ignoreContainerClipping:p,isDropDisabled:h,isCombineEnabled:m,snapshot:v,useClone:x,updateViewportMaxScroll:b,getContainerForClone:y}=e,_=ke(()=>i.current,[]),E=ke((F=null)=>{i.current=F},[]);ke(()=>o.current,[]);const C=ke((F=null)=>{o.current=F},[]),T=ke(()=>{r()&&b({maxScroll:p3()})},[r,b]);hhe({droppableId:a,type:u,mode:c,direction:d,isDropDisabled:h,isCombineEnabled:m,ignoreContainerClipping:p,getDroppableRef:_});const I=it(()=>Q.createElement(xhe,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:F,data:W,animate:Y})=>Q.createElement(vhe,{placeholder:W,onClose:F,innerRef:C,animate:Y,contextId:n,onTransitionEnd:T})),[n,T,e.placeholder,e.shouldAnimatePlaceholder,C]),O=it(()=>({innerRef:E,placeholder:I,droppableProps:{"data-rfd-droppable-id":a,"data-rfd-droppable-context-id":n}}),[n,a,I,E]),M=x?x.dragging.draggableId:null,z=it(()=>({droppableId:a,type:u,isUsingCloneFor:M}),[a,M,u]);function U(){if(!x)return null;const{dragging:F,render:W}=x,Y=Q.createElement(N3,{draggableId:F.draggableId,index:F.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(L,B)=>W(L,B,F));return la.createPortal(Y,y())}return Q.createElement(Ub.Provider,{value:z},s(O,v),U())};function whe(){return document.body||ve(),document.body}const _N={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:whe},L3=e=>{let t={...e},n;for(n in _N)e[n]===void 0&&(t={...t,[n]:_N[n]});return t},X0=(e,t)=>e===t.droppable.type,wN=(e,t)=>t.draggables[e.draggable.id],bhe=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=fn(o=>({draggableId:o.id,type:o.type,source:{index:o.index,droppableId:o.droppableId}})),r=fn((o,s,a,u,c,d)=>{const p=c.descriptor.id;if(c.descriptor.droppableId===o){const v=d?{render:d,dragging:n(c.descriptor)}:null,x={isDraggingOver:a,draggingOverWith:a?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:x,useClone:v}}if(!s)return t;if(!u)return e;const m={isDraggingOver:a,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(o,s)=>{const a=L3(s),u=a.droppableId,c=a.type,d=!a.isDropDisabled,p=a.renderClone;if(Kf(o)){const h=o.critical;if(!X0(c,h))return t;const m=wN(h,o.dimensions),v=Mr(o.impact)===u;return r(u,d,v,v,m,p)}if(o.phase==="DROP_ANIMATING"){const h=o.completed;if(!X0(c,h.critical))return t;const m=wN(h.critical,o.dimensions);return r(u,d,T3(h.result)===u,Mr(h.impact)===u,m,p)}if(o.phase==="IDLE"&&o.completed&&!o.shouldFlush){const h=o.completed;if(!X0(c,h.critical))return t;const m=Mr(h.impact)===u,v=!!(h.impact.at&&h.impact.at.type==="COMBINE"),x=h.critical.droppable.id===u;return m?v?e:t:x?e:t}return t}},Ehe={updateViewportMaxScroll:Dfe},She=R$(bhe,Ehe,(e,t,n)=>({...L3(n),...e,...t}),{context:zb,areStatePropsEqual:A3})(_he);var Che=She;const K_=2**31-1;function P3(e,t,n){const r=n-Date.now();e.current=r<=K_?setTimeout(t,r):setTimeout(()=>P3(e,t,n),K_)}function Ihe(){const e=G1(),t=A.useRef();return hb(()=>clearTimeout(t.current)),A.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(i,o=0){e()&&(n(),o<=K_?t.current=setTimeout(i,o):P3(t,i,Date.now()+o))}return{set:r,clear:n,handleRef:t}},[])}const Ahe={[oi]:"showing",[bu]:"showing show"},M3=A.forwardRef((e,t)=>S.jsx(Da,{...e,ref:t,transitionClasses:Ahe}));M3.displayName="ToastFade";const $3=A.createContext({onClose(){}}),F3=A.forwardRef(({bsPrefix:e,closeLabel:t="Close",closeVariant:n,closeButton:r=!0,className:i,children:o,...s},a)=>{e=Be(e,"toast-header");const u=A.useContext($3),c=Pt(d=>{u==null||u.onClose==null||u.onClose(d)});return S.jsxs("div",{ref:a,...s,className:Te(e,i),children:[o,r&&S.jsx(fd,{"aria-label":t,variant:n,onClick:c,"data-dismiss":"toast"})]})});F3.displayName="ToastHeader";const B3=A.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=Be(t,"toast-body"),S.jsx(n,{ref:i,className:Te(e,t),...r})));B3.displayName="ToastBody";const H3=A.forwardRef(({bsPrefix:e,className:t,transition:n=M3,show:r=!0,animation:i=!0,delay:o=5e3,autohide:s=!1,onClose:a,onEntered:u,onExit:c,onExiting:d,onEnter:p,onEntering:h,onExited:m,bg:v,...x},b)=>{e=Be(e,"toast");const y=A.useRef(o),_=A.useRef(a);A.useEffect(()=>{y.current=o,_.current=a},[o,a]);const E=Ihe(),C=!!(s&&r),T=A.useCallback(()=>{C&&(_.current==null||_.current())},[C]);A.useEffect(()=>{E.set(T,y.current)},[E,T]);const I=A.useMemo(()=>({onClose:a}),[a]),O=!!(n&&i),M=S.jsx("div",{...x,ref:b,className:Te(e,t,v&&`bg-${v}`,!O&&(r?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return S.jsx($3.Provider,{value:I,children:O&&n?S.jsx(n,{in:r,onEnter:p,onEntering:h,onEntered:u,onExit:c,onExiting:d,onExited:m,unmountOnExit:!0,children:M}):M})});H3.displayName="Toast";const bN=Object.assign(H3,{Body:B3,Header:F3}),The={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},z3=A.forwardRef(({bsPrefix:e,position:t,containerPosition:n,className:r,as:i="div",...o},s)=>(e=Be(e,"toast-container"),S.jsx(i,{ref:s,...o,className:Te(e,t&&The[t],n&&`position-${n}`,r)})));z3.displayName="ToastContainer";function khe({id:e,showModal:t,setShowModal:n}){const[r,i]=A.useState(e),[o,s]=A.useState(""),{flowchart:a,renameVariable:u}=Gr(),{getString:c}=sn();A.useEffect(()=>{i(e)},[t]),A.useEffect(()=>{const p="var",h=ud.match(`${p} ${r}`,"Command");if(h.failed()){const m=c("SyntaxError",{pos:h.getInterval().startIdx-p.length-1,expected:D1(h)});s(m)}else{const m=ce.reject(a.variables,{id:e}),v=Wa(h).check(m);s(v!==null?c(v.message,v.payload):"")}},[r]);const d=p=>{p.preventDefault(),setTimeout(()=>{u(e,r.trim())},200),n(!1)};return S.jsx(ct,{show:t,onHide:()=>n(!1),children:S.jsxs(wa,{onSubmit:d,children:[S.jsx(ct.Header,{closeButton:!0,children:S.jsx(ct.Title,{children:c("ModalRenameVariable_Title")})}),S.jsx(ct.Body,{children:S.jsx(HM,{helpText:c("ModalRenameVariable_HelpText"),value:r,setValue:i,problem:c(o)})}),S.jsxs(ct.Footer,{children:[S.jsx(Rn,{variant:"secondary",onClick:()=>n(!1),children:c("Button_Cancel")}),S.jsx(Rn,{variant:"primary",type:"submit",disabled:o!=="",children:c("Button_Rename")})]})]})})}function Nhe({id:e}){const[t,n]=A.useState(!1),{changeVariableType:r,removeVariable:i}=Gr(),{machineState:o}=Ms(),{getString:s}=sn();if(!ce.has(o.memory,e))return S.jsx(S.Fragment,{});const{type:a,value:u}=o.memory[e];return S.jsxs(S.Fragment,{children:[S.jsx(khe,{id:e,showModal:t,setShowModal:n}),S.jsx("td",{children:S.jsx(Rn,{variant:"secondary",size:"sm",className:"font-monospace",onClick:()=>n(!0),children:e})}),S.jsx("td",{children:S.jsx(wa.Select,{size:"sm",value:a,onChange:c=>r(e,c.target.value),className:"w-auto",children:ce.map(Yn,c=>S.jsx("option",{value:c,children:s(`DataType_${c}`)},c))})}),S.jsx("td",{className:"w-100",children:S.jsx("small",{className:"d-flex p-1 fw-bold font-monospace text-success bg-success bg-opacity-10 border border-success border-opacity-10 rounded-1",children:u===null?"?":JSON.stringify(u)})}),S.jsx("td",{children:S.jsx(Lu,{text:s("VariableList_Remove"),children:S.jsx(Rn,{variant:"danger",size:"sm",onClick:()=>i(e),children:S.jsx("i",{className:"bi bi-trash-fill"})})})})]})}function Ohe(){const{flowchart:e,addVariable:t,reorderVariables:n}=Gr(),{getString:r}=sn(),i=()=>{var s;(s=document.activeElement)==null||s.blur()},o=({source:s,destination:a})=>{n(s.index,a==null?void 0:a.index)};return S.jsxs("div",{className:"d-flex flex-column h-100",children:[S.jsxs("div",{className:"d-flex flex-row justify-content-between align-items-center mb-2 gap-3",children:[S.jsx("span",{className:"fw-semibold",children:r("VariableList_Title")}),S.jsx(Rn,{size:"sm",className:"fw-semibold text-nowrap",onClick:t,children:r("VariableList_Add")})]}),S.jsx("div",{style:{overflowY:"auto",overflowX:"clip"},children:S.jsx(ta,{size:"sm",variant:"borderless",className:"mb-0",children:S.jsx(Fpe,{onDragStart:i,onDragEnd:o,children:S.jsx(Che,{droppableId:"droppable",children:({innerRef:s,droppableProps:a,placeholder:u})=>S.jsxs("tbody",{ref:s,...a,children:[ce.map(e.variables,({id:c},d)=>S.jsx(rhe,{draggableId:`${d}`,index:d,children:({innerRef:p,draggableProps:h,dragHandleProps:m})=>S.jsx("tr",{ref:p,...h,...m,children:S.jsx(Nhe,{id:c})})},d)),u]})})})})})]})}function Rhe(){const{toasts:e}=Wr();return S.jsx(z3,{className:"position-fixed bottom-0 end-0 m-3",children:ce.map(e,(t,n)=>S.jsx(bN,{bg:t.background,className:"text-white",children:S.jsxs(bN.Body,{children:[S.jsx("i",{className:`bi ${t.icon} me-2`})," ",t.message]})},n))})}function Dhe(){const{flowchart:e}=Gr(),{resetMachine:t}=Ms(),n=JSON.stringify(ce.map(e.nodes,i=>ce.pick(i,["id","data"]))),r=JSON.stringify(ce.map(e.edges,i=>ce.pick(i,["source","sourceHandle","target"])));return A.useEffect(()=>{t(e)},[n,r,e.variables]),S.jsx(S.Fragment,{})}function Lhe(){const{importSimpleFlowchart:e}=Gr(),{triggerToast:t}=Wr(),{getString:n}=sn();return A.useEffect(()=>{const r=new URL(window.location.href),i=r.searchParams.get("lzs");if(i!==null)try{const o=Mle(i);e(o),r.searchParams.delete("lzs"),window.history.replaceState({},"",r.toString()),t({message:n("ToastMessage_ImportSuccess"),icon:"bi-check-circle",background:"success"})}catch{t({message:n("ToastMessage_ImportError"),icon:"bi-exclamation-triangle",background:"danger"})}},[]),S.jsx(S.Fragment,{})}function Phe(){const e={backgroundColor:Tt.gray300,background:`repeating-linear-gradient( 45deg, ${Tt.gray300}, ${Tt.gray300} 2px, diff --git a/index.html b/index.html index 14397c7..890e95f 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ FluxoLab.app - +