var Wt=Math.min,yt=Math.max,$t=Math.round;var rt=i=>({x:i,y:i}),sn={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(i,t,e){return yt(i,Wt(t,e))}function zt(i,t){return typeof i=="function"?i(t):i}function wt(i){return i.split("-")[0]}function Xt(i){return i.split("-")[1]}function Te(i){return i==="x"?"y":"x"}function Ie(i){return i==="y"?"height":"width"}function pt(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Re(i){return Te(pt(i))}function ti(i,t,e){e===void 0&&(e=!1);let n=Xt(i),s=Re(i),o=Ie(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Vt(r)),[r,Vt(r)]}function ei(i){let t=Vt(i);return[oe(i),t,oe(t)]}function oe(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Qe=["left","right"],Ze=["right","left"],on=["top","bottom"],rn=["bottom","top"];function an(i,t,e){switch(i){case"top":case"bottom":return e?t?Ze:Qe:t?Qe:Ze;case"left":case"right":return t?on:rn;default:return[]}}function ii(i,t,e,n){let s=Xt(i),o=an(wt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(oe)))),o}function Vt(i){let t=wt(i);return sn[t]+i.slice(t.length)}function ln(i){return{top:0,right:0,bottom:0,left:0,...i}}function ni(i){return typeof i!="number"?ln(i):{top:i,right:i,bottom:i,left:i}}function Dt(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function si(i,t,e){let{reference:n,floating:s}=i,o=pt(t),r=Re(t),a=Ie(r),l=wt(t),c=o==="y",u=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,p;switch(l){case"top":p={x:u,y:n.y-s.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-s.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Xt(t)){case"start":p[r]-=f*(e&&c?-1:1);break;case"end":p[r]+=f*(e&&c?-1:1);break}return p}async function oi(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=zt(t,i),m=ni(p),O=a[f?h==="floating"?"reference":"floating":h],x=Dt(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(O)))==null||e?O:O.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=h==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},M=Dt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:A,strategy:l}):w);return{top:(x.top-M.top+m.top)/D.y,bottom:(M.bottom-x.bottom+m.bottom)/D.y,left:(x.left-M.left+m.left)/D.x,right:(M.right-x.right+m.right)/D.x}}var cn=50,ri=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:oi},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:u,y:h}=si(c,n,l),f=n,p=0,m={};for(let g=0;gB<=0)){var Y,it;let B=(((Y=o.flip)==null?void 0:Y.index)||0)+1,Z=J[B];if(Z&&(!(h==="alignment"?w!==pt(Z):!1)||V.every(_=>pt(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:B,overflows:V},reset:{placement:Z}};let k=(it=V.filter($=>$.overflows[0]<=0).sort(($,_)=>$.overflows[1]-_.overflows[1])[0])==null?void 0:it.placement;if(!k)switch(p){case"bestFit":{var W;let $=(W=V.filter(_=>{if(C){let z=pt(_.placement);return z===w||z==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(z=>z>0).reduce((z,j)=>z+j,0)]).sort((_,z)=>_[1]-z[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=a;break}if(s!==k)return{reset:{placement:k}}}return{}}}};var hn=new Set(["left","top"]);async function un(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=wt(e),a=Xt(e),l=pt(e)==="y",c=hn.has(r)?-1:1,u=o&&l?-1:1,h=zt(t,i),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var li=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await un(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},ci=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:w,y:A}=x;return{x:w,y:A}}},...c}=zt(i,t),u={x:e,y:n},h=await o.detectOverflow(t,c),f=pt(wt(s)),p=Te(f),m=u[p],g=u[f];if(r){let x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",A=m+h[x],D=m-h[w];m=Le(A,m,D)}if(a){let x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",A=g+h[x],D=g-h[w];g=Le(A,g,D)}let O=l.fn({...t,[p]:m,[f]:g});return{...O,data:{x:O.x-e,y:O.y-n,enabled:{[p]:r,[f]:a}}}}}};function ae(){return typeof window<"u"}function At(i){return ui(i)?(i.nodeName||"").toLowerCase():"#document"}function U(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function ct(i){var t;return(t=(ui(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function ui(i){return ae()?i instanceof Node||i instanceof U(i).Node:!1}function nt(i){return ae()?i instanceof Element||i instanceof U(i).Element:!1}function ht(i){return ae()?i instanceof HTMLElement||i instanceof U(i).HTMLElement:!1}function hi(i){return!ae()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof U(i).ShadowRoot}function Rt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=st(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function di(i){return/^(table|td|th)$/.test(At(i))}function Yt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var dn=/transform|translate|scale|rotate|perspective|filter/,fn=/paint|layout|strict|content/,xt=i=>!!i&&i!=="none",Me;function le(i){let t=nt(i)?st(i):i;return xt(t.transform)||xt(t.translate)||xt(t.scale)||xt(t.rotate)||xt(t.perspective)||!ce()&&(xt(t.backdropFilter)||xt(t.filter))||dn.test(t.willChange||"")||fn.test(t.contain||"")}function fi(i){let t=mt(i);for(;ht(t)&&!Ct(t);){if(le(t))return t;if(Yt(t))return null;t=mt(t)}return null}function ce(){return Me==null&&(Me=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Me}function Ct(i){return/^(html|body|#document)$/.test(At(i))}function st(i){return U(i).getComputedStyle(i)}function Kt(i){return nt(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function mt(i){if(At(i)==="html")return i;let t=i.assignedSlot||i.parentNode||hi(i)&&i.host||ct(i);return hi(t)?t.host:t}function pi(i){let t=mt(i);return Ct(t)?i.ownerDocument?i.ownerDocument.body:i.body:ht(t)&&Rt(t)?t:pi(t)}function re(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=pi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=U(s);if(o){let a=he(r);return t.concat(r,r.visualViewport||[],Rt(s)?s:[],a&&e?re(a):[])}else return t.concat(s,re(s,[],e))}function he(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function vi(i){let t=st(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=ht(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=$t(e)!==o||$t(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function yi(i){return nt(i)?i:i.contextElement}function Mt(i){let t=yi(i);if(!ht(t))return rt(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=vi(t),r=(o?$t(e.width):e.width)/n,a=(o?$t(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var pn=rt(0);function wi(i){let t=U(i);return!ce()||!t.visualViewport?pn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mn(i,t,e){return t===void 0&&(t=!1),!e||t&&e!==U(i)?!1:t}function jt(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=yi(i),r=rt(1);t&&(n?nt(n)&&(r=Mt(n)):r=Mt(i));let a=mn(o,e,n)?wi(o):rt(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,h=s.height/r.y;if(o){let f=U(o),p=n&&nt(n)?U(n):n,m=f,g=he(m);for(;g&&n&&p!==m;){let O=Mt(g),x=g.getBoundingClientRect(),w=st(g),A=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*O.x,D=x.top+(g.clientTop+parseFloat(w.paddingTop))*O.y;l*=O.x,c*=O.y,u*=O.x,h*=O.y,l+=A,c+=D,m=U(g),g=he(m)}}return Dt({width:u,height:h,x:l,y:c})}function ue(i,t){let e=Kt(i).scrollLeft;return t?t.left+e:jt(ct(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-ue(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function gn(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=ct(n),a=t?Yt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=rt(1),u=rt(0),h=ht(n);if((h||!h&&!o)&&((At(n)!=="body"||Rt(r))&&(l=Kt(n)),h)){let p=jt(n);c=Mt(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=r&&!h&&!o?Si(r,l):rt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:e.y*c.y-l.scrollTop*c.y+u.y+f.y}}function bn(i){return Array.from(i.getClientRects())}function vn(i){let t=ct(i),e=Kt(i),n=i.ownerDocument.body,s=yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),r=-e.scrollLeft+ue(i),a=-e.scrollTop;return st(n).direction==="rtl"&&(r+=yt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:r,y:a}}var mi=25;function yn(i,t){let e=U(i),n=ct(i),s=e.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;let u=ce();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}let c=ue(n);if(c<=0){let u=n.ownerDocument,h=u.body,f=getComputedStyle(h),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-p);m<=mi&&(o-=m)}else c<=mi&&(o+=c);return{width:o,height:r,x:a,y:l}}function wn(i,t){let e=jt(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=ht(i)?Mt(i):rt(1),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function gi(i,t,e){let n;if(t==="viewport")n=yn(i,e);else if(t==="document")n=vn(ct(i));else if(nt(t))n=wn(t,e);else{let s=wi(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Dt(n)}function Oi(i,t){let e=mt(i);return e===t||!nt(e)||Ct(e)?!1:st(e).position==="fixed"||Oi(e,t)}function Sn(i,t){let e=t.get(i);if(e)return e;let n=re(i,[],!1).filter(a=>nt(a)&&At(a)!=="body"),s=null,o=st(i).position==="fixed",r=o?mt(i):i;for(;nt(r)&&!Ct(r);){let a=st(r),l=le(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Rt(r)&&!l&&Oi(i,r))?n=n.filter(u=>u!==r):s=a,r=mt(r)}return t.set(i,n),n}function On(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Yt(t)?[]:Sn(t,this._c):[].concat(e),n],a=gi(t,r[0],s),l=a.top,c=a.right,u=a.bottom,h=a.left;for(let f=1;f{let n=new Map,s={platform:Cn,...e},o={...s.platform,_c:n};return ri(i,t,{...s,platform:o})};function Ln(i,t,e){return(t=Mn(t))in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function bt(){return bt=Object.assign?Object.assign.bind():function(i){for(var t=1;t"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function Hi(i){return i.host&&i!==document&&i.host.nodeType&&i.host!==i?i.host:i.parentNode}function lt(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&we(i,t):we(i,t))||n&&i===e)return i;if(i===e)break}while(i=Hi(i))}return null}var Ii=/\s+/g;function tt(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(Ii," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(Ii," ")}}function b(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function kt(i,t){var e="";if(typeof i=="string")e=i;else do{var n=b(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(e)}function Vi(i,t,e){if(i){var n=i.getElementsByTagName(t),s=0,o=n.length;if(e)for(;s=o:r=s<=o,!r)return n;if(n===ut())break;n=Et(n,!1)}return!1}function Ft(i,t,e,n){for(var s=0,o=0,r=i.children;o2&&arguments[2]!==void 0?arguments[2]:{},s=n.evt,o=Tn(n,Wn);ne.pluginEvent.bind(v)(t,e,dt({dragEl:d,parentEl:R,ghostEl:y,rootEl:L,nextEl:It,lastDownEl:ge,cloneEl:T,cloneHidden:Ot,dragStarted:Ut,putSortable:H,activeSortable:v.active,originalEvent:s,oldIndex:Bt,oldDraggableIndex:Zt,newIndex:et,newDraggableIndex:St,hideGhostForTarget:Ui,unhideGhostForTarget:Gi,cloneNowHidden:function(){Ot=!0},cloneNowShown:function(){Ot=!1},dispatchSortableEvent:function(a){K({sortable:e,name:a,originalEvent:s})}},o))};function K(i){Vn(dt({putSortable:H,cloneEl:T,targetEl:d,rootEl:L,oldIndex:Bt,oldDraggableIndex:Zt,newIndex:et,newDraggableIndex:St},i))}var d,R,y,L,It,ge,T,Ot,Bt,et,Zt,St,de,H,Nt=!1,Se=!1,Oe=[],Lt,at,Be,ke,_i,Pi,Ut,Pt,te,ee=!1,fe=!1,be,X,Fe=[],Xe=!1,Ee=[],xe=typeof document<"u",pe=Ue,Ni=ie||vt?"cssFloat":"float",$n=xe&&!ki&&!Ue&&"draggable"in document.createElement("div"),Yi=(function(){if(xe){if(vt)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}})(),Ki=function(t,e){var n=b(t),s=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Ft(t,0,e),r=Ft(t,1,e),a=o&&b(o),l=r&&b(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+N(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+N(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var h=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===h)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=s&&n[Ni]==="none"||r&&n[Ni]==="none"&&c+u>s)?"vertical":"horizontal"},zn=function(t,e,n){var s=n?t.left:t.top,o=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,c=n?e.width:e.height;return s===a||o===l||s+r/2===a+c/2},Xn=function(t,e){var n;return Oe.some(function(s){var o=s[q].options.emptyInsertThreshold;if(!(!o||Ge(s))){var r=N(s),a=t>=r.left-o&&t<=r.right+o,l=e>=r.top-o&&e<=r.bottom+o;if(a&&l)return n=s}}),n},ji=function(t){function e(o,r){return function(a,l,c,u){var h=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(r||h))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return e(o(a,l,c,u),r)(a,l,c,u);var f=(r?a:l).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var n={},s=t.group;(!s||ze(s)!="object")&&(s={name:s}),n.name=s.name,n.checkPull=e(s.pull,!0),n.checkPut=e(s.put),n.revertClone=s.revertClone,t.group=n},Ui=function(){!Yi&&y&&b(y,"display","none")},Gi=function(){!Yi&&y&&b(y,"display","")};xe&&!ki&&document.addEventListener("click",function(i){if(Se)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Se=!1,!1},!0);var Tt=function(t){if(d){t=t.touches?t.touches[0]:t;var e=Xn(t.clientX,t.clientY);if(e){var n={};for(var s in t)t.hasOwnProperty(s)&&(n[s]=t[s]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[q]._onDragOver(n)}}},Yn=function(t){d&&d.parentNode[q]._isOutsideThisEl(t.target)};function v(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=bt({},t),i[q]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ki(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:v.supportPointer!==!1&&"PointerEvent"in window&&(!Jt||Ue),emptyInsertThreshold:5};ne.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);ji(t);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=t.forceFallback?!1:$n,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(i,"pointerdown",this._onTapStart):(E(i,"mousedown",this._onTapStart),E(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(i,"dragover",this),E(i,"dragenter",this)),Oe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,kn())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Pt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,d):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,s=this.options,o=s.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=s.filter;if(Zn(n),!d&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||s.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Jt&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=lt(l,s.draggable,n,!1),!(l&&l.animated)&&ge!==l)){if(Bt=ot(l),Zt=ot(l,s.draggable),typeof u=="function"){if(u.call(this,t,l,this)){K({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",e,{evt:t}),o&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(h){if(h=lt(c,h.trim(),n,!1),h)return K({sortable:e,rootEl:h,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",e,{evt:t}),!0}),u)){o&&t.preventDefault();return}s.handle&&!lt(c,s.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var s=this,o=s.el,r=s.options,a=o.ownerDocument,l;if(n&&!d&&n.parentNode===o){var c=N(n);if(L=o,d=n,R=d.parentNode,It=d.nextSibling,ge=n,de=r.group,v.dragged=d,Lt={target:d,clientX:(e||t).clientX,clientY:(e||t).clientY},_i=Lt.clientX-c.left,Pi=Lt.clientY-c.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,d.style["will-change"]="all",l=function(){if(G("delayEnded",s,{evt:t}),v.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!Ti&&s.nativeDraggable&&(d.draggable=!0),s._triggerDragStart(t,e),K({sortable:s,name:"choose",originalEvent:t}),tt(d,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){Vi(d,u.trim(),He)}),E(a,"dragover",Tt),E(a,"mousemove",Tt),E(a,"touchmove",Tt),r.supportPointer?(E(a,"pointerup",s._onDrop),!this.nativeDraggable&&E(a,"pointercancel",s._onDrop)):(E(a,"mouseup",s._onDrop),E(a,"touchend",s._onDrop),E(a,"touchcancel",s._onDrop)),Ti&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),G("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ie||vt))){if(v.eventCanceled){this._onDrop();return}r.supportPointer?(E(a,"pointerup",s._disableDelayedDrag),E(a,"pointercancel",s._disableDelayedDrag)):(E(a,"mouseup",s._disableDelayedDrag),E(a,"touchend",s._disableDelayedDrag),E(a,"touchcancel",s._disableDelayedDrag)),E(a,"mousemove",s._delayedDragTouchMoveHandler),E(a,"touchmove",s._delayedDragTouchMoveHandler),r.supportPointer&&E(a,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&He(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"pointerup",this._disableDelayedDrag),S(t,"pointercancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):e?E(document,"touchmove",this._onTouchMove):E(document,"mousemove",this._onTouchMove):(E(d,"dragend",this),E(L,"dragstart",this._onDragStart));try{document.selection?ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Nt=!1,L&&d){G("dragStarted",this,{evt:e}),this.nativeDraggable&&E(document,"dragover",Yn);var n=this.options;!t&&tt(d,n.dragClass,!1),tt(d,n.ghostClass,!0),v.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Ui();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY),t!==e);)e=t;if(d.parentNode[q]._isOutsideThisEl(t),e)do{if(e[q]){var n=void 0;if(n=e[q]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=Hi(e));Gi()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,s=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=y&&kt(y,!0),a=y&&r&&r.a,l=y&&r&&r.d,c=pe&&X&&Mi(X),u=(o.clientX-Lt.clientX+s.x)/(a||1)+(c?c[0]-Fe[0]:0)/(a||1),h=(o.clientY-Lt.clientY+s.y)/(l||1)+(c?c[1]-Fe[1]:0)/(l||1);if(!v.active&&!Nt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(K({rootEl:R,name:"add",toEl:R,fromEl:L,originalEvent:t}),K({sortable:this,name:"remove",toEl:R,originalEvent:t}),K({rootEl:R,name:"sort",toEl:R,fromEl:L,originalEvent:t}),K({sortable:this,name:"sort",toEl:R,originalEvent:t})),H&&H.save()):et!==Bt&&et>=0&&(K({sortable:this,name:"update",toEl:R,originalEvent:t}),K({sortable:this,name:"sort",toEl:R,originalEvent:t})),v.active&&((et==null||et===-1)&&(et=Bt,St=Zt),K({sortable:this,name:"end",toEl:R,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){G("nulling",this),L=d=R=y=It=T=ge=Ot=Lt=at=Ut=et=St=Bt=Zt=Pt=te=H=de=v.dragged=v.ghost=v.clone=v.active=null;var t=this.el;Ee.forEach(function(e){t.contains(e)&&(e.checked=!0)}),Ee.length=Be=ke=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":d&&(this._onDragOver(t),Kn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,s=0,o=n.length,r=this.options;ss.right+o||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>s.bottom+o||i.clientX>n.right&&i.clientY>n.top}function qn(i,t,e,n,s,o,r,a){var l=n?i.clientY:i.clientX,c=n?e.height:e.width,u=n?e.top:e.left,h=n?e.bottom:e.right,f=!1;if(!r){if(a&&beu+c*o/2:lh-be)return-te}else if(l>u+c*(1-s)/2&&lh-c*o/2)?l>u+c/2?1:-1:0}function Jn(i){return ot(d){},options:k,optionsLimit:$=null,placeholder:_,position:z=null,removeButtonLabel:j="Remove :label",searchableOptionFields:Ht=["label"],searchDebounce:Ce=1e3,searchingMessage:Qi="Searching...",searchLabel:Zi="Search",searchPrompt:tn="Search...",state:en,statePath:nn=null}){this.accessibilityAttributes=t,this.ariaLabel=e,this.canOptionLabelsWrap=n,this.canSelectPlaceholder=s,this.clearButtonLabel=o,this.element=r,this.errorMessage=a,this.getOptionLabelUsing=l,this.getOptionLabelsUsing=c,this.getOptionsUsing=u,this.getSearchResultsUsing=h,this.hasDynamicOptions=f,this.hasDynamicSearchResults=p&&typeof h=="function",this.hasInitialNoOptionsMessage=m,this.id=g,this.initialOptionLabel=O,this.initialOptionLabels=x,this.initialState=w,this.isAutofocused=A,this.isDisabled=D,this.isHtmlAllowed=M,this.isMultiple=C,this.isReorderable=J,this.isSearchable=Q,this.livewireId=I,this.loadingMessage=V,this.maxItems=Y,this.maxItemsMessage=it,this.noOptionsMessage=W,this.noSearchResultsMessage=B,this.onStateChange=Z,this.options=k,this.optionsLimit=$,this.originalOptions=JSON.parse(JSON.stringify(k)),this.placeholder=_,this.position=z,this.removeButtonLabel=j,this.searchableOptionFields=Array.isArray(Ht)?Ht:["label"],this.searchDebounce=Ce,this.searchingMessage=Qi,this.searchLabel=Zi,this.searchPrompt=tn,this.state=en,this.statePath=nn,this.activeSearchId=0,this.openId=0,this.isDestroyed=!1,this.labelRepository={},this.isOpen=!1,this.activeValue=null,this.typeahead="",this.typeaheadTime=0,this.searchQuery="",this.searchTimeout=null,this.isSearching=!1,this.isLoadingOptions=!1,this.hasOptionsError=!1,this.maxItemsMessageElement=null,this.badgesSortable=null,this.selectedDisplayVersion=0,this.render(),this.setUpEventListeners(),this.isAutofocused&&this.selectButton.focus()}populateLabelRepositoryFromOptions(t){if(!(!t||!Array.isArray(t)))for(let e of t)e.options&&Array.isArray(e.options)?this.populateLabelRepositoryFromOptions(e.options):e.value!==void 0&&e.label!==void 0&&(this.labelRepository[e.value]=e.label)}render(){this.populateLabelRepositoryFromOptions(this.options),this.container=document.createElement("div"),this.container.className="fi-select-input-ctn",this.canOptionLabelsWrap||this.container.classList.add("fi-select-input-ctn-option-labels-not-wrapped"),this.selectButton=document.createElement("button"),this.selectButton.className="fi-select-input-btn",this.selectButton.type="button",this.isSearchable||this.selectButton.setAttribute("role","combobox"),this.selectButton.setAttribute("aria-haspopup","listbox"),this.selectButton.setAttribute("aria-expanded","false"),F(this.id)&&(this.selectButton.id=this.id),F(this.ariaLabel)&&this.selectButton.setAttribute("aria-label",this.ariaLabel),this.selectedDisplay=document.createElement("div"),this.selectedDisplay.className="fi-select-input-value-ctn",this.isMultiple?(this.container.classList.add("fi-select-input-ctn-multiple"),this.isReorderable&&this.container.classList.add("fi-select-input-ctn-reorderable"),this.selectionSummary=document.createElement("span"),this.selectionSummary.className="fi-sr-only",this.selectButton.appendChild(this.selectionSummary)):this.selectButton.appendChild(this.selectedDisplay),this.dropdown=document.createElement("div"),this.dropdown.className="fi-dropdown-panel fi-scrollable",this.dropdown.style.display="none",this.dropdownId=`fi-select-input-dropdown-${Math.random().toString(36).substring(2,11)}`,this.selectButton.setAttribute("aria-controls",this.dropdownId),this.selectionSummary||(this.selectionSummary=document.createElement("span"),this.selectionSummary.className="fi-sr-only",this.container.appendChild(this.selectionSummary)),this.selectionSummary.id=`${this.dropdownId}-value`,this.isSearchable&&(this.searchContainer=document.createElement("div"),this.searchContainer.className="fi-select-input-search-ctn",this.searchInput=document.createElement("input"),this.searchInput.className="fi-input",this.searchInput.type="text",this.searchInput.placeholder=this.searchPrompt,this.searchInput.setAttribute("role","combobox"),this.searchInput.setAttribute("aria-autocomplete","list"),this.searchInput.setAttribute("aria-expanded","false"),this.searchInput.setAttribute("aria-controls",this.dropdownId),this.searchContainer.appendChild(this.searchInput),this.dropdown.appendChild(this.searchContainer),this.searchInput.addEventListener("input",t=>{this.isDisabled||this.handleSearch(t)})),this.optionsList=document.createElement("ul"),this.optionsList.id=this.dropdownId,this.optionsList.setAttribute("role","listbox"),this.isMultiple&&this.optionsList.setAttribute("aria-multiselectable","true"),this.optionsList.addEventListener("mousedown",t=>t.preventDefault()),this.dropdown.addEventListener("mousedown",t=>{t.target===this.dropdown&&t.preventDefault()}),this.statusRegion=document.createElement("div"),this.statusRegion.className="fi-sr-only",this.statusRegion.setAttribute("role","status"),this.statusRegion.setAttribute("aria-live","polite"),this.statusRegion.setAttribute("aria-atomic","true"),this.renderOptions(),this.container.appendChild(this.selectButton),this.isMultiple&&this.container.appendChild(this.selectedDisplay),this.container.appendChild(this.dropdown),this.container.appendChild(this.statusRegion),this.element.appendChild(this.container),this.setAccessibilityAttributes(this.accessibilityAttributes),this.updateSelectedDisplay(),this.applyDisabledState()}renderOptions(){if(this.isSearching||this.hasOptionsError||this.isLoadingOptions&&(!this.searchQuery||!this.hasDynamicSearchResults))return;let t=this.activeValue;this.setActiveOption(null),this.optionsList.innerHTML="";let e=0,n=this.options,s=0,o=!1;this.options.forEach(l=>{l.options&&Array.isArray(l.options)?(s+=l.options.length,o=!0):s++}),o?this.optionsList.className="fi-select-input-options-ctn":s>0&&(this.optionsList.className="fi-dropdown-list");let r=o?null:this.optionsList,a=0;for(let l of n){if(this.optionsLimit>0&&a>=this.optionsLimit)break;if(l.options&&Array.isArray(l.options)){let c=l.options;if(this.isMultiple&&Array.isArray(this.state)&&this.state.length>0&&(c=l.options.filter(u=>!this.state.includes(u.value))),c.length>0){if(this.optionsLimit>0){let u=this.optionsLimit-a;uc.dataset.value===t)??(t!==null||!this.isSearchable?l.find(c=>this.typeahead&&ft(c.textContent.trim()).startsWith(this.typeahead))??l.find(c=>c.dataset.value===this.state)??l[0]:null))}}renderOptionGroup(t,e){if(e.length===0)return;let n=document.createElement("li");n.className="fi-select-input-option-group",n.setAttribute("role","presentation");let s=document.createElement("div");s.className="fi-dropdown-header",s.textContent=t;let o=document.createElement("ul");o.className="fi-dropdown-list",o.setAttribute("role","group"),o.setAttribute("aria-label",t),e.forEach(r=>{let a=this.createOptionElement(r.value,r);o.appendChild(a)}),n.appendChild(s),n.appendChild(o),this.optionsList.appendChild(n)}createOptionElement(t,e){let n=t,s=e,o=!1;typeof e=="object"&&e!==null&&"label"in e&&"value"in e&&(n=e.value,s=e.label,o=e.isDisabled||!1);let r=document.createElement("li");r.className="fi-dropdown-list-item fi-select-input-option",o&&r.classList.add("fi-disabled");let a=`fi-select-input-option-${Math.random().toString(36).substring(2,11)}`;if(r.id=a,r.setAttribute("role","option"),r.setAttribute("data-value",n),o&&r.setAttribute("aria-disabled","true"),this.isHtmlAllowed&&typeof s=="string"){let u=document.createElement("div");u.innerHTML=s;let h=u.textContent||u.innerText||s;r.setAttribute("aria-label",h)}let l=this.isMultiple?Array.isArray(this.state)&&this.state.includes(n):this.state===n;r.setAttribute("aria-selected",l?"true":"false");let c=document.createElement("span");return this.isHtmlAllowed?c.innerHTML=s:c.textContent=s,r.appendChild(c),o||r.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),this.selectOption(n)}),r}async updateSelectedDisplay(){if(this.isDestroyed)return;this.selectedDisplayVersion=this.selectedDisplayVersion+1;let t=this.selectedDisplayVersion,e=document.createDocumentFragment();if(this.isMultiple){if(!Array.isArray(this.state)||this.state.length===0){let s=document.createElement("span");s.textContent=this.placeholder,s.classList.add("fi-select-input-placeholder"),e.appendChild(s)}else{let s=await this.getLabelsForMultipleSelection();if(t!==this.selectedDisplayVersion)return;this.addBadgesForSelectedOptions(s,e)}t===this.selectedDisplayVersion&&(e.querySelector(".fi-select-input-value-badges-ctn")||this.destroyBadgesSortable(),this.commitSelectedDisplay(e),this.isOpen&&this.deferPositionDropdown());return}if(this.state===null||this.state===""){let s=document.createElement("span");if(s.textContent=this.placeholder,s.classList.add("fi-select-input-placeholder"),e.appendChild(s),t===this.selectedDisplayVersion){this.destroyBadgesSortable(),this.commitSelectedDisplay(e);let o=this.container.querySelector(".fi-select-input-value-remove-btn");o&&o.remove(),this.container.classList.remove("fi-select-input-ctn-clearable")}return}let n=await this.getLabelForSingleSelection();t===this.selectedDisplayVersion&&(this.addSingleSelectionDisplay(n,e),t===this.selectedDisplayVersion&&(this.destroyBadgesSortable(),this.commitSelectedDisplay(e)))}commitSelectedDisplay(t){let e=this.selectedDisplay.contains(document.activeElement)?document.activeElement:null,n=e?.closest("[data-value]")?.dataset.value;this.selectedDisplay.replaceChildren(t),this.updateSelectionSummary(),e&&(this.isOpen?this.getFocusOwner():this.selectedDisplay.querySelector(`[data-value="${CSS.escape(n??"")}"] button`)??this.selectButton).focus()}updateSelectionSummary(){this.selectionSummary.textContent=Array.from(this.selectedDisplay.querySelectorAll(".fi-badge-label, .fi-select-input-value-label, .fi-select-input-placeholder"),t=>t.textContent).join(", ")}async getLabelsForMultipleSelection(){let t=this.selectedDisplayVersion,e=this.getSelectedOptionLabels(),n=[];if(Array.isArray(this.state)){for(let o of this.state)if(!F(this.labelRepository[o])){if(F(e[o])){this.labelRepository[o]=e[o];continue}n.push(o.toString())}}if(n.length>0&&F(this.initialOptionLabels)&&JSON.stringify(this.state)===JSON.stringify(this.initialState)){if(Array.isArray(this.initialOptionLabels))for(let o of this.initialOptionLabels)F(o)&&o.value!==void 0&&o.label!==void 0&&n.includes(o.value)&&(this.labelRepository[o.value]=o.label)}else if(n.length>0&&this.getOptionLabelsUsing)try{let o=await this.getOptionLabelsUsing();if(this.isDestroyed||t!==this.selectedDisplayVersion)return[];for(let r of o)F(r)&&r.value!==void 0&&r.label!==void 0&&(this.labelRepository[r.value]=r.label)}catch(o){console.error("Error fetching option labels:",o)}let s=[];if(Array.isArray(this.state))for(let o of this.state)F(this.labelRepository[o])?s.push(this.labelRepository[o]):F(e[o])?s.push(e[o]):s.push(o);return s}createBadgeElement(t,e){let n=document.createElement("span");n.className="fi-badge fi-size-md fi-color fi-color-primary fi-text-color-700 dark:fi-text-color-200",F(t)&&n.setAttribute("data-value",t);let s=document.createElement("span");s.className="fi-badge-label-ctn";let o=document.createElement("span");o.className="fi-badge-label",this.canOptionLabelsWrap&&o.classList.add("fi-wrapped"),this.isHtmlAllowed?o.innerHTML=e:o.textContent=e,s.appendChild(o),n.appendChild(s);let r=this.createRemoveButton(t,e);return n.appendChild(r),n}createRemoveButton(t,e){let n=document.createElement("button");n.type="button",n.className="fi-badge-delete-btn",n.setAttribute("aria-label",this.removeButtonLabel.replace(":label",this.isHtmlAllowed?e.replace(/<[^>]*>/g,""):e));let s=document.createElement("span");return s.className="fi-badge-delete-btn-icon",s.setAttribute("aria-hidden","true"),n.appendChild(s),this.isDisabled&&(n.setAttribute("disabled","disabled"),n.classList.add("fi-disabled")),n.addEventListener("click",o=>{if(o.stopPropagation(),F(t)){let r=Array.from(this.selectedDisplay.querySelectorAll(".fi-badge-delete-btn")),a=r.indexOf(n),l=this.isOpen?this.getFocusOwner():r[a+1]??r[a-1]??this.selectButton;this.selectOption(t),this.isDisabled||l.focus()}}),n.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),o.stopPropagation(),n.click())}),n}addBadgesForSelectedOptions(t,e=this.selectedDisplay){let n=document.createElement("div");n.className="fi-select-input-value-badges-ctn",t.forEach((s,o)=>{let r=Array.isArray(this.state)?this.state[o]:null,a=this.createBadgeElement(r,s);n.appendChild(a)}),e.appendChild(n),this.isReorderable&&(n.addEventListener("click",s=>{s.stopPropagation()}),n.addEventListener("mousedown",s=>{s.stopPropagation()}),this.destroyBadgesSortable(),this.badgesSortable=new Ji(n,{animation:150,disabled:this.isDisabled,onEnd:()=>{let s=[];n.querySelectorAll("[data-value]").forEach(o=>{s.push(o.getAttribute("data-value"))}),this.state=s,this.updateSelectionSummary(),this.onStateChange(this.state)}}))}destroyBadgesSortable(){this.badgesSortable?.destroy(),this.badgesSortable=null}async getLabelForSingleSelection(){let t=this.state,e=this.selectedDisplayVersion,n=this.labelRepository[this.state];if(se(n)&&(n=this.getSelectedOptionLabel(this.state)),se(n)&&F(this.initialOptionLabel)&&this.state===this.initialState)n=this.initialOptionLabel,F(this.state)&&(this.labelRepository[this.state]=n);else if(se(n)&&this.getOptionLabelUsing)try{if(n=await this.getOptionLabelUsing(),this.isDestroyed||e!==this.selectedDisplayVersion||t!==this.state)return null;F(n)&&F(this.state)&&(this.labelRepository[t]=n)}catch(s){console.error("Error fetching option label:",s),n=this.state}else se(n)&&(n=this.state);return n}addSingleSelectionDisplay(t,e=this.selectedDisplay){let n=document.createElement("span");if(n.className="fi-select-input-value-label",this.isHtmlAllowed?n.innerHTML=t:n.textContent=t,e.appendChild(n),!this.canSelectPlaceholder||this.container.querySelector(".fi-select-input-value-remove-btn"))return;let s=document.createElement("button");s.type="button",s.className="fi-select-input-value-remove-btn",s.setAttribute("aria-label",this.clearButtonLabel),this.isDisabled&&(s.setAttribute("disabled","disabled"),s.classList.add("fi-disabled")),s.addEventListener("click",o=>{o.stopPropagation(),this.selectOption("")}),s.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),o.stopPropagation(),this.selectOption(""))}),this.container.appendChild(s),this.container.classList.add("fi-select-input-ctn-clearable")}getSelectedOptionLabel(t){if(F(this.labelRepository[t]))return this.labelRepository[t];let e="";for(let n of this.options)if(n.options&&Array.isArray(n.options)){for(let s of n.options)if(s.value===t){e=s.label,this.labelRepository[t]=e;break}}else if(n.value===t){e=n.label,this.labelRepository[t]=e;break}return e}setUpEventListeners(){this.buttonClickListener=()=>{this.toggleDropdown()},this.documentClickListener=t=>{!this.container.contains(t.target)&&this.isOpen&&this.closeDropdown()},this.buttonKeydownListener=t=>{this.isDisabled||this.handleSelectButtonKeydown(t)},this.dropdownKeydownListener=t=>{this.isDisabled||this.handleDropdownKeydown(t)},this.focusinListener=()=>this.syncActiveDescendant(),this.focusoutListener=t=>{this.selectButton.removeAttribute("aria-activedescendant"),this.searchInput?.removeAttribute("aria-activedescendant"),queueMicrotask(()=>{this.isDestroyed||!this.isOpen||(this.isTabbing||!this.container.contains(t.relatedTarget))&&(this.isTabbing=!1,this.closeDropdown())})},this.dropdownEscapeListener=t=>{this.isOpen&&(this.closeDropdown(),this.selectButton.focus(),t.preventDefault(),t.stopPropagation())},this.selectButton.addEventListener("click",this.buttonClickListener),document.addEventListener("click",this.documentClickListener),this.selectButton.addEventListener("keydown",this.buttonKeydownListener),this.dropdown.addEventListener("keydown",this.dropdownKeydownListener),this.container.addEventListener("focusin",this.focusinListener),this.container.addEventListener("focusout",this.focusoutListener),this.element.addEventListener("dropdown-escape",this.dropdownEscapeListener),!this.isMultiple&&this.livewireId&&this.statePath&&this.getOptionLabelUsing&&(this.refreshOptionLabelListener=async t=>{if(t.detail.livewireId===this.livewireId&&t.detail.statePath===this.statePath&&F(this.state))try{let e=this.state,n=++this.selectedDisplayVersion;delete this.labelRepository[this.state];let s=await this.getOptionLabelUsing();if(this.isDestroyed||e!==this.state||n!==this.selectedDisplayVersion)return;this.updateOptionLabelInList(this.state,s),this.updateSelectedDisplay()}catch(e){console.error("Error refreshing option label:",e)}},window.addEventListener("filament-forms::select.refreshSelectedOptionLabel",this.refreshOptionLabelListener))}updateOptionLabelInList(t,e){this.labelRepository[t]=e;let n=this.getVisibleOptions();for(let s of n)if(s.getAttribute("data-value")===String(t)){if(s.innerHTML="",this.isHtmlAllowed){let o=document.createElement("span");o.innerHTML=e,s.appendChild(o),s.setAttribute("aria-label",o.textContent||o.innerText||e)}else s.appendChild(document.createTextNode(e));break}for(let s of this.options)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===t){o.label=e;break}}else if(s.value===t){s.label=e;break}for(let s of this.originalOptions)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===t){o.label=e;break}}else if(s.value===t){s.label=e;break}}handleSelectButtonKeydown(t){if(!(t.isComposing||t.keyCode===229)){if((!this.isOpen||this.isSearchable)&&["Enter"," ","ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault(),t.stopPropagation(),this.openDropdown();return}this.handleDropdownKeydown(t)}}handleDropdownKeydown(t){if(t.isComposing||t.keyCode===229)return;let e=t.target===this.searchInput,n=this.getEnabledOptions();switch(t.key){case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.focusNextOption();break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),this.focusPreviousOption();break;case" ":if(e)return;case"Enter":if(!this.isOpen)return;t.preventDefault(),t.stopPropagation();let s=n.find(o=>o.dataset.value===this.activeValue)??(e?n[0]:null);s&&this.selectOption(s.dataset.value);break;case"Escape":if(!this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.closeDropdown(),this.selectButton.focus();break;case"Tab":this.isTabbing=this.isOpen;break;case"Home":case"End":if(e||!this.isOpen)return;t.preventDefault(),t.stopPropagation(),this.setActiveOption(t.key==="Home"?n[0]:n.at(-1));break;default:if(!e&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&typeof t.key=="string"&&t.key.length===1)if(t.preventDefault(),this.isOpen||this.openDropdown(),this.isSearchable)this.searchInput.value=(this.searchInput.value||"")+t.key,this.searchInput.dispatchEvent(new Event("input",{bubbles:!0}));else{let o=Date.now();this.typeahead=(o-this.typeaheadTime<1e3?this.typeahead:"")+ft(t.key),this.typeaheadTime=o;let r=this.getEnabledOptions().find(a=>ft(a.textContent.trim()).startsWith(this.typeahead));r&&this.setActiveOption(r)}break}}toggleDropdown(){if(!this.isDisabled){if(this.isOpen){this.closeDropdown();return}this.openDropdown()}}async openDropdown(){if(this.isDestroyed||this.isDisabled)return;if(this.isOpen){this.getFocusOwner().focus();return}let t=++this.openId,e=++this.activeSearchId;this.typeahead="",this.hasOptionsError=!1;let n=`${this.selectButton.offsetWidth}px`;this.dropdown.style.display="block",this.dropdown.style.opacity="0";let s=this.selectButton.closest(".fi-fixed-positioning-context")!==null&&this.selectButton.closest(".fi-absolute-positioning-context")===null;if(this.dropdown.style.position=s?"fixed":"absolute",this.dropdown.style.width=n,this.selectButton.setAttribute("aria-expanded","true"),this.searchInput?.setAttribute("aria-expanded","true"),this.isOpen=!0,this.isTabbing=!1,this.getFocusOwner().focus(),this.positionDropdown(),this.resizeListener||(this.resizeListener=()=>{this.dropdown.style.width=`${this.selectButton.offsetWidth}px`,this.positionDropdown()},window.addEventListener("resize",this.resizeListener)),this.scrollListener||(this.scrollListener=()=>this.positionDropdown(),window.addEventListener("scroll",this.scrollListener,!0)),this.dropdown.style.opacity="1",this.isSearchable&&this.searchInput&&(this.searchInput.value="",this.searchQuery=""),this.hasDynamicOptions||(this.options=JSON.parse(JSON.stringify(this.originalOptions)),this.renderOptions()),this.hasDynamicOptions&&this.getOptionsUsing){this.isLoadingOptions=!0,this.showLoadingState(!1);try{let o=await this.getOptionsUsing();if(this.isDestroyed||!this.isOpen||t!==this.openId)return;this.isLoadingOptions=!1;let r=Array.isArray(o)?o:o&&Array.isArray(o.options)?o.options:[];this.originalOptions=JSON.parse(JSON.stringify(r)),(!this.searchQuery||!this.hasDynamicSearchResults)&&(this.populateLabelRepositoryFromOptions(r),this.searchQuery?this.filterOptions(this.searchQuery):(this.options=r,this.renderOptions(),this.positionDropdown()))}catch(o){if(this.isDestroyed||!this.isOpen||t!==this.openId||(this.isLoadingOptions=!1,this.searchQuery&&this.hasDynamicSearchResults&&e!==this.activeSearchId))return;console.error("Error fetching options:",o),this.showErrorMessage()}}else(!this.hasInitialNoOptionsMessage||this.searchQuery)&&this.hideLoadingState()}positionDropdown(){if(this.isDestroyed||!this.isOpen)return;let t=this.openId,e=this.position==="top"?"top-start":"bottom-start",n=[Di(4),xi({padding:5})];this.position!=="top"&&this.position!=="bottom"&&n.push(Ai());let s=this.selectButton.closest(".fi-fixed-positioning-context")!==null&&this.selectButton.closest(".fi-absolute-positioning-context")===null;Ci(this.selectButton,this.dropdown,{placement:e,middleware:n,strategy:s?"fixed":"absolute"}).then(({x:o,y:r})=>{this.isDestroyed||!this.isOpen||t!==this.openId||Object.assign(this.dropdown.style,{left:`${o}px`,top:`${r}px`})})}deferPositionDropdown(){this.isOpen&&(this.positioningRequestAnimationFrame&&(cancelAnimationFrame(this.positioningRequestAnimationFrame),this.positioningRequestAnimationFrame=null),this.positioningRequestAnimationFrame=requestAnimationFrame(()=>{this.positionDropdown(),this.positioningRequestAnimationFrame=null}))}closeDropdown(){this.dropdown.style.display="none",this.selectButton.setAttribute("aria-expanded","false"),this.searchInput?.setAttribute("aria-expanded","false"),this.isOpen=!1,this.openId++,this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.activeSearchId++,this.isSearching=!1,this.isLoadingOptions=!1,this.hideLoadingState(),this.hideMaxItemsMessage(),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener,!0),this.scrollListener=null),this.setActiveOption(null)}focusNextOption(){let t=this.getEnabledOptions();if(t.length===0)return;let e=t.findIndex(n=>n.dataset.value===this.activeValue);this.setActiveOption(t[Math.min(e+1,t.length-1)])}focusPreviousOption(){let t=this.getEnabledOptions();if(t.length===0)return;let e=t.findIndex(n=>n.dataset.value===this.activeValue);this.setActiveOption(t[e<0?t.length-1:Math.max(e-1,0)])}scrollOptionIntoView(t){if(!t)return;let e=this.dropdown.getBoundingClientRect(),n=t.getBoundingClientRect();n.bottom>e.bottom?this.dropdown.scrollTop+=n.bottom-e.bottom:n.topt.getAttribute("aria-disabled")!=="true")}getFocusOwner(){return this.searchInput??this.selectButton}setActiveOption(t){this.activeValue=t?.dataset.value??null,this.getVisibleOptions().forEach(e=>e.classList.toggle("fi-selected",e===t)),this.syncActiveDescendant(),t&&this.isOpen&&this.scrollOptionIntoView(t)}syncActiveDescendant(){this.selectButton.removeAttribute("aria-activedescendant"),this.searchInput?.removeAttribute("aria-activedescendant");let t=this.getFocusOwner();if(!this.isOpen||document.activeElement!==t)return;let e=this.getEnabledOptions().find(n=>n.dataset.value===this.activeValue);e&&t.setAttribute("aria-activedescendant",e.id)}setAccessibilityAttributes(t){this.accessibilityAttributes=t;for(let s of["aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-busy","aria-required"]){let o=t[s];for(let r of[this.selectButton,this.searchInput].filter(Boolean))F(o)?r.setAttribute(s,o):r.removeAttribute(s)}!this.selectButton.hasAttribute("aria-label")&&!this.selectButton.hasAttribute("aria-labelledby")&&F(this.ariaLabel)&&this.selectButton.setAttribute("aria-label",this.ariaLabel);let e=(this.selectButton.getAttribute("aria-labelledby")??"").split(/\s+/).map(s=>document.getElementById(s)?.textContent??"").join(" ").trim()||this.selectButton.getAttribute("aria-label")||Array.from(this.selectButton.labels??[],s=>s.textContent).join(" ").trim();this.optionsList.setAttribute("aria-label",e),this.isSearchable&&(this.searchInput.removeAttribute("aria-labelledby"),this.searchInput.setAttribute("aria-label",`${e}: ${this.searchLabel}`),this.selectButton.removeAttribute("aria-required"));let n=[t["aria-describedby"],this.selectionSummary.id].filter(Boolean).join(" ").split(/\s+/);this.selectButton.setAttribute("aria-describedby",[...new Set(n)].join(" "))}getSelectedOptionLabels(){if(!Array.isArray(this.state)||this.state.length===0)return{};let t={};for(let e of this.state){let n=!1;for(let s of this.options)if(s.options&&Array.isArray(s.options)){for(let o of s.options)if(o.value===e){t[e]=o.label,n=!0;break}if(n)break}else if(s.value===e){t[e]=s.label;break}}return t}handleSearch(t){if(this.isDestroyed||!this.isOpen)return;let e=t.target.value.trim();this.searchQuery=e,this.hasOptionsError=!1;let n=++this.activeSearchId;if(this.setActiveOption(null),this.searchTimeout&&clearTimeout(this.searchTimeout),e===""){if(this.isSearching=!1,this.isLoadingOptions){this.showLoadingState();return}this.hideLoadingState(),this.options=JSON.parse(JSON.stringify(this.originalOptions)),this.renderOptions(),this.positionDropdown();return}if(!this.getSearchResultsUsing||typeof this.getSearchResultsUsing!="function"||!this.hasDynamicSearchResults){this.isSearching=!1,this.filterOptions(e);return}this.isSearching=!0,this.showLoadingState(!0),this.searchTimeout=setTimeout(async()=>{this.searchTimeout=null;try{let s=await this.getSearchResultsUsing(e);if(this.isDestroyed||n!==this.activeSearchId||!this.isOpen)return;let o=Array.isArray(s)?s:s&&Array.isArray(s.options)?s.options:[];this.options=o,this.populateLabelRepositoryFromOptions(o),this.isSearching=!1,this.hideLoadingState(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.options.length===0&&this.showNoResultsMessage()}catch(s){!this.isDestroyed&&this.isOpen&&n===this.activeSearchId&&(console.error("Error fetching search results:",s),this.showErrorMessage())}finally{n===this.activeSearchId&&(this.isSearching=!1)}},this.searchDebounce)}showLoadingState(t=!1){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState(),this.optionsList.setAttribute("aria-busy","true");let e=document.createElement("div");e.className="fi-select-input-message",e.textContent=t?this.searchingMessage:this.loadingMessage,this.dropdown.appendChild(e),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=e.textContent),this.positionDropdown()}hideLoadingState(){this.optionsList.removeAttribute("aria-busy");let t=this.dropdown.querySelector(".fi-select-input-message");t&&(t.remove(),this.statusRegion.textContent="")}showNoOptionsMessage(){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState();let t=document.createElement("div");t.className="fi-select-input-message",t.textContent=this.noOptionsMessage,this.dropdown.appendChild(t),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=this.noOptionsMessage)}showNoResultsMessage(){this.setActiveOption(null),this.optionsList.hidden=!0,this.hideLoadingState();let t=document.createElement("div");t.className="fi-select-input-message",t.textContent=this.noSearchResultsMessage,this.dropdown.appendChild(t),this.isOpen&&(this.deferPositionDropdown(),this.statusRegion.textContent=this.noSearchResultsMessage)}showErrorMessage(){this.hasOptionsError=!0,this.showLoadingState(),this.optionsList.removeAttribute("aria-busy"),this.dropdown.querySelector(".fi-select-input-message").textContent=this.errorMessage,this.statusRegion.textContent=this.errorMessage,this.positionDropdown()}showMaxItemsMessage(){this.hideMaxItemsMessage(),this.maxItemsMessageElement=document.createElement("div"),this.maxItemsMessageElement.className="fi-select-input-max-items-message",this.maxItemsMessageElement.textContent=this.maxItemsMessage,this.optionsList.parentNode===this.dropdown?this.dropdown.insertBefore(this.maxItemsMessageElement,this.optionsList):this.dropdown.appendChild(this.maxItemsMessageElement),this.deferPositionDropdown(),this.statusRegion.textContent=this.maxItemsMessage}hideMaxItemsMessage(){this.maxItemsMessageElement&&(this.maxItemsMessageElement.remove(),this.maxItemsMessageElement=null,this.statusRegion.textContent===this.maxItemsMessage&&(this.statusRegion.textContent=""))}filterOptions(t){let e=this.searchableOptionFields.includes("label"),n=this.searchableOptionFields.includes("value");t=ft(t);let s=[];for(let o of this.originalOptions)if(o.options&&Array.isArray(o.options)){let r=o.options.filter(a=>e&&ft(a.label).includes(t)||n&&ft(String(a.value)).includes(t));r.length>0&&s.push({label:o.label,options:r})}else(e&&ft(o.label).includes(t)||n&&ft(String(o.value)).includes(t))&&s.push(o);this.options=s,this.renderOptions(),this.isOpen&&this.positionDropdown()}selectOption(t){if(this.isDisabled)return;if(!this.isMultiple){let n=this.container.contains(document.activeElement);this.state=t,this.updateSelectedDisplay(),this.renderOptions(),this.closeDropdown(),n&&this.selectButton.focus(),this.onStateChange(this.state);return}let e=Array.isArray(this.state)?[...this.state]:[];if(e.includes(t)){this.state=e.filter(n=>n!==t),this.updateSelectedDisplay(),this.hideMaxItemsMessage(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.maintainFocusInMultipleMode(),this.updateSelectionSummary(),this.onStateChange(this.state);return}if(this.maxItems&&e.length>=this.maxItems){this.maxItemsMessage&&this.showMaxItemsMessage();return}this.hideMaxItemsMessage(),e.push(t),this.state=e,this.updateSelectedDisplay(),this.renderOptions(),this.isOpen&&this.deferPositionDropdown(),this.maintainFocusInMultipleMode(),this.onStateChange(this.state)}maintainFocusInMultipleMode(){this.isOpen&&this.container.contains(document.activeElement)&&this.getFocusOwner().focus()}disable(){this.isDisabled||(this.isDisabled=!0,this.applyDisabledState(),this.isOpen&&this.closeDropdown())}enable(){this.isDisabled&&(this.isDisabled=!1,this.applyDisabledState())}applyDisabledState(){if(this.badgesSortable?.option("disabled",this.isDisabled),this.isDisabled){if(this.selectButton.setAttribute("disabled","disabled"),this.selectButton.setAttribute("aria-disabled","true"),this.selectButton.classList.add("fi-disabled"),this.isMultiple&&this.container.querySelectorAll(".fi-badge-delete-btn").forEach(e=>{e.setAttribute("disabled","disabled"),e.classList.add("fi-disabled")}),!this.isMultiple&&this.canSelectPlaceholder){let t=this.container.querySelector(".fi-select-input-value-remove-btn");t&&(t.setAttribute("disabled","disabled"),t.classList.add("fi-disabled"))}this.isSearchable&&this.searchInput&&(this.searchInput.setAttribute("disabled","disabled"),this.searchInput.classList.add("fi-disabled"))}else{if(this.selectButton.removeAttribute("disabled"),this.selectButton.removeAttribute("aria-disabled"),this.selectButton.classList.remove("fi-disabled"),this.isMultiple&&this.container.querySelectorAll(".fi-badge-delete-btn").forEach(e=>{e.removeAttribute("disabled"),e.classList.remove("fi-disabled")}),!this.isMultiple&&this.canSelectPlaceholder){let t=this.container.querySelector(".fi-select-input-value-remove-btn");t&&(t.removeAttribute("disabled"),t.classList.remove("fi-disabled"))}this.isSearchable&&this.searchInput&&(this.searchInput.removeAttribute("disabled"),this.searchInput.classList.remove("fi-disabled"))}}destroy(){this.isDestroyed=!0,this.openId++,this.activeSearchId++,this.selectedDisplayVersion++,this.destroyBadgesSortable(),this.selectButton&&this.buttonClickListener&&this.selectButton.removeEventListener("click",this.buttonClickListener),this.documentClickListener&&document.removeEventListener("click",this.documentClickListener),this.selectButton&&this.buttonKeydownListener&&this.selectButton.removeEventListener("keydown",this.buttonKeydownListener),this.dropdown&&this.dropdownKeydownListener&&this.dropdown.removeEventListener("keydown",this.dropdownKeydownListener),this.dropdownEscapeListener&&this.element.removeEventListener("dropdown-escape",this.dropdownEscapeListener),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener,!0),this.scrollListener=null),this.refreshOptionLabelListener&&window.removeEventListener("filament-forms::select.refreshSelectedOptionLabel",this.refreshOptionLabelListener),this.isOpen&&this.closeDropdown(),this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null),this.container&&this.container.remove()}};function es({canOptionLabelsWrap:i,canSelectPlaceholder:t,clearButtonLabel:e,errorMessage:n,hasDynamicOptions:s,hasDynamicSearchResults:o,hasInitialNoOptionsMessage:r,id:a,initialOptionLabel:l,initialOptionLabels:c,initialState:u,isAutofocused:h,isDisabled:f,isHtmlAllowed:p,isMultiple:m,isReorderable:g,isSearchable:O,livewireId:x,loadingMessage:w,maxItems:A,maxItemsMessage:D,noOptionsMessage:M,noSearchResultsMessage:C,options:J,optionsLimit:Q,placeholder:I,position:V,removeButtonLabel:Y,searchDebounce:it,searchingMessage:W,searchLabel:B,searchPrompt:Z,searchableOptionFields:k,state:$,statePath:_}){return{select:null,accessibilityObserver:null,state:$,init(){this.select=new Ae({canOptionLabelsWrap:i,canSelectPlaceholder:t,clearButtonLabel:e,element:this.$refs.select,errorMessage:n,getOptionLabelUsing:()=>this.$callSchemaComponentMethod("getOptionLabel",{},{async:!0}),getOptionLabelsUsing:()=>this.$callSchemaComponentMethod("getOptionLabelsForJs",{},{async:!0}),getOptionsUsing:()=>this.$callSchemaComponentMethod("getOptionsForJs",{},{async:!0}),getSearchResultsUsing:j=>this.$callSchemaComponentMethod("getSearchResultsForJs",{search:j},{async:!0}),hasDynamicOptions:s,hasDynamicSearchResults:o,hasInitialNoOptionsMessage:r,id:a,initialOptionLabel:l,initialOptionLabels:c,initialState:u,isAutofocused:h,isDisabled:f,isHtmlAllowed:p,isMultiple:m,isReorderable:g,isSearchable:O,livewireId:x,loadingMessage:w,maxItems:A,maxItemsMessage:D,noOptionsMessage:M,noSearchResultsMessage:C,onStateChange:j=>{this.state=j},options:J,optionsLimit:Q,placeholder:I,position:V,removeButtonLabel:Y,searchableOptionFields:k,searchDebounce:it,searchingMessage:W,searchLabel:B,searchPrompt:Z,state:this.state,statePath:_});let z=this.$el.previousElementSibling;if(z?.hasAttribute("data-select-accessibility")){let j=()=>this.select?.setAccessibilityAttributes(JSON.parse(z.dataset.selectAccessibility));j(),this.accessibilityObserver=new MutationObserver(j),this.accessibilityObserver.observe(z,{attributes:!0,attributeFilter:["data-select-accessibility"]})}this.$watch("state",j=>{this.$nextTick(()=>{this.select&&this.select.state!==j&&(this.select.state=j,this.select.updateSelectedDisplay(),this.select.renderOptions())})}),this.$dispatch("async-component-ready"),h&&this.$nextTick(()=>this.select?.selectButton.focus())},destroy(){this.accessibilityObserver?.disconnect(),this.select&&(this.select.destroy(),this.select=null)}}}export{es as default}; /*! Bundled license information: sortablejs/modular/sortable.esm.js: (**! * Sortable 1.15.7 * @author RubaXa * @author owenm * @license MIT *) */