@riddix/hamh 2.1.0-alpha.453 β 2.1.0-alpha.454
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/README.md
CHANGED
|
@@ -425,25 +425,13 @@ Thank you to everyone who helps improve this project by reporting issues!
|
|
|
425
425
|
|
|
426
426
|
### π Sponsors
|
|
427
427
|
|
|
428
|
-
> **Donations are completely voluntary!**
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
| [@linux4life798](https://github.com/linux4life798) | π Thank you for your generous support! |
|
|
436
|
-
| [@torandreroland](https://github.com/torandreroland) | π Thank you for your generous support! |
|
|
437
|
-
| [@ralondo](https://github.com/ralondo) | π Thank you for your generous support! |
|
|
438
|
-
| [@bexxter85-ux](https://github.com/bexxter85-ux) | π Thank you for your generous support! |
|
|
439
|
-
| [@dinariox](https://github.com/dinariox) | π Thank you for your generous support! |
|
|
440
|
-
| StefanS | π Thank you for your generous support! |
|
|
441
|
-
| Manny B. | π Thank you for your generous support! |
|
|
442
|
-
| [@JRCondat](https://github.com/JRCondat) | π Thank you for your generous support! |
|
|
443
|
-
| Bonjon | π Thank you for your generous support! |
|
|
444
|
-
| TobiR | π Thank you for your generous support! |
|
|
445
|
-
| [@d3rby91](https://github.com/d3rby91) | π Thank you for your generous support! |
|
|
446
|
-
| *Anonymous supporters* | π Thank you to those who prefer not to be named - your support is equally appreciated! |
|
|
428
|
+
> **Donations are completely voluntary!** This project exists because of passion for open source, not money. Thank you to everyone who has supported it β it truly means a lot! β€οΈ
|
|
429
|
+
|
|
430
|
+
π₯ **First Sponsor:** [@thorsten-gehrig](https://github.com/thorsten-gehrig)
|
|
431
|
+
|
|
432
|
+
π [@SH1FT-W](https://github.com/SH1FT-W) Β· [@ilGaspa](https://github.com/ilGaspa) Β· [@linux4life798](https://github.com/linux4life798) Β· [@torandreroland](https://github.com/torandreroland) Β· [@ralondo](https://github.com/ralondo) Β· [@bexxter85-ux](https://github.com/bexxter85-ux) Β· [@dinariox](https://github.com/dinariox) Β· [@JRCondat](https://github.com/JRCondat) Β· [@d3rby91](https://github.com/d3rby91) Β· [@nicoodeimos](https://github.com/nicoodeimos) Β· [@ustari28](https://github.com/ustari28) Β· Markus MΓΌller ([@Dingosworld](https://github.com/Dingosworld)) Β· StefanS Β· Manny B. Β· Bonjon Β· TobiR Β· Franz Huber Β· Michele Larese de Prata
|
|
433
|
+
|
|
434
|
+
π *...and anonymous supporters who prefer not to be named.*
|
|
447
435
|
|
|
448
436
|
### π Original Author
|
|
449
437
|
|
|
@@ -496,4 +496,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
496
496
|
To pick up a draggable item, press the space bar.
|
|
497
497
|
While dragging, use the arrow keys to move the item.
|
|
498
498
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
499
|
-
`},blt={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 vlt(e){let{announcements:t=blt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=ylt}=e;const{announce:o,announcement:s}=plt(),a=cv("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),mlt(_.useMemo(()=>({onDragStart(f){let{active:p}=f;o(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:g}=f;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(f){let{active:p,over:g}=f;o(t.onDragOver({active:p,over:g}))},onDragEnd(f){let{active:p,over:g}=f;o(t.onDragEnd({active:p,over:g}))},onDragCancel(f){let{active:p,over:g}=f;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const u=Gt.createElement(Gt.Fragment,null,Gt.createElement(flt,{id:r,value:i.draggable}),Gt.createElement(hlt,{id:a,announcement:s}));return n?Rd.createPortal(u,n):u}var Li;(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"})(Li||(Li={}));function DS(){}function IK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function xlt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const fl=Object.freeze({x:0,y:0});function $le(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Lle(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Slt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jK(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Nle(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function PK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const wlt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=PK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=$le(PK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Lle)},Clt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=jK(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=jK(l),u=i.reduce((p,g,y)=>p+$le(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Lle)};function Elt(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const Alt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Elt(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Slt)};function klt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Fle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:fl}function _lt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Dlt=_lt(1);function Olt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Tlt(e,t,n){const r=Olt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const Mlt={ignoreTransform:!1};function mg(e,t){t===void 0&&(t=Mlt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=ps(e).getComputedStyle(e);c&&(n=Tlt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function $K(e){return mg(e,{ignoreTransform:!0})}function Rlt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ilt(e,t){return t===void 0&&(t=ps(e).getComputedStyle(e)),t.position==="fixed"}function jlt(e,t){t===void 0&&(t=ps(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function QC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(DI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!av(i)||Ile(i)||n.includes(i))return n;const o=ps(e).getComputedStyle(i);return i!==e&&jlt(i,o)&&n.push(i),Ilt(i,o)?n:r(i.parentNode)}return e?r(e):n}function Ble(e){const[t]=QC(e,1);return t??null}function ik(e){return!JC||!e?null:hg(e)?e:_I(e)?DI(e)||e===pg(e).scrollingElement?window:av(e)?e:null:null}function zle(e){return hg(e)?e.scrollX:e.scrollLeft}function Hle(e){return hg(e)?e.scrollY:e.scrollTop}function sO(e){return{x:zle(e),y:Hle(e)}}var Zi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Zi||(Zi={}));function Ule(e){return!JC||!e?!1:e===document.scrollingElement}function Vle(e){const t={x:0,y:0},n=Ule(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const Plt={x:.2,y:.2};function $lt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Plt);const{isTop:c,isBottom:u,isLeft:f,isRight:p}=Vle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Zi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Zi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!p&&a>=t.right-b.width?(g.x=Zi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Zi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Llt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Wle(e){return e.reduce((t,n)=>rm(t,sO(n)),fl)}function Nlt(e){return e.reduce((t,n)=>t+zle(n),0)}function Flt(e){return e.reduce((t,n)=>t+Hle(n),0)}function Blt(e,t){if(t===void 0&&(t=mg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Ble(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zlt=[["x",["left","right"],Nlt],["y",["top","bottom"],Flt]];class MI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=QC(n),i=Wle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of zlt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Py{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Hlt(e){const{EventTarget:t}=ps(e);return e instanceof t?e:pg(e)}function ok(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function LK(e){e.preventDefault()}function Ult(e){e.stopPropagation()}var Nn;(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"})(Nn||(Nn={}));const qle={start:[Nn.Space,Nn.Enter],cancel:[Nn.Esc],end:[Nn.Space,Nn.Enter,Nn.Tab]},Vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Nn.Right:return{...n,x:n.x+25};case Nn.Left:return{...n,x:n.x-25};case Nn.Down:return{...n,y:n.y+25};case Nn.Up:return{...n,y:n.y-25}}};class RI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Py(pg(n)),this.windowListeners=new Py(ps(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Blt(r),n(fl)}handleKeyDown(t){if(TI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=qle,coordinateGetter:s=Vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:fl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const p=ib(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Vle(b),O=Llt(b),T={x:Math.min(v===Nn.Right?O.right-O.width/2:O.right,Math.max(v===Nn.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Nn.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Nn.Down?O.top:O.top+O.height/2,f.y))},I=v===Nn.Right&&!C||v===Nn.Left&&!w,L=v===Nn.Down&&!A||v===Nn.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+p.x,R=v===Nn.Right&&$<=E.x||v===Nn.Left&&$>=D.x;if(R&&!p.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Nn.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(L&&T.y!==f.y){const $=b.scrollTop+p.y,R=v===Nn.Down&&$<=E.y||v===Nn.Up&&$>=D.y;if(R&&!p.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Nn.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,rm(ib(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}RI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=qle,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function NK(e){return!!(e&&"distance"in e)}function FK(e){return!!(e&&"delay"in e)}class II{constructor(t,n,r){var i;r===void 0&&(r=Hlt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=pg(s),this.documentListeners=new Py(this.document),this.listeners=new Py(r),this.windowListeners=new Py(ps(s)),this.initialCoordinates=(i=oO(o))!=null?i:fl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,LK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,LK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(NK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,Ult,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=oO(t))!=null?n:fl,c=ib(i,l);if(!r&&a){if(NK(a)){if(a.tolerance!=null&&ok(c,a.tolerance))return this.handleCancel();if(ok(c,a.distance))return this.handleStart()}if(FK(a)&&ok(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Nn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Wlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class jI extends II{constructor(t){const{event:n}=t,r=pg(n.target);super(t,Wlt,r)}}jI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const qlt={move:{name:"mousemove"},end:{name:"mouseup"}};var aO;(function(e){e[e.RightClick=2]="RightClick"})(aO||(aO={}));class Glt extends II{constructor(t){super(t,qlt,pg(t.event.target))}}Glt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===aO.RightClick?!1:(r?.({event:n}),!0)}}];const sk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Klt extends II{constructor(t){super(t,sk)}static setup(){return window.addEventListener(sk.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(sk.move.name,t)};function t(){}}}Klt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var $y;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($y||($y={}));var OS;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(OS||(OS={}));function Ylt(e){let{acceleration:t,activator:n=$y.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=OS.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:p}=e;const g=Zlt({delta:f,disabled:!o}),[y,b]=alt(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case $y.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $y.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===OS.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:L}=$lt(D,T,C,t,p);for(const $ of["x","y"])g[$][I[$]]||(L[$]=0,I[$]=0);if(L.x>0||L.y>0){b(),w.current=D,y(A,s),v.current=L,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(p)])}const Xlt={x:{[Zi.Backward]:!1,[Zi.Forward]:!1},y:{[Zi.Backward]:!1,[Zi.Forward]:!1}};function Zlt(e){let{delta:t,disabled:n}=e;const r=iO(t);return lv(i=>{if(n||!r||!i)return Xlt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Zi.Backward]:i.x[Zi.Backward]||o.x===-1,[Zi.Forward]:i.x[Zi.Forward]||o.x===1},y:{[Zi.Backward]:i.y[Zi.Backward]||o.y===-1,[Zi.Forward]:i.y[Zi.Forward]||o.y===1}}},[n,t,r])}function Jlt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return lv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Qlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var sb;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sb||(sb={}));var lO;(function(e){e.Optimized="optimized"})(lO||(lO={}));const BK=new Map;function ect(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),p=rb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!p.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[p]),y=_.useRef(null),b=lv(S=>{if(f&&!n)return BK;if(!S||S===BK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new MI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case sb.Always:return!1;case sb.BeforeDragging:return n;default:return!n}}}function Gle(e,t){return lv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function tct(e,t){return Gle(e,t)}function nct(e){let{callback:t,disabled:n}=e;const r=OI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function e8(e){let{callback:t,disabled:n}=e;const r=OI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function rct(e){return new MI(mg(e),e)}function zK(e,t,n){t===void 0&&(t=rct);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=nct({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=e8({callback:o});return Ec(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function ict(e){const t=Gle(e);return Fle(e,t)}const HK=[];function oct(e){const t=_.useRef(e),n=lv(r=>e?r&&r!==HK&&e&&t.current&&e.parentNode===t.current.parentNode?r:QC(e):HK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function sct(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=ik(o.target);s&&n(a=>a?(a.set(s,sO(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=ik(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,sO(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=ik(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>rm(o,s),fl):Wle(e):fl,[e,t])}function UK(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==fl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?ib(e,n.current):fl}function act(e){_.useEffect(()=>{if(!JC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function lct(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function Kle(e){return _.useMemo(()=>e?Rlt(e):null,[e])}const VK=[];function cct(e,t){t===void 0&&(t=mg);const[n]=e,r=Kle(n?ps(n):null),[i,o]=_.useState(VK);function s(){o(()=>e.length?e.map(l=>Ule(l)?r:new MI(t(l),l)):VK)}const a=e8({callback:s});return Ec(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function uct(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return av(t)?t:e}function dct(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(av(u)){r(f=>{const p=t(u);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),o=e8({callback:i}),s=_.useCallback(c=>{const u=uct(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=_S(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const fct=[{sensor:jI,options:{}},{sensor:RI,options:{}}],hct={current:{}},O4={draggable:{measure:$K},droppable:{measure:$K,strategy:sb.WhileDragging,frequency:lO.Optimized},dragOverlay:{measure:mg}};class Ly extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const pct={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ly,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:DS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:O4,measureDroppableContainers:DS,windowRect:null,measuringScheduled:!1},mct={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:DS,draggableNodes:new Map,over:null,measureDroppableContainers:DS},t8=_.createContext(mct),Yle=_.createContext(pct);function gct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ly}}}function yct(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ly(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Ly(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ly(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function bct(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(t8),o=iO(r),s=iO(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!TI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=ult(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function vct(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function xct(e){return _.useMemo(()=>({draggable:{...O4.draggable,...e?.draggable},droppable:{...O4.droppable,...e?.droppable},dragOverlay:{...O4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Sct(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;Ec(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=Fle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=Ble(c);p&&p.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Xle=_.createContext({...fl,scaleX:1,scaleY:1});var Ed;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ed||(Ed={}));const wct=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=fct,collisionDetection:f=Alt,measuring:p,modifiers:g,...y}=t;const b=_.useReducer(yct,void 0,gct),[v,S]=b,[C,w]=glt(),[A,E]=_.useState(Ed.Uninitialized),D=A===Ed.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:L}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Ot;return O!=null?{id:O,data:(Ot=$?.data)!=null?Ot:hct,rect:R}:null},[O,$]),P=_.useRef(null),[z,N]=_.useState(null),[V,U]=_.useState(null),K=rb(y,Object.values(y)),X=cv("DndDescribedBy",s),B=_.useMemo(()=>L.getEnabled(),[L]),W=xct(p),{droppableRects:q,measureDroppableContainers:H,measuringScheduled:Y}=ect(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=Jlt(T,O),te=_.useMemo(()=>V?oO(V):null,[V]),ee=yr(),ae=tct(J,W.draggable.measure);Sct({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const ue=zK(J,W.draggable.measure,ae),ne=zK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=L.getNodeFor((n=Z.current.over)==null?void 0:n.id),se=dct({measure:W.dragOverlay.measure}),fe=(r=se.nodeRef.current)!=null?r:J,be=D?(i=se.rect)!=null?i:ue:null,De=!!(se.nodeRef.current&&se.rect),Oe=ict(De?null:ue),Ke=Kle(fe?ps(fe):null),xe=oct(D?ie??J:null),Le=cct(xe),Me=vct(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:V,active:F,activeNodeRect:ue,containerNodeRect:ne,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:se.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),pt=te?rm(te,I):null,gt=sct(xe),ze=UK(gt),je=UK(gt,[ue]),He=rm(Me,ze),Je=be?Dlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:q,droppableContainers:B,pointerCoordinates:pt}):null,st=Nle(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:rm(Me,je),Tt=klt(Nt,(o=Xe?.rect)!=null?o:null,ue),Jn=_.useRef(null),an=_.useCallback((Ot,Pt)=>{let{sensor:tn,options:$n}=Pt;if(P.current==null)return;const ln=T.get(P.current);if(!ln)return;const Ct=Ot.nativeEvent,yn=new tn({active:P.current,activeNode:ln,event:Ct,options:$n,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:ce}=K.current,pe={id:br};ce?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,ce,pe){if(!T.get(br))return;const{onDragPending:Fe}=K.current,Ue={id:br,constraint:ei,initialCoordinates:ce,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=P.current;if(ei==null)return;const ce=T.get(ei);if(!ce)return;const{onDragStart:pe}=K.current,Se={activatorEvent:Ct,active:{id:ei,data:ce.data,rect:R}};Rd.unstable_batchedUpdates(()=>{pe?.(Se),E(Ed.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),N(Jn.current),U(Ct)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Jn.current=yn;function Qr(br){return async function(){const{active:ce,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(ce&&Fe){const{cancelDrop:bt}=K.current;Ue={activatorEvent:Ct,active:ce,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof bt=="function"&&await Promise.resolve(bt(Ue))&&(br=Li.DragCancel)}P.current=null,Rd.unstable_batchedUpdates(()=>{S({type:br}),E(Ed.Uninitialized),Lt(null),N(null),U(null),Jn.current=null;const bt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=K.current[bt];rt?.(Ue),C({type:bt,event:Ue})}})}}},[T]),ct=_.useCallback((Ot,Pt)=>(tn,$n)=>{const ln=tn.nativeEvent,Ct=T.get($n);if(P.current!==null||!Ct||ln.dndKit||ln.defaultPrevented)return;const yn={active:Ct};Ot(tn,Pt.options,yn)===!0&&(ln.dndKit={capturedBy:Pt.sensor},P.current=$n,an(tn,Pt))},[T,an]),Ht=Qlt(u,ct);act(u),Ec(()=>{ue&&A===Ed.Initializing&&E(Ed.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Ot}=K.current,{active:Pt,activatorEvent:tn,collisions:$n,over:ln}=Z.current;if(!Pt||!tn)return;const Ct={active:Pt,activatorEvent:tn,collisions:$n,delta:{x:He.x,y:He.y},over:ln};Rd.unstable_batchedUpdates(()=>{Ot?.(Ct),C({type:"onDragMove",event:Ct})})},[He.x,He.y]),_.useEffect(()=>{const{active:Ot,activatorEvent:Pt,collisions:tn,droppableContainers:$n,scrollAdjustedTranslate:ln}=Z.current;if(!Ot||P.current==null||!Pt||!ln)return;const{onDragOver:Ct}=K.current,yn=$n.get(st),Qr=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,br={active:Ot,activatorEvent:Pt,collisions:tn,delta:{x:ln.x,y:ln.y},over:Qr};Rd.unstable_batchedUpdates(()=>{Lt(Qr),Ct?.(br),C({type:"onDragOver",event:br})})},[st]),Ec(()=>{Z.current={activatorEvent:V,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:q,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:L,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,q,L,Xe,xe,He]),Ylt({...ee,delta:I,draggingRect:Je,pointerCoordinates:pt,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:V,collisions:nt,containerNodeRect:ne,dragOverlay:se,draggableNodes:T,droppableContainers:L,droppableRects:q,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,V,nt,ne,se,T,L,q,Xe,H,xe,Le,W,Y,Ke]),Yn=_.useMemo(()=>({activatorEvent:V,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:X},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[V,Ht,F,ue,S,X,T,Xe,H]);return Gt.createElement(Ple.Provider,{value:w},Gt.createElement(t8.Provider,{value:Yn},Gt.createElement(Yle.Provider,{value:Dn},Gt.createElement(Xle.Provider,{value:Tt},c)),Gt.createElement(bct,{disabled:a?.restoreFocus===!1})),Gt.createElement(vlt,{...a,hiddenTextDescribedById:X}));function yr(){const Ot=z?.autoScrollEnabled===!1,Pt=typeof l=="object"?l.enabled===!1:l===!1,tn=D&&!Ot&&!Pt;return typeof l=="object"?{...l,enabled:tn}:{enabled:tn}}}),Cct=_.createContext(null),WK="button",Ect="Draggable";function Act(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=cv(Ect),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:p}=_.useContext(t8),{role:g=WK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Xle:Cct),[C,w]=_S(),[A,E]=_S(),D=lct(s,t),O=rb(n);Ec(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===WK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:p,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function kct(){return _.useContext(Yle)}const _ct="Droppable",Dct={timeout:25};function Oct(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=cv(_ct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(t8),u=_.useRef({disabled:n}),f=_.useRef(!1),p=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...Dct,...i},S=rb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=e8({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=_S(A),O=rb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:p,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function PI(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Tct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function _5(e){return e!==null&&e>=0}function Mct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Rct(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Zle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=PI(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},D5={scaleX:1,scaleY:1},Ict=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...D5}:null}const l=jct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...D5}:i<n&&i>=s?{x:0,y:a.height+l,...D5}:{x:0,y:0,...D5}};function jct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Jle="Sortable",Qle=Gt.createContext({activeIndex:-1,containerId:Jle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Zle,disabled:{draggable:!1,droppable:!1}});function Pct(e){let{children:t,id:n,items:r,strategy:i=Zle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=kct(),f=cv(Jle,n),p=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!Mct(g,S.current),w=v!==-1&&b===-1||C,A=Rct(o);Ec(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:p,sortedRects:Tct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,p,i]);return Gt.createElement(Qle.Provider,{value:E},t)}const $ct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return PI(n,r,i).indexOf(t)},Lct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},Nct={duration:200,easing:"ease"},ece="transform",Fct=ob.Transition.toString({property:ece,duration:0,easing:"linear"}),Bct={roleDescription:"sortable"};function zct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return Ec(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=mg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function Hct(e){let{animateLayoutChanges:t=Lct,attributes:n,disabled:r,data:i,getNewIndex:o=$ct,id:s,strategy:a,resizeObserverConfig:l,transition:c=Nct}=e;const{items:u,containerId:f,activeIndex:p,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Qle),w=Uct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:L}=Oct({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:P,setNodeRef:z,listeners:N,isDragging:V,over:U,setActivatorNodeRef:K,transform:X}=Act({id:s,data:E,attributes:{...Bct,...n},disabled:w.draggable}),B=slt(L,z),W=!!$,q=W&&!y&&_5(p)&&_5(v),H=!S&&V,Y=H&&q?X:null,te=q?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:p,overIndex:v,index:A}):null,ee=_5(p)&&_5(v)?o({id:s,items:u,activeIndex:p,overIndex:v}):A,ae=$?.id,ue=_.useRef({activeId:ae,items:u,newIndex:ee,containerId:f}),ne=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:V,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),ie=zct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(ae===ue.current.activeId)return;if(ae!=null&&ue.current.activeId==null){ue.current.activeId=ae;return}const fe=setTimeout(()=>{ue.current.activeId=ae},50);return()=>clearTimeout(fe)},[ae]),{active:$,activeIndex:p,attributes:P,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:V,listeners:N,node:T,overIndex:v,over:U,setNodeRef:B,setActivatorNodeRef:K,setDroppableNodeRef:L,setDraggableNodeRef:z,transform:ie??te,transition:se()};function se(){if(ie||ne&&ue.current.newIndex===A)return Fct;if(!(H&&!TI(R)||!c)&&(W||Z))return ob.Transition.toString({...c,property:ece})}}function Uct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function TS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Vct=[Nn.Down,Nn.Right,Nn.Up,Nn.Left],Wct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(Vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const p=i.get(f.id);if(p)switch(e.code){case Nn.Down:r.top<p.top&&l.push(f);break;case Nn.Up:r.top>p.top&&l.push(f);break;case Nn.Left:r.left>p.left&&l.push(f);break;case Nn.Right:r.left<p.left&&l.push(f);break}});const c=Clt({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Nle(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),p=o.get(u),g=p?i.get(p.id):null,y=p?.node.current;if(y&&g&&f&&p){const v=QC(y).some((D,O)=>a[O]!==D),S=tce(f,p),C=qct(f,p),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:ib(A,w)}}}};function tce(e,t){return!TS(e)||!TS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function qct(e,t){return!TS(e)||!TS(t)||!tce(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const Gct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=Hct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{jw(e.id).then(c)},[e.id]);const u={transform:ob.Transform.toString(o),transition:s,opacity:a?.5:1};return h.jsx(Pn,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:h.jsxs(Gn,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[h.jsx(oe,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:h.jsx(x8e,{})}),h.jsx(vt,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?h.jsx(oe,{component:"img",src:r2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):h.jsx(sl,{sx:{bgcolor:FT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=NT(e);return h.jsx(f,{sx:{fontSize:24}})})()}),h.jsxs(oe,{sx:{flex:1},children:[h.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),h.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," β’ Priority: ",e.priority??100]})]})]})})},Kct=()=>{const e=Ac(),{content:t,isLoading:n}=qm(),r=BCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const p=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(p),a(!1)}},[t]);const l=xlt(IK(jI),IK(RI,{coordinateGetter:Wct})),c=_.useCallback(p=>{const{active:g,over:y}=p;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return PI(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const p=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(p),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(p=>p.id),[i]);return n?h.jsx(re,{children:"Loading..."}):h.jsxs(Bt,{spacing:3,children:[h.jsx(vb,{items:[{name:"Bridges",to:_t.bridges},{name:"Startup Order",to:_t.startup}]}),h.jsxs(oe,{display:"flex",alignItems:"center",gap:2,children:[h.jsx(Vm,{color:"primary",fontSize:"large"}),h.jsxs(oe,{children:[h.jsx(re,{variant:"h5",fontWeight:600,children:"Startup Order"}),h.jsx(re,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&h.jsx(Ut,{severity:"info",action:h.jsx(lt,{color:"inherit",size:"small",startIcon:h.jsx(o6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),h.jsx(wct,{sensors:l,collisionDetection:wlt,onDragEnd:c,children:h.jsx(Pct,{items:f,strategy:Ict,children:h.jsx(Bt,{spacing:1,children:i.map((p,g)=>h.jsx(Gct,{bridge:p,index:g},p.id))})})}),i.length===0&&h.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&h.jsx(oe,{display:"flex",justifyContent:"flex-end",children:h.jsx(lt,{variant:"contained",startIcon:h.jsx(o6,{}),onClick:u,children:"Save Startup Order"})})]})},ak="https://riddix.github.io/home-assistant-matter-hub",_t={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",areaSetup:"/bridges/area-setup",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:ak,faq:{multiFabric:`${ak}/connect-multiple-fabrics`,bridgeConfig:`${ak}/bridge-configuration`}},Yct=[{path:"",element:h.jsx(B2e,{}),children:[{path:"",element:h.jsx(P9e,{})},{path:_t.bridges,element:h.jsx(O9e,{})},{path:_t.createBridge,element:h.jsx(Aet,{})},{path:_t.areaSetup,element:h.jsx(gve,{})},{path:_t.bridge(":bridgeId"),element:h.jsx(n8e,{})},{path:_t.editBridge(":bridgeId"),element:h.jsx(ket,{})},{path:_t.devices,element:h.jsx(Q9e,{})},{path:_t.networkMap,element:h.jsx(elt,{})},{path:_t.health,element:h.jsx(Iet,{})},{path:_t.labels,element:h.jsx(Let,{})},{path:_t.lockCredentials,element:h.jsx(Uet,{})},{path:_t.settings,element:h.jsx(olt,{})},{path:_t.startup,element:h.jsx(Kct,{})},{path:"*",element:h.jsx(Vet,{})}]}],Xct={items:{isInitialized:!1,isLoading:!1}},Zct=YO(Xct,e=>{e.addCase(ko.pending,t=>{t.items.isLoading=!0}).addCase(ko.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(ko.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(GX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(YX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(XX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(KX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(ZX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(JX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),Jct={byBridge:{}},Qct=YO(Jct,e=>{e.addCase(vu.pending,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)}).addCase(vu.rejected,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)}).addCase(vu.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)})}),eut={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},lk=YO(eut,e=>{e.addCase(vu.pending,t=>{t.isLoading=!0}).addCase(vu.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(vu.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),tut=w2e({reducer:{bridges:Zct,devices:Qct}}),$I=oge({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ot({props:e,name:"MuiContainer"})});function nut(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const rut=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},nut,t)},iut=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),nce=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=rut(c);return h.jsx(iut,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class out extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?h.jsxs(oe,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[h.jsx(aT,{color:"error",sx:{fontSize:64}}),h.jsx(re,{variant:"h5",fontWeight:600,children:"Something went wrong"}),h.jsx(re,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),h.jsx(lt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const sut="home-assistant-matter-hub",aut={name:sut};function rce(){const e="2.1.0-alpha.453",[t,n]=_.useState(null);_.useEffect(()=>{fetch("api/health").then(i=>i.ok?i.json():null).then(i=>{i?.version&&n(i.version)}).catch(()=>{})},[]);const r=_.useMemo(()=>!t||e==="0.0.0-dev"?!1:e!==t,[t]);return _.useMemo(()=>({name:aut.name,version:t??e,frontendVersion:e,backendVersion:t,versionMismatch:r}),[t,r])}const lut=[{name:"GitHub",url:_t.githubRepository},{name:"Documentation",url:_t.documentation}],cut=()=>h.jsxs($I,{sx:{mt:16,mb:4},children:[h.jsx(li,{sx:{mt:4,mb:4}}),h.jsx(it,{container:!0,spacing:2,justifyContent:"center",children:lut.map((e,t)=>h.jsx(it,{size:{xs:12,sm:"auto"},children:h.jsx(lt,{fullWidth:!0,size:"small",variant:"outlined",component:uw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function uut(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const dut=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,uut,r)},qK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,fut=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?qK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?qK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),hut=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=dut(c);return h.jsx(fut,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function put(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=rl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function mut(e){return typeof e=="function"?e():e}function O5(e,t,n){const r=mut(n),i=put(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const gut=_.forwardRef(function(t,n){const r=io(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:p,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ma,...D}=t,O=_.useRef(null),T=Mr(bf(l),O,n),I=U=>K=>{U&&(K===void 0?U(O.current):U(O.current,K))},L=I((U,K)=>{O5(u,U,c),UO(U),g&&g(U,K)}),$=I((U,K)=>{const X=Jd({timeout:A,style:w,easing:f},{mode:"enter"});U.style.webkitTransition=r.transitions.create("-webkit-transform",{...X}),U.style.transition=r.transitions.create("transform",{...X}),U.style.webkitTransform="none",U.style.transform="none",b&&b(U,K)}),R=I(y),F=I(C),P=I(U=>{const K=Jd({timeout:A,style:w,easing:f},{mode:"exit"});U.style.webkitTransition=r.transitions.create("-webkit-transform",K),U.style.transition=r.transitions.create("transform",K),O5(u,U,c),v&&v(U)}),z=I(U=>{U.style.webkitTransition="",U.style.transition="",S&&S(U)}),N=U=>{s&&s(O.current,U)},V=_.useCallback(()=>{O.current&&O5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(p||u==="down"||u==="right")return;const U=FO(()=>{O.current&&O5(u,O.current,c)}),K=rl(O.current);return K.addEventListener("resize",U),()=>{U.clear(),K.removeEventListener("resize",U)}},[u,p,c]),_.useEffect(()=>{p||V()},[p,V]),h.jsx(E,{nodeRef:O,onEnter:L,onEntered:R,onEntering:$,onExit:P,onExited:z,onExiting:F,addEndListener:N,appear:a,in:p,timeout:A,...D,children:(U,{ownerState:K,...X})=>_.cloneElement(l,{ref:T,style:{visibility:U==="exited"&&!p?"hidden":void 0,...w,...l.props.style},...X})})});function yut(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ice=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},but=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,yut,t)},vut=me(uT,{name:"MuiDrawer",slot:"Root",overridesResolver:ice})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),xut=me("div",{shouldForwardProp:Bi,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ice})({flex:"0 0 auto"}),Sut=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),oce={left:"right",right:"left",top:"down",bottom:"up"};function wut(e){return["left","right"].includes(e)}function Cut({direction:e},t){return e==="rtl"&&wut(t)?oce[t]:t}const Eut=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiDrawer"}),i=io(),o=yf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const L=Cut({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=but(R),P={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:BO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,N]=ut("root",{ref:n,elementType:vut,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:p,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[V,U]=ut("paper",{elementType:Sut,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[K,X]=ut("docked",{elementType:xut,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:P,additionalProps:T}),[B,W]=ut("transition",{elementType:gut,ownerState:R,externalForwardedProps:P,additionalProps:{in:v,direction:oce[L],timeout:A,appear:I.current}}),q=h.jsx(V,{...U,children:c});if(E==="permanent")return h.jsx(K,{...X,children:q});const H=h.jsx(B,{...W,children:q});return E==="persistent"?h.jsx(K,{...X,children:H}):h.jsx(z,{...N,children:H})}),Aut=rX({themeId:fa}),kut={error:Sf,warn:dw,info:lT,debug:Mw},_ut=({open:e,onClose:t})=>{const n=io(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[p,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!p||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[p,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=kut[w]||lT;return h.jsx(A,{sx:{fontSize:16,color:r[w]}})};return h.jsxs(al,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[h.jsxs(cl,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(Mw,{}),"System Logs",h.jsx(oe,{sx:{flexGrow:1}}),h.jsx(Qt,{title:"Auto Refresh",children:h.jsx(vt,{label:p?"Auto":"Manual",color:p?"success":"default",size:"small",onClick:()=>g(!p),sx:{cursor:"pointer"}})}),h.jsx(en,{onClick:t,children:h.jsx(DJ,{})})]}),h.jsxs(ll,{children:[h.jsx(Bt,{spacing:2,sx:{mb:2},children:h.jsxs(Bt,{direction:"row",spacing:2,alignItems:"center",children:[h.jsxs(ha,{size:"small",sx:{minWidth:200},children:[h.jsx(fc,{children:"Log Level"}),h.jsxs(aa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>h.jsx(oe,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>h.jsx(vt,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[h.jsx(nr,{value:"error",children:"Error"}),h.jsx(nr,{value:"warn",children:"Warning"}),h.jsx(nr,{value:"info",children:"Info"}),h.jsx(nr,{value:"debug",children:"Debug"})]})]}),h.jsx(Nr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),h.jsx(lt,{variant:"outlined",onClick:y,children:"Refresh"}),h.jsx(lt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),h.jsx(oe,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?h.jsx(oe,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{children:"Loading logs..."})}):i.length===0?h.jsx(oe,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{color:"text.secondary",children:"No logs found"})}):h.jsx(Bt,{spacing:1,children:i.map((w,A)=>h.jsxs(oe,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),h.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),h.jsx(vt,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),h.jsx(re,{sx:{ml:3},children:w.message}),w.context&&h.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),h.jsx(vc,{children:h.jsx(lt,{onClick:t,children:"Close"})})]})};function GK(){const{isConnected:e}=eZ(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?h.jsxs(oe,{sx:{p:.5},children:[h.jsxs("div",{children:[h.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),h.jsxs("div",{children:[h.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&h.jsxs("div",{children:[h.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&h.jsxs("div",{children:[h.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),h.jsxs("div",{children:[h.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?h.jsx(Sf,{fontSize:"small"}):l?h.jsx(pl,{fontSize:"small"}):h.jsx(gw,{fontSize:"small"}),p=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return h.jsx(Qt,{title:u,arrow:!0,children:h.jsx(vt,{icon:f(),label:g(),color:p(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const Dut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),Out=e=>{const t=rce();return h.jsxs(oe,{component:yc,to:_t.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[h.jsx(Dut,{style:{height:"40px"}}),h.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&h.jsx(re,{variant:"caption",component:"span",children:t.version})]})},Tut=()=>{const e=Aut("(min-width:600px)"),{mode:t,setMode:n}=QS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=ju(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:h.jsx(RT,{}),to:_t.dashboard},{label:"Bridges",icon:h.jsx(hy,{}),to:_t.bridges},{label:"All Devices",icon:h.jsx(Bs,{}),to:_t.devices},{label:"Network Map",icon:h.jsx(OT,{}),to:_t.networkMap},{label:"Startup Order",icon:h.jsx(Vm,{}),to:_t.startup},{label:"Lock Credentials",icon:h.jsx(bu,{}),to:_t.lockCredentials},{label:"Filter Reference",icon:h.jsx(IT,{}),to:_t.labels},{label:"Settings",icon:h.jsx(Eb,{}),to:_t.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?h.jsx(D8e,{}):h.jsx(g8e,{}),onClick:l},{label:"System Logs",icon:h.jsx(Mw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:h.jsx(fT,{}),to:_t.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return h.jsxs(oe,{children:[h.jsx(hut,{sx:{height:"72px"},children:h.jsx(nce,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:h.jsxs($I,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(Out,{large:e}),e?h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?h.jsx(Qt,{title:f.label,children:h.jsx(en,{component:yc,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):h.jsx(Qt,{title:f.label,children:h.jsx(en,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),h.jsx(GK,{})]}):h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:.5},children:[h.jsx(GK,{}),h.jsx(en,{onClick:()=>s(!0),sx:{color:"inherit"},children:h.jsx(O8e,{})})]})]})})}),h.jsx(Eut,{anchor:"right",open:o,onClose:()=>s(!1),children:h.jsx(gl,{sx:{width:250},children:c.map(f=>h.jsxs(Ive,{onClick:()=>u(f),children:[h.jsx(qa,{children:f.icon}),h.jsx(sa,{primary:f.label})]},f.label))})}),h.jsx(_ut,{open:r,onClose:()=>i(!1)})]})},Mut=()=>{const{versionMismatch:e,frontendVersion:t,backendVersion:n}=rce(),{isConnected:r}=eZ();return h.jsxs(oe,{children:[h.jsx(Tut,{}),h.jsx(nce,{}),e&&h.jsxs(Ut,{severity:"warning",variant:"filled",sx:{borderRadius:0},action:h.jsx(lt,{color:"inherit",size:"small",onClick:()=>window.location.reload(),children:"Reload"}),children:["Version mismatch: frontend ",t,", backend ",n,". Please reload to get the latest UI."]}),!r&&h.jsx(Ut,{severity:"error",variant:"filled",sx:{borderRadius:0},children:"Connection lost β data may be outdated. Reconnectingβ¦"}),h.jsx($I,{sx:{p:2},children:h.jsx(out,{children:h.jsx(EY,{})})}),h.jsx(cut,{})]})},Rut=XS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let T4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");T4?.startsWith("http")&&(T4=new URL(T4).pathname);const Iut=npe([{path:"/",element:h.jsx(Mut,{}),children:Yct}],{basename:T4});xde.createRoot(document.getElementById("root")).render(h.jsx(_.StrictMode,{children:h.jsx(Lde,{store:tut,children:h.jsxs(g1e,{theme:Rut,children:[h.jsx(d1e,{}),h.jsx(bX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),h.jsx(F2e,{children:h.jsx(Mye,{children:h.jsx(ppe,{router:Iut})})})]})})}));
|
|
499
|
+
`},blt={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 vlt(e){let{announcements:t=blt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=ylt}=e;const{announce:o,announcement:s}=plt(),a=cv("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),mlt(_.useMemo(()=>({onDragStart(f){let{active:p}=f;o(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:g}=f;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(f){let{active:p,over:g}=f;o(t.onDragOver({active:p,over:g}))},onDragEnd(f){let{active:p,over:g}=f;o(t.onDragEnd({active:p,over:g}))},onDragCancel(f){let{active:p,over:g}=f;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const u=Gt.createElement(Gt.Fragment,null,Gt.createElement(flt,{id:r,value:i.draggable}),Gt.createElement(hlt,{id:a,announcement:s}));return n?Rd.createPortal(u,n):u}var Li;(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"})(Li||(Li={}));function DS(){}function IK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function xlt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const fl=Object.freeze({x:0,y:0});function $le(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Lle(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Slt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jK(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Nle(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function PK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const wlt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=PK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=$le(PK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Lle)},Clt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=jK(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=jK(l),u=i.reduce((p,g,y)=>p+$le(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Lle)};function Elt(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const Alt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Elt(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Slt)};function klt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Fle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:fl}function _lt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Dlt=_lt(1);function Olt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Tlt(e,t,n){const r=Olt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const Mlt={ignoreTransform:!1};function mg(e,t){t===void 0&&(t=Mlt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=ps(e).getComputedStyle(e);c&&(n=Tlt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function $K(e){return mg(e,{ignoreTransform:!0})}function Rlt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ilt(e,t){return t===void 0&&(t=ps(e).getComputedStyle(e)),t.position==="fixed"}function jlt(e,t){t===void 0&&(t=ps(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function QC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(DI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!av(i)||Ile(i)||n.includes(i))return n;const o=ps(e).getComputedStyle(i);return i!==e&&jlt(i,o)&&n.push(i),Ilt(i,o)?n:r(i.parentNode)}return e?r(e):n}function Ble(e){const[t]=QC(e,1);return t??null}function ik(e){return!JC||!e?null:hg(e)?e:_I(e)?DI(e)||e===pg(e).scrollingElement?window:av(e)?e:null:null}function zle(e){return hg(e)?e.scrollX:e.scrollLeft}function Hle(e){return hg(e)?e.scrollY:e.scrollTop}function sO(e){return{x:zle(e),y:Hle(e)}}var Zi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Zi||(Zi={}));function Ule(e){return!JC||!e?!1:e===document.scrollingElement}function Vle(e){const t={x:0,y:0},n=Ule(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const Plt={x:.2,y:.2};function $lt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Plt);const{isTop:c,isBottom:u,isLeft:f,isRight:p}=Vle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Zi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Zi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!p&&a>=t.right-b.width?(g.x=Zi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Zi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Llt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Wle(e){return e.reduce((t,n)=>rm(t,sO(n)),fl)}function Nlt(e){return e.reduce((t,n)=>t+zle(n),0)}function Flt(e){return e.reduce((t,n)=>t+Hle(n),0)}function Blt(e,t){if(t===void 0&&(t=mg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Ble(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zlt=[["x",["left","right"],Nlt],["y",["top","bottom"],Flt]];class MI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=QC(n),i=Wle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of zlt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Py{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Hlt(e){const{EventTarget:t}=ps(e);return e instanceof t?e:pg(e)}function ok(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function LK(e){e.preventDefault()}function Ult(e){e.stopPropagation()}var Nn;(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"})(Nn||(Nn={}));const qle={start:[Nn.Space,Nn.Enter],cancel:[Nn.Esc],end:[Nn.Space,Nn.Enter,Nn.Tab]},Vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Nn.Right:return{...n,x:n.x+25};case Nn.Left:return{...n,x:n.x-25};case Nn.Down:return{...n,y:n.y+25};case Nn.Up:return{...n,y:n.y-25}}};class RI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Py(pg(n)),this.windowListeners=new Py(ps(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Blt(r),n(fl)}handleKeyDown(t){if(TI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=qle,coordinateGetter:s=Vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:fl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const p=ib(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Vle(b),O=Llt(b),T={x:Math.min(v===Nn.Right?O.right-O.width/2:O.right,Math.max(v===Nn.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Nn.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Nn.Down?O.top:O.top+O.height/2,f.y))},I=v===Nn.Right&&!C||v===Nn.Left&&!w,L=v===Nn.Down&&!A||v===Nn.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+p.x,R=v===Nn.Right&&$<=E.x||v===Nn.Left&&$>=D.x;if(R&&!p.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Nn.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(L&&T.y!==f.y){const $=b.scrollTop+p.y,R=v===Nn.Down&&$<=E.y||v===Nn.Up&&$>=D.y;if(R&&!p.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Nn.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,rm(ib(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}RI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=qle,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function NK(e){return!!(e&&"distance"in e)}function FK(e){return!!(e&&"delay"in e)}class II{constructor(t,n,r){var i;r===void 0&&(r=Hlt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=pg(s),this.documentListeners=new Py(this.document),this.listeners=new Py(r),this.windowListeners=new Py(ps(s)),this.initialCoordinates=(i=oO(o))!=null?i:fl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,LK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,LK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(NK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,Ult,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=oO(t))!=null?n:fl,c=ib(i,l);if(!r&&a){if(NK(a)){if(a.tolerance!=null&&ok(c,a.tolerance))return this.handleCancel();if(ok(c,a.distance))return this.handleStart()}if(FK(a)&&ok(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Nn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Wlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class jI extends II{constructor(t){const{event:n}=t,r=pg(n.target);super(t,Wlt,r)}}jI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const qlt={move:{name:"mousemove"},end:{name:"mouseup"}};var aO;(function(e){e[e.RightClick=2]="RightClick"})(aO||(aO={}));class Glt extends II{constructor(t){super(t,qlt,pg(t.event.target))}}Glt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===aO.RightClick?!1:(r?.({event:n}),!0)}}];const sk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Klt extends II{constructor(t){super(t,sk)}static setup(){return window.addEventListener(sk.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(sk.move.name,t)};function t(){}}}Klt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var $y;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($y||($y={}));var OS;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(OS||(OS={}));function Ylt(e){let{acceleration:t,activator:n=$y.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=OS.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:p}=e;const g=Zlt({delta:f,disabled:!o}),[y,b]=alt(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case $y.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $y.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===OS.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:L}=$lt(D,T,C,t,p);for(const $ of["x","y"])g[$][I[$]]||(L[$]=0,I[$]=0);if(L.x>0||L.y>0){b(),w.current=D,y(A,s),v.current=L,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(p)])}const Xlt={x:{[Zi.Backward]:!1,[Zi.Forward]:!1},y:{[Zi.Backward]:!1,[Zi.Forward]:!1}};function Zlt(e){let{delta:t,disabled:n}=e;const r=iO(t);return lv(i=>{if(n||!r||!i)return Xlt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Zi.Backward]:i.x[Zi.Backward]||o.x===-1,[Zi.Forward]:i.x[Zi.Forward]||o.x===1},y:{[Zi.Backward]:i.y[Zi.Backward]||o.y===-1,[Zi.Forward]:i.y[Zi.Forward]||o.y===1}}},[n,t,r])}function Jlt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return lv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Qlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var sb;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(sb||(sb={}));var lO;(function(e){e.Optimized="optimized"})(lO||(lO={}));const BK=new Map;function ect(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),p=rb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!p.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[p]),y=_.useRef(null),b=lv(S=>{if(f&&!n)return BK;if(!S||S===BK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new MI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case sb.Always:return!1;case sb.BeforeDragging:return n;default:return!n}}}function Gle(e,t){return lv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function tct(e,t){return Gle(e,t)}function nct(e){let{callback:t,disabled:n}=e;const r=OI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function e8(e){let{callback:t,disabled:n}=e;const r=OI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function rct(e){return new MI(mg(e),e)}function zK(e,t,n){t===void 0&&(t=rct);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=nct({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=e8({callback:o});return Ec(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function ict(e){const t=Gle(e);return Fle(e,t)}const HK=[];function oct(e){const t=_.useRef(e),n=lv(r=>e?r&&r!==HK&&e&&t.current&&e.parentNode===t.current.parentNode?r:QC(e):HK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function sct(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=ik(o.target);s&&n(a=>a?(a.set(s,sO(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=ik(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,sO(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=ik(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>rm(o,s),fl):Wle(e):fl,[e,t])}function UK(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==fl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?ib(e,n.current):fl}function act(e){_.useEffect(()=>{if(!JC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function lct(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function Kle(e){return _.useMemo(()=>e?Rlt(e):null,[e])}const VK=[];function cct(e,t){t===void 0&&(t=mg);const[n]=e,r=Kle(n?ps(n):null),[i,o]=_.useState(VK);function s(){o(()=>e.length?e.map(l=>Ule(l)?r:new MI(t(l),l)):VK)}const a=e8({callback:s});return Ec(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function uct(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return av(t)?t:e}function dct(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(av(u)){r(f=>{const p=t(u);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),o=e8({callback:i}),s=_.useCallback(c=>{const u=uct(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=_S(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const fct=[{sensor:jI,options:{}},{sensor:RI,options:{}}],hct={current:{}},O4={draggable:{measure:$K},droppable:{measure:$K,strategy:sb.WhileDragging,frequency:lO.Optimized},dragOverlay:{measure:mg}};class Ly extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const pct={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ly,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:DS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:O4,measureDroppableContainers:DS,windowRect:null,measuringScheduled:!1},mct={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:DS,draggableNodes:new Map,over:null,measureDroppableContainers:DS},t8=_.createContext(mct),Yle=_.createContext(pct);function gct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ly}}}function yct(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ly(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Ly(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ly(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function bct(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(t8),o=iO(r),s=iO(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!TI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=ult(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function vct(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function xct(e){return _.useMemo(()=>({draggable:{...O4.draggable,...e?.draggable},droppable:{...O4.droppable,...e?.droppable},dragOverlay:{...O4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Sct(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;Ec(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=Fle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=Ble(c);p&&p.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Xle=_.createContext({...fl,scaleX:1,scaleY:1});var Ed;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ed||(Ed={}));const wct=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=fct,collisionDetection:f=Alt,measuring:p,modifiers:g,...y}=t;const b=_.useReducer(yct,void 0,gct),[v,S]=b,[C,w]=glt(),[A,E]=_.useState(Ed.Uninitialized),D=A===Ed.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:L}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Ot;return O!=null?{id:O,data:(Ot=$?.data)!=null?Ot:hct,rect:R}:null},[O,$]),P=_.useRef(null),[z,N]=_.useState(null),[V,U]=_.useState(null),K=rb(y,Object.values(y)),X=cv("DndDescribedBy",s),B=_.useMemo(()=>L.getEnabled(),[L]),W=xct(p),{droppableRects:q,measureDroppableContainers:H,measuringScheduled:Y}=ect(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=Jlt(T,O),te=_.useMemo(()=>V?oO(V):null,[V]),ee=yr(),ae=tct(J,W.draggable.measure);Sct({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const ue=zK(J,W.draggable.measure,ae),ne=zK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=L.getNodeFor((n=Z.current.over)==null?void 0:n.id),se=dct({measure:W.dragOverlay.measure}),fe=(r=se.nodeRef.current)!=null?r:J,be=D?(i=se.rect)!=null?i:ue:null,De=!!(se.nodeRef.current&&se.rect),Oe=ict(De?null:ue),Ke=Kle(fe?ps(fe):null),xe=oct(D?ie??J:null),Le=cct(xe),Me=vct(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:V,active:F,activeNodeRect:ue,containerNodeRect:ne,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:se.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),pt=te?rm(te,I):null,gt=sct(xe),ze=UK(gt),je=UK(gt,[ue]),He=rm(Me,ze),Je=be?Dlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:q,droppableContainers:B,pointerCoordinates:pt}):null,st=Nle(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:rm(Me,je),Tt=klt(Nt,(o=Xe?.rect)!=null?o:null,ue),Jn=_.useRef(null),an=_.useCallback((Ot,Pt)=>{let{sensor:tn,options:$n}=Pt;if(P.current==null)return;const ln=T.get(P.current);if(!ln)return;const Ct=Ot.nativeEvent,yn=new tn({active:P.current,activeNode:ln,event:Ct,options:$n,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:ce}=K.current,pe={id:br};ce?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,ce,pe){if(!T.get(br))return;const{onDragPending:Fe}=K.current,Ue={id:br,constraint:ei,initialCoordinates:ce,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=P.current;if(ei==null)return;const ce=T.get(ei);if(!ce)return;const{onDragStart:pe}=K.current,Se={activatorEvent:Ct,active:{id:ei,data:ce.data,rect:R}};Rd.unstable_batchedUpdates(()=>{pe?.(Se),E(Ed.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),N(Jn.current),U(Ct)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Jn.current=yn;function Qr(br){return async function(){const{active:ce,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(ce&&Fe){const{cancelDrop:bt}=K.current;Ue={activatorEvent:Ct,active:ce,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof bt=="function"&&await Promise.resolve(bt(Ue))&&(br=Li.DragCancel)}P.current=null,Rd.unstable_batchedUpdates(()=>{S({type:br}),E(Ed.Uninitialized),Lt(null),N(null),U(null),Jn.current=null;const bt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=K.current[bt];rt?.(Ue),C({type:bt,event:Ue})}})}}},[T]),ct=_.useCallback((Ot,Pt)=>(tn,$n)=>{const ln=tn.nativeEvent,Ct=T.get($n);if(P.current!==null||!Ct||ln.dndKit||ln.defaultPrevented)return;const yn={active:Ct};Ot(tn,Pt.options,yn)===!0&&(ln.dndKit={capturedBy:Pt.sensor},P.current=$n,an(tn,Pt))},[T,an]),Ht=Qlt(u,ct);act(u),Ec(()=>{ue&&A===Ed.Initializing&&E(Ed.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Ot}=K.current,{active:Pt,activatorEvent:tn,collisions:$n,over:ln}=Z.current;if(!Pt||!tn)return;const Ct={active:Pt,activatorEvent:tn,collisions:$n,delta:{x:He.x,y:He.y},over:ln};Rd.unstable_batchedUpdates(()=>{Ot?.(Ct),C({type:"onDragMove",event:Ct})})},[He.x,He.y]),_.useEffect(()=>{const{active:Ot,activatorEvent:Pt,collisions:tn,droppableContainers:$n,scrollAdjustedTranslate:ln}=Z.current;if(!Ot||P.current==null||!Pt||!ln)return;const{onDragOver:Ct}=K.current,yn=$n.get(st),Qr=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,br={active:Ot,activatorEvent:Pt,collisions:tn,delta:{x:ln.x,y:ln.y},over:Qr};Rd.unstable_batchedUpdates(()=>{Lt(Qr),Ct?.(br),C({type:"onDragOver",event:br})})},[st]),Ec(()=>{Z.current={activatorEvent:V,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:q,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:L,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,q,L,Xe,xe,He]),Ylt({...ee,delta:I,draggingRect:Je,pointerCoordinates:pt,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:V,collisions:nt,containerNodeRect:ne,dragOverlay:se,draggableNodes:T,droppableContainers:L,droppableRects:q,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,V,nt,ne,se,T,L,q,Xe,H,xe,Le,W,Y,Ke]),Yn=_.useMemo(()=>({activatorEvent:V,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:X},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[V,Ht,F,ue,S,X,T,Xe,H]);return Gt.createElement(Ple.Provider,{value:w},Gt.createElement(t8.Provider,{value:Yn},Gt.createElement(Yle.Provider,{value:Dn},Gt.createElement(Xle.Provider,{value:Tt},c)),Gt.createElement(bct,{disabled:a?.restoreFocus===!1})),Gt.createElement(vlt,{...a,hiddenTextDescribedById:X}));function yr(){const Ot=z?.autoScrollEnabled===!1,Pt=typeof l=="object"?l.enabled===!1:l===!1,tn=D&&!Ot&&!Pt;return typeof l=="object"?{...l,enabled:tn}:{enabled:tn}}}),Cct=_.createContext(null),WK="button",Ect="Draggable";function Act(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=cv(Ect),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:p}=_.useContext(t8),{role:g=WK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Xle:Cct),[C,w]=_S(),[A,E]=_S(),D=lct(s,t),O=rb(n);Ec(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===WK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:p,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function kct(){return _.useContext(Yle)}const _ct="Droppable",Dct={timeout:25};function Oct(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=cv(_ct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(t8),u=_.useRef({disabled:n}),f=_.useRef(!1),p=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...Dct,...i},S=rb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=e8({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=_S(A),O=rb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:p,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function PI(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Tct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function _5(e){return e!==null&&e>=0}function Mct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Rct(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Zle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=PI(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},D5={scaleX:1,scaleY:1},Ict=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...D5}:null}const l=jct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...D5}:i<n&&i>=s?{x:0,y:a.height+l,...D5}:{x:0,y:0,...D5}};function jct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Jle="Sortable",Qle=Gt.createContext({activeIndex:-1,containerId:Jle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Zle,disabled:{draggable:!1,droppable:!1}});function Pct(e){let{children:t,id:n,items:r,strategy:i=Zle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=kct(),f=cv(Jle,n),p=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!Mct(g,S.current),w=v!==-1&&b===-1||C,A=Rct(o);Ec(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:p,sortedRects:Tct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,p,i]);return Gt.createElement(Qle.Provider,{value:E},t)}const $ct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return PI(n,r,i).indexOf(t)},Lct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},Nct={duration:200,easing:"ease"},ece="transform",Fct=ob.Transition.toString({property:ece,duration:0,easing:"linear"}),Bct={roleDescription:"sortable"};function zct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return Ec(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=mg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function Hct(e){let{animateLayoutChanges:t=Lct,attributes:n,disabled:r,data:i,getNewIndex:o=$ct,id:s,strategy:a,resizeObserverConfig:l,transition:c=Nct}=e;const{items:u,containerId:f,activeIndex:p,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Qle),w=Uct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:L}=Oct({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:P,setNodeRef:z,listeners:N,isDragging:V,over:U,setActivatorNodeRef:K,transform:X}=Act({id:s,data:E,attributes:{...Bct,...n},disabled:w.draggable}),B=slt(L,z),W=!!$,q=W&&!y&&_5(p)&&_5(v),H=!S&&V,Y=H&&q?X:null,te=q?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:p,overIndex:v,index:A}):null,ee=_5(p)&&_5(v)?o({id:s,items:u,activeIndex:p,overIndex:v}):A,ae=$?.id,ue=_.useRef({activeId:ae,items:u,newIndex:ee,containerId:f}),ne=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:V,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),ie=zct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(ae===ue.current.activeId)return;if(ae!=null&&ue.current.activeId==null){ue.current.activeId=ae;return}const fe=setTimeout(()=>{ue.current.activeId=ae},50);return()=>clearTimeout(fe)},[ae]),{active:$,activeIndex:p,attributes:P,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:V,listeners:N,node:T,overIndex:v,over:U,setNodeRef:B,setActivatorNodeRef:K,setDroppableNodeRef:L,setDraggableNodeRef:z,transform:ie??te,transition:se()};function se(){if(ie||ne&&ue.current.newIndex===A)return Fct;if(!(H&&!TI(R)||!c)&&(W||Z))return ob.Transition.toString({...c,property:ece})}}function Uct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function TS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Vct=[Nn.Down,Nn.Right,Nn.Up,Nn.Left],Wct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(Vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const p=i.get(f.id);if(p)switch(e.code){case Nn.Down:r.top<p.top&&l.push(f);break;case Nn.Up:r.top>p.top&&l.push(f);break;case Nn.Left:r.left>p.left&&l.push(f);break;case Nn.Right:r.left<p.left&&l.push(f);break}});const c=Clt({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Nle(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),p=o.get(u),g=p?i.get(p.id):null,y=p?.node.current;if(y&&g&&f&&p){const v=QC(y).some((D,O)=>a[O]!==D),S=tce(f,p),C=qct(f,p),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:ib(A,w)}}}};function tce(e,t){return!TS(e)||!TS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function qct(e,t){return!TS(e)||!TS(t)||!tce(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const Gct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=Hct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{jw(e.id).then(c)},[e.id]);const u={transform:ob.Transform.toString(o),transition:s,opacity:a?.5:1};return h.jsx(Pn,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:h.jsxs(Gn,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[h.jsx(oe,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:h.jsx(x8e,{})}),h.jsx(vt,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?h.jsx(oe,{component:"img",src:r2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):h.jsx(sl,{sx:{bgcolor:FT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=NT(e);return h.jsx(f,{sx:{fontSize:24}})})()}),h.jsxs(oe,{sx:{flex:1},children:[h.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),h.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," β’ Priority: ",e.priority??100]})]})]})})},Kct=()=>{const e=Ac(),{content:t,isLoading:n}=qm(),r=BCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const p=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(p),a(!1)}},[t]);const l=xlt(IK(jI),IK(RI,{coordinateGetter:Wct})),c=_.useCallback(p=>{const{active:g,over:y}=p;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return PI(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const p=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(p),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(p=>p.id),[i]);return n?h.jsx(re,{children:"Loading..."}):h.jsxs(Bt,{spacing:3,children:[h.jsx(vb,{items:[{name:"Bridges",to:_t.bridges},{name:"Startup Order",to:_t.startup}]}),h.jsxs(oe,{display:"flex",alignItems:"center",gap:2,children:[h.jsx(Vm,{color:"primary",fontSize:"large"}),h.jsxs(oe,{children:[h.jsx(re,{variant:"h5",fontWeight:600,children:"Startup Order"}),h.jsx(re,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&h.jsx(Ut,{severity:"info",action:h.jsx(lt,{color:"inherit",size:"small",startIcon:h.jsx(o6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),h.jsx(wct,{sensors:l,collisionDetection:wlt,onDragEnd:c,children:h.jsx(Pct,{items:f,strategy:Ict,children:h.jsx(Bt,{spacing:1,children:i.map((p,g)=>h.jsx(Gct,{bridge:p,index:g},p.id))})})}),i.length===0&&h.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&h.jsx(oe,{display:"flex",justifyContent:"flex-end",children:h.jsx(lt,{variant:"contained",startIcon:h.jsx(o6,{}),onClick:u,children:"Save Startup Order"})})]})},ak="https://riddix.github.io/home-assistant-matter-hub",_t={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",areaSetup:"/bridges/area-setup",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:ak,faq:{multiFabric:`${ak}/connect-multiple-fabrics`,bridgeConfig:`${ak}/bridge-configuration`}},Yct=[{path:"",element:h.jsx(B2e,{}),children:[{path:"",element:h.jsx(P9e,{})},{path:_t.bridges,element:h.jsx(O9e,{})},{path:_t.createBridge,element:h.jsx(Aet,{})},{path:_t.areaSetup,element:h.jsx(gve,{})},{path:_t.bridge(":bridgeId"),element:h.jsx(n8e,{})},{path:_t.editBridge(":bridgeId"),element:h.jsx(ket,{})},{path:_t.devices,element:h.jsx(Q9e,{})},{path:_t.networkMap,element:h.jsx(elt,{})},{path:_t.health,element:h.jsx(Iet,{})},{path:_t.labels,element:h.jsx(Let,{})},{path:_t.lockCredentials,element:h.jsx(Uet,{})},{path:_t.settings,element:h.jsx(olt,{})},{path:_t.startup,element:h.jsx(Kct,{})},{path:"*",element:h.jsx(Vet,{})}]}],Xct={items:{isInitialized:!1,isLoading:!1}},Zct=YO(Xct,e=>{e.addCase(ko.pending,t=>{t.items.isLoading=!0}).addCase(ko.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(ko.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(GX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(YX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(XX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(KX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(ZX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(JX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),Jct={byBridge:{}},Qct=YO(Jct,e=>{e.addCase(vu.pending,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)}).addCase(vu.rejected,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)}).addCase(vu.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=lk(t.byBridge[n.meta.arg],n)})}),eut={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},lk=YO(eut,e=>{e.addCase(vu.pending,t=>{t.isLoading=!0}).addCase(vu.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(vu.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),tut=w2e({reducer:{bridges:Zct,devices:Qct}}),$I=oge({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ot({props:e,name:"MuiContainer"})});function nut(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const rut=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},nut,t)},iut=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),nce=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=rut(c);return h.jsx(iut,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class out extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?h.jsxs(oe,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[h.jsx(aT,{color:"error",sx:{fontSize:64}}),h.jsx(re,{variant:"h5",fontWeight:600,children:"Something went wrong"}),h.jsx(re,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),h.jsx(lt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const sut="home-assistant-matter-hub",aut={name:sut};function rce(){const e="2.1.0-alpha.454",[t,n]=_.useState(null);_.useEffect(()=>{fetch("api/health").then(i=>i.ok?i.json():null).then(i=>{i?.version&&n(i.version)}).catch(()=>{})},[]);const r=_.useMemo(()=>!t||e==="0.0.0-dev"?!1:e!==t,[t]);return _.useMemo(()=>({name:aut.name,version:t??e,frontendVersion:e,backendVersion:t,versionMismatch:r}),[t,r])}const lut=[{name:"GitHub",url:_t.githubRepository},{name:"Documentation",url:_t.documentation}],cut=()=>h.jsxs($I,{sx:{mt:16,mb:4},children:[h.jsx(li,{sx:{mt:4,mb:4}}),h.jsx(it,{container:!0,spacing:2,justifyContent:"center",children:lut.map((e,t)=>h.jsx(it,{size:{xs:12,sm:"auto"},children:h.jsx(lt,{fullWidth:!0,size:"small",variant:"outlined",component:uw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function uut(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const dut=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,uut,r)},qK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,fut=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?qK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?qK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),hut=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=dut(c);return h.jsx(fut,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function put(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=rl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function mut(e){return typeof e=="function"?e():e}function O5(e,t,n){const r=mut(n),i=put(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const gut=_.forwardRef(function(t,n){const r=io(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:p,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ma,...D}=t,O=_.useRef(null),T=Mr(bf(l),O,n),I=U=>K=>{U&&(K===void 0?U(O.current):U(O.current,K))},L=I((U,K)=>{O5(u,U,c),UO(U),g&&g(U,K)}),$=I((U,K)=>{const X=Jd({timeout:A,style:w,easing:f},{mode:"enter"});U.style.webkitTransition=r.transitions.create("-webkit-transform",{...X}),U.style.transition=r.transitions.create("transform",{...X}),U.style.webkitTransform="none",U.style.transform="none",b&&b(U,K)}),R=I(y),F=I(C),P=I(U=>{const K=Jd({timeout:A,style:w,easing:f},{mode:"exit"});U.style.webkitTransition=r.transitions.create("-webkit-transform",K),U.style.transition=r.transitions.create("transform",K),O5(u,U,c),v&&v(U)}),z=I(U=>{U.style.webkitTransition="",U.style.transition="",S&&S(U)}),N=U=>{s&&s(O.current,U)},V=_.useCallback(()=>{O.current&&O5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(p||u==="down"||u==="right")return;const U=FO(()=>{O.current&&O5(u,O.current,c)}),K=rl(O.current);return K.addEventListener("resize",U),()=>{U.clear(),K.removeEventListener("resize",U)}},[u,p,c]),_.useEffect(()=>{p||V()},[p,V]),h.jsx(E,{nodeRef:O,onEnter:L,onEntered:R,onEntering:$,onExit:P,onExited:z,onExiting:F,addEndListener:N,appear:a,in:p,timeout:A,...D,children:(U,{ownerState:K,...X})=>_.cloneElement(l,{ref:T,style:{visibility:U==="exited"&&!p?"hidden":void 0,...w,...l.props.style},...X})})});function yut(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ice=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},but=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,yut,t)},vut=me(uT,{name:"MuiDrawer",slot:"Root",overridesResolver:ice})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),xut=me("div",{shouldForwardProp:Bi,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:ice})({flex:"0 0 auto"}),Sut=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),oce={left:"right",right:"left",top:"down",bottom:"up"};function wut(e){return["left","right"].includes(e)}function Cut({direction:e},t){return e==="rtl"&&wut(t)?oce[t]:t}const Eut=_.forwardRef(function(t,n){const r=ot({props:t,name:"MuiDrawer"}),i=io(),o=yf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const L=Cut({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=but(R),P={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:BO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,N]=ut("root",{ref:n,elementType:vut,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:p,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[V,U]=ut("paper",{elementType:Sut,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[K,X]=ut("docked",{elementType:xut,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:P,additionalProps:T}),[B,W]=ut("transition",{elementType:gut,ownerState:R,externalForwardedProps:P,additionalProps:{in:v,direction:oce[L],timeout:A,appear:I.current}}),q=h.jsx(V,{...U,children:c});if(E==="permanent")return h.jsx(K,{...X,children:q});const H=h.jsx(B,{...W,children:q});return E==="persistent"?h.jsx(K,{...X,children:H}):h.jsx(z,{...N,children:H})}),Aut=rX({themeId:fa}),kut={error:Sf,warn:dw,info:lT,debug:Mw},_ut=({open:e,onClose:t})=>{const n=io(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[p,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!p||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[p,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=kut[w]||lT;return h.jsx(A,{sx:{fontSize:16,color:r[w]}})};return h.jsxs(al,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[h.jsxs(cl,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(Mw,{}),"System Logs",h.jsx(oe,{sx:{flexGrow:1}}),h.jsx(Qt,{title:"Auto Refresh",children:h.jsx(vt,{label:p?"Auto":"Manual",color:p?"success":"default",size:"small",onClick:()=>g(!p),sx:{cursor:"pointer"}})}),h.jsx(en,{onClick:t,children:h.jsx(DJ,{})})]}),h.jsxs(ll,{children:[h.jsx(Bt,{spacing:2,sx:{mb:2},children:h.jsxs(Bt,{direction:"row",spacing:2,alignItems:"center",children:[h.jsxs(ha,{size:"small",sx:{minWidth:200},children:[h.jsx(fc,{children:"Log Level"}),h.jsxs(aa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>h.jsx(oe,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>h.jsx(vt,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[h.jsx(nr,{value:"error",children:"Error"}),h.jsx(nr,{value:"warn",children:"Warning"}),h.jsx(nr,{value:"info",children:"Info"}),h.jsx(nr,{value:"debug",children:"Debug"})]})]}),h.jsx(Nr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),h.jsx(lt,{variant:"outlined",onClick:y,children:"Refresh"}),h.jsx(lt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),h.jsx(oe,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?h.jsx(oe,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{children:"Loading logs..."})}):i.length===0?h.jsx(oe,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{color:"text.secondary",children:"No logs found"})}):h.jsx(Bt,{spacing:1,children:i.map((w,A)=>h.jsxs(oe,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),h.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),h.jsx(vt,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),h.jsx(re,{sx:{ml:3},children:w.message}),w.context&&h.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),h.jsx(vc,{children:h.jsx(lt,{onClick:t,children:"Close"})})]})};function GK(){const{isConnected:e}=eZ(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?h.jsxs(oe,{sx:{p:.5},children:[h.jsxs("div",{children:[h.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),h.jsxs("div",{children:[h.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&h.jsxs("div",{children:[h.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&h.jsxs("div",{children:[h.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),h.jsxs("div",{children:[h.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?h.jsx(Sf,{fontSize:"small"}):l?h.jsx(pl,{fontSize:"small"}):h.jsx(gw,{fontSize:"small"}),p=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return h.jsx(Qt,{title:u,arrow:!0,children:h.jsx(vt,{icon:f(),label:g(),color:p(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const Dut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),Out=e=>{const t=rce();return h.jsxs(oe,{component:yc,to:_t.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[h.jsx(Dut,{style:{height:"40px"}}),h.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&h.jsx(re,{variant:"caption",component:"span",children:t.version})]})},Tut=()=>{const e=Aut("(min-width:600px)"),{mode:t,setMode:n}=QS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=ju(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:h.jsx(RT,{}),to:_t.dashboard},{label:"Bridges",icon:h.jsx(hy,{}),to:_t.bridges},{label:"All Devices",icon:h.jsx(Bs,{}),to:_t.devices},{label:"Network Map",icon:h.jsx(OT,{}),to:_t.networkMap},{label:"Startup Order",icon:h.jsx(Vm,{}),to:_t.startup},{label:"Lock Credentials",icon:h.jsx(bu,{}),to:_t.lockCredentials},{label:"Filter Reference",icon:h.jsx(IT,{}),to:_t.labels},{label:"Settings",icon:h.jsx(Eb,{}),to:_t.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?h.jsx(D8e,{}):h.jsx(g8e,{}),onClick:l},{label:"System Logs",icon:h.jsx(Mw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:h.jsx(fT,{}),to:_t.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return h.jsxs(oe,{children:[h.jsx(hut,{sx:{height:"72px"},children:h.jsx(nce,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:h.jsxs($I,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(Out,{large:e}),e?h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?h.jsx(Qt,{title:f.label,children:h.jsx(en,{component:yc,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):h.jsx(Qt,{title:f.label,children:h.jsx(en,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),h.jsx(GK,{})]}):h.jsxs(oe,{sx:{display:"flex",alignItems:"center",gap:.5},children:[h.jsx(GK,{}),h.jsx(en,{onClick:()=>s(!0),sx:{color:"inherit"},children:h.jsx(O8e,{})})]})]})})}),h.jsx(Eut,{anchor:"right",open:o,onClose:()=>s(!1),children:h.jsx(gl,{sx:{width:250},children:c.map(f=>h.jsxs(Ive,{onClick:()=>u(f),children:[h.jsx(qa,{children:f.icon}),h.jsx(sa,{primary:f.label})]},f.label))})}),h.jsx(_ut,{open:r,onClose:()=>i(!1)})]})},Mut=()=>{const{versionMismatch:e,frontendVersion:t,backendVersion:n}=rce(),{isConnected:r}=eZ();return h.jsxs(oe,{children:[h.jsx(Tut,{}),h.jsx(nce,{}),e&&h.jsxs(Ut,{severity:"warning",variant:"filled",sx:{borderRadius:0},action:h.jsx(lt,{color:"inherit",size:"small",onClick:()=>window.location.reload(),children:"Reload"}),children:["Version mismatch: frontend ",t,", backend ",n,". Please reload to get the latest UI."]}),!r&&h.jsx(Ut,{severity:"error",variant:"filled",sx:{borderRadius:0},children:"Connection lost β data may be outdated. Reconnectingβ¦"}),h.jsx($I,{sx:{p:2},children:h.jsx(out,{children:h.jsx(EY,{})})}),h.jsx(cut,{})]})},Rut=XS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let T4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");T4?.startsWith("http")&&(T4=new URL(T4).pathname);const Iut=npe([{path:"/",element:h.jsx(Mut,{}),children:Yct}],{basename:T4});xde.createRoot(document.getElementById("root")).render(h.jsx(_.StrictMode,{children:h.jsx(Lde,{store:tut,children:h.jsxs(g1e,{theme:Rut,children:[h.jsx(d1e,{}),h.jsx(bX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),h.jsx(F2e,{children:h.jsx(Mye,{children:h.jsx(ppe,{router:Iut})})})]})})}));
|
package/dist/frontend/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- BASE -->
|
|
9
9
|
<base href="/" />
|
|
10
10
|
<!-- /BASE -->
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DIjjmjH3.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-BNdBOwwe.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riddix/hamh",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "2.1.0-alpha.
|
|
4
|
+
"version": "2.1.0-alpha.454",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/lodash-es": "^4.17.12",
|
|
60
|
-
"@home-assistant-matter-hub/
|
|
61
|
-
"@home-assistant-matter-hub/
|
|
62
|
-
"@home-assistant-matter-hub/
|
|
60
|
+
"@home-assistant-matter-hub/common": "2.1.0-alpha.454",
|
|
61
|
+
"@home-assistant-matter-hub/frontend": "2.1.0-alpha.454",
|
|
62
|
+
"@home-assistant-matter-hub/backend": "2.1.0-alpha.454"
|
|
63
63
|
},
|
|
64
64
|
"nx": {
|
|
65
65
|
"targets": {
|