PageSourceSearch

https://assyriska.se/assets/chunks/chunk-BPF5rSjR.js

js assyriska.se collected 2026-09-25 09:55:35 UTC 56,847 bytes, 5 lines download raw bytes

1import{r as l,e as T,j as m,a as Qe,B as _n}from"./chunk-DMwlo5nm.js";import{aD as je,f as Pn,h as zn,s as ye,l as _t,a as Pt,i as Bn,j as Fn,b as zt}from"./chunk-Ck8isY9Z.js";import{u as $n}from"./chunk-BnFXlqeL.js";import{S as Xn}from"./chunk-NrBL7lZ8.js";import{G as en}from"./chunk-CAxix5KT.js";import{T as Yn}from"./chunk-BLd09_JW.js";import{P as Hn}from"./chunk-C5h2HVLQ.js";import{H as Kn}from"./chunk-CLkHsQEn.js";import{S as Un}from"./chunk-DQLouT-U.js";import{L as Wn}from"./chunk-S0TtPncS.js";import"./chunk-BcaRF9Am.js";/* empty css              */import"./chunk-OOUAjeUK.js";import"./chunk-yTBbwrsg.js";import"./chunk-bsR3ciiC.js";import"./chunk-B4bBdZGw.js";function Vn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const st=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Se(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function yt(e){return"nodeType"in e}function P(e){var t,n;return e?Se(e)?e:yt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=P(e);return e instanceof t}function Be(e){return Se(e)?!1:e instanceof P(e).HTMLElement}function tn(e){return e instanceof P(e).SVGElement}function De(e){return e?Se(e)?e.document:yt(e)?wt(e)?e:Be(e)||tn(e)?e.ownerDocument:document:document:document}const V=st?l.useLayoutEffect:l.useEffect;function it(e){const t=l.useRef(e);return V(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function qn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return V(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ze(e){const t=it(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function et(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let gt={};function $e(e,t){return l.useMemo(()=>{if(t)return t;const n=gt[e]==null?0:gt[e]+1;return gt[e]=n,e+"-"+n},[e,t])}function nn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,u]of a){const f=s[c];f!=null&&(s[c]=f+e*u)}return s},{...t})}}const we=nn(1),tt=nn(-1);function Gn(e){return"clientX"in e&&"clientY"in e}function at(e){if(!e)return!1;const{KeyboardEvent:t}=P(e.target);return t&&e instanceof t}function Jn(e){if(!e)return!1;const{TouchEvent:t}=P(e.target);return t&&e instanceof t}function nt(e){if(Jn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Gn(e)?{x:e.clientX,y:e.clientY}:null}const fe=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[fe.Translate.toString(e),fe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Bt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Qn(e){return e.matches(Bt)?e:e.querySelector(Bt)}const Zn={display:"none"};function er(e){let{id:t,value:n}=e;return T.createElement("div",{id:t,style:Zn},n)}function tr(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return T.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function nr(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const rn=l.createContext(null);function rr(e){const t=l.useContext(rn);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function or(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>
1{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const sr={draggable:`
2    To pick up a draggable item, press the space bar.
3    While dragging, use the arrow keys to move the item.
4    Press space again to drop the item in its new position, or press escape to cancel.
5  `},ir={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ar(e){let{announcements:t=ir,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=sr}=e;const{announce:s,announcement:i}=nr(),a=$e("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),rr(l.useMemo(()=>({onDragStart(d){let{active:g}=d;s(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&s(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;s(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;s(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;s(t.onDragCancel({active:g,over:h}))}}),[s,t])),!c)return null;const f=T.createElement(T.Fragment,null,T.createElement(er,{id:r,value:o.draggable}),T.createElement(tr,{id:a,announcement:i}));return n?je.createPortal(f,n):f}var j;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(j||(j={}));function rt(){}function Ft(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const q=Object.freeze({x:0,y:0});function cr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ur(e,t){const n=nt(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function dr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function fr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function gr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function $t(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const hr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=$t(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const u=cr($t(c),o);s.push({id:a,data:{droppableContainer:i,value:u}})}}return s.sort(dr)};function pr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,u=e.width*e.height,f=i*a,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const vr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=pr(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(fr)};function mr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function on(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function br(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const xr=br(1);function sn(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function yr(e,t,n){const r=sn(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),u=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=s?e.height/s:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const wr={ignoreTransform:!1};function Re(e,t){t===void 0&&(t=wr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=P(e).getComputedStyle(e);u&&(n=yr(n,u,f))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function Xt(e){return Re(e,{ignoreTransform:!0})}
5function Sr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Dr(e,t){return t===void 0&&(t=P(e).getComputedStyle(e)),t.position==="fixed"}function Rr(e,t){t===void 0&&(t=P(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function St(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(wt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Be(o)||tn(o)||n.includes(o))return n;const s=P(e).getComputedStyle(o);return o!==e&&Rr(o,s)&&n.push(o),Dr(o,s)?n:r(o.parentNode)}return e?r(e):n}function an(e){const[t]=St(e,1);return t??null}function ht(e){return!st||!e?null:Se(e)?e:yt(e)?wt(e)||e===De(e).scrollingElement?window:Be(e)?e:null:null}function ln(e){return Se(e)?e.scrollX:e.scrollLeft}function cn(e){return Se(e)?e.scrollY:e.scrollTop}function mt(e){return{x:ln(e),y:cn(e)}}var k;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(k||(k={}));function un(e){return!st||!e?!1:e===document.scrollingElement}function dn(e){const t={x:0,y:0},n=un(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const Cr={x:.2,y:.2};function Er(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Cr);const{isTop:u,isBottom:f,isLeft:d,isRight:g}=dn(e),h={x:0,y:0},x={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!u&&s<=t.top+p.height?(h.y=k.Backward,x.y=r*Math.abs((t.top+p.height-s)/p.height)):!f&&c>=t.bottom-p.height&&(h.y=k.Forward,x.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!g&&a>=t.right-p.width?(h.x=k.Forward,x.x=r*Math.abs((t.right-p.width-a)/p.width)):!d&&i<=t.left+p.width&&(h.x=k.Backward,x.x=r*Math.abs((t.left+p.width-i)/p.width)),{direction:h,speed:x}}function Nr(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function fn(e){return e.reduce((t,n)=>we(t,mt(n)),q)}function Ar(e){return e.reduce((t,n)=>t+ln(n),0)}function Mr(e){return e.reduce((t,n)=>t+cn(n),0)}function gn(e,t){if(t===void 0&&(t=Re),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);an(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Or=[["x",["left","right"],Ar],["y",["top","bottom"],Mr]];class Dt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=St(n),o=fn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of Or)for(const c of i)Object.defineProperty(this,c,{get:()=>{const u=a(r),f=o[s]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ke{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Tr(e){const{EventTarget:t}=P(e);return e instanceof t?e:De(e)}function pt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var K;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(K||(K={}));function Yt(e){e.preventDefault()}function Ir(e){e.stopPropagation()}var N;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(N||(N={}));const hn={start:[N.Space,N.Enter],cancel:[N.Esc],end:[N.Space,N.Enter,N.Tab]},jr=(e,t)=>
5{let{currentCoordinates:n}=t;switch(e.code){case N.Right:return{...n,x:n.x+25};case N.Left:return{...n,x:n.x-25};case N.Down:return{...n,y:n.y+25};case N.Up:return{...n,y:n.y-25}}};class pn{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new ke(De(n)),this.windowListeners=new ke(P(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(K.Resize,this.handleCancel),this.windowListeners.add(K.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(K.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&gn(r),n(q)}handleKeyDown(t){if(at(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=hn,coordinateGetter:i=jr,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:q;this.referenceCoordinates||(this.referenceCoordinates=f);const d=i(t,{active:n,context:r.current,currentCoordinates:f});if(d){const g=tt(d,f),h={x:0,y:0},{scrollableAncestors:x}=r.current;for(const p of x){const v=t.code,{isTop:D,isRight:y,isLeft:b,isBottom:S,maxScroll:w,minScroll:E}=dn(p),R=Nr(p),C={x:Math.min(v===N.Right?R.right-R.width/2:R.right,Math.max(v===N.Right?R.left:R.left+R.width/2,d.x)),y:Math.min(v===N.Down?R.bottom-R.height/2:R.bottom,Math.max(v===N.Down?R.top:R.top+R.height/2,d.y))},O=v===N.Right&&!y||v===N.Left&&!b,I=v===N.Down&&!S||v===N.Up&&!D;if(O&&C.x!==d.x){const M=p.scrollLeft+g.x,U=v===N.Right&&M<=w.x||v===N.Left&&M>=E.x;if(U&&!g.y){p.scrollTo({left:M,behavior:a});return}U?h.x=p.scrollLeft-M:h.x=v===N.Right?p.scrollLeft-w.x:p.scrollLeft-E.x,h.x&&p.scrollBy({left:-h.x,behavior:a});break}else if(I&&C.y!==d.y){const M=p.scrollTop+g.y,U=v===N.Down&&M<=w.y||v===N.Up&&M>=E.y;if(U&&!g.x){p.scrollTo({top:M,behavior:a});return}U?h.y=p.scrollTop-M:h.y=v===N.Down?p.scrollTop-w.y:p.scrollTop-E.y,h.y&&p.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,we(tt(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}pn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=hn,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Ht(e){return!!(e&&"distance"in e)}function Kt(e){return!!(e&&"delay"in e)}class Rt{constructor(t,n,r){var o;r===void 0&&(r=Tr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=De(i),this.documentListeners=new ke(this.document),this.listeners=new ke(r),this.windowListeners=new ke(P(i)),this.initialCoordinates=(o=nt(s))!=null?o:q,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(K.Resize,this.handleCancel),this.windowListeners.add(K.DragStart,Yt),this.windowListeners.add(K.VisibilityChange,this.handleCancel),this.windowListeners.add(K.ContextMenu,Yt),this.documentListeners.add(K.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Kt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ht(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(K.Click,Ir,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(K.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=nt(t))!=null?n:q,u=tt(o,c);if(!r&&a){if(Ht(a)){if(a.tolerance!=null&&pt(u,a.tolerance))return this.handleCancel();if(pt(u,a.distance))return this.handleStart()}if(Kt(a)&&pt(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===N.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const kr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ct extends Rt{constructor(t){const{event:n}=t,r=De(n.target);super(t,kr,r)}}Ct.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Lr={move:{name:"mousemove"},end:{name:"mouseup"}};var bt;(function(e){e[e.RightClick=2]="RightClick"})(bt||(bt={}));class _r extends Rt{constructor(t){super(t,Lr,De(t.event.target))}}_r.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===bt.RightClick?!1:(r?.({event:n}),!0)}}];const vt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class vn extends Rt{constructor(t){super(t,vt)}static setup(){return window.addEventListener(vt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(vt.move.name,t)};function t(){}}}vn.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Le;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Le||(Le={}));var ot;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
5sedTreeOrder"})(ot||(ot={}));function Pr(e){let{acceleration:t,activator:n=Le.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=ot.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:g}=e;const h=Br({delta:d,disabled:!s}),[x,p]=qn(),v=l.useRef({x:0,y:0}),D=l.useRef({x:0,y:0}),y=l.useMemo(()=>{switch(n){case Le.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Le.DraggableRect:return o}},[n,o,c]),b=l.useRef(null),S=l.useCallback(()=>{const E=b.current;if(!E)return;const R=v.current.x*D.current.x,C=v.current.y*D.current.y;E.scrollBy(R,C)},[]),w=l.useMemo(()=>a===ot.TreeOrder?[...u].reverse():u,[a,u]);l.useEffect(()=>{if(!s||!u.length||!y){p();return}for(const E of w){if(r?.(E)===!1)continue;const R=u.indexOf(E),C=f[R];if(!C)continue;const{direction:O,speed:I}=Er(E,C,y,t,g);for(const M of["x","y"])h[M][O[M]]||(I[M]=0,O[M]=0);if(I.x>0||I.y>0){p(),b.current=E,x(S,i),v.current=I,D.current=O;return}}v.current={x:0,y:0},D.current={x:0,y:0},p()},[t,S,r,p,s,i,JSON.stringify(y),JSON.stringify(h),x,u,w,f,JSON.stringify(g)])}const zr={x:{[k.Backward]:!1,[k.Forward]:!1},y:{[k.Backward]:!1,[k.Forward]:!1}};function Br(e){let{delta:t,disabled:n}=e;const r=et(t);return Fe(o=>{if(n||!r||!o)return zr;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[k.Backward]:o.x[k.Backward]||s.x===-1,[k.Forward]:o.x[k.Forward]||s.x===1},y:{[k.Backward]:o.y[k.Backward]||s.y===-1,[k.Forward]:o.y[k.Forward]||s.y===1}}},[n,t,r])}function Fr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Fe(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function $r(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var ze;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ze||(ze={}));var xt;(function(e){e.Optimized="optimized"})(xt||(xt={}));const Ut=new Map;function Xr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=l.useState(null),{frequency:a,measure:c,strategy:u}=o,f=l.useRef(e),d=v(),g=Pe(d),h=l.useCallback(function(D){D===void 0&&(D=[]),!g.current&&i(y=>y===null?D:y.concat(D.filter(b=>!y.includes(b))))},[g]),x=l.useRef(null),p=Fe(D=>{if(d&&!n)return Ut;if(!D||D===Ut||f.current!==e||s!=null){const y=new Map;for(let b of e){if(!b)continue;if(s&&s.length>0&&!s.includes(b.id)&&b.rect.current){y.set(b.id,b.rect.current);continue}const S=b.node.current,w=S?new Dt(c(S),S):null;b.rect.current=w,w&&y.set(b.id,w)}return y}return D},[e,s,n,d,c]);return l.useEffect(()=>{f.current=e},[e]),l.useEffect(()=>{d||h()},[n,d]),l.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),l.useEffect(()=>{d||typeof a!="number"||x.current!==null||(x.current=setTimeout(()=>{h(),x.current=null},a))},[a,d,h,...r]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:s!=null};function v(){switch(u){case ze.Always:return!1;case ze.BeforeDragging:return n;default:return!n}}}function Et(e,t){return Fe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Yr(e,t){return Et(e,t)}function Hr(e){let{callback:t,disabled:n}=e;const r=it(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function lt(e){let{callback:t,disabled:n}=e;const r=it(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function Kr(e){return new Dt(Re(e),e)}function Wt(e,t,n){t===void 0&&(t=Kr);const[r,o]=l.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const i=Hr({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){s();break}}}}),a=lt({callback:s});return V(()=>{s(),e?(a?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),i?.disconnect())},[e]),r}function Ur(e){const t=Et(e);return on(e,t)}const Vt=[];function Wr(e){const t=l.useRef(e),n=Fe(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:St(e):Vt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function Vr(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(s=>{const i=ht(s.target);i&&n(a=>a?(a.set(i,mt(i)),new Map(a)):null)},[]);return l.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const u=ht(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,mt(u)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const u=ht(c);u?.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>we(s,i),q):fn(e):q,[e,t])}function qt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==q;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?tt(e,n.current):q}function qr(e){l.useEffect(()=>{if(!st)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Gr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}
5=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function mn(e){return l.useMemo(()=>e?Sr(e):null,[e])}const Gt=[];function Jr(e,t){t===void 0&&(t=Re);const[n]=e,r=mn(n?P(n):null),[o,s]=l.useState(Gt);function i(){s(()=>e.length?e.map(c=>un(c)?r:new Dt(t(c),c)):Gt)}const a=lt({callback:i});return V(()=>{a?.disconnect(),i(),e.forEach(c=>a?.observe(c))},[e]),o}function bn(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Be(t)?t:e}function Qr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:f}of u)if(Be(f)){r(d=>{const g=t(f);return d?{...d,width:g.width,height:g.height}:g});break}},[t]),s=lt({callback:o}),i=l.useCallback(u=>{const f=bn(u);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[a,c]=Ze(i);return l.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const Zr=[{sensor:Ct,options:{}},{sensor:pn,options:{}}],eo={current:{}},Je={draggable:{measure:Xt},droppable:{measure:Xt,strategy:ze.WhileDragging,frequency:xt.Optimized},dragOverlay:{measure:Re}};class _e extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const to={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new _e,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:rt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Je,measureDroppableContainers:rt,windowRect:null,measuringScheduled:!1},xn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:rt,draggableNodes:new Map,over:null,measureDroppableContainers:rt},Xe=l.createContext(xn),yn=l.createContext(to);function no(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new _e}}}function ro(e,t){switch(t.type){case j.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case j.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case j.DragEnd:case j.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case j.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new _e(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case j.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new _e(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case j.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new _e(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function oo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(Xe),s=et(r),i=et(n?.id);return l.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!at(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:u}=a;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=Qn(f);if(d){d.focus();break}}})}},[r,t,o,i,s]),null}function wn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function so(e){return l.useMemo(()=>({draggable:{...Je.draggable,...e?.draggable},droppable:{...Je.droppable,...e?.droppable},dragOverlay:{...Je.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function io(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=l.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;V(()=>
5{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=on(f,r);if(i||(d.x=0),a||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=an(u);g&&g.scrollBy({top:d.y,left:d.x})}},[t,i,a,r,n])}const ct=l.createContext({...q,scaleX:1,scaleY:1});var de;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(de||(de={}));const ao=l.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:u,sensors:f=Zr,collisionDetection:d=vr,measuring:g,modifiers:h,...x}=t;const p=l.useReducer(ro,void 0,no),[v,D]=p,[y,b]=or(),[S,w]=l.useState(de.Uninitialized),E=S===de.Initialized,{draggable:{active:R,nodes:C,translate:O},droppable:{containers:I}}=v,M=R!=null?C.get(R):null,U=l.useRef({initial:null,translated:null}),W=l.useMemo(()=>{var _;return R!=null?{id:R,data:(_=M?.data)!=null?_:eo,rect:U}:null},[R,M]),G=l.useRef(null),[Ce,Ye]=l.useState(null),[B,He]=l.useState(null),ee=Pe(x,Object.values(x)),Ee=$e("DndDescribedBy",i),Ke=l.useMemo(()=>I.getEnabled(),[I]),z=so(g),{droppableRects:te,measureDroppableContainers:ge,measuringScheduled:Ne}=Xr(Ke,{dragging:E,dependencies:[O.x,O.y],config:z.droppable}),Y=Fr(C,R),Ue=l.useMemo(()=>B?nt(B):null,[B]),se=Ln(),ne=Yr(Y,z.draggable.measure);io({activeNode:R!=null?C.get(R):null,config:se.layoutShiftCompensation,initialRect:ne,measure:z.draggable.measure});const A=Wt(Y,z.draggable.measure,ne),Ae=Wt(Y?Y.parentElement:null),J=l.useRef({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=I.getNodeFor((n=J.current.over)==null?void 0:n.id),re=Qr({measure:z.dragOverlay.measure}),pe=(r=re.nodeRef.current)!=null?r:Y,ve=E?(o=re.rect)!=null?o:A:null,At=!!(re.nodeRef.current&&re.rect),Mt=Ur(At?null:A),ut=mn(pe?P(pe):null),ie=Wr(E?he??Y:null),We=Jr(ie),Ve=wn(h,{transform:{x:O.x-Mt.x,y:O.y-Mt.y,scaleX:1,scaleY:1},activatorEvent:B,active:W,activeNodeRect:A,containerNodeRect:Ae,draggingNodeRect:ve,over:J.current.over,overlayNodeRect:re.rect,scrollableAncestors:ie,scrollableAncestorRects:We,windowRect:ut}),Ot=Ue?we(Ue,O):null,Tt=Vr(ie),An=qt(Tt),Mn=qt(Tt,[A]),me=we(Ve,An),be=ve?xr(ve,Ve):null,Me=W&&be?d({active:W,collisionRect:be,droppableRects:te,droppableContainers:Ke,pointerCoordinates:Ot}):null,It=gr(Me,"id"),[ae,jt]=l.useState(null),On=At?Ve:we(Ve,Mn),Tn=mr(On,(s=ae?.rect)!=null?s:null,A),dt=l.useRef(null),kt=l.useCallback((_,F)=>{let{sensor:$,options:le}=F;if(G.current==null)return;const H=C.get(G.current);if(!H)return;const X=_.nativeEvent,Q=new $({active:G.current,activeNode:H,event:X,options:le,context:J,onAbort(L){if(!C.get(L))return;const{onDragAbort:Z}=ee.current,oe={id:L};Z?.(oe),y({type:"onDragAbort",event:oe})},onPending(L,ce,Z,oe){if(!C.get(L))return;const{onDragPending:Te}=ee.current,ue={id:L,constraint:ce,initialCoordinates:Z,offset:oe};Te?.(ue),y({type:"onDragPending",event:ue})},onStart(L){const ce=G.current;if(ce==null)return;const Z=C.get(ce);if(!Z)return;const{onDragStart:oe}=ee.current,Oe={activatorEvent:X,active:{id:ce,data:Z.data,rect:U}};je.unstable_batchedUpdates(()=>{oe?.(Oe),w(de.Initializing),D({type:j.DragStart,initialCoordinates:L,active:ce}),y({type:"onDragStart",event:Oe}),Ye(dt.current),He(X)})},onMove(L){D({type:j.DragMove,coordinates:L})},onEnd:xe(j.DragEnd),onCancel:xe(j.DragCancel)});dt.current=Q;function xe(L){return async function(){const{active:Z,collisions:oe,over:Oe,scrollAdjustedTranslate:Te}=J.current;let ue=null;if(Z&&Te){const{cancelDrop:Ie}=ee.current;ue={activatorEvent:X,active:Z,collisions:oe,delta:Te,over:Oe},L===j.DragEnd&&typeof Ie=="function"&&await Promise.resolve(Ie(ue))&&(L=j.DragCancel)}G.current=null,je.unstable_batchedUpdates(()=>{D({type:L}),w(de.Uninitialized),jt(null),Ye(null),He(null),dt.current=null;const Ie=L===j.DragEnd?"onDragEnd":"onDragCancel";if(ue){const ft=ee.current[Ie];ft?.(ue),y({type:Ie,event:ue})}})}}},[C]),In=l.useCallback((_,F)=>($,le)=>{const H=$.nativeEvent,X=C.get(le);if(G.current!==null||!X||H.dndKit||H.defaultPrevented)return;const Q={active:X};_($,F.options,Q)===!0&&(H.dndKit={capturedBy:F.sensor},G.current=le,kt($,F))},[C,kt]),Lt=$r(f,In);qr(f),V(()=>{A&&S===de.Initializing&&w(de.Initialized)},[A,S]),l.useEffect(()=>{const{onDragMove:_}=ee.current,{active:F,activatorEvent:$,collisions:le,over:H}=J.current;if(!F||!$)return;const X={active:F,activatorEvent:$,collisions:le,delta:{x:me.x,y:me.y},over:H};je.unstable_batchedUpdates(()=>{_?.(X),y({type:"onDragMove",event:X})})},[me.x,me.y]),l.useEffect(()=>{const{active:_,activatorEvent:F,collisions:$,droppableContainers:le,scrollAdjustedTranslate:H}=J.current;if(!_||G.current==null||!F||!H)return;const{onDragOver:X}=ee.current,Q=le.get(It),xe=Q&&Q.rect.current?{id:Q.id,rect:Q.rect.current,data:Q.data,disabled:Q.disabled}:null,L={active:_,activatorEvent:F,collisions:$,delta:{x:H.x,y:H.y},over:xe};je.unstable_batchedUpdates(()=>{jt(xe),X?.(L),y({type:"onDragOver",event:L})})},[It]),V(()=>{J.current={activatorEvent:B,active:W,activeNode:Y,collisionRect:be,collisions:Me,droppableRects:te,draggableNodes:C,draggingNode:pe,draggingNodeRect:ve,droppableContainers:I,over:ae,scrollableAncestors:ie,scrollAdjustedTranslate:me},U.current={initial:ve,translated:be}},[W,Y,Me,be,C,pe,ve,te,I,ae,ie,me]),Pr({...se,delta:O,draggingRect:be,pointerCoordinates:Ot,scrollableAncestors:ie,scrollableAncestorRects:We});const jn=l.useMemo(()=>({active:W,activeNode:Y,activeNodeRect:A,activatorEvent:B,collisions:Me,containerNodeRect:Ae,dragOverlay:re,draggableNodes:C,droppableContainers:I,droppableRects:te,over:ae,measureDroppableContainers:ge,scrollableAncestors:ie,scrollableAncestorRects:We,measuringConfiguration:z,measuringScheduled:Ne,windowRect:ut}),[W,Y,A,B,Me,Ae,re,C,I,te,ae,ge,ie,We,z,Ne,ut]),kn=l.useMemo(()=>({activatorEvent:B,activators:Lt,active:W,activeNodeRect:A,ariaDescribedById:{draggable:Ee},dispatch:D,draggableNodes:C,over:ae,measureDroppableContainers:ge}),[B,Lt,W,A,D,Ee,C,ae,ge]);return T.createElement(rn.Provider,{value:b},T.createElement(Xe.Provider,{value:kn},T.createElement(yn.Provider,{value:jn},T.createElement(ct.Provider,{value:Tn},u)),T.createElement(oo,{disabled:a?.restoreFocus===!1})),T.createElement(ar,{...a,hiddenTextDescribedById:Ee}));function Ln(){const _=Ce?.autoScrollEnabled===!1,F=typeof c=="object"?c.enabled===!1:c===!1,$=E&&!_&&!F;return typeof c=="object"?{...c,enabled:$}:{enabled:$}}}),lo=l.createContext(null),Jt="button",co="Draggable";function uo(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=$e(co),{activators:i,activatorEvent:a,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:g}=l.useContext(Xe),{role:h=Jt,roleDescription:x="draggable",tabIndex:p=0}=o??{},v=c?.id===t,D=l.useContext(v?ct:lo),[y,b]=Ze(),[S,w]=Ze(),E=Gr(i,t),R=Pe(n);V(()=>(d.set(t,{id:t,key:s,node:y,activatorNode:S,data:R}),()=>{const O=d.get(t);O&&O.key===s&&d.delete(t)}),[d,t]);const C=l.useMemo(()=>({role:h,tabIndex:p,"aria-disabled":r,"aria-pressed":v&&h===Jt?!0:void 0,"aria-roledescription":x,"aria-describedby":f.draggable}),[r,h,p,v,x,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:u,attributes:C,isDragging:v,listeners:r?void 0:E,node:y,over:g,setNodeRef:b,setActivatorNodeRef:w,transform:D}}function Sn(){return l.useContext(yn)}const fo="Droppable",go={timeout:25};function Nt(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=$e(fo),{active:i,dispatch:a,over:c,measureDroppableContainers:u}=l.useContext(Xe),f=l.useRef({disabled:n}),d=l.useRef(!1),g=l.useRef(null),h=l.useRef(null),{disabled:x,updateMeasurementsFor:p,timeout:v}={...go,...o},D=Pe(p??r),y=l.useCallback(()=>
5{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(D.current)?D.current:[D.current]),h.current=null},v)},[v]),b=lt({callback:y,disabled:x||!i}),S=l.useCallback((C,O)=>{b&&(O&&(b.unobserve(O),d.current=!1),C&&b.observe(C))},[b]),[w,E]=Ze(S),R=Pe(t);return l.useEffect(()=>{!b||!w.current||(b.disconnect(),d.current=!1,b.observe(w.current))},[w,b]),l.useEffect(()=>(a({type:j.RegisterDroppable,element:{id:r,key:s,disabled:n,node:w,rect:g,data:R}}),()=>a({type:j.UnregisterDroppable,key:s,id:r})),[r]),l.useEffect(()=>{n!==f.current.disabled&&(a({type:j.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,a]),{active:i,rect:g,isOver:c?.id===r,node:w,over:c,setNodeRef:E}}function ho(e){let{animation:t,children:n}=e;const[r,o]=l.useState(null),[s,i]=l.useState(null),a=et(n);return!n&&!r&&a&&o(a),V(()=>{if(!s)return;const c=r?.key,u=r?.props.id;if(c==null||u==null){o(null);return}Promise.resolve(t(u,s)).then(()=>{o(null)})},[t,r,s]),T.createElement(T.Fragment,null,n,r?l.cloneElement(r,{ref:i}):null)}const po={x:0,y:0,scaleX:1,scaleY:1};function vo(e){let{children:t}=e;return T.createElement(Xe.Provider,{value:xn},T.createElement(ct.Provider,{value:po},t))}const mo={position:"fixed",touchAction:"none"},bo=e=>at(e)?"transform 250ms ease":void 0,xo=l.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:i,rect:a,style:c,transform:u,transition:f=bo}=e;if(!a)return null;const d=o?u:{...u,scaleX:1,scaleY:1},g={...mo,width:a.width,height:a.height,top:a.top,left:a.left,transform:fe.Transform.toString(d),transformOrigin:o&&r?ur(r,a):void 0,transition:typeof f=="function"?f(r):f,...c};return T.createElement(n,{className:i,style:g,ref:t},s)}),yo=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(a,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,u]of Object.entries(o))n.node.style.setProperty(c,u);i!=null&&i.active&&n.node.classList.remove(i.active)}},wo=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:fe.Transform.toString(t)},{transform:fe.Transform.toString(n)}]},So={duration:250,easing:"ease",keyframes:wo,sideEffects:yo({styles:{active:{opacity:"0"}}})};function Do(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return it((s,i)=>{if(t===null)return;const a=n.get(s);if(!a)return;const c=a.node.current;if(!c)return;const u=bn(i);if(!u)return;const{transform:f}=P(i).getComputedStyle(i),d=sn(f);if(!d)return;const g=typeof t=="function"?t:Ro(t);return gn(c,o.draggable.measure),g({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function Ro(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...So,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...u}=s;if(!t)return;const f={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},d={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},g={x:c.x-f.x,y:c.y-f.y,...d},h=o({...u,active:i,dragOverlay:a,transform:{initial:c,final:g}}),[x]=h,p=h[h.length-1];if(JSON.stringify(x)===JSON.stringify(p))return;const v=r?.({active:i,dragOverlay:a,...u}),D=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(y=>{D.onfinish=()=>{v?.(),y()}})}}let Qt=0;function Co(e){return l.useMemo(()=>{if(e!=null)return Qt++,Qt},[e])}const Eo=T.memo(e=>
5{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggableNodes:x,droppableContainers:p,dragOverlay:v,over:D,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:S,windowRect:w}=Sn(),E=l.useContext(ct),R=Co(d?.id),C=wn(i,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:v.rect,over:D,overlayNodeRect:v.rect,scrollableAncestors:b,scrollableAncestorRects:S,transform:E,windowRect:w}),O=Et(g),I=Do({config:r,draggableNodes:x,droppableContainers:p,measuringConfiguration:y}),M=O?v.setRef:void 0;return T.createElement(vo,null,T.createElement(ho,{animation:I},d&&R?T.createElement(xo,{key:R,id:d.id,ref:M,as:a,activatorEvent:f,adjustScale:t,className:c,transition:s,rect:O,style:{zIndex:u,...o},transform:C},n):null))});function Dn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function No(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function qe(e){return e!==null&&e>=0}function Ao(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Mo(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ge={scaleX:1,scaleY:1},Oo=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:s,index:i}=e;const a=(t=n[o])!=null?t:r;if(!a)return null;const c=To(n,i,o);if(i===o){const u=n[s];return u?{x:o<s?u.left+u.width-(a.left+a.width):u.left-a.left,y:0,...Ge}:null}return i>o&&i<=s?{x:-a.width-c,y:0,...Ge}:i<o&&i>=s?{x:a.width+c,y:0,...Ge}:{x:0,y:0,...Ge}};function To(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return!r||!o&&!s?0:n<t?o?r.left-(o.left+o.width):s.left-(r.left+r.width):s?s.left-(r.left+r.width):r.left-(o.left+o.width)}const Rn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Dn(t,r,n),i=t[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},Cn="Sortable",En=T.createContext({activeIndex:-1,containerId:Cn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Rn,disabled:{draggable:!1,droppable:!1}});function Io(e){let{children:t,id:n,items:r,strategy:o=Rn,disabled:s=!1}=e;const{active:i,dragOverlay:a,droppableRects:c,over:u,measureDroppableContainers:f}=Sn(),d=$e(Cn,n),g=a.rect!==null,h=l.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),x=i!=null,p=i?h.indexOf(i.id):-1,v=u?h.indexOf(u.id):-1,D=l.useRef(h),y=!Ao(h,D.current),b=v!==-1&&p===-1||y,S=Mo(s);V(()=>{y&&x&&f(h)},[y,h,x,f]),l.useEffect(()=>{D.current=h},[h]);const w=l.useMemo(()=>({activeIndex:p,containerId:d,disabled:S,disableTransforms:b,items:h,overIndex:v,useDragOverlay:g,sortedRects:No(h,c),strategy:o}),[p,d,S.draggable,S.droppable,b,h,v,c,g,o]);return T.createElement(En.Provider,{value:w},t)}const jo=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Dn(n,r,o).indexOf(t)},ko=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:c,transition:u}=e;return!u||!r||a!==s&&o===i?!1:n?!0:i!==o&&t===c},Lo={duration:200,easing:"ease"},Nn="transform",_o=fe.Transition.toString({property:Nn,duration:0,easing:"linear"}),Po={roleDescription:"sortable"};function zo(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,i]=l.useState(null),a=l.useRef(n);return V(()=>{if(!t&&n!==a.current&&r.current){const c=o.current;if(c){const u=Re(r.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&i(f)}}n!==a.current&&(a.current=n)},[t,n,r,o]),l.useEffect(()=>{s&&i(null)},[s]),s}function Bo(e){let{animateLayoutChanges:t=ko,attributes:n,disabled:r,data:o,getNewIndex:s=jo,id:i,strategy:a,resizeObserverConfig:c,transition:u=Lo}=e;const{items:f,containerId:d,activeIndex:g,disabled:h,disableTransforms:x,sortedRects:p,overIndex:v,useDragOverlay:D,strategy:y}=l.useContext(En),b=Fo(r,h),S=f.indexOf(i),w=l.useMemo(()=>({sortable:{containerId:d,index:S,items:f},...o}),[d,o,S,f]),E=l.useMemo(()=>f.slice(f.indexOf(i)),[f,i]),{rect:R,node:C,isOver:O,setNodeRef:I}=Nt({id:i,data:w,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...c}}),{active:M,activatorEvent:U,activeNodeRect:W,attributes:G,setNodeRef:Ce,listeners:Ye,isDragging:B,over:He,setActivatorNodeRef:ee,transform:Ee}=uo({id:i,data:w,attributes:{...Po,...n},disabled:b.draggable}),Ke=Vn(I,Ce),z=!!M,te=z&&!x&&qe(g)&&qe(v),ge=!D&&B,Ne=ge&&te?Ee:null,Ue=te?Ne??(a??y)({rects:p,activeNodeRect:W,activeIndex:g,overIndex:v,index:S}
5):null,se=qe(g)&&qe(v)?s({id:i,items:f,activeIndex:g,overIndex:v}):S,ne=M?.id,A=l.useRef({activeId:ne,items:f,newIndex:se,containerId:d}),Ae=f!==A.current.items,J=t({active:M,containerId:d,isDragging:B,isSorting:z,id:i,index:S,items:f,newIndex:A.current.newIndex,previousItems:A.current.items,previousContainerId:A.current.containerId,transition:u,wasDragging:A.current.activeId!=null}),he=zo({disabled:!J,index:S,node:C,rect:R});return l.useEffect(()=>{z&&A.current.newIndex!==se&&(A.current.newIndex=se),d!==A.current.containerId&&(A.current.containerId=d),f!==A.current.items&&(A.current.items=f)},[z,se,d,f]),l.useEffect(()=>{if(ne===A.current.activeId)return;if(ne!=null&&A.current.activeId==null){A.current.activeId=ne;return}const pe=setTimeout(()=>{A.current.activeId=ne},50);return()=>clearTimeout(pe)},[ne]),{active:M,activeIndex:g,attributes:G,data:w,rect:R,index:S,newIndex:se,items:f,isOver:O,isSorting:z,isDragging:B,listeners:Ye,node:C,overIndex:v,over:He,setNodeRef:Ke,setActivatorNodeRef:ee,setDroppableNodeRef:I,setDraggableNodeRef:Ce,transform:he??Ue,transition:re()};function re(){if(he||Ae&&A.current.newIndex===S)return _o;if(!(ge&&!at(U)||!u)&&(z||J))return fe.Transition.toString({...u,property:Nn})}}function Fo(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}N.Down,N.Right,N.Up,N.Left;const $o=new Set(["hero_news","banner_ads"]);function Xo(e){const t=new Map;for(const n of e)t.has(n.row_index)||t.set(n.row_index,[]),t.get(n.row_index).push(n);return Array.from(t.entries()).sort((n,r)=>n[0]-r[0]).map(([n,r])=>r.sort((o,s)=>{const i={left:0,full:0,right:1};return i[o.column_position]-i[s.column_position]}))}function Zt(e){const t=[];return e.forEach((n,r)=>{n.length===1?t.push({...n[0],row_index:r,column_position:"full"}):n.length>=2&&(t.push({...n[0],row_index:r,column_position:"left"}),t.push({...n[1],row_index:r,column_position:"right"}))}),t}function Yo({section:e,isHalf:t,onToggleVisible:n}){const{attributes:r,listeners:o,setNodeRef:s,transform:i,transition:a,isDragging:c}=Bo({id:e.id}),u={transform:fe.Transform.toString(i),transition:a,opacity:c?.4:1},f=t&&$o.has(e.section_key);return m.jsxs("div",{ref:s,style:u,className:Qe("flex items-center gap-2 sm:gap-3 p-3 rounded-lg border bg-card transition-colors",!e.is_visible&&"bg-muted/50 border-dashed",f&&"border-amber-400/60"),children:[m.jsx("button",{...r,...o,className:"touch-none cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground shrink-0","aria-label":"Drag",children:m.jsx(en,{className:"h-5 w-5"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.jsx("h3",{className:Qe("font-medium text-sm sm:text-base truncate",!e.is_visible&&"text-muted-foreground"),children:e.section_name}),m.jsx(Pn,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-4",children:e.column_position==="full"?"Helbredd":e.column_position==="left"?"Vänster":"Höger"}),f&&m.jsx("span",{className:"text-[10px] text-amber-600",children:"Designad för full bredd"})]}),m.jsx("p",{className:"text-[10px] sm:text-xs text-muted-foreground truncate",children:e.section_key})]}),m.jsx(Xn,{checked:e.is_visible,onCheckedChange:d=>n(e.id,d)})]})}function Ho({rowIndex:e,children:t,itemIds:n,isFull:r,onDeleteRow:o,canDelete:s}){const{setNodeRef:i,isOver:a}=Nt({id:`row-${e}`});return m.jsxs("div",{ref:i,className:Qe("rounded-lg border-2 border-dashed p-2 transition-colors",a?"border-primary bg-primary/5":"border-border/50",r&&"border-muted/40"),children:[m.jsxs("div",{className:"flex items-center justify-between mb-1.5 px-1",children:[m.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:["Rad ",e+1," ",r?"(full)":`(${n.length}/2)`]}),s&&m.jsx("button",{onClick:o,className:"text-[10px] text-muted-foreground hover:text-destructive","aria-label":"Ta bort tom rad",children:m.jsx(Yn,{className:"h-3 w-3"})})]}),m.jsx(Io,{items:n,strategy:Oo,children:m.jsx("div",{className:"grid gap-2 grid-cols-1 sm:grid-cols-2",children:t})})]})}function Ko(){const{setNodeRef:e,isOver:t}=Nt({id:"row-new"});return m.jsxs("div",{ref:e,className:Qe("rounded-lg border-2 border-dashed p-3 text-center text-xs transition-colors",t?"border-primary bg-primary/10 text-primary":"border-border/50 text-muted-foreground"),children:[m.jsx(Hn,{className:"h-4 w-4 inline-block mr-1"}),"Släpp här för att lägga på en ny rad"]})}function Uo({sections:e,onChange:t}){const n=lr(Ft(Ct,{activationConstraint:{distance:3}}),Ft(vn,{activationConstraint:{delay:120,tolerance:5}})),[r,o]=l.useState(null),s=l.useMemo(()=>Xo(e),[e]),i=g=>s.findIndex(h=>h.some(x=>x.id===g)),a=g=>o(String(g.active.id)),c=g=>{o(null);const{active:h,over:x}=g;if(!x)return;const p=String(h.id),v=String(x.id);if(p===v)return;const D=i(p);if(D===-1)return;const y=s[D].find(w=>w.id===p);let b=s.map(w=>w.filter(E=>E.id!==p)),S;if(v==="row-new")b.push([y]),S=b.length-1;else if(v.startsWith("row-"))S=parseInt(v.slice(4),10),Number.isNaN(S)||!b[S]?b.push([y]):b[S].length>=2?b.splice(S+1,0,[y]):b[S].push(y);else{const w=b.findIndex(E=>E.some(R=>R.id===v));if(w===-1)return;b.splice(w,0,[y]),S=w}b=b.filter(w=>w.length>0),t(Zt(b))},u=(g,h)=>{t(e.map(x=>x.id===g?{...x,is_visible:h}
5:x))},f=g=>{const h=s.filter((x,p)=>p!==g);t(Zt(h))},d=r?e.find(g=>g.id===r):null;return m.jsxs(ao,{sensors:n,collisionDetection:hr,onDragStart:a,onDragEnd:c,children:[m.jsxs("div",{className:"space-y-2",children:[s.map((g,h)=>m.jsxs(Ho,{rowIndex:h,itemIds:g.map(x=>x.id),isFull:g.length>=2,onDeleteRow:()=>f(h),canDelete:g.length===0,children:[g.map(x=>m.jsx(Yo,{section:x,isHalf:g.length>=2,onToggleVisible:u},x.id)),g.length===1&&m.jsx("div",{className:"hidden sm:flex rounded-lg border border-dashed border-border/40 items-center justify-center text-[10px] text-muted-foreground p-3",children:"Släpp en sektion här för att skapa två kolumner"})]},h)),m.jsx(Ko,{})]}),m.jsx(Eo,{children:d?m.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-card shadow-lg",children:[m.jsx(en,{className:"h-5 w-5 text-muted-foreground"}),m.jsx("span",{className:"font-medium text-sm",children:d.section_name})]}):null})]})}function cs(){const[e,t]=l.useState([]),[n,r]=l.useState(!0),[o,s]=l.useState(!1),{toast:i}=zn(),{selectedTeamId:a}=$n();l.useEffect(()=>{c()},[a]);const c=async()=>{r(!0);const d=g=>({id:g.id,section_key:g.section_key,section_name:g.section_name,is_visible:g.is_visible??!0,row_index:g.row_index??g.sort_order??0,column_position:g.column_position??"full"});if(a){const{data:g}=await ye.from("team_homepage_sections").select("*").eq("team_id",a).order("row_index",{ascending:!0});if(g&&g.length>0)t(g.map(d));else{const{data:h}=await ye.from("homepage_sections").select("*").order("row_index",{ascending:!0});t((h||[]).map(d))}}else{const{data:g,error:h}=await ye.from("homepage_sections").select("*").order("row_index",{ascending:!0}).order("column_position",{ascending:!0});h?i({title:"Fel",description:"Kunde inte hämta sektioner.",variant:"destructive"}):t((g||[]).map(d))}r(!1)},u=async()=>{s(!0);try{if(a){await ye.from("team_homepage_sections").delete().eq("team_id",a);const d=e.map(h=>({team_id:a,section_key:h.section_key,section_name:h.section_name,is_visible:h.is_visible,sort_order:h.row_index,row_index:h.row_index,column_position:h.column_position})),{error:g}=await ye.from("team_homepage_sections").insert(d);if(g)throw g}else for(const d of e){const{error:g}=await ye.from("homepage_sections").update({is_visible:d.is_visible,sort_order:d.row_index,row_index:d.row_index,column_position:d.column_position}).eq("id",d.id);if(g)throw g}i({title:"Sparat",description:"Startsidans layout har uppdaterats."}),a&&c()}catch(d){i({title:"Fel",description:d.message||"Kunde inte spara ändringarna.",variant:"destructive"})}finally{s(!1)}},f=a?"Lagets sida":"Standard (Herr A)";return m.jsxs("div",{className:"p-4 md:p-6 space-y-4 sm:space-y-6 max-w-full overflow-x-hidden",children:[m.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:m.jsx(Kn,{className:"h-5 w-5 sm:h-6 sm:w-6 text-primary"})}),m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Startsida"}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Drag-and-drop sektioner. Lägg två sektioner på samma rad för 2 kolumner."})]})]}),m.jsxs(_n,{onClick:u,disabled:o,size:"sm",className:"w-full sm:w-auto",children:[o&&m.jsx(_t,{className:"mr-2 h-4 w-4 animate-spin"}),m.jsx(Un,{className:"mr-2 h-4 w-4"}),"Spara ändringar"]})]}),m.jsxs(Pt,{children:[m.jsx(Bn,{children:m.jsxs(Fn,{className:"flex items-center gap-2",children:[m.jsx(Wn,{className:"h-5 w-5"}),"Sektioner — ",f]})}),m.jsx(zt,{children:n?m.jsx("div",{className:"flex items-center justify-center py-12",children:m.jsx(_t,{className:"h-6 w-6 animate-spin"})}):e.length===0?m.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Inga sektioner hittades"}):m.jsx(Uo,{sections:e,onChange:t})})]}),m.jsx(Pt,{className:"bg-muted/50",children:m.jsx(zt,{className:"py-4",children:m.jsxs("p",{className:"text-sm text-muted-foreground",children:[m.jsx("strong",{children:"Tips:"}),' Drag en sektion bredvid en annan så hamnar de på samma rad (vänster/höger). Drag en sektion till "ny rad" längst ner för att flytta ut den till en egen rad. Hero och stora bannrar är designade för full bredd — de kan ändå läggas i 2-kolumnsläge men ser bäst ut som hela rader. Synlighet styrs med strömbrytaren på varje kort. Glöm inte att spara!']})})})]})}export{cs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.