@omniaz/vue-component-library 0.2.13 → 0.2.14

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.
@@ -238,5 +238,5 @@ return query;
238
238
  * @license MIT
239
239
  */function By(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?By=function(e){return typeof e}:By=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},By(t)}function E5e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ga(){return Ga=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ga.apply(this,arguments)}function mc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){E5e(t,o,n[o])})}return t}function _5e(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function T5e(t,e){if(t==null)return{};var n=_5e(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function M5e(t){return A5e(t)||P5e(t)||D5e()}function A5e(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function P5e(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function D5e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var N5e="1.10.2";function hu(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var pu=hu(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),em=hu(/Edge/i),kq=hu(/firefox/i),T$=hu(/safari/i)&&!hu(/chrome/i)&&!hu(/android/i),xq=hu(/iP(ad|od|hone)/i),B5e=hu(/chrome/i)&&hu(/android/i),jq={capture:!1,passive:!1};function nr(t,e,n){t.addEventListener(e,n,!pu&&jq)}function Yn(t,e,n){t.removeEventListener(e,n,!pu&&jq)}function Ry(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function R5e(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Bs(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ry(t,e):Ry(t,e))||r&&t===n)return t;if(t===n)break}while(t=R5e(t))}return null}var Sq=/\s+/g;function go(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(Sq," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(Sq," ")}}function Ut(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function _f(t,e){var n="";if(typeof t=="string")n=t;else do{var r=Ut(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Cq(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function _l(){var t=document.scrollingElement;return t||document.documentElement}function So(t,e,n,r,o){if(!(!t.getBoundingClientRect&&t!==window)){var i,a,s,l,u,c,f;if(t!==window&&t!==_l()?(i=t.getBoundingClientRect(),a=i.top,s=i.left,l=i.bottom,u=i.right,c=i.height,f=i.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!pu))do if(o&&o.getBoundingClientRect&&(Ut(o,"transform")!=="none"||n&&Ut(o,"position")!=="static")){var d=o.getBoundingClientRect();a-=d.top+parseInt(Ut(o,"border-top-width")),s-=d.left+parseInt(Ut(o,"border-left-width")),l=a+i.height,u=s+i.width;break}while(o=o.parentNode);if(r&&t!==window){var p=_f(o||t),v=p&&p.a,m=p&&p.d;p&&(a/=m,s/=v,f/=v,c/=m,l=a+c,u=s+f)}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function $q(t,e,n){for(var r=gc(t,!0),o=So(t)[e];r;){var i=So(r)[n],a=void 0;if(n==="top"||n==="left"?a=o>=i:a=o<=i,!a)return r;if(r===_l())break;r=gc(r,!1)}return!1}function Iy(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if(i[o].style.display!=="none"&&i[o]!==hn.ghost&&i[o]!==hn.dragged&&Bs(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function M$(t,e){for(var n=t.lastElementChild;n&&(n===hn.ghost||Ut(n,"display")==="none"||e&&!Ry(n,e));)n=n.previousElementSibling;return n||null}function Co(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==hn.clone&&(!e||Ry(t,e))&&n++;return n}function Oq(t){var e=0,n=0,r=_l();if(t)do{var o=_f(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function I5e(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function gc(t,e){if(!t||!t.getBoundingClientRect)return _l();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ut(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return _l();if(r||e)return n;r=!0}}while(n=n.parentNode);return _l()}function L5e(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function A$(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var tm;function Eq(t,e){return function(){if(!tm){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),tm=setTimeout(function(){tm=void 0},e)}}}function z5e(){clearTimeout(tm),tm=void 0}function _q(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function P$(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Tq(t,e){Ut(t,"position","absolute"),Ut(t,"top",e.top),Ut(t,"left",e.left),Ut(t,"width",e.width),Ut(t,"height",e.height)}function D$(t){Ut(t,"position",""),Ut(t,"top",""),Ut(t,"left",""),Ut(t,"width",""),Ut(t,"height","")}var Ei="Sortable"+new Date().getTime();function V5e(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(Ut(o,"display")==="none"||o===hn.ghost)){t.push({target:o,rect:So(o)});var i=mc({},t[t.length-1].rect);if(o.thisAnimationDuration){var a=_f(o,!0);a&&(i.top-=a.f,i.left-=a.e)}o.fromRect=i}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(I5e(t,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var i=!1,a=0;t.forEach(function(s){var l=0,u=s.target,c=u.fromRect,f=So(u),d=u.prevFromRect,p=u.prevToRect,v=s.rect,m=_f(u,!0);m&&(f.top-=m.f,f.left-=m.e),u.toRect=f,u.thisAnimationDuration&&A$(d,f)&&!A$(c,f)&&(v.top-f.top)/(v.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=H5e(v,d,p,o.options)),A$(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=o.options.animation),o.animate(u,v,f,l)),l&&(i=!0,a=Math.max(a,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(e),i?e=setTimeout(function(){typeof r=="function"&&r()},a):typeof r=="function"&&r(),t=[]},animate:function(r,o,i,a){if(a){Ut(r,"transition",""),Ut(r,"transform","");var s=_f(this.el),l=s&&s.a,u=s&&s.d,c=(o.left-i.left)/(l||1),f=(o.top-i.top)/(u||1);r.animatingX=!!c,r.animatingY=!!f,Ut(r,"transform","translate3d("+c+"px,"+f+"px,0)"),F5e(r),Ut(r,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),Ut(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){Ut(r,"transition",""),Ut(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},a)}}}}function F5e(t){return t.offsetWidth}function H5e(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var nm=[],N$={initializeByDefault:!0},rm={mount:function(e){for(var n in N$)N$.hasOwnProperty(n)&&!(n in e)&&(e[n]=N$[n]);nm.push(e)},pluginEvent:function(e,n,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var i=e+"Global";nm.forEach(function(a){n[a.pluginName]&&(n[a.pluginName][i]&&n[a.pluginName][i](mc({sortable:n},r)),n.options[a.pluginName]&&n[a.pluginName][e]&&n[a.pluginName][e](mc({sortable:n},r)))})},initializePlugins:function(e,n,r,o){nm.forEach(function(s){var l=s.pluginName;if(!(!e.options[l]&&!s.initializeByDefault)){var u=new s(e,n,e.options);u.sortable=e,u.options=e.options,e[l]=u,Ga(r,u.defaults)}});for(var i in e.options)if(e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,n){var r={};return nm.forEach(function(o){typeof o.eventProperties=="function"&&Ga(r,o.eventProperties.call(n[o.pluginName],e))}),r},modifyOption:function(e,n,r){var o;return nm.forEach(function(i){e[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[n]=="function"&&(o=i.optionListeners[n].call(e[i.pluginName],r))}),o}};function om(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,d=t.originalEvent,p=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[Ei],!!e){var m,g=e.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!pu&&!em?m=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(r,!0,!0)),m.to=a||n,m.from=s||n,m.item=o||n,m.clone=i,m.oldIndex=l,m.newIndex=u,m.oldDraggableIndex=c,m.newDraggableIndex=f,m.originalEvent=d,m.pullMode=p?p.lastPutMode:void 0;var b=mc({},v,rm.getEventProperties(r,e));for(var w in b)m[w]=b[w];n&&n.dispatchEvent(m),g[y]&&g[y].call(e,m)}}var ta=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,i=T5e(r,["evt"]);rm.pluginEvent.bind(hn)(e,n,mc({dragEl:vt,parentEl:Bo,ghostEl:Nn,rootEl:yo,nextEl:Tf,lastDownEl:Ly,cloneEl:$o,cloneHidden:yc,dragStarted:am,putSortable:pi,activeSortable:hn.active,originalEvent:o,oldIndex:jh,oldDraggableIndex:im,newIndex:ga,newDraggableIndex:bc,hideGhostForTarget:Rq,unhideGhostForTarget:Iq,cloneNowHidden:function(){yc=!0},cloneNowShown:function(){yc=!1},dispatchSortableEvent:function(s){Fi({sortable:n,name:s,originalEvent:o})}},i))};function Fi(t){om(mc({putSortable:pi,cloneEl:$o,targetEl:vt,rootEl:yo,oldIndex:jh,oldDraggableIndex:im,newIndex:ga,newDraggableIndex:bc},t))}var vt,Bo,Nn,yo,Tf,Ly,$o,yc,jh,ga,im,bc,zy,pi,Sh=!1,Vy=!1,Fy=[],Mf,Rs,B$,R$,Mq,Aq,am,Ch,sm,lm=!1,Hy=!1,Uy,_i,I$=[],L$=!1,qy=[],Wy=typeof document<"u",Ky=xq,Pq=em||pu?"cssFloat":"float",U5e=Wy&&!B5e&&!xq&&"draggable"in document.createElement("div"),Dq=function(){if(Wy){if(pu)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Nq=function(e,n){var r=Ut(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),i=Iy(e,0,n),a=Iy(e,1,n),s=i&&Ut(i),l=a&&Ut(a),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+So(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+So(a).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=o&&r[Pq]==="none"||a&&r[Pq]==="none"&&u+c>o)?"vertical":"horizontal"},q5e=function(e,n,r){var o=r?e.left:e.top,i=r?e.right:e.bottom,a=r?e.width:e.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===s||i===l||o+a/2===s+u/2},W5e=function(e,n){var r;return Fy.some(function(o){if(!M$(o)){var i=So(o),a=o[Ei].options.emptyInsertThreshold,s=e>=i.left-a&&e<=i.right+a,l=n>=i.top-a&&n<=i.bottom+a;if(a&&s&&l)return r=o}}),r},Bq=function(e){function n(i,a){return function(s,l,u,c){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(i==null&&(a||f))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return n(i(s,l,u,c),a)(s,l,u,c);var d=(a?s:l).options.group.name;return i===!0||typeof i=="string"&&i===d||i.join&&i.indexOf(d)>-1}}var r={},o=e.group;(!o||By(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,e.group=r},Rq=function(){!Dq&&Nn&&Ut(Nn,"display","none")},Iq=function(){!Dq&&Nn&&Ut(Nn,"display","")};Wy&&document.addEventListener("click",function(t){if(Vy)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Vy=!1,!1},!0);var Af=function(e){if(vt){e=e.touches?e.touches[0]:e;var n=W5e(e.clientX,e.clientY);if(n){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Ei]._onDragOver(r)}}},K5e=function(e){vt&&vt.parentNode[Ei]._isOutsideThisEl(e.target)};function hn(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ga({},e),t[Ei]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nq(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,s){a.setData("Text",s.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:hn.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};rm.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Bq(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:U5e,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?nr(t,"pointerdown",this._onTapStart):(nr(t,"mousedown",this._onTapStart),nr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(nr(t,"dragover",this),nr(t,"dragenter",this)),Fy.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ga(this,V5e())}hn.prototype={constructor:hn,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ch=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,vt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,o=this.options,i=o.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(s||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(eTe(r),!vt&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!u.isContentEditable&&(l=Bs(l,o.draggable,r,!1),!(l&&l.animated)&&Ly!==l)){if(jh=Co(l),im=Co(l,o.draggable),typeof c=="function"){if(c.call(this,e,l,this)){Fi({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),ta("filter",n,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Bs(u,f.trim(),r,!1),f)return Fi({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),ta("filter",n,{evt:e}),!0}),c)){i&&e.cancelable&&e.preventDefault();return}o.handle&&!Bs(u,o.handle,r,!1)||this._prepareDragStart(e,s,l)}}},_prepareDragStart:function(e,n,r){var o=this,i=o.el,a=o.options,s=i.ownerDocument,l;if(r&&!vt&&r.parentNode===i){var u=So(r);if(yo=i,vt=r,Bo=vt.parentNode,Tf=vt.nextSibling,Ly=r,zy=a.group,hn.dragged=vt,Mf={target:vt,clientX:(n||e).clientX,clientY:(n||e).clientY},Mq=Mf.clientX-u.left,Aq=Mf.clientY-u.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,vt.style["will-change"]="all",l=function(){if(ta("delayEnded",o,{evt:e}),hn.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!kq&&o.nativeDraggable&&(vt.draggable=!0),o._triggerDragStart(e,n),Fi({sortable:o,name:"choose",originalEvent:e}),go(vt,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){Cq(vt,c.trim(),V$)}),nr(s,"dragover",Af),nr(s,"mousemove",Af),nr(s,"touchmove",Af),nr(s,"mouseup",o._onDrop),nr(s,"touchend",o._onDrop),nr(s,"touchcancel",o._onDrop),kq&&this.nativeDraggable&&(this.options.touchStartThreshold=4,vt.draggable=!0),ta("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(em||pu))){if(hn.eventCanceled){this._onDrop();return}nr(s,"mouseup",o._disableDelayedDrag),nr(s,"touchend",o._disableDelayedDrag),nr(s,"touchcancel",o._disableDelayedDrag),nr(s,"mousemove",o._delayedDragTouchMoveHandler),nr(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&nr(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){vt&&V$(vt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Yn(e,"mouseup",this._disableDelayedDrag),Yn(e,"touchend",this._disableDelayedDrag),Yn(e,"touchcancel",this._disableDelayedDrag),Yn(e,"mousemove",this._delayedDragTouchMoveHandler),Yn(e,"touchmove",this._delayedDragTouchMoveHandler),Yn(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?nr(document,"pointermove",this._onTouchMove):n?nr(document,"touchmove",this._onTouchMove):nr(document,"mousemove",this._onTouchMove):(nr(vt,"dragend",this),nr(yo,"dragstart",this._onDragStart));try{document.selection?Yy(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Sh=!1,yo&&vt){ta("dragStarted",this,{evt:n}),this.nativeDraggable&&nr(document,"dragover",K5e);var r=this.options;!e&&go(vt,r.dragClass,!1),go(vt,r.ghostClass,!0),hn.active=this,e&&this._appendGhost(),Fi({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Rs){this._lastX=Rs.clientX,this._lastY=Rs.clientY,Rq();for(var e=document.elementFromPoint(Rs.clientX,Rs.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Rs.clientX,Rs.clientY),e!==n);)n=e;if(vt.parentNode[Ei]._isOutsideThisEl(e),n)do{if(n[Ei]){var r=void 0;if(r=n[Ei]._onDragOver({clientX:Rs.clientX,clientY:Rs.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);Iq()}},_onTouchMove:function(e){if(Mf){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,i=e.touches?e.touches[0]:e,a=Nn&&_f(Nn,!0),s=Nn&&a&&a.a,l=Nn&&a&&a.d,u=Ky&&_i&&Oq(_i),c=(i.clientX-Mf.clientX+o.x)/(s||1)+(u?u[0]-I$[0]:0)/(s||1),f=(i.clientY-Mf.clientY+o.y)/(l||1)+(u?u[1]-I$[1]:0)/(l||1);if(!hn.active&&!Sh){if(r&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Nn){a?(a.e+=c-(B$||0),a.f+=f-(R$||0)):a={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Ut(Nn,"webkitTransform",d),Ut(Nn,"mozTransform",d),Ut(Nn,"msTransform",d),Ut(Nn,"transform",d),B$=c,R$=f,Rs=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Nn){var e=this.options.fallbackOnBody?document.body:yo,n=So(vt,!0,Ky,!0,e),r=this.options;if(Ky){for(_i=e;Ut(_i,"position")==="static"&&Ut(_i,"transform")==="none"&&_i!==document;)_i=_i.parentNode;_i!==document.body&&_i!==document.documentElement?(_i===document&&(_i=_l()),n.top+=_i.scrollTop,n.left+=_i.scrollLeft):_i=_l(),I$=Oq(_i)}Nn=vt.cloneNode(!0),go(Nn,r.ghostClass,!1),go(Nn,r.fallbackClass,!0),go(Nn,r.dragClass,!0),Ut(Nn,"transition",""),Ut(Nn,"transform",""),Ut(Nn,"box-sizing","border-box"),Ut(Nn,"margin",0),Ut(Nn,"top",n.top),Ut(Nn,"left",n.left),Ut(Nn,"width",n.width),Ut(Nn,"height",n.height),Ut(Nn,"opacity","0.8"),Ut(Nn,"position",Ky?"absolute":"fixed"),Ut(Nn,"zIndex","100000"),Ut(Nn,"pointerEvents","none"),hn.ghost=Nn,e.appendChild(Nn),Ut(Nn,"transform-origin",Mq/parseInt(Nn.style.width)*100+"% "+Aq/parseInt(Nn.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,o=e.dataTransfer,i=r.options;if(ta("dragStart",this,{evt:e}),hn.eventCanceled){this._onDrop();return}ta("setupClone",this),hn.eventCanceled||($o=P$(vt),$o.draggable=!1,$o.style["will-change"]="",this._hideClone(),go($o,this.options.chosenClass,!1),hn.clone=$o),r.cloneId=Yy(function(){ta("clone",r),!hn.eventCanceled&&(r.options.removeCloneOnHide||yo.insertBefore($o,vt),r._hideClone(),Fi({sortable:r,name:"clone"}))}),!n&&go(vt,i.dragClass,!0),n?(Vy=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Yn(document,"mouseup",r._onDrop),Yn(document,"touchend",r._onDrop),Yn(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(r,o,vt)),nr(document,"drop",r),Ut(vt,"transform","translateZ(0)")),Sh=!0,r._dragStartId=Yy(r._dragStarted.bind(r,n,e)),nr(document,"selectstart",r),am=!0,T$&&Ut(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,o,i,a,s=this.options,l=s.group,u=hn.active,c=zy===l,f=s.sort,d=pi||u,p,v=this,m=!1;if(L$)return;function g(z,A){ta(z,v,mc({evt:e,isOwner:c,axis:p?"vertical":"horizontal",revert:a,dragRect:o,targetRect:i,canSort:f,fromSortable:d,target:r,completed:b,onMove:function($,_){return z$(yo,n,vt,o,$,So($),e,_)},changed:w},A))}function y(){g("dragOverAnimationCapture"),v.captureAnimationState(),v!==d&&d.captureAnimationState()}function b(z){return g("dragOverCompleted",{insertion:z}),z&&(c?u._hideClone():u._showClone(v),v!==d&&(go(vt,pi?pi.options.ghostClass:u.options.ghostClass,!1),go(vt,s.ghostClass,!0)),pi!==v&&v!==hn.active?pi=v:v===hn.active&&pi&&(pi=null),d===v&&(v._ignoreWhileAnimating=r),v.animateAll(function(){g("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(r===vt&&!vt.animated||r===n&&!r.animated)&&(Ch=null),!s.dragoverBubble&&!e.rootEl&&r!==document&&(vt.parentNode[Ei]._isOutsideThisEl(e.target),!z&&Af(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function w(){ga=Co(vt),bc=Co(vt,s.draggable),Fi({sortable:v,name:"change",toEl:n,newIndex:ga,newDraggableIndex:bc,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Bs(r,s.draggable,n,!0),g("dragOver"),hn.eventCanceled)return m;if(vt.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||v._ignoreWhileAnimating===r)return b(!1);if(Vy=!1,u&&!s.disabled&&(c?f||(a=!yo.contains(vt)):pi===this||(this.lastPutMode=zy.checkPull(this,u,vt,e))&&l.checkPut(this,u,vt,e))){if(p=this._getDirection(e,r)==="vertical",o=So(vt),g("dragOverValid"),hn.eventCanceled)return m;if(a)return Bo=yo,y(),this._hideClone(),g("revert"),hn.eventCanceled||(Tf?yo.insertBefore(vt,Tf):yo.appendChild(vt)),b(!0);var k=M$(n,s.draggable);if(!k||G5e(e,p,this)&&!k.animated){if(k===vt)return b(!1);if(k&&n===e.target&&(r=k),r&&(i=So(r)),z$(yo,n,vt,o,r,i,e,!!r)!==!1)return y(),n.appendChild(vt),Bo=n,w(),b(!0)}else if(r.parentNode===n){i=So(r);var j=0,x,I=vt.parentNode!==n,M=!q5e(vt.animated&&vt.toRect||o,r.animated&&r.toRect||i,p),T=p?"top":"left",C=$q(r,"top","top")||$q(vt,"top","top"),O=C?C.scrollTop:void 0;Ch!==r&&(x=i[T],lm=!1,Hy=!M&&s.invertSwap||I),j=Q5e(e,r,i,p,M?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Hy,Ch===r);var B;if(j!==0){var L=Co(vt);do L-=j,B=Bo.children[L];while(B&&(Ut(B,"display")==="none"||B===Nn))}if(j===0||B===r)return b(!1);Ch=r,sm=j;var D=r.nextElementSibling,N=!1;N=j===1;var U=z$(yo,n,vt,o,r,i,e,N);if(U!==!1)return(U===1||U===-1)&&(N=U===1),L$=!0,setTimeout(J5e,30),y(),N&&!D?n.appendChild(vt):r.parentNode.insertBefore(vt,N?D:r),C&&_q(C,0,O-C.scrollTop),Bo=vt.parentNode,x!==void 0&&!Hy&&(Uy=Math.abs(x-So(r)[T])),w(),b(!0)}if(n.contains(vt))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Yn(document,"mousemove",this._onTouchMove),Yn(document,"touchmove",this._onTouchMove),Yn(document,"pointermove",this._onTouchMove),Yn(document,"dragover",Af),Yn(document,"mousemove",Af),Yn(document,"touchmove",Af)},_offUpEvents:function(){var e=this.el.ownerDocument;Yn(e,"mouseup",this._onDrop),Yn(e,"touchend",this._onDrop),Yn(e,"pointerup",this._onDrop),Yn(e,"touchcancel",this._onDrop),Yn(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(ga=Co(vt),bc=Co(vt,r.draggable),ta("drop",this,{evt:e}),Bo=vt&&vt.parentNode,ga=Co(vt),bc=Co(vt,r.draggable),hn.eventCanceled){this._nulling();return}Sh=!1,Hy=!1,lm=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),F$(this.cloneId),F$(this._dragStartId),this.nativeDraggable&&(Yn(document,"drop",this),Yn(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),T$&&Ut(document.body,"user-select",""),Ut(vt,"transform",""),e&&(am&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Nn&&Nn.parentNode&&Nn.parentNode.removeChild(Nn),(yo===Bo||pi&&pi.lastPutMode!=="clone")&&$o&&$o.parentNode&&$o.parentNode.removeChild($o),vt&&(this.nativeDraggable&&Yn(vt,"dragend",this),V$(vt),vt.style["will-change"]="",am&&!Sh&&go(vt,pi?pi.options.ghostClass:this.options.ghostClass,!1),go(vt,this.options.chosenClass,!1),Fi({sortable:this,name:"unchoose",toEl:Bo,newIndex:null,newDraggableIndex:null,originalEvent:e}),yo!==Bo?(ga>=0&&(Fi({rootEl:Bo,name:"add",toEl:Bo,fromEl:yo,originalEvent:e}),Fi({sortable:this,name:"remove",toEl:Bo,originalEvent:e}),Fi({rootEl:Bo,name:"sort",toEl:Bo,fromEl:yo,originalEvent:e}),Fi({sortable:this,name:"sort",toEl:Bo,originalEvent:e})),pi&&pi.save()):ga!==jh&&ga>=0&&(Fi({sortable:this,name:"update",toEl:Bo,originalEvent:e}),Fi({sortable:this,name:"sort",toEl:Bo,originalEvent:e})),hn.active&&((ga==null||ga===-1)&&(ga=jh,bc=im),Fi({sortable:this,name:"end",toEl:Bo,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){ta("nulling",this),yo=vt=Bo=Nn=Tf=$o=Ly=yc=Mf=Rs=am=ga=bc=jh=im=Ch=sm=pi=zy=hn.dragged=hn.ghost=hn.clone=hn.active=null,qy.forEach(function(e){e.checked=!0}),qy.length=B$=R$=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":vt&&(this._onDragOver(e),Y5e(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,o=0,i=r.length,a=this.options;o<i;o++)n=r[o],Bs(n,a.draggable,this.el,!1)&&e.push(n.getAttribute(a.dataIdAttr)||Z5e(n));return e},sort:function(e){var n={},r=this.el;this.toArray().forEach(function(o,i){var a=r.children[i];Bs(a,this.options.draggable,r,!1)&&(n[o]=a)},this),e.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))})},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return Bs(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var o=rm.modifyOption(this,e,n);typeof o<"u"?r[e]=o:r[e]=n,e==="group"&&Bq(r)},destroy:function(){ta("destroy",this);var e=this.el;e[Ei]=null,Yn(e,"mousedown",this._onTapStart),Yn(e,"touchstart",this._onTapStart),Yn(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Yn(e,"dragover",this),Yn(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Fy.splice(Fy.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!yc){if(ta("hideClone",this),hn.eventCanceled)return;Ut($o,"display","none"),this.options.removeCloneOnHide&&$o.parentNode&&$o.parentNode.removeChild($o),yc=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(yc){if(ta("showClone",this),hn.eventCanceled)return;yo.contains(vt)&&!this.options.group.revertClone?yo.insertBefore($o,vt):Tf?yo.insertBefore($o,Tf):yo.appendChild($o),this.options.group.revertClone&&this.animate(vt,$o),Ut($o,"display",""),yc=!1}}};function Y5e(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function z$(t,e,n,r,o,i,a,s){var l,u=t[Ei],c=u.options.onMove,f;return window.CustomEvent&&!pu&&!em?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=o||e,l.relatedRect=i||So(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),c&&(f=c.call(u,l,a)),f}function V$(t){t.draggable=!1}function J5e(){L$=!1}function G5e(t,e,n){var r=So(M$(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}function Q5e(t,e,n,r,o,i,a,s){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a){if(s&&Uy<u*o){if(!lm&&(sm===1?l>c+u*i/2:l<f-u*i/2)&&(lm=!0),lm)d=!0;else if(sm===1?l<c+Uy:l>f-Uy)return-sm}else if(l>c+u*(1-o)/2&&l<f-u*(1-o)/2)return X5e(e)}return d=d||a,d&&(l<c+u*i/2||l>f-u*i/2)?l>c+u/2?1:-1:0}function X5e(t){return Co(vt)<Co(t)?1:-1}function Z5e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function eTe(t){qy.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&qy.push(r)}}function Yy(t){return setTimeout(t,0)}function F$(t){return clearTimeout(t)}Wy&&nr(document,"touchmove",function(t){(hn.active||Sh)&&t.cancelable&&t.preventDefault()}),hn.utils={on:nr,off:Yn,css:Ut,find:Cq,is:function(e,n){return!!Bs(e,n,e,!1)},extend:L5e,throttle:Eq,closest:Bs,toggleClass:go,clone:P$,index:Co,nextTick:Yy,cancelNextTick:F$,detectDirection:Nq,getChild:Iy},hn.get=function(t){return t[Ei]},hn.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(hn.utils=mc({},hn.utils,r.utils)),rm.mount(r)})},hn.create=function(t,e){return new hn(t,e)},hn.version=N5e;var Ro=[],um,H$,U$=!1,q$,W$,Jy,cm;function tTe(){function t(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?nr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?nr(document,"pointermove",this._handleFallbackAutoScroll):r.touches?nr(document,"touchmove",this._handleFallbackAutoScroll):nr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Yn(document,"dragover",this._handleAutoScroll):(Yn(document,"pointermove",this._handleFallbackAutoScroll),Yn(document,"touchmove",this._handleFallbackAutoScroll),Yn(document,"mousemove",this._handleFallbackAutoScroll)),Lq(),Gy(),z5e()},nulling:function(){Jy=H$=um=U$=cm=q$=W$=null,Ro.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var o=this,i=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(i,a);if(Jy=n,r||em||pu||T$){K$(n,this.options,s,r);var l=gc(s,!0);U$&&(!cm||i!==q$||a!==W$)&&(cm&&Lq(),cm=setInterval(function(){var u=gc(document.elementFromPoint(i,a),!0);u!==l&&(l=u,Gy()),K$(n,o.options,u,r)},10),q$=i,W$=a)}else{if(!this.options.bubbleScroll||gc(s,!0)===_l()){Gy();return}K$(n,this.options,gc(s,!1),!1)}}},Ga(t,{pluginName:"scroll",initializeByDefault:!0})}function Gy(){Ro.forEach(function(t){clearInterval(t.pid)}),Ro=[]}function Lq(){clearInterval(cm)}var K$=Eq(function(t,e,n,r){if(e.scroll){var o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,l=_l(),u=!1,c;H$!==n&&(H$=n,Gy(),um=e.scroll,c=e.scrollFn,um===!0&&(um=gc(n,!0)));var f=0,d=um;do{var p=d,v=So(p),m=v.top,g=v.bottom,y=v.left,b=v.right,w=v.width,k=v.height,j=void 0,x=void 0,I=p.scrollWidth,M=p.scrollHeight,T=Ut(p),C=p.scrollLeft,O=p.scrollTop;p===l?(j=w<I&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),x=k<M&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(j=w<I&&(T.overflowX==="auto"||T.overflowX==="scroll"),x=k<M&&(T.overflowY==="auto"||T.overflowY==="scroll"));var B=j&&(Math.abs(b-o)<=a&&C+w<I)-(Math.abs(y-o)<=a&&!!C),L=x&&(Math.abs(g-i)<=a&&O+k<M)-(Math.abs(m-i)<=a&&!!O);if(!Ro[f])for(var D=0;D<=f;D++)Ro[D]||(Ro[D]={});(Ro[f].vx!=B||Ro[f].vy!=L||Ro[f].el!==p)&&(Ro[f].el=p,Ro[f].vx=B,Ro[f].vy=L,clearInterval(Ro[f].pid),(B!=0||L!=0)&&(u=!0,Ro[f].pid=setInterval((function(){r&&this.layer===0&&hn.active._onTouchMove(Jy);var N=Ro[this.layer].vy?Ro[this.layer].vy*s:0,U=Ro[this.layer].vx?Ro[this.layer].vx*s:0;typeof c=="function"&&c.call(hn.dragged.parentNode[Ei],U,N,t,Jy,Ro[this.layer].el)!=="continue"||_q(Ro[this.layer].el,U,N)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==l&&(d=gc(d,!1)));U$=u}},30),zq=function(e){var n=e.originalEvent,r=e.putSortable,o=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,s=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(n){var u=r||i;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(a("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Y$(){}Y$.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=Iy(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:zq},Ga(Y$,{pluginName:"revertOnSpill"});function J$(){}J$.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:zq},Ga(J$,{pluginName:"removeOnSpill"});var Qa;function nTe(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(n){var r=n.dragEl;Qa=r},dragOverValid:function(n){var r=n.completed,o=n.target,i=n.onMove,a=n.activeSortable,s=n.changed,l=n.cancel;if(a.options.swap){var u=this.sortable.el,c=this.options;if(o&&o!==u){var f=Qa;i(o)!==!1?(go(o,c.swapClass,!0),Qa=o):Qa=null,f&&f!==Qa&&go(f,c.swapClass,!1)}s(),r(!0),l()}},drop:function(n){var r=n.activeSortable,o=n.putSortable,i=n.dragEl,a=o||this.sortable,s=this.options;Qa&&go(Qa,s.swapClass,!1),Qa&&(s.swap||o&&o.options.swap)&&i!==Qa&&(a.captureAnimationState(),a!==r&&r.captureAnimationState(),rTe(i,Qa),a.animateAll(),a!==r&&r.animateAll())},nulling:function(){Qa=null}},Ga(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Qa}}})}function rTe(t,e){var n=t.parentNode,r=e.parentNode,o,i;!n||!r||n.isEqualNode(e)||r.isEqualNode(t)||(o=Co(t),i=Co(e),n.isEqualNode(r)&&o<i&&i++,n.insertBefore(e,n.children[o]),r.insertBefore(t,r.children[i]))}var En=[],ya=[],fm,Is,dm=!1,ba=!1,$h=!1,Hr,hm,Qy;function oTe(){function t(e){for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));e.options.supportPointer?nr(document,"pointerup",this._deselectMultiDrag):(nr(document,"mouseup",this._deselectMultiDrag),nr(document,"touchend",this._deselectMultiDrag)),nr(document,"keydown",this._checkKeyDown),nr(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(o,i){var a="";En.length&&Is===e?En.forEach(function(s,l){a+=(l?", ":"")+s.textContent}):a=i.textContent,o.setData("Text",a)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(n){var r=n.dragEl;Hr=r},delayEnded:function(){this.isMultiDrag=~En.indexOf(Hr)},setupClone:function(n){var r=n.sortable,o=n.cancel;if(this.isMultiDrag){for(var i=0;i<En.length;i++)ya.push(P$(En[i])),ya[i].sortableIndex=En[i].sortableIndex,ya[i].draggable=!1,ya[i].style["will-change"]="",go(ya[i],this.options.selectedClass,!1),En[i]===Hr&&go(ya[i],this.options.chosenClass,!1);r._hideClone(),o()}},clone:function(n){var r=n.sortable,o=n.rootEl,i=n.dispatchSortableEvent,a=n.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||En.length&&Is===r&&(Vq(!0,o),i("clone"),a()))},showClone:function(n){var r=n.cloneNowShown,o=n.rootEl,i=n.cancel;this.isMultiDrag&&(Vq(!1,o),ya.forEach(function(a){Ut(a,"display","")}),r(),Qy=!1,i())},hideClone:function(n){var r=this;n.sortable;var o=n.cloneNowHidden,i=n.cancel;this.isMultiDrag&&(ya.forEach(function(a){Ut(a,"display","none"),r.options.removeCloneOnHide&&a.parentNode&&a.parentNode.removeChild(a)}),o(),Qy=!0,i())},dragStartGlobal:function(n){n.sortable,!this.isMultiDrag&&Is&&Is.multiDrag._deselectMultiDrag(),En.forEach(function(r){r.sortableIndex=Co(r)}),En=En.sort(function(r,o){return r.sortableIndex-o.sortableIndex}),$h=!0},dragStarted:function(n){var r=this,o=n.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){En.forEach(function(a){a!==Hr&&Ut(a,"position","absolute")});var i=So(Hr,!1,!0,!0);En.forEach(function(a){a!==Hr&&Tq(a,i)}),ba=!0,dm=!0}o.animateAll(function(){ba=!1,dm=!1,r.options.animation&&En.forEach(function(a){D$(a)}),r.options.sort&&Xy()})}},dragOver:function(n){var r=n.target,o=n.completed,i=n.cancel;ba&&~En.indexOf(r)&&(o(!1),i())},revert:function(n){var r=n.fromSortable,o=n.rootEl,i=n.sortable,a=n.dragRect;En.length>1&&(En.forEach(function(s){i.addAnimationState({target:s,rect:ba?So(s):a}),D$(s),s.fromRect=a,r.removeAnimationState(s)}),ba=!1,iTe(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(n){var r=n.sortable,o=n.isOwner,i=n.insertion,a=n.activeSortable,s=n.parentEl,l=n.putSortable,u=this.options;if(i){if(o&&a._hideClone(),dm=!1,u.animation&&En.length>1&&(ba||!o&&!a.options.sort&&!l)){var c=So(Hr,!1,!0,!0);En.forEach(function(d){d!==Hr&&(Tq(d,c),s.appendChild(d))}),ba=!0}if(!o)if(ba||Xy(),En.length>1){var f=Qy;a._showClone(r),a.options.animation&&!Qy&&f&&ya.forEach(function(d){a.addAnimationState({target:d,rect:hm}),d.fromRect=hm,d.thisAnimationDuration=null})}else a._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,o=n.isOwner,i=n.activeSortable;if(En.forEach(function(s){s.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){hm=Ga({},r);var a=_f(Hr,!0);hm.top-=a.f,hm.left-=a.e}},dragOverAnimationComplete:function(){ba&&(ba=!1,Xy())},drop:function(n){var r=n.originalEvent,o=n.rootEl,i=n.parentEl,a=n.sortable,s=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=i.children;if(!$h)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),go(Hr,f.selectedClass,!~En.indexOf(Hr)),~En.indexOf(Hr))En.splice(En.indexOf(Hr),1),fm=null,om({sortable:a,rootEl:o,name:"deselect",targetEl:Hr,originalEvt:r});else{if(En.push(Hr),om({sortable:a,rootEl:o,name:"select",targetEl:Hr,originalEvt:r}),r.shiftKey&&fm&&a.el.contains(fm)){var p=Co(fm),v=Co(Hr);if(~p&&~v&&p!==v){var m,g;for(v>p?(g=p,m=v):(g=v,m=p+1);g<m;g++)~En.indexOf(d[g])||(go(d[g],f.selectedClass,!0),En.push(d[g]),om({sortable:a,rootEl:o,name:"select",targetEl:d[g],originalEvt:r}))}}else fm=Hr;Is=c}if($h&&this.isMultiDrag){if((i[Ei].options.sort||i!==o)&&En.length>1){var y=So(Hr),b=Co(Hr,":not(."+this.options.selectedClass+")");if(!dm&&f.animation&&(Hr.thisAnimationDuration=null),c.captureAnimationState(),!dm&&(f.animation&&(Hr.fromRect=y,En.forEach(function(k){if(k.thisAnimationDuration=null,k!==Hr){var j=ba?So(k):y;k.fromRect=j,c.addAnimationState({target:k,rect:j})}})),Xy(),En.forEach(function(k){d[b]?i.insertBefore(k,d[b]):i.appendChild(k),b++}),l===Co(Hr))){var w=!1;En.forEach(function(k){if(k.sortableIndex!==Co(k)){w=!0;return}}),w&&s("update")}En.forEach(function(k){D$(k)}),c.animateAll()}Is=c}(o===i||u&&u.lastPutMode!=="clone")&&ya.forEach(function(k){k.parentNode&&k.parentNode.removeChild(k)})}},nullingGlobal:function(){this.isMultiDrag=$h=!1,ya.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Yn(document,"pointerup",this._deselectMultiDrag),Yn(document,"mouseup",this._deselectMultiDrag),Yn(document,"touchend",this._deselectMultiDrag),Yn(document,"keydown",this._checkKeyDown),Yn(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof $h<"u"&&$h)&&Is===this.sortable&&!(n&&Bs(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;En.length;){var r=En[0];go(r,this.options.selectedClass,!1),En.shift(),om({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Ga(t,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[Ei];!r||!r.options.multiDrag||~En.indexOf(n)||(Is&&Is!==r&&(Is.multiDrag._deselectMultiDrag(),Is=r),go(n,r.options.selectedClass,!0),En.push(n))},deselect:function(n){var r=n.parentNode[Ei],o=En.indexOf(n);!r||!r.options.multiDrag||!~o||(go(n,r.options.selectedClass,!1),En.splice(o,1))}},eventProperties:function(){var n=this,r=[],o=[];return En.forEach(function(i){r.push({multiDragElement:i,index:i.sortableIndex});var a;ba&&i!==Hr?a=-1:ba?a=Co(i,":not(."+n.options.selectedClass+")"):a=Co(i),o.push({multiDragElement:i,index:a})}),{items:M5e(En),clones:[].concat(ya),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function iTe(t,e){En.forEach(function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)})}function Vq(t,e){ya.forEach(function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)})}function Xy(){En.forEach(function(t){t!==Hr&&t.parentNode&&t.parentNode.removeChild(t)})}hn.mount(new tTe),hn.mount(J$,Y$);const aTe=_3(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:oTe,Sortable:hn,Swap:nTe,default:hn},Symbol.toStringTag,{value:"Module"})));(function(t,e){(function(r,o){t.exports=o(aTe)})(typeof self<"u"?self:es,function(n){return function(r){var o={};function i(a){if(o[a])return o[a].exports;var s=o[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=r,i.c=o,i.d=function(a,s,l){i.o(a,s)||Object.defineProperty(a,s,{enumerable:!0,get:l})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,s){if(s&1&&(a=i(a)),s&8||s&4&&typeof a=="object"&&a&&a.__esModule)return a;var l=Object.create(null);if(i.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:a}),s&2&&typeof a!="string")for(var u in a)i.d(l,u,(function(c){return a[c]}).bind(null,u));return l},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s="fb15")}({"01f9":function(r,o,i){var a=i("2d00"),s=i("5ca1"),l=i("2aba"),u=i("32e9"),c=i("84f2"),f=i("41a0"),d=i("7f20"),p=i("38fd"),v=i("2b4c")("iterator"),m=!([].keys&&"next"in[].keys()),g="@@iterator",y="keys",b="values",w=function(){return this};r.exports=function(k,j,x,I,M,T,C){f(x,j,I);var O=function(S){if(!m&&S in N)return N[S];switch(S){case y:return function(){return new x(this,S)};case b:return function(){return new x(this,S)}}return function(){return new x(this,S)}},B=j+" Iterator",L=M==b,D=!1,N=k.prototype,U=N[v]||N[g]||M&&N[M],z=U||O(M),A=M?L?O("entries"):z:void 0,E=j=="Array"&&N.entries||U,$,_,P;if(E&&(P=p(E.call(new k)),P!==Object.prototype&&P.next&&(d(P,B,!0),!a&&typeof P[v]!="function"&&u(P,v,w))),L&&U&&U.name!==b&&(D=!0,z=function(){return U.call(this)}),(!a||C)&&(m||D||!N[v])&&u(N,v,z),c[j]=z,c[B]=w,M)if($={values:L?z:O(b),keys:T?z:O(y),entries:A},C)for(_ in $)_ in N||l(N,_,$[_]);else s(s.P+s.F*(m||D),j,$);return $}},"02f4":function(r,o,i){var a=i("4588"),s=i("be13");r.exports=function(l){return function(u,c){var f=String(s(u)),d=a(c),p=f.length,v,m;return d<0||d>=p?l?"":void 0:(v=f.charCodeAt(d),v<55296||v>56319||d+1===p||(m=f.charCodeAt(d+1))<56320||m>57343?l?f.charAt(d):v:l?f.slice(d,d+2):(v-55296<<10)+(m-56320)+65536)}}},"0390":function(r,o,i){var a=i("02f4")(!0);r.exports=function(s,l,u){return l+(u?a(s,l).length:1)}},"0bfb":function(r,o,i){var a=i("cb7c");r.exports=function(){var s=a(this),l="";return s.global&&(l+="g"),s.ignoreCase&&(l+="i"),s.multiline&&(l+="m"),s.unicode&&(l+="u"),s.sticky&&(l+="y"),l}},"0d58":function(r,o,i){var a=i("ce10"),s=i("e11e");r.exports=Object.keys||function(u){return a(u,s)}},1495:function(r,o,i){var a=i("86cc"),s=i("cb7c"),l=i("0d58");r.exports=i("9e1e")?Object.defineProperties:function(c,f){s(c);for(var d=l(f),p=d.length,v=0,m;p>v;)a.f(c,m=d[v++],f[m]);return c}},"214f":function(r,o,i){i("b0c5");var a=i("2aba"),s=i("32e9"),l=i("79e5"),u=i("be13"),c=i("2b4c"),f=i("520a"),d=c("species"),p=!l(function(){var m=/./;return m.exec=function(){var g=[];return g.groups={a:"7"},g},"".replace(m,"$<a>")!=="7"}),v=function(){var m=/(?:)/,g=m.exec;m.exec=function(){return g.apply(this,arguments)};var y="ab".split(m);return y.length===2&&y[0]==="a"&&y[1]==="b"}();r.exports=function(m,g,y){var b=c(m),w=!l(function(){var T={};return T[b]=function(){return 7},""[m](T)!=7}),k=w?!l(function(){var T=!1,C=/a/;return C.exec=function(){return T=!0,null},m==="split"&&(C.constructor={},C.constructor[d]=function(){return C}),C[b](""),!T}):void 0;if(!w||!k||m==="replace"&&!p||m==="split"&&!v){var j=/./[b],x=y(u,b,""[m],function(C,O,B,L,D){return O.exec===f?w&&!D?{done:!0,value:j.call(O,B,L)}:{done:!0,value:C.call(B,O,L)}:{done:!1}}),I=x[0],M=x[1];a(String.prototype,m,I),s(RegExp.prototype,b,g==2?function(T,C){return M.call(T,this,C)}:function(T){return M.call(T,this)})}}},"230e":function(r,o,i){var a=i("d3f4"),s=i("7726").document,l=a(s)&&a(s.createElement);r.exports=function(u){return l?s.createElement(u):{}}},"23c6":function(r,o,i){var a=i("2d95"),s=i("2b4c")("toStringTag"),l=a(function(){return arguments}())=="Arguments",u=function(c,f){try{return c[f]}catch{}};r.exports=function(c){var f,d,p;return c===void 0?"Undefined":c===null?"Null":typeof(d=u(f=Object(c),s))=="string"?d:l?a(f):(p=a(f))=="Object"&&typeof f.callee=="function"?"Arguments":p}},2621:function(r,o){o.f=Object.getOwnPropertySymbols},"2aba":function(r,o,i){var a=i("7726"),s=i("32e9"),l=i("69a8"),u=i("ca5a")("src"),c=i("fa5b"),f="toString",d=(""+c).split(f);i("8378").inspectSource=function(p){return c.call(p)},(r.exports=function(p,v,m,g){var y=typeof m=="function";y&&(l(m,"name")||s(m,"name",v)),p[v]!==m&&(y&&(l(m,u)||s(m,u,p[v]?""+p[v]:d.join(String(v)))),p===a?p[v]=m:g?p[v]?p[v]=m:s(p,v,m):(delete p[v],s(p,v,m)))})(Function.prototype,f,function(){return typeof this=="function"&&this[u]||c.call(this)})},"2aeb":function(r,o,i){var a=i("cb7c"),s=i("1495"),l=i("e11e"),u=i("613b")("IE_PROTO"),c=function(){},f="prototype",d=function(){var p=i("230e")("iframe"),v=l.length,m="<",g=">",y;for(p.style.display="none",i("fab2").appendChild(p),p.src="javascript:",y=p.contentWindow.document,y.open(),y.write(m+"script"+g+"document.F=Object"+m+"/script"+g),y.close(),d=y.F;v--;)delete d[f][l[v]];return d()};r.exports=Object.create||function(v,m){var g;return v!==null?(c[f]=a(v),g=new c,c[f]=null,g[u]=v):g=d(),m===void 0?g:s(g,m)}},"2b4c":function(r,o,i){var a=i("5537")("wks"),s=i("ca5a"),l=i("7726").Symbol,u=typeof l=="function",c=r.exports=function(f){return a[f]||(a[f]=u&&l[f]||(u?l:s)("Symbol."+f))};c.store=a},"2d00":function(r,o){r.exports=!1},"2d95":function(r,o){var i={}.toString;r.exports=function(a){return i.call(a).slice(8,-1)}},"2fdb":function(r,o,i){var a=i("5ca1"),s=i("d2c8"),l="includes";a(a.P+a.F*i("5147")(l),"String",{includes:function(c){return!!~s(this,c,l).indexOf(c,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(r,o,i){var a=i("86cc"),s=i("4630");r.exports=i("9e1e")?function(l,u,c){return a.f(l,u,s(1,c))}:function(l,u,c){return l[u]=c,l}},"38fd":function(r,o,i){var a=i("69a8"),s=i("4bf8"),l=i("613b")("IE_PROTO"),u=Object.prototype;r.exports=Object.getPrototypeOf||function(c){return c=s(c),a(c,l)?c[l]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?u:null}},"41a0":function(r,o,i){var a=i("2aeb"),s=i("4630"),l=i("7f20"),u={};i("32e9")(u,i("2b4c")("iterator"),function(){return this}),r.exports=function(c,f,d){c.prototype=a(u,{next:s(1,d)}),l(c,f+" Iterator")}},"456d":function(r,o,i){var a=i("4bf8"),s=i("0d58");i("5eda")("keys",function(){return function(u){return s(a(u))}})},4588:function(r,o){var i=Math.ceil,a=Math.floor;r.exports=function(s){return isNaN(s=+s)?0:(s>0?a:i)(s)}},4630:function(r,o){r.exports=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}}},"4bf8":function(r,o,i){var a=i("be13");r.exports=function(s){return Object(a(s))}},5147:function(r,o,i){var a=i("2b4c")("match");r.exports=function(s){var l=/./;try{"/./"[s](l)}catch{try{return l[a]=!1,!"/./"[s](l)}catch{}}return!0}},"520a":function(r,o,i){var a=i("0bfb"),s=RegExp.prototype.exec,l=String.prototype.replace,u=s,c="lastIndex",f=function(){var v=/a/,m=/b*/g;return s.call(v,"a"),s.call(m,"a"),v[c]!==0||m[c]!==0}(),d=/()??/.exec("")[1]!==void 0,p=f||d;p&&(u=function(m){var g=this,y,b,w,k;return d&&(b=new RegExp("^"+g.source+"$(?!\\s)",a.call(g))),f&&(y=g[c]),w=s.call(g,m),f&&w&&(g[c]=g.global?w.index+w[0].length:y),d&&w&&w.length>1&&l.call(w[0],b,function(){for(k=1;k<arguments.length-2;k++)arguments[k]===void 0&&(w[k]=void 0)}),w}),r.exports=u},"52a7":function(r,o){o.f={}.propertyIsEnumerable},5537:function(r,o,i){var a=i("8378"),s=i("7726"),l="__core-js_shared__",u=s[l]||(s[l]={});(r.exports=function(c,f){return u[c]||(u[c]=f!==void 0?f:{})})("versions",[]).push({version:a.version,mode:i("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(r,o,i){var a=i("7726"),s=i("8378"),l=i("32e9"),u=i("2aba"),c=i("9b43"),f="prototype",d=function(p,v,m){var g=p&d.F,y=p&d.G,b=p&d.S,w=p&d.P,k=p&d.B,j=y?a:b?a[v]||(a[v]={}):(a[v]||{})[f],x=y?s:s[v]||(s[v]={}),I=x[f]||(x[f]={}),M,T,C,O;y&&(m=v);for(M in m)T=!g&&j&&j[M]!==void 0,C=(T?j:m)[M],O=k&&T?c(C,a):w&&typeof C=="function"?c(Function.call,C):C,j&&u(j,M,C,p&d.U),x[M]!=C&&l(x,M,O),w&&I[M]!=C&&(I[M]=C)};a.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,r.exports=d},"5eda":function(r,o,i){var a=i("5ca1"),s=i("8378"),l=i("79e5");r.exports=function(u,c){var f=(s.Object||{})[u]||Object[u],d={};d[u]=c(f),a(a.S+a.F*l(function(){f(1)}),"Object",d)}},"5f1b":function(r,o,i){var a=i("23c6"),s=RegExp.prototype.exec;r.exports=function(l,u){var c=l.exec;if(typeof c=="function"){var f=c.call(l,u);if(typeof f!="object")throw new TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(l)!=="RegExp")throw new TypeError("RegExp#exec called on incompatible receiver");return s.call(l,u)}},"613b":function(r,o,i){var a=i("5537")("keys"),s=i("ca5a");r.exports=function(l){return a[l]||(a[l]=s(l))}},"626a":function(r,o,i){var a=i("2d95");r.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return a(s)=="String"?s.split(""):Object(s)}},6762:function(r,o,i){var a=i("5ca1"),s=i("c366")(!0);a(a.P,"Array",{includes:function(u){return s(this,u,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(r,o,i){var a=i("626a"),s=i("be13");r.exports=function(l){return a(s(l))}},"69a8":function(r,o){var i={}.hasOwnProperty;r.exports=function(a,s){return i.call(a,s)}},"6a99":function(r,o,i){var a=i("d3f4");r.exports=function(s,l){if(!a(s))return s;var u,c;if(l&&typeof(u=s.toString)=="function"&&!a(c=u.call(s))||typeof(u=s.valueOf)=="function"&&!a(c=u.call(s))||!l&&typeof(u=s.toString)=="function"&&!a(c=u.call(s)))return c;throw TypeError("Can't convert object to primitive value")}},7333:function(r,o,i){var a=i("0d58"),s=i("2621"),l=i("52a7"),u=i("4bf8"),c=i("626a"),f=Object.assign;r.exports=!f||i("79e5")(function(){var d={},p={},v=Symbol(),m="abcdefghijklmnopqrst";return d[v]=7,m.split("").forEach(function(g){p[g]=g}),f({},d)[v]!=7||Object.keys(f({},p)).join("")!=m})?function(p,v){for(var m=u(p),g=arguments.length,y=1,b=s.f,w=l.f;g>y;)for(var k=c(arguments[y++]),j=b?a(k).concat(b(k)):a(k),x=j.length,I=0,M;x>I;)w.call(k,M=j[I++])&&(m[M]=k[M]);return m}:f},7726:function(r,o){var i=r.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},"77f1":function(r,o,i){var a=i("4588"),s=Math.max,l=Math.min;r.exports=function(u,c){return u=a(u),u<0?s(u+c,0):l(u,c)}},"79e5":function(r,o){r.exports=function(i){try{return!!i()}catch{return!0}}},"7f20":function(r,o,i){var a=i("86cc").f,s=i("69a8"),l=i("2b4c")("toStringTag");r.exports=function(u,c,f){u&&!s(u=f?u:u.prototype,l)&&a(u,l,{configurable:!0,value:c})}},8378:function(r,o){var i=r.exports={version:"2.6.5"};typeof __e=="number"&&(__e=i)},"84f2":function(r,o){r.exports={}},"86cc":function(r,o,i){var a=i("cb7c"),s=i("c69a"),l=i("6a99"),u=Object.defineProperty;o.f=i("9e1e")?Object.defineProperty:function(f,d,p){if(a(f),d=l(d,!0),a(p),s)try{return u(f,d,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(f[d]=p.value),f}},"9b43":function(r,o,i){var a=i("d8e8");r.exports=function(s,l,u){if(a(s),l===void 0)return s;switch(u){case 1:return function(c){return s.call(l,c)};case 2:return function(c,f){return s.call(l,c,f)};case 3:return function(c,f,d){return s.call(l,c,f,d)}}return function(){return s.apply(l,arguments)}}},"9c6c":function(r,o,i){var a=i("2b4c")("unscopables"),s=Array.prototype;s[a]==null&&i("32e9")(s,a,{}),r.exports=function(l){s[a][l]=!0}},"9def":function(r,o,i){var a=i("4588"),s=Math.min;r.exports=function(l){return l>0?s(a(l),9007199254740991):0}},"9e1e":function(r,o,i){r.exports=!i("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},a352:function(r,o){r.exports=n},a481:function(r,o,i){var a=i("cb7c"),s=i("4bf8"),l=i("9def"),u=i("4588"),c=i("0390"),f=i("5f1b"),d=Math.max,p=Math.min,v=Math.floor,m=/\$([$&`']|\d\d?|<[^>]*>)/g,g=/\$([$&`']|\d\d?)/g,y=function(b){return b===void 0?b:String(b)};i("214f")("replace",2,function(b,w,k,j){return[function(M,T){var C=b(this),O=M==null?void 0:M[w];return O!==void 0?O.call(M,C,T):k.call(String(C),M,T)},function(I,M){var T=j(k,I,this,M);if(T.done)return T.value;var C=a(I),O=String(this),B=typeof M=="function";B||(M=String(M));var L=C.global;if(L){var D=C.unicode;C.lastIndex=0}for(var N=[];;){var U=f(C,O);if(U===null||(N.push(U),!L))break;var z=String(U[0]);z===""&&(C.lastIndex=c(O,l(C.lastIndex),D))}for(var A="",E=0,$=0;$<N.length;$++){U=N[$];for(var _=String(U[0]),P=d(p(u(U.index),O.length),0),S=[],F=1;F<U.length;F++)S.push(y(U[F]));var R=U.groups;if(B){var Y=[_].concat(S,P,O);R!==void 0&&Y.push(R);var ee=String(M.apply(void 0,Y))}else ee=x(_,O,P,S,R,M);P>=E&&(A+=O.slice(E,P)+ee,E=P+_.length)}return A+O.slice(E)}];function x(I,M,T,C,O,B){var L=T+I.length,D=C.length,N=g;return O!==void 0&&(O=s(O),N=m),k.call(B,N,function(U,z){var A;switch(z.charAt(0)){case"$":return"$";case"&":return I;case"`":return M.slice(0,T);case"'":return M.slice(L);case"<":A=O[z.slice(1,-1)];break;default:var E=+z;if(E===0)return U;if(E>D){var $=v(E/10);return $===0?U:$<=D?C[$-1]===void 0?z.charAt(1):C[$-1]+z.charAt(1):U}A=C[E-1]}return A===void 0?"":A})}})},aae3:function(r,o,i){var a=i("d3f4"),s=i("2d95"),l=i("2b4c")("match");r.exports=function(u){var c;return a(u)&&((c=u[l])!==void 0?!!c:s(u)=="RegExp")}},ac6a:function(r,o,i){for(var a=i("cadf"),s=i("0d58"),l=i("2aba"),u=i("7726"),c=i("32e9"),f=i("84f2"),d=i("2b4c"),p=d("iterator"),v=d("toStringTag"),m=f.Array,g={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=s(g),b=0;b<y.length;b++){var w=y[b],k=g[w],j=u[w],x=j&&j.prototype,I;if(x&&(x[p]||c(x,p,m),x[v]||c(x,v,w),f[w]=m,k))for(I in a)x[I]||l(x,I,a[I],!0)}},b0c5:function(r,o,i){var a=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:a!==/./.exec},{exec:a})},be13:function(r,o){r.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},c366:function(r,o,i){var a=i("6821"),s=i("9def"),l=i("77f1");r.exports=function(u){return function(c,f,d){var p=a(c),v=s(p.length),m=l(d,v),g;if(u&&f!=f){for(;v>m;)if(g=p[m++],g!=g)return!0}else for(;v>m;m++)if((u||m in p)&&p[m]===f)return u||m||0;return!u&&-1}}},c649:function(r,o,i){(function(a){i.d(o,"c",function(){return p}),i.d(o,"a",function(){return f}),i.d(o,"b",function(){return l}),i.d(o,"d",function(){return d}),i("a481");function s(){return typeof window<"u"?window.console:a.console}var l=s();function u(v){var m=Object.create(null);return function(y){var b=m[y];return b||(m[y]=v(y))}}var c=/-(\w)/g,f=u(function(v){return v.replace(c,function(m,g){return g?g.toUpperCase():""})});function d(v){v.parentElement!==null&&v.parentElement.removeChild(v)}function p(v,m,g){var y=g===0?v.children[0]:v.children[g-1].nextSibling;v.insertBefore(m,y)}}).call(this,i("c8ba"))},c69a:function(r,o,i){r.exports=!i("9e1e")&&!i("79e5")(function(){return Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a!=7})},c8ba:function(r,o){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}r.exports=i},ca5a:function(r,o){var i=0,a=Math.random();r.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++i+a).toString(36))}},cadf:function(r,o,i){var a=i("9c6c"),s=i("d53b"),l=i("84f2"),u=i("6821");r.exports=i("01f9")(Array,"Array",function(c,f){this._t=u(c),this._i=0,this._k=f},function(){var c=this._t,f=this._k,d=this._i++;return!c||d>=c.length?(this._t=void 0,s(1)):f=="keys"?s(0,d):f=="values"?s(0,c[d]):s(0,[d,c[d]])},"values"),l.Arguments=l.Array,a("keys"),a("values"),a("entries")},cb7c:function(r,o,i){var a=i("d3f4");r.exports=function(s){if(!a(s))throw TypeError(s+" is not an object!");return s}},ce10:function(r,o,i){var a=i("69a8"),s=i("6821"),l=i("c366")(!1),u=i("613b")("IE_PROTO");r.exports=function(c,f){var d=s(c),p=0,v=[],m;for(m in d)m!=u&&a(d,m)&&v.push(m);for(;f.length>p;)a(d,m=f[p++])&&(~l(v,m)||v.push(m));return v}},d2c8:function(r,o,i){var a=i("aae3"),s=i("be13");r.exports=function(l,u,c){if(a(u))throw TypeError("String#"+c+" doesn't accept regex!");return String(s(l))}},d3f4:function(r,o){r.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},d53b:function(r,o){r.exports=function(i,a){return{value:a,done:!!i}}},d8e8:function(r,o){r.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},e11e:function(r,o){r.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(r,o,i){var a=i("5ca1"),s=i("9def"),l=i("d2c8"),u="startsWith",c=""[u];a(a.P+a.F*i("5147")(u),"String",{startsWith:function(d){var p=l(this,d,u),v=s(Math.min(arguments.length>1?arguments[1]:void 0,p.length)),m=String(d);return c?c.call(p,m,v):p.slice(v,v+m.length)===m}})},f6fd:function(r,o){(function(i){var a="currentScript",s=i.getElementsByTagName("script");a in i||Object.defineProperty(i,a,{get:function(){try{throw new Error}catch(c){var l,u=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(c.stack)||[!1])[1];for(l in s)if(s[l].src==u||s[l].readyState=="interactive")return s[l];return null}}})})(document)},f751:function(r,o,i){var a=i("5ca1");a(a.S+a.F,"Object",{assign:i("7333")})},fa5b:function(r,o,i){r.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(r,o,i){var a=i("7726").document;r.exports=a&&a.documentElement},fb15:function(r,o,i){if(i.r(o),typeof window<"u"){i("f6fd");var a;(a=window.document.currentScript)&&(a=a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=a[1])}i("f751"),i("f559"),i("ac6a"),i("cadf"),i("456d");function s(_){if(Array.isArray(_))return _}function l(_,P){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(_)))){var S=[],F=!0,R=!1,Y=void 0;try{for(var ee=_[Symbol.iterator](),ae;!(F=(ae=ee.next()).done)&&(S.push(ae.value),!(P&&S.length===P));F=!0);}catch(we){R=!0,Y=we}finally{try{!F&&ee.return!=null&&ee.return()}finally{if(R)throw Y}}return S}}function u(_,P){(P==null||P>_.length)&&(P=_.length);for(var S=0,F=new Array(P);S<P;S++)F[S]=_[S];return F}function c(_,P){if(_){if(typeof _=="string")return u(_,P);var S=Object.prototype.toString.call(_).slice(8,-1);if(S==="Object"&&_.constructor&&(S=_.constructor.name),S==="Map"||S==="Set")return Array.from(_);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return u(_,P)}}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
240
240
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(_,P){return s(_)||l(_,P)||c(_,P)||f()}i("6762"),i("2fdb");function p(_){if(Array.isArray(_))return u(_)}function v(_){if(typeof Symbol<"u"&&Symbol.iterator in Object(_))return Array.from(_)}function m(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
241
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(_){return p(_)||v(_)||c(_)||m()}var y=i("a352"),b=i.n(y),w=i("c649");function k(_,P,S){return S===void 0||(_=_||{},_[P]=S),_}function j(_,P){return _.map(function(S){return S.elm}).indexOf(P)}function x(_,P,S,F){if(!_)return[];var R=_.map(function(ae){return ae.elm}),Y=P.length-F,ee=g(P).map(function(ae,we){return we>=Y?R.length:R.indexOf(ae)});return S?ee.filter(function(ae){return ae!==-1}):ee}function I(_,P){var S=this;this.$nextTick(function(){return S.$emit(_.toLowerCase(),P)})}function M(_){var P=this;return function(S){P.realList!==null&&P["onDrag"+_](S),I.call(P,_,S)}}function T(_){return["transition-group","TransitionGroup"].includes(_)}function C(_){if(!_||_.length!==1)return!1;var P=d(_,1),S=P[0].componentOptions;return S?T(S.tag):!1}function O(_,P,S){return _[S]||(P[S]?P[S]():void 0)}function B(_,P,S){var F=0,R=0,Y=O(P,S,"header");Y&&(F=Y.length,_=_?[].concat(g(Y),g(_)):g(Y));var ee=O(P,S,"footer");return ee&&(R=ee.length,_=_?[].concat(g(_),g(ee)):g(ee)),{children:_,headerOffset:F,footerOffset:R}}function L(_,P){var S=null,F=function(Ee,Z){S=k(S,Ee,Z)},R=Object.keys(_).filter(function(we){return we==="id"||we.startsWith("data-")}).reduce(function(we,Ee){return we[Ee]=_[Ee],we},{});if(F("attrs",R),!P)return S;var Y=P.on,ee=P.props,ae=P.attrs;return F("on",Y),F("props",ee),Object.assign(S.attrs,ae),S}var D=["Start","Add","Remove","Update","End"],N=["Choose","Unchoose","Sort","Filter","Clone"],U=["Move"].concat(D,N).map(function(_){return"on"+_}),z=null,A={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(P){return P}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},E={name:"draggable",inheritAttrs:!1,props:A,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(P){var S=this.$slots.default;this.transitionMode=C(S);var F=B(S,this.$slots,this.$scopedSlots),R=F.children,Y=F.headerOffset,ee=F.footerOffset;this.headerOffset=Y,this.footerOffset=ee;var ae=L(this.$attrs,this.componentData);return P(this.getTag(),ae,R)},created:function(){this.list!==null&&this.value!==null&&w.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&w.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&w.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var P=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var S={};D.forEach(function(Y){S["on"+Y]=M.call(P,Y)}),N.forEach(function(Y){S["on"+Y]=I.bind(P,Y)});var F=Object.keys(this.$attrs).reduce(function(Y,ee){return Y[Object(w.a)(ee)]=P.$attrs[ee],Y},{}),R=Object.assign({},this.options,F,S,{onMove:function(ee,ae){return P.onDragMove(ee,ae)}});!("draggable"in R)&&(R.draggable=">*"),this._sortable=new b.a(this.rootContainer,R),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(P){this.updateOptions(P)},deep:!0},$attrs:{handler:function(P){this.updateOptions(P)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var P=this._vnode.fnOptions;return P&&P.functional},getTag:function(){return this.tag||this.element},updateOptions:function(P){for(var S in P){var F=Object(w.a)(S);U.indexOf(F)===-1&&this._sortable.option(F,P[S])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var P=this.$slots.default;return this.transitionMode?P[0].child.$slots.default:P},computeIndexes:function(){var P=this;this.$nextTick(function(){P.visibleIndexes=x(P.getChildrenNodes(),P.rootContainer.children,P.transitionMode,P.footerOffset)})},getUnderlyingVm:function(P){var S=j(this.getChildrenNodes()||[],P);if(S===-1)return null;var F=this.realList[S];return{index:S,element:F}},getUnderlyingPotencialDraggableComponent:function(P){var S=P.__vue__;return!S||!S.$options||!T(S.$options._componentTag)?!("realList"in S)&&S.$children.length===1&&"realList"in S.$children[0]?S.$children[0]:S:S.$parent},emitChanges:function(P){var S=this;this.$nextTick(function(){S.$emit("change",P)})},alterList:function(P){if(this.list){P(this.list);return}var S=g(this.value);P(S),this.$emit("input",S)},spliceList:function(){var P=arguments,S=function(R){return R.splice.apply(R,g(P))};this.alterList(S)},updatePosition:function(P,S){var F=function(Y){return Y.splice(S,0,Y.splice(P,1)[0])};this.alterList(F)},getRelatedContextFromMoveEvent:function(P){var S=P.to,F=P.related,R=this.getUnderlyingPotencialDraggableComponent(S);if(!R)return{component:R};var Y=R.realList,ee={list:Y,component:R};if(S!==F&&Y&&R.getUnderlyingVm){var ae=R.getUnderlyingVm(F);if(ae)return Object.assign(ae,ee)}return ee},getVmIndex:function(P){var S=this.visibleIndexes,F=S.length;return P>F-1?F:S[P]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(P){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var S=this.getChildrenNodes();S[P].data=null;var F=this.getComponent();F.children=[],F.kept=void 0}},onDragStart:function(P){this.context=this.getUnderlyingVm(P.item),P.item._underlying_vm_=this.clone(this.context.element),z=P.item},onDragAdd:function(P){var S=P.item._underlying_vm_;if(S!==void 0){Object(w.d)(P.item);var F=this.getVmIndex(P.newIndex);this.spliceList(F,0,S),this.computeIndexes();var R={element:S,newIndex:F};this.emitChanges({added:R})}},onDragRemove:function(P){if(Object(w.c)(this.rootContainer,P.item,P.oldIndex),P.pullMode==="clone"){Object(w.d)(P.clone);return}var S=this.context.index;this.spliceList(S,1);var F={element:this.context.element,oldIndex:S};this.resetTransitionData(S),this.emitChanges({removed:F})},onDragUpdate:function(P){Object(w.d)(P.item),Object(w.c)(P.from,P.item,P.oldIndex);var S=this.context.index,F=this.getVmIndex(P.newIndex);this.updatePosition(S,F);var R={element:this.context.element,oldIndex:S,newIndex:F};this.emitChanges({moved:R})},updateProperty:function(P,S){P.hasOwnProperty(S)&&(P[S]+=this.headerOffset)},computeFutureIndex:function(P,S){if(!P.element)return 0;var F=g(S.to.children).filter(function(ae){return ae.style.display!=="none"}),R=F.indexOf(S.related),Y=P.component.getVmIndex(R),ee=F.indexOf(z)!==-1;return ee||!S.willInsertAfter?Y:Y+1},onDragMove:function(P,S){var F=this.move;if(!F||!this.realList)return!0;var R=this.getRelatedContextFromMoveEvent(P),Y=this.context,ee=this.computeFutureIndex(R,P);Object.assign(Y,{futureIndex:ee});var ae=Object.assign({},P,{relatedContext:R,draggedContext:Y});return F(ae,S)},onDragEnd:function(){this.computeIndexes(),z=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",E);var $=E;o.default=$}}).default})})(wq);var sTe=wq.exports;const lTe=Mh(sTe),uTe={key:1,class:"text-xl"},cTe={class:"ml-6 block"},fTe=h.defineComponent({__name:"OmzNestedSortable",props:{items:{},itemsKey:{default:"items"},level:{default:0},maxNestingLevel:{default:4},subItemsLabel:{default:"Sub-items"},editableNames:{type:Boolean},disabled:{type:Boolean}},emits:["delete","delete-undo"],setup(t,{emit:e}){return(n,r)=>{const o=h.resolveComponent("omz-nested-sortable",!0);return h.openBlock(),h.createBlock(h.unref(lTe),{class:"min-h-[40px] mx-6 px-2 mb-2",tag:"ul",list:n.items,group:{name:"main"},"item-key":"name",animation:150,handle:".omz-nested-sortable__handle","ghost-class":"bg-blue-100",filter:".static",disabled:n.disabled},{item:h.withCtx(({element:i})=>[h.createElementVNode("div",{class:h.normalizeClass(["border border-gray-400 bg-gray-100 dark:bg-gray-800 mb-2 first:rounded-t last:rounded-b",{"static bg-red-200":i.deleted}])},[h.createElementVNode("span",{class:h.normalizeClass(["omz-nested-sortable__handle cursor-move",{"cursor-not-allowed":i.deleted}])},[h.createVNode(uo,{path:h.unref(HJ),size:"20"},null,8,["path"])],2),n.editableNames?(h.openBlock(),h.createBlock(Lm,{key:0,"model-value":i.name,type:"text",class:"inline-block","input-classes":"border-none bg-gray-100",small:"",disabled:i.deleted,onChange:a=>i.name=a.target.value},null,8,["model-value","disabled","onChange"])):(h.openBlock(),h.createElementBlock("strong",uTe,h.toDisplayString(i.name),1)),i.deleted?(h.openBlock(),h.createBlock(uo,{key:3,path:h.unref(oG),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete-undo",i)},null,8,["path","onClick"])):(h.openBlock(),h.createBlock(uo,{key:2,path:h.unref(Ub),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete",i)},null,8,["path","onClick"])),n.level<n.maxNestingLevel?(h.openBlock(),h.createElementBlock(h.Fragment,{key:4},[h.createElementVNode("small",cTe,h.toDisplayString(n.subItemsLabel)+": ",1),h.createVNode(o,{items:i[n.itemsKey],"items-key":n.itemsKey,level:n.level+1,"sub-items-label":n.subItemsLabel,class:"bg-gray-200 dark:bg-gray-600 py-2","editable-names":n.editableNames,disabled:i.deleted,filter:".static",onDelete:r[0]||(r[0]=a=>e("delete",a))},null,8,["items","items-key","level","sub-items-label","editable-names","disabled"])],64)):h.createCommentVNode("",!0)],2)]),_:1},8,["list","disabled"])}}}),dTe={class:"flex flex-col md:flex-row items-center"},hTe={class:"text-center md:text-left"},pTe=h.defineComponent({__name:"OmzNotification",props:{color:{},icon:{default:null},outline:{type:Boolean},allowClosing:{type:Boolean,default:!0},darkMode:{type:Boolean},permanentDismissKey:{default:null}},setup(t){const e=t,n=h.computed(()=>e.outline?wO[e.color]:[Fb[e.color],ts[e.color]]),r=h.ref(!1);e.permanentDismissKey&&localStorage.getItem(e.permanentDismissKey)==="true"&&(r.value=!0);const o=()=>{r.value=!0,e.permanentDismissKey&&localStorage.setItem(e.permanentDismissKey,"true")},i=h.useSlots(),a=h.computed(()=>i.right);return(s,l)=>r.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass([n.value,"px-3 py-6 md:py-3 mb-6 last:mb-0 border rounded transition-colors duration-150"])},[h.createVNode(zh,{mb:"mb-0"},{default:h.withCtx(()=>[h.createElementVNode("div",dTe,[s.icon?(h.openBlock(),h.createBlock(uo,{key:0,path:s.icon,w:"w-10 md:w-5",h:"h-10 md:h-5",size:"24",class:"md:mr-2"},null,8,["path"])):h.createCommentVNode("",!0),h.createElementVNode("span",hTe,[h.renderSlot(s.$slots,"default")])]),a.value?h.renderSlot(s.$slots,"right",{key:0}):s.allowClosing?(h.openBlock(),h.createBlock(qi,{key:1,icon:h.unref(qf),outline:s.outline||s.darkMode&&["white","light"].indexOf(s.color)<0,small:"",onClick:o},null,8,["icon","outline"])):h.createCommentVNode("",!0)]),_:3})],2))}}),Fq=h.defineComponent({__name:"OmzSortable",props:{tag:{default:"div"},enabled:{type:Boolean,default:!0},handleClass:{default:null},multiple:{type:Boolean}},emits:["orderChanged"],setup(t,{emit:e}){const n=t,r=h.ref(null),o=h.ref(null),i=h.ref(null),a=h.ref(null),s=h.ref([]);let l=!0,u=!0;function c(d,p){const v=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft;window.scrollTo(m+d,v+p),(!u||!l)&&setTimeout(()=>c(d,p),200)}function f(){if(r.value)for(let d=0;d<r.value.children.length;d+=1){const p=r.value.children[d];n.handleClass&&(p.onmousedown=v=>{i.value=v.target,a.value=p==null?void 0:p.querySelector(`.${n.handleClass}`)}),p.draggable=!0,p.ondragstart=v=>{var m;if(r.value&&(!n.handleClass||(m=a.value)!=null&&m.contains(i.value))){o.value=p;for(let g=0;g<r.value.children.length;g+=1){const y=r.value.children[g];y!==r.value&&y.classList.add("hint")}}else v.preventDefault()},p.ondragenter=()=>{p!==o.value&&p.classList.add("active")},p.ondrag=v=>{u=!0,v.clientY<150&&(u=!1,c(0,-1))},p.ondragleave=()=>{p.classList.remove("active")},p.ondragend=()=>{if(r.value)for(const v of Array.from(r.value.children))v.classList.remove("hint"),v.classList.remove("active");u=!0,l=!0},p.ondragover=v=>{v.preventDefault()},p.onclick=v=>{if(v.preventDefault(),n.multiple&&v.shiftKey)if(s.value.includes(p)){const m=s.value.findIndex(g=>g.getAttribute("data-sortable-id")===p.getAttribute("data-sortable-id"));s.value.splice(m,1),p.classList.remove("!bg-blue-300")}else s.value.push(p),p.classList.add("!bg-blue-300")},p.ondrop=v=>{var m,g;if(r.value){if(v.preventDefault(),p!==o.value){let b=0,w=0;for(let k=0;k<r.value.children.length;k+=1)o.value===r.value.children[k]&&(b=k),p===r.value.children[k]&&(w=k);b<w?((m=p.parentNode)==null||m.insertBefore(o.value,p.nextSibling),s.value.length&&(s.value.forEach(k=>{var j;(j=p.parentNode)==null||j.insertBefore(k,p.nextSibling),k.classList.remove("!bg-blue-300")}),s.value=[])):((g=p.parentNode)==null||g.insertBefore(o.value,p),s.value.length&&(s.value.forEach(k=>{var j;(j=p.parentNode)==null||j.insertBefore(k,p),k.classList.remove("!bg-blue-300")}),s.value=[]))}const y=[];for(const b of Array.from(r.value.children))y.push(b.getAttribute("data-sortable-id"));e("orderChanged",y)}}}}return h.onMounted(()=>{if(n.enabled){f();const d=new ResizeObserver(()=>{f()});r.value&&d.observe(r.value)}}),(d,p)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(d.tag),{ref_key:"sortableParent",ref:r},{default:h.withCtx(()=>[h.renderSlot(d.$slots,"default")]),_:3},512))}}),vTe={key:0},mTe={key:1},gTe=h.defineComponent({__name:"OmzTab",props:{title:{},url:{default:null},icon:{default:null},onClick:{type:[Function,null],default:null},disabled:{type:Boolean},hasErrors:{type:Boolean},reloading:{type:Boolean}},setup(t){const e=t,n=h.ref(0),r=h.ref(!1),o=h.inject("TabsProvider");return h.watch(()=>o.selectedIndex,()=>{r.value=n.value===o.selectedIndex}),h.watch(()=>e.hasErrors,()=>{o.hasErrors[n.value]=e.hasErrors}),h.onBeforeMount(()=>{n.value=o.count,o.count++,r.value=n.value===o.selectedIndex}),(i,a)=>i.reloading?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[r.value?(h.openBlock(),h.createElementBlock("div",vTe,[h.renderSlot(i.$slots,"default")])):h.createCommentVNode("",!0)],64)):h.withDirectives((h.openBlock(),h.createElementBlock("div",mTe,[h.renderSlot(i.$slots,"default")],512)),[[h.vShow,r.value]])}}),yTe=h.defineComponent({__name:"OmzExportModal",props:h.mergeModels({title:{},exportUrl:{},locale:{},formats:{default:()=>[]},filesCheckbox:{type:Boolean},dataIds:{default:null},dataFilters:{default:()=>({})}},{modelValue:{type:Boolean}}),emits:h.mergeModels(["exportStarted","exportSuccess"],["update:modelValue"]),setup(t,{emit:e}){const n=t,{trans:r}=od(n.locale),o=h.useModel(t,"modelValue"),i=h.ref(!1),a=EJ({ids:null,filters:{},format:null,with_files:!1}),s=h.computed(()=>n.formats.map(c=>({label:c,value:c}))),l=h.computed(()=>{var c;if(n.exportUrl){const f=new URL(n.exportUrl);return(c=n.dataIds)!=null&&c.length&&n.dataIds.forEach((d,p)=>f.searchParams.append(`ids[${p}]`,String(d))),Object.keys(n.dataFilters).forEach(d=>{f.searchParams.append(d,n.dataFilters[d])}),f.toString()}return null}),u=()=>{var c;i.value=!0,a.ids=(c=n.dataIds)!=null&&c.length?n.dataIds:null,a.filters=n.dataFilters,a.with_files?a.post(n.exportUrl,{onSuccess:()=>{o.value=!1,a.format=null,a.with_files=!1,e("exportStarted")},onFinish:()=>{i.value=!1}}):l.value?(window.location.href=l.value,e("exportSuccess"),o.value=!1,a.format=null,a.with_files=!1,i.value=!1):console.warn("No export url specified.")};return h.watch(()=>o,()=>{o&&n.formats.length===1&&([a.format]=n.formats)}),(c,f)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(O$,{"model-value":o.value,"button-label":h.unref(r)("exportModal.export"),"large-title":c.title,loading:i.value,locale:c.locale,"has-cancel":"",onConfirm:f[2]||(f[2]=d=>u()),onCancel:f[3]||(f[3]=d=>o.value=!1)},{default:h.withCtx(()=>[c.formats.length?(h.openBlock(),h.createBlock(F4,{key:0,label:h.unref(r)("exportModal.format"),required:""},{default:h.withCtx(()=>[h.createVNode(xh,{modelValue:h.unref(a).format,"onUpdate:modelValue":f[0]||(f[0]=d=>h.unref(a).format=d),options:s.value,disabled:c.formats.length===1,locale:c.locale},null,8,["modelValue","options","disabled","locale"])]),_:1},8,["label"])):h.createCommentVNode("",!0),c.filesCheckbox?(h.openBlock(),h.createBlock(EO,{key:1,modelValue:h.unref(a).with_files,"onUpdate:modelValue":f[1]||(f[1]=d=>h.unref(a).with_files=d),label:h.unref(r)("exportModal.withFiles"),name:"with_files",help:h.unref(r)("exportModal.withFilesHelp")},null,8,["modelValue","label","help"])):h.createCommentVNode("",!0)]),_:1},8,["model-value","button-label","large-title","loading","locale"])]))}});function Hq(){const t=(n,r,...o)=>{let i=n;for(let a=0;a<o.length;a++)a===o.length-1?i[o[a]]=r:(i[o[a]]||(i[o[a]]={}),i=i[o[a]])};function e(n,r=[],o=!1){const i={};return Object.keys(n).forEach(a=>{var l,u,c,f,d,p;const s=r.find(v=>v.filtering&&v.field===a);n[a]!==void 0&&(s&&((l=s.filtering)!=null&&l.relation)?(o?t(i,s.filtering.field,"filters",a,"field"):i[`filters[${a}][field]`]=s.filtering.field,Array.isArray(n[a])?n[a].forEach((v,m)=>{o?t(i,v,"filters",a,"value",m.toString()):i[`filters[${a}][value][${m}]`]=v}):o?t(i,n[a],"filters",a,"value"):i[`filters[${a}][value]`]=n[a],o?t(i,s.filtering.relation,"filters",a,"relation"):i[`filters[${a}][relation]`]=s.filtering.relation):(u=s==null?void 0:s.filtering)!=null&&u.type?o?(t(i,s.filtering.field||a,"filters",a,"field"),t(i,n[a],"filters",a,"value"),t(i,s.filtering.type,"filters",a,"type"),(c=s.filtering)!=null&&c.operator&&t(i,s.filtering.operator,"filters",a,"operator")):(i[`filters[${a}][field]`]=s.filtering.field||a,i[`filters[${a}][value]`]=n[a].value??n[a],i[`filters[${a}][type]`]=s.filtering.type,(f=s.filtering)!=null&&f.operator&&(i[`filters[${a}][operator]`]=s.filtering.operator)):o?t(i,n[a],"filters",((d=s==null?void 0:s.filtering)==null?void 0:d.field)||a):i[`filters[${((p=s==null?void 0:s.filtering)==null?void 0:p.field)||a}]`]=n[a])}),i}return{formatFiltersForBackend:e}}const bTe=["innerHTML"],wTe={class:"flex flex-wrap md:flex-nowrap items-stretch border-b border-gray-100 dark:border-gray-700 justify-between"},kTe={class:"bg-opacity-50 p-4 whitespace-nowrap"},xTe={key:0,class:"flex"},jTe={class:"flex items-center whitespace-nowrap"},STe={class:"flex gap-2 flex-wrap p-4"},CTe={key:0,class:"flex flex-col justify-end"},$Te={class:"relative"},OTe=["placeholder"],ETe={key:0,class:"text-sm font-bold"},_Te={key:5,class:"relative"},TTe=["id","onUpdate:modelValue","type","placeholder"],Uq=h.defineComponent({__name:"OmzTableTopBar",props:{columns:{},locale:{default:"en"},massDelete:{type:Boolean,default:!0},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},checkedRows:{default:()=>[]},checkedAll:{type:Boolean},total:{default:0},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},searchable:{type:Boolean},initialSearchValue:{default:null}},emits:["filtersChange","searchChange","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,o=h.inject(Rm),{formatFiltersForBackend:i}=Hq(),{trans:a}=od(r.locale),s=h.ref(r.initialFilters??{}),l=h.ref(r.initialSearchValue),u=h.ref(!1),c=h.ref(!1),f=h.computed(()=>Object.values(s.value).some(M=>typeof M=="object"?Object.keys(M).length:!!M)||l.value),d=h.computed(()=>r.checkedAll?`${r.total} (${f.value?a("table.filtered"):a("table.all")})`:String(r.checkedRows.length)),p=h.computed(()=>{var M;if(r.exportUrl){const T=i(s.value,r.columns),C=new URL(r.exportUrl);return!r.checkedAll&&((M=r.checkedRows)!=null&&M.length)&&r.checkedRows.forEach((O,B)=>C.searchParams.append(`ids[${B}]`,String(O.id))),Object.keys(T).forEach(O=>{C.searchParams.append(O,T[O])}),C.toString()}return null}),v=h.computed(()=>i({...s.value,...r.initialFilters},r.columns)),m=h.computed(()=>{var M;return r.checkedAll?null:(M=r.checkedRows)==null?void 0:M.map(T=>T.id)}),g=()=>{n("searchChange",l.value)},y=()=>{l.value=null,g()},b=()=>{Object.keys(s.value).forEach(M=>{s.value[M]===null&&(s.value[M]="")}),n("filtersChange",s.value)},w=M=>{s.value[M]="",b()},k=()=>{s.value={},l.value=null,b(),g()},j=M=>{var T,C;return typeof((T=M.filtering)==null?void 0:T.options)=="function"?r.initialFilters[M.field]?async O=>M.filtering.options(O,r.initialFilters[M.field]):async O=>M.filtering.options(O):(C=M==null?void 0:M.filtering)==null?void 0:C.options},x=M=>{var T,C;return typeof((T=M.filtering)==null?void 0:T.tags)=="function"?r.initialFilters[M.field]?async O=>M.filtering.tags(O,r.initialFilters[M.field]):async O=>M.filtering.tags(O):(C=M==null?void 0:M.filtering)==null?void 0:C.tags},I=async()=>{var M,T;if(r.deleteUrl){const C=i(s.value,r.columns,!0);let O;r.checkedAll?O=null:r.deleteKeyMapper?O=(M=r.checkedRows)==null?void 0:M.map(r.deleteKeyMapper):O=(T=r.checkedRows)==null?void 0:T.map(B=>B.id),o==null||o.post(r.deleteUrl,{ids:O,...C},{preserveState:!1,onSuccess:()=>{n("massDeleteSuccess")},onError:()=>{n("massDeleteError")}})}};return e({clearFilters:k}),(M,T)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[M.massDelete?(h.openBlock(),h.createBlock(O$,{key:0,"model-value":u.value,"button-label":h.unref(a)("table.massDeleteButton"),"large-title":h.unref(a)("table.massDeleteTitle"),locale:M.locale,"button-color":"danger","has-cancel":"",onConfirm:T[0]||(T[0]=C=>I()),onCancel:T[1]||(T[1]=C=>u.value=!1)},{default:h.withCtx(()=>[h.createElementVNode("p",{innerHTML:h.unref(a)("table.massDeleteMessage",{selectedRowsText:d.value})},null,8,bTe)]),_:1},8,["model-value","button-label","large-title","locale"])):h.createCommentVNode("",!0),M.exportUrl?(h.openBlock(),h.createBlock(yTe,{key:1,modelValue:c.value,"onUpdate:modelValue":T[2]||(T[2]=C=>c.value=C),locale:M.locale,title:M.exportLabel||h.unref(a)("exportModal.export"),formats:M.exportFormats,"export-url":M.exportUrl,"data-ids":m.value,"data-filters":v.value,"files-checkbox":M.exportFilesOption,onExportStarted:T[3]||(T[3]=C=>n("exportStarted")),onExportSuccess:T[4]||(T[4]=C=>n("exportSuccess"))},null,8,["modelValue","locale","title","formats","export-url","data-ids","data-filters","files-checkbox"])):h.createCommentVNode("",!0),h.createElementVNode("div",wTe,[h.createElementVNode("div",kTe,[M.checkedRows.length||M.checkedAll?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[M.hideCheckedRowsCount?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode(h.toDisplayString(h.unref(a)("table.selectedRows"))+" ",1),h.createElementVNode("b",null,h.toDisplayString(d.value),1)],64)),M.$slots.massActions||M.massDelete?(h.openBlock(),h.createBlock(V4,{key:1},{content:h.withCtx(({toggle:C})=>[h.createVNode(qi,{class:"ml-2",color:"omniazDarkBlue",icon:h.unref(xO),small:"",onClick:C},null,8,["icon","onClick"])]),dropdown:h.withCtx(()=>{var C;return[h.renderSlot(M.$slots,"massActions"),p.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[M.exportFilesOption||(C=M.exportFormats)!=null&&C.length?(h.openBlock(),h.createBlock(Zm,{key:0,icon:h.unref(jO),onClick:T[5]||(T[5]=O=>c.value=!0)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(M.exportLabel||h.unref(a)("table.export")),1)]),_:1},8,["icon"])):(h.openBlock(),h.createBlock(Zm,{key:1,href:p.value,icon:h.unref(jO)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(M.exportLabel||h.unref(a)("table.export")),1)]),_:1},8,["href","icon"]))],64)):h.createCommentVNode("",!0),M.massDelete?(h.openBlock(),h.createBlock(Zm,{key:1,icon:h.unref(Ub),onClick:T[6]||(T[6]=O=>u.value=!0)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(a)("table.massDeleteButton")),1)]),_:1},8,["icon"])):h.createCommentVNode("",!0)]}),_:3})):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),M.columns.some(C=>C.filtering)||M.searchable?(h.openBlock(),h.createElementBlock("div",xTe,[h.createElementVNode("div",jTe,h.toDisplayString(h.unref(a)("table.filterBy")),1),h.createElementVNode("div",STe,[M.searchable?(h.openBlock(),h.createElementBlock("div",CTe,[h.createElementVNode("span",$Te,[h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":T[7]||(T[7]=C=>l.value=C),class:"omz-input--small",placeholder:h.unref(a)("table.search"),onInput:T[8]||(T[8]=C=>g())},null,40,OTe),[[h.vModelText,l.value]]),h.withDirectives(h.createVNode(uo,{class:"absolute top-1.5 cursor-pointer right-1",path:h.unref(qf),size:"20",onClick:T[9]||(T[9]=C=>y())},null,8,["path"]),[[h.vShow,l.value]])])])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(M.columns.filter(C=>{var O;return(O=C.filtering)==null?void 0:O.enabled}),C=>{var O,B,L,D,N,U,z,A,E,$;return h.openBlock(),h.createElementBlock("div",{key:C.header,class:"flex flex-col justify-end"},[(O=C==null?void 0:C.filtering)!=null&&O.label?(h.openBlock(),h.createElementBlock("div",ETe,h.toDisplayString(C.filtering.label),1)):h.createCommentVNode("",!0),(B=C==null?void 0:C.filtering)!=null&&B.options&&typeof C.filtering.options=="function"?(h.openBlock(),h.createBlock(xh,{key:1,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:j(C),placeholder:C.filtering.label?void 0:C.header,mode:C.filtering.multiple?"multiple":"single","min-chars":3,"resolve-on-load":!!M.initialFilters[C.field]&&!(typeof M.initialFilters[C.field]=="object"&&!Object.keys(M.initialFilters[C.field]).length),delay:0,searchable:"",class:h.normalizeClass(["px-0 max-w-[400px]",[C.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:T[10]||(T[10]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","resolve-on-load","class"])):(L=C==null?void 0:C.filtering)!=null&&L.options?(h.openBlock(),h.createBlock(xh,{key:2,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:(D=C==null?void 0:C.filtering)==null?void 0:D.options,placeholder:C.filtering.label?void 0:C.header,mode:C.filtering.multiple?"multiple":"single",searchable:"",class:h.normalizeClass(["px-0 max-w-[400px]",[C.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:T[11]||(T[11]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","class"])):(N=C==null?void 0:C.filtering)!=null&&N.tags&&typeof C.filtering.tags=="function"?(h.openBlock(),h.createBlock(xh,{key:3,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:x(C),placeholder:C.filtering.label?void 0:C.header,mode:"tags","min-chars":3,"resolve-on-load":!!M.initialFilters[C.field]&&!(typeof M.initialFilters[C.field]=="object"&&!Object.keys(M.initialFilters[C.field]).length),delay:0,searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:T[12]||(T[12]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","resolve-on-load"])):(U=C==null?void 0:C.filtering)!=null&&U.tags?(h.openBlock(),h.createBlock(xh,{key:4,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:(z=C==null?void 0:C.filtering)==null?void 0:z.tags,placeholder:C.filtering.label?void 0:C.header,mode:"tags",searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:T[13]||(T[13]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder"])):(h.openBlock(),h.createElementBlock("span",_Te,[h.withDirectives(h.createElementVNode("input",{id:`${C.field}_filter`,"onUpdate:modelValue":_=>s.value[C.field]=_,type:((A=C.filtering)==null?void 0:A.type)||"text",class:"omz-input--small",placeholder:(E=C.filtering)!=null&&E.label?void 0:C.header,onInput:T[14]||(T[14]=_=>b())},null,40,TTe),[[h.vModelDynamic,s.value[C.field]]]),h.withDirectives(h.createVNode(uo,{class:h.normalizeClass(["absolute top-1.5 cursor-pointer",[(($=C.filtering)==null?void 0:$.type)==="date"?"right-7":"right-1"]]),path:h.unref(qf),size:"20",onClick:_=>w(C.field)},null,8,["class","path","onClick"]),[[h.vShow,s.value[C.field]]])]))])}),128)),f.value?(h.openBlock(),h.createBlock(qi,{key:1,color:"warning",label:h.unref(a)("table.clearFilters"),small:"",onClick:T[15]||(T[15]=C=>k())},null,8,["label"])):h.createCommentVNode("",!0)]),h.renderSlot(M.$slots,"default")])):h.createCommentVNode("",!0)])],64))}}),MTe={class:"bg-white dark:bg-gray-900"},ATe={key:0},PTe={key:1},DTe=["disabled"],NTe=h.createElementVNode("span",{class:"check"},null,-1),BTe=["onClick"],RTe={key:2},ITe=["data-sortable-id","onClick"],LTe={key:0,class:"cursor-move handle text-center"},zTe=["data-label"],VTe=["title"],FTe={key:1},HTe={key:5},UTe=["title"],qTe={key:2,class:"actions-cell"},WTe={key:3},KTe={key:0},YTe=["colspan"],JTe={class:"omz-table__overlay"},GTe=[h.createElementVNode("div",{class:"omz-table__loader"},[h.createElementVNode("div"),h.createElementVNode("div"),h.createElementVNode("div")],-1)],QTe={key:0,class:"p-4 text-center"},XTe={key:1,class:"p-3 lg:px-6 border-t dark:border-gray-800 border-gray-100"},ZTe={class:"justify-self-start"},eMe=[h.createElementVNode("option",{value:"10"}," 10 ",-1),h.createElementVNode("option",{value:"20"}," 20 ",-1),h.createElementVNode("option",{value:"50"}," 50 ",-1),h.createElementVNode("option",{value:"100"}," 100 ",-1)],tMe="lg:!bg-blue-100 lg:hover:!bg-blue-200 dark:lg:!bg-blue-800 dark:lg:hover:!bg-blue-700",nMe=h.defineComponent({__name:"OmzTable",props:{locale:{default:"en"},darkMode:{type:Boolean},checkable:{type:Boolean},data:{default:()=>[]},ajaxUrl:{default:null},ajaxParams:{default:()=>({})},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},columns:{},options:{default:()=>({pagination:!0,frontendPagination:!1})},refreshButton:{type:Boolean,default:!0},selectableRows:{type:Boolean},maxSelectedRows:{default:null},selectAllButton:{type:Boolean},massDelete:{type:Boolean,default:!0},shouldClearState:{type:Boolean},scrollable:{type:Boolean},sortable:{type:Boolean},multiSortable:{type:Boolean},rowClickCallback:{type:[Function,null],default:null},rowClickRoute:{type:[Function,null],default:null},rowClickTarget:{default:"self"},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},overflowVisible:{type:Boolean},saveState:{default:null},expanded:{type:Boolean},disableCheckAll:{type:Boolean},searchable:{type:Boolean},rowKeyMapper:{type:[Function,null],default:null}},emits:["rowsSelected","orderChanged","filtersChanged","ajaxError","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,{formatFiltersForBackend:o}=Hq(),i=h.inject(Rm),a=h.inject(Im)??Vb,{trans:s}=od(r.locale),l=h.useSlots(),u=parseInt(localStorage.getItem(`${r.ajaxUrl}_perPage`)||"10",10),c=h.ref(u),f=h.ref(0),d=h.ref(null),p=h.ref(null),v=h.ref("desc"),m=h.ref([]),g=h.ref(!1),y=h.ref(null),b=h.ref(!1);let w=null;const k=h.ref(r.initialFilters?{...r.initialFilters}:{}),j=h.ref(null),x=h.ref(null),I=h.ref(null),M=h.computed(()=>o({...k.value,...r.initialFilters},r.columns??[])),T=h.computed(()=>{let oe=(r.columns??[]).filter(ue=>!ue.hidden).length;return r.refreshButton&&(oe+=1),r.checkable&&(oe+=1),oe}),C=h.computed(()=>Object.values(k.value).some(oe=>!!oe)),O=h.computed(()=>{var oe,ue;return(oe=r.data)!=null&&oe.length?r.data:((ue=y.value)==null?void 0:ue.data)??y.value??[]}),B=h.computed(()=>{var ue,ke;let oe=O.value;return C.value&&((ue=r.data)!=null&&ue.length)&&Object.entries(k.value).forEach(([he,Me])=>{oe=oe.filter(J=>{var K,ye;if(typeof J[he]=="string")return J[he].toLowerCase().includes(Me.toLowerCase());if(typeof J[he]=="object"&&!Array.isArray(J[he])){const Ae=r.columns.find(De=>De.field===he);return(K=Ae==null?void 0:Ae.filtering)!=null&&K.field?J[he][(ye=Ae==null?void 0:Ae.filtering)==null?void 0:ye.field].toLowerCase().includes(Me.toLowerCase()):(console.warn(`There is no filtering configuration for key ${he}.`),!1)}return J[he].includes(Me)})}),(ke=r.options)!=null&&ke.frontendPagination&&(oe=O.value.slice(c.value*f.value,c.value*(f.value+1))),!r.ajaxUrl&&d.value&&oe.sort((he,Me)=>he[String(d.value)]<Me[String(d.value)]?v.value==="asc"?-1:1:he[String(d.value)]>Me[String(d.value)]?v.value==="asc"?1:-1:0),oe}),L=h.computed(()=>{var oe,ue;return r.ajaxUrl&&y.value?(oe=r.options)!=null&&oe.frontendPagination?Math.ceil(O.value.length/c.value):y.value.last_page??y.value.meta.last_page:(ue=r.data)!=null&&ue.length?Math.ceil(r.data.length/c.value):0}),D=h.computed(()=>{var oe,ue,ke;return r.ajaxUrl&&y.value&&((oe=r.options)==null?void 0:oe.pagination)!==!1?y.value.total??((ue=y.value.meta)==null?void 0:ue.total)??y.value.length:(ke=r.data)!=null&&ke.length?r.data.length:B.value.length}),N=h.computed(()=>f.value+1),U=h.computed(()=>s("table.displaying",{from:f.value*c.value+1,to:Math.min((f.value+1)*c.value,D.value),total:D.value})),z=h.computed(()=>s("table.showPage",{current:N.value,total:L.value})),A=async()=>{var ke,he,Me;const oe=new URLSearchParams({page:String(f.value+1),orderByScope:p.value??"",orderBy:d.value||"created_at",perPage:(ke=r.options)!=null&&ke.pagination&&!((he=r.options)!=null&&he.frontendPagination)?String(c.value):"999999",orderDir:v.value,search:j.value??"",...M.value,...r.ajaxParams});b.value=!0;let ue;w&&w.abort();try{w=new AbortController;const J=await Cm.get(`${r.ajaxUrl}?${oe}`,{signal:w.signal});w=null,ue=J.data,b.value=!1}catch(J){!(J instanceof E3)&&J instanceof oK&&((Me=J.response)==null?void 0:Me.status)!==401&&n("ajaxError"),ue={data:[],meta:{current_page:0,first_page_url:"",from:0,last_page:0,last_page_url:"",next_page_url:"",path:"",per_page:0,prev_page_url:null,to:0,total:0}},J instanceof E3||(b.value=!1,w=null)}return ue},E=async()=>{r.ajaxUrl&&(y.value=await A())},$=()=>{if(r.saveState){const oe={filters:k.value,page:f.value,search:j.value};sessionStorage.setItem(r.saveState,JSON.stringify(oe))}};if(r.saveState){const oe=sessionStorage.getItem(r.saveState);oe&&(I.value=JSON.parse(oe),k.value=I.value.filters,f.value=I.value.page,j.value=I.value.search??null)}E(),h.watch(()=>r.shouldClearState,(oe,ue)=>{var ke;oe!==ue&&oe&&(m.value=[],g.value=!1,k.value={},p.value=null,d.value=null,v.value="desc",(ke=x.value)==null||ke.clearFilters(),r.ajaxUrl&&E())}),h.watch(()=>r.ajaxUrl,async()=>{await E()}),h.watch(f,async()=>{var oe;(oe=r.options)!=null&&oe.frontendPagination||await E(),$()});const _=(oe,ue)=>{const ke=[];return oe.forEach(he=>{ue(he)||ke.push(he)}),ke},P=(oe,ue)=>{var ke;g.value?n("rowsSelected",(ke=r.options)!=null&&ke.frontendPagination?O.value:null):(oe?m.value.includes(ue)||m.value.push(ue):m.value=_(m.value,he=>he.id===ue.id),n("rowsSelected",m.value))},S=oe=>{if(r.selectableRows){const ue=m.value.findIndex(ke=>ke.id===oe.id);ue!==-1?m.value.splice(ue,1):r.maxSelectedRows?r.maxSelectedRows===1?m.value=[oe]:m.value.length<r.maxSelectedRows&&m.value.push(oe):m.value.push(oe),n("rowsSelected",m.value)}else if(r.rowClickRoute){const ue=r.rowClickRoute(oe);ue&&(r.rowClickTarget==="blank"?window.open(ue,"_blank"):i==null||i.visit(ue))}r.rowClickCallback&&r.rowClickCallback(oe)},F=qne(()=>{r.ajaxUrl&&(f.value=0,E())},500),R=oe=>{var ue;oe.ordering&&(d.value=oe.field,p.value=oe.orderByScope??null,v.value=v.value==="asc"?"desc":"asc",r.ajaxUrl&&!((ue=r.options)!=null&&ue.frontendPagination)&&E()),oe.orderingCallBack&&oe.orderingCallBack()},Y=()=>{var oe;localStorage.setItem(`${r.ajaxUrl}_perPage`,String(c.value)),(oe=r.options)!=null&&oe.frontendPagination||E()},ee=oe=>{n("orderChanged",oe)},ae=oe=>{k.value=oe,F(),$(),n("filtersChanged",k.value)},we=oe=>{j.value=oe,F(),$()},Ee=()=>k.value,Z=()=>g.value?null:m.value;return h.watch(g,oe=>{oe||(m.value=[])}),e({reloadAjax:E,getFilters:Ee,getCheckedRows:Z}),(oe,ue)=>{var ke,he;return h.openBlock(),h.createElementBlock(h.Fragment,null,[oe.columns.some(Me=>Me.filtering)||oe.massDelete&&oe.deleteUrl?(h.openBlock(),h.createBlock(Uq,{key:0,ref_key:"tableTopBarComponent",ref:x,locale:oe.locale,"delete-url":oe.deleteUrl,"delete-key-mapper":oe.deleteKeyMapper,"export-url":oe.exportUrl,"export-label":oe.exportLabel,"export-files-option":oe.exportFilesOption,"export-formats":oe.exportFormats,columns:oe.columns,total:D.value,"checked-rows":m.value,"checked-all":g.value,"mass-delete":oe.massDelete,"initial-filters":k.value,"hide-checked-rows-count":oe.hideCheckedRowsCount,searchable:oe.searchable,"initial-search-value":j.value,onFiltersChange:ae,onSearchChange:we,onMassDeleteSuccess:ue[0]||(ue[0]=Me=>n("massDeleteSuccess")),onMassDeleteError:ue[1]||(ue[1]=Me=>n("massDeleteError")),onExportStarted:ue[2]||(ue[2]=Me=>n("exportStarted")),onExportSuccess:ue[3]||(ue[3]=Me=>n("exportSuccess"))},h.createSlots({_:2},[oe.$slots.massActions?{name:"massActions",fn:h.withCtx(()=>[h.renderSlot(oe.$slots,"massActions")]),key:"0"}:void 0]),1032,["locale","delete-url","delete-key-mapper","export-url","export-label","export-files-option","export-formats","columns","total","checked-rows","checked-all","mass-delete","initial-filters","hide-checked-rows-count","searchable","initial-search-value"])):h.createCommentVNode("",!0),h.createElementVNode("div",h.mergeProps(oe.$attrs,{class:["omz-table",{"omz-table--scrollable":oe.scrollable,"!overflow-visible":oe.overflowVisible}]}),[h.createElementVNode("table",null,[h.createElementVNode("thead",null,[h.createElementVNode("tr",MTe,[oe.sortable?(h.openBlock(),h.createElementBlock("th",ATe)):h.createCommentVNode("",!0),oe.checkable?(h.openBlock(),h.createElementBlock("th",PTe,[oe.disableCheckAll?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("label",{key:0,class:h.normalizeClass(["checkbox align-middle",{"omz-disabled":B.value.length===0}])},[h.withDirectives(h.createElementVNode("input",{id:"check_all","onUpdate:modelValue":ue[4]||(ue[4]=Me=>g.value=Me),type:"checkbox",disabled:B.value.length===0},null,8,DTe),[[h.vModelCheckbox,g.value]]),NTe],2))])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(oe.columns.filter(Me=>!Me.hidden),Me=>(h.openBlock(),h.createElementBlock("th",{key:Me.header},[h.renderSlot(oe.$slots,"header",{column:Me},()=>[h.createElementVNode("span",{class:h.normalizeClass({"cursor-pointer":(Me==null?void 0:Me.ordering)||(Me==null?void 0:Me.orderingCallBack)}),onClick:J=>R(Me)},[h.createTextVNode(h.toDisplayString(Me.header)+" ",1),Me!=null&&Me.ordering&&d.value===Me.field?(h.openBlock(),h.createBlock(uo,{key:0,class:"align-bottom",path:v.value==="asc"?h.unref(qJ):h.unref(UJ)},null,8,["path"])):h.createCommentVNode("",!0)],10,BTe)])]))),128)),(oe.$slots.actionsCell||oe.ajaxUrl)&&oe.refreshButton?(h.openBlock(),h.createElementBlock("th",RTe,[oe.ajaxUrl?(h.openBlock(),h.createBlock(qi,{key:0,color:"infoSky",class:"float-right",icon:h.unref(rG),small:"",onClick:ue[5]||(ue[5]=Me=>E())},null,8,["icon"])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)])]),h.createVNode(h.Transition,{name:"fade"},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(Fq,{tag:"tbody",enabled:oe.sortable,multiple:oe.multiSortable,"handle-class":"handle",onOrderChanged:ee},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(B.value,(Me,J)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:oe.rowKeyMapper?oe.rowKeyMapper(Me):Me.id},[h.createElementVNode("tr",{class:h.normalizeClass(["lg:hover:bg-gray-100 odd:lg:bg-gray-50 h-[64px]",oe.selectableRows||oe.rowClickRoute||oe.rowClickCallback?"cursor-pointer":"",m.value.some(K=>K.id===Me.id)||g.value?tMe:"","group"]),"data-sortable-id":oe.sortable?Me.id:null,onClick:K=>S(Me)},[oe.sortable?(h.openBlock(),h.createElementBlock("td",LTe,[h.createVNode(uo,{path:h.unref(XJ)},null,8,["path"])])):h.createCommentVNode("",!0),oe.checkable?(h.openBlock(),h.createBlock(OO,{key:1,id:`checkbox_${Me.id}`,"is-checked":g.value||m.value.some(K=>K.id===Me.id),disabled:g.value,onChecked:K=>P(K,Me),onClick:ue[6]||(ue[6]=h.withModifiers(()=>{},["stop"]))},null,8,["id","is-checked","disabled","onChecked"])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(oe.columns.filter(K=>!K.hidden),K=>(h.openBlock(),h.createElementBlock("td",{key:K.field,"data-label":K.header},[h.unref(l).cell?h.renderSlot(oe.$slots,"cell",{key:0,row:Me,index:J,column:K}):h.renderSlot(oe.$slots,K.field,{key:1,row:Me,index:J,column:K},()=>[K.format?(h.openBlock(),h.createElementBlock("span",{key:0,class:"omz-table__value",title:K.format(Me)},h.toDisplayString(K.format(Me)),9,VTe)):K.render?(h.openBlock(),h.createElementBlock("span",FTe,h.toDisplayString(K.render(Me)),1)):K.component?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(K.component(Me)),{key:2})):K.link&&K.link(Me)?(h.openBlock(),h.createBlock(h.unref(a),{key:3,href:K.link(Me)??"",class:"hover:underline text-blue-600 hover:text-blue-800 truncate-200",onClick:ue[7]||(ue[7]=h.withModifiers(()=>{},["stop"]))},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(K.linkLabel&&K.linkLabel(Me)),1)]),_:2},1032,["href"])):Array.isArray(Me[K.field])&&K.key?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:4},h.renderList(Me[K.field],ye=>(h.openBlock(),h.createBlock(Wb,{key:ye.id,text:ye[K.key],type:"info",small:""},null,8,["text"]))),128)):Array.isArray(Me[K.field])&&Me[K.field].length===0?(h.openBlock(),h.createElementBlock("span",HTe)):(h.openBlock(),h.createElementBlock("span",{key:6,class:h.normalizeClass({"omz-table__value break-all":T.value>3}),title:Me[K.field]},h.toDisplayString(Me[K.field]),11,UTe))])],8,zTe))),128)),oe.$slots.actionsCell?(h.openBlock(),h.createElementBlock("td",qTe,[h.renderSlot(oe.$slots,"actionsCell",{row:Me,index:J})])):oe.refreshButton?(h.openBlock(),h.createElementBlock("td",WTe)):h.createCommentVNode("",!0)],10,ITe),oe.$slots.expandContent&&(oe.expanded||m.value.some(K=>K.id===Me.id))?(h.openBlock(),h.createElementBlock("tr",KTe,[h.createElementVNode("td",{colspan:T.value,class:"bg-blue-100"},[h.createElementVNode("div",null,[h.renderSlot(oe.$slots,"expandContent",{row:Me,index:J})])],8,YTe)])):h.createCommentVNode("",!0)],64))),128))]),_:3},8,["enabled","multiple"]),[[h.vShow,!b.value]])]),_:3})]),h.createVNode(h.Transition,{name:"fade"},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",JTe,GTe,512),[[h.vShow,b.value]])]),_:1}),D.value===0?(h.openBlock(),h.createElementBlock("div",QTe,h.toDisplayString(b.value?h.unref(s)("table.loading"):h.unref(s)("table.noData")),1)):h.createCommentVNode("",!0),(ke=r.options)!=null&&ke.pagination||(he=r.options)!=null&&he.frontendPagination?(h.openBlock(),h.createElementBlock("div",XTe,[h.createVNode(zh,null,{default:h.withCtx(()=>[h.createElementVNode("div",ZTe,[h.createElementVNode("small",null,h.toDisplayString(h.unref(s)("table.perPage")),1),h.withDirectives(h.createElementVNode("select",{id:"per_page_select","onUpdate:modelValue":ue[8]||(ue[8]=Me=>c.value=Me),class:"text-sm mx-1 px-3 py-1 focus:ring focus:outline-none border-gray-700 rounded w-20 dark:placeholder-gray-400 h-8 border bg-white dark:bg-gray-800",onChange:ue[9]||(ue[9]=Me=>Y())},eMe,544),[[h.vModelSelect,c.value]]),h.createElementVNode("small",null,h.toDisplayString(U.value),1)]),h.createVNode(Hb,{class:"justify-self-end"},{default:h.withCtx(()=>[h.createVNode(qi,{color:"white",icon:h.unref(eG),outline:oe.darkMode,small:"",disabled:f.value===0,onClick:ue[10]||(ue[10]=Me=>f.value=0)},null,8,["icon","outline","disabled"]),h.createVNode(qi,{color:"white",icon:h.unref(KJ),outline:oe.darkMode,small:"",disabled:f.value===0,onClick:ue[11]||(ue[11]=Me=>f.value--)},null,8,["icon","outline","disabled"]),h.createElementVNode("small",null,h.toDisplayString(z.value),1),h.createVNode(qi,{color:"white",icon:h.unref(YJ),outline:oe.darkMode,small:"",disabled:f.value+1===L.value,onClick:ue[12]||(ue[12]=Me=>f.value++)},null,8,["icon","outline","disabled"]),h.createVNode(qi,{color:"white",icon:h.unref(tG),outline:oe.darkMode,small:"",disabled:f.value+1===L.value,onClick:ue[13]||(ue[13]=Me=>f.value=L.value-1)},null,8,["icon","outline","disabled"])]),_:1})]),_:1})])):h.createCommentVNode("",!0)],16)],64)}}}),WMe="",rMe=["onClick"],oMe="inline-block py-2 px-4 text-red-600 rounded-t-lg border-b-2 border-red-600 active dark:text-red-500 dark:border-red-500",iMe="inline-block py-2 px-4 text-gray-400 rounded-t-lg !cursor-not-allowed dark:text-gray-500",aMe=h.defineComponent({__name:"OmzTabs",props:{defaultTab:{default:0},headerClasses:{default:null},vertical:{type:Boolean},noContent:{type:Boolean},tabs:{default:()=>[]}},setup(t){const e=t,n=h.useSlots(),r=h.inject(Rm),o=h.computed(()=>e.vertical?"block p-4 rounded-t-lg border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 w-full justify-center":"inline-block py-2 px-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"),i=h.computed(()=>e.vertical?"block p-4 text-black bg-slate-200 dark:bg-white/10 active dark:text-white dark:border-omniaz-dark w-full justify-center":"inline-block py-2 px-4 text-omniaz-dark rounded-t-lg border-b-2 border-omniaz-dark active dark:text-white dark:border-white"),a=h.reactive({selectedIndex:e.defaultTab,tabs:[],count:0,hasErrors:[]}),s=h.computed(()=>a.tabs.find(u=>(u==null?void 0:u.index)===a.selectedIndex)??a.tabs[a.selectedIndex]);h.provide("TabsProvider",a);const l=u=>{const c=a.tabs.find(d=>(d==null?void 0:d.index)===u)??a.tabs[u],f=(c==null?void 0:c.index)??u;c!=null&&c.disabled||a.selectedIndex!==f&&(c!=null&&c.url?r==null||r.visit(c.url):(c!=null&&c.onClick&&c.onClick(),a.selectedIndex=f))};return h.watchEffect(()=>{var u,c;if(n.default){const f=n.default();a.tabs=[],((c=(u=f[0])==null?void 0:u.type)==null?void 0:c.__name)!=="OmzTab"?a.tabs=f[0].children:f.forEach(d=>{d.props&&a.tabs.push({title:d.props.title,disabled:d.props.disabled,url:d.props.url,icon:d.props.icon,hasErrors:d.props["has-errors"],onClick:d.props["on-click"]})})}else e.tabs&&(a.tabs=e.tabs)}),h.onMounted(()=>{l(e.defaultTab)}),(u,c)=>{var f;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex",[u.vertical?"flex-col sm:flex-row":"flex-col"]])},[h.createElementVNode("div",{class:h.normalizeClass(["text-sm font-medium text-center text-gray-500 dark:text-gray-400 dark:border-gray-700 border-gray-200",[u.vertical?"":"border-b-2",u.headerClasses]])},[h.createElementVNode("ul",{class:h.normalizeClass(["-mb-[2px] sm:flex sm:flex-wrap sm:grid-cols-none",[u.vertical?"flex-col":"flex-row grid grid-cols-2"]])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.tabs,(d,p)=>(h.openBlock(),h.createElementBlock("li",{key:p,class:h.normalizeClass(["mr-2",[u.vertical?"border-r border-gray-100 dark:border-gray-700":""]])},[h.createElementVNode("a",{class:h.normalizeClass(["cursor-pointer inline-flex items-center h-11 justify-center w-full",(d!=null&&d.index?d.index===a.selectedIndex:p===a.selectedIndex)?i.value:d!=null&&d.disabled?iMe:a.hasErrors[p]?oMe:o.value]),onClick:v=>l((d==null?void 0:d.index)??p)},[d!=null&&d.icon?(h.openBlock(),h.createBlock(uo,{key:0,path:d==null?void 0:d.icon,size:"20",class:"mr-1"},null,8,["path"])):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(d==null?void 0:d.title),1)],10,rMe)],2))),128))],2)],2),!((f=s.value)!=null&&f.url)&&!u.noContent?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["rounded-lg",[u.vertical?"px-4 flex-grow":"py-4"]]),role:"tabpanel"},[h.renderSlot(u.$slots,"default")],2)):h.createCommentVNode("",!0)],2)}}}),sMe={install:(t,e)=>{t.provide(Rm,e.inertiaRouter),t.provide(Im,e.inertiaLinkComponent)}};$t.OmzAvatar=DJ,$t.OmzButton=qi,$t.OmzButtons=Hb,$t.OmzCard=qb,$t.OmzCardWidget=yG,$t.OmzCheckRadioPicker=EO,$t.OmzCheckboxCell=OO,$t.OmzCodeSnippet=EG,$t.OmzColorPicker=NG,$t.OmzControl=Lm,$t.OmzControlIcon=_O,$t.OmzDatepicker=Ste,$t.OmzDivider=z4,$t.OmzDropdown=V4,$t.OmzDropdownItem=Zm,$t.OmzField=F4,$t.OmzFileInput=fre,$t.OmzGrowingNumber=CO,$t.OmzIcon=uo,$t.OmzJsonEditor=A_e,$t.OmzLevel=zh,$t.OmzLoader=R_e,$t.OmzModal=O$,$t.OmzMultiselect=xh,$t.OmzNavBarItem=O5e,$t.OmzNestedSortable=fTe,$t.OmzNotification=pTe,$t.OmzOverlay=bq,$t.OmzPill=Wb,$t.OmzSortable=Fq,$t.OmzTab=gTe,$t.OmzTable=nMe,$t.OmzTableTopBar=Uq,$t.OmzTabs=aMe,$t.OmzTooltip=Gw,$t.OmzTrendPill=$O,$t.omniazComponentsPlugin=sMe,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})});
241
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(_){return p(_)||v(_)||c(_)||m()}var y=i("a352"),b=i.n(y),w=i("c649");function k(_,P,S){return S===void 0||(_=_||{},_[P]=S),_}function j(_,P){return _.map(function(S){return S.elm}).indexOf(P)}function x(_,P,S,F){if(!_)return[];var R=_.map(function(ae){return ae.elm}),Y=P.length-F,ee=g(P).map(function(ae,we){return we>=Y?R.length:R.indexOf(ae)});return S?ee.filter(function(ae){return ae!==-1}):ee}function I(_,P){var S=this;this.$nextTick(function(){return S.$emit(_.toLowerCase(),P)})}function M(_){var P=this;return function(S){P.realList!==null&&P["onDrag"+_](S),I.call(P,_,S)}}function T(_){return["transition-group","TransitionGroup"].includes(_)}function C(_){if(!_||_.length!==1)return!1;var P=d(_,1),S=P[0].componentOptions;return S?T(S.tag):!1}function O(_,P,S){return _[S]||(P[S]?P[S]():void 0)}function B(_,P,S){var F=0,R=0,Y=O(P,S,"header");Y&&(F=Y.length,_=_?[].concat(g(Y),g(_)):g(Y));var ee=O(P,S,"footer");return ee&&(R=ee.length,_=_?[].concat(g(_),g(ee)):g(ee)),{children:_,headerOffset:F,footerOffset:R}}function L(_,P){var S=null,F=function(Ee,Z){S=k(S,Ee,Z)},R=Object.keys(_).filter(function(we){return we==="id"||we.startsWith("data-")}).reduce(function(we,Ee){return we[Ee]=_[Ee],we},{});if(F("attrs",R),!P)return S;var Y=P.on,ee=P.props,ae=P.attrs;return F("on",Y),F("props",ee),Object.assign(S.attrs,ae),S}var D=["Start","Add","Remove","Update","End"],N=["Choose","Unchoose","Sort","Filter","Clone"],U=["Move"].concat(D,N).map(function(_){return"on"+_}),z=null,A={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(P){return P}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},E={name:"draggable",inheritAttrs:!1,props:A,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(P){var S=this.$slots.default;this.transitionMode=C(S);var F=B(S,this.$slots,this.$scopedSlots),R=F.children,Y=F.headerOffset,ee=F.footerOffset;this.headerOffset=Y,this.footerOffset=ee;var ae=L(this.$attrs,this.componentData);return P(this.getTag(),ae,R)},created:function(){this.list!==null&&this.value!==null&&w.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&w.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&w.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var P=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var S={};D.forEach(function(Y){S["on"+Y]=M.call(P,Y)}),N.forEach(function(Y){S["on"+Y]=I.bind(P,Y)});var F=Object.keys(this.$attrs).reduce(function(Y,ee){return Y[Object(w.a)(ee)]=P.$attrs[ee],Y},{}),R=Object.assign({},this.options,F,S,{onMove:function(ee,ae){return P.onDragMove(ee,ae)}});!("draggable"in R)&&(R.draggable=">*"),this._sortable=new b.a(this.rootContainer,R),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(P){this.updateOptions(P)},deep:!0},$attrs:{handler:function(P){this.updateOptions(P)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var P=this._vnode.fnOptions;return P&&P.functional},getTag:function(){return this.tag||this.element},updateOptions:function(P){for(var S in P){var F=Object(w.a)(S);U.indexOf(F)===-1&&this._sortable.option(F,P[S])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var P=this.$slots.default;return this.transitionMode?P[0].child.$slots.default:P},computeIndexes:function(){var P=this;this.$nextTick(function(){P.visibleIndexes=x(P.getChildrenNodes(),P.rootContainer.children,P.transitionMode,P.footerOffset)})},getUnderlyingVm:function(P){var S=j(this.getChildrenNodes()||[],P);if(S===-1)return null;var F=this.realList[S];return{index:S,element:F}},getUnderlyingPotencialDraggableComponent:function(P){var S=P.__vue__;return!S||!S.$options||!T(S.$options._componentTag)?!("realList"in S)&&S.$children.length===1&&"realList"in S.$children[0]?S.$children[0]:S:S.$parent},emitChanges:function(P){var S=this;this.$nextTick(function(){S.$emit("change",P)})},alterList:function(P){if(this.list){P(this.list);return}var S=g(this.value);P(S),this.$emit("input",S)},spliceList:function(){var P=arguments,S=function(R){return R.splice.apply(R,g(P))};this.alterList(S)},updatePosition:function(P,S){var F=function(Y){return Y.splice(S,0,Y.splice(P,1)[0])};this.alterList(F)},getRelatedContextFromMoveEvent:function(P){var S=P.to,F=P.related,R=this.getUnderlyingPotencialDraggableComponent(S);if(!R)return{component:R};var Y=R.realList,ee={list:Y,component:R};if(S!==F&&Y&&R.getUnderlyingVm){var ae=R.getUnderlyingVm(F);if(ae)return Object.assign(ae,ee)}return ee},getVmIndex:function(P){var S=this.visibleIndexes,F=S.length;return P>F-1?F:S[P]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(P){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var S=this.getChildrenNodes();S[P].data=null;var F=this.getComponent();F.children=[],F.kept=void 0}},onDragStart:function(P){this.context=this.getUnderlyingVm(P.item),P.item._underlying_vm_=this.clone(this.context.element),z=P.item},onDragAdd:function(P){var S=P.item._underlying_vm_;if(S!==void 0){Object(w.d)(P.item);var F=this.getVmIndex(P.newIndex);this.spliceList(F,0,S),this.computeIndexes();var R={element:S,newIndex:F};this.emitChanges({added:R})}},onDragRemove:function(P){if(Object(w.c)(this.rootContainer,P.item,P.oldIndex),P.pullMode==="clone"){Object(w.d)(P.clone);return}var S=this.context.index;this.spliceList(S,1);var F={element:this.context.element,oldIndex:S};this.resetTransitionData(S),this.emitChanges({removed:F})},onDragUpdate:function(P){Object(w.d)(P.item),Object(w.c)(P.from,P.item,P.oldIndex);var S=this.context.index,F=this.getVmIndex(P.newIndex);this.updatePosition(S,F);var R={element:this.context.element,oldIndex:S,newIndex:F};this.emitChanges({moved:R})},updateProperty:function(P,S){P.hasOwnProperty(S)&&(P[S]+=this.headerOffset)},computeFutureIndex:function(P,S){if(!P.element)return 0;var F=g(S.to.children).filter(function(ae){return ae.style.display!=="none"}),R=F.indexOf(S.related),Y=P.component.getVmIndex(R),ee=F.indexOf(z)!==-1;return ee||!S.willInsertAfter?Y:Y+1},onDragMove:function(P,S){var F=this.move;if(!F||!this.realList)return!0;var R=this.getRelatedContextFromMoveEvent(P),Y=this.context,ee=this.computeFutureIndex(R,P);Object.assign(Y,{futureIndex:ee});var ae=Object.assign({},P,{relatedContext:R,draggedContext:Y});return F(ae,S)},onDragEnd:function(){this.computeIndexes(),z=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",E);var $=E;o.default=$}}).default})})(wq);var sTe=wq.exports;const lTe=Mh(sTe),uTe={key:1,class:"text-xl"},cTe={class:"ml-6 block"},fTe=h.defineComponent({__name:"OmzNestedSortable",props:{items:{},itemsKey:{default:"items"},level:{default:0},maxNestingLevel:{default:4},subItemsLabel:{default:"Sub-items"},editableNames:{type:Boolean},disabled:{type:Boolean}},emits:["delete","delete-undo"],setup(t,{emit:e}){return(n,r)=>{const o=h.resolveComponent("omz-nested-sortable",!0);return h.openBlock(),h.createBlock(h.unref(lTe),{class:"min-h-[40px] mx-6 px-2 mb-2",tag:"ul",list:n.items,group:{name:"main"},"item-key":"name",animation:150,handle:".omz-nested-sortable__handle","ghost-class":"bg-blue-100",filter:".static",disabled:n.disabled},{item:h.withCtx(({element:i})=>[h.createElementVNode("div",{class:h.normalizeClass(["border border-gray-400 bg-gray-100 dark:bg-gray-800 mb-2 first:rounded-t last:rounded-b",{"static bg-red-200":i.deleted}])},[h.createElementVNode("span",{class:h.normalizeClass(["omz-nested-sortable__handle cursor-move",{"cursor-not-allowed":i.deleted}])},[h.createVNode(uo,{path:h.unref(HJ),size:"20"},null,8,["path"])],2),n.editableNames?(h.openBlock(),h.createBlock(Lm,{key:0,"model-value":i.name,type:"text",class:"inline-block","input-classes":"border-none bg-gray-100",small:"",disabled:i.deleted,onChange:a=>i.name=a.target.value},null,8,["model-value","disabled","onChange"])):(h.openBlock(),h.createElementBlock("strong",uTe,h.toDisplayString(i.name),1)),i.deleted?(h.openBlock(),h.createBlock(uo,{key:3,path:h.unref(oG),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete-undo",i)},null,8,["path","onClick"])):(h.openBlock(),h.createBlock(uo,{key:2,path:h.unref(Ub),class:"float-right m-2 text-red-500 hover:cursor-pointer",size:"20",onClick:a=>e("delete",i)},null,8,["path","onClick"])),n.level<n.maxNestingLevel?(h.openBlock(),h.createElementBlock(h.Fragment,{key:4},[h.createElementVNode("small",cTe,h.toDisplayString(n.subItemsLabel)+": ",1),h.createVNode(o,{items:i[n.itemsKey],"items-key":n.itemsKey,level:n.level+1,"sub-items-label":n.subItemsLabel,class:"bg-gray-200 dark:bg-gray-600 py-2","editable-names":n.editableNames,disabled:i.deleted,filter:".static",onDelete:r[0]||(r[0]=a=>e("delete",a))},null,8,["items","items-key","level","sub-items-label","editable-names","disabled"])],64)):h.createCommentVNode("",!0)],2)]),_:1},8,["list","disabled"])}}}),dTe={class:"flex flex-col md:flex-row items-center"},hTe={class:"text-center md:text-left"},pTe=h.defineComponent({__name:"OmzNotification",props:{color:{},icon:{default:null},outline:{type:Boolean},allowClosing:{type:Boolean,default:!0},darkMode:{type:Boolean},permanentDismissKey:{default:null}},setup(t){const e=t,n=h.computed(()=>e.outline?wO[e.color]:[Fb[e.color],ts[e.color]]),r=h.ref(!1);e.permanentDismissKey&&localStorage.getItem(e.permanentDismissKey)==="true"&&(r.value=!0);const o=()=>{r.value=!0,e.permanentDismissKey&&localStorage.setItem(e.permanentDismissKey,"true")},i=h.useSlots(),a=h.computed(()=>i.right);return(s,l)=>r.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass([n.value,"px-3 py-6 md:py-3 mb-6 last:mb-0 border rounded transition-colors duration-150"])},[h.createVNode(zh,{mb:"mb-0"},{default:h.withCtx(()=>[h.createElementVNode("div",dTe,[s.icon?(h.openBlock(),h.createBlock(uo,{key:0,path:s.icon,w:"w-10 md:w-5",h:"h-10 md:h-5",size:"24",class:"md:mr-2"},null,8,["path"])):h.createCommentVNode("",!0),h.createElementVNode("span",hTe,[h.renderSlot(s.$slots,"default")])]),a.value?h.renderSlot(s.$slots,"right",{key:0}):s.allowClosing?(h.openBlock(),h.createBlock(qi,{key:1,icon:h.unref(qf),outline:s.outline||s.darkMode&&["white","light"].indexOf(s.color)<0,small:"",onClick:o},null,8,["icon","outline"])):h.createCommentVNode("",!0)]),_:3})],2))}}),Fq=h.defineComponent({__name:"OmzSortable",props:{tag:{default:"div"},enabled:{type:Boolean,default:!0},handleClass:{default:null},multiple:{type:Boolean}},emits:["orderChanged"],setup(t,{emit:e}){const n=t,r=h.ref(null),o=h.ref(null),i=h.ref(null),a=h.ref(null),s=h.ref([]);let l=!0,u=!0;function c(d,p){const v=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft;window.scrollTo(m+d,v+p),(!u||!l)&&setTimeout(()=>c(d,p),200)}function f(){if(r.value)for(let d=0;d<r.value.children.length;d+=1){const p=r.value.children[d];n.handleClass&&(p.onmousedown=v=>{i.value=v.target,a.value=p==null?void 0:p.querySelector(`.${n.handleClass}`)}),p.draggable=!0,p.ondragstart=v=>{var m;if(r.value&&(!n.handleClass||(m=a.value)!=null&&m.contains(i.value))){o.value=p;for(let g=0;g<r.value.children.length;g+=1){const y=r.value.children[g];y!==r.value&&y.classList.add("hint")}}else v.preventDefault()},p.ondragenter=()=>{p!==o.value&&p.classList.add("active")},p.ondrag=v=>{u=!0,v.clientY<150&&(u=!1,c(0,-1))},p.ondragleave=()=>{p.classList.remove("active")},p.ondragend=()=>{if(r.value)for(const v of Array.from(r.value.children))v.classList.remove("hint"),v.classList.remove("active");u=!0,l=!0},p.ondragover=v=>{v.preventDefault()},p.onclick=v=>{if(v.preventDefault(),n.multiple&&v.shiftKey)if(s.value.includes(p)){const m=s.value.findIndex(g=>g.getAttribute("data-sortable-id")===p.getAttribute("data-sortable-id"));s.value.splice(m,1),p.classList.remove("!bg-blue-300")}else s.value.push(p),p.classList.add("!bg-blue-300")},p.ondrop=v=>{var m,g;if(r.value){if(v.preventDefault(),p!==o.value){let b=0,w=0;for(let k=0;k<r.value.children.length;k+=1)o.value===r.value.children[k]&&(b=k),p===r.value.children[k]&&(w=k);b<w?((m=p.parentNode)==null||m.insertBefore(o.value,p.nextSibling),s.value.length&&(s.value.forEach(k=>{var j;(j=p.parentNode)==null||j.insertBefore(k,p.nextSibling),k.classList.remove("!bg-blue-300")}),s.value=[])):((g=p.parentNode)==null||g.insertBefore(o.value,p),s.value.length&&(s.value.forEach(k=>{var j;(j=p.parentNode)==null||j.insertBefore(k,p),k.classList.remove("!bg-blue-300")}),s.value=[]))}const y=[];for(const b of Array.from(r.value.children))y.push(b.getAttribute("data-sortable-id"));e("orderChanged",y)}}}}return h.onMounted(()=>{if(n.enabled){f();const d=new ResizeObserver(()=>{f()});r.value&&d.observe(r.value)}}),(d,p)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(d.tag),{ref_key:"sortableParent",ref:r},{default:h.withCtx(()=>[h.renderSlot(d.$slots,"default")]),_:3},512))}}),vTe={key:0},mTe={key:1},gTe=h.defineComponent({__name:"OmzTab",props:{title:{},url:{default:null},icon:{default:null},onClick:{type:[Function,null],default:null},disabled:{type:Boolean},hasErrors:{type:Boolean},reloading:{type:Boolean}},setup(t){const e=t,n=h.ref(0),r=h.ref(!1),o=h.inject("TabsProvider");return h.watch(()=>o.selectedIndex,()=>{r.value=n.value===o.selectedIndex}),h.watch(()=>e.hasErrors,()=>{o.hasErrors[n.value]=e.hasErrors}),h.onBeforeMount(()=>{n.value=o.count,o.count++,r.value=n.value===o.selectedIndex}),(i,a)=>i.reloading?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[r.value?(h.openBlock(),h.createElementBlock("div",vTe,[h.renderSlot(i.$slots,"default")])):h.createCommentVNode("",!0)],64)):h.withDirectives((h.openBlock(),h.createElementBlock("div",mTe,[h.renderSlot(i.$slots,"default")],512)),[[h.vShow,r.value]])}}),yTe=h.defineComponent({__name:"OmzExportModal",props:h.mergeModels({title:{},exportUrl:{},locale:{},formats:{default:()=>[]},filesCheckbox:{type:Boolean},dataIds:{default:null},dataFilters:{default:()=>({})}},{modelValue:{type:Boolean}}),emits:h.mergeModels(["exportStarted","exportSuccess"],["update:modelValue"]),setup(t,{emit:e}){const n=t,{trans:r}=od(n.locale),o=h.useModel(t,"modelValue"),i=h.ref(!1),a=EJ({ids:null,filters:{},format:null,with_files:!1}),s=h.computed(()=>n.formats.map(c=>({label:c,value:c}))),l=h.computed(()=>{var c;if(n.exportUrl){const f=new URL(n.exportUrl);return(c=n.dataIds)!=null&&c.length&&n.dataIds.forEach((d,p)=>f.searchParams.append(`ids[${p}]`,String(d))),Object.keys(n.dataFilters).forEach(d=>{f.searchParams.append(d,n.dataFilters[d])}),f.toString()}return null}),u=()=>{var c;i.value=!0,a.ids=(c=n.dataIds)!=null&&c.length?n.dataIds:null,a.filters=n.dataFilters,a.with_files?a.post(n.exportUrl,{onSuccess:()=>{o.value=!1,a.format=null,a.with_files=!1,e("exportStarted")},onFinish:()=>{i.value=!1}}):l.value?(window.location.href=l.value,e("exportSuccess"),o.value=!1,a.format=null,a.with_files=!1,i.value=!1):console.warn("No export url specified.")};return h.watch(()=>o,()=>{o&&n.formats.length===1&&([a.format]=n.formats)}),(c,f)=>(h.openBlock(),h.createBlock(h.Teleport,{to:"body"},[h.createVNode(O$,{"model-value":o.value,"button-label":h.unref(r)("exportModal.export"),"large-title":c.title,loading:i.value,locale:c.locale,"has-cancel":"",onConfirm:f[2]||(f[2]=d=>u()),onCancel:f[3]||(f[3]=d=>o.value=!1)},{default:h.withCtx(()=>[c.formats.length?(h.openBlock(),h.createBlock(F4,{key:0,label:h.unref(r)("exportModal.format"),required:""},{default:h.withCtx(()=>[h.createVNode(xh,{modelValue:h.unref(a).format,"onUpdate:modelValue":f[0]||(f[0]=d=>h.unref(a).format=d),options:s.value,disabled:c.formats.length===1,locale:c.locale},null,8,["modelValue","options","disabled","locale"])]),_:1},8,["label"])):h.createCommentVNode("",!0),c.filesCheckbox?(h.openBlock(),h.createBlock(EO,{key:1,modelValue:h.unref(a).with_files,"onUpdate:modelValue":f[1]||(f[1]=d=>h.unref(a).with_files=d),label:h.unref(r)("exportModal.withFiles"),name:"with_files",help:h.unref(r)("exportModal.withFilesHelp")},null,8,["modelValue","label","help"])):h.createCommentVNode("",!0)]),_:1},8,["model-value","button-label","large-title","loading","locale"])]))}});function Hq(){const t=(n,r,...o)=>{let i=n;for(let a=0;a<o.length;a++)a===o.length-1?i[o[a]]=r:(i[o[a]]||(i[o[a]]={}),i=i[o[a]])};function e(n,r=[],o=!1){const i={};return Object.keys(n).forEach(a=>{var l,u,c,f,d,p;const s=r.find(v=>v.filtering&&v.field===a);n[a]!==void 0&&(s&&((l=s.filtering)!=null&&l.relation)?(o?t(i,s.filtering.field,"filters",a,"field"):i[`filters[${a}][field]`]=s.filtering.field,Array.isArray(n[a])?n[a].forEach((v,m)=>{o?t(i,v,"filters",a,"value",m.toString()):i[`filters[${a}][value][${m}]`]=v}):o?t(i,n[a],"filters",a,"value"):i[`filters[${a}][value]`]=n[a],o?t(i,s.filtering.relation,"filters",a,"relation"):i[`filters[${a}][relation]`]=s.filtering.relation):(u=s==null?void 0:s.filtering)!=null&&u.type?o?(t(i,s.filtering.field||a,"filters",a,"field"),t(i,n[a],"filters",a,"value"),t(i,s.filtering.type,"filters",a,"type"),(c=s.filtering)!=null&&c.operator&&t(i,s.filtering.operator,"filters",a,"operator")):(i[`filters[${a}][field]`]=s.filtering.field||a,i[`filters[${a}][value]`]=n[a].value??n[a],i[`filters[${a}][type]`]=s.filtering.type,(f=s.filtering)!=null&&f.operator&&(i[`filters[${a}][operator]`]=s.filtering.operator)):o?t(i,n[a],"filters",((d=s==null?void 0:s.filtering)==null?void 0:d.field)||a):i[`filters[${((p=s==null?void 0:s.filtering)==null?void 0:p.field)||a}]`]=n[a])}),i}return{formatFiltersForBackend:e}}const bTe=["innerHTML"],wTe={class:"flex flex-wrap md:flex-nowrap items-stretch border-b border-gray-100 dark:border-gray-700 justify-between"},kTe={class:"bg-opacity-50 p-4 whitespace-nowrap"},xTe={key:0,class:"flex"},jTe={class:"flex items-center whitespace-nowrap"},STe={class:"flex gap-2 flex-wrap p-4"},CTe={key:0,class:"flex flex-col justify-end"},$Te={class:"relative"},OTe=["placeholder"],ETe={key:0,class:"text-sm font-bold"},_Te={key:5,class:"relative"},TTe=["id","onUpdate:modelValue","type","placeholder"],Uq=h.defineComponent({__name:"OmzTableTopBar",props:{columns:{},locale:{default:"en"},massDelete:{type:Boolean,default:!0},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},checkedRows:{default:()=>[]},checkedAll:{type:Boolean},total:{default:0},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},searchable:{type:Boolean},initialSearchValue:{default:null}},emits:["filtersChange","searchChange","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,o=h.inject(Rm),{formatFiltersForBackend:i}=Hq(),{trans:a}=od(r.locale),s=h.ref(r.initialFilters??{}),l=h.ref(r.initialSearchValue),u=h.ref(!1),c=h.ref(!1),f=h.computed(()=>Object.values(s.value).some(M=>typeof M=="object"?Object.keys(M).length:!!M)||l.value),d=h.computed(()=>r.checkedAll?`${r.total} (${f.value?a("table.filtered"):a("table.all")})`:String(r.checkedRows.length)),p=h.computed(()=>{var M;if(r.exportUrl){const T=i(s.value,r.columns),C=new URL(r.exportUrl);return!r.checkedAll&&((M=r.checkedRows)!=null&&M.length)&&r.checkedRows.forEach((O,B)=>C.searchParams.append(`ids[${B}]`,String(O.id))),Object.keys(T).forEach(O=>{C.searchParams.append(O,T[O])}),C.toString()}return null}),v=h.computed(()=>i({...s.value,...r.initialFilters},r.columns,!0)),m=h.computed(()=>{var M;return r.checkedAll?null:(M=r.checkedRows)==null?void 0:M.map(T=>T.id)}),g=()=>{n("searchChange",l.value)},y=()=>{l.value=null,g()},b=()=>{Object.keys(s.value).forEach(M=>{s.value[M]===null&&(s.value[M]="")}),n("filtersChange",s.value)},w=M=>{s.value[M]="",b()},k=()=>{s.value={},l.value=null,b(),g()},j=M=>{var T,C;return typeof((T=M.filtering)==null?void 0:T.options)=="function"?r.initialFilters[M.field]?async O=>M.filtering.options(O,r.initialFilters[M.field]):async O=>M.filtering.options(O):(C=M==null?void 0:M.filtering)==null?void 0:C.options},x=M=>{var T,C;return typeof((T=M.filtering)==null?void 0:T.tags)=="function"?r.initialFilters[M.field]?async O=>M.filtering.tags(O,r.initialFilters[M.field]):async O=>M.filtering.tags(O):(C=M==null?void 0:M.filtering)==null?void 0:C.tags},I=async()=>{var M,T;if(r.deleteUrl){const C=i(s.value,r.columns,!0);let O;r.checkedAll?O=null:r.deleteKeyMapper?O=(M=r.checkedRows)==null?void 0:M.map(r.deleteKeyMapper):O=(T=r.checkedRows)==null?void 0:T.map(B=>B.id),o==null||o.post(r.deleteUrl,{ids:O,...C},{preserveState:!1,onSuccess:()=>{n("massDeleteSuccess")},onError:()=>{n("massDeleteError")}})}};return e({clearFilters:k}),(M,T)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[M.massDelete?(h.openBlock(),h.createBlock(O$,{key:0,"model-value":u.value,"button-label":h.unref(a)("table.massDeleteButton"),"large-title":h.unref(a)("table.massDeleteTitle"),locale:M.locale,"button-color":"danger","has-cancel":"",onConfirm:T[0]||(T[0]=C=>I()),onCancel:T[1]||(T[1]=C=>u.value=!1)},{default:h.withCtx(()=>[h.createElementVNode("p",{innerHTML:h.unref(a)("table.massDeleteMessage",{selectedRowsText:d.value})},null,8,bTe)]),_:1},8,["model-value","button-label","large-title","locale"])):h.createCommentVNode("",!0),M.exportUrl?(h.openBlock(),h.createBlock(yTe,{key:1,modelValue:c.value,"onUpdate:modelValue":T[2]||(T[2]=C=>c.value=C),locale:M.locale,title:M.exportLabel||h.unref(a)("exportModal.export"),formats:M.exportFormats,"export-url":M.exportUrl,"data-ids":m.value,"data-filters":v.value.filters,"files-checkbox":M.exportFilesOption,onExportStarted:T[3]||(T[3]=C=>n("exportStarted")),onExportSuccess:T[4]||(T[4]=C=>n("exportSuccess"))},null,8,["modelValue","locale","title","formats","export-url","data-ids","data-filters","files-checkbox"])):h.createCommentVNode("",!0),h.createElementVNode("div",wTe,[h.createElementVNode("div",kTe,[M.checkedRows.length||M.checkedAll?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[M.hideCheckedRowsCount?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode(h.toDisplayString(h.unref(a)("table.selectedRows"))+" ",1),h.createElementVNode("b",null,h.toDisplayString(d.value),1)],64)),M.$slots.massActions||M.massDelete?(h.openBlock(),h.createBlock(V4,{key:1},{content:h.withCtx(({toggle:C})=>[h.createVNode(qi,{class:"ml-2",color:"omniazDarkBlue",icon:h.unref(xO),small:"",onClick:C},null,8,["icon","onClick"])]),dropdown:h.withCtx(()=>{var C;return[h.renderSlot(M.$slots,"massActions"),p.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[M.exportFilesOption||(C=M.exportFormats)!=null&&C.length?(h.openBlock(),h.createBlock(Zm,{key:0,icon:h.unref(jO),onClick:T[5]||(T[5]=O=>c.value=!0)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(M.exportLabel||h.unref(a)("table.export")),1)]),_:1},8,["icon"])):(h.openBlock(),h.createBlock(Zm,{key:1,href:p.value,icon:h.unref(jO)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(M.exportLabel||h.unref(a)("table.export")),1)]),_:1},8,["href","icon"]))],64)):h.createCommentVNode("",!0),M.massDelete?(h.openBlock(),h.createBlock(Zm,{key:1,icon:h.unref(Ub),onClick:T[6]||(T[6]=O=>u.value=!0)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(a)("table.massDeleteButton")),1)]),_:1},8,["icon"])):h.createCommentVNode("",!0)]}),_:3})):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)]),M.columns.some(C=>C.filtering)||M.searchable?(h.openBlock(),h.createElementBlock("div",xTe,[h.createElementVNode("div",jTe,h.toDisplayString(h.unref(a)("table.filterBy")),1),h.createElementVNode("div",STe,[M.searchable?(h.openBlock(),h.createElementBlock("div",CTe,[h.createElementVNode("span",$Te,[h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":T[7]||(T[7]=C=>l.value=C),class:"omz-input--small",placeholder:h.unref(a)("table.search"),onInput:T[8]||(T[8]=C=>g())},null,40,OTe),[[h.vModelText,l.value]]),h.withDirectives(h.createVNode(uo,{class:"absolute top-1.5 cursor-pointer right-1",path:h.unref(qf),size:"20",onClick:T[9]||(T[9]=C=>y())},null,8,["path"]),[[h.vShow,l.value]])])])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(M.columns.filter(C=>{var O;return(O=C.filtering)==null?void 0:O.enabled}),C=>{var O,B,L,D,N,U,z,A,E,$;return h.openBlock(),h.createElementBlock("div",{key:C.header,class:"flex flex-col justify-end"},[(O=C==null?void 0:C.filtering)!=null&&O.label?(h.openBlock(),h.createElementBlock("div",ETe,h.toDisplayString(C.filtering.label),1)):h.createCommentVNode("",!0),(B=C==null?void 0:C.filtering)!=null&&B.options&&typeof C.filtering.options=="function"?(h.openBlock(),h.createBlock(xh,{key:1,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:j(C),placeholder:C.filtering.label?void 0:C.header,mode:C.filtering.multiple?"multiple":"single","min-chars":3,"resolve-on-load":!!M.initialFilters[C.field]&&!(typeof M.initialFilters[C.field]=="object"&&!Object.keys(M.initialFilters[C.field]).length),delay:0,searchable:"",class:h.normalizeClass(["px-0 max-w-[400px]",[C.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:T[10]||(T[10]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","resolve-on-load","class"])):(L=C==null?void 0:C.filtering)!=null&&L.options?(h.openBlock(),h.createBlock(xh,{key:2,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:(D=C==null?void 0:C.filtering)==null?void 0:D.options,placeholder:C.filtering.label?void 0:C.header,mode:C.filtering.multiple?"multiple":"single",searchable:"",class:h.normalizeClass(["px-0 max-w-[400px]",[C.filtering.multiple?"min-w-[250px]":"min-w-[150px]"]]),small:"",onChange:T[11]||(T[11]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","mode","class"])):(N=C==null?void 0:C.filtering)!=null&&N.tags&&typeof C.filtering.tags=="function"?(h.openBlock(),h.createBlock(xh,{key:3,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:x(C),placeholder:C.filtering.label?void 0:C.header,mode:"tags","min-chars":3,"resolve-on-load":!!M.initialFilters[C.field]&&!(typeof M.initialFilters[C.field]=="object"&&!Object.keys(M.initialFilters[C.field]).length),delay:0,searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:T[12]||(T[12]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder","resolve-on-load"])):(U=C==null?void 0:C.filtering)!=null&&U.tags?(h.openBlock(),h.createBlock(xh,{key:4,id:`${C.field}_filter`,modelValue:s.value[C.field],"onUpdate:modelValue":_=>s.value[C.field]=_,options:(z=C==null?void 0:C.filtering)==null?void 0:z.tags,placeholder:C.filtering.label?void 0:C.header,mode:"tags",searchable:"",small:"",class:"px-0 min-w-[150px] max-w-[400px]",onChange:T[13]||(T[13]=_=>b())},null,8,["id","modelValue","onUpdate:modelValue","options","placeholder"])):(h.openBlock(),h.createElementBlock("span",_Te,[h.withDirectives(h.createElementVNode("input",{id:`${C.field}_filter`,"onUpdate:modelValue":_=>s.value[C.field]=_,type:((A=C.filtering)==null?void 0:A.type)||"text",class:"omz-input--small",placeholder:(E=C.filtering)!=null&&E.label?void 0:C.header,onInput:T[14]||(T[14]=_=>b())},null,40,TTe),[[h.vModelDynamic,s.value[C.field]]]),h.withDirectives(h.createVNode(uo,{class:h.normalizeClass(["absolute top-1.5 cursor-pointer",[(($=C.filtering)==null?void 0:$.type)==="date"?"right-7":"right-1"]]),path:h.unref(qf),size:"20",onClick:_=>w(C.field)},null,8,["class","path","onClick"]),[[h.vShow,s.value[C.field]]])]))])}),128)),f.value?(h.openBlock(),h.createBlock(qi,{key:1,color:"warning",label:h.unref(a)("table.clearFilters"),small:"",onClick:T[15]||(T[15]=C=>k())},null,8,["label"])):h.createCommentVNode("",!0)]),h.renderSlot(M.$slots,"default")])):h.createCommentVNode("",!0)])],64))}}),MTe={class:"bg-white dark:bg-gray-900"},ATe={key:0},PTe={key:1},DTe=["disabled"],NTe=h.createElementVNode("span",{class:"check"},null,-1),BTe=["onClick"],RTe={key:2},ITe=["data-sortable-id","onClick"],LTe={key:0,class:"cursor-move handle text-center"},zTe=["data-label"],VTe=["title"],FTe={key:1},HTe={key:5},UTe=["title"],qTe={key:2,class:"actions-cell"},WTe={key:3},KTe={key:0},YTe=["colspan"],JTe={class:"omz-table__overlay"},GTe=[h.createElementVNode("div",{class:"omz-table__loader"},[h.createElementVNode("div"),h.createElementVNode("div"),h.createElementVNode("div")],-1)],QTe={key:0,class:"p-4 text-center"},XTe={key:1,class:"p-3 lg:px-6 border-t dark:border-gray-800 border-gray-100"},ZTe={class:"justify-self-start"},eMe=[h.createElementVNode("option",{value:"10"}," 10 ",-1),h.createElementVNode("option",{value:"20"}," 20 ",-1),h.createElementVNode("option",{value:"50"}," 50 ",-1),h.createElementVNode("option",{value:"100"}," 100 ",-1)],tMe="lg:!bg-blue-100 lg:hover:!bg-blue-200 dark:lg:!bg-blue-800 dark:lg:hover:!bg-blue-700",nMe=h.defineComponent({__name:"OmzTable",props:{locale:{default:"en"},darkMode:{type:Boolean},checkable:{type:Boolean},data:{default:()=>[]},ajaxUrl:{default:null},ajaxParams:{default:()=>({})},deleteUrl:{default:null},deleteKeyMapper:{type:[Function,null],default:null},exportUrl:{default:null},exportLabel:{default:null},exportFilesOption:{type:Boolean},exportFormats:{default:()=>[]},columns:{},options:{default:()=>({pagination:!0,frontendPagination:!1})},refreshButton:{type:Boolean,default:!0},selectableRows:{type:Boolean},maxSelectedRows:{default:null},selectAllButton:{type:Boolean},massDelete:{type:Boolean,default:!0},shouldClearState:{type:Boolean},scrollable:{type:Boolean},sortable:{type:Boolean},multiSortable:{type:Boolean},rowClickCallback:{type:[Function,null],default:null},rowClickRoute:{type:[Function,null],default:null},rowClickTarget:{default:"self"},initialFilters:{default:()=>({})},hideCheckedRowsCount:{type:Boolean},overflowVisible:{type:Boolean},saveState:{default:null},expanded:{type:Boolean},disableCheckAll:{type:Boolean},searchable:{type:Boolean},rowKeyMapper:{type:[Function,null],default:null}},emits:["rowsSelected","orderChanged","filtersChanged","ajaxError","massDeleteSuccess","massDeleteError","exportStarted","exportSuccess"],setup(t,{expose:e,emit:n}){const r=t,{formatFiltersForBackend:o}=Hq(),i=h.inject(Rm),a=h.inject(Im)??Vb,{trans:s}=od(r.locale),l=h.useSlots(),u=parseInt(localStorage.getItem(`${r.ajaxUrl}_perPage`)||"10",10),c=h.ref(u),f=h.ref(0),d=h.ref(null),p=h.ref(null),v=h.ref("desc"),m=h.ref([]),g=h.ref(!1),y=h.ref(null),b=h.ref(!1);let w=null;const k=h.ref(r.initialFilters?{...r.initialFilters}:{}),j=h.ref(null),x=h.ref(null),I=h.ref(null),M=h.computed(()=>o({...k.value,...r.initialFilters},r.columns??[])),T=h.computed(()=>{let oe=(r.columns??[]).filter(ue=>!ue.hidden).length;return r.refreshButton&&(oe+=1),r.checkable&&(oe+=1),oe}),C=h.computed(()=>Object.values(k.value).some(oe=>!!oe)),O=h.computed(()=>{var oe,ue;return(oe=r.data)!=null&&oe.length?r.data:((ue=y.value)==null?void 0:ue.data)??y.value??[]}),B=h.computed(()=>{var ue,ke;let oe=O.value;return C.value&&((ue=r.data)!=null&&ue.length)&&Object.entries(k.value).forEach(([he,Me])=>{oe=oe.filter(J=>{var K,ye;if(typeof J[he]=="string")return J[he].toLowerCase().includes(Me.toLowerCase());if(typeof J[he]=="object"&&!Array.isArray(J[he])){const Ae=r.columns.find(De=>De.field===he);return(K=Ae==null?void 0:Ae.filtering)!=null&&K.field?J[he][(ye=Ae==null?void 0:Ae.filtering)==null?void 0:ye.field].toLowerCase().includes(Me.toLowerCase()):(console.warn(`There is no filtering configuration for key ${he}.`),!1)}return J[he].includes(Me)})}),(ke=r.options)!=null&&ke.frontendPagination&&(oe=O.value.slice(c.value*f.value,c.value*(f.value+1))),!r.ajaxUrl&&d.value&&oe.sort((he,Me)=>he[String(d.value)]<Me[String(d.value)]?v.value==="asc"?-1:1:he[String(d.value)]>Me[String(d.value)]?v.value==="asc"?1:-1:0),oe}),L=h.computed(()=>{var oe,ue;return r.ajaxUrl&&y.value?(oe=r.options)!=null&&oe.frontendPagination?Math.ceil(O.value.length/c.value):y.value.last_page??y.value.meta.last_page:(ue=r.data)!=null&&ue.length?Math.ceil(r.data.length/c.value):0}),D=h.computed(()=>{var oe,ue,ke;return r.ajaxUrl&&y.value&&((oe=r.options)==null?void 0:oe.pagination)!==!1?y.value.total??((ue=y.value.meta)==null?void 0:ue.total)??y.value.length:(ke=r.data)!=null&&ke.length?r.data.length:B.value.length}),N=h.computed(()=>f.value+1),U=h.computed(()=>s("table.displaying",{from:f.value*c.value+1,to:Math.min((f.value+1)*c.value,D.value),total:D.value})),z=h.computed(()=>s("table.showPage",{current:N.value,total:L.value})),A=async()=>{var ke,he,Me;const oe=new URLSearchParams({page:String(f.value+1),orderByScope:p.value??"",orderBy:d.value||"created_at",perPage:(ke=r.options)!=null&&ke.pagination&&!((he=r.options)!=null&&he.frontendPagination)?String(c.value):"999999",orderDir:v.value,search:j.value??"",...M.value,...r.ajaxParams});b.value=!0;let ue;w&&w.abort();try{w=new AbortController;const J=await Cm.get(`${r.ajaxUrl}?${oe}`,{signal:w.signal});w=null,ue=J.data,b.value=!1}catch(J){!(J instanceof E3)&&J instanceof oK&&((Me=J.response)==null?void 0:Me.status)!==401&&n("ajaxError"),ue={data:[],meta:{current_page:0,first_page_url:"",from:0,last_page:0,last_page_url:"",next_page_url:"",path:"",per_page:0,prev_page_url:null,to:0,total:0}},J instanceof E3||(b.value=!1,w=null)}return ue},E=async()=>{r.ajaxUrl&&(y.value=await A())},$=()=>{if(r.saveState){const oe={filters:k.value,page:f.value,search:j.value};sessionStorage.setItem(r.saveState,JSON.stringify(oe))}};if(r.saveState){const oe=sessionStorage.getItem(r.saveState);oe&&(I.value=JSON.parse(oe),k.value=I.value.filters,f.value=I.value.page,j.value=I.value.search??null)}E(),h.watch(()=>r.shouldClearState,(oe,ue)=>{var ke;oe!==ue&&oe&&(m.value=[],g.value=!1,k.value={},p.value=null,d.value=null,v.value="desc",(ke=x.value)==null||ke.clearFilters(),r.ajaxUrl&&E())}),h.watch(()=>r.ajaxUrl,async()=>{await E()}),h.watch(f,async()=>{var oe;(oe=r.options)!=null&&oe.frontendPagination||await E(),$()});const _=(oe,ue)=>{const ke=[];return oe.forEach(he=>{ue(he)||ke.push(he)}),ke},P=(oe,ue)=>{var ke;g.value?n("rowsSelected",(ke=r.options)!=null&&ke.frontendPagination?O.value:null):(oe?m.value.includes(ue)||m.value.push(ue):m.value=_(m.value,he=>he.id===ue.id),n("rowsSelected",m.value))},S=oe=>{if(r.selectableRows){const ue=m.value.findIndex(ke=>ke.id===oe.id);ue!==-1?m.value.splice(ue,1):r.maxSelectedRows?r.maxSelectedRows===1?m.value=[oe]:m.value.length<r.maxSelectedRows&&m.value.push(oe):m.value.push(oe),n("rowsSelected",m.value)}else if(r.rowClickRoute){const ue=r.rowClickRoute(oe);ue&&(r.rowClickTarget==="blank"?window.open(ue,"_blank"):i==null||i.visit(ue))}r.rowClickCallback&&r.rowClickCallback(oe)},F=qne(()=>{r.ajaxUrl&&(f.value=0,E())},500),R=oe=>{var ue;oe.ordering&&(d.value=oe.field,p.value=oe.orderByScope??null,v.value=v.value==="asc"?"desc":"asc",r.ajaxUrl&&!((ue=r.options)!=null&&ue.frontendPagination)&&E()),oe.orderingCallBack&&oe.orderingCallBack()},Y=()=>{var oe;localStorage.setItem(`${r.ajaxUrl}_perPage`,String(c.value)),(oe=r.options)!=null&&oe.frontendPagination||E()},ee=oe=>{n("orderChanged",oe)},ae=oe=>{k.value=oe,F(),$(),n("filtersChanged",k.value)},we=oe=>{j.value=oe,F(),$()},Ee=()=>k.value,Z=()=>g.value?null:m.value;return h.watch(g,oe=>{oe||(m.value=[])}),e({reloadAjax:E,getFilters:Ee,getCheckedRows:Z}),(oe,ue)=>{var ke,he;return h.openBlock(),h.createElementBlock(h.Fragment,null,[oe.columns.some(Me=>Me.filtering)||oe.massDelete&&oe.deleteUrl?(h.openBlock(),h.createBlock(Uq,{key:0,ref_key:"tableTopBarComponent",ref:x,locale:oe.locale,"delete-url":oe.deleteUrl,"delete-key-mapper":oe.deleteKeyMapper,"export-url":oe.exportUrl,"export-label":oe.exportLabel,"export-files-option":oe.exportFilesOption,"export-formats":oe.exportFormats,columns:oe.columns,total:D.value,"checked-rows":m.value,"checked-all":g.value,"mass-delete":oe.massDelete,"initial-filters":k.value,"hide-checked-rows-count":oe.hideCheckedRowsCount,searchable:oe.searchable,"initial-search-value":j.value,onFiltersChange:ae,onSearchChange:we,onMassDeleteSuccess:ue[0]||(ue[0]=Me=>n("massDeleteSuccess")),onMassDeleteError:ue[1]||(ue[1]=Me=>n("massDeleteError")),onExportStarted:ue[2]||(ue[2]=Me=>n("exportStarted")),onExportSuccess:ue[3]||(ue[3]=Me=>n("exportSuccess"))},h.createSlots({_:2},[oe.$slots.massActions?{name:"massActions",fn:h.withCtx(()=>[h.renderSlot(oe.$slots,"massActions")]),key:"0"}:void 0]),1032,["locale","delete-url","delete-key-mapper","export-url","export-label","export-files-option","export-formats","columns","total","checked-rows","checked-all","mass-delete","initial-filters","hide-checked-rows-count","searchable","initial-search-value"])):h.createCommentVNode("",!0),h.createElementVNode("div",h.mergeProps(oe.$attrs,{class:["omz-table",{"omz-table--scrollable":oe.scrollable,"!overflow-visible":oe.overflowVisible}]}),[h.createElementVNode("table",null,[h.createElementVNode("thead",null,[h.createElementVNode("tr",MTe,[oe.sortable?(h.openBlock(),h.createElementBlock("th",ATe)):h.createCommentVNode("",!0),oe.checkable?(h.openBlock(),h.createElementBlock("th",PTe,[oe.disableCheckAll?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("label",{key:0,class:h.normalizeClass(["checkbox align-middle",{"omz-disabled":B.value.length===0}])},[h.withDirectives(h.createElementVNode("input",{id:"check_all","onUpdate:modelValue":ue[4]||(ue[4]=Me=>g.value=Me),type:"checkbox",disabled:B.value.length===0},null,8,DTe),[[h.vModelCheckbox,g.value]]),NTe],2))])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(oe.columns.filter(Me=>!Me.hidden),Me=>(h.openBlock(),h.createElementBlock("th",{key:Me.header},[h.renderSlot(oe.$slots,"header",{column:Me},()=>[h.createElementVNode("span",{class:h.normalizeClass({"cursor-pointer":(Me==null?void 0:Me.ordering)||(Me==null?void 0:Me.orderingCallBack)}),onClick:J=>R(Me)},[h.createTextVNode(h.toDisplayString(Me.header)+" ",1),Me!=null&&Me.ordering&&d.value===Me.field?(h.openBlock(),h.createBlock(uo,{key:0,class:"align-bottom",path:v.value==="asc"?h.unref(qJ):h.unref(UJ)},null,8,["path"])):h.createCommentVNode("",!0)],10,BTe)])]))),128)),(oe.$slots.actionsCell||oe.ajaxUrl)&&oe.refreshButton?(h.openBlock(),h.createElementBlock("th",RTe,[oe.ajaxUrl?(h.openBlock(),h.createBlock(qi,{key:0,color:"infoSky",class:"float-right",icon:h.unref(rG),small:"",onClick:ue[5]||(ue[5]=Me=>E())},null,8,["icon"])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)])]),h.createVNode(h.Transition,{name:"fade"},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(Fq,{tag:"tbody",enabled:oe.sortable,multiple:oe.multiSortable,"handle-class":"handle",onOrderChanged:ee},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(B.value,(Me,J)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:oe.rowKeyMapper?oe.rowKeyMapper(Me):Me.id},[h.createElementVNode("tr",{class:h.normalizeClass(["lg:hover:bg-gray-100 odd:lg:bg-gray-50 h-[64px]",oe.selectableRows||oe.rowClickRoute||oe.rowClickCallback?"cursor-pointer":"",m.value.some(K=>K.id===Me.id)||g.value?tMe:"","group"]),"data-sortable-id":oe.sortable?Me.id:null,onClick:K=>S(Me)},[oe.sortable?(h.openBlock(),h.createElementBlock("td",LTe,[h.createVNode(uo,{path:h.unref(XJ)},null,8,["path"])])):h.createCommentVNode("",!0),oe.checkable?(h.openBlock(),h.createBlock(OO,{key:1,id:`checkbox_${Me.id}`,"is-checked":g.value||m.value.some(K=>K.id===Me.id),disabled:g.value,onChecked:K=>P(K,Me),onClick:ue[6]||(ue[6]=h.withModifiers(()=>{},["stop"]))},null,8,["id","is-checked","disabled","onChecked"])):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(oe.columns.filter(K=>!K.hidden),K=>(h.openBlock(),h.createElementBlock("td",{key:K.field,"data-label":K.header},[h.unref(l).cell?h.renderSlot(oe.$slots,"cell",{key:0,row:Me,index:J,column:K}):h.renderSlot(oe.$slots,K.field,{key:1,row:Me,index:J,column:K},()=>[K.format?(h.openBlock(),h.createElementBlock("span",{key:0,class:"omz-table__value",title:K.format(Me)},h.toDisplayString(K.format(Me)),9,VTe)):K.render?(h.openBlock(),h.createElementBlock("span",FTe,h.toDisplayString(K.render(Me)),1)):K.component?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(K.component(Me)),{key:2})):K.link&&K.link(Me)?(h.openBlock(),h.createBlock(h.unref(a),{key:3,href:K.link(Me)??"",class:"hover:underline text-blue-600 hover:text-blue-800 truncate-200",onClick:ue[7]||(ue[7]=h.withModifiers(()=>{},["stop"]))},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(K.linkLabel&&K.linkLabel(Me)),1)]),_:2},1032,["href"])):Array.isArray(Me[K.field])&&K.key?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:4},h.renderList(Me[K.field],ye=>(h.openBlock(),h.createBlock(Wb,{key:ye.id,text:ye[K.key],type:"info",small:""},null,8,["text"]))),128)):Array.isArray(Me[K.field])&&Me[K.field].length===0?(h.openBlock(),h.createElementBlock("span",HTe)):(h.openBlock(),h.createElementBlock("span",{key:6,class:h.normalizeClass({"omz-table__value break-all":T.value>3}),title:Me[K.field]},h.toDisplayString(Me[K.field]),11,UTe))])],8,zTe))),128)),oe.$slots.actionsCell?(h.openBlock(),h.createElementBlock("td",qTe,[h.renderSlot(oe.$slots,"actionsCell",{row:Me,index:J})])):oe.refreshButton?(h.openBlock(),h.createElementBlock("td",WTe)):h.createCommentVNode("",!0)],10,ITe),oe.$slots.expandContent&&(oe.expanded||m.value.some(K=>K.id===Me.id))?(h.openBlock(),h.createElementBlock("tr",KTe,[h.createElementVNode("td",{colspan:T.value,class:"bg-blue-100"},[h.createElementVNode("div",null,[h.renderSlot(oe.$slots,"expandContent",{row:Me,index:J})])],8,YTe)])):h.createCommentVNode("",!0)],64))),128))]),_:3},8,["enabled","multiple"]),[[h.vShow,!b.value]])]),_:3})]),h.createVNode(h.Transition,{name:"fade"},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",JTe,GTe,512),[[h.vShow,b.value]])]),_:1}),D.value===0?(h.openBlock(),h.createElementBlock("div",QTe,h.toDisplayString(b.value?h.unref(s)("table.loading"):h.unref(s)("table.noData")),1)):h.createCommentVNode("",!0),(ke=r.options)!=null&&ke.pagination||(he=r.options)!=null&&he.frontendPagination?(h.openBlock(),h.createElementBlock("div",XTe,[h.createVNode(zh,null,{default:h.withCtx(()=>[h.createElementVNode("div",ZTe,[h.createElementVNode("small",null,h.toDisplayString(h.unref(s)("table.perPage")),1),h.withDirectives(h.createElementVNode("select",{id:"per_page_select","onUpdate:modelValue":ue[8]||(ue[8]=Me=>c.value=Me),class:"text-sm mx-1 px-3 py-1 focus:ring focus:outline-none border-gray-700 rounded w-20 dark:placeholder-gray-400 h-8 border bg-white dark:bg-gray-800",onChange:ue[9]||(ue[9]=Me=>Y())},eMe,544),[[h.vModelSelect,c.value]]),h.createElementVNode("small",null,h.toDisplayString(U.value),1)]),h.createVNode(Hb,{class:"justify-self-end"},{default:h.withCtx(()=>[h.createVNode(qi,{color:"white",icon:h.unref(eG),outline:oe.darkMode,small:"",disabled:f.value===0,onClick:ue[10]||(ue[10]=Me=>f.value=0)},null,8,["icon","outline","disabled"]),h.createVNode(qi,{color:"white",icon:h.unref(KJ),outline:oe.darkMode,small:"",disabled:f.value===0,onClick:ue[11]||(ue[11]=Me=>f.value--)},null,8,["icon","outline","disabled"]),h.createElementVNode("small",null,h.toDisplayString(z.value),1),h.createVNode(qi,{color:"white",icon:h.unref(YJ),outline:oe.darkMode,small:"",disabled:f.value+1===L.value,onClick:ue[12]||(ue[12]=Me=>f.value++)},null,8,["icon","outline","disabled"]),h.createVNode(qi,{color:"white",icon:h.unref(tG),outline:oe.darkMode,small:"",disabled:f.value+1===L.value,onClick:ue[13]||(ue[13]=Me=>f.value=L.value-1)},null,8,["icon","outline","disabled"])]),_:1})]),_:1})])):h.createCommentVNode("",!0)],16)],64)}}}),WMe="",rMe=["onClick"],oMe="inline-block py-2 px-4 text-red-600 rounded-t-lg border-b-2 border-red-600 active dark:text-red-500 dark:border-red-500",iMe="inline-block py-2 px-4 text-gray-400 rounded-t-lg !cursor-not-allowed dark:text-gray-500",aMe=h.defineComponent({__name:"OmzTabs",props:{defaultTab:{default:0},headerClasses:{default:null},vertical:{type:Boolean},noContent:{type:Boolean},tabs:{default:()=>[]}},setup(t){const e=t,n=h.useSlots(),r=h.inject(Rm),o=h.computed(()=>e.vertical?"block p-4 rounded-t-lg border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 w-full justify-center":"inline-block py-2 px-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300"),i=h.computed(()=>e.vertical?"block p-4 text-black bg-slate-200 dark:bg-white/10 active dark:text-white dark:border-omniaz-dark w-full justify-center":"inline-block py-2 px-4 text-omniaz-dark rounded-t-lg border-b-2 border-omniaz-dark active dark:text-white dark:border-white"),a=h.reactive({selectedIndex:e.defaultTab,tabs:[],count:0,hasErrors:[]}),s=h.computed(()=>a.tabs.find(u=>(u==null?void 0:u.index)===a.selectedIndex)??a.tabs[a.selectedIndex]);h.provide("TabsProvider",a);const l=u=>{const c=a.tabs.find(d=>(d==null?void 0:d.index)===u)??a.tabs[u],f=(c==null?void 0:c.index)??u;c!=null&&c.disabled||a.selectedIndex!==f&&(c!=null&&c.url?r==null||r.visit(c.url):(c!=null&&c.onClick&&c.onClick(),a.selectedIndex=f))};return h.watchEffect(()=>{var u,c;if(n.default){const f=n.default();a.tabs=[],((c=(u=f[0])==null?void 0:u.type)==null?void 0:c.__name)!=="OmzTab"?a.tabs=f[0].children:f.forEach(d=>{d.props&&a.tabs.push({title:d.props.title,disabled:d.props.disabled,url:d.props.url,icon:d.props.icon,hasErrors:d.props["has-errors"],onClick:d.props["on-click"]})})}else e.tabs&&(a.tabs=e.tabs)}),h.onMounted(()=>{l(e.defaultTab)}),(u,c)=>{var f;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["flex",[u.vertical?"flex-col sm:flex-row":"flex-col"]])},[h.createElementVNode("div",{class:h.normalizeClass(["text-sm font-medium text-center text-gray-500 dark:text-gray-400 dark:border-gray-700 border-gray-200",[u.vertical?"":"border-b-2",u.headerClasses]])},[h.createElementVNode("ul",{class:h.normalizeClass(["-mb-[2px] sm:flex sm:flex-wrap sm:grid-cols-none",[u.vertical?"flex-col":"flex-row grid grid-cols-2"]])},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(a.tabs,(d,p)=>(h.openBlock(),h.createElementBlock("li",{key:p,class:h.normalizeClass(["mr-2",[u.vertical?"border-r border-gray-100 dark:border-gray-700":""]])},[h.createElementVNode("a",{class:h.normalizeClass(["cursor-pointer inline-flex items-center h-11 justify-center w-full",(d!=null&&d.index?d.index===a.selectedIndex:p===a.selectedIndex)?i.value:d!=null&&d.disabled?iMe:a.hasErrors[p]?oMe:o.value]),onClick:v=>l((d==null?void 0:d.index)??p)},[d!=null&&d.icon?(h.openBlock(),h.createBlock(uo,{key:0,path:d==null?void 0:d.icon,size:"20",class:"mr-1"},null,8,["path"])):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(d==null?void 0:d.title),1)],10,rMe)],2))),128))],2)],2),!((f=s.value)!=null&&f.url)&&!u.noContent?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["rounded-lg",[u.vertical?"px-4 flex-grow":"py-4"]]),role:"tabpanel"},[h.renderSlot(u.$slots,"default")],2)):h.createCommentVNode("",!0)],2)}}}),sMe={install:(t,e)=>{t.provide(Rm,e.inertiaRouter),t.provide(Im,e.inertiaLinkComponent)}};$t.OmzAvatar=DJ,$t.OmzButton=qi,$t.OmzButtons=Hb,$t.OmzCard=qb,$t.OmzCardWidget=yG,$t.OmzCheckRadioPicker=EO,$t.OmzCheckboxCell=OO,$t.OmzCodeSnippet=EG,$t.OmzColorPicker=NG,$t.OmzControl=Lm,$t.OmzControlIcon=_O,$t.OmzDatepicker=Ste,$t.OmzDivider=z4,$t.OmzDropdown=V4,$t.OmzDropdownItem=Zm,$t.OmzField=F4,$t.OmzFileInput=fre,$t.OmzGrowingNumber=CO,$t.OmzIcon=uo,$t.OmzJsonEditor=A_e,$t.OmzLevel=zh,$t.OmzLoader=R_e,$t.OmzModal=O$,$t.OmzMultiselect=xh,$t.OmzNavBarItem=O5e,$t.OmzNestedSortable=fTe,$t.OmzNotification=pTe,$t.OmzOverlay=bq,$t.OmzPill=Wb,$t.OmzSortable=Fq,$t.OmzTab=gTe,$t.OmzTable=nMe,$t.OmzTableTopBar=Uq,$t.OmzTabs=aMe,$t.OmzTooltip=Gw,$t.OmzTrendPill=$O,$t.omniazComponentsPlugin=sMe,Object.defineProperty($t,Symbol.toStringTag,{value:"Module"})});
242
242
  //# sourceMappingURL=vue-component-library.umd.js.map