@kong/kongponents 9.36.8 → 9.36.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26996,7 +26996,7 @@ const GY = {
26996
26996
  const n = eh(e, ["resizeColumns", "tablePreferences", "rowHover", "rowAttrs", "rowLink", "rowBulkActionEnabled", "rowKey", "cellAttrs", "loading", "emptyStateTitle", "emptyStateMessage", "emptyStateActionMessage", "emptyStateIconVariant", "emptyStateButtonAppearance", "emptyStateActionRoute", "error", "errorStateTitle", "errorStateMessage", "errorStateActionMessage", "errorStateActionRoute", "maxHeight", "hidePagination", "paginationAttributes", "rowExpandable", "rowExpanded", "hideHeaders", "nested", "hidePaginationWhenOptional", "hideToolbar", "headers", "fetcherCacheKey", "cacheIdentifier", "searchInput", "initialFetcherParams", "clientSort", "sortable", "fetcher", "sortHandlerFunction", "tooltipTarget"]), r = w(() => {
26997
26997
  const re = /^on[^a-z]/;
26998
26998
  return L$(n, (ze, _) => re.test(_));
26999
- }), i = a, o = Tt(), { useDebounce: u, useRequest: l, useSwrvState: s, clientSideSorter: d } = Nn(), c = bt(), f = B([]), v = w(() => e.sortable ? e.headers : e.headers.map((re) => ({ ...re, sortable: !1 }))), g = w(() => e.emptyStateButtonAppearance ? e.emptyStateButtonAppearance : e.searchInput ? "tertiary" : "primary"), y = B(0), h = B(1), p = B(u1(e.tablePreferences, e.paginationAttributes)), b = B(e.searchInput ?? ""), C = B(e.tablePreferences.sortColumnKey || e.initialFetcherParams.sortColumnKey || ""), $ = B(e.tablePreferences.sortColumnOrder || e.initialFetcherParams.sortColumnOrder || "desc"), T = B(!C.value), M = B(null), A = B([]), R = B(!0), q = B(!1), O = {
26999
+ }), i = a, o = Tt(), { useDebounce: u, useRequest: l, useSwrvState: s, clientSideSorter: d } = Nn(), c = bt(), f = B([]), v = w(() => e.sortable ? e.headers : e.headers.map((re) => ({ ...re, sortable: !1 }))), g = w(() => e.emptyStateButtonAppearance ? e.emptyStateButtonAppearance : e.searchInput ? "tertiary" : "primary"), y = B(0), h = B(1), p = B(u1(e.tablePreferences, e.paginationAttributes)), b = B(e.searchInput ?? ""), C = B(e.tablePreferences.sortColumnKey || e.initialFetcherParams.sortColumnKey || ""), $ = B(e.tablePreferences.sortColumnOrder || e.initialFetcherParams.sortColumnOrder || "desc"), T = B(!(C.value && e.clientSort)), M = B(null), A = B([]), R = B(!0), q = B(!1), O = {
27000
27000
  pageSize: p.value,
27001
27001
  page: h.value,
27002
27002
  query: b.value,
@@ -39,4 +39,4 @@ Docs: https://kongponents.konghq.com/components/table-data.html`),O()}),(j,ie)=>
39
39
  * @author RubaXa <trash@rubaxa.org>
40
40
  * @author owenm <owen23355@gmail.com>
41
41
  * @license MIT
42
- */function w1(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function pn(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?w1(Object(r),!0).forEach(function(a){oR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function il(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?il=function(n){return typeof n}:il=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},il(e)}function oR(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function xn(){return xn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},xn.apply(this,arguments)}function iR(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,i;for(i=0;i<a.length;i++)o=a[i],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}function lR(e,n){if(e==null)return{};var r=iR(e,n),a,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)a=i[o],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var sR="1.14.0";function An(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Mn=An(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Xa=An(/Edge/i),k1=An(/firefox/i),Ja=An(/safari/i)&&!An(/chrome/i)&&!An(/android/i),C1=An(/iP(ad|od|hone)/i),cR=An(/chrome/i)&&An(/android/i),S1={capture:!1,passive:!1};function Le(e,n,r){e.addEventListener(n,r,!Mn&&S1)}function Me(e,n,r){e.removeEventListener(n,r,!Mn&&S1)}function ll(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function dR(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function mn(e,n,r,a){if(e){r=r||document;do{if(n!=null&&(n[0]===">"?e.parentNode===r&&ll(e,n):ll(e,n))||a&&e===r)return e;if(e===r)break}while(e=dR(e))}return null}var $1=/\s+/g;function Tt(e,n,r){if(e&&n)if(e.classList)e.classList[r?"add":"remove"](n);else{var a=(" "+e.className+" ").replace($1," ").replace(" "+n+" "," ");e.className=(a+(r?" "+n:"")).replace($1," ")}}function ve(e,n,r){var a=e&&e.style;if(a){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),n===void 0?r:r[n];!(n in a)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),a[n]=r+(typeof r=="string"?"":"px")}}function ua(e,n){var r="";if(typeof e=="string")r=e;else do{var a=ve(e,"transform");a&&a!=="none"&&(r=a+" "+r)}while(!n&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function E1(e,n,r){if(e){var a=e.getElementsByTagName(n),o=0,i=a.length;if(r)for(;o<i;o++)r(a[o],o);return a}return[]}function hn(){var e=document.scrollingElement;return e||document.documentElement}function tt(e,n,r,a,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,l,d,c,s,u,f;if(e!==window&&e.parentNode&&e!==hn()?(i=e.getBoundingClientRect(),l=i.top,d=i.left,c=i.bottom,s=i.right,u=i.height,f=i.width):(l=0,d=0,c=window.innerHeight,s=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(n||r)&&e!==window&&(o=o||e.parentNode,!Mn))do if(o&&o.getBoundingClientRect&&(ve(o,"transform")!=="none"||r&&ve(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(ve(o,"border-top-width")),d-=p.left+parseInt(ve(o,"border-left-width")),c=l+i.height,s=d+i.width;break}while(o=o.parentNode);if(a&&e!==window){var m=ua(o||e),y=m&&m.a,b=m&&m.d;m&&(l/=b,d/=y,f/=y,u/=b,c=l+u,s=d+f)}return{top:l,left:d,bottom:c,right:s,width:f,height:u}}}function B1(e,n,r){for(var a=er(e,!0),o=tt(e)[n];a;){var i=tt(a)[r],l=void 0;if(l=o>=i,!l)return a;if(a===hn())break;a=er(a,!1)}return!1}function fa(e,n,r,a){for(var o=0,i=0,l=e.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==we.ghost&&(a||l[i]!==we.dragged)&&mn(l[i],r.draggable,e,!1)){if(o===n)return l[i];o++}i++}return null}function xc(e,n){for(var r=e.lastElementChild;r&&(r===we.ghost||ve(r,"display")==="none"||n&&!ll(r,n));)r=r.previousElementSibling;return r||null}function zt(e,n){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==we.clone&&(!n||ll(e,n))&&r++;return r}function D1(e){var n=0,r=0,a=hn();if(e)do{var o=ua(e),i=o.a,l=o.d;n+=e.scrollLeft*i,r+=e.scrollTop*l}while(e!==a&&(e=e.parentNode));return[n,r]}function uR(e,n){for(var r in e)if(e.hasOwnProperty(r)){for(var a in n)if(n.hasOwnProperty(a)&&n[a]===e[r][a])return Number(r)}return-1}function er(e,n){if(!e||!e.getBoundingClientRect)return hn();var r=e,a=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var o=ve(r);if(r.clientWidth<r.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return hn();if(a||n)return r;a=!0}}while(r=r.parentNode);return hn()}function fR(e,n){if(e&&n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function Ac(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var eo;function T1(e,n){return function(){if(!eo){var r=arguments,a=this;r.length===1?e.call(a,r[0]):e.apply(a,r),eo=setTimeout(function(){eo=void 0},n)}}}function pR(){clearTimeout(eo),eo=void 0}function N1(e,n,r){e.scrollLeft+=n,e.scrollTop+=r}function x1(e){var n=window.Polymer,r=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var Nt="Sortable"+new Date().getTime();function mR(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var a=[].slice.call(this.el.children);a.forEach(function(o){if(!(ve(o,"display")==="none"||o===we.ghost)){e.push({target:o,rect:tt(o)});var i=pn({},e[e.length-1].rect);if(o.thisAnimationDuration){var l=ua(o,!0);l&&(i.top-=l.f,i.left-=l.e)}o.fromRect=i}})}},addAnimationState:function(a){e.push(a)},removeAnimationState:function(a){e.splice(uR(e,{target:a}),1)},animateAll:function(a){var o=this;if(!this.options.animation){clearTimeout(n),typeof a=="function"&&a();return}var i=!1,l=0;e.forEach(function(d){var c=0,s=d.target,u=s.fromRect,f=tt(s),p=s.prevFromRect,m=s.prevToRect,y=d.rect,b=ua(s,!0);b&&(f.top-=b.f,f.left-=b.e),s.toRect=f,s.thisAnimationDuration&&Ac(p,f)&&!Ac(u,f)&&(y.top-f.top)/(y.left-f.left)===(u.top-f.top)/(u.left-f.left)&&(c=gR(y,p,m,o.options)),Ac(f,u)||(s.prevFromRect=u,s.prevToRect=f,c||(c=o.options.animation),o.animate(s,y,f,c)),c&&(i=!0,l=Math.max(l,c),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},c),s.thisAnimationDuration=c)}),clearTimeout(n),i?n=setTimeout(function(){typeof a=="function"&&a()},l):typeof a=="function"&&a(),e=[]},animate:function(a,o,i,l){if(l){ve(a,"transition",""),ve(a,"transform","");var d=ua(this.el),c=d&&d.a,s=d&&d.d,u=(o.left-i.left)/(c||1),f=(o.top-i.top)/(s||1);a.animatingX=!!u,a.animatingY=!!f,ve(a,"transform","translate3d("+u+"px,"+f+"px,0)"),this.forRepaintDummy=hR(a),ve(a,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),ve(a,"transform","translate3d(0,0,0)"),typeof a.animated=="number"&&clearTimeout(a.animated),a.animated=setTimeout(function(){ve(a,"transition",""),ve(a,"transform",""),a.animated=!1,a.animatingX=!1,a.animatingY=!1},l)}}}}function hR(e){return e.offsetWidth}function gR(e,n,r,a){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))*a.animation}var pa=[],Mc={initializeByDefault:!0},to={mount:function(n){for(var r in Mc)Mc.hasOwnProperty(r)&&!(r in n)&&(n[r]=Mc[r]);pa.forEach(function(a){if(a.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),pa.push(n)},pluginEvent:function(n,r,a){var o=this;this.eventCanceled=!1,a.cancel=function(){o.eventCanceled=!0};var i=n+"Global";pa.forEach(function(l){r[l.pluginName]&&(r[l.pluginName][i]&&r[l.pluginName][i](pn({sortable:r},a)),r.options[l.pluginName]&&r[l.pluginName][n]&&r[l.pluginName][n](pn({sortable:r},a)))})},initializePlugins:function(n,r,a,o){pa.forEach(function(d){var c=d.pluginName;if(!(!n.options[c]&&!d.initializeByDefault)){var s=new d(n,r,n.options);s.sortable=n,s.options=n.options,n[c]=s,xn(a,s.defaults)}});for(var i in n.options)if(n.options.hasOwnProperty(i)){var l=this.modifyOption(n,i,n.options[i]);typeof l<"u"&&(n.options[i]=l)}},getEventProperties:function(n,r){var a={};return pa.forEach(function(o){typeof o.eventProperties=="function"&&xn(a,o.eventProperties.call(r[o.pluginName],n))}),a},modifyOption:function(n,r,a){var o;return pa.forEach(function(i){n[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[r]=="function"&&(o=i.optionListeners[r].call(n[i.pluginName],a))}),o}};function yR(e){var n=e.sortable,r=e.rootEl,a=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,d=e.fromEl,c=e.oldIndex,s=e.newIndex,u=e.oldDraggableIndex,f=e.newDraggableIndex,p=e.originalEvent,m=e.putSortable,y=e.extraEventProperties;if(n=n||r&&r[Nt],!!n){var b,g=n.options,h="on"+a.charAt(0).toUpperCase()+a.substr(1);window.CustomEvent&&!Mn&&!Xa?b=new CustomEvent(a,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(a,!0,!0)),b.to=l||r,b.from=d||r,b.item=o||r,b.clone=i,b.oldIndex=c,b.newIndex=s,b.oldDraggableIndex=u,b.newDraggableIndex=f,b.originalEvent=p,b.pullMode=m?m.lastPutMode:void 0;var v=pn(pn({},y),to.getEventProperties(a,n));for(var w in v)b[w]=v[w];r&&r.dispatchEvent(b),g[h]&&g[h].call(n,b)}}var bR=["evt"],Ct=function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.evt,i=lR(a,bR);to.pluginEvent.bind(we)(n,r,pn({dragEl:oe,parentEl:Ge,ghostEl:Ee,rootEl:We,nextEl:xr,lastDownEl:sl,cloneEl:Qe,cloneHidden:tr,dragStarted:ro,putSortable:at,activeSortable:we.active,originalEvent:o,oldIndex:ma,oldDraggableIndex:no,newIndex:xt,newDraggableIndex:nr,hideGhostForTarget:L1,unhideGhostForTarget:R1,cloneNowHidden:function(){tr=!0},cloneNowShown:function(){tr=!1},dispatchSortableEvent:function(d){vt({sortable:r,name:d,originalEvent:o})}},i))};function vt(e){yR(pn({putSortable:at,cloneEl:Qe,targetEl:oe,rootEl:We,oldIndex:ma,oldDraggableIndex:no,newIndex:xt,newDraggableIndex:nr},e))}var oe,Ge,Ee,We,xr,sl,Qe,tr,ma,xt,no,nr,cl,at,ha=!1,dl=!1,ul=[],Ar,Qt,Ic,Oc,A1,M1,ro,ga,ao,oo=!1,fl=!1,pl,ut,Pc=[],Vc=!1,ml=[],hl=typeof document<"u",gl=C1,I1=Xa||Mn?"cssFloat":"float",vR=hl&&!cR&&!C1&&"draggable"in document.createElement("div"),O1=function(){if(hl){if(Mn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),P1=function(n,r){var a=ve(n),o=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=fa(n,0,r),l=fa(n,1,r),d=i&&ve(i),c=l&&ve(l),s=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+tt(i).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+tt(l).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&d.float&&d.float!=="none"){var f=d.float==="left"?"left":"right";return l&&(c.clear==="both"||c.clear===f)?"vertical":"horizontal"}return i&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||s>=o&&a[I1]==="none"||l&&a[I1]==="none"&&s+u>o)?"vertical":"horizontal"},wR=function(n,r,a){var o=a?n.left:n.top,i=a?n.right:n.bottom,l=a?n.width:n.height,d=a?r.left:r.top,c=a?r.right:r.bottom,s=a?r.width:r.height;return o===d||i===c||o+l/2===d+s/2},kR=function(n,r){var a;return ul.some(function(o){var i=o[Nt].options.emptyInsertThreshold;if(!(!i||xc(o))){var l=tt(o),d=n>=l.left-i&&n<=l.right+i,c=r>=l.top-i&&r<=l.bottom+i;if(d&&c)return a=o}}),a},V1=function(n){function r(i,l){return function(d,c,s,u){var f=d.options.group.name&&c.options.group.name&&d.options.group.name===c.options.group.name;if(i==null&&(l||f))return!0;if(i==null||i===!1)return!1;if(l&&i==="clone")return i;if(typeof i=="function")return r(i(d,c,s,u),l)(d,c,s,u);var p=(l?d:c).options.group.name;return i===!0||typeof i=="string"&&i===p||i.join&&i.indexOf(p)>-1}}var a={},o=n.group;(!o||il(o)!="object")&&(o={name:o}),a.name=o.name,a.checkPull=r(o.pull,!0),a.checkPut=r(o.put),a.revertClone=o.revertClone,n.group=a},L1=function(){!O1&&Ee&&ve(Ee,"display","none")},R1=function(){!O1&&Ee&&ve(Ee,"display","")};hl&&document.addEventListener("click",function(e){if(dl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),dl=!1,!1},!0);var Mr=function(n){if(oe){n=n.touches?n.touches[0]:n;var r=kR(n.clientX,n.clientY);if(r){var a={};for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);a.target=a.rootEl=r,a.preventDefault=void 0,a.stopPropagation=void 0,r[Nt]._onDragOver(a)}}},CR=function(n){oe&&oe.parentNode[Nt]._isOutsideThisEl(n.target)};function we(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=xn({},n),e[Nt]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return P1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:we.supportPointer!==!1&&"PointerEvent"in window&&!Ja,emptyInsertThreshold:5};to.initializePlugins(this,e,r);for(var a in r)!(a in n)&&(n[a]=r[a]);V1(n);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=n.forceFallback?!1:vR,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Le(e,"pointerdown",this._onTapStart):(Le(e,"mousedown",this._onTapStart),Le(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Le(e,"dragover",this),Le(e,"dragenter",this)),ul.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),xn(this,mR())}we.prototype={constructor:we,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ga=null)},_getDirection:function(n,r){return typeof this.options.direction=="function"?this.options.direction.call(this,n,r,oe):this.options.direction},_onTapStart:function(n){if(n.cancelable){var r=this,a=this.el,o=this.options,i=o.preventOnFilter,l=n.type,d=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(d||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=o.filter;if(xR(a),!oe&&!(/mousedown|pointerdown/.test(l)&&n.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Ja&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=mn(c,o.draggable,a,!1),!(c&&c.animated)&&sl!==c)){if(ma=zt(c),no=zt(c,o.draggable),typeof u=="function"){if(u.call(this,n,c,this)){vt({sortable:r,rootEl:s,name:"filter",targetEl:c,toEl:a,fromEl:a}),Ct("filter",r,{evt:n}),i&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=mn(s,f.trim(),a,!1),f)return vt({sortable:r,rootEl:f,name:"filter",targetEl:c,fromEl:a,toEl:a}),Ct("filter",r,{evt:n}),!0}),u)){i&&n.cancelable&&n.preventDefault();return}o.handle&&!mn(s,o.handle,a,!1)||this._prepareDragStart(n,d,c)}}},_prepareDragStart:function(n,r,a){var o=this,i=o.el,l=o.options,d=i.ownerDocument,c;if(a&&!oe&&a.parentNode===i){var s=tt(a);if(We=i,oe=a,Ge=oe.parentNode,xr=oe.nextSibling,sl=a,cl=l.group,we.dragged=oe,Ar={target:oe,clientX:(r||n).clientX,clientY:(r||n).clientY},A1=Ar.clientX-s.left,M1=Ar.clientY-s.top,this._lastX=(r||n).clientX,this._lastY=(r||n).clientY,oe.style["will-change"]="all",c=function(){if(Ct("delayEnded",o,{evt:n}),we.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!k1&&o.nativeDraggable&&(oe.draggable=!0),o._triggerDragStart(n,r),vt({sortable:o,name:"choose",originalEvent:n}),Tt(oe,l.chosenClass,!0)},l.ignore.split(",").forEach(function(u){E1(oe,u.trim(),Lc)}),Le(d,"dragover",Mr),Le(d,"mousemove",Mr),Le(d,"touchmove",Mr),Le(d,"mouseup",o._onDrop),Le(d,"touchend",o._onDrop),Le(d,"touchcancel",o._onDrop),k1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,oe.draggable=!0),Ct("delayStart",this,{evt:n}),l.delay&&(!l.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(Xa||Mn))){if(we.eventCanceled){this._onDrop();return}Le(d,"mouseup",o._disableDelayedDrag),Le(d,"touchend",o._disableDelayedDrag),Le(d,"touchcancel",o._disableDelayedDrag),Le(d,"mousemove",o._delayedDragTouchMoveHandler),Le(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Le(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(c,l.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var r=n.touches?n.touches[0]:n;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){oe&&Lc(oe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Me(n,"mouseup",this._disableDelayedDrag),Me(n,"touchend",this._disableDelayedDrag),Me(n,"touchcancel",this._disableDelayedDrag),Me(n,"mousemove",this._delayedDragTouchMoveHandler),Me(n,"touchmove",this._delayedDragTouchMoveHandler),Me(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,r){r=r||n.pointerType=="touch"&&n,!this.nativeDraggable||r?this.options.supportPointer?Le(document,"pointermove",this._onTouchMove):r?Le(document,"touchmove",this._onTouchMove):Le(document,"mousemove",this._onTouchMove):(Le(oe,"dragend",this),Le(We,"dragstart",this._onDragStart));try{document.selection?bl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,r){if(ha=!1,We&&oe){Ct("dragStarted",this,{evt:r}),this.nativeDraggable&&Le(document,"dragover",CR);var a=this.options;!n&&Tt(oe,a.dragClass,!1),Tt(oe,a.ghostClass,!0),we.active=this,n&&this._appendGhost(),vt({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Qt){this._lastX=Qt.clientX,this._lastY=Qt.clientY,L1();for(var n=document.elementFromPoint(Qt.clientX,Qt.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Qt.clientX,Qt.clientY),n!==r);)r=n;if(oe.parentNode[Nt]._isOutsideThisEl(n),r)do{if(r[Nt]){var a=void 0;if(a=r[Nt]._onDragOver({clientX:Qt.clientX,clientY:Qt.clientY,target:n,rootEl:r}),a&&!this.options.dragoverBubble)break}n=r}while(r=r.parentNode);R1()}},_onTouchMove:function(n){if(Ar){var r=this.options,a=r.fallbackTolerance,o=r.fallbackOffset,i=n.touches?n.touches[0]:n,l=Ee&&ua(Ee,!0),d=Ee&&l&&l.a,c=Ee&&l&&l.d,s=gl&&ut&&D1(ut),u=(i.clientX-Ar.clientX+o.x)/(d||1)+(s?s[0]-Pc[0]:0)/(d||1),f=(i.clientY-Ar.clientY+o.y)/(c||1)+(s?s[1]-Pc[1]:0)/(c||1);if(!we.active&&!ha){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<a)return;this._onDragStart(n,!0)}if(Ee){l?(l.e+=u-(Ic||0),l.f+=f-(Oc||0)):l={a:1,b:0,c:0,d:1,e:u,f};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");ve(Ee,"webkitTransform",p),ve(Ee,"mozTransform",p),ve(Ee,"msTransform",p),ve(Ee,"transform",p),Ic=u,Oc=f,Qt=i}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!Ee){var n=this.options.fallbackOnBody?document.body:We,r=tt(oe,!0,gl,!0,n),a=this.options;if(gl){for(ut=n;ve(ut,"position")==="static"&&ve(ut,"transform")==="none"&&ut!==document;)ut=ut.parentNode;ut!==document.body&&ut!==document.documentElement?(ut===document&&(ut=hn()),r.top+=ut.scrollTop,r.left+=ut.scrollLeft):ut=hn(),Pc=D1(ut)}Ee=oe.cloneNode(!0),Tt(Ee,a.ghostClass,!1),Tt(Ee,a.fallbackClass,!0),Tt(Ee,a.dragClass,!0),ve(Ee,"transition",""),ve(Ee,"transform",""),ve(Ee,"box-sizing","border-box"),ve(Ee,"margin",0),ve(Ee,"top",r.top),ve(Ee,"left",r.left),ve(Ee,"width",r.width),ve(Ee,"height",r.height),ve(Ee,"opacity","0.8"),ve(Ee,"position",gl?"absolute":"fixed"),ve(Ee,"zIndex","100000"),ve(Ee,"pointerEvents","none"),we.ghost=Ee,n.appendChild(Ee),ve(Ee,"transform-origin",A1/parseInt(Ee.style.width)*100+"% "+M1/parseInt(Ee.style.height)*100+"%")}},_onDragStart:function(n,r){var a=this,o=n.dataTransfer,i=a.options;if(Ct("dragStart",this,{evt:n}),we.eventCanceled){this._onDrop();return}Ct("setupClone",this),we.eventCanceled||(Qe=x1(oe),Qe.draggable=!1,Qe.style["will-change"]="",this._hideClone(),Tt(Qe,this.options.chosenClass,!1),we.clone=Qe),a.cloneId=bl(function(){Ct("clone",a),!we.eventCanceled&&(a.options.removeCloneOnHide||We.insertBefore(Qe,oe),a._hideClone(),vt({sortable:a,name:"clone"}))}),!r&&Tt(oe,i.dragClass,!0),r?(dl=!0,a._loopId=setInterval(a._emulateDragOver,50)):(Me(document,"mouseup",a._onDrop),Me(document,"touchend",a._onDrop),Me(document,"touchcancel",a._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(a,o,oe)),Le(document,"drop",a),ve(oe,"transform","translateZ(0)")),ha=!0,a._dragStartId=bl(a._dragStarted.bind(a,r,n)),Le(document,"selectstart",a),ro=!0,Ja&&ve(document.body,"user-select","none")},_onDragOver:function(n){var r=this.el,a=n.target,o,i,l,d=this.options,c=d.group,s=we.active,u=cl===c,f=d.sort,p=at||s,m,y=this,b=!1;if(Vc)return;function g(F,K){Ct(F,y,pn({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:p,target:a,completed:v,onMove:function(te,Z){return yl(We,r,oe,o,te,tt(te),n,Z)},changed:w},K))}function h(){g("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function v(F){return g("dragOverCompleted",{insertion:F}),F&&(u?s._hideClone():s._showClone(y),y!==p&&(Tt(oe,at?at.options.ghostClass:s.options.ghostClass,!1),Tt(oe,d.ghostClass,!0)),at!==y&&y!==we.active?at=y:y===we.active&&at&&(at=null),p===y&&(y._ignoreWhileAnimating=a),y.animateAll(function(){g("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===oe&&!oe.animated||a===r&&!a.animated)&&(ga=null),!d.dragoverBubble&&!n.rootEl&&a!==document&&(oe.parentNode[Nt]._isOutsideThisEl(n.target),!F&&Mr(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),b=!0}function w(){xt=zt(oe),nr=zt(oe,d.draggable),vt({sortable:y,name:"change",toEl:r,newIndex:xt,newDraggableIndex:nr,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),a=mn(a,d.draggable,r,!0),g("dragOver"),we.eventCanceled)return b;if(oe.contains(n.target)||a.animated&&a.animatingX&&a.animatingY||y._ignoreWhileAnimating===a)return v(!1);if(dl=!1,s&&!d.disabled&&(u?f||(l=Ge!==We):at===this||(this.lastPutMode=cl.checkPull(this,s,oe,n))&&c.checkPut(this,s,oe,n))){if(m=this._getDirection(n,a)==="vertical",o=tt(oe),g("dragOverValid"),we.eventCanceled)return b;if(l)return Ge=We,h(),this._hideClone(),g("revert"),we.eventCanceled||(xr?We.insertBefore(oe,xr):We.appendChild(oe)),v(!0);var C=xc(r,d.draggable);if(!C||BR(n,m,this)&&!C.animated){if(C===oe)return v(!1);if(C&&r===n.target&&(a=C),a&&(i=tt(a)),yl(We,r,oe,o,a,i,n,!!a)!==!1)return h(),r.appendChild(oe),Ge=r,w(),v(!0)}else if(C&&ER(n,m,this)){var S=fa(r,0,d,!0);if(S===oe)return v(!1);if(a=S,i=tt(a),yl(We,r,oe,o,a,i,n,!1)!==!1)return h(),r.insertBefore(oe,S),Ge=r,w(),v(!0)}else if(a.parentNode===r){i=tt(a);var D=0,$,M=oe.parentNode!==r,V=!wR(oe.animated&&oe.toRect||o,a.animated&&a.toRect||i,m),T=m?"top":"left",I=B1(a,"top","top")||B1(oe,"top","top"),N=I?I.scrollTop:void 0;ga!==a&&($=i[T],oo=!1,fl=!V&&d.invertSwap||M),D=DR(n,a,i,m,V?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,fl,ga===a);var k;if(D!==0){var x=zt(oe);do x-=D,k=Ge.children[x];while(k&&(ve(k,"display")==="none"||k===Ee))}if(D===0||k===a)return v(!1);ga=a,ao=D;var A=a.nextElementSibling,P=!1;P=D===1;var _=yl(We,r,oe,o,a,i,n,P);if(_!==!1)return(_===1||_===-1)&&(P=_===1),Vc=!0,setTimeout($R,30),h(),P&&!A?r.appendChild(oe):a.parentNode.insertBefore(oe,P?A:a),I&&N1(I,0,N-I.scrollTop),Ge=oe.parentNode,$!==void 0&&!fl&&(pl=Math.abs($-tt(a)[T])),w(),v(!0)}if(r.contains(oe))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Me(document,"mousemove",this._onTouchMove),Me(document,"touchmove",this._onTouchMove),Me(document,"pointermove",this._onTouchMove),Me(document,"dragover",Mr),Me(document,"mousemove",Mr),Me(document,"touchmove",Mr)},_offUpEvents:function(){var n=this.el.ownerDocument;Me(n,"mouseup",this._onDrop),Me(n,"touchend",this._onDrop),Me(n,"pointerup",this._onDrop),Me(n,"touchcancel",this._onDrop),Me(document,"selectstart",this)},_onDrop:function(n){var r=this.el,a=this.options;if(xt=zt(oe),nr=zt(oe,a.draggable),Ct("drop",this,{evt:n}),Ge=oe&&oe.parentNode,xt=zt(oe),nr=zt(oe,a.draggable),we.eventCanceled){this._nulling();return}ha=!1,fl=!1,oo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Rc(this.cloneId),Rc(this._dragStartId),this.nativeDraggable&&(Me(document,"drop",this),Me(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ja&&ve(document.body,"user-select",""),ve(oe,"transform",""),n&&(ro&&(n.cancelable&&n.preventDefault(),!a.dropBubble&&n.stopPropagation()),Ee&&Ee.parentNode&&Ee.parentNode.removeChild(Ee),(We===Ge||at&&at.lastPutMode!=="clone")&&Qe&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),oe&&(this.nativeDraggable&&Me(oe,"dragend",this),Lc(oe),oe.style["will-change"]="",ro&&!ha&&Tt(oe,at?at.options.ghostClass:this.options.ghostClass,!1),Tt(oe,this.options.chosenClass,!1),vt({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:n}),We!==Ge?(xt>=0&&(vt({rootEl:Ge,name:"add",toEl:Ge,fromEl:We,originalEvent:n}),vt({sortable:this,name:"remove",toEl:Ge,originalEvent:n}),vt({rootEl:Ge,name:"sort",toEl:Ge,fromEl:We,originalEvent:n}),vt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),at&&at.save()):xt!==ma&&xt>=0&&(vt({sortable:this,name:"update",toEl:Ge,originalEvent:n}),vt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),we.active&&((xt==null||xt===-1)&&(xt=ma,nr=no),vt({sortable:this,name:"end",toEl:Ge,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){Ct("nulling",this),We=oe=Ge=Ee=xr=Qe=sl=tr=Ar=Qt=ro=xt=nr=ma=no=ga=ao=at=cl=we.dragged=we.ghost=we.clone=we.active=null,ml.forEach(function(n){n.checked=!0}),ml.length=Ic=Oc=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":oe&&(this._onDragOver(n),SR(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],r,a=this.el.children,o=0,i=a.length,l=this.options;o<i;o++)r=a[o],mn(r,l.draggable,this.el,!1)&&n.push(r.getAttribute(l.dataIdAttr)||NR(r));return n},sort:function(n,r){var a={},o=this.el;this.toArray().forEach(function(i,l){var d=o.children[l];mn(d,this.options.draggable,o,!1)&&(a[i]=d)},this),r&&this.captureAnimationState(),n.forEach(function(i){a[i]&&(o.removeChild(a[i]),o.appendChild(a[i]))}),r&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,r){return mn(n,r||this.options.draggable,this.el,!1)},option:function(n,r){var a=this.options;if(r===void 0)return a[n];var o=to.modifyOption(this,n,r);typeof o<"u"?a[n]=o:a[n]=r,n==="group"&&V1(a)},destroy:function(){Ct("destroy",this);var n=this.el;n[Nt]=null,Me(n,"mousedown",this._onTapStart),Me(n,"touchstart",this._onTapStart),Me(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Me(n,"dragover",this),Me(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ul.splice(ul.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!tr){if(Ct("hideClone",this),we.eventCanceled)return;ve(Qe,"display","none"),this.options.removeCloneOnHide&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),tr=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(tr){if(Ct("showClone",this),we.eventCanceled)return;oe.parentNode==We&&!this.options.group.revertClone?We.insertBefore(Qe,oe):xr?We.insertBefore(Qe,xr):We.appendChild(Qe),this.options.group.revertClone&&this.animate(oe,Qe),ve(Qe,"display",""),tr=!1}}};function SR(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function yl(e,n,r,a,o,i,l,d){var c,s=e[Nt],u=s.options.onMove,f;return window.CustomEvent&&!Mn&&!Xa?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=e,c.dragged=r,c.draggedRect=a,c.related=o||n,c.relatedRect=i||tt(n),c.willInsertAfter=d,c.originalEvent=l,e.dispatchEvent(c),u&&(f=u.call(s,c,l)),f}function Lc(e){e.draggable=!1}function $R(){Vc=!1}function ER(e,n,r){var a=tt(fa(r.el,0,r.options,!0)),o=10;return n?e.clientX<a.left-o||e.clientY<a.top&&e.clientX<a.right:e.clientY<a.top-o||e.clientY<a.bottom&&e.clientX<a.left}function BR(e,n,r){var a=tt(xc(r.el,r.options.draggable)),o=10;return n?e.clientX>a.right+o||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+o}function DR(e,n,r,a,o,i,l,d){var c=a?e.clientY:e.clientX,s=a?r.height:r.width,u=a?r.top:r.left,f=a?r.bottom:r.right,p=!1;if(!l){if(d&&pl<s*o){if(!oo&&(ao===1?c>u+s*i/2:c<f-s*i/2)&&(oo=!0),oo)p=!0;else if(ao===1?c<u+pl:c>f-pl)return-ao}else if(c>u+s*(1-o)/2&&c<f-s*(1-o)/2)return TR(n)}return p=p||l,p&&(c<u+s*i/2||c>f-s*i/2)?c>u+s/2?1:-1:0}function TR(e){return zt(oe)<zt(e)?1:-1}function NR(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,r=n.length,a=0;r--;)a+=n.charCodeAt(r);return a.toString(36)}function xR(e){ml.length=0;for(var n=e.getElementsByTagName("input"),r=n.length;r--;){var a=n[r];a.checked&&ml.push(a)}}function bl(e){return setTimeout(e,0)}function Rc(e){return clearTimeout(e)}hl&&Le(document,"touchmove",function(e){(we.active||ha)&&e.cancelable&&e.preventDefault()}),we.utils={on:Le,off:Me,css:ve,find:E1,is:function(n,r){return!!mn(n,r,n,!1)},extend:fR,throttle:T1,closest:mn,toggleClass:Tt,clone:x1,index:zt,nextTick:bl,cancelNextTick:Rc,detectDirection:P1,getChild:fa},we.get=function(e){return e[Nt]},we.mount=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n[0].constructor===Array&&(n=n[0]),n.forEach(function(a){if(!a.prototype||!a.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));a.utils&&(we.utils=pn(pn({},we.utils),a.utils)),to.mount(a)})},we.create=function(e,n){return new we(e,n)},we.version=sR;var et=[],io,zc,Fc=!1,Yc,Hc,vl,lo;function AR(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(r){var a=r.originalEvent;this.sortable.nativeDraggable?Le(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Le(document,"pointermove",this._handleFallbackAutoScroll):a.touches?Le(document,"touchmove",this._handleFallbackAutoScroll):Le(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var a=r.originalEvent;!this.options.dragOverBubble&&!a.rootEl&&this._handleAutoScroll(a)},drop:function(){this.sortable.nativeDraggable?Me(document,"dragover",this._handleAutoScroll):(Me(document,"pointermove",this._handleFallbackAutoScroll),Me(document,"touchmove",this._handleFallbackAutoScroll),Me(document,"mousemove",this._handleFallbackAutoScroll)),z1(),wl(),pR()},nulling:function(){vl=zc=io=Fc=lo=Yc=Hc=null,et.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,a){var o=this,i=(r.touches?r.touches[0]:r).clientX,l=(r.touches?r.touches[0]:r).clientY,d=document.elementFromPoint(i,l);if(vl=r,a||this.options.forceAutoScrollFallback||Xa||Mn||Ja){qc(r,this.options,d,a);var c=er(d,!0);Fc&&(!lo||i!==Yc||l!==Hc)&&(lo&&z1(),lo=setInterval(function(){var s=er(document.elementFromPoint(i,l),!0);s!==c&&(c=s,wl()),qc(r,o.options,s,a)},10),Yc=i,Hc=l)}else{if(!this.options.bubbleScroll||er(d,!0)===hn()){wl();return}qc(r,this.options,er(d,!1),!1)}}},xn(e,{pluginName:"scroll",initializeByDefault:!0})}function wl(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function z1(){clearInterval(lo)}var qc=T1(function(e,n,r,a){if(n.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,d=n.scrollSpeed,c=hn(),s=!1,u;zc!==r&&(zc=r,wl(),io=n.scroll,u=n.scrollFn,io===!0&&(io=er(r,!0)));var f=0,p=io;do{var m=p,y=tt(m),b=y.top,g=y.bottom,h=y.left,v=y.right,w=y.width,C=y.height,S=void 0,D=void 0,$=m.scrollWidth,M=m.scrollHeight,V=ve(m),T=m.scrollLeft,I=m.scrollTop;m===c?(S=w<$&&(V.overflowX==="auto"||V.overflowX==="scroll"||V.overflowX==="visible"),D=C<M&&(V.overflowY==="auto"||V.overflowY==="scroll"||V.overflowY==="visible")):(S=w<$&&(V.overflowX==="auto"||V.overflowX==="scroll"),D=C<M&&(V.overflowY==="auto"||V.overflowY==="scroll"));var N=S&&(Math.abs(v-o)<=l&&T+w<$)-(Math.abs(h-o)<=l&&!!T),k=D&&(Math.abs(g-i)<=l&&I+C<M)-(Math.abs(b-i)<=l&&!!I);if(!et[f])for(var x=0;x<=f;x++)et[x]||(et[x]={});(et[f].vx!=N||et[f].vy!=k||et[f].el!==m)&&(et[f].el=m,et[f].vx=N,et[f].vy=k,clearInterval(et[f].pid),(N!=0||k!=0)&&(s=!0,et[f].pid=setInterval((function(){a&&this.layer===0&&we.active._onTouchMove(vl);var A=et[this.layer].vy?et[this.layer].vy*d:0,P=et[this.layer].vx?et[this.layer].vx*d:0;typeof u=="function"&&u.call(we.dragged.parentNode[Nt],P,A,e,vl,et[this.layer].el)!=="continue"||N1(et[this.layer].el,P,A)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&p!==c&&(p=er(p,!1)));Fc=s}},30),F1=function(n){var r=n.originalEvent,a=n.putSortable,o=n.dragEl,i=n.activeSortable,l=n.dispatchSortableEvent,d=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(r){var s=a||i;d();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,f=document.elementFromPoint(u.clientX,u.clientY);c(),s&&!s.el.contains(f)&&(l("spill"),this.onSpill({dragEl:o,putSortable:a}))}};function _c(){}_c.prototype={startIndex:null,dragStart:function(n){var r=n.oldDraggableIndex;this.startIndex=r},onSpill:function(n){var r=n.dragEl,a=n.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var o=fa(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(r,o):this.sortable.el.appendChild(r),this.sortable.animateAll(),a&&a.animateAll()},drop:F1},xn(_c,{pluginName:"revertOnSpill"});function Kc(){}Kc.prototype={onSpill:function(n){var r=n.dragEl,a=n.putSortable,o=a||this.sortable;o.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),o.animateAll()},drop:F1},xn(Kc,{pluginName:"removeOnSpill"}),we.mount(new AR),we.mount(Kc,_c);function MR(){return typeof window<"u"?window.console:global.console}const IR=MR();function OR(e){const n=Object.create(null);return function(a){return n[a]||(n[a]=e(a))}}const PR=/-(\w)/g,Y1=OR(e=>e.replace(PR,(n,r)=>r?r.toUpperCase():""));function Wc(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function H1(e,n,r){const a=r===0?e.children[0]:e.children[r-1].nextSibling;e.insertBefore(n,a)}function VR(e,n){return Object.values(e).indexOf(n)}function LR(e,n,r,a){if(!e)return[];const o=Object.values(e),i=n.length-a;return[...n].map((d,c)=>c>=i?o.length:o.indexOf(d))}function q1(e,n){this.$nextTick(()=>this.$emit(e.toLowerCase(),n))}function RR(e){return n=>{this.realList!==null&&this["onDrag"+e](n),q1.call(this,e,n)}}function zR(e){return["transition-group","TransitionGroup"].includes(e)}function FR(e){if(!e||e.length!==1)return!1;const[{type:n}]=e;return n?zR(n.name):!1}function YR(e,n){return n?{...n.props,...n.attrs}:e}const Uc=["Start","Add","Remove","Update","End"],jc=["Choose","Unchoose","Sort","Filter","Clone"],HR=["Move",...Uc,...jc].map(e=>"on"+e);let Gc=null;const qR={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},_R=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Uc.map(e=>e.toLowerCase()),...jc.map(e=>e.toLowerCase())],props:qR,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,n=YR(this.$attrs,this.componentData);return e?(this.transitionMode=FR(e),t.h(this.getTag(),n,e)):t.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&IR.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Uc.forEach(o=>{e["on"+o]=RR.call(this,o)}),jc.forEach(o=>{e["on"+o]=q1.bind(this,o)});const n=Object.keys(this.$attrs).reduce((o,i)=>(o[Y1(i)]=this.$attrs[i],o),{}),r=Object.assign({},n,e,{onMove:(o,i)=>this.onDragMove(o,i)});!("draggable"in r)&&(r.draggable=">*");const a=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new we(a,r),a.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(e){for(var n in e){const r=Y1(n);HR.indexOf(r)===-1&&this._sortable.option(r,e[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=LR(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const n=VR(this.getChildrenNodes()||[],e);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const r=a=>a.splice(n,0,a.splice(e,1)[0]);this.alterList(r)},getVmIndex(e){const n=this.visibleIndexes,r=n.length;return e>r-1?r:n[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[e].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Gc=e.item)},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;Wc(e.item);const r=this.getVmIndex(e.newIndex);this.spliceList(r,0,n),this.computeIndexes();const a={element:n,newIndex:r};this.emitChanges({added:a})},onDragRemove(e){if(H1(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){Wc(e.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(e){Wc(e.item),H1(e.from,e.item,e.oldIndex);const n=this.context.index,r=this.getVmIndex(e.newIndex);this.updatePosition(n,r);const a={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:a})},updateProperty(e,n){e.hasOwnProperty(n)&&(e[n]+=this.headerOffset)},onDragMove(e,n){const r=this.move;if(!r||!this.realList)return!0;const a=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(a,e);Object.assign(o,{futureIndex:i});const l=Object.assign({},e,{relatedContext:a,draggedContext:o});return r(l,n)},onDragEnd(){this.computeIndexes(),Gc=null},getTrargetedComponent(e){return e.__draggable_component__},getRelatedContextFromMoveEvent({to:e,related:n}){const r=this.getTrargetedComponent(e);if(!r)return{component:r};const a=r.realList,o={list:a,component:r};if(e!==n&&a&&r.getUnderlyingVm){const i=r.getUnderlyingVm(n);if(i)return Object.assign(i,o)}return o},computeFutureIndex(e,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const a=r.indexOf(n.related),o=e.component.getVmIndex(a);return r.indexOf(Gc)!==-1||!n.willInsertAfter?o:o+1}}}),KR=["data-testid"],WR=["aria-controls","aria-expanded","aria-label"],UR=["data-testid"],jR={key:0,class:"tree-item-icon","data-testid":"tree-item-icon"},GR={class:"tree-item-label","data-testid":"tree-item-label"},QR=pe(t.defineComponent({__name:"KTreeItem",props:{item:{},disabled:{type:Boolean},hideIcons:{type:Boolean},collapsible:{type:Boolean},initialCollapse:{type:Boolean},hasChildren:{type:Boolean},controlsId:{}},emits:["selected","expanded"],setup(e,{expose:n,emit:r}){const a=r,o=t.useSlots(),i=t.computed(()=>!e.hideIcons||!!o["item-icon"]),l=u=>{u.target&&u.target.closest("a:not(.disabled), button:not([data-tree-item-trigger]), label, input, select")!==null||a("selected",e.item)},d=t.ref(!0),c=u=>{d.value=u};t.watch(()=>e.initialCollapse,(u,f)=>{u!==f&&(d.value=!u)},{immediate:!0});const s=()=>{d.value=!d.value,a("expanded",d.value)};return n({setExpandedValue:c,id:e.item.id}),(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"tree-item-wrapper","data-testid":`tree-item-wrapper-${u.item.id}`},[u.collapsible&&u.hasChildren?(t.openBlock(),t.createElementBlock("span",{key:0,"aria-controls":`tree-list-draggable-${u.controlsId}`,"aria-expanded":d.value,"aria-label":d.value?"Collapse":"Expand",class:t.normalizeClass(["tree-item-expanded-button",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-button",role:"button",onClick:t.withModifiers(s,["stop"]),onKeyup:t.withKeys(s,["enter"])},[t.createVNode(t.unref(Bl),{class:t.normalizeClass(["tree-item-expanded-icon",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-icon",decorative:"",size:t.unref(ft),tabindex:"0"},null,8,["class","size"])],42,WR)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["tree-item",{"not-draggable":u.disabled,selected:u.item.selected,expanded:u.collapsible&&d.value,collapsed:u.collapsible&&!d.value,"no-children":u.collapsible&&!u.hasChildren}]),"data-testid":`tree-item-${u.item.id}`,"data-tree-item-trigger":"true",draggable:"false",type:"button",onClick:t.withModifiers(l,["prevent"])},[i.value?(t.openBlock(),t.createElementBlock("div",jR,[t.renderSlot(u.$slots,"item-icon",{},()=>[t.createVNode(t.unref(Gy),{decorative:""})],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",GR,[t.renderSlot(u.$slots,"item-label",{},()=>[t.createTextVNode(t.toDisplayString(u.item.name),1)],!0)])],10,UR)],8,KR))}}),[["__scopeId","data-v-18967eab"]]),Qc=({children:e=[]})=>e.length===0?0:1+Math.max(...e.map(Qc)),ZR=pe(t.defineComponent({__name:"KTreeDraggable",props:{items:{},disableDrag:{type:Boolean},filter:{type:[String,Function]},maxDepth:{},level:{default:0},parentId:{},hideIcons:{type:Boolean},group:{},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=r,o=t.ref(0),i=t.ref([]),l={tag:"div","force-fallback":!0,animation:"100",draggable:".tree-item-container","item-key":"id","ghost-class":"tree-item-dragged","drag-class":"tree-item-grabbing",class:"child-drop-zone","fallback-tolerance":10},d=t.ref(!1),c=t.computed(()=>[".tree-item-expanded-button",...(typeof e.filter=="function"?e.filter():e.filter).split(",").map(I=>I.trim()).filter(Boolean)].join(", ")),s=T=>{var I,N;return!((N=(I=i.value.filter(k=>k.id===T.id))==null?void 0:I[0].children)!=null&&N.length)},u=T=>T.children||[],f=T=>{e.parentId?a("child-change",{parentId:e.parentId,children:i.value,target:(T==null?void 0:T.added)||(T==null?void 0:T.removed)||(T==null?void 0:T.moved)}):a("change",{items:i.value,target:(T==null?void 0:T.added)||(T==null?void 0:T.removed)||(T==null?void 0:T.moved)})},p=T=>{a("child-change",T)},m=T=>{a("selected",T)},y=t.ref(new Map),b=(T,I)=>{y.value.set(I,T)},g=T=>e.collapsible?!!y.value.get(T):!0,h=t.useTemplateRef("tree-items"),v=()=>{var T;i.value.forEach(I=>{y.value.set(I.id,!1)}),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(!1)})},w=()=>{var T;i.value.forEach(I=>{y.value.set(I.id,!0)}),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(!0)})},C=t.computed(()=>e.level>e.maxDepth-1),S=T=>{var A,P,_,F;const I=((P=(A=T.relatedContext)==null?void 0:A.component)==null?void 0:P.$attrs.level)||0,N=(_=T.draggedContext)==null?void 0:_.element;let k=0;return(F=N.children)!=null&&F.length&&(k=Qc(N)),!(I+k>e.maxDepth-1)},D=T=>{var k,x;const I=((x=(k=T.item)==null?void 0:k._underlying_vm_)==null?void 0:x.id)||"",N=i.value.find(A=>A.id===I);d.value=!0,N&&a("selected",N),M(!0)},$=async()=>{var T;d.value=!1,M(!1),o.value++,await t.nextTick(),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(y.value.get(I==null?void 0:I.id))})},M=T=>{const I=document==null?void 0:document.getElementsByTagName("html").item(0);I&&I.classList.toggle("tree-list-grabbing",T)};t.watch(()=>e.items,(T,I)=>{JSON.stringify(T)!==JSON.stringify(I)&&(i.value=T,i.value.forEach(N=>{N.children||(N.children=[])}))});const V=()=>{i.value.forEach(T=>{y.value.set(T.id,!e.initialCollapseAll)})};return t.onMounted(async()=>{i.value=e.items,i.value.forEach(T=>{T.children||(T.children=[])}),await t.nextTick(),e.collapsible&&V()}),n({collapseAll:v,expandAll:w}),(T,I)=>{const N=t.resolveComponent("KTreeDraggable",!0);return t.openBlock(),t.createBlock(t.unref(_R),t.mergeProps(l,{class:"tree-draggable",direction:"vertical",disabled:T.disableDrag,filter:c.value,group:{name:T.group,pull:[T.group],put:C.value?[]:[T.group]},level:T.level,list:i.value,move:S,tag:"div",onChange:f,onEnd:$,onStart:D}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,k=>(t.openBlock(),t.createElementBlock("div",{key:k.id,class:t.normalizeClass(["tree-item-container",{"has-no-children":s(k)}])},[(t.openBlock(),t.createBlock(QR,{key:`tree-item-${k.id}-${o.value}`,ref_for:!0,ref:"tree-items",collapsible:T.collapsible,"controls-id":k.id,disabled:T.disableDrag,"has-children":!s(k),"hide-icons":T.hideIcons,"initial-collapse":T.initialCollapseAll,item:k,onExpanded:x=>b(x,k.id),onSelected:m},t.createSlots({"item-label":t.withCtx(()=>[t.renderSlot(T.$slots,"item-label",{item:k},()=>[t.createTextVNode(t.toDisplayString(k.name),1)],!0)]),_:2},[T.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(()=>[t.renderSlot(T.$slots,"item-icon",{item:k},void 0,!0)]),key:"0"}:void 0]),1032,["collapsible","controls-id","disabled","has-children","hide-icons","initial-collapse","item","onExpanded"])),t.withDirectives((t.openBlock(),t.createBlock(N,{id:`tree-list-draggable-${k.id}`,key:`tree-item-${k.id}-children-${o.value}`,class:t.normalizeClass({collapsible:T.collapsible}),collapsible:T.collapsible,"disable-drag":T.disableDrag,filter:c.value,group:T.group,"hide-icons":T.hideIcons,"initial-collapse-all":T.initialCollapseAll,items:u(k),level:T.level+1,"max-depth":T.maxDepth,"parent-id":k.id,onChildChange:p,onSelected:m},t.createSlots({"item-label":t.withCtx(({item:x})=>[t.renderSlot(T.$slots,"item-label",{item:x},void 0,!0)]),_:2},[T.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:x})=>[t.renderSlot(T.$slots,"item-icon",{item:x},void 0,!0)]),key:"0"}:void 0]),1032,["id","class","collapsible","disable-drag","filter","group","hide-icons","initial-collapse-all","items","level","max-depth","parent-id"])),[[t.vShow,g(k.id)]])],2))),128))]),_:3},16,["disabled","filter","group","level","list"])}}}),[["__scopeId","data-v-a7e11d91"]]),_1=t.defineComponent({__name:"KTreeList",props:{modelValue:{default:null},items:{default:null},disableDrag:{type:Boolean},ignoreDragSelectors:{type:[String,Function],default:""},maxDepth:{default:3},width:{default:""},hideIcons:{type:Boolean},group:{default:"k-tree-list"},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=(g,h)=>(g.forEach(v=>{var w;h.push(v.id),(w=v.children)!=null&&w.length&&a(v.children,h)}),h),o=g=>{const h=a(g,[]),v=new Set(h);return h.length===v.size},i=(g,h)=>{let v=!0;return g.forEach(w=>{v=v&&(!w.children||Qc(w)<=h)}),v};t.watch(()=>e.modelValue,g=>{g&&!o(g)&&Un("modelValue","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.items,g=>{g&&!o(g)&&Un("items","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.maxDepth,g=>{g>5&&Un("maxDepth","Maximum depth must be less than or equal to 5.")},{immediate:!0}),t.watch([()=>e.modelValue,()=>e.items],([g,h])=>{g&&h&&Un("modelValue / items","You should not provide both v-model (or props.modelValue) and props.items")},{immediate:!0});const l=t.ref([]);t.watch([l,()=>e.maxDepth],([g,h])=>{i(g,h)||Un(e.modelValue?"modelValue":"items","Provided list depth exceeds `maxDepth`")},{immediate:!0,deep:!0});const d=r,c=t.computed({get(){return e.modelValue},set(g){l.value=g}}),s=t.computed(()=>({maxWidth:Je(e.width)})),u=(g,h)=>{(h||l.value).forEach(w=>{var C;w.id===g.id?(w.selected=!0,d("selected",g)):w.selected=!1,(C=w.children)!=null&&C.length&&u(g,w.children)})},f=g=>{d("change",g)},p=g=>{d("child-change",g)};t.watch(c,(g,h)=>{JSON.stringify(g)!==JSON.stringify(h)&&(l.value=g||[],l.value.forEach(v=>{v.children||(v.children=[])}))}),t.watch(()=>e.items,(g,h)=>{JSON.stringify(g)!==JSON.stringify(h)&&(l.value=g||[],l.value.forEach(v=>{v.children||(v.children=[])}))});const m=t.useTemplateRef("tree-draggable");return n({collapseAll:()=>{var g;(g=m.value)==null||g.collapseAll()},expandAll:()=>{var g;(g=m.value)==null||g.expandAll()}}),t.onMounted(()=>{e.modelValue?l.value=e.modelValue:e.items&&(l.value=e.items),l.value.forEach(g=>{g.children||(g.children=[])})}),(g,h)=>(t.openBlock(),t.createElementBlock("div",{class:"k-tree-list","data-testid":"k-tree-list",style:t.normalizeStyle(g.width?s.value:void 0)},[t.createVNode(ZR,{ref:"tree-draggable",collapsible:g.collapsible,"data-testid":`k-tree-list-${g.group}`,"disable-drag":g.disableDrag,filter:g.ignoreDragSelectors,group:g.group,"hide-icons":g.hideIcons,"initial-collapse-all":g.initialCollapseAll,items:l.value,"max-depth":g.maxDepth,onChange:f,onChildChange:p,onSelected:u},t.createSlots({"item-label":t.withCtx(({item:v})=>[t.renderSlot(g.$slots,"item-label",{item:v})]),_:2},[g.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:v})=>[t.renderSlot(g.$slots,"item-icon",{item:v})]),key:"0"}:void 0]),1032,["collapsible","data-testid","disable-drag","filter","group","hide-icons","initial-collapse-all","items","max-depth"])],4))}}),XR=["href"],K1=pe(t.defineComponent({__name:"KExternalLink",props:{href:{},hideIcon:{type:Boolean}},setup(e){t.watch(()=>e.href,r=>{r1(r)||Un("href",`\`href\` should be a valid URL, but got "${r}".`)},{immediate:!0});const n=t.computed(()=>!!r1(e.href));return(r,a)=>n.value?(t.openBlock(),t.createElementBlock("a",{key:0,class:"k-external-link",href:r.href,rel:"noopener",target:"_blank"},[t.renderSlot(r.$slots,"default",{},void 0,!0),r.hideIcon?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Py),{key:0,decorative:"",size:t.unref(qt)},null,8,["size"]))],8,XR)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-ec2a67ce"]]),JR={key:0,class:"truncate-expand-controls"},ez={key:0,"data-testid":"expand-trigger-wrapper"},tz=["aria-label"],nz={key:0,"data-testid":"collapse-trigger-wrapper"},rz={key:0,"data-testid":"expand-trigger-wrapper"},az={key:1},W1=pe(t.defineComponent({__name:"KTruncate",props:{rows:{default:1},truncateText:{type:Boolean},expanded:{type:Boolean},width:{default:"100%"}},setup(e){t.useCssVars(b=>({"7164fd89":d.value,"5e3d5385":t.unref(c),"6972530a":b.rows})),t.watch(()=>e.rows,b=>{b<0&&Un("rows",`\`rows\` prop cannot be less than 0, but got "${b}".`)},{immediate:!0});const n=t.ref(e.expanded),r=t.ref(!1),a=t.ref(),o=t.ref(),i=t.ref(),l=t.ref(),d=t.ref("0px"),c=pb,s=t.ref(0),u=async()=>{var b;if(!e.truncateText&&o.value&&(b=o.value.children)!=null&&b.length){const g=o.value.children,h=Number(String(c).replace(/px$/gi,""));let v=0;for(let C=0;C<g.length;C++)v=g[C].offsetHeight>v?g[C].offsetHeight:v;const w=(e.rows===1?0:(e.rows-1)*h)+v*e.rows+6;d.value=o.value.offsetHeight>w?`${w}px`:"auto",await t.nextTick(),f()}},f=()=>{if(o.value&&i.value){const b=e.truncateText?o.value.scrollHeight:o.value.offsetHeight,g=l.value?l.value.offsetHeight:0;r.value=b>i.value.offsetHeight-g,p()}},p=()=>{if(!e.truncateText&&(s.value=0,o.value&&i.value)){const b=o.value.children;for(let g=0;g<b.length;g++)b[g].offsetTop>i.value.offsetHeight?(s.value+=1,b[g].getAttribute("tabindex")&&(b[g].tabIndex=-1)):b[g].getAttribute("tabindex")&&(b[g].tabIndex=0)}},m=async()=>{n.value=!n.value,await t.nextTick(),f()},y=t.computed(()=>({width:Je(e.width)}));return t.onMounted(()=>{a.value=cr.create(u),a.value.observe(o.value),f()}),t.onBeforeUnmount(()=>{var b;(b=a.value)==null||b.unobserve(o.value)}),(b,g)=>{const h=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{ref_key:"kTruncateWrapper",ref:i,class:t.normalizeClass(["k-truncate",[n.value?"expanded":"",`truncate-${b.truncateText?"text":"content"}`]]),style:t.normalizeStyle(y.value)},[!b.truncateText&&r.value?(t.openBlock(),t.createElementBlock("div",JR,[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ez,[t.renderSlot(b.$slots,"expand-trigger",{expand:m,truncatedCount:s.value},()=>[t.createElementVNode("button",{"aria-label":`Show ${s.value} more items`,class:"expand-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},t.toDisplayString(s.value),9,tz)],!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"kTruncateContainer",ref:o,class:"truncate-container"},[t.renderSlot(b.$slots,"default",{},void 0,!0),!b.truncateText&&n.value?(t.openBlock(),t.createElementBlock("div",nz,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createElementVNode("button",{"aria-label":"Collapse content",class:"collapse-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},[t.createVNode(t.unref(Dy),{decorative:"",size:t.unref(qt)},null,8,["size"])])],!0)])):t.createCommentVNode("",!0)],512),b.truncateText&&(r.value||n.value)?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"textToggleControls",ref:l,class:"truncate-collapse-controls"},[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",rz,[t.renderSlot(b.$slots,"expand-trigger",{expand:m},()=>[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>g[0]||(g[0]=[t.createTextVNode(" Show more ")])),_:1,__:[0]})],!0)])),n.value?(t.openBlock(),t.createElementBlock("div",az,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>g[1]||(g[1]=[t.createTextVNode(" Show less ")])),_:1,__:[1]})],!0)])):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-32767851"]]),oz={class:"k-copy"},iz={key:0,class:"copy-badge-text"},lz=["id","aria-label","onClick"],U1=pe(t.defineComponent({__name:"KCopy",props:{badgeLabel:{default:""},text:{},textTooltip:{default:""},copyTooltip:{default:""},format:{default:"default"},badge:{type:Boolean},monospace:{type:Boolean},truncate:{type:Boolean},successTooltip:{default:"Copied!"},truncationLimit:{default:8}},setup(e,{expose:n}){const r=t.useId(),a=t.ref(""),o=t.computed(()=>!e.badgeLabel||e.copyTooltip?e.copyTooltip||"Copy":`Copy ${e.badgeLabel.replace(/:$/,"")}`);t.watch(o,g=>{a.value=g},{immediate:!0});const i=t.computed(()=>`copy-tooltip-wrapper ${e.truncate&&y.value||e.badge?"truncate-content":""}`),l=t.computed(()=>e.format==="redacted"?"*****":e.format==="deleted"?`*${String(e.text||"").substring(0,5)}`:e.truncate&&e.truncationLimit&&m.value?m.value.replace(/^"(.*)"$/,"$1"):e.text),d=t.computed(()=>{if(e.textTooltip)return e.textTooltip;if(!(e.format==="redacted"||!y.value))return e.text}),c=g=>{a.value=g||e.successTooltip,setTimeout(()=>{a.value=o.value},1800)},s=async g=>{if(!await g(e.text)){c("Failed to copy");return}c()};n({copy:()=>{var g;document!=null&&document.getElementById(r)&&((g=document==null?void 0:document.getElementById(r))==null||g.click())}});const f=t.ref(),p=t.ref(),m=t.computed(()=>e.truncate&&typeof e.truncationLimit=="number"?`${String(e.text||"").substring(0,e.truncationLimit)+"..."}`:null),y=t.ref(!1),b=()=>{var g,h;e.truncate&&(e.truncationLimit!=="auto"&&m.value?y.value=!0:e.truncationLimit==="auto"&&f.value&&(y.value=((g=f.value)==null?void 0:g.offsetWidth)<((h=f.value)==null?void 0:h.scrollWidth)))};return t.onMounted(()=>{p.value=cr.create(b),p.value.observe(f.value)}),t.onBeforeUnmount(()=>{p.value&&p.value.unobserve(f.value)}),(g,h)=>(t.openBlock(),t.createElementBlock("div",oz,[g.badge&&g.badgeLabel?(t.openBlock(),t.createElementBlock("span",iz,t.toDisplayString(g.badgeLabel),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["copy-container",{"copy-element":g.truncate||g.badge,"badge-styles":g.badge}])},[g.format!=="hidden"?(t.openBlock(),t.createBlock(Bt,{key:0,class:t.normalizeClass([i.value]),"data-testid":"copy-tooltip-wrapper","max-width":"500px",placement:"bottom-start",text:d.value},{default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"copyTextElement",ref:f,class:t.normalizeClass(["copy-text",{monospace:g.monospace||!g.badge}])},t.toDisplayString(l.value),3)]),_:1},8,["class","text"])):t.createCommentVNode("",!0),t.createVNode(Bt,{class:"text-icon-wrapper","max-width":"500px",placement:"bottom-start",text:a.value},{default:t.withCtx(()=>[t.createVNode(kl,null,{default:t.withCtx(({copyToClipboard:v})=>[t.createElementVNode("button",{id:t.unref(r),"aria-label":a.value,class:"copy-to-clipboard-button","data-testid":"copy-to-clipboard",type:"button",onClick:t.withModifiers(w=>s(v),["stop"])},[t.createVNode(t.unref(wd),{class:"text-icon",decorative:"",size:t.unref(qt)},null,8,["size"])],8,lz)]),_:1})]),_:1},8,["text"])],2)]))}}),[["__scopeId","data-v-5cce612d"]]),sz={key:0,class:"bulk-actions-dropdown-trigger-count"},cz=pe(t.defineComponent({__name:"BulkActionsDropdown",props:{disabled:{type:Boolean},count:{default:""},buttonLabel:{default:""}},setup(e){return(n,r)=>(t.openBlock(),t.createBlock(qn,{class:"bulk-actions-dropdown","data-testid":"bulk-actions-dropdown",disabled:n.disabled,"kpop-attributes":{placement:"bottom-end"}},{items:t.withCtx(()=>[t.renderSlot(n.$slots,"items",{},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Bt,{placement:"bottom-end",text:"Selected Row Actions"},{default:t.withCtx(()=>[t.createVNode(Ve,{appearance:"secondary","aria-label":n.buttonLabel,class:"bulk-actions-dropdown-trigger","data-testid":"bulk-actions-dropdown-trigger",disabled:n.disabled,icon:"",size:"large"},{default:t.withCtx(()=>[t.createVNode(t.unref(xd),{class:"more-icon",decorative:""}),t.createVNode(t.Transition,{name:"kongponents-fade-transition"},{default:t.withCtx(()=>[n.count?(t.openBlock(),t.createElementBlock("span",sz,t.toDisplayString(n.count),1)):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["aria-label","disabled"])]),_:1})]),_:3},8,["disabled"]))}}),[["__scopeId","data-v-cf7c2833"]]),dz={key:0,class:"table-toolbar","data-testid":"table-toolbar"},uz={key:0,class:"toolbar-default-items-container"},fz={key:2,class:"table-error-state","data-testid":"table-error-state"},pz={key:3,class:"table-empty-state","data-testid":"table-empty-state"},mz={key:4,class:"table-container"},hz=["data-tableid"],gz=["aria-sort","data-key","data-testid","onClick","onMouseover"],yz=["onMousedown","onMouseover"],bz=["aria-describedby"],vz={key:1,class:"table-header-bulk-actions-container"},wz=["onMousedown","onMouseover"],kz=["role","tabindex"],Cz={key:1,class:"expandable-row-control-container"},Sz=["aria-controls","aria-expanded","onClick"],$z=["id"],Ez=["colspan"],Bz={class:"expandable-content-wrapper"},Zc=pe(t.defineComponent({__name:"KTableView",props:{data:{default:()=>[]},headers:{default:()=>[]},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ht.Default},emptyStateButtonAppearance:{default:"primary"},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{default:"body"},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["page-change","page-size-change","get-next-offset","get-previous-offset","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{emit:n}){var ie;t.useCssVars(B=>({"7853f3d5":t.unref(Fe).expandable,"7ab671f2":le.value,"2813a86c":S.value,"632a8f9e":_.value}));const r=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","tooltipTarget","data","headers"]),a=n,o=t.useSlots(),i=t.useId(),l=B=>typeof e.rowKey=="function"&&typeof e.rowKey(B)=="string"?e.rowKey(B):typeof e.rowKey=="string"&&e.rowKey in B&&typeof B[e.rowKey]=="string"?B[e.rowKey]:"",d=t.useTemplateRef("table-wrapper"),c=t.useTemplateRef("header-row"),s=t.ref([]),u=t.ref([]),f=t.ref(""),p=t.ref(""),m=t.ref(""),y=t.computed(()=>s.value.some(B=>B.key===Se.ACTIONS)),b=t.computed(()=>s.value.filter(B=>B.hidable).length>0),g=t.computed(()=>e.nested||!b.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),h=t.computed(()=>e.loading||!(e.data&&e.data.length)),v=t.computed(()=>s.value.filter(B=>B.hidable&&!He(B.key))),w=t.computed(()=>g.value?e.tablePreferences.columnVisibility||{}:{}),C=t.ref(g.value?e.tablePreferences.columnVisibility||{}:{}),S=t.ref("100%"),D=t.ref(!1),$=t.ref(!1),M=t.ref(!1),V=t.ref(!1),T=t.ref(e.tablePreferences.sortColumnKey||""),I=t.ref(e.tablePreferences.sortColumnOrder||"desc"),N=t.ref(!1),k=t.computed(()=>!e.hideToolbar&&!e.nested&&(!!o.toolbar||g.value||te.value)),x=t.useTemplateRef("actionsDropdown"),A=t.ref(!1),P=t.computed(()=>({maxHeight:Je(e.maxHeight)})),_=t.computed(()=>`${Of()}px`),F=t.ref([]),K=t.computed(()=>!e.nested&&!e.error&&s.value.some(B=>B.key===Se.BULK_ACTIONS)&&!!(o["bulk-action-items"]||o["bulk-actions"])&&!!e.data.every(B=>l(B))),q=t.ref([]),te=t.computed(()=>e.nested||!K.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),Z=t.computed(()=>{const B=F.value.length;return B?B>100?"99+":String(B):""}),ce=t.ref(new WeakMap),re=B=>`column-${B}`,de=B=>`tooltip-${B}`,Be=(B,R)=>(z,ae)=>{const ne=/^on[^a-z]/,De={};for(const ye in R)ne.test(ye)&&R[ye]&&(De[ye]=R[ye]);return Object.keys(De).reduce((ye,Te)=>{if(Te.indexOf(B)===0){const st=Te.split(B);ye[st[1]]=In=>De[Te](In,z,ae)}return ye},{})},be=t.computed(()=>(B,R)=>{const z=Be("onRow:",r)(R,"row"),ae=Be("onCell:",r)(B,"cell"),ne=["a","button","label","input","select",'span[role="checkbox"]'];return(z.click||ae.click)&&(N.value=!0),{...z,...ae,click(De){const ye=De.target,Te=ye.className;let st=ne.includes(ye.tagName.toLowerCase()),In=!1;typeof Te=="string"||Array.isArray(Te)?In=Te.includes("k-popover"):typeof Te=="object"&&(In=Object.keys(Te).includes("k-popover")),ye.closest(".popover-content")!==null&&(In=!0);for(let On=0;On<ne.length;On++)if(ye.closest(ne[On])!==null){st=!0;break}if((!st||ye.hasAttribute("disabled"))&&!In&&(z.click||ae.click))if(ae.click){a("cell-click",{data:B});const On=ae.click(De,B,"cell");typeof On=="function"&&On(De,B)}else{a("row-click",{data:R});const On=z.click(De,R,"row");typeof On=="function"&&On(De,R)}}}}),Ce=parseInt(Hd)*2+parseInt(qt),Ie={expandable:Ce,bulkActions:48,actions:54},Fe=P2(Ie,B=>`${B}px`),Ne=t.ref(((ie=e.tablePreferences)==null?void 0:ie.columnWidths)||Ie),Oe=t.computed(()=>{const B={};for(const R in Ne.value){const z=R;if(!Ne.value[z])continue;const ae=Ne.value[z]+"px";B[z]={width:ae,maxWidth:ae,minWidth:ae}}return B}),Pe=(B,R)=>({"resize-hover":X.value===B.key&&R!==u.value.length-1&&xe(B),resizable:e.resizeColumns&&!e.nested,sortable:!B.hideLabel&&!!B.sortable,"active-sort":!B.hideLabel&&!!B.sortable&&B.key===T.value,[I.value]:B.key===T.value&&!B.hideLabel,"is-scrolled":$.value,"has-tooltip":!!B.tooltip,"sticky-column":fe(B.key),"second-sticky-column":$e(B.key),"has-row-scroll-overlay":Ke(B.key),"actions-column":B.key===Se.ACTIONS}),U=B=>{if(B.sortable&&B.key!==Se.BULK_ACTIONS&&B.key!==Se.ACTIONS){let R="asc";B.key===T.value&&I.value==="asc"&&(R="desc"),a("sort",{prevKey:T.value,sortColumnKey:B.key,sortColumnOrder:R}),St(B)}},G=t.computed(()=>f.value?"resizing":p.value?"resize-hover":m.value?"th-hover":""),X=t.computed(()=>{switch(G.value){case"resizing":return f.value;case"resize-hover":return p.value;case"th-hover":return m.value;default:return""}}),O=t.computed(()=>{var B;return(B=c.value)==null?void 0:B.querySelectorAll("th.resizable")}),le=t.computed(()=>{var R;const B=(R=O.value)==null?void 0:R.item(0);if(B){const z=window==null?void 0:window.getComputedStyle(B);if(z!=null&&z.height)return`${parseInt(z.height,10)}px`}return"auto"}),ge=(B,R)=>{var Te;if(B.button!==0)return;let z=0,ae=0;f.value=R;let ne=null;(Te=O.value)==null||Te.forEach(st=>{st.getAttribute("data-testid")===`table-header-${R}`&&(ne=document==null?void 0:document.querySelector(`[data-tableid="${i}"] [data-testid="table-header-${R}"]`))});const De=st=>{const In=st.clientX-z;ne==null||ne.setAttribute("style",`width: ${ae+In}px`),Ne.value[R]=ae+In},ye=()=>{f.value="",document==null||document.removeEventListener("mousemove",De),document==null||document.removeEventListener("mouseup",ye),E(),Y.value&&Ft()};if(z=B.clientX,ne){const st=window==null?void 0:window.getComputedStyle(ne);st!=null&&st.width&&(ae=parseInt(st.width,10)),document==null||document.addEventListener("mousemove",De),document==null||document.addEventListener("mouseup",ye)}},fe=B=>M.value?B===Se.BULK_ACTIONS||B===Se.EXPANDABLE:!1,$e=B=>B===Se.BULK_ACTIONS&&Y.value,Ke=B=>M.value?K.value?B===Se.BULK_ACTIONS:Y.value?B===Se.EXPANDABLE:!1:!1,He=B=>B===Se.EXPANDABLE||B===Se.BULK_ACTIONS||B===Se.ACTIONS,xe=(B,R=!1)=>{if(!e.resizeColumns||e.nested)return!1;if(R){if(u.value.indexOf(B)===u.value.length-1)return!1;const ae=u.value[u.value.indexOf(B)-1];return!He(ae.key)}const z=u.value[u.value.indexOf(B)+1];return!He(B.key)&&!He(z.key)},Ue=(B,R,z)=>{a("row-actions-toggle",{row:B,open:R}),setTimeout(()=>{z.isRowActionsDropdownOpen=R},R?0:100)},nt=t.computed(()=>!(e.hidePagination||e.nested||e.hidePaginationWhenOptional&&e.data.length&&e.paginationAttributes.totalCount&&e.paginationAttributes.totalCount<=e.data.length));t.watch(()=>e.headers,B=>{if(B&&B.length){const R=B.filter(ne=>ne.key!==Se.BULK_ACTIONS&&ne.key!==Se.ACTIONS),z=B.find(ne=>ne.key===Se.BULK_ACTIONS),ae=B.find(ne=>ne.key===Se.ACTIONS);z&&R.unshift(z),ae&&R.push(ae),s.value=R}},{deep:!0,immediate:!0});const ot=B=>!B.hideLabel&&!!B.sortable&&B.key!==Se.BULK_ACTIONS&&B.key!==Se.ACTIONS,St=B=>{const{key:R}=B;T.value&&R===T.value?I.value==="asc"?I.value="desc":I.value="asc":(T.value=R,I.value="asc"),E()},At=B=>{var z;const R=B.target;R&&(typeof R.scrollTop=="number"||typeof R.scrollLeft=="number")&&(R.scrollTop>1?(D.value=!0,$.value=!0):R.scrollTop===0&&($.value=!1),R.scrollLeft>1?M.value=!0:R.scrollLeft===0&&(M.value=!1),R.scrollWidth===R.scrollLeft+R.clientWidth?V.value=!1:V.value=!0),(z=x.value)==null||z.forEach(ae=>{ae&&ae.closeDropdown&&ae.closeDropdown()})},it=B=>q.value.find(R=>R.rowKey===l(B)),rt=B=>{if(typeof e.rowBulkActionEnabled!="function")return!1;const R=e.rowBulkActionEnabled(B);return typeof R=="boolean"?R:R.enabled},W=B=>{if(typeof e.rowBulkActionEnabled!="function")return"";const R=e.rowBulkActionEnabled(B);return typeof R=="boolean"?"":R.disabledTooltip||""},ke=(B,R)=>{const{to:z}=e.rowLink(B);return!z||R===Se.BULK_ACTIONS||R===Se.ACTIONS?"div":typeof z=="object"?"router-link":"a"},L=(B,R)=>{if(R===Se.BULK_ACTIONS||R===Se.ACTIONS)return{};const{to:z,target:ae}=e.rowLink(B),ne=z&&typeof z=="object",De=z&&typeof z=="string";return{...ne&&{to:z},...De&&{href:z},...(ne||De)&&{...ae&&{target:ae}}}},Q=t.ref(o1(e.tablePreferences,e.paginationAttributes)),me=B=>{Q.value=B.pageSize,a("page-size-change",B),E()},H=t.computed(()=>({sortColumnKey:T.value,sortColumnOrder:I.value,...e.resizeColumns?{columnWidths:Ne.value}:{},...b.value?{columnVisibility:C.value}:{},...Q.value&&!e.hidePagination&&{pageSize:Q.value}})),E=()=>{a("update:table-preferences",H.value)},Y=t.computed(()=>!e.nested&&e.data.some(B=>e.rowExpandable(B))),ee={key:Se.EXPANDABLE,label:"Expandable rows controls",hideLabel:!0},se=()=>{const B=[];return e.data.forEach((R,z)=>{e.rowExpanded(R)&&B.push(z)}),B},Ae=t.ref(se()),Ze=async(B,R)=>{Ft(),await t.nextTick(),Ae.value.includes(B)?(Ae.value=Ae.value.filter(z=>z!==B),a("update:row-expanded",{row:R,expanded:!1})):(Ae.value=[...Ae.value,B],a("update:row-expanded",{row:R,expanded:!0}))},lt=t.computed(()=>u.value.filter(B=>B.key!==Se.EXPANDABLE&&B.key!==Se.BULK_ACTIONS)),Zt=t.ref({}),Ft=()=>{if(typeof document>"u")return;const B=document==null?void 0:document.querySelector(`[data-tableid="${i}"]`),R=B==null?void 0:B.querySelectorAll("th"),z={};R==null||R.forEach((ae,ne)=>{const De=ae.getAttribute("data-key");if(De===Se.EXPANDABLE)return;let ye=ae.getBoundingClientRect().width;ne===1&&(ye+=Ce),ne===R.length-1&&(ye-=15),z[De]=ye}),Zt.value=z};t.watch([C,s,Y],B=>{const[R,z,ae]=B;let ne=z.filter(De=>De.key===Se.BULK_ACTIONS?K.value:R[De.key]!==!1);ne.find(De=>De.key===Se.EXPANDABLE)&&(ne=ne.filter(De=>De.key!==Se.EXPANDABLE)),ae&&ne.unshift(ee),JSON.stringify(ne)!==JSON.stringify(u.value)&&(u.value=ne,E()),ae&&Ft()},{deep:!0,immediate:!0}),t.watch(g,B=>{B&&(C.value=e.tablePreferences.columnVisibility||{})},{immediate:!0});const Yt=t.ref(!1),Xe=t.computed(()=>{const B=q.value.filter(R=>!R.disabled&&e.data.find(z=>l(z)===R.rowKey));return!!B.filter(R=>R.selected).length&&!!B.filter(R=>!R.selected).length}),j=B=>{q.value.forEach(R=>{e.data.find(z=>l(z)===R.rowKey)&&!R.disabled&&(R.selected=B)})};return t.watch([()=>e.data,q],B=>{const[R,z]=B;if(R.forEach(ae=>{if(!ce.value.get(ae)){const ne=l(ae)||al();ce.value.set(ae,`table-${i}-row-${ne}`)}}),K.value){R.forEach(ye=>{it(ye)||q.value.push({rowKey:l(ye),selected:!1,disabled:!rt(ye)})});const ae=z.filter(ye=>!ye.disabled&&R.find(Te=>l(Te)===ye.rowKey));ae.length&&ae.filter(ye=>ye.selected).length===ae.length?Yt.value=!0:(ae.filter(ye=>!ye.selected).length,ae.length,Yt.value=!1);const ne=R.filter(ye=>{const Te=z.find(st=>st.rowKey===l(ye));return!!(Te&&Te.selected)}),De=[];F.value.forEach(ye=>{R.find(st=>l(ye)===l(st))||De.push(ye)}),F.value=[...De,...ne]}Ae.value=se()},{deep:!0,immediate:!0}),t.watch(F,B=>{a("row-select",B)}),t.watch(()=>e.tablePreferences,B=>{B!=null&&B.columnWidths&&(Ne.value=B.columnWidths)}),Ev(d,B=>{var z;const R=(z=B[0])==null?void 0:z.target;R&&(V.value=R.scrollWidth>R.clientWidth,S.value=R.clientHeight+"px",D.value=R.scrollHeight>R.clientHeight)}),(B,R)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["k-table-view",{"hide-headers":B.hideHeaders}])},[k.value?(t.openBlock(),t.createElementBlock("div",dz,[t.renderSlot(B.$slots,"toolbar",{},void 0,!0),te.value||g.value?(t.openBlock(),t.createElementBlock("div",uz,[te.value?t.renderSlot(B.$slots,"bulk-actions",{key:0,selectedRows:F.value},()=>[B.$slots["bulk-actions"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(cz,{key:0,"button-label":s.value.find(z=>z.key===t.unref(Se).BULK_ACTIONS).label,count:Z.value,disabled:!Z.value||B.loading||!B.data.length},{items:t.withCtx(()=>[t.renderSlot(B.$slots,"bulk-action-items",{selectedRows:F.value},void 0,!0)]),_:3},8,["button-label","count","disabled"]))],!0):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createBlock(p1,{key:1,columns:v.value,disabled:h.value,"table-id":t.unref(i),"visibility-preferences":w.value,onUpdate:R[0]||(R[0]=z=>C.value=z)},null,8,["columns","disabled","table-id","visibility-preferences"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),B.loading&&!B.error?(t.openBlock(),t.createBlock(Sa,{key:1,"data-testid":"table-skeleton",type:"table"})):B.error?(t.openBlock(),t.createElementBlock("div",fz,[t.renderSlot(B.$slots,"error-state",{},()=>[t.createVNode(Hn,{"icon-variant":"error",message:B.errorStateMessage,title:B.errorStateTitle},t.createSlots({_:2},[B.errorStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ve,{"data-testid":"error-state-action",to:B.errorStateActionRoute,onClick:R[1]||(R[1]=z=>a("error-action-click"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.errorStateActionMessage),1)]),_:1},8,["to"])]),key:"0"}:void 0]),1032,["message","title"])],!0)])):!B.error&&!B.loading&&B.data&&!B.data.length?(t.openBlock(),t.createElementBlock("div",pz,[t.renderSlot(B.$slots,"empty-state",{},()=>[t.createVNode(Hn,{"icon-variant":B.emptyStateIconVariant,message:B.emptyStateMessage,title:B.emptyStateTitle},t.createSlots({_:2},[B.emptyStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ve,{appearance:B.emptyStateButtonAppearance,"data-testid":"empty-state-action",to:B.emptyStateActionRoute,onClick:R[2]||(R[2]=z=>a("empty-state-action-click"))},{default:t.withCtx(()=>[t.renderSlot(B.$slots,"empty-state-action-icon",{},void 0,!0),t.createTextVNode(" "+t.toDisplayString(B.emptyStateActionMessage),1)]),_:3},8,["appearance","to"])]),key:"0"}:void 0]),1032,["icon-variant","message","title"])],!0)])):(t.openBlock(),t.createElementBlock("div",mz,[t.createElementVNode("div",{ref:"table-wrapper",class:"table-wrapper",style:t.normalizeStyle(P.value),onScrollPassive:At},[t.createElementVNode("table",{class:t.normalizeClass(["table",{"has-hover":B.rowHover&&!A.value,"is-clickable":N.value}]),"data-tableid":t.unref(i)},[B.hideHeaders?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("thead",{key:0,class:t.normalizeClass({"is-scrolled":$.value})},[t.createElementVNode("tr",{ref:"header-row",class:t.normalizeClass({"is-scrolled":$.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(z,ae)=>(t.openBlock(),t.createElementBlock("th",{key:`table-${t.unref(i)}-headers-${z.key}`,"aria-sort":z.key===T.value?I.value==="asc"?"ascending":"descending":void 0,class:t.normalizeClass(["table-headers",Pe(z,ae)]),"data-key":z.key,"data-testid":`table-header-${z.key}`,style:t.normalizeStyle(Oe.value[z.key]),onClick:()=>U(z),onMouseleave:R[8]||(R[8]=ne=>m.value=""),onMouseover:ne=>m.value=z.key},[ae!==0&&xe(z,!0)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"resize-handle previous",onClick:R[3]||(R[3]=t.withModifiers(()=>{},["stop"])),onMousedown:ne=>ge(ne,u.value[ae-1].key),onMouseleave:R[4]||(R[4]=ne=>p.value=""),onMouseover:ne=>p.value=u.value[ae-1].key},null,40,yz)):t.createCommentVNode("",!0),t.createElementVNode("div",{"aria-describedby":z.tooltip||o[de(z.key)]?`${de(z.key)}-${t.unref(i)}`:void 0,class:t.normalizeClass(["table-headers-container",{resized:f.value===z.key}])},[z.key!==t.unref(Se).BULK_ACTIONS?t.renderSlot(B.$slots,re(z.key),{key:0,column:z},()=>[t.createElementVNode("span",{class:t.normalizeClass(["table-header-label",{"sr-only":z.hideLabel||z.key===t.unref(Se).ACTIONS&&z.hideLabel!==!1}])},t.toDisplayString(z.label?z.label:z.key),3)],!0):(t.openBlock(),t.createElementBlock("div",vz,[t.createVNode(Ea,{modelValue:Yt.value,"onUpdate:modelValue":R[5]||(R[5]=ne=>Yt.value=ne),"aria-label":"Toggle selection for all rows",class:"table-header-bulk-actions-checkbox","data-testid":"table-header-bulk-actions-checkbox",indeterminate:Xe.value,onChange:j},null,8,["modelValue","indeterminate"])])),z.tooltip||B.$slots[de(z.key)]?(t.openBlock(),t.createBlock(Bt,{key:2,"data-testid":de(z.key),"kpop-attributes":{target:B.tooltipTarget},"max-width":"300","tooltip-id":`${de(z.key)}-${t.unref(i)}`},{content:t.withCtx(()=>[t.renderSlot(B.$slots,de(z.key),{column:z},()=>[t.createTextVNode(t.toDisplayString(z.tooltip),1)],!0)]),default:t.withCtx(()=>[t.createVNode(t.unref(Vn),{class:"header-tooltip-trigger",color:`var(--kui-color-text-neutral, ${t.unref(Xt)})`,size:t.unref(qt),tabindex:"0"},null,8,["color","size"])]),_:2},1032,["data-testid","kpop-attributes","tooltip-id"])):t.createCommentVNode("",!0),ot(z)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[T.value===z.key?(t.openBlock(),t.createBlock(t.unref(El),{key:0,class:"active-sort-icon",color:`var(--kui-color-text-primary, ${t.unref(Yd)})`,decorative:"",size:t.unref(qt)},null,8,["color","size"])):(t.openBlock(),t.createBlock(t.unref(Zy),{key:1,class:"sort-icon",color:`var(--kui-color-text-neutral-weak, ${t.unref(Fd)})`,size:t.unref(qt),title:`Sort by ${z.label}`},null,8,["color","size","title"]))],64)):t.createCommentVNode("",!0)],10,bz),ae!==u.value.length-1&&xe(z)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"resize-handle",onClick:R[6]||(R[6]=t.withModifiers(()=>{},["stop"])),onMousedown:ne=>ge(ne,z.key),onMouseleave:R[7]||(R[7]=ne=>p.value=""),onMouseover:ne=>p.value=z.key},null,40,wz)):t.createCommentVNode("",!0),Ke(z.key)?(t.openBlock(),t.createElementBlock("div",{key:2,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),z.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createElementBlock("div",{key:3,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay right",{"overlay-visible":V.value}])},null,2)):t.createCommentVNode("",!0)],46,gz))),128))],2)],2)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B.data,(z,ae)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ce.value.get(z)},[t.createElementVNode("tr",t.mergeProps({class:{"last-row":ae===B.data.length-1&&!Ae.value.includes(ae)},role:B.rowLink(z).to?"link":void 0,tabindex:N.value&&!B.rowLink(z).to?0:void 0},{ref_for:!0},B.rowAttrs(z)),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(ne,De)=>(t.openBlock(),t.createBlock(t.unref(Cl),{key:`${ce.value.get(z)}-cell-${ne.key}`,data:{isRowActionsDropdownOpen:!1}},{default:t.withCtx(({data:ye})=>[t.createElementVNode("td",t.mergeProps({class:{"resize-hover":X.value===ne.key&&De!==u.value.length-1&&xe(ne),"row-link":!!B.rowLink(z).to,"sticky-column":fe(ne.key),"second-sticky-column":$e(ne.key),"has-row-scroll-overlay":Ke(ne.key),"actions-column":ne.key===t.unref(Se).ACTIONS},style:{...Oe.value[ne.key],...ye.isRowActionsDropdownOpen?{zIndex:2}:{}}},{ref_for:!0},B.cellAttrs({headerKey:ne.key,row:z,rowIndex:ae,colIndex:De}),t.toHandlers(be.value(z[ne.key],z),!0)),[ne.key!==t.unref(Se).EXPANDABLE?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ke(z,ne.key)),t.mergeProps({key:0,class:"cell-wrapper"},{ref_for:!0},L(z,ne.key)),{default:t.withCtx(()=>[ne.key!==t.unref(Se).BULK_ACTIONS&&ne.key!==t.unref(Se).ACTIONS?t.renderSlot(B.$slots,ne.key,{key:0,row:z,rowKey:ae,rowValue:z[ne.key]},()=>[t.createTextVNode(t.toDisplayString(z[ne.key]),1)],!0):ne.key===t.unref(Se).BULK_ACTIONS&&it(z)?(t.openBlock(),t.createBlock(Bt,{key:1,"kpop-attributes":{target:B.tooltipTarget},"max-width":"200",placement:"bottom-start",text:rt(z)?void 0:W(z)},{default:t.withCtx(()=>[t.createVNode(Ea,{modelValue:it(z).selected,"onUpdate:modelValue":Te=>it(z).selected=Te,"aria-label":"Toggle row selection",class:"bulk-actions-checkbox","data-testid":"bulk-actions-checkbox",disabled:!rt(z)},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["kpop-attributes","text"])):ne.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createBlock(qn,{key:2,ref_for:!0,ref:"actionsDropdown",class:"actions-dropdown","data-testid":"actions-dropdown","kpop-attributes":{placement:"bottom-end"},onToggleDropdown:Te=>Ue(z,Te,ye)},{items:t.withCtx(()=>[t.renderSlot(B.$slots,"action-items",{row:z},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Ve,{appearance:"tertiary","aria-label":ne.label,class:"actions-dropdown-trigger","data-testid":"row-actions-dropdown-trigger",icon:"",size:"small",onMouseleave:R[9]||(R[9]=Te=>A.value=!1),onMouseover:R[10]||(R[10]=Te=>A.value=!0)},{default:t.withCtx(()=>[t.createVNode(t.unref(xd),{class:"more-icon",decorative:""})]),_:2},1032,["aria-label"])]),_:2},1032,["onToggleDropdown"])):t.createCommentVNode("",!0)]),_:2},1040)):B.rowExpandable(z)?(t.openBlock(),t.createElementBlock("div",Cz,[t.createElementVNode("button",{"aria-controls":`table-${t.unref(i)}-row-${ae}-expandable-content`,"aria-expanded":Ae.value.includes(ae),"aria-label":"Toggle row expandable content",class:t.normalizeClass(["expandable-row-control",{expanded:Ae.value.includes(ae)}]),"data-testid":"expandable-row-control",type:"button",onClick:Te=>Ze(ae,z)},[t.createVNode(t.unref(Bl),{class:"expandable-row-control-icon",decorative:""})],10,Sz)])):t.createCommentVNode("",!0),Ke(ne.key)?(t.openBlock(),t.createElementBlock("div",{key:2,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),ne.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createElementBlock("div",{key:3,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay right",{"overlay-visible":V.value}])},null,2)):t.createCommentVNode("",!0)],16)]),_:2},1024))),128))],16,kz),Y.value&&B.rowExpandable(z)?t.withDirectives((t.openBlock(),t.createElementBlock("tr",{key:0,id:`table-${t.unref(i)}-row-${ae}-expandable-content`,class:"expandable-content-row","data-testid":"expandable-content-row"},[t.createElementVNode("td",{colspan:u.value.length},[t.createElementVNode("div",Bz,[t.renderSlot(B.$slots,"row-expanded",{columnWidths:Zt.value,nestedHeaders:lt.value,row:z},void 0,!0)])],8,Ez)],8,$z)),[[t.vShow,Ae.value.includes(ae)]]):t.createCommentVNode("",!0)],64))),128))])],10,hz)],36),!K.value&&!Y.value?(t.openBlock(),t.createElementBlock("div",{key:0,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay table-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay table-overlay right",{"overlay-visible":V.value,"scrollbar-offset":D.value}])},null,2)),nt.value?(t.openBlock(),t.createBlock($a,t.mergeProps({key:2,class:"table-pagination","data-testid":"table-pagination"},B.paginationAttributes,{onGetNextOffset:R[11]||(R[11]=z=>a("get-next-offset")),onGetPreviousOffset:R[12]||(R[12]=z=>a("get-previous-offset")),onPageChange:R[13]||(R[13]=z=>a("page-change",z)),onPageSizeChange:me}),null,16)):t.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-51e517c9"]]),j1=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ht.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{expose:n,emit:r}){const a=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),o=t.computed(()=>{const W=/^on[^a-z]/;return R2(a,(ke,L)=>W.test(L))}),i=r,l=t.useSlots(),{useDebounce:d,useRequest:c,useSwrvState:s,clientSideSorter:u}=Yn(),f=t.useId(),p=t.ref([]),m=t.computed(()=>e.sortable?e.headers:e.headers.map(W=>({...W,sortable:!1}))),y=t.computed(()=>e.emptyStateButtonAppearance?e.emptyStateButtonAppearance:e.searchInput?"tertiary":"primary"),b=t.ref(0),g=t.ref(1),h=t.ref(o1(e.tablePreferences,e.paginationAttributes)),v=t.ref(e.searchInput??""),w=t.ref(e.tablePreferences.sortColumnKey||e.initialFetcherParams.sortColumnKey||""),C=t.ref(e.tablePreferences.sortColumnOrder||e.initialFetcherParams.sortColumnOrder||"desc"),S=t.ref(!w.value),D=t.ref(null),$=t.ref([]),M=t.ref(!0),V=t.ref(!1),T={pageSize:h.value,page:g.value,query:v.value,sortColumnKey:w.value,sortColumnOrder:C.value,offset:D.value},I=t.computed(()=>({totalCount:b.value,initialPageSize:h.value,currentPage:g.value,offsetPreviousButtonDisabled:!re.value,offsetNextButtonDisabled:!de.value||!M.value,...e.paginationAttributes})),N=W=>W.startsWith("column-"),k=W=>W.startsWith("tooltip-"),x=W=>m.value.some(ke=>ke.key===W),A=t.computed(()=>l?Object.keys(l).filter(N):[]),P=t.computed(()=>l?Object.keys(l).filter(k):[]),_=t.computed(()=>l?Object.keys(l).filter(x):[]),F=t.computed(()=>({sortColumnKey:w.value,sortColumnOrder:C.value})),K=t.computed(()=>({pageSize:h.value,page:g.value,query:v.value,offset:D.value,...e.clientSort?{}:F.value})),q=t.computed(()=>({...K.value,...F.value})),te=t.ref(!0),Z=async()=>{const W=await e.fetcher(q.value);return te.value=!1,W},ce=()=>{var ke;const W={...T,...e.initialFetcherParams};g.value=W.page??T.page,h.value=W.pageSize??T.pageSize,v.value=W.query??T.query,w.value=W.sortColumnKey??T.sortColumnKey,C.value=W.sortColumnOrder??T.sortColumnOrder,e.clientSort&&w.value&&C.value&&u(w.value,"",C.value,p.value),(ke=e.paginationAttributes)!=null&&ke.offset&&(D.value=W.offset,$.value.push(W.offset)),V.value=!0},re=t.computed(()=>$.value[g.value-1]),de=t.ref(null),Be=t.computed(()=>{if(!e.fetcher||!V.value)return"";let W=f;return e.cacheIdentifier&&(W=e.cacheIdentifier),W+=`-${JSON.stringify(K.value)}`,e.fetcherCacheKey&&(W+=`-${e.fetcherCacheKey}`),`k-table_${W}`}),{debouncedFn:be,generateDebouncedFn:Ce}=d(W=>{v.value=W},350),Ie=Ce(0),{data:Fe,response:Ne,error:Oe,revalidate:Pe,isValidating:U,isLoading:G}=c(()=>Be.value,()=>Z(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:X,hasData:O}=s(Fe,Oe,U),le=t.computed(()=>({hasData:O.value,state:X.value})),ge=t.computed(()=>G.value?"loading":Oe.value?"error":"success"),{debouncedFn:fe}=d(Pe,500),$e=({sortColumnKey:W,prevKey:ke,sortColumnOrder:L})=>{var H;S.value=!0;const Q=m.value.find(E=>E.key===W)||{},{useSortHandlerFunction:me}=Q;if(i("sort",{prevKey:ke,sortColumnKey:W,sortColumnOrder:L}),g.value=1,(!w.value||W!==w.value)&&($.value=[null]),w.value=W,C.value=L,e.clientSort)if(me&&e.sortHandlerFunction){const E=e.sortHandlerFunction({key:W,prevKey:ke,sortColumnOrder:C.value,data:p.value});E&&(p.value=[...E])}else u(W,ke,C.value,p.value);else(H=e.paginationAttributes)!=null&&H.offset||fe()},Ke=({page:W})=>{g.value=W},He=({pageSize:W})=>{$.value=[null],D.value=null,h.value=W,g.value=1},xe=({columnWidths:W,columnVisibility:ke})=>{Ue.value=W,nt.value=ke,St()},Ue=t.ref({}),nt=t.ref({}),ot=t.computed(()=>({pageSize:h.value,sortColumnKey:w.value,sortColumnOrder:C.value,...Ue.value?{columnWidths:Ue.value}:{},...nt.value?{columnVisibility:nt.value}:{}})),St=()=>{ge.value==="success"&&i("update:table-preferences",ot.value)},At=()=>{g.value++,D.value=de.value},it=()=>{g.value--,D.value=re.value},rt=t.computed(()=>{var ke,L,Q;if(!e.fetcher||e.hidePagination)return!1;const W=((L=(ke=e.paginationAttributes)==null?void 0:ke.pageSizes)==null?void 0:L[0])??a1;return e.hidePaginationWhenOptional&&g.value===1?(Q=e.paginationAttributes)!=null&&Q.offset?!!re.value||!!de.value||p.value.length>=W:b.value>W:!0});return t.watch(Ne,W=>{var ke,L,Q,me;W!=null&&W.data&&(p.value=[...W.data],b.value=((ke=e.paginationAttributes)==null?void 0:ke.totalCount)||W.total||((L=W.data)==null?void 0:L.length)||0,(Q=e.paginationAttributes)!=null&&Q.offset&&((me=W.pagination)!=null&&me.offset?(de.value=W.pagination.offset,$.value[g.value]||$.value.push(W.pagination.offset)):de.value=null,M.value=W.pagination&&"hasNextPage"in W.pagination?W.pagination.hasNextPage||!1:!0),p.value.length===0&&g.value>1&&(g.value=1,$.value=[null],D.value=null),e.sortable&&!S.value&&$e({sortColumnKey:w.value,prevKey:"",sortColumnOrder:C.value}))},{deep:!0,immediate:!0}),t.watch([le,ge],W=>{const[ke,L]=W;i("state",{state:L,hasData:ke.hasData})}),t.watch(()=>e.searchInput,W=>{W===""?Ie(W):be(W)},{immediate:!0}),t.watch([v,h],async(W,ke)=>{const[L]=ke,[Q]=W;Q!==L&&g.value!==1&&(g.value=1,$.value=[null],D.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{ce()}),n({revalidate:()=>{Pe()}}),(W,ke)=>(t.openBlock(),t.createBlock(Zc,t.mergeProps({"cell-attrs":W.cellAttrs,class:"k-table-data",data:p.value,"empty-state-action-message":W.emptyStateActionMessage,"empty-state-action-route":W.emptyStateActionRoute,"empty-state-button-appearance":y.value,"empty-state-icon-variant":W.emptyStateIconVariant,"empty-state-message":W.emptyStateMessage,"empty-state-title":W.emptyStateTitle,error:W.error,"error-state-action-message":W.errorStateActionMessage,"error-state-action-route":W.errorStateActionRoute,"error-state-message":W.errorStateMessage,"error-state-title":W.errorStateTitle,headers:m.value,"hide-headers":W.hideHeaders,"hide-pagination":W.hidePagination||!rt.value,"hide-pagination-when-optional":!1,"hide-toolbar":W.hideToolbar,loading:W.loading||t.unref(G),"max-height":W.maxHeight,nested:W.nested,"pagination-attributes":I.value,"resize-columns":W.resizeColumns,"row-attrs":W.rowAttrs,"row-bulk-action-enabled":W.rowBulkActionEnabled,"row-expandable":W.rowExpandable,"row-expanded":W.rowExpanded,"row-hover":W.rowHover,"row-key":W.rowKey,"row-link":W.rowLink,"table-preferences":ot.value,"tooltip-target":W.tooltipTarget},o.value,{onEmptyStateActionClick:ke[0]||(ke[0]=L=>i("empty-state-action-click")),onErrorActionClick:ke[1]||(ke[1]=L=>i("error-action-click")),onGetNextOffset:At,onGetPreviousOffset:it,onPageChange:Ke,onPageSizeChange:He,onRowActionsToggle:ke[2]||(ke[2]=L=>W.$emit("row-actions-toggle",L)),onRowSelect:ke[3]||(ke[3]=L=>i("row-select",L)),onSort:$e,"onUpdate:rowExpanded":ke[4]||(ke[4]=L=>i("update:row-expanded",L)),"onUpdate:tablePreferences":xe}),t.createSlots({_:2},[l.toolbar&&!W.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"toolbar",{state:le.value})]),key:"0"}:void 0,l["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(L)))]),key:"1"}:void 0,l["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(L)))]),key:"2"}:void 0,l["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"error-state")]),key:"3"}:void 0,l["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"empty-state")]),key:"4"}:void 0,l["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(A.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),t.renderList(P.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),t.renderList(_.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),l["action-items"]?{name:"action-items",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(L)))]),key:"6"}:void 0,l["row-expanded"]?{name:"row-expanded",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(L)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}}),Dz={class:"k-slider","data-testid":"k-slider"},Tz={class:"slider-container"},Nz={class:"input-value"},xz=["id","disabled","list","max","min","step"],Az=["id"],Mz=["data-testid","label","value"],Iz={"aria-hidden":"true",class:"slider-marks","data-testid":"slider-marks"},Oz=["data-testid"],G1=pe(t.defineComponent({__name:"KSlider",props:t.mergeModels({label:{default:""},min:{default:0},max:{default:10},step:{default:1},showMarks:{type:Boolean,default:!1},marks:{default:()=>[]},showValue:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelAttributes:{default:()=>({})}},{modelValue:{required:!0,type:Number},modelModifiers:{}}),emits:t.mergeModels(["change","update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const r=n,a=t.useId(),o=t.computed(()=>({width:y(u.value)})),i=t.computed(()=>({left:y(u.value),transform:`translateX(-${y(u.value)})`})),l=()=>{r("change",u.value),c()},d=t.useTemplateRef("thumbPopover"),c=()=>{var b;(b=d.value)==null||b.showPopover()},s=()=>{var b;(b=d.value)==null||b.hidePopover()},u=t.useModel(e,"modelValue"),f=t.computed(()=>{if(e.max<=e.min||e.step<=0)return[];const b=[];for(let g=e.min;g<=e.max;g+=e.step)b.push(g);return b}),p=b=>b>=e.min&&b<=e.max&&f.value.includes(b),m=t.computed(()=>{var b,g;if(e.marks.length){if(typeof e.marks[0]=="object")return e.marks.filter(h=>p(h.value));{const h=e.marks.filter(v=>p(v)).map(v=>({label:String(v),value:v}));return((b=h[0])==null?void 0:b.value)!==e.min&&h.unshift({label:String(e.min),value:e.min}),((g=h.at(-1))==null?void 0:g.value)!==e.max&&h.push({label:String(e.max),value:e.max}),h}}return e.showMarks?f.value.map(h=>({label:String(h),value:h})):[{label:String(e.min),value:e.min},{label:String(e.max),value:e.max}]}),y=b=>`${(b-e.min)/(e.max-e.min)*100}%`;return t.watch(()=>e.max,b=>{b<=e.min&&console.warn(`KSlider: max value ${b} must be greater than min value ${e.min}.`)},{immediate:!0}),t.watch(()=>e.step,b=>{e.max>e.min&&(b<=0||(e.max-e.min)%b!==0)&&console.warn(`KSlider: step value ${b} is invalid.`)},{immediate:!0}),t.watch(u,b=>{e.max>e.min&&!p(b)&&(console.warn(`KSelect: value ${b} is out of range [${f.value.join(", ")}]. Setting to min value ${e.min}.`),u.value=e.min)},{immediate:!0}),t.watch(()=>e.marks,b=>{if(b.length){let g=[];g=b.filter(h=>!p(typeof e.marks[0]=="object"?h.value:h)),g.length&&console.warn(`KSlider: marks [${g.map(h=>typeof g[0]=="object"?h.value:h).join(", ")}] are out of range [${f.value.join(", ")}].`)}},{immediate:!0}),(b,g)=>(t.openBlock(),t.createElementBlock("div",Dz,[b.label?(t.openBlock(),t.createBlock(Wt,t.mergeProps({key:0},b.labelAttributes,{for:`${t.unref(a)}-input`}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:1},16,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tz,[t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["lower-range-track",{"is-disabled":b.disabled}]),style:t.normalizeStyle(o.value)},null,6),t.createVNode(Fn,{ref:"thumbPopover","aria-hidden":"true",disabled:b.disabled||!b.showValue,"hide-close-icon":"",placement:"top","popover-timeout":500,trigger:"hover",width:"auto"},{content:t.withCtx(()=>[t.createElementVNode("span",Nz,t.toDisplayString(u.value),1)]),default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["thumb",{"is-disabled":b.disabled}]),style:t.normalizeStyle(i.value)},null,6)]),_:1},8,["disabled"]),t.withDirectives(t.createElementVNode("input",{id:`${t.unref(a)}-input`,"onUpdate:modelValue":g[0]||(g[0]=h=>u.value=h),"data-testid":"slider-input",disabled:b.disabled,list:`${t.unref(a)}-markers`,max:b.max,min:b.min,step:b.step,type:"range",onBlur:s,onFocus:c,onInput:l,onMouseup:s,onTouchend:s},null,40,xz),[[t.vModelText,u.value,void 0,{number:!0}]]),t.createElementVNode("datalist",{id:`${t.unref(a)}-markers`,"data-testid":"slider-datalist-marks"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,h=>(t.openBlock(),t.createElementBlock("option",{key:`datalist-mark-${h.value}`,"data-testid":`datalist-mark-${h.value}`,label:h.label,style:t.normalizeStyle({left:y(h.value)}),value:h.value},null,12,Mz))),128))],8,Az),t.createElementVNode("div",Iz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,h=>(t.openBlock(),t.createElementBlock("span",{key:`mark-${h.value}`,"data-testid":`mark-${h.value}`,style:t.normalizeStyle({left:y(h.value)})},t.toDisplayString(h.label||h.value),13,Oz))),128))])])]))}}),[["__scopeId","data-v-29cb81de"]]),Xc=Object.freeze(Object.defineProperty({__proto__:null,KAlert:qd,KBadge:Lr,KBreadcrumbs:gu,KButton:Ve,KCard:Fl,KCatalog:Cu,KCatalogItem:Kl,KCheckbox:Ea,KClipboardProvider:kl,KCodeBlock:Pf,KCodeBlockIconButton:gr,KCollapse:Vf,KComponent:Cl,KCopy:U1,KDateTimePicker:Yg,KDropdown:qn,KDropdownItem:So,KDropdownMenu:qn,KEmptyState:Hn,KExternalLink:K1,KFileUpload:Hg,KInput:Sn,KInputSwitch:qg,KLabel:Wt,KModal:Ec,KModalFullscreen:t1,KMultiselect:i1,KPagination:$a,KPop:Fn,KPrompt:l1,KRadio:s1,KSegmentedControl:Es,KSelect:d1,KSkeleton:Sa,KSkeletonBox:It,KSlideout:u1,KSlider:G1,KStepper:f1,KTable:m1,KTableData:j1,KTableView:Zc,KTabs:h1,KTextArea:b1,KToaster:Tc,KToggle:ya,KTooltip:Bt,KTreeList:_1,KTruncate:W1,ToastManager:v1},Symbol.toStringTag,{value:"Module"})),Pz={install:e=>{for(const n in Xc)e.component(n,Xc[n])}};J.AlertAppearances=Ir,J.BadgeAppearances=Z1,J.BadgeMethodAppearances=Sl,J.ButtonAppearances=Jc,J.ButtonSizes=X1,J.CardSizeArray=ey,J.DateTimePickerModes=ba,J.EmptyStateIconVariants=Ht,J.HeaderTags=J1,J.KAlert=qd,J.KBadge=Lr,J.KBreadcrumbs=gu,J.KButton=Ve,J.KCard=Fl,J.KCatalog=Cu,J.KCatalogItem=Kl,J.KCheckbox=Ea,J.KClipboardProvider=kl,J.KCodeBlock=Pf,J.KCodeBlockIconButton=gr,J.KCollapse=Vf,J.KComponent=Cl,J.KCopy=U1,J.KDateTimePicker=Yg,J.KDropdown=qn,J.KDropdownItem=So,J.KDropdownMenu=qn,J.KEmptyState=Hn,J.KExternalLink=K1,J.KFileUpload=Hg,J.KInput=Sn,J.KInputSwitch=qg,J.KLabel=Wt,J.KModal=Ec,J.KModalFullscreen=t1,J.KMultiselect=i1,J.KPagination=$a,J.KPop=Fn,J.KPrompt=l1,J.KRadio=s1,J.KSegmentedControl=Es,J.KSelect=d1,J.KSkeleton=Sa,J.KSkeletonBox=It,J.KSlideout=u1,J.KSlider=G1,J.KStepper=f1,J.KTable=m1,J.KTableData=j1,J.KTableView=Zc,J.KTabs=h1,J.KTextArea=b1,J.KToaster=Tc,J.KToggle=ya,J.KTooltip=Bt,J.KTreeList=_1,J.KTruncate=W1,J.MethodsArray=ay,J.ModeArray=ry,J.ModeArrayCustom=ed,J.ModeArrayRelative=td,J.ModeDateOnly=nd,J.PopPlacementsArray=iy,J.PopTriggerArray=oy,J.RadioTypesArray=ly,J.SkeletonBoxHeightArray=dy,J.SkeletonBoxWidthArray=cy,J.SkeletonTypeArray=sy,J.StepperStateArray=uy,J.TableViewHeaderKeys=Se,J.TimepickerMode=ny,J.ToastManager=v1,J.ToasterAppearances=$l,J.TriggerAlignmentArray=ty,J.components=Xc,J.default=Pz,Object.defineProperties(J,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
42
+ */function w1(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function pn(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?w1(Object(r),!0).forEach(function(a){oR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function il(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?il=function(n){return typeof n}:il=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},il(e)}function oR(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function xn(){return xn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},xn.apply(this,arguments)}function iR(e,n){if(e==null)return{};var r={},a=Object.keys(e),o,i;for(i=0;i<a.length;i++)o=a[i],!(n.indexOf(o)>=0)&&(r[o]=e[o]);return r}function lR(e,n){if(e==null)return{};var r=iR(e,n),a,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)a=i[o],!(n.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var sR="1.14.0";function An(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Mn=An(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Xa=An(/Edge/i),k1=An(/firefox/i),Ja=An(/safari/i)&&!An(/chrome/i)&&!An(/android/i),C1=An(/iP(ad|od|hone)/i),cR=An(/chrome/i)&&An(/android/i),S1={capture:!1,passive:!1};function Le(e,n,r){e.addEventListener(n,r,!Mn&&S1)}function Me(e,n,r){e.removeEventListener(n,r,!Mn&&S1)}function ll(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function dR(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function mn(e,n,r,a){if(e){r=r||document;do{if(n!=null&&(n[0]===">"?e.parentNode===r&&ll(e,n):ll(e,n))||a&&e===r)return e;if(e===r)break}while(e=dR(e))}return null}var $1=/\s+/g;function Tt(e,n,r){if(e&&n)if(e.classList)e.classList[r?"add":"remove"](n);else{var a=(" "+e.className+" ").replace($1," ").replace(" "+n+" "," ");e.className=(a+(r?" "+n:"")).replace($1," ")}}function ve(e,n,r){var a=e&&e.style;if(a){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),n===void 0?r:r[n];!(n in a)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),a[n]=r+(typeof r=="string"?"":"px")}}function ua(e,n){var r="";if(typeof e=="string")r=e;else do{var a=ve(e,"transform");a&&a!=="none"&&(r=a+" "+r)}while(!n&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(r)}function E1(e,n,r){if(e){var a=e.getElementsByTagName(n),o=0,i=a.length;if(r)for(;o<i;o++)r(a[o],o);return a}return[]}function hn(){var e=document.scrollingElement;return e||document.documentElement}function tt(e,n,r,a,o){if(!(!e.getBoundingClientRect&&e!==window)){var i,l,d,c,s,u,f;if(e!==window&&e.parentNode&&e!==hn()?(i=e.getBoundingClientRect(),l=i.top,d=i.left,c=i.bottom,s=i.right,u=i.height,f=i.width):(l=0,d=0,c=window.innerHeight,s=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(n||r)&&e!==window&&(o=o||e.parentNode,!Mn))do if(o&&o.getBoundingClientRect&&(ve(o,"transform")!=="none"||r&&ve(o,"position")!=="static")){var p=o.getBoundingClientRect();l-=p.top+parseInt(ve(o,"border-top-width")),d-=p.left+parseInt(ve(o,"border-left-width")),c=l+i.height,s=d+i.width;break}while(o=o.parentNode);if(a&&e!==window){var m=ua(o||e),y=m&&m.a,b=m&&m.d;m&&(l/=b,d/=y,f/=y,u/=b,c=l+u,s=d+f)}return{top:l,left:d,bottom:c,right:s,width:f,height:u}}}function B1(e,n,r){for(var a=er(e,!0),o=tt(e)[n];a;){var i=tt(a)[r],l=void 0;if(l=o>=i,!l)return a;if(a===hn())break;a=er(a,!1)}return!1}function fa(e,n,r,a){for(var o=0,i=0,l=e.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==we.ghost&&(a||l[i]!==we.dragged)&&mn(l[i],r.draggable,e,!1)){if(o===n)return l[i];o++}i++}return null}function xc(e,n){for(var r=e.lastElementChild;r&&(r===we.ghost||ve(r,"display")==="none"||n&&!ll(r,n));)r=r.previousElementSibling;return r||null}function zt(e,n){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==we.clone&&(!n||ll(e,n))&&r++;return r}function D1(e){var n=0,r=0,a=hn();if(e)do{var o=ua(e),i=o.a,l=o.d;n+=e.scrollLeft*i,r+=e.scrollTop*l}while(e!==a&&(e=e.parentNode));return[n,r]}function uR(e,n){for(var r in e)if(e.hasOwnProperty(r)){for(var a in n)if(n.hasOwnProperty(a)&&n[a]===e[r][a])return Number(r)}return-1}function er(e,n){if(!e||!e.getBoundingClientRect)return hn();var r=e,a=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var o=ve(r);if(r.clientWidth<r.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return hn();if(a||n)return r;a=!0}}while(r=r.parentNode);return hn()}function fR(e,n){if(e&&n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function Ac(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var eo;function T1(e,n){return function(){if(!eo){var r=arguments,a=this;r.length===1?e.call(a,r[0]):e.apply(a,r),eo=setTimeout(function(){eo=void 0},n)}}}function pR(){clearTimeout(eo),eo=void 0}function N1(e,n,r){e.scrollLeft+=n,e.scrollTop+=r}function x1(e){var n=window.Polymer,r=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var Nt="Sortable"+new Date().getTime();function mR(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var a=[].slice.call(this.el.children);a.forEach(function(o){if(!(ve(o,"display")==="none"||o===we.ghost)){e.push({target:o,rect:tt(o)});var i=pn({},e[e.length-1].rect);if(o.thisAnimationDuration){var l=ua(o,!0);l&&(i.top-=l.f,i.left-=l.e)}o.fromRect=i}})}},addAnimationState:function(a){e.push(a)},removeAnimationState:function(a){e.splice(uR(e,{target:a}),1)},animateAll:function(a){var o=this;if(!this.options.animation){clearTimeout(n),typeof a=="function"&&a();return}var i=!1,l=0;e.forEach(function(d){var c=0,s=d.target,u=s.fromRect,f=tt(s),p=s.prevFromRect,m=s.prevToRect,y=d.rect,b=ua(s,!0);b&&(f.top-=b.f,f.left-=b.e),s.toRect=f,s.thisAnimationDuration&&Ac(p,f)&&!Ac(u,f)&&(y.top-f.top)/(y.left-f.left)===(u.top-f.top)/(u.left-f.left)&&(c=gR(y,p,m,o.options)),Ac(f,u)||(s.prevFromRect=u,s.prevToRect=f,c||(c=o.options.animation),o.animate(s,y,f,c)),c&&(i=!0,l=Math.max(l,c),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},c),s.thisAnimationDuration=c)}),clearTimeout(n),i?n=setTimeout(function(){typeof a=="function"&&a()},l):typeof a=="function"&&a(),e=[]},animate:function(a,o,i,l){if(l){ve(a,"transition",""),ve(a,"transform","");var d=ua(this.el),c=d&&d.a,s=d&&d.d,u=(o.left-i.left)/(c||1),f=(o.top-i.top)/(s||1);a.animatingX=!!u,a.animatingY=!!f,ve(a,"transform","translate3d("+u+"px,"+f+"px,0)"),this.forRepaintDummy=hR(a),ve(a,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),ve(a,"transform","translate3d(0,0,0)"),typeof a.animated=="number"&&clearTimeout(a.animated),a.animated=setTimeout(function(){ve(a,"transition",""),ve(a,"transform",""),a.animated=!1,a.animatingX=!1,a.animatingY=!1},l)}}}}function hR(e){return e.offsetWidth}function gR(e,n,r,a){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))*a.animation}var pa=[],Mc={initializeByDefault:!0},to={mount:function(n){for(var r in Mc)Mc.hasOwnProperty(r)&&!(r in n)&&(n[r]=Mc[r]);pa.forEach(function(a){if(a.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),pa.push(n)},pluginEvent:function(n,r,a){var o=this;this.eventCanceled=!1,a.cancel=function(){o.eventCanceled=!0};var i=n+"Global";pa.forEach(function(l){r[l.pluginName]&&(r[l.pluginName][i]&&r[l.pluginName][i](pn({sortable:r},a)),r.options[l.pluginName]&&r[l.pluginName][n]&&r[l.pluginName][n](pn({sortable:r},a)))})},initializePlugins:function(n,r,a,o){pa.forEach(function(d){var c=d.pluginName;if(!(!n.options[c]&&!d.initializeByDefault)){var s=new d(n,r,n.options);s.sortable=n,s.options=n.options,n[c]=s,xn(a,s.defaults)}});for(var i in n.options)if(n.options.hasOwnProperty(i)){var l=this.modifyOption(n,i,n.options[i]);typeof l<"u"&&(n.options[i]=l)}},getEventProperties:function(n,r){var a={};return pa.forEach(function(o){typeof o.eventProperties=="function"&&xn(a,o.eventProperties.call(r[o.pluginName],n))}),a},modifyOption:function(n,r,a){var o;return pa.forEach(function(i){n[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[r]=="function"&&(o=i.optionListeners[r].call(n[i.pluginName],a))}),o}};function yR(e){var n=e.sortable,r=e.rootEl,a=e.name,o=e.targetEl,i=e.cloneEl,l=e.toEl,d=e.fromEl,c=e.oldIndex,s=e.newIndex,u=e.oldDraggableIndex,f=e.newDraggableIndex,p=e.originalEvent,m=e.putSortable,y=e.extraEventProperties;if(n=n||r&&r[Nt],!!n){var b,g=n.options,h="on"+a.charAt(0).toUpperCase()+a.substr(1);window.CustomEvent&&!Mn&&!Xa?b=new CustomEvent(a,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(a,!0,!0)),b.to=l||r,b.from=d||r,b.item=o||r,b.clone=i,b.oldIndex=c,b.newIndex=s,b.oldDraggableIndex=u,b.newDraggableIndex=f,b.originalEvent=p,b.pullMode=m?m.lastPutMode:void 0;var v=pn(pn({},y),to.getEventProperties(a,n));for(var w in v)b[w]=v[w];r&&r.dispatchEvent(b),g[h]&&g[h].call(n,b)}}var bR=["evt"],Ct=function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.evt,i=lR(a,bR);to.pluginEvent.bind(we)(n,r,pn({dragEl:oe,parentEl:Ge,ghostEl:Ee,rootEl:We,nextEl:xr,lastDownEl:sl,cloneEl:Qe,cloneHidden:tr,dragStarted:ro,putSortable:at,activeSortable:we.active,originalEvent:o,oldIndex:ma,oldDraggableIndex:no,newIndex:xt,newDraggableIndex:nr,hideGhostForTarget:L1,unhideGhostForTarget:R1,cloneNowHidden:function(){tr=!0},cloneNowShown:function(){tr=!1},dispatchSortableEvent:function(d){vt({sortable:r,name:d,originalEvent:o})}},i))};function vt(e){yR(pn({putSortable:at,cloneEl:Qe,targetEl:oe,rootEl:We,oldIndex:ma,oldDraggableIndex:no,newIndex:xt,newDraggableIndex:nr},e))}var oe,Ge,Ee,We,xr,sl,Qe,tr,ma,xt,no,nr,cl,at,ha=!1,dl=!1,ul=[],Ar,Qt,Ic,Oc,A1,M1,ro,ga,ao,oo=!1,fl=!1,pl,ut,Pc=[],Vc=!1,ml=[],hl=typeof document<"u",gl=C1,I1=Xa||Mn?"cssFloat":"float",vR=hl&&!cR&&!C1&&"draggable"in document.createElement("div"),O1=function(){if(hl){if(Mn)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),P1=function(n,r){var a=ve(n),o=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=fa(n,0,r),l=fa(n,1,r),d=i&&ve(i),c=l&&ve(l),s=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+tt(i).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+tt(l).width;if(a.display==="flex")return a.flexDirection==="column"||a.flexDirection==="column-reverse"?"vertical":"horizontal";if(a.display==="grid")return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&d.float&&d.float!=="none"){var f=d.float==="left"?"left":"right";return l&&(c.clear==="both"||c.clear===f)?"vertical":"horizontal"}return i&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||s>=o&&a[I1]==="none"||l&&a[I1]==="none"&&s+u>o)?"vertical":"horizontal"},wR=function(n,r,a){var o=a?n.left:n.top,i=a?n.right:n.bottom,l=a?n.width:n.height,d=a?r.left:r.top,c=a?r.right:r.bottom,s=a?r.width:r.height;return o===d||i===c||o+l/2===d+s/2},kR=function(n,r){var a;return ul.some(function(o){var i=o[Nt].options.emptyInsertThreshold;if(!(!i||xc(o))){var l=tt(o),d=n>=l.left-i&&n<=l.right+i,c=r>=l.top-i&&r<=l.bottom+i;if(d&&c)return a=o}}),a},V1=function(n){function r(i,l){return function(d,c,s,u){var f=d.options.group.name&&c.options.group.name&&d.options.group.name===c.options.group.name;if(i==null&&(l||f))return!0;if(i==null||i===!1)return!1;if(l&&i==="clone")return i;if(typeof i=="function")return r(i(d,c,s,u),l)(d,c,s,u);var p=(l?d:c).options.group.name;return i===!0||typeof i=="string"&&i===p||i.join&&i.indexOf(p)>-1}}var a={},o=n.group;(!o||il(o)!="object")&&(o={name:o}),a.name=o.name,a.checkPull=r(o.pull,!0),a.checkPut=r(o.put),a.revertClone=o.revertClone,n.group=a},L1=function(){!O1&&Ee&&ve(Ee,"display","none")},R1=function(){!O1&&Ee&&ve(Ee,"display","")};hl&&document.addEventListener("click",function(e){if(dl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),dl=!1,!1},!0);var Mr=function(n){if(oe){n=n.touches?n.touches[0]:n;var r=kR(n.clientX,n.clientY);if(r){var a={};for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);a.target=a.rootEl=r,a.preventDefault=void 0,a.stopPropagation=void 0,r[Nt]._onDragOver(a)}}},CR=function(n){oe&&oe.parentNode[Nt]._isOutsideThisEl(n.target)};function we(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=xn({},n),e[Nt]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return P1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.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:we.supportPointer!==!1&&"PointerEvent"in window&&!Ja,emptyInsertThreshold:5};to.initializePlugins(this,e,r);for(var a in r)!(a in n)&&(n[a]=r[a]);V1(n);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=n.forceFallback?!1:vR,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Le(e,"pointerdown",this._onTapStart):(Le(e,"mousedown",this._onTapStart),Le(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Le(e,"dragover",this),Le(e,"dragenter",this)),ul.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),xn(this,mR())}we.prototype={constructor:we,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(ga=null)},_getDirection:function(n,r){return typeof this.options.direction=="function"?this.options.direction.call(this,n,r,oe):this.options.direction},_onTapStart:function(n){if(n.cancelable){var r=this,a=this.el,o=this.options,i=o.preventOnFilter,l=n.type,d=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(d||n).target,s=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=o.filter;if(xR(a),!oe&&!(/mousedown|pointerdown/.test(l)&&n.button!==0||o.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Ja&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=mn(c,o.draggable,a,!1),!(c&&c.animated)&&sl!==c)){if(ma=zt(c),no=zt(c,o.draggable),typeof u=="function"){if(u.call(this,n,c,this)){vt({sortable:r,rootEl:s,name:"filter",targetEl:c,toEl:a,fromEl:a}),Ct("filter",r,{evt:n}),i&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=mn(s,f.trim(),a,!1),f)return vt({sortable:r,rootEl:f,name:"filter",targetEl:c,fromEl:a,toEl:a}),Ct("filter",r,{evt:n}),!0}),u)){i&&n.cancelable&&n.preventDefault();return}o.handle&&!mn(s,o.handle,a,!1)||this._prepareDragStart(n,d,c)}}},_prepareDragStart:function(n,r,a){var o=this,i=o.el,l=o.options,d=i.ownerDocument,c;if(a&&!oe&&a.parentNode===i){var s=tt(a);if(We=i,oe=a,Ge=oe.parentNode,xr=oe.nextSibling,sl=a,cl=l.group,we.dragged=oe,Ar={target:oe,clientX:(r||n).clientX,clientY:(r||n).clientY},A1=Ar.clientX-s.left,M1=Ar.clientY-s.top,this._lastX=(r||n).clientX,this._lastY=(r||n).clientY,oe.style["will-change"]="all",c=function(){if(Ct("delayEnded",o,{evt:n}),we.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!k1&&o.nativeDraggable&&(oe.draggable=!0),o._triggerDragStart(n,r),vt({sortable:o,name:"choose",originalEvent:n}),Tt(oe,l.chosenClass,!0)},l.ignore.split(",").forEach(function(u){E1(oe,u.trim(),Lc)}),Le(d,"dragover",Mr),Le(d,"mousemove",Mr),Le(d,"touchmove",Mr),Le(d,"mouseup",o._onDrop),Le(d,"touchend",o._onDrop),Le(d,"touchcancel",o._onDrop),k1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,oe.draggable=!0),Ct("delayStart",this,{evt:n}),l.delay&&(!l.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(Xa||Mn))){if(we.eventCanceled){this._onDrop();return}Le(d,"mouseup",o._disableDelayedDrag),Le(d,"touchend",o._disableDelayedDrag),Le(d,"touchcancel",o._disableDelayedDrag),Le(d,"mousemove",o._delayedDragTouchMoveHandler),Le(d,"touchmove",o._delayedDragTouchMoveHandler),l.supportPointer&&Le(d,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(c,l.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var r=n.touches?n.touches[0]:n;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){oe&&Lc(oe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Me(n,"mouseup",this._disableDelayedDrag),Me(n,"touchend",this._disableDelayedDrag),Me(n,"touchcancel",this._disableDelayedDrag),Me(n,"mousemove",this._delayedDragTouchMoveHandler),Me(n,"touchmove",this._delayedDragTouchMoveHandler),Me(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,r){r=r||n.pointerType=="touch"&&n,!this.nativeDraggable||r?this.options.supportPointer?Le(document,"pointermove",this._onTouchMove):r?Le(document,"touchmove",this._onTouchMove):Le(document,"mousemove",this._onTouchMove):(Le(oe,"dragend",this),Le(We,"dragstart",this._onDragStart));try{document.selection?bl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,r){if(ha=!1,We&&oe){Ct("dragStarted",this,{evt:r}),this.nativeDraggable&&Le(document,"dragover",CR);var a=this.options;!n&&Tt(oe,a.dragClass,!1),Tt(oe,a.ghostClass,!0),we.active=this,n&&this._appendGhost(),vt({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Qt){this._lastX=Qt.clientX,this._lastY=Qt.clientY,L1();for(var n=document.elementFromPoint(Qt.clientX,Qt.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Qt.clientX,Qt.clientY),n!==r);)r=n;if(oe.parentNode[Nt]._isOutsideThisEl(n),r)do{if(r[Nt]){var a=void 0;if(a=r[Nt]._onDragOver({clientX:Qt.clientX,clientY:Qt.clientY,target:n,rootEl:r}),a&&!this.options.dragoverBubble)break}n=r}while(r=r.parentNode);R1()}},_onTouchMove:function(n){if(Ar){var r=this.options,a=r.fallbackTolerance,o=r.fallbackOffset,i=n.touches?n.touches[0]:n,l=Ee&&ua(Ee,!0),d=Ee&&l&&l.a,c=Ee&&l&&l.d,s=gl&&ut&&D1(ut),u=(i.clientX-Ar.clientX+o.x)/(d||1)+(s?s[0]-Pc[0]:0)/(d||1),f=(i.clientY-Ar.clientY+o.y)/(c||1)+(s?s[1]-Pc[1]:0)/(c||1);if(!we.active&&!ha){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<a)return;this._onDragStart(n,!0)}if(Ee){l?(l.e+=u-(Ic||0),l.f+=f-(Oc||0)):l={a:1,b:0,c:0,d:1,e:u,f};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");ve(Ee,"webkitTransform",p),ve(Ee,"mozTransform",p),ve(Ee,"msTransform",p),ve(Ee,"transform",p),Ic=u,Oc=f,Qt=i}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!Ee){var n=this.options.fallbackOnBody?document.body:We,r=tt(oe,!0,gl,!0,n),a=this.options;if(gl){for(ut=n;ve(ut,"position")==="static"&&ve(ut,"transform")==="none"&&ut!==document;)ut=ut.parentNode;ut!==document.body&&ut!==document.documentElement?(ut===document&&(ut=hn()),r.top+=ut.scrollTop,r.left+=ut.scrollLeft):ut=hn(),Pc=D1(ut)}Ee=oe.cloneNode(!0),Tt(Ee,a.ghostClass,!1),Tt(Ee,a.fallbackClass,!0),Tt(Ee,a.dragClass,!0),ve(Ee,"transition",""),ve(Ee,"transform",""),ve(Ee,"box-sizing","border-box"),ve(Ee,"margin",0),ve(Ee,"top",r.top),ve(Ee,"left",r.left),ve(Ee,"width",r.width),ve(Ee,"height",r.height),ve(Ee,"opacity","0.8"),ve(Ee,"position",gl?"absolute":"fixed"),ve(Ee,"zIndex","100000"),ve(Ee,"pointerEvents","none"),we.ghost=Ee,n.appendChild(Ee),ve(Ee,"transform-origin",A1/parseInt(Ee.style.width)*100+"% "+M1/parseInt(Ee.style.height)*100+"%")}},_onDragStart:function(n,r){var a=this,o=n.dataTransfer,i=a.options;if(Ct("dragStart",this,{evt:n}),we.eventCanceled){this._onDrop();return}Ct("setupClone",this),we.eventCanceled||(Qe=x1(oe),Qe.draggable=!1,Qe.style["will-change"]="",this._hideClone(),Tt(Qe,this.options.chosenClass,!1),we.clone=Qe),a.cloneId=bl(function(){Ct("clone",a),!we.eventCanceled&&(a.options.removeCloneOnHide||We.insertBefore(Qe,oe),a._hideClone(),vt({sortable:a,name:"clone"}))}),!r&&Tt(oe,i.dragClass,!0),r?(dl=!0,a._loopId=setInterval(a._emulateDragOver,50)):(Me(document,"mouseup",a._onDrop),Me(document,"touchend",a._onDrop),Me(document,"touchcancel",a._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(a,o,oe)),Le(document,"drop",a),ve(oe,"transform","translateZ(0)")),ha=!0,a._dragStartId=bl(a._dragStarted.bind(a,r,n)),Le(document,"selectstart",a),ro=!0,Ja&&ve(document.body,"user-select","none")},_onDragOver:function(n){var r=this.el,a=n.target,o,i,l,d=this.options,c=d.group,s=we.active,u=cl===c,f=d.sort,p=at||s,m,y=this,b=!1;if(Vc)return;function g(F,K){Ct(F,y,pn({evt:n,isOwner:u,axis:m?"vertical":"horizontal",revert:l,dragRect:o,targetRect:i,canSort:f,fromSortable:p,target:a,completed:v,onMove:function(te,Z){return yl(We,r,oe,o,te,tt(te),n,Z)},changed:w},K))}function h(){g("dragOverAnimationCapture"),y.captureAnimationState(),y!==p&&p.captureAnimationState()}function v(F){return g("dragOverCompleted",{insertion:F}),F&&(u?s._hideClone():s._showClone(y),y!==p&&(Tt(oe,at?at.options.ghostClass:s.options.ghostClass,!1),Tt(oe,d.ghostClass,!0)),at!==y&&y!==we.active?at=y:y===we.active&&at&&(at=null),p===y&&(y._ignoreWhileAnimating=a),y.animateAll(function(){g("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===oe&&!oe.animated||a===r&&!a.animated)&&(ga=null),!d.dragoverBubble&&!n.rootEl&&a!==document&&(oe.parentNode[Nt]._isOutsideThisEl(n.target),!F&&Mr(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),b=!0}function w(){xt=zt(oe),nr=zt(oe,d.draggable),vt({sortable:y,name:"change",toEl:r,newIndex:xt,newDraggableIndex:nr,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),a=mn(a,d.draggable,r,!0),g("dragOver"),we.eventCanceled)return b;if(oe.contains(n.target)||a.animated&&a.animatingX&&a.animatingY||y._ignoreWhileAnimating===a)return v(!1);if(dl=!1,s&&!d.disabled&&(u?f||(l=Ge!==We):at===this||(this.lastPutMode=cl.checkPull(this,s,oe,n))&&c.checkPut(this,s,oe,n))){if(m=this._getDirection(n,a)==="vertical",o=tt(oe),g("dragOverValid"),we.eventCanceled)return b;if(l)return Ge=We,h(),this._hideClone(),g("revert"),we.eventCanceled||(xr?We.insertBefore(oe,xr):We.appendChild(oe)),v(!0);var C=xc(r,d.draggable);if(!C||BR(n,m,this)&&!C.animated){if(C===oe)return v(!1);if(C&&r===n.target&&(a=C),a&&(i=tt(a)),yl(We,r,oe,o,a,i,n,!!a)!==!1)return h(),r.appendChild(oe),Ge=r,w(),v(!0)}else if(C&&ER(n,m,this)){var S=fa(r,0,d,!0);if(S===oe)return v(!1);if(a=S,i=tt(a),yl(We,r,oe,o,a,i,n,!1)!==!1)return h(),r.insertBefore(oe,S),Ge=r,w(),v(!0)}else if(a.parentNode===r){i=tt(a);var D=0,$,M=oe.parentNode!==r,V=!wR(oe.animated&&oe.toRect||o,a.animated&&a.toRect||i,m),T=m?"top":"left",I=B1(a,"top","top")||B1(oe,"top","top"),N=I?I.scrollTop:void 0;ga!==a&&($=i[T],oo=!1,fl=!V&&d.invertSwap||M),D=DR(n,a,i,m,V?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,fl,ga===a);var k;if(D!==0){var x=zt(oe);do x-=D,k=Ge.children[x];while(k&&(ve(k,"display")==="none"||k===Ee))}if(D===0||k===a)return v(!1);ga=a,ao=D;var A=a.nextElementSibling,P=!1;P=D===1;var _=yl(We,r,oe,o,a,i,n,P);if(_!==!1)return(_===1||_===-1)&&(P=_===1),Vc=!0,setTimeout($R,30),h(),P&&!A?r.appendChild(oe):a.parentNode.insertBefore(oe,P?A:a),I&&N1(I,0,N-I.scrollTop),Ge=oe.parentNode,$!==void 0&&!fl&&(pl=Math.abs($-tt(a)[T])),w(),v(!0)}if(r.contains(oe))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Me(document,"mousemove",this._onTouchMove),Me(document,"touchmove",this._onTouchMove),Me(document,"pointermove",this._onTouchMove),Me(document,"dragover",Mr),Me(document,"mousemove",Mr),Me(document,"touchmove",Mr)},_offUpEvents:function(){var n=this.el.ownerDocument;Me(n,"mouseup",this._onDrop),Me(n,"touchend",this._onDrop),Me(n,"pointerup",this._onDrop),Me(n,"touchcancel",this._onDrop),Me(document,"selectstart",this)},_onDrop:function(n){var r=this.el,a=this.options;if(xt=zt(oe),nr=zt(oe,a.draggable),Ct("drop",this,{evt:n}),Ge=oe&&oe.parentNode,xt=zt(oe),nr=zt(oe,a.draggable),we.eventCanceled){this._nulling();return}ha=!1,fl=!1,oo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Rc(this.cloneId),Rc(this._dragStartId),this.nativeDraggable&&(Me(document,"drop",this),Me(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ja&&ve(document.body,"user-select",""),ve(oe,"transform",""),n&&(ro&&(n.cancelable&&n.preventDefault(),!a.dropBubble&&n.stopPropagation()),Ee&&Ee.parentNode&&Ee.parentNode.removeChild(Ee),(We===Ge||at&&at.lastPutMode!=="clone")&&Qe&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),oe&&(this.nativeDraggable&&Me(oe,"dragend",this),Lc(oe),oe.style["will-change"]="",ro&&!ha&&Tt(oe,at?at.options.ghostClass:this.options.ghostClass,!1),Tt(oe,this.options.chosenClass,!1),vt({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:n}),We!==Ge?(xt>=0&&(vt({rootEl:Ge,name:"add",toEl:Ge,fromEl:We,originalEvent:n}),vt({sortable:this,name:"remove",toEl:Ge,originalEvent:n}),vt({rootEl:Ge,name:"sort",toEl:Ge,fromEl:We,originalEvent:n}),vt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),at&&at.save()):xt!==ma&&xt>=0&&(vt({sortable:this,name:"update",toEl:Ge,originalEvent:n}),vt({sortable:this,name:"sort",toEl:Ge,originalEvent:n})),we.active&&((xt==null||xt===-1)&&(xt=ma,nr=no),vt({sortable:this,name:"end",toEl:Ge,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){Ct("nulling",this),We=oe=Ge=Ee=xr=Qe=sl=tr=Ar=Qt=ro=xt=nr=ma=no=ga=ao=at=cl=we.dragged=we.ghost=we.clone=we.active=null,ml.forEach(function(n){n.checked=!0}),ml.length=Ic=Oc=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":oe&&(this._onDragOver(n),SR(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],r,a=this.el.children,o=0,i=a.length,l=this.options;o<i;o++)r=a[o],mn(r,l.draggable,this.el,!1)&&n.push(r.getAttribute(l.dataIdAttr)||NR(r));return n},sort:function(n,r){var a={},o=this.el;this.toArray().forEach(function(i,l){var d=o.children[l];mn(d,this.options.draggable,o,!1)&&(a[i]=d)},this),r&&this.captureAnimationState(),n.forEach(function(i){a[i]&&(o.removeChild(a[i]),o.appendChild(a[i]))}),r&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,r){return mn(n,r||this.options.draggable,this.el,!1)},option:function(n,r){var a=this.options;if(r===void 0)return a[n];var o=to.modifyOption(this,n,r);typeof o<"u"?a[n]=o:a[n]=r,n==="group"&&V1(a)},destroy:function(){Ct("destroy",this);var n=this.el;n[Nt]=null,Me(n,"mousedown",this._onTapStart),Me(n,"touchstart",this._onTapStart),Me(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Me(n,"dragover",this),Me(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ul.splice(ul.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!tr){if(Ct("hideClone",this),we.eventCanceled)return;ve(Qe,"display","none"),this.options.removeCloneOnHide&&Qe.parentNode&&Qe.parentNode.removeChild(Qe),tr=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(tr){if(Ct("showClone",this),we.eventCanceled)return;oe.parentNode==We&&!this.options.group.revertClone?We.insertBefore(Qe,oe):xr?We.insertBefore(Qe,xr):We.appendChild(Qe),this.options.group.revertClone&&this.animate(oe,Qe),ve(Qe,"display",""),tr=!1}}};function SR(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function yl(e,n,r,a,o,i,l,d){var c,s=e[Nt],u=s.options.onMove,f;return window.CustomEvent&&!Mn&&!Xa?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=e,c.dragged=r,c.draggedRect=a,c.related=o||n,c.relatedRect=i||tt(n),c.willInsertAfter=d,c.originalEvent=l,e.dispatchEvent(c),u&&(f=u.call(s,c,l)),f}function Lc(e){e.draggable=!1}function $R(){Vc=!1}function ER(e,n,r){var a=tt(fa(r.el,0,r.options,!0)),o=10;return n?e.clientX<a.left-o||e.clientY<a.top&&e.clientX<a.right:e.clientY<a.top-o||e.clientY<a.bottom&&e.clientX<a.left}function BR(e,n,r){var a=tt(xc(r.el,r.options.draggable)),o=10;return n?e.clientX>a.right+o||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+o}function DR(e,n,r,a,o,i,l,d){var c=a?e.clientY:e.clientX,s=a?r.height:r.width,u=a?r.top:r.left,f=a?r.bottom:r.right,p=!1;if(!l){if(d&&pl<s*o){if(!oo&&(ao===1?c>u+s*i/2:c<f-s*i/2)&&(oo=!0),oo)p=!0;else if(ao===1?c<u+pl:c>f-pl)return-ao}else if(c>u+s*(1-o)/2&&c<f-s*(1-o)/2)return TR(n)}return p=p||l,p&&(c<u+s*i/2||c>f-s*i/2)?c>u+s/2?1:-1:0}function TR(e){return zt(oe)<zt(e)?1:-1}function NR(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,r=n.length,a=0;r--;)a+=n.charCodeAt(r);return a.toString(36)}function xR(e){ml.length=0;for(var n=e.getElementsByTagName("input"),r=n.length;r--;){var a=n[r];a.checked&&ml.push(a)}}function bl(e){return setTimeout(e,0)}function Rc(e){return clearTimeout(e)}hl&&Le(document,"touchmove",function(e){(we.active||ha)&&e.cancelable&&e.preventDefault()}),we.utils={on:Le,off:Me,css:ve,find:E1,is:function(n,r){return!!mn(n,r,n,!1)},extend:fR,throttle:T1,closest:mn,toggleClass:Tt,clone:x1,index:zt,nextTick:bl,cancelNextTick:Rc,detectDirection:P1,getChild:fa},we.get=function(e){return e[Nt]},we.mount=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n[0].constructor===Array&&(n=n[0]),n.forEach(function(a){if(!a.prototype||!a.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));a.utils&&(we.utils=pn(pn({},we.utils),a.utils)),to.mount(a)})},we.create=function(e,n){return new we(e,n)},we.version=sR;var et=[],io,zc,Fc=!1,Yc,Hc,vl,lo;function AR(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(r){var a=r.originalEvent;this.sortable.nativeDraggable?Le(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Le(document,"pointermove",this._handleFallbackAutoScroll):a.touches?Le(document,"touchmove",this._handleFallbackAutoScroll):Le(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var a=r.originalEvent;!this.options.dragOverBubble&&!a.rootEl&&this._handleAutoScroll(a)},drop:function(){this.sortable.nativeDraggable?Me(document,"dragover",this._handleAutoScroll):(Me(document,"pointermove",this._handleFallbackAutoScroll),Me(document,"touchmove",this._handleFallbackAutoScroll),Me(document,"mousemove",this._handleFallbackAutoScroll)),z1(),wl(),pR()},nulling:function(){vl=zc=io=Fc=lo=Yc=Hc=null,et.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,a){var o=this,i=(r.touches?r.touches[0]:r).clientX,l=(r.touches?r.touches[0]:r).clientY,d=document.elementFromPoint(i,l);if(vl=r,a||this.options.forceAutoScrollFallback||Xa||Mn||Ja){qc(r,this.options,d,a);var c=er(d,!0);Fc&&(!lo||i!==Yc||l!==Hc)&&(lo&&z1(),lo=setInterval(function(){var s=er(document.elementFromPoint(i,l),!0);s!==c&&(c=s,wl()),qc(r,o.options,s,a)},10),Yc=i,Hc=l)}else{if(!this.options.bubbleScroll||er(d,!0)===hn()){wl();return}qc(r,this.options,er(d,!1),!1)}}},xn(e,{pluginName:"scroll",initializeByDefault:!0})}function wl(){et.forEach(function(e){clearInterval(e.pid)}),et=[]}function z1(){clearInterval(lo)}var qc=T1(function(e,n,r,a){if(n.scroll){var o=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,d=n.scrollSpeed,c=hn(),s=!1,u;zc!==r&&(zc=r,wl(),io=n.scroll,u=n.scrollFn,io===!0&&(io=er(r,!0)));var f=0,p=io;do{var m=p,y=tt(m),b=y.top,g=y.bottom,h=y.left,v=y.right,w=y.width,C=y.height,S=void 0,D=void 0,$=m.scrollWidth,M=m.scrollHeight,V=ve(m),T=m.scrollLeft,I=m.scrollTop;m===c?(S=w<$&&(V.overflowX==="auto"||V.overflowX==="scroll"||V.overflowX==="visible"),D=C<M&&(V.overflowY==="auto"||V.overflowY==="scroll"||V.overflowY==="visible")):(S=w<$&&(V.overflowX==="auto"||V.overflowX==="scroll"),D=C<M&&(V.overflowY==="auto"||V.overflowY==="scroll"));var N=S&&(Math.abs(v-o)<=l&&T+w<$)-(Math.abs(h-o)<=l&&!!T),k=D&&(Math.abs(g-i)<=l&&I+C<M)-(Math.abs(b-i)<=l&&!!I);if(!et[f])for(var x=0;x<=f;x++)et[x]||(et[x]={});(et[f].vx!=N||et[f].vy!=k||et[f].el!==m)&&(et[f].el=m,et[f].vx=N,et[f].vy=k,clearInterval(et[f].pid),(N!=0||k!=0)&&(s=!0,et[f].pid=setInterval((function(){a&&this.layer===0&&we.active._onTouchMove(vl);var A=et[this.layer].vy?et[this.layer].vy*d:0,P=et[this.layer].vx?et[this.layer].vx*d:0;typeof u=="function"&&u.call(we.dragged.parentNode[Nt],P,A,e,vl,et[this.layer].el)!=="continue"||N1(et[this.layer].el,P,A)}).bind({layer:f}),24))),f++}while(n.bubbleScroll&&p!==c&&(p=er(p,!1)));Fc=s}},30),F1=function(n){var r=n.originalEvent,a=n.putSortable,o=n.dragEl,i=n.activeSortable,l=n.dispatchSortableEvent,d=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(r){var s=a||i;d();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,f=document.elementFromPoint(u.clientX,u.clientY);c(),s&&!s.el.contains(f)&&(l("spill"),this.onSpill({dragEl:o,putSortable:a}))}};function _c(){}_c.prototype={startIndex:null,dragStart:function(n){var r=n.oldDraggableIndex;this.startIndex=r},onSpill:function(n){var r=n.dragEl,a=n.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var o=fa(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(r,o):this.sortable.el.appendChild(r),this.sortable.animateAll(),a&&a.animateAll()},drop:F1},xn(_c,{pluginName:"revertOnSpill"});function Kc(){}Kc.prototype={onSpill:function(n){var r=n.dragEl,a=n.putSortable,o=a||this.sortable;o.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),o.animateAll()},drop:F1},xn(Kc,{pluginName:"removeOnSpill"}),we.mount(new AR),we.mount(Kc,_c);function MR(){return typeof window<"u"?window.console:global.console}const IR=MR();function OR(e){const n=Object.create(null);return function(a){return n[a]||(n[a]=e(a))}}const PR=/-(\w)/g,Y1=OR(e=>e.replace(PR,(n,r)=>r?r.toUpperCase():""));function Wc(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function H1(e,n,r){const a=r===0?e.children[0]:e.children[r-1].nextSibling;e.insertBefore(n,a)}function VR(e,n){return Object.values(e).indexOf(n)}function LR(e,n,r,a){if(!e)return[];const o=Object.values(e),i=n.length-a;return[...n].map((d,c)=>c>=i?o.length:o.indexOf(d))}function q1(e,n){this.$nextTick(()=>this.$emit(e.toLowerCase(),n))}function RR(e){return n=>{this.realList!==null&&this["onDrag"+e](n),q1.call(this,e,n)}}function zR(e){return["transition-group","TransitionGroup"].includes(e)}function FR(e){if(!e||e.length!==1)return!1;const[{type:n}]=e;return n?zR(n.name):!1}function YR(e,n){return n?{...n.props,...n.attrs}:e}const Uc=["Start","Add","Remove","Update","End"],jc=["Choose","Unchoose","Sort","Filter","Clone"],HR=["Move",...Uc,...jc].map(e=>"on"+e);let Gc=null;const qR={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},_R=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Uc.map(e=>e.toLowerCase()),...jc.map(e=>e.toLowerCase())],props:qR,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const e=this.$slots.default?this.$slots.default():null,n=YR(this.$attrs,this.componentData);return e?(this.transitionMode=FR(e),t.h(this.getTag(),n,e)):t.h(this.getTag(),n,[])},created(){this.list!==null&&this.modelValue!==null&&IR.error("list props are mutually exclusive! Please set one.")},mounted(){const e={};Uc.forEach(o=>{e["on"+o]=RR.call(this,o)}),jc.forEach(o=>{e["on"+o]=q1.bind(this,o)});const n=Object.keys(this.$attrs).reduce((o,i)=>(o[Y1(i)]=this.$attrs[i],o),{}),r=Object.assign({},n,e,{onMove:(o,i)=>this.onDragMove(o,i)});!("draggable"in r)&&(r.draggable=">*");const a=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new we(a,r),a.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(e){for(var n in e){const r=Y1(n);HR.indexOf(r)===-1&&this._sortable.option(r,e[n])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=LR(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const n=VR(this.getChildrenNodes()||[],e);if(n===-1)return null;const r=this.realList[n];return{index:n,element:r}},emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const r=a=>a.splice(n,0,a.splice(e,1)[0]);this.alterList(r)},getVmIndex(e){const n=this.visibleIndexes,r=n.length;return e>r-1?r:n[e]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;var n=this.getChildrenNodes();n[e].data=null;const r=this.getComponent();r.children=[],r.kept=void 0},onDragStart(e){this.computeIndexes(),this.context=this.getUnderlyingVm(e.item),this.context&&(e.item._underlying_vm_=this.clone(this.context.element),Gc=e.item)},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;Wc(e.item);const r=this.getVmIndex(e.newIndex);this.spliceList(r,0,n),this.computeIndexes();const a={element:n,newIndex:r};this.emitChanges({added:a})},onDragRemove(e){if(H1(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){Wc(e.clone);return}if(!this.context)return;const n=this.context.index;this.spliceList(n,1);const r={element:this.context.element,oldIndex:n};this.resetTransitionData(n),this.emitChanges({removed:r})},onDragUpdate(e){Wc(e.item),H1(e.from,e.item,e.oldIndex);const n=this.context.index,r=this.getVmIndex(e.newIndex);this.updatePosition(n,r);const a={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:a})},updateProperty(e,n){e.hasOwnProperty(n)&&(e[n]+=this.headerOffset)},onDragMove(e,n){const r=this.move;if(!r||!this.realList)return!0;const a=this.getRelatedContextFromMoveEvent(e),o=this.context,i=this.computeFutureIndex(a,e);Object.assign(o,{futureIndex:i});const l=Object.assign({},e,{relatedContext:a,draggedContext:o});return r(l,n)},onDragEnd(){this.computeIndexes(),Gc=null},getTrargetedComponent(e){return e.__draggable_component__},getRelatedContextFromMoveEvent({to:e,related:n}){const r=this.getTrargetedComponent(e);if(!r)return{component:r};const a=r.realList,o={list:a,component:r};if(e!==n&&a&&r.getUnderlyingVm){const i=r.getUnderlyingVm(n);if(i)return Object.assign(i,o)}return o},computeFutureIndex(e,n){const r=[...n.to.children].filter(l=>l.style.display!=="none");if(r.length===0)return 0;const a=r.indexOf(n.related),o=e.component.getVmIndex(a);return r.indexOf(Gc)!==-1||!n.willInsertAfter?o:o+1}}}),KR=["data-testid"],WR=["aria-controls","aria-expanded","aria-label"],UR=["data-testid"],jR={key:0,class:"tree-item-icon","data-testid":"tree-item-icon"},GR={class:"tree-item-label","data-testid":"tree-item-label"},QR=pe(t.defineComponent({__name:"KTreeItem",props:{item:{},disabled:{type:Boolean},hideIcons:{type:Boolean},collapsible:{type:Boolean},initialCollapse:{type:Boolean},hasChildren:{type:Boolean},controlsId:{}},emits:["selected","expanded"],setup(e,{expose:n,emit:r}){const a=r,o=t.useSlots(),i=t.computed(()=>!e.hideIcons||!!o["item-icon"]),l=u=>{u.target&&u.target.closest("a:not(.disabled), button:not([data-tree-item-trigger]), label, input, select")!==null||a("selected",e.item)},d=t.ref(!0),c=u=>{d.value=u};t.watch(()=>e.initialCollapse,(u,f)=>{u!==f&&(d.value=!u)},{immediate:!0});const s=()=>{d.value=!d.value,a("expanded",d.value)};return n({setExpandedValue:c,id:e.item.id}),(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:"tree-item-wrapper","data-testid":`tree-item-wrapper-${u.item.id}`},[u.collapsible&&u.hasChildren?(t.openBlock(),t.createElementBlock("span",{key:0,"aria-controls":`tree-list-draggable-${u.controlsId}`,"aria-expanded":d.value,"aria-label":d.value?"Collapse":"Expand",class:t.normalizeClass(["tree-item-expanded-button",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-button",role:"button",onClick:t.withModifiers(s,["stop"]),onKeyup:t.withKeys(s,["enter"])},[t.createVNode(t.unref(Bl),{class:t.normalizeClass(["tree-item-expanded-icon",{collapsed:!d.value,expanded:d.value}]),"data-testid":"tree-item-expanded-icon",decorative:"",size:t.unref(ft),tabindex:"0"},null,8,["class","size"])],42,WR)):t.createCommentVNode("",!0),t.createElementVNode("button",{class:t.normalizeClass(["tree-item",{"not-draggable":u.disabled,selected:u.item.selected,expanded:u.collapsible&&d.value,collapsed:u.collapsible&&!d.value,"no-children":u.collapsible&&!u.hasChildren}]),"data-testid":`tree-item-${u.item.id}`,"data-tree-item-trigger":"true",draggable:"false",type:"button",onClick:t.withModifiers(l,["prevent"])},[i.value?(t.openBlock(),t.createElementBlock("div",jR,[t.renderSlot(u.$slots,"item-icon",{},()=>[t.createVNode(t.unref(Gy),{decorative:""})],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",GR,[t.renderSlot(u.$slots,"item-label",{},()=>[t.createTextVNode(t.toDisplayString(u.item.name),1)],!0)])],10,UR)],8,KR))}}),[["__scopeId","data-v-18967eab"]]),Qc=({children:e=[]})=>e.length===0?0:1+Math.max(...e.map(Qc)),ZR=pe(t.defineComponent({__name:"KTreeDraggable",props:{items:{},disableDrag:{type:Boolean},filter:{type:[String,Function]},maxDepth:{},level:{default:0},parentId:{},hideIcons:{type:Boolean},group:{},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=r,o=t.ref(0),i=t.ref([]),l={tag:"div","force-fallback":!0,animation:"100",draggable:".tree-item-container","item-key":"id","ghost-class":"tree-item-dragged","drag-class":"tree-item-grabbing",class:"child-drop-zone","fallback-tolerance":10},d=t.ref(!1),c=t.computed(()=>[".tree-item-expanded-button",...(typeof e.filter=="function"?e.filter():e.filter).split(",").map(I=>I.trim()).filter(Boolean)].join(", ")),s=T=>{var I,N;return!((N=(I=i.value.filter(k=>k.id===T.id))==null?void 0:I[0].children)!=null&&N.length)},u=T=>T.children||[],f=T=>{e.parentId?a("child-change",{parentId:e.parentId,children:i.value,target:(T==null?void 0:T.added)||(T==null?void 0:T.removed)||(T==null?void 0:T.moved)}):a("change",{items:i.value,target:(T==null?void 0:T.added)||(T==null?void 0:T.removed)||(T==null?void 0:T.moved)})},p=T=>{a("child-change",T)},m=T=>{a("selected",T)},y=t.ref(new Map),b=(T,I)=>{y.value.set(I,T)},g=T=>e.collapsible?!!y.value.get(T):!0,h=t.useTemplateRef("tree-items"),v=()=>{var T;i.value.forEach(I=>{y.value.set(I.id,!1)}),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(!1)})},w=()=>{var T;i.value.forEach(I=>{y.value.set(I.id,!0)}),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(!0)})},C=t.computed(()=>e.level>e.maxDepth-1),S=T=>{var A,P,_,F;const I=((P=(A=T.relatedContext)==null?void 0:A.component)==null?void 0:P.$attrs.level)||0,N=(_=T.draggedContext)==null?void 0:_.element;let k=0;return(F=N.children)!=null&&F.length&&(k=Qc(N)),!(I+k>e.maxDepth-1)},D=T=>{var k,x;const I=((x=(k=T.item)==null?void 0:k._underlying_vm_)==null?void 0:x.id)||"",N=i.value.find(A=>A.id===I);d.value=!0,N&&a("selected",N),M(!0)},$=async()=>{var T;d.value=!1,M(!1),o.value++,await t.nextTick(),(T=h.value)==null||T.forEach(I=>{I==null||I.setExpandedValue(y.value.get(I==null?void 0:I.id))})},M=T=>{const I=document==null?void 0:document.getElementsByTagName("html").item(0);I&&I.classList.toggle("tree-list-grabbing",T)};t.watch(()=>e.items,(T,I)=>{JSON.stringify(T)!==JSON.stringify(I)&&(i.value=T,i.value.forEach(N=>{N.children||(N.children=[])}))});const V=()=>{i.value.forEach(T=>{y.value.set(T.id,!e.initialCollapseAll)})};return t.onMounted(async()=>{i.value=e.items,i.value.forEach(T=>{T.children||(T.children=[])}),await t.nextTick(),e.collapsible&&V()}),n({collapseAll:v,expandAll:w}),(T,I)=>{const N=t.resolveComponent("KTreeDraggable",!0);return t.openBlock(),t.createBlock(t.unref(_R),t.mergeProps(l,{class:"tree-draggable",direction:"vertical",disabled:T.disableDrag,filter:c.value,group:{name:T.group,pull:[T.group],put:C.value?[]:[T.group]},level:T.level,list:i.value,move:S,tag:"div",onChange:f,onEnd:$,onStart:D}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,k=>(t.openBlock(),t.createElementBlock("div",{key:k.id,class:t.normalizeClass(["tree-item-container",{"has-no-children":s(k)}])},[(t.openBlock(),t.createBlock(QR,{key:`tree-item-${k.id}-${o.value}`,ref_for:!0,ref:"tree-items",collapsible:T.collapsible,"controls-id":k.id,disabled:T.disableDrag,"has-children":!s(k),"hide-icons":T.hideIcons,"initial-collapse":T.initialCollapseAll,item:k,onExpanded:x=>b(x,k.id),onSelected:m},t.createSlots({"item-label":t.withCtx(()=>[t.renderSlot(T.$slots,"item-label",{item:k},()=>[t.createTextVNode(t.toDisplayString(k.name),1)],!0)]),_:2},[T.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(()=>[t.renderSlot(T.$slots,"item-icon",{item:k},void 0,!0)]),key:"0"}:void 0]),1032,["collapsible","controls-id","disabled","has-children","hide-icons","initial-collapse","item","onExpanded"])),t.withDirectives((t.openBlock(),t.createBlock(N,{id:`tree-list-draggable-${k.id}`,key:`tree-item-${k.id}-children-${o.value}`,class:t.normalizeClass({collapsible:T.collapsible}),collapsible:T.collapsible,"disable-drag":T.disableDrag,filter:c.value,group:T.group,"hide-icons":T.hideIcons,"initial-collapse-all":T.initialCollapseAll,items:u(k),level:T.level+1,"max-depth":T.maxDepth,"parent-id":k.id,onChildChange:p,onSelected:m},t.createSlots({"item-label":t.withCtx(({item:x})=>[t.renderSlot(T.$slots,"item-label",{item:x},void 0,!0)]),_:2},[T.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:x})=>[t.renderSlot(T.$slots,"item-icon",{item:x},void 0,!0)]),key:"0"}:void 0]),1032,["id","class","collapsible","disable-drag","filter","group","hide-icons","initial-collapse-all","items","level","max-depth","parent-id"])),[[t.vShow,g(k.id)]])],2))),128))]),_:3},16,["disabled","filter","group","level","list"])}}}),[["__scopeId","data-v-a7e11d91"]]),_1=t.defineComponent({__name:"KTreeList",props:{modelValue:{default:null},items:{default:null},disableDrag:{type:Boolean},ignoreDragSelectors:{type:[String,Function],default:""},maxDepth:{default:3},width:{default:""},hideIcons:{type:Boolean},group:{default:"k-tree-list"},collapsible:{type:Boolean},initialCollapseAll:{type:Boolean}},emits:["change","child-change","selected"],setup(e,{expose:n,emit:r}){const a=(g,h)=>(g.forEach(v=>{var w;h.push(v.id),(w=v.children)!=null&&w.length&&a(v.children,h)}),h),o=g=>{const h=a(g,[]),v=new Set(h);return h.length===v.size},i=(g,h)=>{let v=!0;return g.forEach(w=>{v=v&&(!w.children||Qc(w)<=h)}),v};t.watch(()=>e.modelValue,g=>{g&&!o(g)&&Un("modelValue","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.items,g=>{g&&!o(g)&&Un("items","Item `id` must be unique.")},{immediate:!0}),t.watch(()=>e.maxDepth,g=>{g>5&&Un("maxDepth","Maximum depth must be less than or equal to 5.")},{immediate:!0}),t.watch([()=>e.modelValue,()=>e.items],([g,h])=>{g&&h&&Un("modelValue / items","You should not provide both v-model (or props.modelValue) and props.items")},{immediate:!0});const l=t.ref([]);t.watch([l,()=>e.maxDepth],([g,h])=>{i(g,h)||Un(e.modelValue?"modelValue":"items","Provided list depth exceeds `maxDepth`")},{immediate:!0,deep:!0});const d=r,c=t.computed({get(){return e.modelValue},set(g){l.value=g}}),s=t.computed(()=>({maxWidth:Je(e.width)})),u=(g,h)=>{(h||l.value).forEach(w=>{var C;w.id===g.id?(w.selected=!0,d("selected",g)):w.selected=!1,(C=w.children)!=null&&C.length&&u(g,w.children)})},f=g=>{d("change",g)},p=g=>{d("child-change",g)};t.watch(c,(g,h)=>{JSON.stringify(g)!==JSON.stringify(h)&&(l.value=g||[],l.value.forEach(v=>{v.children||(v.children=[])}))}),t.watch(()=>e.items,(g,h)=>{JSON.stringify(g)!==JSON.stringify(h)&&(l.value=g||[],l.value.forEach(v=>{v.children||(v.children=[])}))});const m=t.useTemplateRef("tree-draggable");return n({collapseAll:()=>{var g;(g=m.value)==null||g.collapseAll()},expandAll:()=>{var g;(g=m.value)==null||g.expandAll()}}),t.onMounted(()=>{e.modelValue?l.value=e.modelValue:e.items&&(l.value=e.items),l.value.forEach(g=>{g.children||(g.children=[])})}),(g,h)=>(t.openBlock(),t.createElementBlock("div",{class:"k-tree-list","data-testid":"k-tree-list",style:t.normalizeStyle(g.width?s.value:void 0)},[t.createVNode(ZR,{ref:"tree-draggable",collapsible:g.collapsible,"data-testid":`k-tree-list-${g.group}`,"disable-drag":g.disableDrag,filter:g.ignoreDragSelectors,group:g.group,"hide-icons":g.hideIcons,"initial-collapse-all":g.initialCollapseAll,items:l.value,"max-depth":g.maxDepth,onChange:f,onChildChange:p,onSelected:u},t.createSlots({"item-label":t.withCtx(({item:v})=>[t.renderSlot(g.$slots,"item-label",{item:v})]),_:2},[g.$slots["item-icon"]?{name:"item-icon",fn:t.withCtx(({item:v})=>[t.renderSlot(g.$slots,"item-icon",{item:v})]),key:"0"}:void 0]),1032,["collapsible","data-testid","disable-drag","filter","group","hide-icons","initial-collapse-all","items","max-depth"])],4))}}),XR=["href"],K1=pe(t.defineComponent({__name:"KExternalLink",props:{href:{},hideIcon:{type:Boolean}},setup(e){t.watch(()=>e.href,r=>{r1(r)||Un("href",`\`href\` should be a valid URL, but got "${r}".`)},{immediate:!0});const n=t.computed(()=>!!r1(e.href));return(r,a)=>n.value?(t.openBlock(),t.createElementBlock("a",{key:0,class:"k-external-link",href:r.href,rel:"noopener",target:"_blank"},[t.renderSlot(r.$slots,"default",{},void 0,!0),r.hideIcon?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(Py),{key:0,decorative:"",size:t.unref(qt)},null,8,["size"]))],8,XR)):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-ec2a67ce"]]),JR={key:0,class:"truncate-expand-controls"},ez={key:0,"data-testid":"expand-trigger-wrapper"},tz=["aria-label"],nz={key:0,"data-testid":"collapse-trigger-wrapper"},rz={key:0,"data-testid":"expand-trigger-wrapper"},az={key:1},W1=pe(t.defineComponent({__name:"KTruncate",props:{rows:{default:1},truncateText:{type:Boolean},expanded:{type:Boolean},width:{default:"100%"}},setup(e){t.useCssVars(b=>({"7164fd89":d.value,"5e3d5385":t.unref(c),"6972530a":b.rows})),t.watch(()=>e.rows,b=>{b<0&&Un("rows",`\`rows\` prop cannot be less than 0, but got "${b}".`)},{immediate:!0});const n=t.ref(e.expanded),r=t.ref(!1),a=t.ref(),o=t.ref(),i=t.ref(),l=t.ref(),d=t.ref("0px"),c=pb,s=t.ref(0),u=async()=>{var b;if(!e.truncateText&&o.value&&(b=o.value.children)!=null&&b.length){const g=o.value.children,h=Number(String(c).replace(/px$/gi,""));let v=0;for(let C=0;C<g.length;C++)v=g[C].offsetHeight>v?g[C].offsetHeight:v;const w=(e.rows===1?0:(e.rows-1)*h)+v*e.rows+6;d.value=o.value.offsetHeight>w?`${w}px`:"auto",await t.nextTick(),f()}},f=()=>{if(o.value&&i.value){const b=e.truncateText?o.value.scrollHeight:o.value.offsetHeight,g=l.value?l.value.offsetHeight:0;r.value=b>i.value.offsetHeight-g,p()}},p=()=>{if(!e.truncateText&&(s.value=0,o.value&&i.value)){const b=o.value.children;for(let g=0;g<b.length;g++)b[g].offsetTop>i.value.offsetHeight?(s.value+=1,b[g].getAttribute("tabindex")&&(b[g].tabIndex=-1)):b[g].getAttribute("tabindex")&&(b[g].tabIndex=0)}},m=async()=>{n.value=!n.value,await t.nextTick(),f()},y=t.computed(()=>({width:Je(e.width)}));return t.onMounted(()=>{a.value=cr.create(u),a.value.observe(o.value),f()}),t.onBeforeUnmount(()=>{var b;(b=a.value)==null||b.unobserve(o.value)}),(b,g)=>{const h=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",{ref_key:"kTruncateWrapper",ref:i,class:t.normalizeClass(["k-truncate",[n.value?"expanded":"",`truncate-${b.truncateText?"text":"content"}`]]),style:t.normalizeStyle(y.value)},[!b.truncateText&&r.value?(t.openBlock(),t.createElementBlock("div",JR,[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ez,[t.renderSlot(b.$slots,"expand-trigger",{expand:m,truncatedCount:s.value},()=>[t.createElementVNode("button",{"aria-label":`Show ${s.value} more items`,class:"expand-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},t.toDisplayString(s.value),9,tz)],!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"kTruncateContainer",ref:o,class:"truncate-container"},[t.renderSlot(b.$slots,"default",{},void 0,!0),!b.truncateText&&n.value?(t.openBlock(),t.createElementBlock("div",nz,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createElementVNode("button",{"aria-label":"Collapse content",class:"collapse-trigger",type:"button",onClick:t.withModifiers(m,["stop"])},[t.createVNode(t.unref(Dy),{decorative:"",size:t.unref(qt)},null,8,["size"])])],!0)])):t.createCommentVNode("",!0)],512),b.truncateText&&(r.value||n.value)?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"textToggleControls",ref:l,class:"truncate-collapse-controls"},[n.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",rz,[t.renderSlot(b.$slots,"expand-trigger",{expand:m},()=>[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>g[0]||(g[0]=[t.createTextVNode(" Show more ")])),_:1,__:[0]})],!0)])),n.value?(t.openBlock(),t.createElementBlock("div",az,[t.renderSlot(b.$slots,"collapse-trigger",{collapse:m},()=>[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:t.withModifiers(m,["stop"])},{default:t.withCtx(()=>g[1]||(g[1]=[t.createTextVNode(" Show less ")])),_:1,__:[1]})],!0)])):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-32767851"]]),oz={class:"k-copy"},iz={key:0,class:"copy-badge-text"},lz=["id","aria-label","onClick"],U1=pe(t.defineComponent({__name:"KCopy",props:{badgeLabel:{default:""},text:{},textTooltip:{default:""},copyTooltip:{default:""},format:{default:"default"},badge:{type:Boolean},monospace:{type:Boolean},truncate:{type:Boolean},successTooltip:{default:"Copied!"},truncationLimit:{default:8}},setup(e,{expose:n}){const r=t.useId(),a=t.ref(""),o=t.computed(()=>!e.badgeLabel||e.copyTooltip?e.copyTooltip||"Copy":`Copy ${e.badgeLabel.replace(/:$/,"")}`);t.watch(o,g=>{a.value=g},{immediate:!0});const i=t.computed(()=>`copy-tooltip-wrapper ${e.truncate&&y.value||e.badge?"truncate-content":""}`),l=t.computed(()=>e.format==="redacted"?"*****":e.format==="deleted"?`*${String(e.text||"").substring(0,5)}`:e.truncate&&e.truncationLimit&&m.value?m.value.replace(/^"(.*)"$/,"$1"):e.text),d=t.computed(()=>{if(e.textTooltip)return e.textTooltip;if(!(e.format==="redacted"||!y.value))return e.text}),c=g=>{a.value=g||e.successTooltip,setTimeout(()=>{a.value=o.value},1800)},s=async g=>{if(!await g(e.text)){c("Failed to copy");return}c()};n({copy:()=>{var g;document!=null&&document.getElementById(r)&&((g=document==null?void 0:document.getElementById(r))==null||g.click())}});const f=t.ref(),p=t.ref(),m=t.computed(()=>e.truncate&&typeof e.truncationLimit=="number"?`${String(e.text||"").substring(0,e.truncationLimit)+"..."}`:null),y=t.ref(!1),b=()=>{var g,h;e.truncate&&(e.truncationLimit!=="auto"&&m.value?y.value=!0:e.truncationLimit==="auto"&&f.value&&(y.value=((g=f.value)==null?void 0:g.offsetWidth)<((h=f.value)==null?void 0:h.scrollWidth)))};return t.onMounted(()=>{p.value=cr.create(b),p.value.observe(f.value)}),t.onBeforeUnmount(()=>{p.value&&p.value.unobserve(f.value)}),(g,h)=>(t.openBlock(),t.createElementBlock("div",oz,[g.badge&&g.badgeLabel?(t.openBlock(),t.createElementBlock("span",iz,t.toDisplayString(g.badgeLabel),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["copy-container",{"copy-element":g.truncate||g.badge,"badge-styles":g.badge}])},[g.format!=="hidden"?(t.openBlock(),t.createBlock(Bt,{key:0,class:t.normalizeClass([i.value]),"data-testid":"copy-tooltip-wrapper","max-width":"500px",placement:"bottom-start",text:d.value},{default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"copyTextElement",ref:f,class:t.normalizeClass(["copy-text",{monospace:g.monospace||!g.badge}])},t.toDisplayString(l.value),3)]),_:1},8,["class","text"])):t.createCommentVNode("",!0),t.createVNode(Bt,{class:"text-icon-wrapper","max-width":"500px",placement:"bottom-start",text:a.value},{default:t.withCtx(()=>[t.createVNode(kl,null,{default:t.withCtx(({copyToClipboard:v})=>[t.createElementVNode("button",{id:t.unref(r),"aria-label":a.value,class:"copy-to-clipboard-button","data-testid":"copy-to-clipboard",type:"button",onClick:t.withModifiers(w=>s(v),["stop"])},[t.createVNode(t.unref(wd),{class:"text-icon",decorative:"",size:t.unref(qt)},null,8,["size"])],8,lz)]),_:1})]),_:1},8,["text"])],2)]))}}),[["__scopeId","data-v-5cce612d"]]),sz={key:0,class:"bulk-actions-dropdown-trigger-count"},cz=pe(t.defineComponent({__name:"BulkActionsDropdown",props:{disabled:{type:Boolean},count:{default:""},buttonLabel:{default:""}},setup(e){return(n,r)=>(t.openBlock(),t.createBlock(qn,{class:"bulk-actions-dropdown","data-testid":"bulk-actions-dropdown",disabled:n.disabled,"kpop-attributes":{placement:"bottom-end"}},{items:t.withCtx(()=>[t.renderSlot(n.$slots,"items",{},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Bt,{placement:"bottom-end",text:"Selected Row Actions"},{default:t.withCtx(()=>[t.createVNode(Ve,{appearance:"secondary","aria-label":n.buttonLabel,class:"bulk-actions-dropdown-trigger","data-testid":"bulk-actions-dropdown-trigger",disabled:n.disabled,icon:"",size:"large"},{default:t.withCtx(()=>[t.createVNode(t.unref(xd),{class:"more-icon",decorative:""}),t.createVNode(t.Transition,{name:"kongponents-fade-transition"},{default:t.withCtx(()=>[n.count?(t.openBlock(),t.createElementBlock("span",sz,t.toDisplayString(n.count),1)):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["aria-label","disabled"])]),_:1})]),_:3},8,["disabled"]))}}),[["__scopeId","data-v-cf7c2833"]]),dz={key:0,class:"table-toolbar","data-testid":"table-toolbar"},uz={key:0,class:"toolbar-default-items-container"},fz={key:2,class:"table-error-state","data-testid":"table-error-state"},pz={key:3,class:"table-empty-state","data-testid":"table-empty-state"},mz={key:4,class:"table-container"},hz=["data-tableid"],gz=["aria-sort","data-key","data-testid","onClick","onMouseover"],yz=["onMousedown","onMouseover"],bz=["aria-describedby"],vz={key:1,class:"table-header-bulk-actions-container"},wz=["onMousedown","onMouseover"],kz=["role","tabindex"],Cz={key:1,class:"expandable-row-control-container"},Sz=["aria-controls","aria-expanded","onClick"],$z=["id"],Ez=["colspan"],Bz={class:"expandable-content-wrapper"},Zc=pe(t.defineComponent({__name:"KTableView",props:{data:{default:()=>[]},headers:{default:()=>[]},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ht.Default},emptyStateButtonAppearance:{default:"primary"},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{default:"body"},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["page-change","page-size-change","get-next-offset","get-previous-offset","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{emit:n}){var ie;t.useCssVars(B=>({"7853f3d5":t.unref(Fe).expandable,"7ab671f2":le.value,"2813a86c":S.value,"632a8f9e":_.value}));const r=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","tooltipTarget","data","headers"]),a=n,o=t.useSlots(),i=t.useId(),l=B=>typeof e.rowKey=="function"&&typeof e.rowKey(B)=="string"?e.rowKey(B):typeof e.rowKey=="string"&&e.rowKey in B&&typeof B[e.rowKey]=="string"?B[e.rowKey]:"",d=t.useTemplateRef("table-wrapper"),c=t.useTemplateRef("header-row"),s=t.ref([]),u=t.ref([]),f=t.ref(""),p=t.ref(""),m=t.ref(""),y=t.computed(()=>s.value.some(B=>B.key===Se.ACTIONS)),b=t.computed(()=>s.value.filter(B=>B.hidable).length>0),g=t.computed(()=>e.nested||!b.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),h=t.computed(()=>e.loading||!(e.data&&e.data.length)),v=t.computed(()=>s.value.filter(B=>B.hidable&&!He(B.key))),w=t.computed(()=>g.value?e.tablePreferences.columnVisibility||{}:{}),C=t.ref(g.value?e.tablePreferences.columnVisibility||{}:{}),S=t.ref("100%"),D=t.ref(!1),$=t.ref(!1),M=t.ref(!1),V=t.ref(!1),T=t.ref(e.tablePreferences.sortColumnKey||""),I=t.ref(e.tablePreferences.sortColumnOrder||"desc"),N=t.ref(!1),k=t.computed(()=>!e.hideToolbar&&!e.nested&&(!!o.toolbar||g.value||te.value)),x=t.useTemplateRef("actionsDropdown"),A=t.ref(!1),P=t.computed(()=>({maxHeight:Je(e.maxHeight)})),_=t.computed(()=>`${Of()}px`),F=t.ref([]),K=t.computed(()=>!e.nested&&!e.error&&s.value.some(B=>B.key===Se.BULK_ACTIONS)&&!!(o["bulk-action-items"]||o["bulk-actions"])&&!!e.data.every(B=>l(B))),q=t.ref([]),te=t.computed(()=>e.nested||!K.value||e.error?!1:o.toolbar?!0:!e.loading&&!!e.data&&!!e.data.length),Z=t.computed(()=>{const B=F.value.length;return B?B>100?"99+":String(B):""}),ce=t.ref(new WeakMap),re=B=>`column-${B}`,de=B=>`tooltip-${B}`,Be=(B,R)=>(z,ae)=>{const ne=/^on[^a-z]/,De={};for(const ye in R)ne.test(ye)&&R[ye]&&(De[ye]=R[ye]);return Object.keys(De).reduce((ye,Te)=>{if(Te.indexOf(B)===0){const st=Te.split(B);ye[st[1]]=In=>De[Te](In,z,ae)}return ye},{})},be=t.computed(()=>(B,R)=>{const z=Be("onRow:",r)(R,"row"),ae=Be("onCell:",r)(B,"cell"),ne=["a","button","label","input","select",'span[role="checkbox"]'];return(z.click||ae.click)&&(N.value=!0),{...z,...ae,click(De){const ye=De.target,Te=ye.className;let st=ne.includes(ye.tagName.toLowerCase()),In=!1;typeof Te=="string"||Array.isArray(Te)?In=Te.includes("k-popover"):typeof Te=="object"&&(In=Object.keys(Te).includes("k-popover")),ye.closest(".popover-content")!==null&&(In=!0);for(let On=0;On<ne.length;On++)if(ye.closest(ne[On])!==null){st=!0;break}if((!st||ye.hasAttribute("disabled"))&&!In&&(z.click||ae.click))if(ae.click){a("cell-click",{data:B});const On=ae.click(De,B,"cell");typeof On=="function"&&On(De,B)}else{a("row-click",{data:R});const On=z.click(De,R,"row");typeof On=="function"&&On(De,R)}}}}),Ce=parseInt(Hd)*2+parseInt(qt),Ie={expandable:Ce,bulkActions:48,actions:54},Fe=P2(Ie,B=>`${B}px`),Ne=t.ref(((ie=e.tablePreferences)==null?void 0:ie.columnWidths)||Ie),Oe=t.computed(()=>{const B={};for(const R in Ne.value){const z=R;if(!Ne.value[z])continue;const ae=Ne.value[z]+"px";B[z]={width:ae,maxWidth:ae,minWidth:ae}}return B}),Pe=(B,R)=>({"resize-hover":X.value===B.key&&R!==u.value.length-1&&xe(B),resizable:e.resizeColumns&&!e.nested,sortable:!B.hideLabel&&!!B.sortable,"active-sort":!B.hideLabel&&!!B.sortable&&B.key===T.value,[I.value]:B.key===T.value&&!B.hideLabel,"is-scrolled":$.value,"has-tooltip":!!B.tooltip,"sticky-column":fe(B.key),"second-sticky-column":$e(B.key),"has-row-scroll-overlay":Ke(B.key),"actions-column":B.key===Se.ACTIONS}),U=B=>{if(B.sortable&&B.key!==Se.BULK_ACTIONS&&B.key!==Se.ACTIONS){let R="asc";B.key===T.value&&I.value==="asc"&&(R="desc"),a("sort",{prevKey:T.value,sortColumnKey:B.key,sortColumnOrder:R}),St(B)}},G=t.computed(()=>f.value?"resizing":p.value?"resize-hover":m.value?"th-hover":""),X=t.computed(()=>{switch(G.value){case"resizing":return f.value;case"resize-hover":return p.value;case"th-hover":return m.value;default:return""}}),O=t.computed(()=>{var B;return(B=c.value)==null?void 0:B.querySelectorAll("th.resizable")}),le=t.computed(()=>{var R;const B=(R=O.value)==null?void 0:R.item(0);if(B){const z=window==null?void 0:window.getComputedStyle(B);if(z!=null&&z.height)return`${parseInt(z.height,10)}px`}return"auto"}),ge=(B,R)=>{var Te;if(B.button!==0)return;let z=0,ae=0;f.value=R;let ne=null;(Te=O.value)==null||Te.forEach(st=>{st.getAttribute("data-testid")===`table-header-${R}`&&(ne=document==null?void 0:document.querySelector(`[data-tableid="${i}"] [data-testid="table-header-${R}"]`))});const De=st=>{const In=st.clientX-z;ne==null||ne.setAttribute("style",`width: ${ae+In}px`),Ne.value[R]=ae+In},ye=()=>{f.value="",document==null||document.removeEventListener("mousemove",De),document==null||document.removeEventListener("mouseup",ye),E(),Y.value&&Ft()};if(z=B.clientX,ne){const st=window==null?void 0:window.getComputedStyle(ne);st!=null&&st.width&&(ae=parseInt(st.width,10)),document==null||document.addEventListener("mousemove",De),document==null||document.addEventListener("mouseup",ye)}},fe=B=>M.value?B===Se.BULK_ACTIONS||B===Se.EXPANDABLE:!1,$e=B=>B===Se.BULK_ACTIONS&&Y.value,Ke=B=>M.value?K.value?B===Se.BULK_ACTIONS:Y.value?B===Se.EXPANDABLE:!1:!1,He=B=>B===Se.EXPANDABLE||B===Se.BULK_ACTIONS||B===Se.ACTIONS,xe=(B,R=!1)=>{if(!e.resizeColumns||e.nested)return!1;if(R){if(u.value.indexOf(B)===u.value.length-1)return!1;const ae=u.value[u.value.indexOf(B)-1];return!He(ae.key)}const z=u.value[u.value.indexOf(B)+1];return!He(B.key)&&!He(z.key)},Ue=(B,R,z)=>{a("row-actions-toggle",{row:B,open:R}),setTimeout(()=>{z.isRowActionsDropdownOpen=R},R?0:100)},nt=t.computed(()=>!(e.hidePagination||e.nested||e.hidePaginationWhenOptional&&e.data.length&&e.paginationAttributes.totalCount&&e.paginationAttributes.totalCount<=e.data.length));t.watch(()=>e.headers,B=>{if(B&&B.length){const R=B.filter(ne=>ne.key!==Se.BULK_ACTIONS&&ne.key!==Se.ACTIONS),z=B.find(ne=>ne.key===Se.BULK_ACTIONS),ae=B.find(ne=>ne.key===Se.ACTIONS);z&&R.unshift(z),ae&&R.push(ae),s.value=R}},{deep:!0,immediate:!0});const ot=B=>!B.hideLabel&&!!B.sortable&&B.key!==Se.BULK_ACTIONS&&B.key!==Se.ACTIONS,St=B=>{const{key:R}=B;T.value&&R===T.value?I.value==="asc"?I.value="desc":I.value="asc":(T.value=R,I.value="asc"),E()},At=B=>{var z;const R=B.target;R&&(typeof R.scrollTop=="number"||typeof R.scrollLeft=="number")&&(R.scrollTop>1?(D.value=!0,$.value=!0):R.scrollTop===0&&($.value=!1),R.scrollLeft>1?M.value=!0:R.scrollLeft===0&&(M.value=!1),R.scrollWidth===R.scrollLeft+R.clientWidth?V.value=!1:V.value=!0),(z=x.value)==null||z.forEach(ae=>{ae&&ae.closeDropdown&&ae.closeDropdown()})},it=B=>q.value.find(R=>R.rowKey===l(B)),rt=B=>{if(typeof e.rowBulkActionEnabled!="function")return!1;const R=e.rowBulkActionEnabled(B);return typeof R=="boolean"?R:R.enabled},W=B=>{if(typeof e.rowBulkActionEnabled!="function")return"";const R=e.rowBulkActionEnabled(B);return typeof R=="boolean"?"":R.disabledTooltip||""},ke=(B,R)=>{const{to:z}=e.rowLink(B);return!z||R===Se.BULK_ACTIONS||R===Se.ACTIONS?"div":typeof z=="object"?"router-link":"a"},L=(B,R)=>{if(R===Se.BULK_ACTIONS||R===Se.ACTIONS)return{};const{to:z,target:ae}=e.rowLink(B),ne=z&&typeof z=="object",De=z&&typeof z=="string";return{...ne&&{to:z},...De&&{href:z},...(ne||De)&&{...ae&&{target:ae}}}},Q=t.ref(o1(e.tablePreferences,e.paginationAttributes)),me=B=>{Q.value=B.pageSize,a("page-size-change",B),E()},H=t.computed(()=>({sortColumnKey:T.value,sortColumnOrder:I.value,...e.resizeColumns?{columnWidths:Ne.value}:{},...b.value?{columnVisibility:C.value}:{},...Q.value&&!e.hidePagination&&{pageSize:Q.value}})),E=()=>{a("update:table-preferences",H.value)},Y=t.computed(()=>!e.nested&&e.data.some(B=>e.rowExpandable(B))),ee={key:Se.EXPANDABLE,label:"Expandable rows controls",hideLabel:!0},se=()=>{const B=[];return e.data.forEach((R,z)=>{e.rowExpanded(R)&&B.push(z)}),B},Ae=t.ref(se()),Ze=async(B,R)=>{Ft(),await t.nextTick(),Ae.value.includes(B)?(Ae.value=Ae.value.filter(z=>z!==B),a("update:row-expanded",{row:R,expanded:!1})):(Ae.value=[...Ae.value,B],a("update:row-expanded",{row:R,expanded:!0}))},lt=t.computed(()=>u.value.filter(B=>B.key!==Se.EXPANDABLE&&B.key!==Se.BULK_ACTIONS)),Zt=t.ref({}),Ft=()=>{if(typeof document>"u")return;const B=document==null?void 0:document.querySelector(`[data-tableid="${i}"]`),R=B==null?void 0:B.querySelectorAll("th"),z={};R==null||R.forEach((ae,ne)=>{const De=ae.getAttribute("data-key");if(De===Se.EXPANDABLE)return;let ye=ae.getBoundingClientRect().width;ne===1&&(ye+=Ce),ne===R.length-1&&(ye-=15),z[De]=ye}),Zt.value=z};t.watch([C,s,Y],B=>{const[R,z,ae]=B;let ne=z.filter(De=>De.key===Se.BULK_ACTIONS?K.value:R[De.key]!==!1);ne.find(De=>De.key===Se.EXPANDABLE)&&(ne=ne.filter(De=>De.key!==Se.EXPANDABLE)),ae&&ne.unshift(ee),JSON.stringify(ne)!==JSON.stringify(u.value)&&(u.value=ne,E()),ae&&Ft()},{deep:!0,immediate:!0}),t.watch(g,B=>{B&&(C.value=e.tablePreferences.columnVisibility||{})},{immediate:!0});const Yt=t.ref(!1),Xe=t.computed(()=>{const B=q.value.filter(R=>!R.disabled&&e.data.find(z=>l(z)===R.rowKey));return!!B.filter(R=>R.selected).length&&!!B.filter(R=>!R.selected).length}),j=B=>{q.value.forEach(R=>{e.data.find(z=>l(z)===R.rowKey)&&!R.disabled&&(R.selected=B)})};return t.watch([()=>e.data,q],B=>{const[R,z]=B;if(R.forEach(ae=>{if(!ce.value.get(ae)){const ne=l(ae)||al();ce.value.set(ae,`table-${i}-row-${ne}`)}}),K.value){R.forEach(ye=>{it(ye)||q.value.push({rowKey:l(ye),selected:!1,disabled:!rt(ye)})});const ae=z.filter(ye=>!ye.disabled&&R.find(Te=>l(Te)===ye.rowKey));ae.length&&ae.filter(ye=>ye.selected).length===ae.length?Yt.value=!0:(ae.filter(ye=>!ye.selected).length,ae.length,Yt.value=!1);const ne=R.filter(ye=>{const Te=z.find(st=>st.rowKey===l(ye));return!!(Te&&Te.selected)}),De=[];F.value.forEach(ye=>{R.find(st=>l(ye)===l(st))||De.push(ye)}),F.value=[...De,...ne]}Ae.value=se()},{deep:!0,immediate:!0}),t.watch(F,B=>{a("row-select",B)}),t.watch(()=>e.tablePreferences,B=>{B!=null&&B.columnWidths&&(Ne.value=B.columnWidths)}),Ev(d,B=>{var z;const R=(z=B[0])==null?void 0:z.target;R&&(V.value=R.scrollWidth>R.clientWidth,S.value=R.clientHeight+"px",D.value=R.scrollHeight>R.clientHeight)}),(B,R)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["k-table-view",{"hide-headers":B.hideHeaders}])},[k.value?(t.openBlock(),t.createElementBlock("div",dz,[t.renderSlot(B.$slots,"toolbar",{},void 0,!0),te.value||g.value?(t.openBlock(),t.createElementBlock("div",uz,[te.value?t.renderSlot(B.$slots,"bulk-actions",{key:0,selectedRows:F.value},()=>[B.$slots["bulk-actions"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(cz,{key:0,"button-label":s.value.find(z=>z.key===t.unref(Se).BULK_ACTIONS).label,count:Z.value,disabled:!Z.value||B.loading||!B.data.length},{items:t.withCtx(()=>[t.renderSlot(B.$slots,"bulk-action-items",{selectedRows:F.value},void 0,!0)]),_:3},8,["button-label","count","disabled"]))],!0):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createBlock(p1,{key:1,columns:v.value,disabled:h.value,"table-id":t.unref(i),"visibility-preferences":w.value,onUpdate:R[0]||(R[0]=z=>C.value=z)},null,8,["columns","disabled","table-id","visibility-preferences"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),B.loading&&!B.error?(t.openBlock(),t.createBlock(Sa,{key:1,"data-testid":"table-skeleton",type:"table"})):B.error?(t.openBlock(),t.createElementBlock("div",fz,[t.renderSlot(B.$slots,"error-state",{},()=>[t.createVNode(Hn,{"icon-variant":"error",message:B.errorStateMessage,title:B.errorStateTitle},t.createSlots({_:2},[B.errorStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ve,{"data-testid":"error-state-action",to:B.errorStateActionRoute,onClick:R[1]||(R[1]=z=>a("error-action-click"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.errorStateActionMessage),1)]),_:1},8,["to"])]),key:"0"}:void 0]),1032,["message","title"])],!0)])):!B.error&&!B.loading&&B.data&&!B.data.length?(t.openBlock(),t.createElementBlock("div",pz,[t.renderSlot(B.$slots,"empty-state",{},()=>[t.createVNode(Hn,{"icon-variant":B.emptyStateIconVariant,message:B.emptyStateMessage,title:B.emptyStateTitle},t.createSlots({_:2},[B.emptyStateActionMessage?{name:"action",fn:t.withCtx(()=>[t.createVNode(Ve,{appearance:B.emptyStateButtonAppearance,"data-testid":"empty-state-action",to:B.emptyStateActionRoute,onClick:R[2]||(R[2]=z=>a("empty-state-action-click"))},{default:t.withCtx(()=>[t.renderSlot(B.$slots,"empty-state-action-icon",{},void 0,!0),t.createTextVNode(" "+t.toDisplayString(B.emptyStateActionMessage),1)]),_:3},8,["appearance","to"])]),key:"0"}:void 0]),1032,["icon-variant","message","title"])],!0)])):(t.openBlock(),t.createElementBlock("div",mz,[t.createElementVNode("div",{ref:"table-wrapper",class:"table-wrapper",style:t.normalizeStyle(P.value),onScrollPassive:At},[t.createElementVNode("table",{class:t.normalizeClass(["table",{"has-hover":B.rowHover&&!A.value,"is-clickable":N.value}]),"data-tableid":t.unref(i)},[B.hideHeaders?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("thead",{key:0,class:t.normalizeClass({"is-scrolled":$.value})},[t.createElementVNode("tr",{ref:"header-row",class:t.normalizeClass({"is-scrolled":$.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(z,ae)=>(t.openBlock(),t.createElementBlock("th",{key:`table-${t.unref(i)}-headers-${z.key}`,"aria-sort":z.key===T.value?I.value==="asc"?"ascending":"descending":void 0,class:t.normalizeClass(["table-headers",Pe(z,ae)]),"data-key":z.key,"data-testid":`table-header-${z.key}`,style:t.normalizeStyle(Oe.value[z.key]),onClick:()=>U(z),onMouseleave:R[8]||(R[8]=ne=>m.value=""),onMouseover:ne=>m.value=z.key},[ae!==0&&xe(z,!0)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"resize-handle previous",onClick:R[3]||(R[3]=t.withModifiers(()=>{},["stop"])),onMousedown:ne=>ge(ne,u.value[ae-1].key),onMouseleave:R[4]||(R[4]=ne=>p.value=""),onMouseover:ne=>p.value=u.value[ae-1].key},null,40,yz)):t.createCommentVNode("",!0),t.createElementVNode("div",{"aria-describedby":z.tooltip||o[de(z.key)]?`${de(z.key)}-${t.unref(i)}`:void 0,class:t.normalizeClass(["table-headers-container",{resized:f.value===z.key}])},[z.key!==t.unref(Se).BULK_ACTIONS?t.renderSlot(B.$slots,re(z.key),{key:0,column:z},()=>[t.createElementVNode("span",{class:t.normalizeClass(["table-header-label",{"sr-only":z.hideLabel||z.key===t.unref(Se).ACTIONS&&z.hideLabel!==!1}])},t.toDisplayString(z.label?z.label:z.key),3)],!0):(t.openBlock(),t.createElementBlock("div",vz,[t.createVNode(Ea,{modelValue:Yt.value,"onUpdate:modelValue":R[5]||(R[5]=ne=>Yt.value=ne),"aria-label":"Toggle selection for all rows",class:"table-header-bulk-actions-checkbox","data-testid":"table-header-bulk-actions-checkbox",indeterminate:Xe.value,onChange:j},null,8,["modelValue","indeterminate"])])),z.tooltip||B.$slots[de(z.key)]?(t.openBlock(),t.createBlock(Bt,{key:2,"data-testid":de(z.key),"kpop-attributes":{target:B.tooltipTarget},"max-width":"300","tooltip-id":`${de(z.key)}-${t.unref(i)}`},{content:t.withCtx(()=>[t.renderSlot(B.$slots,de(z.key),{column:z},()=>[t.createTextVNode(t.toDisplayString(z.tooltip),1)],!0)]),default:t.withCtx(()=>[t.createVNode(t.unref(Vn),{class:"header-tooltip-trigger",color:`var(--kui-color-text-neutral, ${t.unref(Xt)})`,size:t.unref(qt),tabindex:"0"},null,8,["color","size"])]),_:2},1032,["data-testid","kpop-attributes","tooltip-id"])):t.createCommentVNode("",!0),ot(z)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[T.value===z.key?(t.openBlock(),t.createBlock(t.unref(El),{key:0,class:"active-sort-icon",color:`var(--kui-color-text-primary, ${t.unref(Yd)})`,decorative:"",size:t.unref(qt)},null,8,["color","size"])):(t.openBlock(),t.createBlock(t.unref(Zy),{key:1,class:"sort-icon",color:`var(--kui-color-text-neutral-weak, ${t.unref(Fd)})`,size:t.unref(qt),title:`Sort by ${z.label}`},null,8,["color","size","title"]))],64)):t.createCommentVNode("",!0)],10,bz),ae!==u.value.length-1&&xe(z)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"resize-handle",onClick:R[6]||(R[6]=t.withModifiers(()=>{},["stop"])),onMousedown:ne=>ge(ne,z.key),onMouseleave:R[7]||(R[7]=ne=>p.value=""),onMouseover:ne=>p.value=z.key},null,40,wz)):t.createCommentVNode("",!0),Ke(z.key)?(t.openBlock(),t.createElementBlock("div",{key:2,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),z.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createElementBlock("div",{key:3,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay right",{"overlay-visible":V.value}])},null,2)):t.createCommentVNode("",!0)],46,gz))),128))],2)],2)),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B.data,(z,ae)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ce.value.get(z)},[t.createElementVNode("tr",t.mergeProps({class:{"last-row":ae===B.data.length-1&&!Ae.value.includes(ae)},role:B.rowLink(z).to?"link":void 0,tabindex:N.value&&!B.rowLink(z).to?0:void 0},{ref_for:!0},B.rowAttrs(z)),[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,(ne,De)=>(t.openBlock(),t.createBlock(t.unref(Cl),{key:`${ce.value.get(z)}-cell-${ne.key}`,data:{isRowActionsDropdownOpen:!1}},{default:t.withCtx(({data:ye})=>[t.createElementVNode("td",t.mergeProps({class:{"resize-hover":X.value===ne.key&&De!==u.value.length-1&&xe(ne),"row-link":!!B.rowLink(z).to,"sticky-column":fe(ne.key),"second-sticky-column":$e(ne.key),"has-row-scroll-overlay":Ke(ne.key),"actions-column":ne.key===t.unref(Se).ACTIONS},style:{...Oe.value[ne.key],...ye.isRowActionsDropdownOpen?{zIndex:2}:{}}},{ref_for:!0},B.cellAttrs({headerKey:ne.key,row:z,rowIndex:ae,colIndex:De}),t.toHandlers(be.value(z[ne.key],z),!0)),[ne.key!==t.unref(Se).EXPANDABLE?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ke(z,ne.key)),t.mergeProps({key:0,class:"cell-wrapper"},{ref_for:!0},L(z,ne.key)),{default:t.withCtx(()=>[ne.key!==t.unref(Se).BULK_ACTIONS&&ne.key!==t.unref(Se).ACTIONS?t.renderSlot(B.$slots,ne.key,{key:0,row:z,rowKey:ae,rowValue:z[ne.key]},()=>[t.createTextVNode(t.toDisplayString(z[ne.key]),1)],!0):ne.key===t.unref(Se).BULK_ACTIONS&&it(z)?(t.openBlock(),t.createBlock(Bt,{key:1,"kpop-attributes":{target:B.tooltipTarget},"max-width":"200",placement:"bottom-start",text:rt(z)?void 0:W(z)},{default:t.withCtx(()=>[t.createVNode(Ea,{modelValue:it(z).selected,"onUpdate:modelValue":Te=>it(z).selected=Te,"aria-label":"Toggle row selection",class:"bulk-actions-checkbox","data-testid":"bulk-actions-checkbox",disabled:!rt(z)},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1032,["kpop-attributes","text"])):ne.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createBlock(qn,{key:2,ref_for:!0,ref:"actionsDropdown",class:"actions-dropdown","data-testid":"actions-dropdown","kpop-attributes":{placement:"bottom-end"},onToggleDropdown:Te=>Ue(z,Te,ye)},{items:t.withCtx(()=>[t.renderSlot(B.$slots,"action-items",{row:z},void 0,!0)]),default:t.withCtx(()=>[t.createVNode(Ve,{appearance:"tertiary","aria-label":ne.label,class:"actions-dropdown-trigger","data-testid":"row-actions-dropdown-trigger",icon:"",size:"small",onMouseleave:R[9]||(R[9]=Te=>A.value=!1),onMouseover:R[10]||(R[10]=Te=>A.value=!0)},{default:t.withCtx(()=>[t.createVNode(t.unref(xd),{class:"more-icon",decorative:""})]),_:2},1032,["aria-label"])]),_:2},1032,["onToggleDropdown"])):t.createCommentVNode("",!0)]),_:2},1040)):B.rowExpandable(z)?(t.openBlock(),t.createElementBlock("div",Cz,[t.createElementVNode("button",{"aria-controls":`table-${t.unref(i)}-row-${ae}-expandable-content`,"aria-expanded":Ae.value.includes(ae),"aria-label":"Toggle row expandable content",class:t.normalizeClass(["expandable-row-control",{expanded:Ae.value.includes(ae)}]),"data-testid":"expandable-row-control",type:"button",onClick:Te=>Ze(ae,z)},[t.createVNode(t.unref(Bl),{class:"expandable-row-control-icon",decorative:""})],10,Sz)])):t.createCommentVNode("",!0),Ke(ne.key)?(t.openBlock(),t.createElementBlock("div",{key:2,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),ne.key===t.unref(Se).ACTIONS?(t.openBlock(),t.createElementBlock("div",{key:3,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay row-overlay right",{"overlay-visible":V.value}])},null,2)):t.createCommentVNode("",!0)],16)]),_:2},1024))),128))],16,kz),Y.value&&B.rowExpandable(z)?t.withDirectives((t.openBlock(),t.createElementBlock("tr",{key:0,id:`table-${t.unref(i)}-row-${ae}-expandable-content`,class:"expandable-content-row","data-testid":"expandable-content-row"},[t.createElementVNode("td",{colspan:u.value.length},[t.createElementVNode("div",Bz,[t.renderSlot(B.$slots,"row-expanded",{columnWidths:Zt.value,nestedHeaders:lt.value,row:z},void 0,!0)])],8,Ez)],8,$z)),[[t.vShow,Ae.value.includes(ae)]]):t.createCommentVNode("",!0)],64))),128))])],10,hz)],36),!K.value&&!Y.value?(t.openBlock(),t.createElementBlock("div",{key:0,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay table-overlay left",{"overlay-visible":M.value}])},null,2)):t.createCommentVNode("",!0),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,"aria-hidden":"true",class:t.normalizeClass(["scroll-overlay table-overlay right",{"overlay-visible":V.value,"scrollbar-offset":D.value}])},null,2)),nt.value?(t.openBlock(),t.createBlock($a,t.mergeProps({key:2,class:"table-pagination","data-testid":"table-pagination"},B.paginationAttributes,{onGetNextOffset:R[11]||(R[11]=z=>a("get-next-offset")),onGetPreviousOffset:R[12]||(R[12]=z=>a("get-previous-offset")),onPageChange:R[13]||(R[13]=z=>a("page-change",z)),onPageSizeChange:me}),null,16)):t.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-51e517c9"]]),j1=t.defineComponent({__name:"KTableData",props:{fetcher:{type:Function},headers:{default:()=>[]},fetcherCacheKey:{default:""},cacheIdentifier:{default:""},searchInput:{default:""},initialFetcherParams:{default:()=>({})},clientSort:{type:Boolean},sortHandlerFunction:{},sortable:{type:Boolean,default:!0},resizeColumns:{type:Boolean},tablePreferences:{default:()=>({})},rowHover:{type:Boolean,default:!0},rowAttrs:{default:()=>()=>({})},rowLink:{default:()=>()=>({})},rowBulkActionEnabled:{default:()=>()=>!0},rowKey:{},cellAttrs:{default:()=>()=>({})},loading:{type:Boolean},emptyStateTitle:{default:"No Data"},emptyStateMessage:{default:"There is no data to display."},emptyStateActionRoute:{},emptyStateActionMessage:{default:""},emptyStateIconVariant:{default:()=>Ht.Default},emptyStateButtonAppearance:{},error:{type:Boolean},errorStateTitle:{default:"An error occurred"},errorStateMessage:{default:"Data cannot be displayed due to an error."},errorStateActionRoute:{},errorStateActionMessage:{default:""},maxHeight:{default:"none"},hidePagination:{type:Boolean},paginationAttributes:{default:()=>({})},rowExpandable:{default:()=>()=>!1},rowExpanded:{default:()=>()=>!1},hideHeaders:{type:Boolean},nested:{type:Boolean},hidePaginationWhenOptional:{type:Boolean},hideToolbar:{type:Boolean},tooltipTarget:{},"onRow:click":{type:Function},"onRow:dblclick":{type:Function},"onRow:auxclick":{type:Function},"onRow:contextmenu":{type:Function},"onRow:mouseover":{type:Function},"onRow:mouseout":{type:Function},"onRow:mouseenter":{type:Function},"onRow:mouseleave":{type:Function},"onRow:mousedown":{type:Function},"onRow:mouseup":{type:Function},"onRow:focus":{type:Function},"onRow:focusin":{type:Function},"onRow:blur":{type:Function},"onRow:focusout":{type:Function},"onRow:keydown":{type:Function},"onRow:keyup":{type:Function},"onRow:keypress":{type:Function},"onCell:click":{type:Function},"onCell:dblclick":{type:Function},"onCell:auxclick":{type:Function},"onCell:contextmenu":{type:Function},"onCell:mouseover":{type:Function},"onCell:mouseout":{type:Function},"onCell:mouseenter":{type:Function},"onCell:mouseleave":{type:Function},"onCell:mousedown":{type:Function},"onCell:mouseup":{type:Function},"onCell:focus":{type:Function},"onCell:focusin":{type:Function},"onCell:blur":{type:Function},"onCell:focusout":{type:Function},"onCell:keydown":{type:Function},"onCell:keyup":{type:Function},"onCell:keypress":{type:Function}},emits:["state","cell-click","row-click","error-action-click","empty-state-action-click","update:table-preferences","sort","row-select","update:row-expanded","row-actions-toggle"],setup(e,{expose:n,emit:r}){const a=t.createPropsRestProxy(e,["resizeColumns","tablePreferences","rowHover","rowAttrs","rowLink","rowBulkActionEnabled","rowKey","cellAttrs","loading","emptyStateTitle","emptyStateMessage","emptyStateActionMessage","emptyStateIconVariant","emptyStateButtonAppearance","emptyStateActionRoute","error","errorStateTitle","errorStateMessage","errorStateActionMessage","errorStateActionRoute","maxHeight","hidePagination","paginationAttributes","rowExpandable","rowExpanded","hideHeaders","nested","hidePaginationWhenOptional","hideToolbar","headers","fetcherCacheKey","cacheIdentifier","searchInput","initialFetcherParams","clientSort","sortable","fetcher","sortHandlerFunction","tooltipTarget"]),o=t.computed(()=>{const W=/^on[^a-z]/;return R2(a,(ke,L)=>W.test(L))}),i=r,l=t.useSlots(),{useDebounce:d,useRequest:c,useSwrvState:s,clientSideSorter:u}=Yn(),f=t.useId(),p=t.ref([]),m=t.computed(()=>e.sortable?e.headers:e.headers.map(W=>({...W,sortable:!1}))),y=t.computed(()=>e.emptyStateButtonAppearance?e.emptyStateButtonAppearance:e.searchInput?"tertiary":"primary"),b=t.ref(0),g=t.ref(1),h=t.ref(o1(e.tablePreferences,e.paginationAttributes)),v=t.ref(e.searchInput??""),w=t.ref(e.tablePreferences.sortColumnKey||e.initialFetcherParams.sortColumnKey||""),C=t.ref(e.tablePreferences.sortColumnOrder||e.initialFetcherParams.sortColumnOrder||"desc"),S=t.ref(!(w.value&&e.clientSort)),D=t.ref(null),$=t.ref([]),M=t.ref(!0),V=t.ref(!1),T={pageSize:h.value,page:g.value,query:v.value,sortColumnKey:w.value,sortColumnOrder:C.value,offset:D.value},I=t.computed(()=>({totalCount:b.value,initialPageSize:h.value,currentPage:g.value,offsetPreviousButtonDisabled:!re.value,offsetNextButtonDisabled:!de.value||!M.value,...e.paginationAttributes})),N=W=>W.startsWith("column-"),k=W=>W.startsWith("tooltip-"),x=W=>m.value.some(ke=>ke.key===W),A=t.computed(()=>l?Object.keys(l).filter(N):[]),P=t.computed(()=>l?Object.keys(l).filter(k):[]),_=t.computed(()=>l?Object.keys(l).filter(x):[]),F=t.computed(()=>({sortColumnKey:w.value,sortColumnOrder:C.value})),K=t.computed(()=>({pageSize:h.value,page:g.value,query:v.value,offset:D.value,...e.clientSort?{}:F.value})),q=t.computed(()=>({...K.value,...F.value})),te=t.ref(!0),Z=async()=>{const W=await e.fetcher(q.value);return te.value=!1,W},ce=()=>{var ke;const W={...T,...e.initialFetcherParams};g.value=W.page??T.page,h.value=W.pageSize??T.pageSize,v.value=W.query??T.query,w.value=W.sortColumnKey??T.sortColumnKey,C.value=W.sortColumnOrder??T.sortColumnOrder,e.clientSort&&w.value&&C.value&&u(w.value,"",C.value,p.value),(ke=e.paginationAttributes)!=null&&ke.offset&&(D.value=W.offset,$.value.push(W.offset)),V.value=!0},re=t.computed(()=>$.value[g.value-1]),de=t.ref(null),Be=t.computed(()=>{if(!e.fetcher||!V.value)return"";let W=f;return e.cacheIdentifier&&(W=e.cacheIdentifier),W+=`-${JSON.stringify(K.value)}`,e.fetcherCacheKey&&(W+=`-${e.fetcherCacheKey}`),`k-table_${W}`}),{debouncedFn:be,generateDebouncedFn:Ce}=d(W=>{v.value=W},350),Ie=Ce(0),{data:Fe,response:Ne,error:Oe,revalidate:Pe,isValidating:U,isLoading:G}=c(()=>Be.value,()=>Z(),{revalidateOnFocus:!1,revalidateDebounce:0}),{state:X,hasData:O}=s(Fe,Oe,U),le=t.computed(()=>({hasData:O.value,state:X.value})),ge=t.computed(()=>G.value?"loading":Oe.value?"error":"success"),{debouncedFn:fe}=d(Pe,500),$e=({sortColumnKey:W,prevKey:ke,sortColumnOrder:L})=>{var H;S.value=!0;const Q=m.value.find(E=>E.key===W)||{},{useSortHandlerFunction:me}=Q;if(i("sort",{prevKey:ke,sortColumnKey:W,sortColumnOrder:L}),g.value=1,(!w.value||W!==w.value)&&($.value=[null]),w.value=W,C.value=L,e.clientSort)if(me&&e.sortHandlerFunction){const E=e.sortHandlerFunction({key:W,prevKey:ke,sortColumnOrder:C.value,data:p.value});E&&(p.value=[...E])}else u(W,ke,C.value,p.value);else(H=e.paginationAttributes)!=null&&H.offset||fe()},Ke=({page:W})=>{g.value=W},He=({pageSize:W})=>{$.value=[null],D.value=null,h.value=W,g.value=1},xe=({columnWidths:W,columnVisibility:ke})=>{Ue.value=W,nt.value=ke,St()},Ue=t.ref({}),nt=t.ref({}),ot=t.computed(()=>({pageSize:h.value,sortColumnKey:w.value,sortColumnOrder:C.value,...Ue.value?{columnWidths:Ue.value}:{},...nt.value?{columnVisibility:nt.value}:{}})),St=()=>{ge.value==="success"&&i("update:table-preferences",ot.value)},At=()=>{g.value++,D.value=de.value},it=()=>{g.value--,D.value=re.value},rt=t.computed(()=>{var ke,L,Q;if(!e.fetcher||e.hidePagination)return!1;const W=((L=(ke=e.paginationAttributes)==null?void 0:ke.pageSizes)==null?void 0:L[0])??a1;return e.hidePaginationWhenOptional&&g.value===1?(Q=e.paginationAttributes)!=null&&Q.offset?!!re.value||!!de.value||p.value.length>=W:b.value>W:!0});return t.watch(Ne,W=>{var ke,L,Q,me;W!=null&&W.data&&(p.value=[...W.data],b.value=((ke=e.paginationAttributes)==null?void 0:ke.totalCount)||W.total||((L=W.data)==null?void 0:L.length)||0,(Q=e.paginationAttributes)!=null&&Q.offset&&((me=W.pagination)!=null&&me.offset?(de.value=W.pagination.offset,$.value[g.value]||$.value.push(W.pagination.offset)):de.value=null,M.value=W.pagination&&"hasNextPage"in W.pagination?W.pagination.hasNextPage||!1:!0),p.value.length===0&&g.value>1&&(g.value=1,$.value=[null],D.value=null),e.sortable&&!S.value&&$e({sortColumnKey:w.value,prevKey:"",sortColumnOrder:C.value}))},{deep:!0,immediate:!0}),t.watch([le,ge],W=>{const[ke,L]=W;i("state",{state:L,hasData:ke.hasData})}),t.watch(()=>e.searchInput,W=>{W===""?Ie(W):be(W)},{immediate:!0}),t.watch([v,h],async(W,ke)=>{const[L]=ke,[Q]=W;Q!==L&&g.value!==1&&(g.value=1,$.value=[null],D.value=null)},{deep:!0,immediate:!0}),t.onMounted(()=>{ce()}),n({revalidate:()=>{Pe()}}),(W,ke)=>(t.openBlock(),t.createBlock(Zc,t.mergeProps({"cell-attrs":W.cellAttrs,class:"k-table-data",data:p.value,"empty-state-action-message":W.emptyStateActionMessage,"empty-state-action-route":W.emptyStateActionRoute,"empty-state-button-appearance":y.value,"empty-state-icon-variant":W.emptyStateIconVariant,"empty-state-message":W.emptyStateMessage,"empty-state-title":W.emptyStateTitle,error:W.error,"error-state-action-message":W.errorStateActionMessage,"error-state-action-route":W.errorStateActionRoute,"error-state-message":W.errorStateMessage,"error-state-title":W.errorStateTitle,headers:m.value,"hide-headers":W.hideHeaders,"hide-pagination":W.hidePagination||!rt.value,"hide-pagination-when-optional":!1,"hide-toolbar":W.hideToolbar,loading:W.loading||t.unref(G),"max-height":W.maxHeight,nested:W.nested,"pagination-attributes":I.value,"resize-columns":W.resizeColumns,"row-attrs":W.rowAttrs,"row-bulk-action-enabled":W.rowBulkActionEnabled,"row-expandable":W.rowExpandable,"row-expanded":W.rowExpanded,"row-hover":W.rowHover,"row-key":W.rowKey,"row-link":W.rowLink,"table-preferences":ot.value,"tooltip-target":W.tooltipTarget},o.value,{onEmptyStateActionClick:ke[0]||(ke[0]=L=>i("empty-state-action-click")),onErrorActionClick:ke[1]||(ke[1]=L=>i("error-action-click")),onGetNextOffset:At,onGetPreviousOffset:it,onPageChange:Ke,onPageSizeChange:He,onRowActionsToggle:ke[2]||(ke[2]=L=>W.$emit("row-actions-toggle",L)),onRowSelect:ke[3]||(ke[3]=L=>i("row-select",L)),onSort:$e,"onUpdate:rowExpanded":ke[4]||(ke[4]=L=>i("update:row-expanded",L)),"onUpdate:tablePreferences":xe}),t.createSlots({_:2},[l.toolbar&&!W.hideToolbar?{name:"toolbar",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"toolbar",{state:le.value})]),key:"0"}:void 0,l["bulk-actions"]?{name:"bulk-actions",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"bulk-actions",t.normalizeProps(t.guardReactiveProps(L)))]),key:"1"}:void 0,l["bulk-action-items"]?{name:"bulk-action-items",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"bulk-action-items",t.normalizeProps(t.guardReactiveProps(L)))]),key:"2"}:void 0,l["error-state"]?{name:"error-state",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"error-state")]),key:"3"}:void 0,l["empty-state"]?{name:"empty-state",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"empty-state")]),key:"4"}:void 0,l["empty-state-action-icon"]?{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.renderSlot(W.$slots,"empty-state-action-icon")]),key:"5"}:void 0,t.renderList(A.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),t.renderList(P.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),t.renderList(_.value,L=>({name:L,fn:t.withCtx(Q=>[t.renderSlot(W.$slots,L,t.normalizeProps(t.guardReactiveProps(Q)))])})),l["action-items"]?{name:"action-items",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"action-items",t.normalizeProps(t.guardReactiveProps(L)))]),key:"6"}:void 0,l["row-expanded"]?{name:"row-expanded",fn:t.withCtx(L=>[t.renderSlot(W.$slots,"row-expanded",t.normalizeProps(t.guardReactiveProps(L)))]),key:"7"}:void 0]),1040,["cell-attrs","data","empty-state-action-message","empty-state-action-route","empty-state-button-appearance","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-action-message","error-state-action-route","error-state-message","error-state-title","headers","hide-headers","hide-pagination","hide-toolbar","loading","max-height","nested","pagination-attributes","resize-columns","row-attrs","row-bulk-action-enabled","row-expandable","row-expanded","row-hover","row-key","row-link","table-preferences","tooltip-target"]))}}),Dz={class:"k-slider","data-testid":"k-slider"},Tz={class:"slider-container"},Nz={class:"input-value"},xz=["id","disabled","list","max","min","step"],Az=["id"],Mz=["data-testid","label","value"],Iz={"aria-hidden":"true",class:"slider-marks","data-testid":"slider-marks"},Oz=["data-testid"],G1=pe(t.defineComponent({__name:"KSlider",props:t.mergeModels({label:{default:""},min:{default:0},max:{default:10},step:{default:1},showMarks:{type:Boolean,default:!1},marks:{default:()=>[]},showValue:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},labelAttributes:{default:()=>({})}},{modelValue:{required:!0,type:Number},modelModifiers:{}}),emits:t.mergeModels(["change","update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const r=n,a=t.useId(),o=t.computed(()=>({width:y(u.value)})),i=t.computed(()=>({left:y(u.value),transform:`translateX(-${y(u.value)})`})),l=()=>{r("change",u.value),c()},d=t.useTemplateRef("thumbPopover"),c=()=>{var b;(b=d.value)==null||b.showPopover()},s=()=>{var b;(b=d.value)==null||b.hidePopover()},u=t.useModel(e,"modelValue"),f=t.computed(()=>{if(e.max<=e.min||e.step<=0)return[];const b=[];for(let g=e.min;g<=e.max;g+=e.step)b.push(g);return b}),p=b=>b>=e.min&&b<=e.max&&f.value.includes(b),m=t.computed(()=>{var b,g;if(e.marks.length){if(typeof e.marks[0]=="object")return e.marks.filter(h=>p(h.value));{const h=e.marks.filter(v=>p(v)).map(v=>({label:String(v),value:v}));return((b=h[0])==null?void 0:b.value)!==e.min&&h.unshift({label:String(e.min),value:e.min}),((g=h.at(-1))==null?void 0:g.value)!==e.max&&h.push({label:String(e.max),value:e.max}),h}}return e.showMarks?f.value.map(h=>({label:String(h),value:h})):[{label:String(e.min),value:e.min},{label:String(e.max),value:e.max}]}),y=b=>`${(b-e.min)/(e.max-e.min)*100}%`;return t.watch(()=>e.max,b=>{b<=e.min&&console.warn(`KSlider: max value ${b} must be greater than min value ${e.min}.`)},{immediate:!0}),t.watch(()=>e.step,b=>{e.max>e.min&&(b<=0||(e.max-e.min)%b!==0)&&console.warn(`KSlider: step value ${b} is invalid.`)},{immediate:!0}),t.watch(u,b=>{e.max>e.min&&!p(b)&&(console.warn(`KSelect: value ${b} is out of range [${f.value.join(", ")}]. Setting to min value ${e.min}.`),u.value=e.min)},{immediate:!0}),t.watch(()=>e.marks,b=>{if(b.length){let g=[];g=b.filter(h=>!p(typeof e.marks[0]=="object"?h.value:h)),g.length&&console.warn(`KSlider: marks [${g.map(h=>typeof g[0]=="object"?h.value:h).join(", ")}] are out of range [${f.value.join(", ")}].`)}},{immediate:!0}),(b,g)=>(t.openBlock(),t.createElementBlock("div",Dz,[b.label?(t.openBlock(),t.createBlock(Wt,t.mergeProps({key:0},b.labelAttributes,{for:`${t.unref(a)}-input`}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:1},16,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",Tz,[t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass(["lower-range-track",{"is-disabled":b.disabled}]),style:t.normalizeStyle(o.value)},null,6),t.createVNode(Fn,{ref:"thumbPopover","aria-hidden":"true",disabled:b.disabled||!b.showValue,"hide-close-icon":"",placement:"top","popover-timeout":500,trigger:"hover",width:"auto"},{content:t.withCtx(()=>[t.createElementVNode("span",Nz,t.toDisplayString(u.value),1)]),default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["thumb",{"is-disabled":b.disabled}]),style:t.normalizeStyle(i.value)},null,6)]),_:1},8,["disabled"]),t.withDirectives(t.createElementVNode("input",{id:`${t.unref(a)}-input`,"onUpdate:modelValue":g[0]||(g[0]=h=>u.value=h),"data-testid":"slider-input",disabled:b.disabled,list:`${t.unref(a)}-markers`,max:b.max,min:b.min,step:b.step,type:"range",onBlur:s,onFocus:c,onInput:l,onMouseup:s,onTouchend:s},null,40,xz),[[t.vModelText,u.value,void 0,{number:!0}]]),t.createElementVNode("datalist",{id:`${t.unref(a)}-markers`,"data-testid":"slider-datalist-marks"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,h=>(t.openBlock(),t.createElementBlock("option",{key:`datalist-mark-${h.value}`,"data-testid":`datalist-mark-${h.value}`,label:h.label,style:t.normalizeStyle({left:y(h.value)}),value:h.value},null,12,Mz))),128))],8,Az),t.createElementVNode("div",Iz,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,h=>(t.openBlock(),t.createElementBlock("span",{key:`mark-${h.value}`,"data-testid":`mark-${h.value}`,style:t.normalizeStyle({left:y(h.value)})},t.toDisplayString(h.label||h.value),13,Oz))),128))])])]))}}),[["__scopeId","data-v-29cb81de"]]),Xc=Object.freeze(Object.defineProperty({__proto__:null,KAlert:qd,KBadge:Lr,KBreadcrumbs:gu,KButton:Ve,KCard:Fl,KCatalog:Cu,KCatalogItem:Kl,KCheckbox:Ea,KClipboardProvider:kl,KCodeBlock:Pf,KCodeBlockIconButton:gr,KCollapse:Vf,KComponent:Cl,KCopy:U1,KDateTimePicker:Yg,KDropdown:qn,KDropdownItem:So,KDropdownMenu:qn,KEmptyState:Hn,KExternalLink:K1,KFileUpload:Hg,KInput:Sn,KInputSwitch:qg,KLabel:Wt,KModal:Ec,KModalFullscreen:t1,KMultiselect:i1,KPagination:$a,KPop:Fn,KPrompt:l1,KRadio:s1,KSegmentedControl:Es,KSelect:d1,KSkeleton:Sa,KSkeletonBox:It,KSlideout:u1,KSlider:G1,KStepper:f1,KTable:m1,KTableData:j1,KTableView:Zc,KTabs:h1,KTextArea:b1,KToaster:Tc,KToggle:ya,KTooltip:Bt,KTreeList:_1,KTruncate:W1,ToastManager:v1},Symbol.toStringTag,{value:"Module"})),Pz={install:e=>{for(const n in Xc)e.component(n,Xc[n])}};J.AlertAppearances=Ir,J.BadgeAppearances=Z1,J.BadgeMethodAppearances=Sl,J.ButtonAppearances=Jc,J.ButtonSizes=X1,J.CardSizeArray=ey,J.DateTimePickerModes=ba,J.EmptyStateIconVariants=Ht,J.HeaderTags=J1,J.KAlert=qd,J.KBadge=Lr,J.KBreadcrumbs=gu,J.KButton=Ve,J.KCard=Fl,J.KCatalog=Cu,J.KCatalogItem=Kl,J.KCheckbox=Ea,J.KClipboardProvider=kl,J.KCodeBlock=Pf,J.KCodeBlockIconButton=gr,J.KCollapse=Vf,J.KComponent=Cl,J.KCopy=U1,J.KDateTimePicker=Yg,J.KDropdown=qn,J.KDropdownItem=So,J.KDropdownMenu=qn,J.KEmptyState=Hn,J.KExternalLink=K1,J.KFileUpload=Hg,J.KInput=Sn,J.KInputSwitch=qg,J.KLabel=Wt,J.KModal=Ec,J.KModalFullscreen=t1,J.KMultiselect=i1,J.KPagination=$a,J.KPop=Fn,J.KPrompt=l1,J.KRadio=s1,J.KSegmentedControl=Es,J.KSelect=d1,J.KSkeleton=Sa,J.KSkeletonBox=It,J.KSlideout=u1,J.KSlider=G1,J.KStepper=f1,J.KTable=m1,J.KTableData=j1,J.KTableView=Zc,J.KTabs=h1,J.KTextArea=b1,J.KToaster=Tc,J.KToggle=ya,J.KTooltip=Bt,J.KTreeList=_1,J.KTruncate=W1,J.MethodsArray=ay,J.ModeArray=ry,J.ModeArrayCustom=ed,J.ModeArrayRelative=td,J.ModeDateOnly=nd,J.PopPlacementsArray=iy,J.PopTriggerArray=oy,J.RadioTypesArray=ly,J.SkeletonBoxHeightArray=dy,J.SkeletonBoxWidthArray=cy,J.SkeletonTypeArray=sy,J.StepperStateArray=uy,J.TableViewHeaderKeys=Se,J.TimepickerMode=ny,J.ToastManager=v1,J.ToasterAppearances=$l,J.TriggerAlignmentArray=ty,J.components=Xc,J.default=Pz,Object.defineProperties(J,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong/kongponents",
3
- "version": "9.36.8",
3
+ "version": "9.36.9",
4
4
  "description": "Kong Component library",
5
5
  "type": "module",
6
6
  "repository": {