@ea-lab/reactive-json 0.0.16 → 0.0.17

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.
@@ -97,7 +97,7 @@ Expecting `+We.join(", ")+", got '"+(this.terminals_[ve]||ve)+"'":W="Parse error
97
97
  Press space again to drop the item in its new position, or press escape to cancel.
98
98
  `},gN={onDragStart(n){let{active:l}=n;return"Picked up draggable item "+l.id+"."},onDragOver(n){let{active:l,over:u}=n;return u?"Draggable item "+l.id+" was moved over droppable area "+u.id+".":"Draggable item "+l.id+" is no longer over a droppable area."},onDragEnd(n){let{active:l,over:u}=n;return u?"Draggable item "+l.id+" was dropped over droppable area "+u.id:"Draggable item "+l.id+" was dropped."},onDragCancel(n){let{active:l}=n;return"Dragging was cancelled. Draggable item "+l.id+" was dropped."}};function yN(n){let{announcements:l=gN,container:u,hiddenTextDescribedById:f,screenReaderInstructions:p=vN}=n;const{announce:v,announcement:g}=hN(),x=Iy("DndLiveRegion"),[S,A]=q.useState(!1);if(q.useEffect(()=>{A(!0)},[]),pN(q.useMemo(()=>({onDragStart(w){let{active:M}=w;v(l.onDragStart({active:M}))},onDragMove(w){let{active:M,over:L}=w;l.onDragMove&&v(l.onDragMove({active:M,over:L}))},onDragOver(w){let{active:M,over:L}=w;v(l.onDragOver({active:M,over:L}))},onDragEnd(w){let{active:M,over:L}=w;v(l.onDragEnd({active:M,over:L}))},onDragCancel(w){let{active:M,over:L}=w;v(l.onDragCancel({active:M,over:L}))}}),[v,l])),!S)return null;const C=q.createElement(q.Fragment,null,q.createElement(fN,{id:f,value:p.draggable}),q.createElement(dN,{id:x,announcement:g}));return u?Gl.createPortal(C,u):C}var ei;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(ei||(ei={}));function kb(){}function bN(n,l){return q.useMemo(()=>({sensor:n,options:l??{}}),[n,l])}function SN(){for(var n=arguments.length,l=new Array(n),u=0;u<n;u++)l[u]=arguments[u];return q.useMemo(()=>[...l].filter(f=>f!=null),[...l])}const Qs=Object.freeze({x:0,y:0});function EN(n,l){return Math.sqrt(Math.pow(n.x-l.x,2)+Math.pow(n.y-l.y,2))}function xN(n,l){const u=jb(n);if(!u)return"0 0";const f={x:(u.x-l.left)/l.width*100,y:(u.y-l.top)/l.height*100};return f.x+"% "+f.y+"%"}function AN(n,l){let{data:{value:u}}=n,{data:{value:f}}=l;return u-f}function TN(n,l){let{data:{value:u}}=n,{data:{value:f}}=l;return f-u}function CN(n,l){if(!n||n.length===0)return null;const[u]=n;return u[l]}function PC(n,l,u){return l===void 0&&(l=n.left),u===void 0&&(u=n.top),{x:l+n.width*.5,y:u+n.height*.5}}const wN=n=>{let{collisionRect:l,droppableRects:u,droppableContainers:f}=n;const p=PC(l,l.left,l.top),v=[];for(const g of f){const{id:x}=g,S=u.get(x);if(S){const A=EN(PC(S),p);v.push({id:x,data:{droppableContainer:g,value:A}})}}return v.sort(AN)};function ON(n,l){const u=Math.max(l.top,n.top),f=Math.max(l.left,n.left),p=Math.min(l.left+l.width,n.left+n.width),v=Math.min(l.top+l.height,n.top+n.height),g=p-f,x=v-u;if(f<p&&u<v){const S=l.width*l.height,A=n.width*n.height,C=g*x,w=C/(S+A-C);return Number(w.toFixed(4))}return 0}const DN=n=>{let{collisionRect:l,droppableRects:u,droppableContainers:f}=n;const p=[];for(const v of f){const{id:g}=v,x=u.get(g);if(x){const S=ON(x,l);S>0&&p.push({id:g,data:{droppableContainer:v,value:S}})}}return p.sort(TN)};function _N(n,l,u){return{...n,scaleX:l&&u?l.width/u.width:1,scaleY:l&&u?l.height/u.height:1}}function QC(n,l){return n&&l?{x:n.left-l.left,y:n.top-l.top}:Qs}function RN(n){return function(u){for(var f=arguments.length,p=new Array(f>1?f-1:0),v=1;v<f;v++)p[v-1]=arguments[v];return p.reduce((g,x)=>({...g,top:g.top+n*x.y,bottom:g.bottom+n*x.y,left:g.left+n*x.x,right:g.right+n*x.x}),{...u})}}const MN=RN(1);function ZC(n){if(n.startsWith("matrix3d(")){const l=n.slice(9,-1).split(/, /);return{x:+l[12],y:+l[13],scaleX:+l[0],scaleY:+l[5]}}else if(n.startsWith("matrix(")){const l=n.slice(7,-1).split(/, /);return{x:+l[4],y:+l[5],scaleX:+l[0],scaleY:+l[3]}}return null}function NN(n,l,u){const f=ZC(l);if(!f)return n;const{scaleX:p,scaleY:v,x:g,y:x}=f,S=n.left-g-(1-p)*parseFloat(u),A=n.top-x-(1-v)*parseFloat(u.slice(u.indexOf(" ")+1)),C=p?n.width/p:n.width,w=v?n.height/v:n.height;return{width:C,height:w,top:A,right:S+C,bottom:A+w,left:S}}const BN={ignoreTransform:!1};function eg(n,l){l===void 0&&(l=BN);let u=n.getBoundingClientRect();if(l.ignoreTransform){const{transform:A,transformOrigin:C}=Il(n).getComputedStyle(n);A&&(u=NN(u,A,C))}const{top:f,left:p,width:v,height:g,bottom:x,right:S}=u;return{top:f,left:p,width:v,height:g,bottom:x,right:S}}function KC(n){return eg(n,{ignoreTransform:!0})}function LN(n){const l=n.innerWidth,u=n.innerHeight;return{top:0,left:0,right:l,bottom:u,width:l,height:u}}function zN(n,l){return l===void 0&&(l=Il(n).getComputedStyle(n)),l.position==="fixed"}function UN(n,l){l===void 0&&(l=Il(n).getComputedStyle(n));const u=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(p=>{const v=l[p];return typeof v=="string"?u.test(v):!1})}function ux(n,l){const u=[];function f(p){if(l!=null&&u.length>=l||!p)return u;if(ix(p)&&p.scrollingElement!=null&&!u.includes(p.scrollingElement))return u.push(p.scrollingElement),u;if(!Fy(p)||IC(p)||u.includes(p))return u;const v=Il(n).getComputedStyle(p);return p!==n&&UN(p,v)&&u.push(p),zN(p,v)?u:f(p.parentNode)}return n?f(n):u}function JC(n){const[l]=ux(n,1);return l??null}function ox(n){return!Nb||!n?null:Kv(n)?n:rx(n)?ix(n)||n===Jv(n).scrollingElement?window:Fy(n)?n:null:null}function WC(n){return Kv(n)?n.scrollX:n.scrollLeft}function ew(n){return Kv(n)?n.scrollY:n.scrollTop}function sx(n){return{x:WC(n),y:ew(n)}}var wi;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(wi||(wi={}));function tw(n){return!Nb||!n?!1:n===document.scrollingElement}function nw(n){const l={x:0,y:0},u=tw(n)?{height:window.innerHeight,width:window.innerWidth}:{height:n.clientHeight,width:n.clientWidth},f={x:n.scrollWidth-u.width,y:n.scrollHeight-u.height},p=n.scrollTop<=l.y,v=n.scrollLeft<=l.x,g=n.scrollTop>=f.y,x=n.scrollLeft>=f.x;return{isTop:p,isLeft:v,isBottom:g,isRight:x,maxScroll:f,minScroll:l}}const HN={x:.2,y:.2};function jN(n,l,u,f,p){let{top:v,left:g,right:x,bottom:S}=u;f===void 0&&(f=10),p===void 0&&(p=HN);const{isTop:A,isBottom:C,isLeft:w,isRight:M}=nw(n),L={x:0,y:0},B={x:0,y:0},z={height:l.height*p.y,width:l.width*p.x};return!A&&v<=l.top+z.height?(L.y=wi.Backward,B.y=f*Math.abs((l.top+z.height-v)/z.height)):!C&&S>=l.bottom-z.height&&(L.y=wi.Forward,B.y=f*Math.abs((l.bottom-z.height-S)/z.height)),!M&&x>=l.right-z.width?(L.x=wi.Forward,B.x=f*Math.abs((l.right-z.width-x)/z.width)):!w&&g<=l.left+z.width&&(L.x=wi.Backward,B.x=f*Math.abs((l.left+z.width-g)/z.width)),{direction:L,speed:B}}function kN(n){if(n===document.scrollingElement){const{innerWidth:v,innerHeight:g}=window;return{top:0,left:0,right:v,bottom:g,width:v,height:g}}const{top:l,left:u,right:f,bottom:p}=n.getBoundingClientRect();return{top:l,left:u,right:f,bottom:p,width:n.clientWidth,height:n.clientHeight}}function aw(n){return n.reduce((l,u)=>Wv(l,sx(u)),Qs)}function qN(n){return n.reduce((l,u)=>l+WC(u),0)}function FN(n){return n.reduce((l,u)=>l+ew(u),0)}function rw(n,l){if(l===void 0&&(l=eg),!n)return;const{top:u,left:f,bottom:p,right:v}=l(n);JC(n)&&(p<=0||v<=0||u>=window.innerHeight||f>=window.innerWidth)&&n.scrollIntoView({block:"center",inline:"center"})}const YN=[["x",["left","right"],qN],["y",["top","bottom"],FN]];class cx{constructor(l,u){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 f=ux(u),p=aw(f);this.rect={...l},this.width=l.width,this.height=l.height;for(const[v,g,x]of YN)for(const S of g)Object.defineProperty(this,S,{get:()=>{const A=x(f),C=p[v]-A;return this.rect[S]+C},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Vy{constructor(l){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(u=>{var f;return(f=this.target)==null?void 0:f.removeEventListener(...u)})},this.target=l}add(l,u,f){var p;(p=this.target)==null||p.addEventListener(l,u,f),this.listeners.push([l,u,f])}}function GN(n){const{EventTarget:l}=Il(n);return n instanceof l?n:Jv(n)}function fx(n,l){const u=Math.abs(n.x),f=Math.abs(n.y);return typeof l=="number"?Math.sqrt(u**2+f**2)>l:"x"in l&&"y"in l?u>l.x&&f>l.y:"x"in l?u>l.x:"y"in l?f>l.y:!1}var es;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(es||(es={}));function iw(n){n.preventDefault()}function IN(n){n.stopPropagation()}var Kn;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab"})(Kn||(Kn={}));const lw={start:[Kn.Space,Kn.Enter],cancel:[Kn.Esc],end:[Kn.Space,Kn.Enter,Kn.Tab]},VN=(n,l)=>{let{currentCoordinates:u}=l;switch(n.code){case Kn.Right:return{...u,x:u.x+25};case Kn.Left:return{...u,x:u.x-25};case Kn.Down:return{...u,y:u.y+25};case Kn.Up:return{...u,y:u.y-25}}};class uw{constructor(l){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=l;const{event:{target:u}}=l;this.props=l,this.listeners=new Vy(Jv(u)),this.windowListeners=new Vy(Il(u)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(es.Resize,this.handleCancel),this.windowListeners.add(es.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(es.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:l,onStart:u}=this.props,f=l.node.current;f&&rw(f),u(Qs)}handleKeyDown(l){if(Hb(l)){const{active:u,context:f,options:p}=this.props,{keyboardCodes:v=lw,coordinateGetter:g=VN,scrollBehavior:x="smooth"}=p,{code:S}=l;if(v.end.includes(S)){this.handleEnd(l);return}if(v.cancel.includes(S)){this.handleCancel(l);return}const{collisionRect:A}=f.current,C=A?{x:A.left,y:A.top}:Qs;this.referenceCoordinates||(this.referenceCoordinates=C);const w=g(l,{active:u,context:f.current,currentCoordinates:C});if(w){const M=Ub(w,C),L={x:0,y:0},{scrollableAncestors:B}=f.current;for(const z of B){const O=l.code,{isTop:I,isRight:X,isLeft:V,isBottom:U,maxScroll:D,minScroll:j}=nw(z),Y=kN(z),ie={x:Math.min(O===Kn.Right?Y.right-Y.width/2:Y.right,Math.max(O===Kn.Right?Y.left:Y.left+Y.width/2,w.x)),y:Math.min(O===Kn.Down?Y.bottom-Y.height/2:Y.bottom,Math.max(O===Kn.Down?Y.top:Y.top+Y.height/2,w.y))},oe=O===Kn.Right&&!X||O===Kn.Left&&!V,pe=O===Kn.Down&&!U||O===Kn.Up&&!I;if(oe&&ie.x!==w.x){const ve=z.scrollLeft+M.x,_e=O===Kn.Right&&ve<=D.x||O===Kn.Left&&ve>=j.x;if(_e&&!M.y){z.scrollTo({left:ve,behavior:x});return}_e?L.x=z.scrollLeft-ve:L.x=O===Kn.Right?z.scrollLeft-D.x:z.scrollLeft-j.x,L.x&&z.scrollBy({left:-L.x,behavior:x});break}else if(pe&&ie.y!==w.y){const ve=z.scrollTop+M.y,_e=O===Kn.Down&&ve<=D.y||O===Kn.Up&&ve>=j.y;if(_e&&!M.x){z.scrollTo({top:ve,behavior:x});return}_e?L.y=z.scrollTop-ve:L.y=O===Kn.Down?z.scrollTop-D.y:z.scrollTop-j.y,L.y&&z.scrollBy({top:-L.y,behavior:x});break}}this.handleMove(l,Wv(Ub(w,this.referenceCoordinates),L))}}}handleMove(l,u){const{onMove:f}=this.props;l.preventDefault(),f(u)}handleEnd(l){const{onEnd:u}=this.props;l.preventDefault(),this.detach(),u()}handleCancel(l){const{onCancel:u}=this.props;l.preventDefault(),this.detach(),u()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}uw.activators=[{eventName:"onKeyDown",handler:(n,l,u)=>{let{keyboardCodes:f=lw,onActivation:p}=l,{active:v}=u;const{code:g}=n.nativeEvent;if(f.start.includes(g)){const x=v.activatorNode.current;return x&&n.target!==x?!1:(n.preventDefault(),p==null||p({event:n.nativeEvent}),!0)}return!1}}];function ow(n){return!!(n&&"distance"in n)}function sw(n){return!!(n&&"delay"in n)}class dx{constructor(l,u,f){var p;f===void 0&&(f=GN(l.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=l,this.events=u;const{event:v}=l,{target:g}=v;this.props=l,this.events=u,this.document=Jv(g),this.documentListeners=new Vy(this.document),this.listeners=new Vy(f),this.windowListeners=new Vy(Il(g)),this.initialCoordinates=(p=jb(v))!=null?p:Qs,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:l,props:{options:{activationConstraint:u,bypassActivationConstraint:f}}}=this;if(this.listeners.add(l.move.name,this.handleMove,{passive:!1}),this.listeners.add(l.end.name,this.handleEnd),l.cancel&&this.listeners.add(l.cancel.name,this.handleCancel),this.windowListeners.add(es.Resize,this.handleCancel),this.windowListeners.add(es.DragStart,iw),this.windowListeners.add(es.VisibilityChange,this.handleCancel),this.windowListeners.add(es.ContextMenu,iw),this.documentListeners.add(es.Keydown,this.handleKeydown),u){if(f!=null&&f({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(sw(u)){this.timeoutId=setTimeout(this.handleStart,u.delay),this.handlePending(u);return}if(ow(u)){this.handlePending(u);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(l,u){const{active:f,onPending:p}=this.props;p(f,l,this.initialCoordinates,u)}handleStart(){const{initialCoordinates:l}=this,{onStart:u}=this.props;l&&(this.activated=!0,this.documentListeners.add(es.Click,IN,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(es.SelectionChange,this.removeTextSelection),u(l))}handleMove(l){var u;const{activated:f,initialCoordinates:p,props:v}=this,{onMove:g,options:{activationConstraint:x}}=v;if(!p)return;const S=(u=jb(l))!=null?u:Qs,A=Ub(p,S);if(!f&&x){if(ow(x)){if(x.tolerance!=null&&fx(A,x.tolerance))return this.handleCancel();if(fx(A,x.distance))return this.handleStart()}if(sw(x)&&fx(A,x.tolerance))return this.handleCancel();this.handlePending(x,A);return}l.cancelable&&l.preventDefault(),g(S)}handleEnd(){const{onAbort:l,onEnd:u}=this.props;this.detach(),this.activated||l(this.props.active),u()}handleCancel(){const{onAbort:l,onCancel:u}=this.props;this.detach(),this.activated||l(this.props.active),u()}handleKeydown(l){l.code===Kn.Esc&&this.handleCancel()}removeTextSelection(){var l;(l=this.document.getSelection())==null||l.removeAllRanges()}}const XN={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class hx extends dx{constructor(l){const{event:u}=l,f=Jv(u.target);super(l,XN,f)}}hx.activators=[{eventName:"onPointerDown",handler:(n,l)=>{let{nativeEvent:u}=n,{onActivation:f}=l;return!u.isPrimary||u.button!==0?!1:(f==null||f({event:u}),!0)}}];const $N={move:{name:"mousemove"},end:{name:"mouseup"}};var px;(function(n){n[n.RightClick=2]="RightClick"})(px||(px={}));class PN extends dx{constructor(l){super(l,$N,Jv(l.event.target))}}PN.activators=[{eventName:"onMouseDown",handler:(n,l)=>{let{nativeEvent:u}=n,{onActivation:f}=l;return u.button===px.RightClick?!1:(f==null||f({event:u}),!0)}}];const mx={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class QN extends dx{constructor(l){super(l,mx)}static setup(){return window.addEventListener(mx.move.name,l,{capture:!1,passive:!1}),function(){window.removeEventListener(mx.move.name,l)};function l(){}}}QN.activators=[{eventName:"onTouchStart",handler:(n,l)=>{let{nativeEvent:u}=n,{onActivation:f}=l;const{touches:p}=u;return p.length>1?!1:(f==null||f({event:u}),!0)}}];var Xy;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(Xy||(Xy={}));var qb;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(qb||(qb={}));function ZN(n){let{acceleration:l,activator:u=Xy.Pointer,canScroll:f,draggingRect:p,enabled:v,interval:g=5,order:x=qb.TreeOrder,pointerCoordinates:S,scrollableAncestors:A,scrollableAncestorRects:C,delta:w,threshold:M}=n;const L=JN({delta:w,disabled:!v}),[B,z]=lN(),O=q.useRef({x:0,y:0}),I=q.useRef({x:0,y:0}),X=q.useMemo(()=>{switch(u){case Xy.Pointer:return S?{top:S.y,bottom:S.y,left:S.x,right:S.x}:null;case Xy.DraggableRect:return p}},[u,p,S]),V=q.useRef(null),U=q.useCallback(()=>{const j=V.current;if(!j)return;const Y=O.current.x*I.current.x,ie=O.current.y*I.current.y;j.scrollBy(Y,ie)},[]),D=q.useMemo(()=>x===qb.TreeOrder?[...A].reverse():A,[x,A]);q.useEffect(()=>{if(!v||!A.length||!X){z();return}for(const j of D){if((f==null?void 0:f(j))===!1)continue;const Y=A.indexOf(j),ie=C[Y];if(!ie)continue;const{direction:oe,speed:pe}=jN(j,ie,X,l,M);for(const ve of["x","y"])L[ve][oe[ve]]||(pe[ve]=0,oe[ve]=0);if(pe.x>0||pe.y>0){z(),V.current=j,B(U,g),O.current=pe,I.current=oe;return}}O.current={x:0,y:0},I.current={x:0,y:0},z()},[l,U,f,z,v,g,JSON.stringify(X),JSON.stringify(L),B,A,D,C,JSON.stringify(M)])}const KN={x:{[wi.Backward]:!1,[wi.Forward]:!1},y:{[wi.Backward]:!1,[wi.Forward]:!1}};function JN(n){let{delta:l,disabled:u}=n;const f=zb(l);return Gy(p=>{if(u||!f||!p)return KN;const v={x:Math.sign(l.x-f.x),y:Math.sign(l.y-f.y)};return{x:{[wi.Backward]:p.x[wi.Backward]||v.x===-1,[wi.Forward]:p.x[wi.Forward]||v.x===1},y:{[wi.Backward]:p.y[wi.Backward]||v.y===-1,[wi.Forward]:p.y[wi.Forward]||v.y===1}}},[u,l,f])}function WN(n,l){const u=l!=null?n.get(l):void 0,f=u?u.node.current:null;return Gy(p=>{var v;return l==null?null:(v=f??p)!=null?v:null},[f,l])}function eB(n,l){return q.useMemo(()=>n.reduce((u,f)=>{const{sensor:p}=f,v=p.activators.map(g=>({eventName:g.eventName,handler:l(g.handler,f)}));return[...u,...v]},[]),[n,l])}var $y;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})($y||($y={}));var vx;(function(n){n.Optimized="optimized"})(vx||(vx={}));const cw=new Map;function tB(n,l){let{dragging:u,dependencies:f,config:p}=l;const[v,g]=q.useState(null),{frequency:x,measure:S,strategy:A}=p,C=q.useRef(n),w=O(),M=Yy(w),L=q.useCallback(function(I){I===void 0&&(I=[]),!M.current&&g(X=>X===null?I:X.concat(I.filter(V=>!X.includes(V))))},[M]),B=q.useRef(null),z=Gy(I=>{if(w&&!u)return cw;if(!I||I===cw||C.current!==n||v!=null){const X=new Map;for(let V of n){if(!V)continue;if(v&&v.length>0&&!v.includes(V.id)&&V.rect.current){X.set(V.id,V.rect.current);continue}const U=V.node.current,D=U?new cx(S(U),U):null;V.rect.current=D,D&&X.set(V.id,D)}return X}return I},[n,v,u,w,S]);return q.useEffect(()=>{C.current=n},[n]),q.useEffect(()=>{w||L()},[u,w]),q.useEffect(()=>{v&&v.length>0&&g(null)},[JSON.stringify(v)]),q.useEffect(()=>{w||typeof x!="number"||B.current!==null||(B.current=setTimeout(()=>{L(),B.current=null},x))},[x,w,L,...f]),{droppableRects:z,measureDroppableContainers:L,measuringScheduled:v!=null};function O(){switch(A){case $y.Always:return!1;case $y.BeforeDragging:return u;default:return!u}}}function gx(n,l){return Gy(u=>n?u||(typeof l=="function"?l(n):n):null,[l,n])}function nB(n,l){return gx(n,l)}function aB(n){let{callback:l,disabled:u}=n;const f=Bb(l),p=q.useMemo(()=>{if(u||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:v}=window;return new v(f)},[f,u]);return q.useEffect(()=>()=>p==null?void 0:p.disconnect(),[p]),p}function Fb(n){let{callback:l,disabled:u}=n;const f=Bb(l),p=q.useMemo(()=>{if(u||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:v}=window;return new v(f)},[u]);return q.useEffect(()=>()=>p==null?void 0:p.disconnect(),[p]),p}function rB(n){return new cx(eg(n),n)}function fw(n,l,u){l===void 0&&(l=rB);const[f,p]=q.useState(null);function v(){p(S=>{if(!n)return null;if(n.isConnected===!1){var A;return(A=S??u)!=null?A:null}const C=l(n);return JSON.stringify(S)===JSON.stringify(C)?S:C})}const g=aB({callback(S){if(n)for(const A of S){const{type:C,target:w}=A;if(C==="childList"&&w instanceof HTMLElement&&w.contains(n)){v();break}}}}),x=Fb({callback:v});return Ps(()=>{v(),n?(x==null||x.observe(n),g==null||g.observe(document.body,{childList:!0,subtree:!0})):(x==null||x.disconnect(),g==null||g.disconnect())},[n]),f}function iB(n){const l=gx(n);return QC(n,l)}const dw=[];function lB(n){const l=q.useRef(n),u=Gy(f=>n?f&&f!==dw&&n&&l.current&&n.parentNode===l.current.parentNode?f:ux(n):dw,[n]);return q.useEffect(()=>{l.current=n},[n]),u}function uB(n){const[l,u]=q.useState(null),f=q.useRef(n),p=q.useCallback(v=>{const g=ox(v.target);g&&u(x=>x?(x.set(g,sx(g)),new Map(x)):null)},[]);return q.useEffect(()=>{const v=f.current;if(n!==v){g(v);const x=n.map(S=>{const A=ox(S);return A?(A.addEventListener("scroll",p,{passive:!0}),[A,sx(A)]):null}).filter(S=>S!=null);u(x.length?new Map(x):null),f.current=n}return()=>{g(n),g(v)};function g(x){x.forEach(S=>{const A=ox(S);A==null||A.removeEventListener("scroll",p)})}},[p,n]),q.useMemo(()=>n.length?l?Array.from(l.values()).reduce((v,g)=>Wv(v,g),Qs):aw(n):Qs,[n,l])}function hw(n,l){l===void 0&&(l=[]);const u=q.useRef(null);return q.useEffect(()=>{u.current=null},l),q.useEffect(()=>{const f=n!==Qs;f&&!u.current&&(u.current=n),!f&&u.current&&(u.current=null)},[n]),u.current?Ub(n,u.current):Qs}function oB(n){q.useEffect(()=>{if(!Nb)return;const l=n.map(u=>{let{sensor:f}=u;return f.setup==null?void 0:f.setup()});return()=>{for(const u of l)u==null||u()}},n.map(l=>{let{sensor:u}=l;return u}))}function sB(n,l){return q.useMemo(()=>n.reduce((u,f)=>{let{eventName:p,handler:v}=f;return u[p]=g=>{v(g,l)},u},{}),[n,l])}function pw(n){return q.useMemo(()=>n?LN(n):null,[n])}const mw=[];function cB(n,l){l===void 0&&(l=eg);const[u]=n,f=pw(u?Il(u):null),[p,v]=q.useState(mw);function g(){v(()=>n.length?n.map(S=>tw(S)?f:new cx(l(S),S)):mw)}const x=Fb({callback:g});return Ps(()=>{x==null||x.disconnect(),g(),n.forEach(S=>x==null?void 0:x.observe(S))},[n]),p}function vw(n){if(!n)return null;if(n.children.length>1)return n;const l=n.children[0];return Fy(l)?l:n}function fB(n){let{measure:l}=n;const[u,f]=q.useState(null),p=q.useCallback(A=>{for(const{target:C}of A)if(Fy(C)){f(w=>{const M=l(C);return w?{...w,width:M.width,height:M.height}:M});break}},[l]),v=Fb({callback:p}),g=q.useCallback(A=>{const C=vw(A);v==null||v.disconnect(),C&&(v==null||v.observe(C)),f(C?l(C):null)},[l,v]),[x,S]=Lb(g);return q.useMemo(()=>({nodeRef:x,rect:u,setRef:S}),[u,x,S])}const dB=[{sensor:hx,options:{}},{sensor:uw,options:{}}],hB={current:{}},Yb={draggable:{measure:KC},droppable:{measure:KC,strategy:$y.WhileDragging,frequency:vx.Optimized},dragOverlay:{measure:eg}};class Py extends Map{get(l){var u;return l!=null&&(u=super.get(l))!=null?u:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(l=>{let{disabled:u}=l;return!u})}getNodeFor(l){var u,f;return(u=(f=this.get(l))==null?void 0:f.node.current)!=null?u:void 0}}const pB={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Py,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:kb},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yb,measureDroppableContainers:kb,windowRect:null,measuringScheduled:!1},gw={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:kb,draggableNodes:new Map,over:null,measureDroppableContainers:kb},Qy=q.createContext(gw),yw=q.createContext(pB);function mB(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Py}}}function vB(n,l){switch(l.type){case ei.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:l.initialCoordinates,active:l.active}};case ei.DragMove:return n.draggable.active==null?n:{...n,draggable:{...n.draggable,translate:{x:l.coordinates.x-n.draggable.initialCoordinates.x,y:l.coordinates.y-n.draggable.initialCoordinates.y}}};case ei.DragEnd:case ei.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ei.RegisterDroppable:{const{element:u}=l,{id:f}=u,p=new Py(n.droppable.containers);return p.set(f,u),{...n,droppable:{...n.droppable,containers:p}}}case ei.SetDroppableDisabled:{const{id:u,key:f,disabled:p}=l,v=n.droppable.containers.get(u);if(!v||f!==v.key)return n;const g=new Py(n.droppable.containers);return g.set(u,{...v,disabled:p}),{...n,droppable:{...n.droppable,containers:g}}}case ei.UnregisterDroppable:{const{id:u,key:f}=l,p=n.droppable.containers.get(u);if(!p||f!==p.key)return n;const v=new Py(n.droppable.containers);return v.delete(u),{...n,droppable:{...n.droppable,containers:v}}}default:return n}}function gB(n){let{disabled:l}=n;const{active:u,activatorEvent:f,draggableNodes:p}=q.useContext(Qy),v=zb(f),g=zb(u==null?void 0:u.id);return q.useEffect(()=>{if(!l&&!f&&v&&g!=null){if(!Hb(v)||document.activeElement===v.target)return;const x=p.get(g);if(!x)return;const{activatorNode:S,node:A}=x;if(!S.current&&!A.current)return;requestAnimationFrame(()=>{for(const C of[S.current,A.current]){if(!C)continue;const w=sN(C);if(w){w.focus();break}}})}},[f,l,p,g,v]),null}function bw(n,l){let{transform:u,...f}=l;return n!=null&&n.length?n.reduce((p,v)=>v({transform:p,...f}),u):u}function yB(n){return q.useMemo(()=>({draggable:{...Yb.draggable,...n==null?void 0:n.draggable},droppable:{...Yb.droppable,...n==null?void 0:n.droppable},dragOverlay:{...Yb.dragOverlay,...n==null?void 0:n.dragOverlay}}),[n==null?void 0:n.draggable,n==null?void 0:n.droppable,n==null?void 0:n.dragOverlay])}function bB(n){let{activeNode:l,measure:u,initialRect:f,config:p=!0}=n;const v=q.useRef(!1),{x:g,y:x}=typeof p=="boolean"?{x:p,y:p}:p;Ps(()=>{if(!g&&!x||!l){v.current=!1;return}if(v.current||!f)return;const A=l==null?void 0:l.node.current;if(!A||A.isConnected===!1)return;const C=u(A),w=QC(C,f);if(g||(w.x=0),x||(w.y=0),v.current=!0,Math.abs(w.x)>0||Math.abs(w.y)>0){const M=JC(A);M&&M.scrollBy({top:w.y,left:w.x})}},[l,g,x,f,u])}const Gb=q.createContext({...Qs,scaleX:1,scaleY:1});var Ph;(function(n){n[n.Uninitialized=0]="Uninitialized",n[n.Initializing=1]="Initializing",n[n.Initialized=2]="Initialized"})(Ph||(Ph={}));const SB=q.memo(function(l){var u,f,p,v;let{id:g,accessibility:x,autoScroll:S=!0,children:A,sensors:C=dB,collisionDetection:w=DN,measuring:M,modifiers:L,...B}=l;const z=q.useReducer(vB,void 0,mB),[O,I]=z,[X,V]=mN(),[U,D]=q.useState(Ph.Uninitialized),j=U===Ph.Initialized,{draggable:{active:Y,nodes:ie,translate:oe},droppable:{containers:pe}}=O,ve=Y!=null?ie.get(Y):null,_e=q.useRef({initial:null,translated:null}),ze=q.useMemo(()=>{var Jn;return Y!=null?{id:Y,data:(Jn=ve==null?void 0:ve.data)!=null?Jn:hB,rect:_e}:null},[Y,ve]),Ue=q.useRef(null),[Qe,ee]=q.useState(null),[ce,ge]=q.useState(null),We=Yy(B,Object.values(B)),W=Iy("DndDescribedBy",g),Ee=q.useMemo(()=>pe.getEnabled(),[pe]),Me=yB(M),{droppableRects:ne,measureDroppableContainers:he,measuringScheduled:De}=tB(Ee,{dragging:j,dependencies:[oe.x,oe.y],config:Me.droppable}),Ye=WN(ie,Y),rt=q.useMemo(()=>ce?jb(ce):null,[ce]),Ke=Ki(),Ne=nB(Ye,Me.draggable.measure);bB({activeNode:Y!=null?ie.get(Y):null,config:Ke.layoutShiftCompensation,initialRect:Ne,measure:Me.draggable.measure});const Ce=fw(Ye,Me.draggable.measure,Ne),nt=fw(Ye?Ye.parentElement:null),ke=q.useRef({activatorEvent:null,active:null,activeNode:Ye,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:ie,draggingNode:null,draggingNodeRect:null,droppableContainers:pe,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Tt=pe.getNodeFor((u=ke.current.over)==null?void 0:u.id),_t=fB({measure:Me.dragOverlay.measure}),Et=(f=_t.nodeRef.current)!=null?f:Ye,on=j?(p=_t.rect)!=null?p:Ce:null,Ut=!!(_t.nodeRef.current&&_t.rect),Ja=iB(Ut?null:Ce),fr=pw(Et?Il(Et):null),Cn=lB(j?Tt??Ye:null),Qt=cB(Cn),ht=bw(L,{transform:{x:oe.x-Ja.x,y:oe.y-Ja.y,scaleX:1,scaleY:1},activatorEvent:ce,active:ze,activeNodeRect:Ce,containerNodeRect:nt,draggingNodeRect:on,over:ke.current.over,overlayNodeRect:_t.rect,scrollableAncestors:Cn,scrollableAncestorRects:Qt,windowRect:fr}),wn=rt?Wv(rt,oe):null,Ta=uB(Cn),Er=hw(Ta),Bt=hw(Ta,[Ce]),ut=Wv(ht,Er),bt=on?MN(on,ht):null,Nn=ze&&bt?w({active:ze,collisionRect:bt,droppableRects:ne,droppableContainers:Ee,pointerCoordinates:wn}):null,yt=CN(Nn,"id"),[On,gt]=q.useState(null),Qn=Ut?ht:Wv(ht,Bt),ti=_N(Qn,(v=On==null?void 0:On.rect)!=null?v:null,Ce),Gn=q.useRef(null),dr=q.useCallback((Jn,rr)=>{let{sensor:La,options:Hr}=rr;if(Ue.current==null)return;const Wn=ie.get(Ue.current);if(!Wn)return;const za=Jn.nativeEvent,jr=new La({active:Ue.current,activeNode:Wn,event:za,options:Hr,context:ke,onAbort(nn){if(!ie.get(nn))return;const{onDragAbort:Bn}=We.current,Ia={id:nn};Bn==null||Bn(Ia),X({type:"onDragAbort",event:Ia})},onPending(nn,zn,Bn,Ia){if(!ie.get(nn))return;const{onDragPending:xu}=We.current,ya={id:nn,constraint:zn,initialCoordinates:Bn,offset:Ia};xu==null||xu(ya),X({type:"onDragPending",event:ya})},onStart(nn){const zn=Ue.current;if(zn==null)return;const Bn=ie.get(zn);if(!Bn)return;const{onDragStart:Ia}=We.current,gl={activatorEvent:za,active:{id:zn,data:Bn.data,rect:_e}};Gl.unstable_batchedUpdates(()=>{Ia==null||Ia(gl),D(Ph.Initializing),I({type:ei.DragStart,initialCoordinates:nn,active:zn}),X({type:"onDragStart",event:gl}),ee(Gn.current),ge(za)})},onMove(nn){I({type:ei.DragMove,coordinates:nn})},onEnd:Eu(ei.DragEnd),onCancel:Eu(ei.DragCancel)});Gn.current=jr;function Eu(nn){return async function(){const{active:Bn,collisions:Ia,over:gl,scrollAdjustedTranslate:xu}=ke.current;let ya=null;if(Bn&&xu){const{cancelDrop:ea}=We.current;ya={activatorEvent:za,active:Bn,collisions:Ia,delta:xu,over:gl},nn===ei.DragEnd&&typeof ea=="function"&&await Promise.resolve(ea(ya))&&(nn=ei.DragCancel)}Ue.current=null,Gl.unstable_batchedUpdates(()=>{I({type:nn}),D(Ph.Uninitialized),gt(null),ee(null),ge(null),Gn.current=null;const ea=nn===ei.DragEnd?"onDragEnd":"onDragCancel";if(ya){const ft=We.current[ea];ft==null||ft(ya),X({type:ea,event:ya})}})}}},[ie]),Ur=q.useCallback((Jn,rr)=>(La,Hr)=>{const Wn=La.nativeEvent,za=ie.get(Hr);if(Ue.current!==null||!za||Wn.dndKit||Wn.defaultPrevented)return;const jr={active:za};Jn(La,rr.options,jr)===!0&&(Wn.dndKit={capturedBy:rr.sensor},Ue.current=Hr,dr(La,rr))},[ie,dr]),ga=eB(C,Ur);oB(C),Ps(()=>{Ce&&U===Ph.Initializing&&D(Ph.Initialized)},[Ce,U]),q.useEffect(()=>{const{onDragMove:Jn}=We.current,{active:rr,activatorEvent:La,collisions:Hr,over:Wn}=ke.current;if(!rr||!La)return;const za={active:rr,activatorEvent:La,collisions:Hr,delta:{x:ut.x,y:ut.y},over:Wn};Gl.unstable_batchedUpdates(()=>{Jn==null||Jn(za),X({type:"onDragMove",event:za})})},[ut.x,ut.y]),q.useEffect(()=>{const{active:Jn,activatorEvent:rr,collisions:La,droppableContainers:Hr,scrollAdjustedTranslate:Wn}=ke.current;if(!Jn||Ue.current==null||!rr||!Wn)return;const{onDragOver:za}=We.current,jr=Hr.get(yt),Eu=jr&&jr.rect.current?{id:jr.id,rect:jr.rect.current,data:jr.data,disabled:jr.disabled}:null,nn={active:Jn,activatorEvent:rr,collisions:La,delta:{x:Wn.x,y:Wn.y},over:Eu};Gl.unstable_batchedUpdates(()=>{gt(Eu),za==null||za(nn),X({type:"onDragOver",event:nn})})},[yt]),Ps(()=>{ke.current={activatorEvent:ce,active:ze,activeNode:Ye,collisionRect:bt,collisions:Nn,droppableRects:ne,draggableNodes:ie,draggingNode:Et,draggingNodeRect:on,droppableContainers:pe,over:On,scrollableAncestors:Cn,scrollAdjustedTranslate:ut},_e.current={initial:on,translated:bt}},[ze,Ye,Nn,bt,ie,Et,on,ne,pe,On,Cn,ut]),ZN({...Ke,delta:oe,draggingRect:bt,pointerCoordinates:wn,scrollableAncestors:Cn,scrollableAncestorRects:Qt});const ni=q.useMemo(()=>({active:ze,activeNode:Ye,activeNodeRect:Ce,activatorEvent:ce,collisions:Nn,containerNodeRect:nt,dragOverlay:_t,draggableNodes:ie,droppableContainers:pe,droppableRects:ne,over:On,measureDroppableContainers:he,scrollableAncestors:Cn,scrollableAncestorRects:Qt,measuringConfiguration:Me,measuringScheduled:De,windowRect:fr}),[ze,Ye,Ce,ce,Nn,nt,_t,ie,pe,ne,On,he,Cn,Qt,Me,De,fr]),Xl=q.useMemo(()=>({activatorEvent:ce,activators:ga,active:ze,activeNodeRect:Ce,ariaDescribedById:{draggable:W},dispatch:I,draggableNodes:ie,over:On,measureDroppableContainers:he}),[ce,ga,ze,Ce,I,W,ie,On,he]);return q.createElement($C.Provider,{value:V},q.createElement(Qy.Provider,{value:Xl},q.createElement(yw.Provider,{value:ni},q.createElement(Gb.Provider,{value:ti},A)),q.createElement(gB,{disabled:(x==null?void 0:x.restoreFocus)===!1})),q.createElement(yN,{...x,hiddenTextDescribedById:W}));function Ki(){const Jn=(Qe==null?void 0:Qe.autoScrollEnabled)===!1,rr=typeof S=="object"?S.enabled===!1:S===!1,La=j&&!Jn&&!rr;return typeof S=="object"?{...S,enabled:La}:{enabled:La}}}),EB=q.createContext(null),Sw="button",xB="Draggable";function AB(n){let{id:l,data:u,disabled:f=!1,attributes:p}=n;const v=Iy(xB),{activators:g,activatorEvent:x,active:S,activeNodeRect:A,ariaDescribedById:C,draggableNodes:w,over:M}=q.useContext(Qy),{role:L=Sw,roleDescription:B="draggable",tabIndex:z=0}=p??{},O=(S==null?void 0:S.id)===l,I=q.useContext(O?Gb:EB),[X,V]=Lb(),[U,D]=Lb(),j=sB(g,l),Y=Yy(u);Ps(()=>(w.set(l,{id:l,key:v,node:X,activatorNode:U,data:Y}),()=>{const oe=w.get(l);oe&&oe.key===v&&w.delete(l)}),[w,l]);const ie=q.useMemo(()=>({role:L,tabIndex:z,"aria-disabled":f,"aria-pressed":O&&L===Sw?!0:void 0,"aria-roledescription":B,"aria-describedby":C.draggable}),[f,L,z,O,B,C.draggable]);return{active:S,activatorEvent:x,activeNodeRect:A,attributes:ie,isDragging:O,listeners:f?void 0:j,node:X,over:M,setNodeRef:V,setActivatorNodeRef:D,transform:I}}function Ew(){return q.useContext(yw)}const TB="Droppable",CB={timeout:25};function wB(n){let{data:l,disabled:u=!1,id:f,resizeObserverConfig:p}=n;const v=Iy(TB),{active:g,dispatch:x,over:S,measureDroppableContainers:A}=q.useContext(Qy),C=q.useRef({disabled:u}),w=q.useRef(!1),M=q.useRef(null),L=q.useRef(null),{disabled:B,updateMeasurementsFor:z,timeout:O}={...CB,...p},I=Yy(z??f),X=q.useCallback(()=>{if(!w.current){w.current=!0;return}L.current!=null&&clearTimeout(L.current),L.current=setTimeout(()=>{A(Array.isArray(I.current)?I.current:[I.current]),L.current=null},O)},[O]),V=Fb({callback:X,disabled:B||!g}),U=q.useCallback((ie,oe)=>{V&&(oe&&(V.unobserve(oe),w.current=!1),ie&&V.observe(ie))},[V]),[D,j]=Lb(U),Y=Yy(l);return q.useEffect(()=>{!V||!D.current||(V.disconnect(),w.current=!1,V.observe(D.current))},[D,V]),q.useEffect(()=>(x({type:ei.RegisterDroppable,element:{id:f,key:v,disabled:u,node:D,rect:M,data:Y}}),()=>x({type:ei.UnregisterDroppable,key:v,id:f})),[f]),q.useEffect(()=>{u!==C.current.disabled&&(x({type:ei.SetDroppableDisabled,id:f,key:v,disabled:u}),C.current.disabled=u)},[f,v,u,x]),{active:g,rect:M,isOver:(S==null?void 0:S.id)===f,node:D,over:S,setNodeRef:j}}function OB(n){let{animation:l,children:u}=n;const[f,p]=q.useState(null),[v,g]=q.useState(null),x=zb(u);return!u&&!f&&x&&p(x),Ps(()=>{if(!v)return;const S=f==null?void 0:f.key,A=f==null?void 0:f.props.id;if(S==null||A==null){p(null);return}Promise.resolve(l(A,v)).then(()=>{p(null)})},[l,f,v]),q.createElement(q.Fragment,null,u,f?q.cloneElement(f,{ref:g}):null)}const DB={x:0,y:0,scaleX:1,scaleY:1};function _B(n){let{children:l}=n;return q.createElement(Qy.Provider,{value:gw},q.createElement(Gb.Provider,{value:DB},l))}const RB={position:"fixed",touchAction:"none"},MB=n=>Hb(n)?"transform 250ms ease":void 0,NB=q.forwardRef((n,l)=>{let{as:u,activatorEvent:f,adjustScale:p,children:v,className:g,rect:x,style:S,transform:A,transition:C=MB}=n;if(!x)return null;const w=p?A:{...A,scaleX:1,scaleY:1},M={...RB,width:x.width,height:x.height,top:x.top,left:x.left,transform:Kc.Transform.toString(w),transformOrigin:p&&f?xN(f,x):void 0,transition:typeof C=="function"?C(f):C,...S};return q.createElement(u,{className:g,style:M,ref:l},v)}),yx={duration:250,easing:"ease",keyframes:n=>{let{transform:{initial:l,final:u}}=n;return[{transform:Kc.Transform.toString(l)},{transform:Kc.Transform.toString(u)}]},sideEffects:(n=>l=>{let{active:u,dragOverlay:f}=l;const p={},{styles:v,className:g}=n;if(v!=null&&v.active)for(const[x,S]of Object.entries(v.active))S!==void 0&&(p[x]=u.node.style.getPropertyValue(x),u.node.style.setProperty(x,S));if(v!=null&&v.dragOverlay)for(const[x,S]of Object.entries(v.dragOverlay))S!==void 0&&f.node.style.setProperty(x,S);return g!=null&&g.active&&u.node.classList.add(g.active),g!=null&&g.dragOverlay&&f.node.classList.add(g.dragOverlay),function(){for(const[S,A]of Object.entries(p))u.node.style.setProperty(S,A);g!=null&&g.active&&u.node.classList.remove(g.active)}})({styles:{active:{opacity:"0"}}})};function BB(n){let{config:l,draggableNodes:u,droppableContainers:f,measuringConfiguration:p}=n;return Bb((v,g)=>{if(l===null)return;const x=u.get(v);if(!x)return;const S=x.node.current;if(!S)return;const A=vw(g);if(!A)return;const{transform:C}=Il(g).getComputedStyle(g),w=ZC(C);if(!w)return;const M=typeof l=="function"?l:LB(l);return rw(S,p.draggable.measure),M({active:{id:v,data:x.data,node:S,rect:p.draggable.measure(S)},draggableNodes:u,dragOverlay:{node:g,rect:p.dragOverlay.measure(A)},droppableContainers:f,measuringConfiguration:p,transform:w})})}function LB(n){const{duration:l,easing:u,sideEffects:f,keyframes:p}={...yx,...n};return v=>{let{active:g,dragOverlay:x,transform:S,...A}=v;if(!l)return;const C={x:x.rect.left-g.rect.left,y:x.rect.top-g.rect.top},w={scaleX:S.scaleX!==1?g.rect.width*S.scaleX/x.rect.width:1,scaleY:S.scaleY!==1?g.rect.height*S.scaleY/x.rect.height:1},M={x:S.x-C.x,y:S.y-C.y,...w},L=p({...A,active:g,dragOverlay:x,transform:{initial:S,final:M}}),[B]=L,z=L[L.length-1];if(JSON.stringify(B)===JSON.stringify(z))return;const O=f==null?void 0:f({active:g,dragOverlay:x,...A}),I=x.node.animate(L,{duration:l,easing:u,fill:"forwards"});return new Promise(X=>{I.onfinish=()=>{O==null||O(),X()}})}}let xw=0;function zB(n){return q.useMemo(()=>{if(n!=null)return xw++,xw},[n])}const UB=q.memo(n=>{let{adjustScale:l=!1,children:u,dropAnimation:f,style:p,transition:v,modifiers:g,wrapperElement:x="div",className:S,zIndex:A=999}=n;const{activatorEvent:C,active:w,activeNodeRect:M,containerNodeRect:L,draggableNodes:B,droppableContainers:z,dragOverlay:O,over:I,measuringConfiguration:X,scrollableAncestors:V,scrollableAncestorRects:U,windowRect:D}=Ew(),j=q.useContext(Gb),Y=zB(w==null?void 0:w.id),ie=bw(g,{activatorEvent:C,active:w,activeNodeRect:M,containerNodeRect:L,draggingNodeRect:O.rect,over:I,overlayNodeRect:O.rect,scrollableAncestors:V,scrollableAncestorRects:U,transform:j,windowRect:D}),oe=gx(M),pe=BB({config:f,draggableNodes:B,droppableContainers:z,measuringConfiguration:X}),ve=oe?O.setRef:void 0;return q.createElement(_B,null,q.createElement(OB,{animation:pe},w&&Y?q.createElement(NB,{key:Y,id:w.id,ref:ve,as:x,activatorEvent:C,adjustScale:l,className:S,transition:v,rect:oe,style:{zIndex:A,...p},transform:ie},u):null))});function Zy(n,l,u){const f=n.slice();return f.splice(u<0?f.length+u:u,0,f.splice(l,1)[0]),f}function HB(n,l){return n.reduce((u,f,p)=>{const v=l.get(f);return v&&(u[p]=v),u},Array(n.length))}function Ib(n){return n!==null&&n>=0}function jB(n,l){if(n===l)return!0;if(n.length!==l.length)return!1;for(let u=0;u<n.length;u++)if(n[u]!==l[u])return!1;return!0}function kB(n){return typeof n=="boolean"?{draggable:n,droppable:n}:n}const Aw=n=>{let{rects:l,activeIndex:u,overIndex:f,index:p}=n;const v=Zy(l,f,u),g=l[p],x=v[p];return!x||!g?null:{x:x.left-g.left,y:x.top-g.top,scaleX:x.width/g.width,scaleY:x.height/g.height}},Vb={scaleX:1,scaleY:1},qB=n=>{var l;let{activeIndex:u,activeNodeRect:f,index:p,rects:v,overIndex:g}=n;const x=(l=v[u])!=null?l:f;if(!x)return null;if(p===u){const A=v[g];return A?{x:0,y:u<g?A.top+A.height-(x.top+x.height):A.top-x.top,...Vb}:null}const S=FB(v,p,u);return p>u&&p<=g?{x:0,y:-x.height-S,...Vb}:p<u&&p>=g?{x:0,y:x.height+S,...Vb}:{x:0,y:0,...Vb}};function FB(n,l,u){const f=n[l],p=n[l-1],v=n[l+1];return f?u<l?p?f.top-(p.top+p.height):v?v.top-(f.top+f.height):0:v?v.top-(f.top+f.height):p?f.top-(p.top+p.height):0:0}const Tw="Sortable",Cw=q.createContext({activeIndex:-1,containerId:Tw,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Aw,disabled:{draggable:!1,droppable:!1}});function YB(n){let{children:l,id:u,items:f,strategy:p=Aw,disabled:v=!1}=n;const{active:g,dragOverlay:x,droppableRects:S,over:A,measureDroppableContainers:C}=Ew(),w=Iy(Tw,u),M=x.rect!==null,L=q.useMemo(()=>f.map(j=>typeof j=="object"&&"id"in j?j.id:j),[f]),B=g!=null,z=g?L.indexOf(g.id):-1,O=A?L.indexOf(A.id):-1,I=q.useRef(L),X=!jB(L,I.current),V=O!==-1&&z===-1||X,U=kB(v);Ps(()=>{X&&B&&C(L)},[X,L,B,C]),q.useEffect(()=>{I.current=L},[L]);const D=q.useMemo(()=>({activeIndex:z,containerId:w,disabled:U,disableTransforms:V,items:L,overIndex:O,useDragOverlay:M,sortedRects:HB(L,S),strategy:p}),[z,w,U.draggable,U.droppable,V,L,O,S,M,p]);return q.createElement(Cw.Provider,{value:D},l)}const GB=n=>{let{id:l,items:u,activeIndex:f,overIndex:p}=n;return Zy(u,f,p).indexOf(l)},IB=n=>{let{containerId:l,isSorting:u,wasDragging:f,index:p,items:v,newIndex:g,previousItems:x,previousContainerId:S,transition:A}=n;return!A||!f||x!==v&&p===g?!1:u?!0:g!==p&&l===S},VB={duration:200,easing:"ease"},ww="transform",XB=Kc.Transition.toString({property:ww,duration:0,easing:"linear"}),$B={roleDescription:"sortable"};function PB(n){let{disabled:l,index:u,node:f,rect:p}=n;const[v,g]=q.useState(null),x=q.useRef(u);return Ps(()=>{if(!l&&u!==x.current&&f.current){const S=p.current;if(S){const A=eg(f.current,{ignoreTransform:!0}),C={x:S.left-A.left,y:S.top-A.top,scaleX:S.width/A.width,scaleY:S.height/A.height};(C.x||C.y)&&g(C)}}u!==x.current&&(x.current=u)},[l,u,f,p]),q.useEffect(()=>{v&&g(null)},[v]),v}function QB(n){let{animateLayoutChanges:l=IB,attributes:u,disabled:f,data:p,getNewIndex:v=GB,id:g,strategy:x,resizeObserverConfig:S,transition:A=VB}=n;const{items:C,containerId:w,activeIndex:M,disabled:L,disableTransforms:B,sortedRects:z,overIndex:O,useDragOverlay:I,strategy:X}=q.useContext(Cw),V=ZB(f,L),U=C.indexOf(g),D=q.useMemo(()=>({sortable:{containerId:w,index:U,items:C},...p}),[w,p,U,C]),j=q.useMemo(()=>C.slice(C.indexOf(g)),[C,g]),{rect:Y,node:ie,isOver:oe,setNodeRef:pe}=wB({id:g,data:D,disabled:V.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...S}}),{active:ve,activatorEvent:_e,activeNodeRect:ze,attributes:Ue,setNodeRef:Qe,listeners:ee,isDragging:ce,over:ge,setActivatorNodeRef:We,transform:W}=AB({id:g,data:D,attributes:{...$B,...u},disabled:V.draggable}),Ee=iN(pe,Qe),Me=!!ve,ne=Me&&!B&&Ib(M)&&Ib(O),he=!I&&ce,De=he&&ne?W:null,rt=ne?De??(x??X)({rects:z,activeNodeRect:ze,activeIndex:M,overIndex:O,index:U}):null,Ke=Ib(M)&&Ib(O)?v({id:g,items:C,activeIndex:M,overIndex:O}):U,Ne=ve==null?void 0:ve.id,Ce=q.useRef({activeId:Ne,items:C,newIndex:Ke,containerId:w}),nt=C!==Ce.current.items,ke=l({active:ve,containerId:w,isDragging:ce,isSorting:Me,id:g,index:U,items:C,newIndex:Ce.current.newIndex,previousItems:Ce.current.items,previousContainerId:Ce.current.containerId,transition:A,wasDragging:Ce.current.activeId!=null}),Tt=PB({disabled:!ke,index:U,node:ie,rect:Y});return q.useEffect(()=>{Me&&Ce.current.newIndex!==Ke&&(Ce.current.newIndex=Ke),w!==Ce.current.containerId&&(Ce.current.containerId=w),C!==Ce.current.items&&(Ce.current.items=C)},[Me,Ke,w,C]),q.useEffect(()=>{if(Ne===Ce.current.activeId)return;if(Ne!=null&&Ce.current.activeId==null){Ce.current.activeId=Ne;return}const Et=setTimeout(()=>{Ce.current.activeId=Ne},50);return()=>clearTimeout(Et)},[Ne]),{active:ve,activeIndex:M,attributes:Ue,data:D,rect:Y,index:U,newIndex:Ke,items:C,isOver:oe,isSorting:Me,isDragging:ce,listeners:ee,node:ie,overIndex:O,over:ge,setNodeRef:Ee,setActivatorNodeRef:We,setDroppableNodeRef:pe,setDraggableNodeRef:Qe,transform:Tt??rt,transition:_t()};function _t(){if(Tt||nt&&Ce.current.newIndex===U)return XB;if(!(he&&!Hb(_e)||!A)&&(Me||ke))return Kc.Transition.toString({...A,property:ww})}}function ZB(n,l){var u,f;return typeof n=="boolean"?{draggable:n,droppable:!1}:{draggable:(u=n==null?void 0:n.draggable)!=null?u:l.draggable,droppable:(f=n==null?void 0:n.droppable)!=null?f:l.droppable}}Kn.Down,Kn.Right,Kn.Up,Kn.Left;function Ed(){return Ed=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(n[f]=u[f])}return n},Ed.apply(this,arguments)}function bx(n,l){if(n==null)return{};var u={},f=Object.keys(n),p,v;for(v=0;v<f.length;v++)p=f[v],!(l.indexOf(p)>=0)&&(u[p]=n[p]);return u}function KB(n,l){if(n){if(typeof n=="string")return Ow(n,l);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Ow(n,l)}}function Ow(n,l){(l==null||l>n.length)&&(l=n.length);for(var u=0,f=new Array(l);u<l;u++)f[u]=n[u];return f}function Xb(n,l){var u=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(u)return(u=u.call(n)).next.bind(u);if(Array.isArray(n)||(u=KB(n))||l){u&&(n=u);var f=0;return function(){return f>=n.length?{done:!0}:{done:!1,value:n[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
99
99
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dw(n,l){l===void 0&&(l={});var u=l.insertAt;if(!(!n||typeof document>"u")){var f=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.type="text/css",u==="top"&&f.firstChild?f.insertBefore(p,f.firstChild):f.appendChild(p),p.styleSheet?p.styleSheet.cssText=n:p.appendChild(document.createTextNode(n))}}var JB=`.dnd-sortable-tree_simple_wrapper{box-sizing:border-box;list-style:none;margin-bottom:-1px}.dnd-sortable-tree_simple_tree-item{align-items:center;border:1px solid #dedede;box-sizing:border-box;color:#222;display:flex;padding:10px;position:relative}.dnd-sortable-tree_simple_clone{display:inline-block;padding:5px;pointer-events:none}.dnd-sortable-tree_simple_clone>.dnd-sortable-tree_simple_tree-item{border-radius:4px;box-shadow:0 15px 15px 0 rgba(34,33,81,.1);padding-bottom:5px;padding-right:24px;padding-top:5px}.dnd-sortable-tree_simple_ghost{opacity:.5}.dnd-sortable-tree_simple_disable-selection{-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.dnd-sortable-tree_simple_disable-interaction{pointer-events:none}.dnd-sortable-tree_folder_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button-collapsed{transform:rotate(-90deg)}.dnd-sortable-tree_simple_handle{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='12'><path d='M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z'></path></svg>") no-repeat 50%;cursor:pointer;width:20px}.dnd-sortable-tree_simple_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_simple-item-collapse_button-collapsed{transform:rotate(-90deg)}`;Dw(JB);var WB=`.dnd-sortable-tree_folder_wrapper{box-sizing:border-box;display:flex;flex-direction:row;list-style:none;margin-bottom:-1px}.dnd-sortable-tree_folder_tree-item{align-items:center;box-sizing:border-box;display:flex;padding:7px 0;position:relative}.dnd-sortable-tree_folder_clone{display:inline-block;padding:5px;pointer-events:none}.dnd-sortable-tree_folder_clone>.dnd-sortable-tree_folder_tree-item{border-radius:4px;padding-bottom:5px;padding-right:24px;padding-top:5px}.dnd-sortable-tree_folder_ghost{opacity:.5}.dnd-sortable-tree_folder_disable-selection{-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}.dnd-sortable-tree_folder_disable-interaction{pointer-events:none}.dnd-sortable-tree_folder_line{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='100%'/></svg>");width:20px}.dnd-sortable-tree_folder_line-last{align-self:stretch;width:20px}.dnd-sortable-tree_folder_line-to_self{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='100%'/><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='50%' x2='100%' y2='50%'/></svg>");width:20px}.dnd-sortable-tree_folder_line-to_self-last{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='0' x2='50%' y2='50%'/><line stroke='black' style='stroke-width: 1px;' x1='50%' y1='50%' x2='100%' y2='50%'/></svg>");width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg width='10' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 41'><path d='M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z' /></svg>") no-repeat 50%;border:0;transition:transform .25s ease;width:20px}.dnd-sortable-tree_folder_tree-item-collapse_button-collapsed{transform:rotate(-90deg)}.dnd-sortable-tree_folder_handle{align-self:stretch;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='12'><path d='M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z'></path></svg>") no-repeat 50%;cursor:pointer;width:20px}`;Dw(WB);var e8=["clone","depth","disableSelection","disableInteraction","disableSorting","ghost","handleProps","indentationWidth","indicator","collapsed","onCollapse","onRemove","item","wrapperRef","style","isLast","parent","hideCollapseButton","childCount","manualDrag","showDragHandle","disableCollapseOnItemClick","className","contentClassName","isOver","isOverParent"];function _w(n){return n?[].concat(_w(n.parent),[n]):[]}var t8=q.forwardRef(function(n,l){var u=n.clone,f=n.disableSelection,p=n.disableInteraction,v=n.disableSorting,g=n.ghost,x=n.handleProps,S=n.collapsed,A=n.onCollapse,C=n.wrapperRef,w=n.style,M=n.isLast,L=n.parent,B=n.hideCollapseButton,z=n.childCount,O=n.manualDrag,I=n.showDragHandle,X=n.disableCollapseOnItemClick,V=n.className,U=n.contentClassName,D=bx(n,e8),j=_w(L);return q.createElement("li",Object.assign({},D,{className:ax("dnd-sortable-tree_folder_wrapper",u&&"dnd-sortable-tree_folder_clone",g&&"dnd-sortable-tree_folder_ghost",f&&"dnd-sortable-tree_folder_disable-selection",p&&"dnd-sortable-tree_folder_disable-interaction",V),ref:C,style:w}),j.map(function(Y){return q.createElement("div",{key:Y.id,className:Y.isLast?"dnd-sortable-tree_folder_line-last":"dnd-sortable-tree_folder_line"})}),q.createElement("div",{className:M?"dnd-sortable-tree_folder_line-to_self-last":"dnd-sortable-tree_folder_line-to_self"}),O&&I&&!v&&q.createElement("div",Object.assign({className:"dnd-sortable-tree_folder_handle"},x)),!O&&!B&&!!A&&!!z&&q.createElement("button",{onClick:function(ie){ie.preventDefault(),A==null||A()},className:ax("dnd-sortable-tree_folder_tree-item-collapse_button",S&&"dnd-sortable-tree_folder_tree-item-collapse_button-collapsed")}),q.createElement("div",Object.assign({className:ax("dnd-sortable-tree_folder_tree-item",U),ref:l},O?void 0:x,{onClick:X?void 0:A}),n.children))}),n8=typeof window<"u"?/iPad|iPhone|iPod/.test(navigator.platform):!1;function a8(n,l){return Math.round(n/l)}var Sx=function(){};function r8(n,l,u,f,p,v,g){var x,S,A;if(Sx(),Sx=function(){},!l||!u)return null;var C=n.findIndex(function(ce){var ge=ce.id;return ge===u}),w=n.findIndex(function(ce){var ge=ce.id;return ge===l}),M=n[w];if(v){var L,B,z,O,I,X=n[C];return X=Qe(X,M,g),X===void 0?null:{depth:(L=(B=X)==null?void 0:B.depth)!=null?L:1,parentId:(z=(O=X)==null?void 0:O.id)!=null?z:null,parent:X,isLast:!!((I=X)!=null&&I.isLast)}}var V=Zy(n,w,C),U=V[C-1],D=V[C+1],j=a8(f,p),Y=M.depth+j,ie=Y,oe=Ue(ie-1,U),pe=Qe(oe,M,g);if(pe===void 0)return null;var ve=((x=pe==null?void 0:pe.depth)!=null?x:-1)+1,_e=(S=D==null?void 0:D.depth)!=null?S:0;if(_e>ve)return null;ie>=ve?ie=ve:ie<_e&&(ie=_e);var ze=((A=D==null?void 0:D.depth)!=null?A:-1)<ie;return pe&&pe.isLast&&(Sx=function(){pe.isLast=!0},pe.isLast=!1),{depth:ie,parentId:ee(),parent:pe,isLast:ze};function Ue(ce,ge){if(!ge)return null;for(;ce<ge.depth;){if(ge.parent===null)return null;ge=ge.parent}return ge}function Qe(ce,ge,We){if(!ce){var W=typeof We=="function"?We(ge):We;return W===!1?void 0:ce}var Ee=typeof ce.canHaveChildren=="function"?ce.canHaveChildren(ge):ce.canHaveChildren;return Ee===!1?Qe(ce.parent,M,We):ce}function ee(){var ce;if(ie===0||!U)return null;if(ie===U.depth)return U.parentId;if(ie>U.depth)return U.id;var ge=(ce=V.slice(0,C).reverse().find(function(We){return We.depth===ie}))==null?void 0:ce.parentId;return ge??null}}function Rw(n,l,u,f){return l===void 0&&(l=null),u===void 0&&(u=0),f===void 0&&(f=null),n.reduce(function(p,v,g){var x,S=Ed({},v,{parentId:l,depth:u,index:g,isLast:n.length===g+1,parent:f});return[].concat(p,[S],Rw((x=v.children)!=null?x:[],v.id,u+1,S))},[])}function Ex(n){return Rw(n)}function i8(n){for(var l,u,f={id:"root",children:[]},p=(l={},l[f.id]=f,l),v=n.map(function(z){return Ed({},z,{children:[]})}),g=Xb(v),x;!(x=g()).done;){var S,A,C,w=x.value,M=w.id,L=(S=w.parentId)!=null?S:f.id,B=(A=p[L])!=null?A:l8(v,L);w.parent=null,p[M]=w,B==null||(C=B.children)==null||C.push(w)}return(u=f.children)!=null?u:[]}function l8(n,l){return n.find(function(u){var f=u.id;return f===l})}function $b(n,l){for(var u=Xb(n),f;!(f=u()).done;){var p=f.value,v=p.id,g=p.children;if(v===l)return p;if(g!=null&&g.length){var x=$b(g,l);if(x)return x}}}function Mw(n,l){for(var u=[],f=Xb(n),p;!(p=f()).done;){var v,g=p.value;g.id!==l&&((v=g.children)!=null&&v.length&&(g.children=Mw(g.children,l)),u.push(g))}return u}function Nw(n,l,u,f){for(var p=Xb(n),v;!(v=p()).done;){var g,x=v.value;if(x.id===l){x[u]=f(x[u]);continue}(g=x.children)!=null&&g.length&&(x.children=Nw(x.children,l,u,f))}return[].concat(n)}function Bw(n,l){return l===void 0&&(l=0),n.reduce(function(u,f){var p=f.children;return p!=null&&p.length?Bw(p,u+1):u+1},l)}function u8(n,l){var u;if(!l)return 0;var f=$b(n,l);return f?Bw((u=f.children)!=null?u:[]):0}function o8(n,l){var u=[].concat(l);return n.filter(function(f){if(f.parentId&&u.includes(f.parentId)){var p;return(p=f.children)!=null&&p.length&&u.push(f.id),!1}return!0})}function Lw(n,l){return!n||!l?!1:n.id===l?!0:Lw(n.parent,l)}var s8=["id","depth","isLast","TreeItemComponent","parent","disableSorting","sortableProps","keepGhostInPlace"],c8=function(l){var u=l.isSorting,f=l.isDragging;return!(u||f)},f8=function(l){var u=l.id,f=l.depth,p=l.isLast,v=l.TreeItemComponent,g=l.parent,x=l.disableSorting,S=l.sortableProps,A=l.keepGhostInPlace,C=bx(l,s8),w=QB(Ed({id:u,animateLayoutChanges:c8,disabled:x},S)),M=w.attributes,L=w.isDragging,B=w.isSorting,z=w.listeners,O=w.setDraggableNodeRef,I=w.setDroppableNodeRef,X=w.transform,V=w.transition,U=w.isOver,D=w.over,j=q.useMemo(function(){return!!(D!=null&&D.id)&&Lw(g,D.id)},[D==null?void 0:D.id]),Y={transform:Kc.Translate.toString(X),transition:V??void 0},ie=q.useMemo(function(){if(C.onCollapse)return function(){return C.onCollapse==null?void 0:C.onCollapse(C.item.id)}},[C.item.id,C.onCollapse]),oe=q.useMemo(function(){if(C.onRemove)return function(){return C.onRemove==null?void 0:C.onRemove(C.item.id)}},[C.item.id,C.onRemove]);return q.createElement(v,Object.assign({},C,{ref:O,wrapperRef:I,style:A?void 0:Y,depth:f,ghost:L,disableSelection:n8,disableInteraction:B,isLast:p,parent:g,handleProps:Ed({},M,z),onCollapse:ie,onRemove:oe,disableSorting:x,isOver:U,isOverParent:j}))},d8=q.memo(f8),h8=function(l){var u=function(p){var v=p.activeIndex,g=p.activeNodeRect,x=p.index,S=p.rects,A=p.overIndex;return l(v,A)?qB({activeIndex:v,activeNodeRect:g,index:x,rects:S,overIndex:A}):null};return u},p8=["items","indicator","indentationWidth","onItemsChanged","TreeItemComponent","pointerSensorOptions","disableSorting","dropAnimation","dndContextProps","sortableProps","keepGhostInPlace","canRootHaveChildren"],m8={activationConstraint:{distance:3}},v8={keyframes:function(l){var u=l.transform;return[{opacity:1,transform:Kc.Transform.toString(u.initial)},{opacity:0,transform:Kc.Transform.toString(Ed({},u.final,{x:u.final.x+5,y:u.final.y+5}))}]},easing:"ease-out",sideEffects:function(l){var u=l.active;u.node.animate([{opacity:0},{opacity:1}],{duration:yx.duration,easing:yx.easing})}};function g8(n){var l=n.items,u=n.indicator,f=n.indentationWidth,p=f===void 0?20:f,v=n.onItemsChanged,g=n.TreeItemComponent,x=n.pointerSensorOptions,S=n.disableSorting,A=n.dropAnimation,C=n.dndContextProps,w=n.sortableProps,M=n.keepGhostInPlace,L=n.canRootHaveChildren,B=bx(n,p8),z=q.useState(null),O=z[0],I=z[1],X=q.useState(null),V=X[0],U=X[1],D=q.useState(0),j=D[0],Y=D[1],ie=q.useState(null),oe=ie[0],pe=ie[1],ve=q.useMemo(function(){var Ne=Ex(l),Ce=Ne.reduce(function(ke,Tt){var _t=Tt.children,Et=Tt.collapsed,on=Tt.id;return Et&&_t!=null&&_t.length?[].concat(ke,[on]):ke},[]),nt=o8(Ne,O?[O].concat(Ce):Ce);return nt},[O,l]),_e=r8(ve,O,V,j,p,M??!1,L),ze=q.useRef({items:ve,offset:j}),Ue=SN(bN(hx,x??m8)),Qe=q.useMemo(function(){return ve.map(function(Ne){var Ce=Ne.id;return Ce})},[ve]),ee=O?ve.find(function(Ne){var Ce=Ne.id;return Ce===O}):null;q.useEffect(function(){ze.current={items:ve,offset:j}},[ve,j]);var ce=q.useRef(l);ce.current=l;var ge=q.useCallback(function(Ne){var Ce=$b(ce.current,Ne);v(Mw(ce.current,Ne),{type:"removed",item:Ce})},[v]),We=q.useCallback(function(Ce){var nt=$b(ce.current,Ce);v(Nw(ce.current,Ce,"collapsed",function(ke){return!ke}),{type:nt.collapsed?"collapsed":"expanded",item:nt})},[v]),W=q.useMemo(function(){return{onDragStart:function(Ce){var nt=Ce.active;return"Picked up "+nt.id+"."},onDragMove:function(Ce){var nt=Ce.active,ke=Ce.over;return Ke("onDragMove",nt.id,ke==null?void 0:ke.id)},onDragOver:function(Ce){var nt=Ce.active,ke=Ce.over;return Ke("onDragOver",nt.id,ke==null?void 0:ke.id)},onDragEnd:function(Ce){var nt=Ce.active,ke=Ce.over;return Ke("onDragEnd",nt.id,ke==null?void 0:ke.id)},onDragCancel:function(Ce){var nt=Ce.active;return"Moving was cancelled. "+nt.id+" was dropped in its original position."}}},[]),Ee=q.useCallback(function(){return!!_e},[_e]);return q.createElement(SB,Object.assign({accessibility:{announcements:W},sensors:S?void 0:Ue,modifiers:u?b8:void 0,collisionDetection:wN,onDragStart:S?void 0:Me,onDragMove:S?void 0:ne,onDragOver:S?void 0:he,onDragEnd:S?void 0:De,onDragCancel:S?void 0:Ye},C),q.createElement(YB,{items:Qe,strategy:S?void 0:h8(Ee)},ve.map(function(Ne){var Ce,nt,ke;return q.createElement(d8,Object.assign({},B,{key:Ne.id,id:Ne.id,item:Ne,childCount:(Ce=Ne.children)==null?void 0:Ce.length,depth:Ne.id===O&&_e&&!M?_e.depth:Ne.depth,indentationWidth:p,indicator:u,collapsed:!!(Ne.collapsed&&((nt=Ne.children)!=null&&nt.length)),onCollapse:(ke=Ne.children)!=null&&ke.length?We:void 0,onRemove:ge,isLast:Ne.id===O&&_e?_e.isLast:Ne.isLast,parent:Ne.id===O&&_e?_e.parent:Ne.parent,TreeItemComponent:g,disableSorting:S,sortableProps:w,keepGhostInPlace:M}))}),Gl.createPortal(q.createElement(UB,{dropAnimation:A===void 0?v8:A},O&&ee?q.createElement(g,Object.assign({},B,{item:ee,children:[],depth:ee.depth,clone:!0,childCount:u8(l,O)+1,indentationWidth:p,isLast:!1,parent:ee.parent,isOver:!1,isOverParent:!1})):null),document.body)));function Me(Ne){var Ce=Ne.active.id;I(Ce),U(Ce);var nt=ve.find(function(ke){var Tt=ke.id;return Tt===Ce});nt&&pe({parentId:nt.parentId,overId:Ce}),document.body.style.setProperty("cursor","grabbing")}function ne(Ne){var Ce=Ne.delta;Y(Ce.x)}function he(Ne){var Ce,nt=Ne.over;U((Ce=nt==null?void 0:nt.id)!=null?Ce:null)}function De(Ne){var Ce=Ne.active,nt=Ne.over;if(rt(),_e&&nt){var ke=_e.depth,Tt=_e.parentId;if(M&&nt.id===Ce.id)return;var _t=Ex(l),Et=_t.findIndex(function(wn){var Ta=wn.id;return Ta===nt.id}),on=_t.findIndex(function(wn){var Ta=wn.id;return Ta===Ce.id}),Ut=_t[on];_t[on]=Ed({},Ut,{depth:ke,parentId:Tt});var Ja=Ut.parent,fr=Zy(_t,on,Et),Cn=i8(fr),Qt=fr.find(function(wn){return wn.id===Ce.id}),ht=Qt.parentId?fr.find(function(wn){return wn.id===Qt.parentId}):null;setTimeout(function(){return v(Cn,{type:"dropped",draggedItem:Qt,draggedFromParent:Ja,droppedToParent:ht})})}}function Ye(){rt()}function rt(){U(null),I(null),Y(0),pe(null),document.body.style.setProperty("cursor","")}function Ke(Ne,Ce,nt){if(nt&&_e){if(Ne!=="onDragEnd"){if(oe&&_e.parentId===oe.parentId&&nt===oe.overId)return;pe({parentId:_e.parentId,overId:nt})}var ke=Ex(l),Tt=ke.findIndex(function(wn){var Ta=wn.id;return Ta===nt}),_t=ke.findIndex(function(wn){var Ta=wn.id;return Ta===Ce}),Et=Zy(ke,_t,Tt),on=Et[Tt-1],Ut,Ja=Ne==="onDragEnd"?"dropped":"moved",fr=Ne==="onDragEnd"?"dropped":"nested";if(on)if(_e.depth>on.depth)Ut=Ce+" was "+fr+" under "+on.id+".";else{for(var Qt=on,ht=function(){var Ta=Qt.parentId;Qt=Et.find(function(Er){var Bt=Er.id;return Bt===Ta})};Qt&&_e.depth<Qt.depth;)ht();Qt&&(Ut=Ce+" was "+Ja+" after "+Qt.id+".")}else{var Cn=Et[Tt+1];Ut=Ce+" was "+Ja+" before "+Cn.id+"."}return Ut}}}var y8=function(l){var u=l.transform;return Ed({},u,{y:u.y-25})},b8=[y8];const S8=({props:n,path:l,datafield:u})=>{var V,U;const f=q.useContext(Aa),p=q.useContext(ua);let{formData:v,formDataPath:g}=qy({currentPath:l,datafield:u,dataLocation:n.dataLocation,defaultValue:n.defaultFieldValue,globalDataContext:f,templateContext:p});if(v===void 0)return null;const x=n.itemTemplate??null,S=ca({valueToEvaluate:n.treeRootPath??void 0,globalDataContext:f,templateContext:p}),A=n.maxDepth,C=typeof S!="string"?!0:n.maxDepthIsAbsolute??!0,w=n.keepBaseItem??!1;let M=0,L=null,B;if(typeof S=="string"&&S.length>0){const D=S.split(".");let j=L,Y=v,ie=g;for(;D.length>0;){const oe=Number.parseInt(D.shift());if(Number.isNaN(oe)||(j=(v==null?void 0:v.id)??null,Y=v,ie=g,B=oe,L=(V=v[oe])==null?void 0:V.id,v=((U=v[oe])==null?void 0:U.children)??void 0,g=g+"."+oe+".children",v===void 0))return null;++M}w&&(L=j,v=Y,g=ie,v=[v[B]])}const z=D=>{let j=D,Y=g;if(M>0){j=Yh.cloneDeep(j);const ie=(oe,pe=0)=>{var ve;pe===0&&(oe.parentId=L),oe.depth+=M,(ve=oe.children)==null||ve.forEach(_e=>{ie(_e,pe+1)})};j.forEach(oe=>{ie(oe,0)})}S!==void 0&&w&&(j=D[0],Y=g+"."+B),f.updateData(j,Y)},O=q.forwardRef((D,j)=>{const Y=D.item.value??{},ie=[];let oe=D.item;for(ie.push(oe.index);oe.parent;)ie.push("children"),oe=oe.parent,ie.push(oe.index);ie.reverse();const ve=g+"."+ie.join(".")+".value";Y._treeItemDepth=D.item.depth,Y._treeItemIndex=D.item.index,Y._treeItemIndex1=D.item.index+1;const _e={};return _e._treeAddCollapseButton=()=>!!D.onCollapse&&!!D.childCount&&te.jsx("button",{onClick:ze=>{var Ue;ze.preventDefault(),(Ue=D.onCollapse)==null||Ue.call(D)},className:rN("dnd-sortable-tree_folder_tree-item-collapse_button",D.collapsed&&"dnd-sortable-tree_folder_tree-item-collapse_button-collapsed")}),A&&(C?D.item.canHaveChildren=M+D.item.depth<A:D.item.canHaveChildren=D.item.depth<A),te.jsx(t8,{...D,"data-htmlbuilder-tree-item-children-count":D.childCount||"0","data-htmlbuilder-tree-item-collapsed":D.collapsed,"data-htmlbuilder-tree-item-depth":D.item.depth,"data-htmlbuilder-tree-item-depth-list":E8(D.item.depth),"data-htmlbuilder-tree-item-index":D.item.index,"data-htmlbuilder-tree-item-index1":D.item.index+1,"data-htmlbuilder-tree-item-is-last":D.isLast,ref:j,children:te.jsx(ua.Provider,{value:{templateData:Y,templatePath:ve,sortableTreeData:_e},children:te.jsx(Ra,{props:x,currentData:Y})})})}),I=Yh.cloneDeep(v),X=n.sortableTreeOptions??{};return te.jsx(Ci,{...n,children:te.jsx(g8,{...X,items:I,onItemsChanged:z,TreeItemComponent:O})})};function E8(n){const l=[];let u=n??0;for(;u>=0;)l.push(u),--u;return l.reverse().join(" ")}const x8=({props:n})=>{const l=q.useContext(Aa),u=q.useContext(ua);let f=!1;if(n.content!==void 0){const p=ca({valueToEvaluate:n.content,globalDataContext:l,templateContext:u});switch(n.format){case"roman-upper":f=zw(p);break;case"roman-lower":f=zw(p,!0);break;case"latin-upper":f=xx(p);break;case"latin-lower":f=xx(p,!0);break}}return te.jsx(Ci,{...n,children:te.jsx(te.Fragment,{children:f!==!1&&f})})};function xx(n,l=!1){if(n<1)return!1;let u=n%26,f=n/26|0,p=u?String.fromCharCode(64+u):(--f,"Z");const v=f?xx(f)+p:p;return l?v.toLowerCase():v}function zw(n,l=!1){if(n<1)return!1;const f=[["M",1e3],["CM",900],["D",500],["CD",400],["C",100],["XC",90],["L",50],["XL",40],["X",10],["IX",9],["V",5],["IV",4],["I",1]].reduce((p,[v,g])=>(p+=v.repeat(Math.floor(n/g)),n=n%g,p),"");return l?f.toLowerCase():f}const A8=({currentData:n,datafield:l,path:u,props:f})=>{const p=q.useContext(Aa),v=q.useContext(ua),g=f.dynamicOptions??void 0;let x;g?x=ca({valueToEvaluate:g,globalDataContext:p,templateContext:v})??[]:x=f.options??[];let S;const A=f.defaultFieldValue??void 0,C=f.dataLocation??void 0;C?S=ca({globalDataContext:p,templateContext:v,valueToEvaluate:C})??A:((v.templateData[l]??void 0)===void 0&&(v.templateData=typeof v.templateData=="object"?v.templateData:{},v.templateData[l]=A),S=v.templateData[l]);let w=x.find(M=>M.value===S);if(!w||!w.label){if(!S)return null;w=S}return te.jsx(Ci,{...f,children:te.jsx(Ra,{currentData:n,datafield:l,path:u,props:w.label})})},T8=({currentData:n,path:l,props:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),[v,g]=q.useState(!0),x=$s(u.attributes),{showBoolPath:S}=u,A=typeof S!="string";x.show=A?v:ca({valueToEvaluate:(u==null?void 0:u.showBoolPath)??!1,globalDataContext:f,templateContext:p});const C=()=>{if(A){g(!1);return}const M=Wo({dataLocation:S,currentPath:p.templatePath,globalDataContext:f,templateContext:p});f.updateData(void 0,M)},w=x.className?x.className.split(" "):[];return w.push("reactive-json"),x.className=w.join(" "),te.jsx(Ci,{...u,children:te.jsxs(Ob,{...x,onHide:C,children:[(u.headerTitle||u.closeButton)&&te.jsx(Ob.Header,{closeButton:u.closeButton,children:te.jsx(Ob.Title,{children:te.jsx(Ra,{currentData:(n==null?void 0:n.headerTitle)??void 0,datafield:"headerTitle",path:(l??"")+".headerTitle",props:u==null?void 0:u.headerTitle})})}),u.body&&te.jsx(Ob.Body,{children:te.jsx(Ra,{currentData:(n==null?void 0:n.body)??void 0,datafield:"body",path:(l??"")+".body",props:u==null?void 0:u.body})})]})})},C8=({props:n,currentData:l})=>te.jsx(te.Fragment,{children:l});var Ky={},tg={},Pb={},Pm={},Qm={},Ax={},Uw;function Hw(){return Uw||(Uw=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Doctype=n.CDATA=n.Tag=n.Style=n.Script=n.Comment=n.Directive=n.Text=n.Root=n.isTag=n.ElementType=void 0;var l;(function(f){f.Root="root",f.Text="text",f.Directive="directive",f.Comment="comment",f.Script="script",f.Style="style",f.Tag="tag",f.CDATA="cdata",f.Doctype="doctype"})(l=n.ElementType||(n.ElementType={}));function u(f){return f.type===l.Tag||f.type===l.Script||f.type===l.Style}n.isTag=u,n.Root=l.Root,n.Text=l.Text,n.Directive=l.Directive,n.Comment=l.Comment,n.Script=l.Script,n.Style=l.Style,n.Tag=l.Tag,n.CDATA=l.CDATA,n.Doctype=l.Doctype}(Ax)),Ax}var hn={},jw;function kw(){if(jw)return hn;jw=1;var n=hn&&hn.__extends||function(){var D=function(j,Y){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,oe){ie.__proto__=oe}||function(ie,oe){for(var pe in oe)Object.prototype.hasOwnProperty.call(oe,pe)&&(ie[pe]=oe[pe])},D(j,Y)};return function(j,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Class extends value "+String(Y)+" is not a constructor or null");D(j,Y);function ie(){this.constructor=j}j.prototype=Y===null?Object.create(Y):(ie.prototype=Y.prototype,new ie)}}(),l=hn&&hn.__assign||function(){return l=Object.assign||function(D){for(var j,Y=1,ie=arguments.length;Y<ie;Y++){j=arguments[Y];for(var oe in j)Object.prototype.hasOwnProperty.call(j,oe)&&(D[oe]=j[oe])}return D},l.apply(this,arguments)};Object.defineProperty(hn,"__esModule",{value:!0}),hn.cloneNode=hn.hasChildren=hn.isDocument=hn.isDirective=hn.isComment=hn.isText=hn.isCDATA=hn.isTag=hn.Element=hn.Document=hn.CDATA=hn.NodeWithChildren=hn.ProcessingInstruction=hn.Comment=hn.Text=hn.DataNode=hn.Node=void 0;var u=Hw(),f=function(){function D(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(D.prototype,"parentNode",{get:function(){return this.parent},set:function(j){this.parent=j},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"previousSibling",{get:function(){return this.prev},set:function(j){this.prev=j},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"nextSibling",{get:function(){return this.next},set:function(j){this.next=j},enumerable:!1,configurable:!0}),D.prototype.cloneNode=function(j){return j===void 0&&(j=!1),V(this,j)},D}();hn.Node=f;var p=function(D){n(j,D);function j(Y){var ie=D.call(this)||this;return ie.data=Y,ie}return Object.defineProperty(j.prototype,"nodeValue",{get:function(){return this.data},set:function(Y){this.data=Y},enumerable:!1,configurable:!0}),j}(f);hn.DataNode=p;var v=function(D){n(j,D);function j(){var Y=D!==null&&D.apply(this,arguments)||this;return Y.type=u.ElementType.Text,Y}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),j}(p);hn.Text=v;var g=function(D){n(j,D);function j(){var Y=D!==null&&D.apply(this,arguments)||this;return Y.type=u.ElementType.Comment,Y}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),j}(p);hn.Comment=g;var x=function(D){n(j,D);function j(Y,ie){var oe=D.call(this,ie)||this;return oe.name=Y,oe.type=u.ElementType.Directive,oe}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),j}(p);hn.ProcessingInstruction=x;var S=function(D){n(j,D);function j(Y){var ie=D.call(this)||this;return ie.children=Y,ie}return Object.defineProperty(j.prototype,"firstChild",{get:function(){var Y;return(Y=this.children[0])!==null&&Y!==void 0?Y:null},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"childNodes",{get:function(){return this.children},set:function(Y){this.children=Y},enumerable:!1,configurable:!0}),j}(f);hn.NodeWithChildren=S;var A=function(D){n(j,D);function j(){var Y=D!==null&&D.apply(this,arguments)||this;return Y.type=u.ElementType.CDATA,Y}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),j}(S);hn.CDATA=A;var C=function(D){n(j,D);function j(){var Y=D!==null&&D.apply(this,arguments)||this;return Y.type=u.ElementType.Root,Y}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),j}(S);hn.Document=C;var w=function(D){n(j,D);function j(Y,ie,oe,pe){oe===void 0&&(oe=[]),pe===void 0&&(pe=Y==="script"?u.ElementType.Script:Y==="style"?u.ElementType.Style:u.ElementType.Tag);var ve=D.call(this,oe)||this;return ve.name=Y,ve.attribs=ie,ve.type=pe,ve}return Object.defineProperty(j.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"tagName",{get:function(){return this.name},set:function(Y){this.name=Y},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"attributes",{get:function(){var Y=this;return Object.keys(this.attribs).map(function(ie){var oe,pe;return{name:ie,value:Y.attribs[ie],namespace:(oe=Y["x-attribsNamespace"])===null||oe===void 0?void 0:oe[ie],prefix:(pe=Y["x-attribsPrefix"])===null||pe===void 0?void 0:pe[ie]}})},enumerable:!1,configurable:!0}),j}(S);hn.Element=w;function M(D){return(0,u.isTag)(D)}hn.isTag=M;function L(D){return D.type===u.ElementType.CDATA}hn.isCDATA=L;function B(D){return D.type===u.ElementType.Text}hn.isText=B;function z(D){return D.type===u.ElementType.Comment}hn.isComment=z;function O(D){return D.type===u.ElementType.Directive}hn.isDirective=O;function I(D){return D.type===u.ElementType.Root}hn.isDocument=I;function X(D){return Object.prototype.hasOwnProperty.call(D,"children")}hn.hasChildren=X;function V(D,j){j===void 0&&(j=!1);var Y;if(B(D))Y=new v(D.data);else if(z(D))Y=new g(D.data);else if(M(D)){var ie=j?U(D.children):[],oe=new w(D.name,l({},D.attribs),ie);ie.forEach(function(ze){return ze.parent=oe}),D.namespace!=null&&(oe.namespace=D.namespace),D["x-attribsNamespace"]&&(oe["x-attribsNamespace"]=l({},D["x-attribsNamespace"])),D["x-attribsPrefix"]&&(oe["x-attribsPrefix"]=l({},D["x-attribsPrefix"])),Y=oe}else if(L(D)){var ie=j?U(D.children):[],pe=new A(ie);ie.forEach(function(Ue){return Ue.parent=pe}),Y=pe}else if(I(D)){var ie=j?U(D.children):[],ve=new C(ie);ie.forEach(function(Ue){return Ue.parent=ve}),D["x-mode"]&&(ve["x-mode"]=D["x-mode"]),Y=ve}else if(O(D)){var _e=new x(D.name,D.data);D["x-name"]!=null&&(_e["x-name"]=D["x-name"],_e["x-publicId"]=D["x-publicId"],_e["x-systemId"]=D["x-systemId"]),Y=_e}else throw new Error("Not implemented yet: ".concat(D.type));return Y.startIndex=D.startIndex,Y.endIndex=D.endIndex,D.sourceCodeLocation!=null&&(Y.sourceCodeLocation=D.sourceCodeLocation),Y}hn.cloneNode=V;function U(D){for(var j=D.map(function(ie){return V(ie,!0)}),Y=1;Y<j.length;Y++)j[Y].prev=j[Y-1],j[Y-1].next=j[Y];return j}return hn}var qw;function Fw(){return qw||(qw=1,function(n){var l=Qm&&Qm.__createBinding||(Object.create?function(x,S,A,C){C===void 0&&(C=A);var w=Object.getOwnPropertyDescriptor(S,A);(!w||("get"in w?!S.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(x,C,w)}:function(x,S,A,C){C===void 0&&(C=A),x[C]=S[A]}),u=Qm&&Qm.__exportStar||function(x,S){for(var A in x)A!=="default"&&!Object.prototype.hasOwnProperty.call(S,A)&&l(S,x,A)};Object.defineProperty(n,"__esModule",{value:!0}),n.DomHandler=void 0;var f=Hw(),p=kw();u(kw(),n);var v={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},g=function(){function x(S,A,C){this.dom=[],this.root=new p.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof A=="function"&&(C=A,A=v),typeof S=="object"&&(A=S,S=void 0),this.callback=S??null,this.options=A??v,this.elementCB=C??null}return x.prototype.onparserinit=function(S){this.parser=S},x.prototype.onreset=function(){this.dom=[],this.root=new p.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},x.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},x.prototype.onerror=function(S){this.handleCallback(S)},x.prototype.onclosetag=function(){this.lastNode=null;var S=this.tagStack.pop();this.options.withEndIndices&&(S.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(S)},x.prototype.onopentag=function(S,A){var C=this.options.xmlMode?f.ElementType.Tag:void 0,w=new p.Element(S,A,void 0,C);this.addNode(w),this.tagStack.push(w)},x.prototype.ontext=function(S){var A=this.lastNode;if(A&&A.type===f.ElementType.Text)A.data+=S,this.options.withEndIndices&&(A.endIndex=this.parser.endIndex);else{var C=new p.Text(S);this.addNode(C),this.lastNode=C}},x.prototype.oncomment=function(S){if(this.lastNode&&this.lastNode.type===f.ElementType.Comment){this.lastNode.data+=S;return}var A=new p.Comment(S);this.addNode(A),this.lastNode=A},x.prototype.oncommentend=function(){this.lastNode=null},x.prototype.oncdatastart=function(){var S=new p.Text(""),A=new p.CDATA([S]);this.addNode(A),S.parent=A,this.lastNode=S},x.prototype.oncdataend=function(){this.lastNode=null},x.prototype.onprocessinginstruction=function(S,A){var C=new p.ProcessingInstruction(S,A);this.addNode(C)},x.prototype.handleCallback=function(S){if(typeof this.callback=="function")this.callback(S,this.dom);else if(S)throw S},x.prototype.addNode=function(S){var A=this.tagStack[this.tagStack.length-1],C=A.children[A.children.length-1];this.options.withStartIndices&&(S.startIndex=this.parser.startIndex),this.options.withEndIndices&&(S.endIndex=this.parser.endIndex),A.children.push(S),C&&(S.prev=C,C.next=S),S.parent=A,this.lastNode=null},x}();n.DomHandler=g,n.default=g}(Qm)),Qm}var Tx={},Yw;function w8(){return Yw||(Yw=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.CARRIAGE_RETURN_PLACEHOLDER_REGEX=n.CARRIAGE_RETURN_PLACEHOLDER=n.CARRIAGE_RETURN_REGEX=n.CARRIAGE_RETURN=n.CASE_SENSITIVE_TAG_NAMES_MAP=n.CASE_SENSITIVE_TAG_NAMES=void 0,n.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],n.CASE_SENSITIVE_TAG_NAMES_MAP=n.CASE_SENSITIVE_TAG_NAMES.reduce(function(l,u){return l[u.toLowerCase()]=u,l},{}),n.CARRIAGE_RETURN="\r",n.CARRIAGE_RETURN_REGEX=new RegExp(n.CARRIAGE_RETURN,"g"),n.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),n.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(n.CARRIAGE_RETURN_PLACEHOLDER,"g")}(Tx)),Tx}var Gw;function Iw(){if(Gw)return Pm;Gw=1,Object.defineProperty(Pm,"__esModule",{value:!0}),Pm.formatAttributes=f,Pm.escapeSpecialCharacters=v,Pm.revertEscapedCharacters=g,Pm.formatDOM=x;var n=Fw(),l=w8();function u(S){return l.CASE_SENSITIVE_TAG_NAMES_MAP[S]}function f(S){for(var A={},C=0,w=S.length;C<w;C++){var M=S[C];A[M.name]=M.value}return A}function p(S){S=S.toLowerCase();var A=u(S);return A||S}function v(S){return S.replace(l.CARRIAGE_RETURN_REGEX,l.CARRIAGE_RETURN_PLACEHOLDER)}function g(S){return S.replace(l.CARRIAGE_RETURN_PLACEHOLDER_REGEX,l.CARRIAGE_RETURN)}function x(S,A,C){A===void 0&&(A=null);for(var w=[],M,L=0,B=S.length;L<B;L++){var z=S[L];switch(z.nodeType){case 1:{var O=p(z.nodeName);M=new n.Element(O,f(z.attributes)),M.children=x(O==="template"?z.content.childNodes:z.childNodes,M);break}case 3:M=new n.Text(g(z.nodeValue));break;case 8:M=new n.Comment(z.nodeValue);break;default:continue}var I=w[L-1]||null;I&&(I.next=M),M.parent=A,M.prev=I,M.next=null,w.push(M)}return C&&(M=new n.ProcessingInstruction(C.substring(0,C.indexOf(" ")).toLowerCase(),C),M.next=w[0]||null,M.parent=A,w.unshift(M),w[1]&&(w[1].prev=w[0])),w}return Pm}var Vw;function O8(){if(Vw)return Pb;Vw=1,Object.defineProperty(Pb,"__esModule",{value:!0}),Pb.default=z;var n=Iw(),l="html",u="head",f="body",p=/<([a-zA-Z]+[0-9]?)/,v=/<head[^]*>/i,g=/<body[^]*>/i,x=function(O,I){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},S=function(O,I){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},A=typeof window=="object"&&window.DOMParser;if(typeof A=="function"){var C=new A,w="text/html";S=function(O,I){return I&&(O="<".concat(I,">").concat(O,"</").concat(I,">")),C.parseFromString(O,w)},x=S}if(typeof document=="object"&&document.implementation){var M=document.implementation.createHTMLDocument();x=function(O,I){if(I){var X=M.documentElement.querySelector(I);return X&&(X.innerHTML=O),M}return M.documentElement.innerHTML=O,M}}var L=typeof document=="object"&&document.createElement("template"),B;L&&L.content&&(B=function(O){return L.innerHTML=O,L.content.childNodes});function z(O){var I,X;O=(0,n.escapeSpecialCharacters)(O);var V=O.match(p),U=V&&V[1]?V[1].toLowerCase():"";switch(U){case l:{var D=S(O);if(!v.test(O)){var j=D.querySelector(u);(I=j==null?void 0:j.parentNode)===null||I===void 0||I.removeChild(j)}if(!g.test(O)){var j=D.querySelector(f);(X=j==null?void 0:j.parentNode)===null||X===void 0||X.removeChild(j)}return D.querySelectorAll(l)}case u:case f:{var Y=x(O).querySelectorAll(U);return g.test(O)&&v.test(O)?Y[0].parentNode.childNodes:Y}default:{if(B)return B(O);var j=x(O,f).querySelector(f);return j.childNodes}}}return Pb}var Xw;function D8(){if(Xw)return tg;Xw=1;var n=tg&&tg.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(tg,"__esModule",{value:!0}),tg.default=p;var l=n(O8()),u=Iw(),f=/<(![a-zA-Z\s]+)>/;function p(v){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];var g=v.match(f),x=g?g[1]:void 0;return(0,u.formatDOM)((0,l.default)(v),null,x)}return tg}var Qb={},ts={},Jy={},$w;function _8(){if($w)return Jy;$w=1;var n=0;Jy.SAME=n;var l=1;return Jy.CAMELCASE=l,Jy.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Jy}var Pw;function R8(){if(Pw)return ts;Pw=1;const n=0,l=1,u=2,f=3,p=4,v=5,g=6;function x(D){return A.hasOwnProperty(D)?A[D]:null}function S(D,j,Y,ie,oe,pe,ve){this.acceptsBooleans=j===u||j===f||j===p,this.attributeName=ie,this.attributeNamespace=oe,this.mustUseProperty=Y,this.propertyName=D,this.type=j,this.sanitizeURL=pe,this.removeEmptyString=ve}const A={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(D=>{A[D]=new S(D,n,!1,D,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([D,j])=>{A[D]=new S(D,l,!1,j,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(D=>{A[D]=new S(D,u,!1,D.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(D=>{A[D]=new S(D,u,!1,D,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(D=>{A[D]=new S(D,f,!1,D.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(D=>{A[D]=new S(D,f,!0,D,null,!1,!1)}),["capture","download"].forEach(D=>{A[D]=new S(D,p,!1,D,null,!1,!1)}),["cols","rows","size","span"].forEach(D=>{A[D]=new S(D,g,!1,D,null,!1,!1)}),["rowSpan","start"].forEach(D=>{A[D]=new S(D,v,!1,D.toLowerCase(),null,!1,!1)});const w=/[\-\:]([a-z])/g,M=D=>D[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(D=>{const j=D.replace(w,M);A[j]=new S(j,l,!1,D,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(D=>{const j=D.replace(w,M);A[j]=new S(j,l,!1,D,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(D=>{const j=D.replace(w,M);A[j]=new S(j,l,!1,D,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(D=>{A[D]=new S(D,l,!1,D.toLowerCase(),null,!1,!1)});const L="xlinkHref";A[L]=new S("xlinkHref",l,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(D=>{A[D]=new S(D,l,!1,D.toLowerCase(),null,!0,!0)});const{CAMELCASE:B,SAME:z,possibleStandardNames:O}=_8(),X=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",V=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+X+"]*$")),U=Object.keys(O).reduce((D,j)=>{const Y=O[j];return Y===z?D[j]=j:Y===B?D[j.toLowerCase()]=j:D[j]=Y,D},{});return ts.BOOLEAN=f,ts.BOOLEANISH_STRING=u,ts.NUMERIC=v,ts.OVERLOADED_BOOLEAN=p,ts.POSITIVE_NUMERIC=g,ts.RESERVED=n,ts.STRING=l,ts.getPropertyInfo=x,ts.isCustomAttribute=V,ts.possibleStandardNames=U,ts}var Wy={},ng={},Cx,Qw;function M8(){if(Qw)return Cx;Qw=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,u=/^\s*/,f=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,p=/^:\s*/,v=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,g=/^[;\s]*/,x=/^\s+|\s+$/g,S=`
100
- `,A="/",C="*",w="",M="comment",L="declaration";Cx=function(z,O){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];O=O||{};var I=1,X=1;function V(ze){var Ue=ze.match(l);Ue&&(I+=Ue.length);var Qe=ze.lastIndexOf(S);X=~Qe?ze.length-Qe:X+ze.length}function U(){var ze={line:I,column:X};return function(Ue){return Ue.position=new D(ze),ie(),Ue}}function D(ze){this.start=ze,this.end={line:I,column:X},this.source=O.source}D.prototype.content=z;function j(ze){var Ue=new Error(O.source+":"+I+":"+X+": "+ze);if(Ue.reason=ze,Ue.filename=O.source,Ue.line=I,Ue.column=X,Ue.source=z,!O.silent)throw Ue}function Y(ze){var Ue=ze.exec(z);if(Ue){var Qe=Ue[0];return V(Qe),z=z.slice(Qe.length),Ue}}function ie(){Y(u)}function oe(ze){var Ue;for(ze=ze||[];Ue=pe();)Ue!==!1&&ze.push(Ue);return ze}function pe(){var ze=U();if(!(A!=z.charAt(0)||C!=z.charAt(1))){for(var Ue=2;w!=z.charAt(Ue)&&(C!=z.charAt(Ue)||A!=z.charAt(Ue+1));)++Ue;if(Ue+=2,w===z.charAt(Ue-1))return j("End of comment missing");var Qe=z.slice(2,Ue-2);return X+=2,V(Qe),z=z.slice(Ue),X+=2,ze({type:M,comment:Qe})}}function ve(){var ze=U(),Ue=Y(f);if(Ue){if(pe(),!Y(p))return j("property missing ':'");var Qe=Y(v),ee=ze({type:L,property:B(Ue[0].replace(n,w)),value:Qe?B(Qe[0].replace(n,w)):w});return Y(g),ee}}function _e(){var ze=[];oe(ze);for(var Ue;Ue=ve();)Ue!==!1&&(ze.push(Ue),oe(ze));return ze}return ie(),_e()};function B(z){return z?z.replace(x,w):w}return Cx}var Zw;function N8(){if(Zw)return ng;Zw=1;var n=ng&&ng.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(ng,"__esModule",{value:!0}),ng.default=u;var l=n(M8());function u(f,p){var v=null;if(!f||typeof f!="string")return v;var g=(0,l.default)(f),x=typeof p=="function";return g.forEach(function(S){if(S.type==="declaration"){var A=S.property,C=S.value;x?p(A,C,S):C&&(v=v||{},v[A]=C)}}),v}return ng}var e1={},Kw;function B8(){if(Kw)return e1;Kw=1,Object.defineProperty(e1,"__esModule",{value:!0}),e1.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,u=/^[^-]+$/,f=/^-(webkit|moz|ms|o|khtml)-/,p=/^-(ms)-/,v=function(A){return!A||u.test(A)||n.test(A)},g=function(A,C){return C.toUpperCase()},x=function(A,C){return"".concat(C,"-")},S=function(A,C){return C===void 0&&(C={}),v(A)?A:(A=A.toLowerCase(),C.reactCompat?A=A.replace(p,x):A=A.replace(f,x),A.replace(l,g))};return e1.camelCase=S,e1}var t1,Jw;function L8(){if(Jw)return t1;Jw=1;var n=t1&&t1.__importDefault||function(p){return p&&p.__esModule?p:{default:p}},l=n(N8()),u=B8();function f(p,v){var g={};return!p||typeof p!="string"||(0,l.default)(p,function(x,S){x&&S&&(g[(0,u.camelCase)(x,v)]=S)}),g}return f.default=f,t1=f,t1}var Ww;function eO(){return Ww||(Ww=1,function(n){var l=Wy&&Wy.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.returnFirstArg=n.canTextBeChildOfNode=n.ELEMENTS_WITH_NO_TEXT_CHILDREN=n.PRESERVE_CUSTOM_ATTRIBUTES=void 0,n.isCustomComponent=v,n.setStyleProp=x;var u=q,f=l(L8()),p=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function v(C,w){return C.includes("-")?!p.has(C):!!(w&&typeof w.is=="string")}var g={reactCompat:!0};function x(C,w){if(typeof C=="string"){if(!C.trim()){w.style={};return}try{w.style=(0,f.default)(C,g)}catch{w.style={}}}}n.PRESERVE_CUSTOM_ATTRIBUTES=Number(u.version.split(".")[0])>=16,n.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var S=function(C){return!n.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(C.name)};n.canTextBeChildOfNode=S;var A=function(C){return C};n.returnFirstArg=A}(Wy)),Wy}var tO;function nO(){if(tO)return Qb;tO=1,Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=v;var n=R8(),l=eO(),u=["checked","value"],f=["input","select","textarea"],p={reset:!0,submit:!0};function v(x,S){x===void 0&&(x={});var A={},C=!!(x.type&&p[x.type]);for(var w in x){var M=x[w];if((0,n.isCustomAttribute)(w)){A[w]=M;continue}var L=w.toLowerCase(),B=g(L);if(B){var z=(0,n.getPropertyInfo)(B);switch(u.includes(B)&&f.includes(S)&&!C&&(B=g("default"+L)),A[B]=M,z&&z.type){case n.BOOLEAN:A[B]=!0;break;case n.OVERLOADED_BOOLEAN:M===""&&(A[B]=!0);break}continue}l.PRESERVE_CUSTOM_ATTRIBUTES&&(A[w]=M)}return(0,l.setStyleProp)(x.style,A),A}function g(x){return n.possibleStandardNames[x]}return Qb}var ag={},aO;function z8(){if(aO)return ag;aO=1;var n=ag&&ag.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ag,"__esModule",{value:!0}),ag.default=v;var l=q,u=n(nO()),f=eO(),p={cloneElement:l.cloneElement,createElement:l.createElement,isValidElement:l.isValidElement};function v(x,S){S===void 0&&(S={});for(var A=[],C=typeof S.replace=="function",w=S.transform||f.returnFirstArg,M=S.library||p,L=M.cloneElement,B=M.createElement,z=M.isValidElement,O=x.length,I=0;I<O;I++){var X=x[I];if(C){var V=S.replace(X,I);if(z(V)){O>1&&(V=L(V,{key:V.key||I})),A.push(w(V,X,I));continue}}if(X.type==="text"){var U=!X.data.trim().length;if(U&&X.parent&&!(0,f.canTextBeChildOfNode)(X.parent)||S.trim&&U)continue;A.push(w(X.data,X,I));continue}var D=X,j={};g(D)?((0,f.setStyleProp)(D.attribs.style,D.attribs),j=D.attribs):D.attribs&&(j=(0,u.default)(D.attribs,D.name));var Y=void 0;switch(X.type){case"script":case"style":X.children[0]&&(j.dangerouslySetInnerHTML={__html:X.children[0].data});break;case"tag":X.name==="textarea"&&X.children[0]?j.defaultValue=X.children[0].data:X.children&&X.children.length&&(Y=v(X.children,S));break;default:continue}O>1&&(j.key=I),A.push(w(B(X.name,j,Y),X,I))}return A.length===1?A[0]:A}function g(x){return f.PRESERVE_CUSTOM_ATTRIBUTES&&x.type==="tag"&&(0,f.isCustomComponent)(x.name,x.attribs)}return ag}var rO;function U8(){return rO||(rO=1,function(n){var l=Ky&&Ky.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(n,"__esModule",{value:!0}),n.htmlToDOM=n.domToReact=n.attributesToProps=n.Text=n.ProcessingInstruction=n.Element=n.Comment=void 0,n.default=x;var u=l(D8());n.htmlToDOM=u.default;var f=l(nO());n.attributesToProps=f.default;var p=l(z8());n.domToReact=p.default;var v=Fw();Object.defineProperty(n,"Comment",{enumerable:!0,get:function(){return v.Comment}}),Object.defineProperty(n,"Element",{enumerable:!0,get:function(){return v.Element}}),Object.defineProperty(n,"ProcessingInstruction",{enumerable:!0,get:function(){return v.ProcessingInstruction}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return v.Text}});var g={lowerCaseAttributeNames:!1};function x(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");return S?(0,p.default)((0,u.default)(S,(A==null?void 0:A.htmlparser2)||g),A):[]}}(Ky)),Ky}var H8=U8();const iO=my(H8),j8=iO.default||iO,k8=["abbr","acronym","b","blockquote","br","caption","code","div","em","h1","h2","h3","h4","h5","h6","i","li","ol","p","span","sup","strong","table","tbody","td","tfoot","th","thead","tr","ul"],q8=({props:n})=>{const l=q.useContext(ua),u=q.useContext(Aa),f=ca({valueToEvaluate:n.content,templateContext:l,globalDataContext:u}),v=[...Array.isArray(n.htmlTagAllowList)?n.htmlTagAllowList:k8,...n.additionalAllowedTags??[]];return te.jsx(Ci,{...n,children:j8(f,{replace(g){if(g.type==="tag"&&v.indexOf(g.name)<0)return te.jsx(te.Fragment,{})}})})},F8=({props:n})=>{var u,f;const l=q.useContext(ua);return te.jsx(Ci,{...n,children:(f=(u=l.sortableTreeData)._treeAddCollapseButton)==null?void 0:f.call(u)})},Y8=({currentData:n,path:l,props:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=$s(u.attributes);return te.jsx(Ci,{...u,children:te.jsx(jC,{...v,children:Array.isArray(u.tabs)&&u.tabs.map((g,x)=>{var A;const S=$m({attrs:g.attributes,globalDataContext:f,templateContext:p,options:{normalizeBeforeEvaluation:!0}});return q.createElement(U6,{...S,key:x},te.jsx(Ra,{currentData:((A=n==null?void 0:n[x])==null?void 0:A.content)??void 0,datafield:"content",path:(l??"")+"."+x+".content",props:g==null?void 0:g.content}))})})})};function G8({props:n,currentData:l,path:u,bsComponent:f}){var g;const p=$s(n.attributes);if((g=n.attributes)!=null&&g["data-visually-hidden"])debugger;if(!f)return null;const v=f;return te.jsx(Ci,{...n,children:te.jsx(v,{...p,children:n.content&&te.jsx(Ra,{currentData:l.content??void 0,datafield:"content",path:u+".content",props:n.content})})})}const wx=(n,...l)=>l.length?wx(n=n.replace(wx.token||"$token",l.shift()),...l):n,I8=({templateContexts:n},l,...u)=>{const f=u.map(p=>ca({globalDataContext:n.globalDataContext,templateContext:n.templateContext,valueToEvaluate:p}));return wx(l,...f)},V8=(n,l)=>{if(typeof l=="string")return l;if(Array.isArray(l)){const[u,...f]=l;return I8(n,u,...f)}return""},X8=({props:n})=>{const l=q.useContext(Aa),u=q.useContext(ua),{context:f="global",jsonPathPattern:p}=n,v=f==="template"?ua:Aa,g=q.useContext(v);if(!p)return null;const x=V8({templateContexts:{globalDataContext:l,templateContext:u}},p),S=f==="root"?g.getRootContext().templateData:g.templateData;return qC.query(S,x).length},$8=n=>{var x,S;const l=q.useContext(Aa),u=q.useContext(ua),f={globalDataContext:l,templateContext:u},{contextToFilter:p="global",filters:v=[]}=n.props,g=A=>{if(!A)return!0;for(const C of v){const w=(C==null?void 0:C.subjectsWithProperty)??void 0;if(!w||!A.hasOwnProperty(w))continue;if(!Zv(C,f,new Map([["whenFilterableData",({condition:L})=>{const z=L.whenFilterableData.split(".");let O=A;for(const I of z){const X=parseInt(I);if(O=O[isNaN(X)?I:X],O===void 0)return}return O}]])))return!1}return!0};switch(p){case"template":return u.templateData=Zb(u.templateData,g),u.templatePath=n.path,te.jsx(ua.Provider,{value:u,children:te.jsx(Ra,{props:n.props.content,path:n.path+".content",datafield:"content",currentData:((x=n.currentData)==null?void 0:x.content)??void 0})});case"global":default:return l.templateData=Zb(l.templateData,g),te.jsx(Aa.Provider,{value:l,children:te.jsx(Ra,{props:n.props.content,path:n.path+".content",datafield:"content",currentData:((S=n.currentData)==null?void 0:S.content)??void 0})})}},Zb=(n,l)=>{if(Array.isArray(n)){const u={};return n.forEach((f,p)=>{l(f)&&(u[p]=Zb(f,l))}),u}else if(typeof n=="object"&&n!==null){const u={};for(const f in n)if(n.hasOwnProperty(f)){if(!l(n[f]))continue;u[f]=Zb(n[f],l)}return u}else return n},P8=({props:n,currentData:l,path:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=Array.isArray(n.delayedActions)?n.delayedActions:[],g={globalDataContext:f,templateContext:p};return q.useEffect(()=>{if(!n.interval)return;const x=setInterval(()=>{const S=Q8(v,g);for(let A=0;A<S.length;++A){const C=S[A];if(!C)continue;const w=C.what&&(jv[C.what]??null);w&&w({args:C,globalDataContext:f,templateContext:p})}n.once&&clearInterval(x)},n.interval);return()=>clearInterval(x)},[f,p]),te.jsx(Ci,{...n,children:n.content&&te.jsx(Ra,{props:n.content,currentData:(l==null?void 0:l.content)??void 0,datafield:"content",path:u+".content"})})},Q8=(n,l)=>{const u=[];if(!Array.isArray(n))return u;for(const[,f]of n.entries()){const p=(f==null?void 0:f.what)??void 0;!p||!(jv[p]??void 0)||Zv(f,l)&&u.push(f)}return u},lO=q.createContext({pagination:{}}),Z8=()=>{const{pagination:n}=q.useContext(lO);return n.PageControls?te.jsx(n.PageControls,{}):null},K8=({props:n,currentData:l,path:u})=>te.jsx(Ci,{...n,children:n.content&&te.jsx(Ra,{props:n.content,currentData:(l==null?void 0:l.content)??void 0,datafield:"content",path:u+".content"})}),J8=({dataToPaginate:n=[],forcePaginationDisplay:l=!1,maxPageButtonsCount:u=5,pageMaxItemCount:f=10})=>{const[p,v]=q.useState(0),g=Math.floor(u/2),x=p*f,S=x+f,A=M=>Math.ceil(M.length/f);return{firstShownItemIndex:x,getPageCountForContent:A,maxShownItemIndexExcluded:S,PageControls:()=>{const M=A(n);return!l&&M<=1?null:te.jsxs($h,{children:[te.jsx($h.First,{disabled:p<=0,onClick:()=>{v(0)}}),te.jsx($h.Prev,{disabled:p<=0,onClick:()=>{v(p-1)}}),Math.min(p-g,M-u)>0?te.jsx($h.Ellipsis,{disabled:!0}):null,(()=>{const L=[];let B=Math.min(Math.max(0,M-u),Math.max(0,p-g)),z=u;const O=(I,X)=>{L.push(te.jsx($h.Item,{active:p===I,onClick:()=>{v(I)},children:I+1},u-X))};for(;z&&(O(B,z),++B,--z,!(B>=M)););return L})(),M>Math.max(g,p)+Math.ceil(u/2)?te.jsx($h.Ellipsis,{disabled:!0}):null,te.jsx($h.Next,{disabled:p+1>=M,onClick:()=>{v(p+1)}}),te.jsx($h.Last,{disabled:p+1>=M,onClick:()=>{v(M-1)}})]})},pageMaxItemCount:f,sliceVisibleContent:M=>Array.isArray(M)?M.slice(x,S):M}},W8=({props:n,currentData:l,path:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=(n==null?void 0:n.cardinality)??-1,g=(n==null?void 0:n.options)??[],x=(n==null?void 0:n.singleOption)??void 0,S=!!x,A=(n==null?void 0:n.content)??null,C=A&&ca({globalDataContext:f,templateContext:p,valueToEvaluate:A}),M=Object.entries(typeof C=="object"?C:l).map(([O,I])=>{const X=O;if(v>=1&&X>=v||!I||typeof I!="object")return null;let V,U,D;if(S)U=I,D=x;else{if(V=Object.keys(I)[0]??void 0,V===void 0)return null;U=Object.values(I)[0]??void 0,D=g[V]??void 0}if(D===void 0)return null;let j=(nx(A)&&Wo({dataLocation:A,currentPath:p.templatePath,globalDataContext:f,templateContext:p})||u)+"."+X;return S||(j+="."+V),te.jsx(Ra,{currentData:U,datafield:X,path:j,props:D},X)}),L=J8({dataToPaginate:M,...(n==null?void 0:n.paginationProps)??{}}),B=n!=null&&n.paginated?M.slice(L.firstShownItemIndex,L.maxShownItemIndexExcluded):M,z=te.jsxs(te.Fragment,{children:[(n==null?void 0:n.before)&&te.jsx(Ra,{currentData:(l==null?void 0:l.before)??void 0,path:u+".before",datafield:"before",props:n==null?void 0:n.before}),B,(n==null?void 0:n.after)&&te.jsx(Ra,{currentData:(l==null?void 0:l.after)??void 0,path:u+".after",datafield:"after",props:n==null?void 0:n.after})]});return te.jsx(Ci,{...n,children:n!=null&&n.paginated?te.jsx(lO.Provider,{value:{pagination:L},children:z}):z})};function Ra({props:n,currentData:l,datafield:u,path:f}){const p=q.useContext(Aa),v=q.useContext(ua),g=p.plugins??[{element:{Azerty:Rb}}],x={AccordionItem:aN,CheckBoxField:Q6,Count:X8,DateField:W6,DataFilter:$8,DelayedActions:P8,FolderSortableTree:S8,FormatNumeral:x8,Html:Rb,LabelFromValue:A8,Modal:T8,NumberField:eN,PageControls:Z8,Paragraph:C8,Phantom:K8,PreformattedMarkup:q8,SelectField:tN,SortableTreeItemCollapseButton:F8,Switch:W8,Tabs:Y8,TextAreaField:FC,TextField:nN,...g==null?void 0:g.element,Ijiji:FC},S={BsAccordion:vb,BsAlert:uM,BsBadge:M2,BsButton:N2},{element:A}=p;if(l===void 0&&(l=""),n!=null&&n.type){let C,w;const M=[{registryId:"module",components:x},{registryId:"bootstrap",components:S}];for(;M.length;){const{registryId:L,components:B}=M.shift();if(w=B[n.type]??void 0,w!==void 0){C=L;break}}return w===void 0&&(w=Rb,C="module"),C==="bootstrap"?te.jsx(G8,{bsComponent:w,path:f,props:n,currentData:l,datafield:u}):(Rb===w&&(n.tag=n.tag??n.type),te.jsx(w,{path:f,props:n,currentData:l,datafield:u}))}if(n!=null&&n.load){let C;const w=(n==null?void 0:n.customDataLocation)??void 0;if(w)debugger;const M=w?ca({globalDataContext:p,templateContext:v,valueToEvaluate:w}):l,L=w?Wo({dataLocation:w,currentPath:f,globalDataContext:p,templateContext:v}):f;typeof n.load=="function"?C=n.load(M):C=A[n.load];const{load:B,customDataLocation:z,...O}=n;return C={...C,...O},n.keepTemplateContext?te.jsx(Ra,{currentData:M,datafield:u,path:L,props:C}):te.jsx(ua.Provider,{value:{templateData:M,templatePath:L},children:te.jsx(Ra,{currentData:M,datafield:u,path:L,props:C})})}return Array.isArray(n)?n.map((C,w)=>te.jsx(Ra,{currentData:l[w]??void 0,datafield:w,path:f+"."+w,props:C??void 0},f+"."+w)):typeof n=="object"?Object.entries(n).map(([C,w])=>te.jsx(Ra,{currentData:l[C]??void 0,datafield:C??void 0,path:f+"."+C,props:w},f+"."+C)):te.jsx(P6,{valueToEvaluate:l||(n??null)})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function uO(n){return typeof n>"u"||n===null}function e9(n){return typeof n=="object"&&n!==null}function t9(n){return Array.isArray(n)?n:uO(n)?[]:[n]}function n9(n,l){var u,f,p,v;if(l)for(v=Object.keys(l),u=0,f=v.length;u<f;u+=1)p=v[u],n[p]=l[p];return n}function a9(n,l){var u="",f;for(f=0;f<l;f+=1)u+=n;return u}function r9(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}var i9=uO,l9=e9,u9=t9,o9=a9,s9=r9,c9=n9,Vl={isNothing:i9,isObject:l9,toArray:u9,repeat:o9,isNegativeZero:s9,extend:c9};function oO(n,l){var u="",f=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(u+='in "'+n.mark.name+'" '),u+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!l&&n.mark.snippet&&(u+=`
100
+ `,A="/",C="*",w="",M="comment",L="declaration";Cx=function(z,O){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];O=O||{};var I=1,X=1;function V(ze){var Ue=ze.match(l);Ue&&(I+=Ue.length);var Qe=ze.lastIndexOf(S);X=~Qe?ze.length-Qe:X+ze.length}function U(){var ze={line:I,column:X};return function(Ue){return Ue.position=new D(ze),ie(),Ue}}function D(ze){this.start=ze,this.end={line:I,column:X},this.source=O.source}D.prototype.content=z;function j(ze){var Ue=new Error(O.source+":"+I+":"+X+": "+ze);if(Ue.reason=ze,Ue.filename=O.source,Ue.line=I,Ue.column=X,Ue.source=z,!O.silent)throw Ue}function Y(ze){var Ue=ze.exec(z);if(Ue){var Qe=Ue[0];return V(Qe),z=z.slice(Qe.length),Ue}}function ie(){Y(u)}function oe(ze){var Ue;for(ze=ze||[];Ue=pe();)Ue!==!1&&ze.push(Ue);return ze}function pe(){var ze=U();if(!(A!=z.charAt(0)||C!=z.charAt(1))){for(var Ue=2;w!=z.charAt(Ue)&&(C!=z.charAt(Ue)||A!=z.charAt(Ue+1));)++Ue;if(Ue+=2,w===z.charAt(Ue-1))return j("End of comment missing");var Qe=z.slice(2,Ue-2);return X+=2,V(Qe),z=z.slice(Ue),X+=2,ze({type:M,comment:Qe})}}function ve(){var ze=U(),Ue=Y(f);if(Ue){if(pe(),!Y(p))return j("property missing ':'");var Qe=Y(v),ee=ze({type:L,property:B(Ue[0].replace(n,w)),value:Qe?B(Qe[0].replace(n,w)):w});return Y(g),ee}}function _e(){var ze=[];oe(ze);for(var Ue;Ue=ve();)Ue!==!1&&(ze.push(Ue),oe(ze));return ze}return ie(),_e()};function B(z){return z?z.replace(x,w):w}return Cx}var Zw;function N8(){if(Zw)return ng;Zw=1;var n=ng&&ng.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(ng,"__esModule",{value:!0}),ng.default=u;var l=n(M8());function u(f,p){var v=null;if(!f||typeof f!="string")return v;var g=(0,l.default)(f),x=typeof p=="function";return g.forEach(function(S){if(S.type==="declaration"){var A=S.property,C=S.value;x?p(A,C,S):C&&(v=v||{},v[A]=C)}}),v}return ng}var e1={},Kw;function B8(){if(Kw)return e1;Kw=1,Object.defineProperty(e1,"__esModule",{value:!0}),e1.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,u=/^[^-]+$/,f=/^-(webkit|moz|ms|o|khtml)-/,p=/^-(ms)-/,v=function(A){return!A||u.test(A)||n.test(A)},g=function(A,C){return C.toUpperCase()},x=function(A,C){return"".concat(C,"-")},S=function(A,C){return C===void 0&&(C={}),v(A)?A:(A=A.toLowerCase(),C.reactCompat?A=A.replace(p,x):A=A.replace(f,x),A.replace(l,g))};return e1.camelCase=S,e1}var t1,Jw;function L8(){if(Jw)return t1;Jw=1;var n=t1&&t1.__importDefault||function(p){return p&&p.__esModule?p:{default:p}},l=n(N8()),u=B8();function f(p,v){var g={};return!p||typeof p!="string"||(0,l.default)(p,function(x,S){x&&S&&(g[(0,u.camelCase)(x,v)]=S)}),g}return f.default=f,t1=f,t1}var Ww;function eO(){return Ww||(Ww=1,function(n){var l=Wy&&Wy.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.returnFirstArg=n.canTextBeChildOfNode=n.ELEMENTS_WITH_NO_TEXT_CHILDREN=n.PRESERVE_CUSTOM_ATTRIBUTES=void 0,n.isCustomComponent=v,n.setStyleProp=x;var u=q,f=l(L8()),p=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function v(C,w){return C.includes("-")?!p.has(C):!!(w&&typeof w.is=="string")}var g={reactCompat:!0};function x(C,w){if(typeof C=="string"){if(!C.trim()){w.style={};return}try{w.style=(0,f.default)(C,g)}catch{w.style={}}}}n.PRESERVE_CUSTOM_ATTRIBUTES=Number(u.version.split(".")[0])>=16,n.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var S=function(C){return!n.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(C.name)};n.canTextBeChildOfNode=S;var A=function(C){return C};n.returnFirstArg=A}(Wy)),Wy}var tO;function nO(){if(tO)return Qb;tO=1,Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=v;var n=R8(),l=eO(),u=["checked","value"],f=["input","select","textarea"],p={reset:!0,submit:!0};function v(x,S){x===void 0&&(x={});var A={},C=!!(x.type&&p[x.type]);for(var w in x){var M=x[w];if((0,n.isCustomAttribute)(w)){A[w]=M;continue}var L=w.toLowerCase(),B=g(L);if(B){var z=(0,n.getPropertyInfo)(B);switch(u.includes(B)&&f.includes(S)&&!C&&(B=g("default"+L)),A[B]=M,z&&z.type){case n.BOOLEAN:A[B]=!0;break;case n.OVERLOADED_BOOLEAN:M===""&&(A[B]=!0);break}continue}l.PRESERVE_CUSTOM_ATTRIBUTES&&(A[w]=M)}return(0,l.setStyleProp)(x.style,A),A}function g(x){return n.possibleStandardNames[x]}return Qb}var ag={},aO;function z8(){if(aO)return ag;aO=1;var n=ag&&ag.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ag,"__esModule",{value:!0}),ag.default=v;var l=q,u=n(nO()),f=eO(),p={cloneElement:l.cloneElement,createElement:l.createElement,isValidElement:l.isValidElement};function v(x,S){S===void 0&&(S={});for(var A=[],C=typeof S.replace=="function",w=S.transform||f.returnFirstArg,M=S.library||p,L=M.cloneElement,B=M.createElement,z=M.isValidElement,O=x.length,I=0;I<O;I++){var X=x[I];if(C){var V=S.replace(X,I);if(z(V)){O>1&&(V=L(V,{key:V.key||I})),A.push(w(V,X,I));continue}}if(X.type==="text"){var U=!X.data.trim().length;if(U&&X.parent&&!(0,f.canTextBeChildOfNode)(X.parent)||S.trim&&U)continue;A.push(w(X.data,X,I));continue}var D=X,j={};g(D)?((0,f.setStyleProp)(D.attribs.style,D.attribs),j=D.attribs):D.attribs&&(j=(0,u.default)(D.attribs,D.name));var Y=void 0;switch(X.type){case"script":case"style":X.children[0]&&(j.dangerouslySetInnerHTML={__html:X.children[0].data});break;case"tag":X.name==="textarea"&&X.children[0]?j.defaultValue=X.children[0].data:X.children&&X.children.length&&(Y=v(X.children,S));break;default:continue}O>1&&(j.key=I),A.push(w(B(X.name,j,Y),X,I))}return A.length===1?A[0]:A}function g(x){return f.PRESERVE_CUSTOM_ATTRIBUTES&&x.type==="tag"&&(0,f.isCustomComponent)(x.name,x.attribs)}return ag}var rO;function U8(){return rO||(rO=1,function(n){var l=Ky&&Ky.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(n,"__esModule",{value:!0}),n.htmlToDOM=n.domToReact=n.attributesToProps=n.Text=n.ProcessingInstruction=n.Element=n.Comment=void 0,n.default=x;var u=l(D8());n.htmlToDOM=u.default;var f=l(nO());n.attributesToProps=f.default;var p=l(z8());n.domToReact=p.default;var v=Fw();Object.defineProperty(n,"Comment",{enumerable:!0,get:function(){return v.Comment}}),Object.defineProperty(n,"Element",{enumerable:!0,get:function(){return v.Element}}),Object.defineProperty(n,"ProcessingInstruction",{enumerable:!0,get:function(){return v.ProcessingInstruction}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return v.Text}});var g={lowerCaseAttributeNames:!1};function x(S,A){if(typeof S!="string")throw new TypeError("First argument must be a string");return S?(0,p.default)((0,u.default)(S,(A==null?void 0:A.htmlparser2)||g),A):[]}}(Ky)),Ky}var H8=U8();const iO=my(H8),j8=iO.default||iO,k8=["abbr","acronym","b","blockquote","br","caption","code","div","em","h1","h2","h3","h4","h5","h6","i","li","ol","p","span","sup","strong","table","tbody","td","tfoot","th","thead","tr","ul"],q8=({props:n})=>{const l=q.useContext(ua),u=q.useContext(Aa),f=ca({valueToEvaluate:n.content,templateContext:l,globalDataContext:u}),v=[...Array.isArray(n.htmlTagAllowList)?n.htmlTagAllowList:k8,...n.additionalAllowedTags??[]];return te.jsx(Ci,{...n,children:j8(f,{replace(g){if(g.type==="tag"&&v.indexOf(g.name)<0)return te.jsx(te.Fragment,{})}})})},F8=({props:n})=>{var u,f;const l=q.useContext(ua);return te.jsx(Ci,{...n,children:(f=(u=l.sortableTreeData)._treeAddCollapseButton)==null?void 0:f.call(u)})},Y8=({currentData:n,path:l,props:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=$s(u.attributes);return te.jsx(Ci,{...u,children:te.jsx(jC,{...v,children:Array.isArray(u.tabs)&&u.tabs.map((g,x)=>{var A;const S=$m({attrs:g.attributes,globalDataContext:f,templateContext:p,options:{normalizeBeforeEvaluation:!0}});return q.createElement(U6,{...S,key:x},te.jsx(Ra,{currentData:((A=n==null?void 0:n[x])==null?void 0:A.content)??void 0,datafield:"content",path:(l??"")+"."+x+".content",props:g==null?void 0:g.content}))})})})};function G8({props:n,currentData:l,path:u,bsComponent:f}){var g;const p=$s(n.attributes);if((g=n.attributes)!=null&&g["data-visually-hidden"])debugger;if(!f)return null;const v=f;return te.jsx(Ci,{...n,children:te.jsx(v,{...p,children:n.content&&te.jsx(Ra,{currentData:l.content??void 0,datafield:"content",path:u+".content",props:n.content})})})}const wx=(n,...l)=>l.length?wx(n=n.replace(wx.token||"$token",l.shift()),...l):n,I8=({templateContexts:n},l,...u)=>{const f=u.map(p=>ca({globalDataContext:n.globalDataContext,templateContext:n.templateContext,valueToEvaluate:p}));return wx(l,...f)},V8=(n,l)=>{if(typeof l=="string")return l;if(Array.isArray(l)){const[u,...f]=l;return I8(n,u,...f)}return""},X8=({props:n})=>{const l=q.useContext(Aa),u=q.useContext(ua),{context:f="global",jsonPathPattern:p}=n,v=f==="template"?ua:Aa,g=q.useContext(v);if(!p)return null;const x=V8({templateContexts:{globalDataContext:l,templateContext:u}},p),S=f==="root"?g.getRootContext().templateData:g.templateData;return qC.query(S,x).length},$8=n=>{var x,S;const l=q.useContext(Aa),u=q.useContext(ua),f={globalDataContext:l,templateContext:u},{contextToFilter:p="global",filters:v=[]}=n.props,g=A=>{if(!A)return!0;for(const C of v){const w=(C==null?void 0:C.subjectsWithProperty)??void 0;if(!w||!A.hasOwnProperty(w))continue;if(!Zv(C,f,new Map([["whenFilterableData",({condition:L})=>{const z=L.whenFilterableData.split(".");let O=A;for(const I of z){const X=parseInt(I);if(O=O[isNaN(X)?I:X],O===void 0)return}return O}]])))return!1}return!0};switch(p){case"template":return u.templateData=Zb(u.templateData,g),u.templatePath=n.path,te.jsx(ua.Provider,{value:u,children:te.jsx(Ra,{props:n.props.content,path:n.path+".content",datafield:"content",currentData:((x=n.currentData)==null?void 0:x.content)??void 0})});case"global":default:return l.templateData=Zb(l.templateData,g),te.jsx(Aa.Provider,{value:l,children:te.jsx(Ra,{props:n.props.content,path:n.path+".content",datafield:"content",currentData:((S=n.currentData)==null?void 0:S.content)??void 0})})}},Zb=(n,l)=>{if(Array.isArray(n)){const u={};return n.forEach((f,p)=>{l(f)&&(u[p]=Zb(f,l))}),u}else if(typeof n=="object"&&n!==null){const u={};for(const f in n)if(n.hasOwnProperty(f)){if(!l(n[f]))continue;u[f]=Zb(n[f],l)}return u}else return n},P8=({props:n,currentData:l,path:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=Array.isArray(n.delayedActions)?n.delayedActions:[],g={globalDataContext:f,templateContext:p};return q.useEffect(()=>{if(!n.interval)return;const x=setInterval(()=>{const S=Q8(v,g);for(let A=0;A<S.length;++A){const C=S[A];if(!C)continue;const w=C.what&&(jv[C.what]??null);w&&w({args:C,globalDataContext:f,templateContext:p})}n.once&&clearInterval(x)},n.interval);return()=>clearInterval(x)},[f,p]),te.jsx(Ci,{...n,children:n.content&&te.jsx(Ra,{props:n.content,currentData:(l==null?void 0:l.content)??void 0,datafield:"content",path:u+".content"})})},Q8=(n,l)=>{const u=[];if(!Array.isArray(n))return u;for(const[,f]of n.entries()){const p=(f==null?void 0:f.what)??void 0;!p||!(jv[p]??void 0)||Zv(f,l)&&u.push(f)}return u},lO=q.createContext({pagination:{}}),Z8=()=>{const{pagination:n}=q.useContext(lO);return n.PageControls?te.jsx(n.PageControls,{}):null},K8=({props:n,currentData:l,path:u})=>te.jsx(Ci,{...n,children:n.content&&te.jsx(Ra,{props:n.content,currentData:(l==null?void 0:l.content)??void 0,datafield:"content",path:u+".content"})}),J8=({dataToPaginate:n=[],forcePaginationDisplay:l=!1,maxPageButtonsCount:u=5,pageMaxItemCount:f=10})=>{const[p,v]=q.useState(0),g=Math.floor(u/2),x=p*f,S=x+f,A=M=>Math.ceil(M.length/f);return{firstShownItemIndex:x,getPageCountForContent:A,maxShownItemIndexExcluded:S,PageControls:()=>{const M=A(n);return!l&&M<=1?null:te.jsxs($h,{children:[te.jsx($h.First,{disabled:p<=0,onClick:()=>{v(0)}}),te.jsx($h.Prev,{disabled:p<=0,onClick:()=>{v(p-1)}}),Math.min(p-g,M-u)>0?te.jsx($h.Ellipsis,{disabled:!0}):null,(()=>{const L=[];let B=Math.min(Math.max(0,M-u),Math.max(0,p-g)),z=u;const O=(I,X)=>{L.push(te.jsx($h.Item,{active:p===I,onClick:()=>{v(I)},children:I+1},u-X))};for(;z&&(O(B,z),++B,--z,!(B>=M)););return L})(),M>Math.max(g,p)+Math.ceil(u/2)?te.jsx($h.Ellipsis,{disabled:!0}):null,te.jsx($h.Next,{disabled:p+1>=M,onClick:()=>{v(p+1)}}),te.jsx($h.Last,{disabled:p+1>=M,onClick:()=>{v(M-1)}})]})},pageMaxItemCount:f,sliceVisibleContent:M=>Array.isArray(M)?M.slice(x,S):M}},W8=({props:n,currentData:l,path:u})=>{const f=q.useContext(Aa),p=q.useContext(ua),v=(n==null?void 0:n.cardinality)??-1,g=(n==null?void 0:n.options)??[],x=(n==null?void 0:n.singleOption)??void 0,S=!!x,A=(n==null?void 0:n.content)??null,C=A&&ca({globalDataContext:f,templateContext:p,valueToEvaluate:A}),M=Object.entries(typeof C=="object"?C:l).map(([O,I])=>{const X=O;if(v>=1&&X>=v||!I||typeof I!="object")return null;let V,U,D;if(S)U=I,D=x;else{if(V=Object.keys(I)[0]??void 0,V===void 0)return null;U=Object.values(I)[0]??void 0,D=g[V]??void 0}if(D===void 0)return null;let j=(nx(A)&&Wo({dataLocation:A,currentPath:p.templatePath,globalDataContext:f,templateContext:p})||u)+"."+X;return S||(j+="."+V),te.jsx(Ra,{currentData:U,datafield:X,path:j,props:D},X)}),L=J8({dataToPaginate:M,...(n==null?void 0:n.paginationProps)??{}}),B=n!=null&&n.paginated?M.slice(L.firstShownItemIndex,L.maxShownItemIndexExcluded):M,z=te.jsxs(te.Fragment,{children:[(n==null?void 0:n.before)&&te.jsx(Ra,{currentData:(l==null?void 0:l.before)??void 0,path:u+".before",datafield:"before",props:n==null?void 0:n.before}),B,(n==null?void 0:n.after)&&te.jsx(Ra,{currentData:(l==null?void 0:l.after)??void 0,path:u+".after",datafield:"after",props:n==null?void 0:n.after})]});return te.jsx(Ci,{...n,children:n!=null&&n.paginated?te.jsx(lO.Provider,{value:{pagination:L},children:z}):z})};function Ra({props:n,currentData:l,datafield:u,path:f}){const p=q.useContext(Aa),v=q.useContext(ua),g=p.plugins??{element:{Azerty:Rb}},x={AccordionItem:aN,CheckBoxField:Q6,Count:X8,DateField:W6,DataFilter:$8,DelayedActions:P8,FolderSortableTree:S8,FormatNumeral:x8,Html:Rb,LabelFromValue:A8,Modal:T8,NumberField:eN,PageControls:Z8,Paragraph:C8,Phantom:K8,PreformattedMarkup:q8,SelectField:tN,SortableTreeItemCollapseButton:F8,Switch:W8,Tabs:Y8,TextAreaField:FC,TextField:nN,...g==null?void 0:g.element,Ijiji:FC},S={BsAccordion:vb,BsAlert:uM,BsBadge:M2,BsButton:N2},{element:A}=p;if(l===void 0&&(l=""),n!=null&&n.type){let C,w;const M=[{registryId:"module",components:x},{registryId:"bootstrap",components:S}];for(;M.length;){const{registryId:L,components:B}=M.shift();if(w=B[n.type]??void 0,w!==void 0){C=L;break}}return w===void 0&&(w=Rb,C="module"),C==="bootstrap"?te.jsx(G8,{bsComponent:w,path:f,props:n,currentData:l,datafield:u}):(Rb===w&&(n.tag=n.tag??n.type),te.jsx(w,{path:f,props:n,currentData:l,datafield:u}))}if(n!=null&&n.load){let C;const w=(n==null?void 0:n.customDataLocation)??void 0;if(w)debugger;const M=w?ca({globalDataContext:p,templateContext:v,valueToEvaluate:w}):l,L=w?Wo({dataLocation:w,currentPath:f,globalDataContext:p,templateContext:v}):f;typeof n.load=="function"?C=n.load(M):C=A[n.load];const{load:B,customDataLocation:z,...O}=n;return C={...C,...O},n.keepTemplateContext?te.jsx(Ra,{currentData:M,datafield:u,path:L,props:C}):te.jsx(ua.Provider,{value:{templateData:M,templatePath:L},children:te.jsx(Ra,{currentData:M,datafield:u,path:L,props:C})})}return Array.isArray(n)?n.map((C,w)=>te.jsx(Ra,{currentData:l[w]??void 0,datafield:w,path:f+"."+w,props:C??void 0},f+"."+w)):typeof n=="object"?Object.entries(n).map(([C,w])=>te.jsx(Ra,{currentData:l[C]??void 0,datafield:C??void 0,path:f+"."+C,props:w},f+"."+C)):te.jsx(P6,{valueToEvaluate:l||(n??null)})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function uO(n){return typeof n>"u"||n===null}function e9(n){return typeof n=="object"&&n!==null}function t9(n){return Array.isArray(n)?n:uO(n)?[]:[n]}function n9(n,l){var u,f,p,v;if(l)for(v=Object.keys(l),u=0,f=v.length;u<f;u+=1)p=v[u],n[p]=l[p];return n}function a9(n,l){var u="",f;for(f=0;f<l;f+=1)u+=n;return u}function r9(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}var i9=uO,l9=e9,u9=t9,o9=a9,s9=r9,c9=n9,Vl={isNothing:i9,isObject:l9,toArray:u9,repeat:o9,isNegativeZero:s9,extend:c9};function oO(n,l){var u="",f=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(u+='in "'+n.mark.name+'" '),u+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!l&&n.mark.snippet&&(u+=`
101
101
 
102
102
  `+n.mark.snippet),f+" "+u):f}function n1(n,l){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=l,this.message=oO(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n1.prototype=Object.create(Error.prototype),n1.prototype.constructor=n1,n1.prototype.toString=function(l){return this.name+": "+oO(this,l)};var xd=n1;function Ox(n,l,u,f,p){var v="",g="",x=Math.floor(p/2)-1;return f-l>x&&(v=" ... ",l=f-x+v.length),u-f>x&&(g=" ...",u=f+x-g.length),{str:v+n.slice(l,u).replace(/\t/g,"→")+g,pos:f-l+v.length}}function Dx(n,l){return Vl.repeat(" ",l-n.length)+n}function f9(n,l){if(l=Object.create(l||null),!n.buffer)return null;l.maxLength||(l.maxLength=79),typeof l.indent!="number"&&(l.indent=1),typeof l.linesBefore!="number"&&(l.linesBefore=3),typeof l.linesAfter!="number"&&(l.linesAfter=2);for(var u=/\r?\n|\r|\0/g,f=[0],p=[],v,g=-1;v=u.exec(n.buffer);)p.push(v.index),f.push(v.index+v[0].length),n.position<=v.index&&g<0&&(g=f.length-2);g<0&&(g=f.length-1);var x="",S,A,C=Math.min(n.line+l.linesAfter,p.length).toString().length,w=l.maxLength-(l.indent+C+3);for(S=1;S<=l.linesBefore&&!(g-S<0);S++)A=Ox(n.buffer,f[g-S],p[g-S],n.position-(f[g]-f[g-S]),w),x=Vl.repeat(" ",l.indent)+Dx((n.line-S+1).toString(),C)+" | "+A.str+`
103
103
  `+x;for(A=Ox(n.buffer,f[g],p[g],n.position,w),x+=Vl.repeat(" ",l.indent)+Dx((n.line+1).toString(),C)+" | "+A.str+`