@dolusoft/vue3-datatable 1.7.73 → 1.7.74
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.
package/dist/vue3-datatable.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("vue");function Dt(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function ge(n){return typeof n=="function"?n():e.unref(n)}const $t=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vn=Object.prototype.toString,gn=n=>vn.call(n)==="[object Object]",ne=()=>{},bn=kn();function kn(){var n,r;return $t&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function lt(n,r){function o(...l){return new Promise((t,a)=>{Promise.resolve(n(()=>r.apply(this,l),{fn:r,thisArg:this,args:l})).then(t).catch(a)})}return o}const yn=n=>n();function Ot(n,r={}){let o,l,t=ne;const a=c=>{clearTimeout(c),t(),t=ne};return c=>{const d=ge(n),b=ge(r.maxWait);return o&&a(o),d<=0||b!==void 0&&b<=0?(l&&(a(l),l=null),Promise.resolve(c())):new Promise((g,E)=>{t=r.rejectOnCancel?E:g,b&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(c())},b)),o=setTimeout(()=>{l&&a(l),l=null,g(c())},d)})}}function Cn(...n){let r=0,o,l=!0,t=ne,a,s,c,d,b;!e.isRef(n[0])&&typeof n[0]=="object"?{delay:s,trailing:c=!0,leading:d=!0,rejectOnCancel:b=!1}=n[0]:[s,c=!0,d=!0,b=!1]=n;const g=()=>{o&&(clearTimeout(o),o=void 0,t(),t=ne)};return N=>{const y=ge(s),v=Date.now()-r,f=()=>a=N();return g(),y<=0?(r=Date.now(),f()):(v>y&&(d||!l)?(r=Date.now(),f()):c&&(a=new Promise((h,C)=>{t=b?C:h,o=setTimeout(()=>{r=Date.now(),l=!0,h(f()),g()},Math.max(0,y-v))})),!d&&!o&&(o=setTimeout(()=>l=!0,y)),l=!1,a)}}function wn(n){return e.getCurrentInstance()}function kt(n,r=200,o={}){return lt(Ot(r,o),n)}function En(n,r=200,o=!1,l=!0,t=!1){return lt(Cn(r,o,l,t),n)}function Sn(n,r,o={}){const{eventFilter:l=yn,...t}=o;return e.watch(n,lt(l,r),t)}function xn(n,r=!0,o){wn()?e.onMounted(n,o):r?n():e.nextTick(n)}function Bn(n,r,o={}){const{debounce:l=0,maxWait:t=void 0,...a}=o;return Sn(n,r,{...a,eventFilter:Ot(l,{maxWait:t})})}function J(n){var r;const o=ge(n);return(r=o==null?void 0:o.$el)!=null?r:o}const $e=$t?window:void 0;function je(...n){let r,o,l,t;if(typeof n[0]=="string"||Array.isArray(n[0])?([o,l,t]=n,r=$e):[r,o,l,t]=n,!r)return ne;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],s=()=>{a.forEach(g=>g()),a.length=0},c=(g,E,N,y)=>(g.addEventListener(E,N,y),()=>g.removeEventListener(E,N,y)),d=e.watch(()=>[J(r),ge(t)],([g,E])=>{if(s(),!g)return;const N=gn(E)?{...E}:E;a.push(...o.flatMap(y=>l.map(v=>c(g,y,v,N))))},{immediate:!0,flush:"post"}),b=()=>{d(),s()};return Dt(b),b}let yt=!1;function Nn(n,r,o={}){const{window:l=$e,ignore:t=[],capture:a=!0,detectIframe:s=!1}=o;if(!l)return ne;bn&&!yt&&(yt=!0,Array.from(l.document.body.children).forEach(N=>N.addEventListener("click",ne)),l.document.documentElement.addEventListener("click",ne));let c=!0;const d=N=>t.some(y=>{if(typeof y=="string")return Array.from(l.document.querySelectorAll(y)).some(v=>v===N.target||N.composedPath().includes(v));{const v=J(y);return v&&(N.target===v||N.composedPath().includes(v))}}),g=[je(l,"click",N=>{const y=J(n);if(!(!y||y===N.target||N.composedPath().includes(y))){if(N.detail===0&&(c=!d(N)),!c){c=!0;return}r(N)}},{passive:!0,capture:a}),je(l,"pointerdown",N=>{const y=J(n);c=!d(N)&&!!(y&&!N.composedPath().includes(y))},{passive:!0}),s&&je(l,"blur",N=>{setTimeout(()=>{var y;const v=J(n);((y=l.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(v!=null&&v.contains(l.document.activeElement))&&r(N)},0)})].filter(Boolean);return()=>g.forEach(N=>N())}function zn(){const n=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{n.value=!0},r),n}function Fn(n){const r=zn();return e.computed(()=>(r.value,!!n()))}function Ln(n,r,o={}){const{window:l=$e,...t}=o;let a;const s=Fn(()=>l&&"ResizeObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=e.computed(()=>Array.isArray(n)?n.map(E=>J(E)):[J(n)]),b=e.watch(d,E=>{if(c(),s.value&&l){a=new ResizeObserver(r);for(const N of E)N&&a.observe(N,t)}},{immediate:!0,flush:"post"}),g=()=>{c(),b()};return Dt(g),{isSupported:s,stop:g}}function Mn(n,r={width:0,height:0},o={}){const{window:l=$e,box:t="content-box"}=o,a=e.computed(()=>{var E,N;return(N=(E=J(n))==null?void 0:E.namespaceURI)==null?void 0:N.includes("svg")}),s=e.ref(r.width),c=e.ref(r.height),{stop:d}=Ln(n,([E])=>{const N=t==="border-box"?E.borderBoxSize:t==="content-box"?E.contentBoxSize:E.devicePixelContentBoxSize;if(l&&a.value){const y=J(n);if(y){const v=y.getBoundingClientRect();s.value=v.width,c.value=v.height}}else if(N){const y=Array.isArray(N)?N:[N];s.value=y.reduce((v,{inlineSize:f})=>v+f,0),c.value=y.reduce((v,{blockSize:f})=>v+f,0)}else s.value=E.contentRect.width,c.value=E.contentRect.height},o);xn(()=>{const E=J(n);E&&(s.value="offsetWidth"in E?E.offsetWidth:r.width,c.value="offsetHeight"in E?E.offsetHeight:r.height)});const b=e.watch(()=>J(n),E=>{s.value=E?r.width:0,c.value=E?r.height:0});function g(){d(),b()}return{width:s,height:c,stop:g}}const Ct={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(n,{emit:r}){const o=r,l=n,t=e.useSlots(),a=e.ref([]),s=e.computed(()=>a.value.reduce((u,w)=>(u[~~w.id]=w)&&u,{})),c=e.computed(()=>a.value.length),d=e.ref(null),b=e.ref(!1),g=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),E=e.ref({splitter:null,timeoutId:null}),N=e.computed(()=>({[`splitpanes splitpanes--${l.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":g.value.dragging})),y=()=>{document.addEventListener("mousemove",h,{passive:!1}),document.addEventListener("mouseup",C),"ontouchstart"in window&&(document.addEventListener("touchmove",h,{passive:!1}),document.addEventListener("touchend",C))},v=()=>{document.removeEventListener("mousemove",h,{passive:!1}),document.removeEventListener("mouseup",C),"ontouchstart"in window&&(document.removeEventListener("touchmove",h,{passive:!1}),document.removeEventListener("touchend",C))},f=(u,w)=>{const B=u.target.closest(".splitpanes__splitter");if(B){const{left:S,top:x}=B.getBoundingClientRect(),{clientX:L,clientY:I}="ontouchstart"in window&&u.touches?u.touches[0]:u;g.value.cursorOffset=l.horizontal?I-x:L-S}y(),g.value.mouseDown=!0,g.value.activeSplitter=w},h=u=>{g.value.mouseDown&&(u.preventDefault(),g.value.dragging=!0,requestAnimationFrame(()=>{P(oe(u)),D("resize",{event:u},!0)}))},C=u=>{g.value.dragging&&D("resized",{event:u},!0),g.value.mouseDown=!1,g.value.activeSplitter=null,setTimeout(()=>{g.value.dragging=!1,v()},100)},_=(u,w)=>{"ontouchstart"in window&&(u.preventDefault(),E.value.splitter===w?(clearTimeout(E.value.timeoutId),E.value.timeoutId=null,O(u,w),E.value.splitter=null):(E.value.splitter=w,E.value.timeoutId=setTimeout(()=>E.value.splitter=null,500))),g.value.dragging||D("splitter-click",{event:u,index:w},!0)},O=(u,w)=>{if(D("splitter-dblclick",{event:u,index:w},!0),l.maximizePanes){let B=0;a.value=a.value.map((S,x)=>(S.size=x===w?S.max:S.min,x!==w&&(B+=S.min),S)),a.value[w].size-=B,D("pane-maximize",{event:u,index:w,pane:a.value[w]}),D("resized",{event:u,index:w},!0)}},R=(u,w)=>{D("pane-click",{event:u,index:s.value[w].index,pane:s.value[w]})},oe=u=>{const w=d.value.getBoundingClientRect(),{clientX:B,clientY:S}="ontouchstart"in window&&u.touches?u.touches[0]:u;return{x:B-(l.horizontal?0:g.value.cursorOffset)-w.left,y:S-(l.horizontal?g.value.cursorOffset:0)-w.top}},T=u=>{u=u[l.horizontal?"y":"x"];const w=d.value[l.horizontal?"clientHeight":"clientWidth"];return l.rtl&&!l.horizontal&&(u=w-u),u*100/w},P=u=>{const w=g.value.activeSplitter;let B={prevPanesSize:H(w),nextPanesSize:V(w),prevReachedMinPanes:0,nextReachedMinPanes:0};const S=0+(l.pushOtherPanes?0:B.prevPanesSize),x=100-(l.pushOtherPanes?0:B.nextPanesSize),L=Math.max(Math.min(T(u),x),S);let I=[w,w+1],q=a.value[I[0]]||null,j=a.value[I[1]]||null;const Se=q.max<100&&L>=q.max+B.prevPanesSize,We=j.max<100&&L<=100-(j.max+V(w+1));if(Se||We){Se?(q.size=q.max,j.size=Math.max(100-q.max-B.prevPanesSize-B.nextPanesSize,0)):(q.size=Math.max(100-j.max-B.prevPanesSize-V(w+1),0),j.size=j.max);return}if(l.pushOtherPanes){const xe=G(B,L);if(!xe)return;({sums:B,panesToResize:I}=xe),q=a.value[I[0]]||null,j=a.value[I[1]]||null}q!==null&&(q.size=Math.min(Math.max(L-B.prevPanesSize-B.prevReachedMinPanes,q.min),q.max)),j!==null&&(j.size=Math.min(Math.max(100-L-B.nextPanesSize-B.nextReachedMinPanes,j.min),j.max))},G=(u,w)=>{const B=g.value.activeSplitter,S=[B,B+1];return w<u.prevPanesSize+a.value[S[0]].min&&(S[0]=W(B).index,u.prevReachedMinPanes=0,S[0]<B&&a.value.forEach((x,L)=>{L>S[0]&&L<=B&&(x.size=x.min,u.prevReachedMinPanes+=x.min)}),u.prevPanesSize=H(S[0]),S[0]===void 0)?(u.prevReachedMinPanes=0,a.value[0].size=a.value[0].min,a.value.forEach((x,L)=>{L>0&&L<=B&&(x.size=x.min,u.prevReachedMinPanes+=x.min)}),a.value[S[1]].size=100-u.prevReachedMinPanes-a.value[0].min-u.prevPanesSize-u.nextPanesSize,null):w>100-u.nextPanesSize-a.value[S[1]].min&&(S[1]=X(B).index,u.nextReachedMinPanes=0,S[1]>B+1&&a.value.forEach((x,L)=>{L>B&&L<S[1]&&(x.size=x.min,u.nextReachedMinPanes+=x.min)}),u.nextPanesSize=V(S[1]-1),S[1]===void 0)?(u.nextReachedMinPanes=0,a.value.forEach((x,L)=>{L<c.value-1&&L>=B+1&&(x.size=x.min,u.nextReachedMinPanes+=x.min)}),a.value[S[0]].size=100-u.prevPanesSize-V(S[0]-1),null):{sums:u,panesToResize:S}},H=u=>a.value.reduce((w,B,S)=>w+(S<u?B.size:0),0),V=u=>a.value.reduce((w,B,S)=>w+(S>u+1?B.size:0),0),W=u=>[...a.value].reverse().find(w=>w.index<u&&w.size>w.min)||{},X=u=>a.value.find(w=>w.index>u+1&&w.size>w.min)||{},ie=()=>{var u;const w=Array.from(((u=d.value)==null?void 0:u.children)||[]);for(const B of w){const S=B.classList.contains("splitpanes__pane"),x=B.classList.contains("splitpanes__splitter");!S&&!x&&(B.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ue=(u,w,B=!1)=>{const S=u-1,x=document.createElement("div");x.classList.add("splitpanes__splitter"),B||(x.onmousedown=L=>f(L,S),typeof window<"u"&&"ontouchstart"in window&&(x.ontouchstart=L=>f(L,S)),x.onclick=L=>_(L,S+1)),x.ondblclick=L=>O(L,S+1),w.parentNode.insertBefore(x,w)},se=u=>{u.onmousedown=void 0,u.onclick=void 0,u.ondblclick=void 0,u.remove()},Z=()=>{var u;const w=Array.from(((u=d.value)==null?void 0:u.children)||[]);for(const S of w)S.className.includes("splitpanes__splitter")&&se(S);let B=0;for(const S of w)S.className.includes("splitpanes__pane")&&(!B&&l.firstSplitter?ue(B,S,!0):B&&ue(B,S),B++)},de=({uid:u,...w})=>{const B=s.value[u];for(const[S,x]of Object.entries(w))B[S]=x},qe=u=>{var w;let B=-1;Array.from(((w=d.value)==null?void 0:w.children)||[]).some(S=>(S.className.includes("splitpanes__pane")&&B++,S.isSameNode(u.el))),a.value.splice(B,0,{...u,index:B}),a.value.forEach((S,x)=>S.index=x),b.value&&e.nextTick(()=>{Z(),U({addedPane:a.value[B]}),D("pane-add",{pane:a.value[B]})})},Ce=u=>{const w=a.value.findIndex(S=>S.id===u);a.value[w].el=null;const B=a.value.splice(w,1)[0];a.value.forEach((S,x)=>S.index=x),e.nextTick(()=>{Z(),D("pane-remove",{pane:B}),U({removedPane:{...B}})})},U=(u={})=>{!u.addedPane&&!u.removedPane?le():a.value.some(w=>w.givenSize!==null||w.min||w.max<100)?we(u):Y(),b.value&&D("resized")},Y=()=>{const u=100/c.value;let w=0;const B=[],S=[];for(const x of a.value)x.size=Math.max(Math.min(u,x.max),x.min),w-=x.size,x.size>=x.max&&B.push(x.id),x.size<=x.min&&S.push(x.id);w>.1&&fe(w,B,S)},le=()=>{let u=100;const w=[],B=[];let S=0;for(const L of a.value)u-=L.size,L.givenSize!==null&&S++,L.size>=L.max&&w.push(L.id),L.size<=L.min&&B.push(L.id);let x=100;if(u>.1){for(const L of a.value)L.givenSize===null&&(L.size=Math.max(Math.min(u/(c.value-S),L.max),L.min)),x-=L.size;x>.1&&fe(x,w,B)}},we=({addedPane:u,removedPane:w}={})=>{let B=100/c.value,S=0;const x=[],L=[];((u==null?void 0:u.givenSize)??null)!==null&&(B=(100-u.givenSize)/(c.value-1));for(const I of a.value)S-=I.size,I.size>=I.max&&x.push(I.id),I.size<=I.min&&L.push(I.id);if(!(Math.abs(S)<.1)){for(const I of a.value)(u==null?void 0:u.givenSize)!==null&&(u==null?void 0:u.id)===I.id||(I.size=Math.max(Math.min(B,I.max),I.min)),S-=I.size,I.size>=I.max&&x.push(I.id),I.size<=I.min&&L.push(I.id);S>.1&&fe(S,x,L)}},fe=(u,w,B)=>{let S;u>0?S=u/(c.value-w.length):S=u/(c.value-B.length),a.value.forEach((x,L)=>{if(u>0&&!w.includes(x.id)){const I=Math.max(Math.min(x.size+S,x.max),x.min),q=I-x.size;u-=q,x.size=I}else if(!B.includes(x.id)){const I=Math.max(Math.min(x.size+S,x.max),x.min),q=I-x.size;u-=q,x.size=I}}),Math.abs(u)>.1&&e.nextTick(()=>{b.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},D=(u,w=void 0,B=!1)=>{const S=(w==null?void 0:w.index)??g.value.activeSplitter??null;o(u,{...w,...S!==null&&{index:S},...B&&S!==null&&{prevPane:a.value[S-(l.firstSplitter?1:0)],nextPane:a.value[S+(l.firstSplitter?0:1)]},panes:a.value.map(x=>({min:x.min,max:x.max,size:x.size}))})};e.watch(()=>l.firstSplitter,()=>Z()),e.onMounted(()=>{ie(),Z(),U(),D("ready"),b.value=!0}),e.onBeforeUnmount(()=>b.value=!1);const Ee=()=>{var u;return e.h("div",{ref:d,class:N.value},(u=t.default)==null?void 0:u.call(t))};return e.provide("panes",a),e.provide("indexedPanes",s),e.provide("horizontal",e.computed(()=>l.horizontal)),e.provide("requestUpdate",de),e.provide("onPaneAdd",qe),e.provide("onPaneRemove",Ce),e.provide("onPaneClick",R),(u,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ee)))}},Ue={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(n){var r;const o=n,l=e.inject("requestUpdate"),t=e.inject("onPaneAdd"),a=e.inject("horizontal"),s=e.inject("onPaneRemove"),c=e.inject("onPaneClick"),d=(r=e.getCurrentInstance())==null?void 0:r.uid,b=e.inject("indexedPanes"),g=e.computed(()=>b.value[d]),E=e.ref(null),N=e.computed(()=>{const h=isNaN(o.size)||o.size===void 0?0:parseFloat(o.size);return Math.max(Math.min(h,v.value),y.value)}),y=e.computed(()=>{const h=parseFloat(o.minSize);return isNaN(h)?0:h}),v=e.computed(()=>{const h=parseFloat(o.maxSize);return isNaN(h)?100:h}),f=e.computed(()=>{var h;return`${a.value?"height":"width"}: ${(h=g.value)==null?void 0:h.size}%`});return e.watch(()=>N.value,h=>l({uid:d,size:h})),e.watch(()=>y.value,h=>l({uid:d,min:h})),e.watch(()=>v.value,h=>l({uid:d,max:h})),e.onMounted(()=>{t({id:d,el:E.value,min:y.value,max:v.value,givenSize:o.size===void 0?null:N.value,size:N.value})}),e.onBeforeUnmount(()=>s(d)),(h,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:E,class:"splitpanes__pane",onClick:C[0]||(C[0]=_=>e.unref(c)(_,h._.uid)),style:e.normalizeStyle(f.value)},[e.renderSlot(h.$slots,"default")],4))}},ve=/^[a-z0-9]+(-[a-z0-9]+)*$/,Oe=(n,r,o,l="")=>{const t=n.split(":");if(n.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;l=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){const c=t.pop(),d=t.pop(),b={provider:t.length>0?t[0]:l,prefix:d,name:c};return r&&!_e(b)?null:b}const a=t[0],s=a.split("-");if(s.length>1){const c={provider:l,prefix:s.shift(),name:s.join("-")};return r&&!_e(c)?null:c}if(o&&l===""){const c={provider:l,prefix:"",name:a};return r&&!_e(c,o)?null:c}return null},_e=(n,r)=>n?!!((n.provider===""||n.provider.match(ve))&&(r&&n.prefix===""||n.prefix.match(ve))&&n.name.match(ve)):!1,Rt=Object.freeze({left:0,top:0,width:16,height:16}),Pe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Re=Object.freeze({...Rt,...Pe}),Ke=Object.freeze({...Re,body:"",hidden:!1});function Vn(n,r){const o={};!n.hFlip!=!r.hFlip&&(o.hFlip=!0),!n.vFlip!=!r.vFlip&&(o.vFlip=!0);const l=((n.rotate||0)+(r.rotate||0))%4;return l&&(o.rotate=l),o}function wt(n,r){const o=Vn(n,r);for(const l in Ke)l in Pe?l in n&&!(l in o)&&(o[l]=Pe[l]):l in r?o[l]=r[l]:l in n&&(o[l]=n[l]);return o}function _n(n,r){const o=n.icons,l=n.aliases||Object.create(null),t=Object.create(null);function a(s){if(o[s])return t[s]=[];if(!(s in t)){t[s]=null;const c=l[s]&&l[s].parent,d=c&&a(c);d&&(t[s]=[c].concat(d))}return t[s]}return Object.keys(o).concat(Object.keys(l)).forEach(a),t}function Tn(n,r,o){const l=n.icons,t=n.aliases||Object.create(null);let a={};function s(c){a=wt(l[c]||t[c],a)}return s(r),o.forEach(s),wt(n,a)}function At(n,r){const o=[];if(typeof n!="object"||typeof n.icons!="object")return o;n.not_found instanceof Array&&n.not_found.forEach(t=>{r(t,null),o.push(t)});const l=_n(n);for(const t in l){const a=l[t];a&&(r(t,Tn(n,t,a)),o.push(t))}return o}const In={provider:"",aliases:{},not_found:{},...Rt};function Ge(n,r){for(const o in r)if(o in n&&typeof n[o]!=typeof r[o])return!1;return!0}function qt(n){if(typeof n!="object"||n===null)return null;const r=n;if(typeof r.prefix!="string"||!n.icons||typeof n.icons!="object"||!Ge(n,In))return null;const o=r.icons;for(const t in o){const a=o[t];if(!t.match(ve)||typeof a.body!="string"||!Ge(a,Ke))return null}const l=r.aliases||Object.create(null);for(const t in l){const a=l[t],s=a.parent;if(!t.match(ve)||typeof s!="string"||!o[s]&&!l[s]||!Ge(a,Ke))return null}return r}const Et=Object.create(null);function Pn(n,r){return{provider:n,prefix:r,icons:Object.create(null),missing:new Set}}function ae(n,r){const o=Et[n]||(Et[n]=Object.create(null));return o[r]||(o[r]=Pn(n,r))}function rt(n,r){return qt(r)?At(r,(o,l)=>{l?n.icons[o]=l:n.missing.add(o)}):[]}function Dn(n,r,o){try{if(typeof o.body=="string")return n.icons[r]={...o},!0}catch{}return!1}let be=!1;function Wt(n){return typeof n=="boolean"&&(be=n),be}function $n(n){const r=typeof n=="string"?Oe(n,!0,be):n;if(r){const o=ae(r.provider,r.prefix),l=r.name;return o.icons[l]||(o.missing.has(l)?null:void 0)}}function On(n,r){const o=Oe(n,!0,be);if(!o)return!1;const l=ae(o.provider,o.prefix);return Dn(l,o.name,r)}function Rn(n,r){if(typeof n!="object")return!1;if(typeof r!="string"&&(r=n.provider||""),be&&!r&&!n.prefix){let t=!1;return qt(n)&&(n.prefix="",At(n,(a,s)=>{s&&On(a,s)&&(t=!0)})),t}const o=n.prefix;if(!_e({provider:r,prefix:o,name:"a"}))return!1;const l=ae(r,o);return!!rt(l,n)}const Ht=Object.freeze({width:null,height:null}),jt=Object.freeze({...Ht,...Pe}),An=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function St(n,r,o){if(r===1)return n;if(o=o||100,typeof n=="number")return Math.ceil(n*r*o)/o;if(typeof n!="string")return n;const l=n.split(An);if(l===null||!l.length)return n;const t=[];let a=l.shift(),s=qn.test(a);for(;;){if(s){const c=parseFloat(a);isNaN(c)?t.push(a):t.push(Math.ceil(c*r*o)/o)}else t.push(a);if(a=l.shift(),a===void 0)return t.join("");s=!s}}function Wn(n,r="defs"){let o="";const l=n.indexOf("<"+r);for(;l>=0;){const t=n.indexOf(">",l),a=n.indexOf("</"+r);if(t===-1||a===-1)break;const s=n.indexOf(">",a);if(s===-1)break;o+=n.slice(t+1,a).trim(),n=n.slice(0,l).trim()+n.slice(s+1)}return{defs:o,content:n}}function Hn(n,r){return n?"<defs>"+n+"</defs>"+r:r}function jn(n,r,o){const l=Wn(n);return Hn(l.defs,r+l.content+o)}const Un=n=>n==="unset"||n==="undefined"||n==="none";function Gn(n,r){const o={...Re,...n},l={...jt,...r},t={left:o.left,top:o.top,width:o.width,height:o.height};let a=o.body;[o,l].forEach(f=>{const h=[],C=f.hFlip,_=f.vFlip;let O=f.rotate;C?_?O+=2:(h.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),h.push("scale(-1 1)"),t.top=t.left=0):_&&(h.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),h.push("scale(1 -1)"),t.top=t.left=0);let R;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:R=t.height/2+t.top,h.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:h.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:R=t.width/2+t.left,h.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}O%2===1&&(t.left!==t.top&&(R=t.left,t.left=t.top,t.top=R),t.width!==t.height&&(R=t.width,t.width=t.height,t.height=R)),h.length&&(a=jn(a,'<g transform="'+h.join(" ")+'">',"</g>"))});const s=l.width,c=l.height,d=t.width,b=t.height;let g,E;s===null?(E=c===null?"1em":c==="auto"?b:c,g=St(E,d/b)):(g=s==="auto"?d:s,E=c===null?St(g,b/d):c==="auto"?b:c);const N={},y=(f,h)=>{Un(h)||(N[f]=h.toString())};y("width",g),y("height",E);const v=[t.left,t.top,d,b];return N.viewBox=v.join(" "),{attributes:N,viewBox:v,body:a}}const Qn=/\sid="(\S+)"/g,Kn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Jn=0;function Yn(n,r=Kn){const o=[];let l;for(;l=Qn.exec(n);)o.push(l[1]);if(!o.length)return n;const t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(a=>{const s=typeof r=="function"?r(a):r+(Jn++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+t+"$3")}),n=n.replace(new RegExp(t,"g"),""),n}const Je=Object.create(null);function Xn(n,r){Je[n]=r}function Ye(n){return Je[n]||Je[""]}function at(n){let r;if(typeof n.resources=="string")r=[n.resources];else if(r=n.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:n.path||"/",maxURL:n.maxURL||500,rotate:n.rotate||750,timeout:n.timeout||5e3,random:n.random===!0,index:n.index||0,dataAfterTimeout:n.dataAfterTimeout!==!1}}const it=Object.create(null),pe=["https://api.simplesvg.com","https://api.unisvg.com"],Te=[];for(;pe.length>0;)pe.length===1||Math.random()>.5?Te.push(pe.shift()):Te.push(pe.pop());it[""]=at({resources:["https://api.iconify.design"].concat(Te)});function Zn(n,r){const o=at(r);return o===null?!1:(it[n]=o,!0)}function st(n){return it[n]}const eo=()=>{let n;try{if(n=fetch,typeof n=="function")return n}catch{}};let xt=eo();function to(n,r){const o=st(n);if(!o)return 0;let l;if(!o.maxURL)l=0;else{let t=0;o.resources.forEach(s=>{t=Math.max(t,s.length)});const a=r+".json?icons=";l=o.maxURL-t-o.path.length-a.length}return l}function no(n){return n===404}const oo=(n,r,o)=>{const l=[],t=to(n,r),a="icons";let s={type:a,provider:n,prefix:r,icons:[]},c=0;return o.forEach((d,b)=>{c+=d.length+1,c>=t&&b>0&&(l.push(s),s={type:a,provider:n,prefix:r,icons:[]},c=d.length),s.icons.push(d)}),l.push(s),l};function lo(n){if(typeof n=="string"){const r=st(n);if(r)return r.path}return"/"}const ro=(n,r,o)=>{if(!xt){o("abort",424);return}let l=lo(r.provider);switch(r.type){case"icons":{const a=r.prefix,c=r.icons.join(","),d=new URLSearchParams({icons:c});l+=a+".json?"+d.toString();break}case"custom":{const a=r.uri;l+=a.slice(0,1)==="/"?a.slice(1):a;break}default:o("abort",400);return}let t=503;xt(n+l).then(a=>{const s=a.status;if(s!==200){setTimeout(()=>{o(no(s)?"abort":"next",s)});return}return t=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?o("abort",a):o("next",t)});return}setTimeout(()=>{o("success",a)})}).catch(()=>{o("next",t)})},ao={prepare:oo,send:ro};function io(n){const r={loaded:[],missing:[],pending:[]},o=Object.create(null);n.sort((t,a)=>t.provider!==a.provider?t.provider.localeCompare(a.provider):t.prefix!==a.prefix?t.prefix.localeCompare(a.prefix):t.name.localeCompare(a.name));let l={provider:"",prefix:"",name:""};return n.forEach(t=>{if(l.name===t.name&&l.prefix===t.prefix&&l.provider===t.provider)return;l=t;const a=t.provider,s=t.prefix,c=t.name,d=o[a]||(o[a]=Object.create(null)),b=d[s]||(d[s]=ae(a,s));let g;c in b.icons?g=r.loaded:s===""||b.missing.has(c)?g=r.missing:g=r.pending;const E={provider:a,prefix:s,name:c};g.push(E)}),r}function Ut(n,r){n.forEach(o=>{const l=o.loaderCallbacks;l&&(o.loaderCallbacks=l.filter(t=>t.id!==r))})}function so(n){n.pendingCallbacksFlag||(n.pendingCallbacksFlag=!0,setTimeout(()=>{n.pendingCallbacksFlag=!1;const r=n.loaderCallbacks?n.loaderCallbacks.slice(0):[];if(!r.length)return;let o=!1;const l=n.provider,t=n.prefix;r.forEach(a=>{const s=a.icons,c=s.pending.length;s.pending=s.pending.filter(d=>{if(d.prefix!==t)return!0;const b=d.name;if(n.icons[b])s.loaded.push({provider:l,prefix:t,name:b});else if(n.missing.has(b))s.missing.push({provider:l,prefix:t,name:b});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ut([n],a.id),a.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),a.abort))})}))}let co=0;function uo(n,r,o){const l=co++,t=Ut.bind(null,o,l);if(!r.pending.length)return t;const a={id:l,icons:r,callback:n,abort:t};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(a)}),t}function fo(n,r=!0,o=!1){const l=[];return n.forEach(t=>{const a=typeof t=="string"?Oe(t,r,o):t;a&&l.push(a)}),l}var ho={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function mo(n,r,o,l){const t=n.resources.length,a=n.random?Math.floor(Math.random()*t):n.index;let s;if(n.random){let T=n.resources.slice(0);for(s=[];T.length>1;){const P=Math.floor(Math.random()*T.length);s.push(T[P]),T=T.slice(0,P).concat(T.slice(P+1))}s=s.concat(T)}else s=n.resources.slice(a).concat(n.resources.slice(0,a));const c=Date.now();let d="pending",b=0,g,E=null,N=[],y=[];typeof l=="function"&&y.push(l);function v(){E&&(clearTimeout(E),E=null)}function f(){d==="pending"&&(d="aborted"),v(),N.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),N=[]}function h(T,P){P&&(y=[]),typeof T=="function"&&y.push(T)}function C(){return{startTime:c,payload:r,status:d,queriesSent:b,queriesPending:N.length,subscribe:h,abort:f}}function _(){d="failed",y.forEach(T=>{T(void 0,g)})}function O(){N.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),N=[]}function R(T,P,G){const H=P!=="success";switch(N=N.filter(V=>V!==T),d){case"pending":break;case"failed":if(H||!n.dataAfterTimeout)return;break;default:return}if(P==="abort"){g=G,_();return}if(H){g=G,N.length||(s.length?oe():_());return}if(v(),O(),!n.random){const V=n.resources.indexOf(T.resource);V!==-1&&V!==n.index&&(n.index=V)}d="completed",y.forEach(V=>{V(G)})}function oe(){if(d!=="pending")return;v();const T=s.shift();if(T===void 0){if(N.length){E=setTimeout(()=>{v(),d==="pending"&&(O(),_())},n.timeout);return}_();return}const P={status:"pending",resource:T,callback:(G,H)=>{R(P,G,H)}};N.push(P),b++,E=setTimeout(oe,n.rotate),o(T,r,P.callback)}return setTimeout(oe),C}function Gt(n){const r={...ho,...n};let o=[];function l(){o=o.filter(c=>c().status==="pending")}function t(c,d,b){const g=mo(r,c,d,(E,N)=>{l(),b&&b(E,N)});return o.push(g),g}function a(c){return o.find(d=>c(d))||null}return{query:t,find:a,setIndex:c=>{r.index=c},getIndex:()=>r.index,cleanup:l}}function Bt(){}const Qe=Object.create(null);function po(n){if(!Qe[n]){const r=st(n);if(!r)return;const o=Gt(r),l={config:r,redundancy:o};Qe[n]=l}return Qe[n]}function vo(n,r,o){let l,t;if(typeof n=="string"){const a=Ye(n);if(!a)return o(void 0,424),Bt;t=a.send;const s=po(n);s&&(l=s.redundancy)}else{const a=at(n);if(a){l=Gt(a);const s=n.resources?n.resources[0]:"",c=Ye(s);c&&(t=c.send)}}return!l||!t?(o(void 0,424),Bt):l.query(r,t,o)().abort}const Nt="iconify2",ke="iconify",Qt=ke+"-count",zt=ke+"-version",Kt=36e5,go=168,bo=50;function Xe(n,r){try{return n.getItem(r)}catch{}}function ct(n,r,o){try{return n.setItem(r,o),!0}catch{}}function Ft(n,r){try{n.removeItem(r)}catch{}}function Ze(n,r){return ct(n,Qt,r.toString())}function et(n){return parseInt(Xe(n,Qt))||0}const Ae={local:!0,session:!0},Jt={local:new Set,session:new Set};let ut=!1;function ko(n){ut=n}let Me=typeof window>"u"?{}:window;function Yt(n){const r=n+"Storage";try{if(Me&&Me[r]&&typeof Me[r].length=="number")return Me[r]}catch{}Ae[n]=!1}function Xt(n,r){const o=Yt(n);if(!o)return;const l=Xe(o,zt);if(l!==Nt){if(l){const c=et(o);for(let d=0;d<c;d++)Ft(o,ke+d.toString())}ct(o,zt,Nt),Ze(o,0);return}const t=Math.floor(Date.now()/Kt)-go,a=c=>{const d=ke+c.toString(),b=Xe(o,d);if(typeof b=="string"){try{const g=JSON.parse(b);if(typeof g=="object"&&typeof g.cached=="number"&&g.cached>t&&typeof g.provider=="string"&&typeof g.data=="object"&&typeof g.data.prefix=="string"&&r(g,c))return!0}catch{}Ft(o,d)}};let s=et(o);for(let c=s-1;c>=0;c--)a(c)||(c===s-1?(s--,Ze(o,s)):Jt[n].add(c))}function Zt(){if(!ut){ko(!0);for(const n in Ae)Xt(n,r=>{const o=r.data,l=r.provider,t=o.prefix,a=ae(l,t);if(!rt(a,o).length)return!1;const s=o.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,s):s,!0})}}function yo(n,r){const o=n.lastModifiedCached;if(o&&o>=r)return o===r;if(n.lastModifiedCached=r,o)for(const l in Ae)Xt(l,t=>{const a=t.data;return t.provider!==n.provider||a.prefix!==n.prefix||a.lastModified===r});return!0}function Co(n,r){ut||Zt();function o(l){let t;if(!Ae[l]||!(t=Yt(l)))return;const a=Jt[l];let s;if(a.size)a.delete(s=Array.from(a).shift());else if(s=et(t),s>=bo||!Ze(t,s+1))return;const c={cached:Math.floor(Date.now()/Kt),provider:n.provider,data:r};return ct(t,ke+s.toString(),JSON.stringify(c))}r.lastModified&&!yo(n,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),o("local")||o("session"))}function Lt(){}function wo(n){n.iconsLoaderFlag||(n.iconsLoaderFlag=!0,setTimeout(()=>{n.iconsLoaderFlag=!1,so(n)}))}function Eo(n,r){n.iconsToLoad?n.iconsToLoad=n.iconsToLoad.concat(r).sort():n.iconsToLoad=r,n.iconsQueueFlag||(n.iconsQueueFlag=!0,setTimeout(()=>{n.iconsQueueFlag=!1;const{provider:o,prefix:l}=n,t=n.iconsToLoad;delete n.iconsToLoad;let a;if(!t||!(a=Ye(o)))return;a.prepare(o,l,t).forEach(c=>{vo(o,c,d=>{if(typeof d!="object")c.icons.forEach(b=>{n.missing.add(b)});else try{const b=rt(n,d);if(!b.length)return;const g=n.pendingIcons;g&&b.forEach(E=>{g.delete(E)}),Co(n,d)}catch(b){console.error(b)}wo(n)})})}))}const So=(n,r)=>{const o=fo(n,!0,Wt()),l=io(o);if(!l.pending.length){let d=!0;return r&&setTimeout(()=>{d&&r(l.loaded,l.missing,l.pending,Lt)}),()=>{d=!1}}const t=Object.create(null),a=[];let s,c;return l.pending.forEach(d=>{const{provider:b,prefix:g}=d;if(g===c&&b===s)return;s=b,c=g,a.push(ae(b,g));const E=t[b]||(t[b]=Object.create(null));E[g]||(E[g]=[])}),l.pending.forEach(d=>{const{provider:b,prefix:g,name:E}=d,N=ae(b,g),y=N.pendingIcons||(N.pendingIcons=new Set);y.has(E)||(y.add(E),t[b][g].push(E))}),a.forEach(d=>{const{provider:b,prefix:g}=d;t[b][g].length&&Eo(d,t[b][g])}),r?uo(r,l,a):Lt};function xo(n,r){const o={...n};for(const l in r){const t=r[l],a=typeof t;l in Ht?(t===null||t&&(a==="string"||a==="number"))&&(o[l]=t):a===typeof o[l]&&(o[l]=l==="rotate"?t%4:t)}return o}const Bo=/[\s,]+/;function No(n,r){r.split(Bo).forEach(o=>{switch(o.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0;break}})}function zo(n,r=0){const o=n.replace(/^-?[0-9.]*/,"");function l(t){for(;t<0;)t+=4;return t%4}if(o===""){const t=parseInt(n);return isNaN(t)?0:l(t)}else if(o!==n){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let a=parseFloat(n.slice(0,n.length-o.length));return isNaN(a)?0:(a=a/t,a%1===0?l(a):0)}}return r}function Fo(n,r){let o=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in r)o+=" "+l+'="'+r[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+n+"</svg>"}function Lo(n){return n.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mo(n){return"data:image/svg+xml,"+Lo(n)}function Vo(n){return'url("'+Mo(n)+'")'}const Mt={...jt,inline:!1},_o={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},To={display:"inline-block"},tt={backgroundColor:"currentColor"},en={backgroundColor:"transparent"},Vt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},_t={webkitMask:tt,mask:tt,background:en};for(const n in _t){const r=_t[n];for(const o in Vt)r[n+o]=Vt[o]}const Ie={};["horizontal","vertical"].forEach(n=>{const r=n.slice(0,1)+"Flip";Ie[n+"-flip"]=r,Ie[n.slice(0,1)+"-flip"]=r,Ie[n+"Flip"]=r});function Tt(n){return n+(n.match(/^[-0-9.]+$/)?"px":"")}const It=(n,r)=>{const o=xo(Mt,r),l={..._o},t=r.mode||"svg",a={},s=r.style,c=typeof s=="object"&&!(s instanceof Array)?s:{};for(let f in r){const h=r[f];if(h!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":o[f]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&No(o,h);break;case"color":a.color=h;break;case"rotate":typeof h=="string"?o[f]=zo(h):typeof h=="number"&&(o[f]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete l["aria-hidden"];break;default:{const C=Ie[f];C?(h===!0||h==="true"||h===1)&&(o[C]=!0):Mt[f]===void 0&&(l[f]=h)}}}const d=Gn(n,o),b=d.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),t==="svg"){l.style={...a,...c},Object.assign(l,b);let f=0,h=r.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),l.innerHTML=Yn(d.body,h?()=>h+"ID"+f++:"iconifyVue"),e.h("svg",l)}const{body:g,width:E,height:N}=n,y=t==="mask"||(t==="bg"?!1:g.indexOf("currentColor")!==-1),v=Fo(g,{...b,width:E+"",height:N+""});return l.style={...a,"--svg":Vo(v),width:Tt(b.width),height:Tt(b.height),...To,...y?tt:en,...c},e.h("span",l)};Wt(!0);Xn("",ao);if(typeof document<"u"&&typeof window<"u"){Zt();const n=window;if(n.IconifyPreload!==void 0){const r=n.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(l=>{try{(typeof l!="object"||l===null||l instanceof Array||typeof l.icons!="object"||typeof l.prefix!="string"||!Rn(l))&&console.error(o)}catch{console.error(o)}})}if(n.IconifyProviders!==void 0){const r=n.IconifyProviders;if(typeof r=="object"&&r!==null)for(let o in r){const l="IconifyProviders["+o+"] is invalid.";try{const t=r[o];if(typeof t!="object"||!t||t.resources===void 0)continue;Zn(o,t)||console.error(l)}catch{console.error(l)}}}}const Io={...Re,body:""},te=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(n,r){if(typeof n=="object"&&n!==null&&typeof n.body=="string")return this._name="",this.abortLoading(),{data:n};let o;if(typeof n!="string"||(o=Oe(n,!1,!0))===null)return this.abortLoading(),null;const l=$n(o);if(!l)return(!this._loadingIcon||this._loadingIcon.name!==n)&&(this.abortLoading(),this._name="",l!==null&&(this._loadingIcon={name:n,abort:So([o],()=>{this.counter++})})),null;this.abortLoading(),this._name!==n&&(this._name=n,r&&r(n));const t=["iconify"];return o.prefix!==""&&t.push("iconify--"+o.prefix),o.provider!==""&&t.push("iconify--"+o.provider),{data:l,classes:t}}},render(){this.counter;const n=this.$attrs,r=this.iconMounted||n.ssr?this.getIcon(n.icon,n.onLoad):null;if(!r)return It(Io,n);let o=n;return r.classes&&(o={...n,class:(typeof n.class=="string"?n.class+" ":"")+r.classes.join(" ")}),It({...Re,...r.data},o)}}),Po={name:"buttonExpand"},Do=e.defineComponent({...Po,props:{item:{default:[]},expandedrows:{default:()=>new Map},expandall:{type:Boolean,default:!1}},setup(n){const r=n,o=e.toRef(r,"expandedrows"),l=e.ref(!1);function t(c){if(r.expandall)l.value=!l.value,o.value.forEach((d,b)=>{o.value.set(b,l.value)});else{const d=o.value.get(c);o.value.set(c,!d)}}const a=c=>c._rowIndex!==void 0?c._rowIndex:c.id||0,s=e.ref(-1);return e.watch(()=>o.value,()=>{if(!r.expandall)return;const c=Array.from(o.value.values());new Set(c).size>1?(s.value=-1,l.value=!0):c[0]?(s.value=0,l.value=!0):(s.value=1,l.value=!1)},{deep:!0}),(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:"expandbtn",onClick:d[0]||(d[0]=b=>t(a(c.item)))},[o.value.get(a(c.item))===!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r.expandall?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createBlock(e.unref(te),{key:0,icon:"fluent:chevron-down-up-16-filled"})):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"}))],64)):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"}))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[r.expandall?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value==-1?(e.openBlock(),e.createBlock(e.unref(te),{key:0,icon:"ion:chevron-expand"})):s.value==0?(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"})):(e.openBlock(),e.createBlock(e.unref(te),{key:2,icon:"mdi:chevron-right"}))],64)):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-right"}))],64))]))}}),ye=(n,r)=>{const o=n.__vccOpts||n;for(const[l,t]of r)o[l]=t;return o},nt=ye(Do,[["__scopeId","data-v-da3bc8d5"]]),$o={name:"ButtonRightPanel"},Oo=e.defineComponent({...$o,props:{item:{default:[]}},emits:["rightPanelClick"],setup(n,{emit:r}){const o=n,l=r;function t(){l("rightPanelClick",o.item)}return(a,s)=>(e.openBlock(),e.createElementBlock("button",{class:"rightpanelbtn",onClick:e.withModifiers(t,["stop"])},[e.createVNode(e.unref(te),{icon:"lucide:plus"})]))}}),Pt=ye(Oo,[["__scopeId","data-v-b373d5f7"]]),Ro={class:"bh-text-[13px] bh-font-normal bh-rounded bh-overflow-hidden"},Ao={name:"columnFilter"},qo=e.defineComponent({...Ao,props:["column","columnFilterLang"],emits:["close","filterChange"],setup(n,{emit:r}){const o=n,l=r,t=e.ref(null);Nn(t,()=>{l("close")});const a=s=>{o.column.condition=s,s===""&&(o.column.value=""),l("filterChange",o.column),l("close")};return(s,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"menuRef",ref:t,class:"bh-filter-menu bh-absolute bh-z-[1] bh-bg-white dark:bh-bg-gray-800 bh-shadow-md bh-rounded-md bh-top-full bh-right-0 bh-w-32 bh-mt-1 bh-border bh-border-solid bh-border-gray-200 dark:bh-border-gray-600"},[e.createElementVNode("div",Ro,[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition===""}),onClick:c[0]||(c[0]=e.withModifiers(d=>a(""),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NoFilter)??"No filter"),3),o.column.type==="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Contains"}),onClick:c[1]||(c[1]=e.withModifiers(d=>a("Contains"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Contains)??"Contains"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotContains"}),onClick:c[2]||(c[2]=e.withModifiers(d=>a("NotContains"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotContains)??"NotContains"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[3]||(c[3]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[4]||(c[4]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"NotEqual (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="StartsWith"}),onClick:c[5]||(c[5]=e.withModifiers(d=>a("StartsWith"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.StartsWith)??"StartsWith"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="EndsWith"}),onClick:c[6]||(c[6]=e.withModifiers(d=>a("EndsWith"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.EndsWith)??"EndsWith"),3)],64)):o.column.type==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[7]||(c[7]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[8]||(c[8]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"NotEqual (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThan"}),onClick:c[9]||(c[9]=e.withModifiers(d=>a("GreaterThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThan)??"GreaterThan (>)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThanOrEqual"}),onClick:c[10]||(c[10]=e.withModifiers(d=>a("GreaterThanOrEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThanOrEqual)??"GreaterThanOrEqual (>=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThan"}),onClick:c[11]||(c[11]=e.withModifiers(d=>a("LessThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThan)??"LessThan (<)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThanOrEqual"}),onClick:c[12]||(c[12]=e.withModifiers(d=>a("LessThanOrEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThanOrEqual)??"LessThanOrEqual (<=)"),3)],64)):o.column.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[13]||(c[13]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[14]||(c[14]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"Not equal (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThan"}),onClick:c[15]||(c[15]=e.withModifiers(d=>a("GreaterThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThan)??"GreaterThan (>)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThan"}),onClick:c[16]||(c[16]=e.withModifiers(d=>a("LessThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThan)??"LessThan (<)"),3)],64)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="IsNull"}),onClick:c[17]||(c[17]=e.withModifiers(d=>a("IsNull"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.IsNull)??"IsNull"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="IsNotNull"}),onClick:c[18]||(c[18]=e.withModifiers(d=>a("IsNotNull"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.IsNotNull)??"IsNotNull"),3)])],512))}}),De={string:[{value:"",label:"No Filter",icon:""},{value:"Contains",label:"Contains",icon:"⊃"},{value:"NotContains",label:"Not Contains",icon:"⊅"},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"StartsWith",label:"Starts With",icon:"a.."},{value:"EndsWith",label:"Ends With",icon:"..a"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],number:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"Greater Than (>)",icon:">"},{value:"GreaterThanOrEqual",label:"Greater or Equal (≥)",icon:"≥"},{value:"LessThan",label:"Less Than (<)",icon:"<"},{value:"LessThanOrEqual",label:"Less or Equal (≤)",icon:"≤"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],integer:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"Greater Than (>)",icon:">"},{value:"GreaterThanOrEqual",label:"Greater or Equal (≥)",icon:"≥"},{value:"LessThan",label:"Less Than (<)",icon:"<"},{value:"LessThanOrEqual",label:"Less or Equal (≤)",icon:"≤"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],date:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"After (>)",icon:">"},{value:"LessThan",label:"Before (<)",icon:"<"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],bool:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal",icon:"="},{value:"NotEqual",label:"Not Equal",icon:"≠"}]},Wo={class:"bh-p-2 bh-min-w-[200px]"},Ho={class:"bh-mb-2"},jo=e.createElementVNode("label",{class:"bh-text-xs bh-font-medium bh-text-gray-600 dark:bh-text-gray-400 bh-block bh-mb-1"}," Filter Condition ",-1),Uo=["value"],Go={key:0,class:"bh-border-t bh-border-gray-200 dark:bh-border-gray-600 bh-pt-2 bh-mt-2"},Qo=e.createElementVNode("label",{class:"bh-text-xs bh-font-medium bh-text-gray-600 dark:bh-text-gray-400 bh-block bh-mb-1"}," Sort ",-1),Ko={class:"bh-flex bh-flex-col bh-gap-1"},Jo={name:"columnFilterNew"},Yo=e.defineComponent({...Jo,props:["column","columnFilterLang","currentSortColumn","currentSortDirection"],emits:["close","filterChange","sortChange","clearFilter","conditionChange"],setup(n,{emit:r}){const o=n,l=r,t=e.ref(null),a=e.ref(null),s=e.ref(o.column.condition||""),c=e.ref(!1),d=e.computed(()=>{var C;const h=((C=o.column.type)==null?void 0:C.toLowerCase())||"string";return De[h]||De.string}),b=h=>{if(!o.columnFilterLang)return h.label;const C=h.value===""?"NoFilter":h.value;return o.columnFilterLang[C]||h.label},g=h=>{const _=h.target.value;c.value=!1,s.value=_,l("conditionChange",o.column.field,_),_===""&&(o.column.value=""),l("filterChange",o.column)},E=h=>o.currentSortColumn===o.column.field&&o.currentSortDirection===h,N=h=>{l("sortChange",o.column.field,h),l("close")},y=()=>{var C;const h=((C=o.column.type)==null?void 0:C.toLowerCase())||"string";o.column.condition=h==="string"?"Contains":"Equal",o.column.value="",s.value=o.column.condition,l("clearFilter",o.column),l("close")},v=h=>{const C=h.target;c.value||C.tagName==="SELECT"||C.tagName==="OPTION"||t.value&&t.value.contains(C)||C.closest(".bh-filter-button")||l("close")},f=h=>{h.key==="Escape"&&l("close")};return e.onMounted(()=>{e.nextTick(()=>{var h;(h=a.value)==null||h.focus(),document.addEventListener("click",v,!0),document.addEventListener("keydown",f)})}),e.onUnmounted(()=>{document.removeEventListener("click",v,!0),document.removeEventListener("keydown",f)}),(h,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:t,class:"bh-filter-dropdown-container bh-absolute bh-z-[100] bh-bg-white dark:bh-bg-gray-800 bh-shadow-lg bh-rounded bh-top-full bh-right-0 bh-mt-1 bh-border bh-border-solid bh-border-gray-300 dark:bh-border-gray-600"},[e.createElementVNode("div",Wo,[e.createElementVNode("div",Ho,[jo,e.withDirectives(e.createElementVNode("select",{ref_key:"selectRef",ref:a,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_),class:"bh-filter-select bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-border bh-border-gray-300 dark:bh-border-gray-600 bh-rounded bh-bg-white dark:bh-bg-gray-700 hover:bh-border-primary focus:bh-border-primary focus:bh-ring-1 focus:bh-ring-primary bh-outline-none bh-cursor-pointer bh-transition-colors",onFocus:C[1]||(C[1]=_=>c.value=!0),onBlur:C[2]||(C[2]=_=>c.value=!1),onChange:g},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,_=>(e.openBlock(),e.createElementBlock("option",{key:_.value,value:_.value},e.toDisplayString(_.icon?_.icon+" ":"")+e.toDisplayString(b(_)),9,Uo))),128))],544),[[e.vModelSelect,s.value]])]),o.column.sort!==!1?(e.openBlock(),e.createElementBlock("div",Go,[Qo,e.createElementVNode("div",Ko,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors",{"bh-bg-primary/10 bh-text-primary":E("asc"),"bh-bg-gray-50 dark:bh-bg-gray-700 hover:bh-bg-gray-100 dark:hover:bh-bg-gray-600":!E("asc")}]),onClick:C[3]||(C[3]=_=>N("asc"))}," ↑ Sort Ascending ",2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors",{"bh-bg-primary/10 bh-text-primary":E("desc"),"bh-bg-gray-50 dark:bh-bg-gray-700 hover:bh-bg-gray-100 dark:hover:bh-bg-gray-600":!E("desc")}]),onClick:C[4]||(C[4]=_=>N("desc"))}," ↓ Sort Descending ",2)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"bh-border-t bh-border-gray-200 dark:bh-border-gray-600 bh-pt-2 bh-mt-2"},[e.createElementVNode("button",{type:"button",class:"bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors bh-text-red-600 hover:bh-bg-red-50 dark:hover:bh-bg-red-900/20",onClick:y}," ✕ Clear Filter ")])])],512))}}),Xo={},Zo={version:"1.1",viewBox:"0 0 17 12",xmlns:"http://www.w3.org/2000/svg"},el=e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(-9 -11)",fill:"currentColor","fill-rule":"nonzero"},[e.createElementVNode("path",{d:"m25.576 11.414c0.56558 0.55188 0.56558 1.4439 0 1.9961l-9.404 9.176c-0.28213 0.27529-0.65247 0.41385-1.0228 0.41385-0.37034 0-0.74068-0.13855-1.0228-0.41385l-4.7019-4.588c-0.56584-0.55188-0.56584-1.4442 0-1.9961 0.56558-0.55214 1.4798-0.55214 2.0456 0l3.679 3.5899 8.3812-8.1779c0.56558-0.55214 1.4798-0.55214 2.0456 0z"})])],-1),tl=[el];function nl(n,r){return e.openBlock(),e.createElementBlock("svg",Zo,tl)}const ot=ye(Xo,[["render",nl]]),ol={},ll={viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:"css-i6dzq1"},rl=e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),al=[rl];function il(n,r){return e.openBlock(),e.createElementBlock("svg",ll,al)}const sl=ye(ol,[["render",il]]),cl={},ul={viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:"css-i6dzq1"},dl=e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1),fl=[dl];function hl(n,r){return e.openBlock(),e.createElementBlock("svg",ul,fl)}const ml=ye(cl,[["render",hl]]),pl={key:"hdrrow"},vl={class:"bh-checkbox"},gl=["onClick"],bl={width:"16",height:"16",viewBox:"0 0 14 14",fill:"none"},kl={key:0,class:"bh-filter bh-relative"},yl=["onUpdate:modelValue"],Cl=["onUpdate:modelValue"],wl=["onUpdate:modelValue"],El=["onUpdate:modelValue"],Sl=e.createElementVNode("option",{value:void 0},"All",-1),xl=e.createElementVNode("option",{value:!0},"True",-1),Bl=e.createElementVNode("option",{value:!1},"False",-1),Nl=[Sl,xl,Bl],zl={key:1,class:"bh-filter-input-wrapper"},Fl=["onUpdate:modelValue"],Ll=["onUpdate:modelValue"],Ml=["onUpdate:modelValue"],Vl=["onUpdate:modelValue"],_l=e.createElementVNode("option",{value:void 0},"All",-1),Tl=e.createElementVNode("option",{value:!0},"True",-1),Il=e.createElementVNode("option",{value:!1},"False",-1),Pl=[_l,Tl,Il],Dl=["onClick"],$l={name:"columnHeader"},Ve=e.defineComponent({...$l,props:["all","expandedrows","currentSortColumn","currentSortDirection","isOpenFilter","isFooter","checkAll","columnFilterLang"],emits:["selectAll","sortChange","filterChange","toggleFilterMenu","clearColumnFilter"],setup(n,{emit:r}){const o=e.ref(null),l=n,t=r,a=e.ref({}),s=e.ref({}),c=e.computed(()=>{var v;const y=new Map;return(v=l.all)!=null&&v.columns&&l.all.columns.forEach(f=>{f.field&&y.set(f.field,f)}),y});e.watch(()=>{var y;return(y=l.all)==null?void 0:y.columns},()=>{},{immediate:!0,deep:!0}),e.onMounted(()=>{var y;(y=l.all)!=null&&y.columns&&l.all.columns.forEach(v=>{v.filter&&v.field&&(a.value[v.field]=v.value||"",Bn(()=>a.value[v.field],f=>{const h=c.value.get(v.field);h&&(h.type==="string"||h.type==="String"?h.value=typeof f=="string"?f.trim():f:h.value=f,t("filterChange"))},{debounce:300}))})});const d=()=>{o.value&&(o.value.indeterminate=l.checkAll!==0?!l.checkAll:!1,o.value.checked=l.checkAll)};e.watch(()=>l.checkAll,d);const b=y=>{if(!y.field)return!1;const v=a.value[y.field];return v!==""&&v!==null&&v!==void 0},g=y=>{const v=s.value[y.field]??y.condition;return v&&v!==""},E=y=>s.value[y.field]??y.condition??"",N=y=>{var _;const v=E(y);if(!v||v==="")return"";const f=((_=y.type)==null?void 0:_.toLowerCase())||"string",C=(De[f]||De.string).find(O=>O.value===v);return C?l.columnFilterLang&&l.columnFilterLang[v]?l.columnFilterLang[v]:C.label:v};return(y,v)=>(e.openBlock(),e.createElementBlock("tr",pl,[l.all.hasCheckbox?(e.openBlock(),e.createElementBlock("th",{key:"chkall",style:e.normalizeStyle({width:l.all.checkboxColumnWidth+" !important",minWidth:l.all.checkboxColumnWidth+" !important"}),class:e.normalizeClass({"bh-sticky bh-bg-blue-light bh-z-[1]":l.all.stickyHeader||l.all.stickyFirstColumn,"bh-top-0":l.all.stickyHeader,"bh-left-0":l.all.stickyFirstColumn})},[e.createElementVNode("div",vl,[e.createElementVNode("input",{ref_key:"selectedAll",ref:o,type:"checkbox",onClick:v[0]||(v[0]=e.withModifiers(f=>{var h;return t("selectAll",(h=f==null?void 0:f.target)==null?void 0:h.checked)},["stop"]))},null,512),e.createElementVNode("div",null,[e.createVNode(ot,{class:"check"}),e.createVNode(sl,{class:"intermediate"})])])],6)):e.createCommentVNode("",!0),l.all.hasRightPanel?(e.openBlock(),e.createElementBlock("th",{key:1,style:e.normalizeStyle({width:l.all.rightPanelColumnWidth+" !important",minWidth:l.all.rightPanelColumnWidth+" !important"}),class:e.normalizeClass({"bh-sticky bh-bg-blue-light bh-z-[1]":l.all.stickyHeader||l.all.stickyFirstColumn,"bh-top-0":l.all.stickyHeader,"bh-left-0":l.all.stickyFirstColumn})},null,6)):e.createCommentVNode("",!0),l.all.hasSubtable?(e.openBlock(),e.createElementBlock("th",{key:2,style:e.normalizeStyle({width:l.all.subtableColumnWidth+" !important",minWidth:l.all.subtableColumnWidth+" !important"})},[l.all.expandall?(e.openBlock(),e.createBlock(nt,{key:0,expandedrows:l.expandedrows,expandall:l.all.expandall},null,8,["expandedrows","expandall"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.all.columns,(f,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.hide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("th",{key:f.field,class:e.normalizeClass(["bh-select-none bh-z-[1]",[l.all.sortable&&f.sort?"bh-cursor-pointer":"",h===0&&l.all.stickyFirstColumn?"bh-sticky bh-left-0 bh-bg-blue-light":"",l.all.hasCheckbox&&h===0&&l.all.stickyFirstColumn?"bh-left-[52px]":""]]),style:e.normalizeStyle({width:f.width,"min-width":f.minWidth,"max-width":f.maxWidth})},[e.createElementVNode("div",{class:e.normalizeClass(["bh-flex bh-items-center",[f.headerClass?f.headerClass:""]]),onClick:C=>l.all.sortable&&f.sort&&t("sortChange",f.field)},[e.createTextVNode(e.toDisplayString(f.title)+" ",1),l.all.sortable&&f.sort?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["bh-ml-3 bh-sort bh-flex bh-items-center",[l.currentSortColumn,l.currentSortDirection]])},[(e.openBlock(),e.createElementBlock("svg",bl,[e.createElementVNode("polygon",{points:"3.11,6.25 10.89,6.25 7,1.75 ",fill:"currentColor",class:e.normalizeClass(["bh-text-black/20",[n.currentSortColumn===f.field&&n.currentSortDirection==="asc"?"!bh-text-primary":""]])},null,2),e.createElementVNode("polygon",{points:"7,12.25 10.89,7.75 3.11,7.75 ",fill:"currentColor",class:e.normalizeClass(["bh-text-black/20",[n.currentSortColumn===f.field&&n.currentSortDirection==="desc"?"!bh-text-primary":""]])},null,2)]))],2)):e.createCommentVNode("",!0)],10,gl),l.all.columnFilter&&!l.isFooter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.filter?(e.openBlock(),e.createElementBlock("div",kl,[l.all.showFloatingFilterLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.type==="string"||f.type==="String"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"text",class:"bh-form-control"},null,8,yl)),[[e.vModelText,a.value[f.field]]]):e.createCommentVNode("",!0),f.type==="number"||f.type==="integer"||f.type==="Integer"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"number",class:"bh-form-control"},null,8,Cl)),[[e.vModelText,a.value[f.field],void 0,{number:!0}]]):f.type==="date"||f.type==="DateTime"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"date",class:"bh-form-control"},null,8,wl)),[[e.vModelText,a.value[f.field]]]):f.type==="bool"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:3,"onUpdate:modelValue":C=>a.value[f.field]=C,class:"bh-form-control",onClick:v[1]||(v[1]=(...C)=>l.isOpenFilter&&l.isOpenFilter(...C))},Nl,8,El)),[[e.vModelSelect,a.value[f.field]]]):e.createCommentVNode("",!0)],64)),l.all.showFloatingFilterLabel?(e.openBlock(),e.createElementBlock("div",zl,[g(f)&&l.all.useNewColumnFilter?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["bh-floating-label",{"bh-floating-label--active":b(f)}])},e.toDisplayString(N(f)),3)):e.createCommentVNode("",!0),f.type==="string"||f.type==="String"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"text",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Fl)),[[e.vModelText,a.value[f.field]]]):e.createCommentVNode("",!0),f.type==="number"||f.type==="integer"||f.type==="Integer"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"number",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Ll)),[[e.vModelText,a.value[f.field],void 0,{number:!0}]]):f.type==="date"||f.type==="DateTime"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:3,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"date",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Ml)),[[e.vModelText,a.value[f.field]]]):f.type==="bool"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:4,"onUpdate:modelValue":C=>a.value[f.field]=C,class:"bh-form-control",onClick:v[2]||(v[2]=(...C)=>l.isOpenFilter&&l.isOpenFilter(...C))},Pl,8,Vl)),[[e.vModelSelect,a.value[f.field]]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.type!=="bool"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["bh-filter-button",{"!bh-bg-primary/10 !bh-border-primary":g(f),"bh-bg-[#e0e6ed] dark:bh-bg-gray-700":!g(f),"bh-filter-button--with-label":l.all.showFloatingFilterLabel}]),onClick:e.withModifiers(C=>t("toggleFilterMenu",f),["stop"])},[e.createVNode(ml,{class:e.normalizeClass(["bh-w-4",{"bh-text-primary":g(f),"bh-text-black/70 dark:bh-text-gray-300":!g(f)}])},null,8,["class"])],10,Dl)):e.createCommentVNode("",!0),l.all.useNewColumnFilter?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(qo,{key:3,column:f,type:f.type,columnFilterLang:l.columnFilterLang,onClose:v[3]||(v[3]=C=>t("toggleFilterMenu",null)),onFilterChange:v[4]||(v[4]=C=>t("filterChange"))},null,8,["column","type","columnFilterLang"])),[[e.vShow,l.isOpenFilter===f.field]]),l.all.useNewColumnFilter?e.withDirectives((e.openBlock(),e.createBlock(Yo,{key:4,column:f,columnFilterLang:l.columnFilterLang,currentSortColumn:l.currentSortColumn,currentSortDirection:l.currentSortDirection,onClose:v[5]||(v[5]=C=>t("toggleFilterMenu",null)),onFilterChange:v[6]||(v[6]=C=>t("filterChange")),onSortChange:v[7]||(v[7]=(C,_)=>t("sortChange",C,_)),onConditionChange:v[8]||(v[8]=(C,_)=>{const O=c.value.get(C);O&&(O.condition=_,s.value.value[C]=_)}),onClearFilter:C=>{a.value[C.field]="",C.value="",C.condition="",s.value.value[C.field]="",l.currentSortColumn===C.field&&t("sortChange",l.all.sortColumn||C.field,"asc"),t("filterChange")}},null,8,["column","columnFilterLang","currentSortColumn","currentSortDirection","onClearFilter"])),[[e.vShow,l.isOpenFilter===f.field]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],6))],64))),256))]))}}),Ol={class:"bh-datatable bh-antialiased bh-relative bh-text-black bh-text-sm bh-font-normal"},Rl={class:"bh-flex bh-h-full"},Al=e.createElementVNode("span",null,"##Left Menu Slot##",-1),ql={key:0,class:"menu-resize-controls bh-absolute bh-right-0 bh-top-1/2 bh-transform -bh-translate-y-1/2 bh-z-10 bh-bg-gray-100 bh-rounded-l bh-shadow-md bh-select-none"},Wl=e.createElementVNode("path",{d:"M7 1L1 6L7 11",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Hl=[Wl],jl={class:"bh-flex-1",style:{overflow:"auto","min-width":"0",width:"100%"}},Ul=e.createElementVNode("span",null,"##Top Menu Slot##",-1),Gl=e.createElementVNode("span",null,"##Table Header Area Slot##",-1),Ql=e.createElementVNode("span",null,"##Table Action Header Slot##",-1),Kl=["onClick"],Jl={class:"bh-checkbox"},Yl=["value"],Xl=["innerHTML"],Zl=["onClick"],er=["colspan"],tr=["colspan"],nr=e.createElementVNode("div",{class:"bh-skeleton-box bh-h-8"},null,-1),or=[nr],lr=["colspan"],rr=e.createElementVNode("span",null,"##Table Header Area Slot##",-1),ar=["onClick"],ir={class:"bh-checkbox"},sr=["value"],cr=["innerHTML"],ur=["onClick"],dr=["colspan"],fr=["colspan"],hr=e.createElementVNode("div",{class:"bh-skeleton-box bh-h-8"},null,-1),mr=[hr],pr=["colspan"],vr={class:"bh-flex bh-items-center bh-flex-wrap bh-flex-col sm:bh-flex-row bh-gap-4"},gr={class:"bh-pagination-info bh-flex bh-items-center"},br={class:"bh-mr-2"},kr=["value"],yr={class:"bh-pagination-number sm:bh-ml-auto bh-inline-flex bh-items-center bh-space-x-1"},Cr=["innerHTML"],wr={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Er=e.createElementVNode("g",{fill:"currentColor","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"}),e.createElementVNode("path",{d:"M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"})],-1),Sr=[Er],xr=["innerHTML"],Br={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Nr=e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"},null,-1),zr=[Nr],Fr=["onClick"],Lr=["innerHTML"],Mr={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Vr=e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708z"},null,-1),_r=[Vr],Tr=["innerHTML"],Ir={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Pr=e.createElementVNode("g",{fill:"currentColor","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8L3.646 2.354a.5.5 0 0 1 0-.708z"}),e.createElementVNode("path",{d:"M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8L7.646 2.354a.5.5 0 0 1 0-.708z"})],-1),Dr=[Pr],$r={name:"Vue3Datatable"},Or=e.defineComponent({...$r,props:{loading:{type:Boolean,default:!1},isServerMode:{type:Boolean,default:!1},skin:{default:"bh-table-striped bh-table-hover"},totalRows:{default:0},rows:{default:()=>[]},footerRows:{default:()=>[]},columns:{default:()=>[]},hasCheckbox:{type:Boolean,default:!1},hasSubtable:{type:Boolean,default:!1},hasRightPanel:{type:Boolean,default:!1},checkboxColumnWidth:{default:"40px"},rightPanelColumnWidth:{default:"40px"},subtableColumnWidth:{default:"40px"},subtableMaxHeight:{default:"400px"},subtableLazyLoading:{type:Boolean,default:!1},expandall:{type:Boolean,default:!1},search:{default:""},columnChooser:{type:Boolean,default:!1},page:{default:1},pageSize:{default:10},pageSizeOptions:{default:()=>[10,20,30,50,100]},showPageSize:{type:Boolean,default:!0},rowClass:{default:[]},cellClass:{default:[]},sortable:{type:Boolean,default:!1},sortColumn:{default:"id"},sortDirection:{default:"asc"},columnFilter:{type:Boolean,default:!1},columnFilterLang:{default:null},useNewColumnFilter:{type:Boolean,default:!1},showFloatingFilterLabel:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},showNumbers:{type:Boolean,default:!0},showNumbersCount:{default:5},showFirstPage:{type:Boolean,default:!0},showLastPage:{type:Boolean,default:!0},firstArrow:{default:""},lastArrow:{default:""},nextArrow:{default:""},previousArrow:{default:""},paginationInfo:{default:"Showing {0} to {1} of {2} entries"},noDataContent:{default:"There is no data that match your query."},stickyHeader:{type:Boolean,default:!1},stickyFooter:{type:Boolean,default:!1},height:{default:"500px"},stickyFirstColumn:{type:Boolean,default:!1},cloneHeaderInFooter:{type:Boolean,default:!1},selectRowOnClick:{type:Boolean,default:!1},enableleftmenu:{type:Boolean},enabletopmenu:{type:Boolean},enableHeaderArea:{type:Boolean,default:!1},headerAreaHeight:{default:"80px"},leftmenuMinWidth:{default:50},leftmenuDefaultWidth:{default:250},showResizeButton:{type:Boolean,default:!1},topmenusize:{},topmenumax:{},topmenumin:{},skeletonloader:{type:Boolean},enableloadinganimation:{type:Boolean},enablefooterpagination:{type:Boolean},alwaysShowPagination:{type:Boolean,default:!1},footerOffset:{default:0},tableRightOffset:{default:0},tableLeftOffset:{default:5},initialLeftMenuState:{type:Boolean,default:void 0}},emits:["change","sortChange","searchChange","pageChange","pageSizeChange","rowSelect","filterChange","rowClick","rowDBClick","currentTopMenuSize","currentLeftMenuSize","rowRightPanelClick"],setup(n,{expose:r,emit:o}){var pt,vt;const l=e.useSlots(),t=n;for(const i of t.columns||[]){const m=((pt=i.type)==null?void 0:pt.toLowerCase())||"string";i.type=m,i.isUnique=i.isUnique!==void 0?i.isUnique:!1,i.hide=i.hide!==void 0?i.hide:!1,i.filter=i.filter!==void 0?i.filter:!0,i.search=i.search!==void 0?i.search:!0,i.sort=i.sort!==void 0?i.sort:!0,i.html=i.html!==void 0?i.html:!1,i.condition=!m||m==="string"?"Contains":"Equal"}const a=e.ref([]),s=e.ref(t.page),c=e.ref(t.pagination?t.pageSize:(vt=t.rows)==null?void 0:vt.length),d=t.pageSize,b=e.ref(t.sortColumn),g=t.sortColumn,E=e.ref(t.sortDirection),N=t.sortDirection,y=e.ref(t.totalRows),v=e.ref([]),f=e.ref(null),h=e.ref(t.loading),C=e.ref(t.search);JSON.parse(JSON.stringify(t.columns));const _=e.ref(null),O=e.ref(null);let R=e.ref(0);const oe=e.ref(230),T=e.ref(t.leftmenuDefaultWidth),P=e.ref(!1),G=e.ref(null),H=new Map,V=(i,m)=>{if(!m)return;const p=`${i.id||JSON.stringify(i)}-${m}`;if(H.has(p))return H.get(p);const M=m.split(".").reduce((z,A)=>z==null?void 0:z[A],i);return H.set(p,M),M};e.watch(()=>t.rows,()=>{H.clear()},{deep:!1});const W=e.computed(()=>{const i=t.columns.find(m=>m.isUnique);return(i==null?void 0:i.field)||null}),X=e.computed(()=>W.value?new Map(a.value.map((i,m)=>[m,i[W.value]])):null),ie=i=>{var m;return W.value?((m=X.value)==null?void 0:m.get(i))??i:i},ue=(i,m)=>{const p=i._rowIndex!==void 0?i._rowIndex:i.id||m;return U.value.get(p)===!0},se=e.computed(()=>typeof t.rowClass=="function"),Z=e.computed(()=>typeof t.cellClass=="function"),de=new Map,qe=i=>{const m=i?"numeric":"string";return de.has(m)||de.set(m,new Intl.Collator(void 0,{numeric:i,sensitivity:"base"})),de.get(m)},Ce=e.computed(()=>{var M,z,A;let i=t.rows||[];if(!t.isServerMode){if((M=t.columns)==null||M.forEach(k=>{k.filter&&(k.value!==void 0&&k.value!==null&&k.value!==""||k.condition==="IsNull"||k.condition=="IsNotNull")&&(k.type==="string"?(k.value&&!k.condition&&(k.condition="Contains"),k.condition==="Contains"?i=i.filter(F=>{var $;return($=V(F,k.field))==null?void 0:$.toString().toLowerCase().includes(k.value.toLowerCase())}):k.condition==="NotContains"?i=i.filter(F=>{var $;return!(($=V(F,k.field))!=null&&$.toString().toLowerCase().includes(k.value.toLowerCase()))}):k.condition==="Equal"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase())===k.value.toLowerCase()}):k.condition==="NotEqual"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase())!==k.value.toLowerCase()}):k.condition=="StartsWith"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase().indexOf(k.value.toLowerCase()))===0}):k.condition=="EndsWith"&&(i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase().substr(k.value.length*-1))===k.value.toLowerCase()}))):k.type==="number"?(k.value&&!k.condition&&(k.condition="Equal"),k.condition==="Equal"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))===parseFloat(k.value)):k.condition==="NotEqual"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))!==parseFloat(k.value)):k.condition==="GreaterThan"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))>parseFloat(k.value)):k.condition==="GreaterThanOrEqual"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))>=parseFloat(k.value)):k.condition==="LessThan"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))<parseFloat(k.value)):k.condition==="LessThanOrEqual"&&(i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))<=parseFloat(k.value)))):k.type==="date"?(k.value&&!k.condition&&(k.condition="Equal"),k.condition==="Equal"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))===k.value):k.condition==="NotEqual"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))!==k.value):k.condition==="GreaterThan"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))>k.value):k.condition==="LessThan"&&(i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))<k.value))):k.type==="bool"&&(i=i.filter(F=>V(F,k.field)===k.value)),k.condition==="IsNull"?(i=i.filter(F=>V(F,k.field)==null||V(F,k.field)==""),k.value=""):k.condition==="IsNotNull"&&(k.value="",i=i.filter(F=>V(F,k.field))))}),C.value&&(i!=null&&i.length)){let k=[];const F=(t.columns||[]).filter($=>$.search&&!$.hide).map($=>$.field);for(var m=0;m<(i==null?void 0:i.length);m++)for(var p=0;p<F.length;p++)if((z=V(i[m],F[p]))!=null&&z.toString().toLowerCase().includes(C.value.toLowerCase())){k.push(i[m]);break}i=k}const ee=((A=t.columns.find(k=>k.field==b.value))==null?void 0:A.type)==="number",hn=qe(ee||!1),mn=E.value==="desc"?-1:1;i.sort((k,F)=>{var gt,bt;const $=(gt=b.value)==null?void 0:gt.split(".").reduce((re,He)=>re==null?void 0:re[He],k),pn=(bt=b.value)==null?void 0:bt.split(".").reduce((re,He)=>re==null?void 0:re[He],F);return hn.compare($,pn)*mn})}return i}),U=e.ref(new Map),Y=()=>{let i=[],m=Ce.value;t.isServerMode?(y.value=t.totalRows||0,i=m):(y.value=(m==null?void 0:m.length)||0,i=m.slice(w.value-1,B.value)),t.hasSubtable&&i.forEach(function(p,M){if(p.isExpanded!==void 0){const z=p._rowIndex!==void 0?p._rowIndex:p.id||M;U.value.set(z,p.isExpanded)}}),a.value=i||[]},le=()=>{if(G.value){const i=P.value?t.leftmenuMinWidth:t.leftmenuDefaultWidth;G.value.style.cssText=`
|
|
1
|
+
"use strict";const e=require("vue");function Dt(n){return e.getCurrentScope()?(e.onScopeDispose(n),!0):!1}function ge(n){return typeof n=="function"?n():e.unref(n)}const $t=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vn=Object.prototype.toString,gn=n=>vn.call(n)==="[object Object]",ne=()=>{},bn=kn();function kn(){var n,r;return $t&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((r=window==null?void 0:window.navigator)==null?void 0:r.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function lt(n,r){function o(...l){return new Promise((t,a)=>{Promise.resolve(n(()=>r.apply(this,l),{fn:r,thisArg:this,args:l})).then(t).catch(a)})}return o}const yn=n=>n();function Ot(n,r={}){let o,l,t=ne;const a=c=>{clearTimeout(c),t(),t=ne};return c=>{const d=ge(n),b=ge(r.maxWait);return o&&a(o),d<=0||b!==void 0&&b<=0?(l&&(a(l),l=null),Promise.resolve(c())):new Promise((g,E)=>{t=r.rejectOnCancel?E:g,b&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(c())},b)),o=setTimeout(()=>{l&&a(l),l=null,g(c())},d)})}}function Cn(...n){let r=0,o,l=!0,t=ne,a,s,c,d,b;!e.isRef(n[0])&&typeof n[0]=="object"?{delay:s,trailing:c=!0,leading:d=!0,rejectOnCancel:b=!1}=n[0]:[s,c=!0,d=!0,b=!1]=n;const g=()=>{o&&(clearTimeout(o),o=void 0,t(),t=ne)};return N=>{const y=ge(s),v=Date.now()-r,f=()=>a=N();return g(),y<=0?(r=Date.now(),f()):(v>y&&(d||!l)?(r=Date.now(),f()):c&&(a=new Promise((h,C)=>{t=b?C:h,o=setTimeout(()=>{r=Date.now(),l=!0,h(f()),g()},Math.max(0,y-v))})),!d&&!o&&(o=setTimeout(()=>l=!0,y)),l=!1,a)}}function wn(n){return e.getCurrentInstance()}function kt(n,r=200,o={}){return lt(Ot(r,o),n)}function En(n,r=200,o=!1,l=!0,t=!1){return lt(Cn(r,o,l,t),n)}function Sn(n,r,o={}){const{eventFilter:l=yn,...t}=o;return e.watch(n,lt(l,r),t)}function xn(n,r=!0,o){wn()?e.onMounted(n,o):r?n():e.nextTick(n)}function Bn(n,r,o={}){const{debounce:l=0,maxWait:t=void 0,...a}=o;return Sn(n,r,{...a,eventFilter:Ot(l,{maxWait:t})})}function J(n){var r;const o=ge(n);return(r=o==null?void 0:o.$el)!=null?r:o}const $e=$t?window:void 0;function je(...n){let r,o,l,t;if(typeof n[0]=="string"||Array.isArray(n[0])?([o,l,t]=n,r=$e):[r,o,l,t]=n,!r)return ne;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],s=()=>{a.forEach(g=>g()),a.length=0},c=(g,E,N,y)=>(g.addEventListener(E,N,y),()=>g.removeEventListener(E,N,y)),d=e.watch(()=>[J(r),ge(t)],([g,E])=>{if(s(),!g)return;const N=gn(E)?{...E}:E;a.push(...o.flatMap(y=>l.map(v=>c(g,y,v,N))))},{immediate:!0,flush:"post"}),b=()=>{d(),s()};return Dt(b),b}let yt=!1;function Nn(n,r,o={}){const{window:l=$e,ignore:t=[],capture:a=!0,detectIframe:s=!1}=o;if(!l)return ne;bn&&!yt&&(yt=!0,Array.from(l.document.body.children).forEach(N=>N.addEventListener("click",ne)),l.document.documentElement.addEventListener("click",ne));let c=!0;const d=N=>t.some(y=>{if(typeof y=="string")return Array.from(l.document.querySelectorAll(y)).some(v=>v===N.target||N.composedPath().includes(v));{const v=J(y);return v&&(N.target===v||N.composedPath().includes(v))}}),g=[je(l,"click",N=>{const y=J(n);if(!(!y||y===N.target||N.composedPath().includes(y))){if(N.detail===0&&(c=!d(N)),!c){c=!0;return}r(N)}},{passive:!0,capture:a}),je(l,"pointerdown",N=>{const y=J(n);c=!d(N)&&!!(y&&!N.composedPath().includes(y))},{passive:!0}),s&&je(l,"blur",N=>{setTimeout(()=>{var y;const v=J(n);((y=l.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(v!=null&&v.contains(l.document.activeElement))&&r(N)},0)})].filter(Boolean);return()=>g.forEach(N=>N())}function zn(){const n=e.ref(!1),r=e.getCurrentInstance();return r&&e.onMounted(()=>{n.value=!0},r),n}function Fn(n){const r=zn();return e.computed(()=>(r.value,!!n()))}function Ln(n,r,o={}){const{window:l=$e,...t}=o;let a;const s=Fn(()=>l&&"ResizeObserver"in l),c=()=>{a&&(a.disconnect(),a=void 0)},d=e.computed(()=>Array.isArray(n)?n.map(E=>J(E)):[J(n)]),b=e.watch(d,E=>{if(c(),s.value&&l){a=new ResizeObserver(r);for(const N of E)N&&a.observe(N,t)}},{immediate:!0,flush:"post"}),g=()=>{c(),b()};return Dt(g),{isSupported:s,stop:g}}function Mn(n,r={width:0,height:0},o={}){const{window:l=$e,box:t="content-box"}=o,a=e.computed(()=>{var E,N;return(N=(E=J(n))==null?void 0:E.namespaceURI)==null?void 0:N.includes("svg")}),s=e.ref(r.width),c=e.ref(r.height),{stop:d}=Ln(n,([E])=>{const N=t==="border-box"?E.borderBoxSize:t==="content-box"?E.contentBoxSize:E.devicePixelContentBoxSize;if(l&&a.value){const y=J(n);if(y){const v=y.getBoundingClientRect();s.value=v.width,c.value=v.height}}else if(N){const y=Array.isArray(N)?N:[N];s.value=y.reduce((v,{inlineSize:f})=>v+f,0),c.value=y.reduce((v,{blockSize:f})=>v+f,0)}else s.value=E.contentRect.width,c.value=E.contentRect.height},o);xn(()=>{const E=J(n);E&&(s.value="offsetWidth"in E?E.offsetWidth:r.width,c.value="offsetHeight"in E?E.offsetHeight:r.height)});const b=e.watch(()=>J(n),E=>{s.value=E?r.width:0,c.value=E?r.height:0});function g(){d(),b()}return{width:s,height:c,stop:g}}const Ct={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(n,{emit:r}){const o=r,l=n,t=e.useSlots(),a=e.ref([]),s=e.computed(()=>a.value.reduce((u,w)=>(u[~~w.id]=w)&&u,{})),c=e.computed(()=>a.value.length),d=e.ref(null),b=e.ref(!1),g=e.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),E=e.ref({splitter:null,timeoutId:null}),N=e.computed(()=>({[`splitpanes splitpanes--${l.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":g.value.dragging})),y=()=>{document.addEventListener("mousemove",h,{passive:!1}),document.addEventListener("mouseup",C),"ontouchstart"in window&&(document.addEventListener("touchmove",h,{passive:!1}),document.addEventListener("touchend",C))},v=()=>{document.removeEventListener("mousemove",h,{passive:!1}),document.removeEventListener("mouseup",C),"ontouchstart"in window&&(document.removeEventListener("touchmove",h,{passive:!1}),document.removeEventListener("touchend",C))},f=(u,w)=>{const B=u.target.closest(".splitpanes__splitter");if(B){const{left:S,top:x}=B.getBoundingClientRect(),{clientX:L,clientY:I}="ontouchstart"in window&&u.touches?u.touches[0]:u;g.value.cursorOffset=l.horizontal?I-x:L-S}y(),g.value.mouseDown=!0,g.value.activeSplitter=w},h=u=>{g.value.mouseDown&&(u.preventDefault(),g.value.dragging=!0,requestAnimationFrame(()=>{P(oe(u)),D("resize",{event:u},!0)}))},C=u=>{g.value.dragging&&D("resized",{event:u},!0),g.value.mouseDown=!1,g.value.activeSplitter=null,setTimeout(()=>{g.value.dragging=!1,v()},100)},_=(u,w)=>{"ontouchstart"in window&&(u.preventDefault(),E.value.splitter===w?(clearTimeout(E.value.timeoutId),E.value.timeoutId=null,O(u,w),E.value.splitter=null):(E.value.splitter=w,E.value.timeoutId=setTimeout(()=>E.value.splitter=null,500))),g.value.dragging||D("splitter-click",{event:u,index:w},!0)},O=(u,w)=>{if(D("splitter-dblclick",{event:u,index:w},!0),l.maximizePanes){let B=0;a.value=a.value.map((S,x)=>(S.size=x===w?S.max:S.min,x!==w&&(B+=S.min),S)),a.value[w].size-=B,D("pane-maximize",{event:u,index:w,pane:a.value[w]}),D("resized",{event:u,index:w},!0)}},R=(u,w)=>{D("pane-click",{event:u,index:s.value[w].index,pane:s.value[w]})},oe=u=>{const w=d.value.getBoundingClientRect(),{clientX:B,clientY:S}="ontouchstart"in window&&u.touches?u.touches[0]:u;return{x:B-(l.horizontal?0:g.value.cursorOffset)-w.left,y:S-(l.horizontal?g.value.cursorOffset:0)-w.top}},T=u=>{u=u[l.horizontal?"y":"x"];const w=d.value[l.horizontal?"clientHeight":"clientWidth"];return l.rtl&&!l.horizontal&&(u=w-u),u*100/w},P=u=>{const w=g.value.activeSplitter;let B={prevPanesSize:H(w),nextPanesSize:V(w),prevReachedMinPanes:0,nextReachedMinPanes:0};const S=0+(l.pushOtherPanes?0:B.prevPanesSize),x=100-(l.pushOtherPanes?0:B.nextPanesSize),L=Math.max(Math.min(T(u),x),S);let I=[w,w+1],q=a.value[I[0]]||null,j=a.value[I[1]]||null;const Se=q.max<100&&L>=q.max+B.prevPanesSize,We=j.max<100&&L<=100-(j.max+V(w+1));if(Se||We){Se?(q.size=q.max,j.size=Math.max(100-q.max-B.prevPanesSize-B.nextPanesSize,0)):(q.size=Math.max(100-j.max-B.prevPanesSize-V(w+1),0),j.size=j.max);return}if(l.pushOtherPanes){const xe=G(B,L);if(!xe)return;({sums:B,panesToResize:I}=xe),q=a.value[I[0]]||null,j=a.value[I[1]]||null}q!==null&&(q.size=Math.min(Math.max(L-B.prevPanesSize-B.prevReachedMinPanes,q.min),q.max)),j!==null&&(j.size=Math.min(Math.max(100-L-B.nextPanesSize-B.nextReachedMinPanes,j.min),j.max))},G=(u,w)=>{const B=g.value.activeSplitter,S=[B,B+1];return w<u.prevPanesSize+a.value[S[0]].min&&(S[0]=W(B).index,u.prevReachedMinPanes=0,S[0]<B&&a.value.forEach((x,L)=>{L>S[0]&&L<=B&&(x.size=x.min,u.prevReachedMinPanes+=x.min)}),u.prevPanesSize=H(S[0]),S[0]===void 0)?(u.prevReachedMinPanes=0,a.value[0].size=a.value[0].min,a.value.forEach((x,L)=>{L>0&&L<=B&&(x.size=x.min,u.prevReachedMinPanes+=x.min)}),a.value[S[1]].size=100-u.prevReachedMinPanes-a.value[0].min-u.prevPanesSize-u.nextPanesSize,null):w>100-u.nextPanesSize-a.value[S[1]].min&&(S[1]=X(B).index,u.nextReachedMinPanes=0,S[1]>B+1&&a.value.forEach((x,L)=>{L>B&&L<S[1]&&(x.size=x.min,u.nextReachedMinPanes+=x.min)}),u.nextPanesSize=V(S[1]-1),S[1]===void 0)?(u.nextReachedMinPanes=0,a.value.forEach((x,L)=>{L<c.value-1&&L>=B+1&&(x.size=x.min,u.nextReachedMinPanes+=x.min)}),a.value[S[0]].size=100-u.prevPanesSize-V(S[0]-1),null):{sums:u,panesToResize:S}},H=u=>a.value.reduce((w,B,S)=>w+(S<u?B.size:0),0),V=u=>a.value.reduce((w,B,S)=>w+(S>u+1?B.size:0),0),W=u=>[...a.value].reverse().find(w=>w.index<u&&w.size>w.min)||{},X=u=>a.value.find(w=>w.index>u+1&&w.size>w.min)||{},ie=()=>{var u;const w=Array.from(((u=d.value)==null?void 0:u.children)||[]);for(const B of w){const S=B.classList.contains("splitpanes__pane"),x=B.classList.contains("splitpanes__splitter");!S&&!x&&(B.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ue=(u,w,B=!1)=>{const S=u-1,x=document.createElement("div");x.classList.add("splitpanes__splitter"),B||(x.onmousedown=L=>f(L,S),typeof window<"u"&&"ontouchstart"in window&&(x.ontouchstart=L=>f(L,S)),x.onclick=L=>_(L,S+1)),x.ondblclick=L=>O(L,S+1),w.parentNode.insertBefore(x,w)},se=u=>{u.onmousedown=void 0,u.onclick=void 0,u.ondblclick=void 0,u.remove()},Z=()=>{var u;const w=Array.from(((u=d.value)==null?void 0:u.children)||[]);for(const S of w)S.className.includes("splitpanes__splitter")&&se(S);let B=0;for(const S of w)S.className.includes("splitpanes__pane")&&(!B&&l.firstSplitter?ue(B,S,!0):B&&ue(B,S),B++)},de=({uid:u,...w})=>{const B=s.value[u];for(const[S,x]of Object.entries(w))B[S]=x},qe=u=>{var w;let B=-1;Array.from(((w=d.value)==null?void 0:w.children)||[]).some(S=>(S.className.includes("splitpanes__pane")&&B++,S.isSameNode(u.el))),a.value.splice(B,0,{...u,index:B}),a.value.forEach((S,x)=>S.index=x),b.value&&e.nextTick(()=>{Z(),U({addedPane:a.value[B]}),D("pane-add",{pane:a.value[B]})})},Ce=u=>{const w=a.value.findIndex(S=>S.id===u);a.value[w].el=null;const B=a.value.splice(w,1)[0];a.value.forEach((S,x)=>S.index=x),e.nextTick(()=>{Z(),D("pane-remove",{pane:B}),U({removedPane:{...B}})})},U=(u={})=>{!u.addedPane&&!u.removedPane?le():a.value.some(w=>w.givenSize!==null||w.min||w.max<100)?we(u):Y(),b.value&&D("resized")},Y=()=>{const u=100/c.value;let w=0;const B=[],S=[];for(const x of a.value)x.size=Math.max(Math.min(u,x.max),x.min),w-=x.size,x.size>=x.max&&B.push(x.id),x.size<=x.min&&S.push(x.id);w>.1&&fe(w,B,S)},le=()=>{let u=100;const w=[],B=[];let S=0;for(const L of a.value)u-=L.size,L.givenSize!==null&&S++,L.size>=L.max&&w.push(L.id),L.size<=L.min&&B.push(L.id);let x=100;if(u>.1){for(const L of a.value)L.givenSize===null&&(L.size=Math.max(Math.min(u/(c.value-S),L.max),L.min)),x-=L.size;x>.1&&fe(x,w,B)}},we=({addedPane:u,removedPane:w}={})=>{let B=100/c.value,S=0;const x=[],L=[];((u==null?void 0:u.givenSize)??null)!==null&&(B=(100-u.givenSize)/(c.value-1));for(const I of a.value)S-=I.size,I.size>=I.max&&x.push(I.id),I.size<=I.min&&L.push(I.id);if(!(Math.abs(S)<.1)){for(const I of a.value)(u==null?void 0:u.givenSize)!==null&&(u==null?void 0:u.id)===I.id||(I.size=Math.max(Math.min(B,I.max),I.min)),S-=I.size,I.size>=I.max&&x.push(I.id),I.size<=I.min&&L.push(I.id);S>.1&&fe(S,x,L)}},fe=(u,w,B)=>{let S;u>0?S=u/(c.value-w.length):S=u/(c.value-B.length),a.value.forEach((x,L)=>{if(u>0&&!w.includes(x.id)){const I=Math.max(Math.min(x.size+S,x.max),x.min),q=I-x.size;u-=q,x.size=I}else if(!B.includes(x.id)){const I=Math.max(Math.min(x.size+S,x.max),x.min),q=I-x.size;u-=q,x.size=I}}),Math.abs(u)>.1&&e.nextTick(()=>{b.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},D=(u,w=void 0,B=!1)=>{const S=(w==null?void 0:w.index)??g.value.activeSplitter??null;o(u,{...w,...S!==null&&{index:S},...B&&S!==null&&{prevPane:a.value[S-(l.firstSplitter?1:0)],nextPane:a.value[S+(l.firstSplitter?0:1)]},panes:a.value.map(x=>({min:x.min,max:x.max,size:x.size}))})};e.watch(()=>l.firstSplitter,()=>Z()),e.onMounted(()=>{ie(),Z(),U(),D("ready"),b.value=!0}),e.onBeforeUnmount(()=>b.value=!1);const Ee=()=>{var u;return e.h("div",{ref:d,class:N.value},(u=t.default)==null?void 0:u.call(t))};return e.provide("panes",a),e.provide("indexedPanes",s),e.provide("horizontal",e.computed(()=>l.horizontal)),e.provide("requestUpdate",de),e.provide("onPaneAdd",qe),e.provide("onPaneRemove",Ce),e.provide("onPaneClick",R),(u,w)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ee)))}},Ue={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(n){var r;const o=n,l=e.inject("requestUpdate"),t=e.inject("onPaneAdd"),a=e.inject("horizontal"),s=e.inject("onPaneRemove"),c=e.inject("onPaneClick"),d=(r=e.getCurrentInstance())==null?void 0:r.uid,b=e.inject("indexedPanes"),g=e.computed(()=>b.value[d]),E=e.ref(null),N=e.computed(()=>{const h=isNaN(o.size)||o.size===void 0?0:parseFloat(o.size);return Math.max(Math.min(h,v.value),y.value)}),y=e.computed(()=>{const h=parseFloat(o.minSize);return isNaN(h)?0:h}),v=e.computed(()=>{const h=parseFloat(o.maxSize);return isNaN(h)?100:h}),f=e.computed(()=>{var h;return`${a.value?"height":"width"}: ${(h=g.value)==null?void 0:h.size}%`});return e.watch(()=>N.value,h=>l({uid:d,size:h})),e.watch(()=>y.value,h=>l({uid:d,min:h})),e.watch(()=>v.value,h=>l({uid:d,max:h})),e.onMounted(()=>{t({id:d,el:E.value,min:y.value,max:v.value,givenSize:o.size===void 0?null:N.value,size:N.value})}),e.onBeforeUnmount(()=>s(d)),(h,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"paneEl",ref:E,class:"splitpanes__pane",onClick:C[0]||(C[0]=_=>e.unref(c)(_,h._.uid)),style:e.normalizeStyle(f.value)},[e.renderSlot(h.$slots,"default")],4))}},ve=/^[a-z0-9]+(-[a-z0-9]+)*$/,Oe=(n,r,o,l="")=>{const t=n.split(":");if(n.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;l=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){const c=t.pop(),d=t.pop(),b={provider:t.length>0?t[0]:l,prefix:d,name:c};return r&&!_e(b)?null:b}const a=t[0],s=a.split("-");if(s.length>1){const c={provider:l,prefix:s.shift(),name:s.join("-")};return r&&!_e(c)?null:c}if(o&&l===""){const c={provider:l,prefix:"",name:a};return r&&!_e(c,o)?null:c}return null},_e=(n,r)=>n?!!((n.provider===""||n.provider.match(ve))&&(r&&n.prefix===""||n.prefix.match(ve))&&n.name.match(ve)):!1,Rt=Object.freeze({left:0,top:0,width:16,height:16}),Pe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Re=Object.freeze({...Rt,...Pe}),Ke=Object.freeze({...Re,body:"",hidden:!1});function Vn(n,r){const o={};!n.hFlip!=!r.hFlip&&(o.hFlip=!0),!n.vFlip!=!r.vFlip&&(o.vFlip=!0);const l=((n.rotate||0)+(r.rotate||0))%4;return l&&(o.rotate=l),o}function wt(n,r){const o=Vn(n,r);for(const l in Ke)l in Pe?l in n&&!(l in o)&&(o[l]=Pe[l]):l in r?o[l]=r[l]:l in n&&(o[l]=n[l]);return o}function _n(n,r){const o=n.icons,l=n.aliases||Object.create(null),t=Object.create(null);function a(s){if(o[s])return t[s]=[];if(!(s in t)){t[s]=null;const c=l[s]&&l[s].parent,d=c&&a(c);d&&(t[s]=[c].concat(d))}return t[s]}return Object.keys(o).concat(Object.keys(l)).forEach(a),t}function Tn(n,r,o){const l=n.icons,t=n.aliases||Object.create(null);let a={};function s(c){a=wt(l[c]||t[c],a)}return s(r),o.forEach(s),wt(n,a)}function At(n,r){const o=[];if(typeof n!="object"||typeof n.icons!="object")return o;n.not_found instanceof Array&&n.not_found.forEach(t=>{r(t,null),o.push(t)});const l=_n(n);for(const t in l){const a=l[t];a&&(r(t,Tn(n,t,a)),o.push(t))}return o}const In={provider:"",aliases:{},not_found:{},...Rt};function Ge(n,r){for(const o in r)if(o in n&&typeof n[o]!=typeof r[o])return!1;return!0}function qt(n){if(typeof n!="object"||n===null)return null;const r=n;if(typeof r.prefix!="string"||!n.icons||typeof n.icons!="object"||!Ge(n,In))return null;const o=r.icons;for(const t in o){const a=o[t];if(!t.match(ve)||typeof a.body!="string"||!Ge(a,Ke))return null}const l=r.aliases||Object.create(null);for(const t in l){const a=l[t],s=a.parent;if(!t.match(ve)||typeof s!="string"||!o[s]&&!l[s]||!Ge(a,Ke))return null}return r}const Et=Object.create(null);function Pn(n,r){return{provider:n,prefix:r,icons:Object.create(null),missing:new Set}}function ae(n,r){const o=Et[n]||(Et[n]=Object.create(null));return o[r]||(o[r]=Pn(n,r))}function rt(n,r){return qt(r)?At(r,(o,l)=>{l?n.icons[o]=l:n.missing.add(o)}):[]}function Dn(n,r,o){try{if(typeof o.body=="string")return n.icons[r]={...o},!0}catch{}return!1}let be=!1;function Wt(n){return typeof n=="boolean"&&(be=n),be}function $n(n){const r=typeof n=="string"?Oe(n,!0,be):n;if(r){const o=ae(r.provider,r.prefix),l=r.name;return o.icons[l]||(o.missing.has(l)?null:void 0)}}function On(n,r){const o=Oe(n,!0,be);if(!o)return!1;const l=ae(o.provider,o.prefix);return Dn(l,o.name,r)}function Rn(n,r){if(typeof n!="object")return!1;if(typeof r!="string"&&(r=n.provider||""),be&&!r&&!n.prefix){let t=!1;return qt(n)&&(n.prefix="",At(n,(a,s)=>{s&&On(a,s)&&(t=!0)})),t}const o=n.prefix;if(!_e({provider:r,prefix:o,name:"a"}))return!1;const l=ae(r,o);return!!rt(l,n)}const Ht=Object.freeze({width:null,height:null}),jt=Object.freeze({...Ht,...Pe}),An=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function St(n,r,o){if(r===1)return n;if(o=o||100,typeof n=="number")return Math.ceil(n*r*o)/o;if(typeof n!="string")return n;const l=n.split(An);if(l===null||!l.length)return n;const t=[];let a=l.shift(),s=qn.test(a);for(;;){if(s){const c=parseFloat(a);isNaN(c)?t.push(a):t.push(Math.ceil(c*r*o)/o)}else t.push(a);if(a=l.shift(),a===void 0)return t.join("");s=!s}}function Wn(n,r="defs"){let o="";const l=n.indexOf("<"+r);for(;l>=0;){const t=n.indexOf(">",l),a=n.indexOf("</"+r);if(t===-1||a===-1)break;const s=n.indexOf(">",a);if(s===-1)break;o+=n.slice(t+1,a).trim(),n=n.slice(0,l).trim()+n.slice(s+1)}return{defs:o,content:n}}function Hn(n,r){return n?"<defs>"+n+"</defs>"+r:r}function jn(n,r,o){const l=Wn(n);return Hn(l.defs,r+l.content+o)}const Un=n=>n==="unset"||n==="undefined"||n==="none";function Gn(n,r){const o={...Re,...n},l={...jt,...r},t={left:o.left,top:o.top,width:o.width,height:o.height};let a=o.body;[o,l].forEach(f=>{const h=[],C=f.hFlip,_=f.vFlip;let O=f.rotate;C?_?O+=2:(h.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),h.push("scale(-1 1)"),t.top=t.left=0):_&&(h.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),h.push("scale(1 -1)"),t.top=t.left=0);let R;switch(O<0&&(O-=Math.floor(O/4)*4),O=O%4,O){case 1:R=t.height/2+t.top,h.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:h.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:R=t.width/2+t.left,h.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}O%2===1&&(t.left!==t.top&&(R=t.left,t.left=t.top,t.top=R),t.width!==t.height&&(R=t.width,t.width=t.height,t.height=R)),h.length&&(a=jn(a,'<g transform="'+h.join(" ")+'">',"</g>"))});const s=l.width,c=l.height,d=t.width,b=t.height;let g,E;s===null?(E=c===null?"1em":c==="auto"?b:c,g=St(E,d/b)):(g=s==="auto"?d:s,E=c===null?St(g,b/d):c==="auto"?b:c);const N={},y=(f,h)=>{Un(h)||(N[f]=h.toString())};y("width",g),y("height",E);const v=[t.left,t.top,d,b];return N.viewBox=v.join(" "),{attributes:N,viewBox:v,body:a}}const Qn=/\sid="(\S+)"/g,Kn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Jn=0;function Yn(n,r=Kn){const o=[];let l;for(;l=Qn.exec(n);)o.push(l[1]);if(!o.length)return n;const t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(a=>{const s=typeof r=="function"?r(a):r+(Jn++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+t+"$3")}),n=n.replace(new RegExp(t,"g"),""),n}const Je=Object.create(null);function Xn(n,r){Je[n]=r}function Ye(n){return Je[n]||Je[""]}function at(n){let r;if(typeof n.resources=="string")r=[n.resources];else if(r=n.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:n.path||"/",maxURL:n.maxURL||500,rotate:n.rotate||750,timeout:n.timeout||5e3,random:n.random===!0,index:n.index||0,dataAfterTimeout:n.dataAfterTimeout!==!1}}const it=Object.create(null),pe=["https://api.simplesvg.com","https://api.unisvg.com"],Te=[];for(;pe.length>0;)pe.length===1||Math.random()>.5?Te.push(pe.shift()):Te.push(pe.pop());it[""]=at({resources:["https://api.iconify.design"].concat(Te)});function Zn(n,r){const o=at(r);return o===null?!1:(it[n]=o,!0)}function st(n){return it[n]}const eo=()=>{let n;try{if(n=fetch,typeof n=="function")return n}catch{}};let xt=eo();function to(n,r){const o=st(n);if(!o)return 0;let l;if(!o.maxURL)l=0;else{let t=0;o.resources.forEach(s=>{t=Math.max(t,s.length)});const a=r+".json?icons=";l=o.maxURL-t-o.path.length-a.length}return l}function no(n){return n===404}const oo=(n,r,o)=>{const l=[],t=to(n,r),a="icons";let s={type:a,provider:n,prefix:r,icons:[]},c=0;return o.forEach((d,b)=>{c+=d.length+1,c>=t&&b>0&&(l.push(s),s={type:a,provider:n,prefix:r,icons:[]},c=d.length),s.icons.push(d)}),l.push(s),l};function lo(n){if(typeof n=="string"){const r=st(n);if(r)return r.path}return"/"}const ro=(n,r,o)=>{if(!xt){o("abort",424);return}let l=lo(r.provider);switch(r.type){case"icons":{const a=r.prefix,c=r.icons.join(","),d=new URLSearchParams({icons:c});l+=a+".json?"+d.toString();break}case"custom":{const a=r.uri;l+=a.slice(0,1)==="/"?a.slice(1):a;break}default:o("abort",400);return}let t=503;xt(n+l).then(a=>{const s=a.status;if(s!==200){setTimeout(()=>{o(no(s)?"abort":"next",s)});return}return t=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?o("abort",a):o("next",t)});return}setTimeout(()=>{o("success",a)})}).catch(()=>{o("next",t)})},ao={prepare:oo,send:ro};function io(n){const r={loaded:[],missing:[],pending:[]},o=Object.create(null);n.sort((t,a)=>t.provider!==a.provider?t.provider.localeCompare(a.provider):t.prefix!==a.prefix?t.prefix.localeCompare(a.prefix):t.name.localeCompare(a.name));let l={provider:"",prefix:"",name:""};return n.forEach(t=>{if(l.name===t.name&&l.prefix===t.prefix&&l.provider===t.provider)return;l=t;const a=t.provider,s=t.prefix,c=t.name,d=o[a]||(o[a]=Object.create(null)),b=d[s]||(d[s]=ae(a,s));let g;c in b.icons?g=r.loaded:s===""||b.missing.has(c)?g=r.missing:g=r.pending;const E={provider:a,prefix:s,name:c};g.push(E)}),r}function Ut(n,r){n.forEach(o=>{const l=o.loaderCallbacks;l&&(o.loaderCallbacks=l.filter(t=>t.id!==r))})}function so(n){n.pendingCallbacksFlag||(n.pendingCallbacksFlag=!0,setTimeout(()=>{n.pendingCallbacksFlag=!1;const r=n.loaderCallbacks?n.loaderCallbacks.slice(0):[];if(!r.length)return;let o=!1;const l=n.provider,t=n.prefix;r.forEach(a=>{const s=a.icons,c=s.pending.length;s.pending=s.pending.filter(d=>{if(d.prefix!==t)return!0;const b=d.name;if(n.icons[b])s.loaded.push({provider:l,prefix:t,name:b});else if(n.missing.has(b))s.missing.push({provider:l,prefix:t,name:b});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||Ut([n],a.id),a.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),a.abort))})}))}let co=0;function uo(n,r,o){const l=co++,t=Ut.bind(null,o,l);if(!r.pending.length)return t;const a={id:l,icons:r,callback:n,abort:t};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(a)}),t}function fo(n,r=!0,o=!1){const l=[];return n.forEach(t=>{const a=typeof t=="string"?Oe(t,r,o):t;a&&l.push(a)}),l}var ho={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function mo(n,r,o,l){const t=n.resources.length,a=n.random?Math.floor(Math.random()*t):n.index;let s;if(n.random){let T=n.resources.slice(0);for(s=[];T.length>1;){const P=Math.floor(Math.random()*T.length);s.push(T[P]),T=T.slice(0,P).concat(T.slice(P+1))}s=s.concat(T)}else s=n.resources.slice(a).concat(n.resources.slice(0,a));const c=Date.now();let d="pending",b=0,g,E=null,N=[],y=[];typeof l=="function"&&y.push(l);function v(){E&&(clearTimeout(E),E=null)}function f(){d==="pending"&&(d="aborted"),v(),N.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),N=[]}function h(T,P){P&&(y=[]),typeof T=="function"&&y.push(T)}function C(){return{startTime:c,payload:r,status:d,queriesSent:b,queriesPending:N.length,subscribe:h,abort:f}}function _(){d="failed",y.forEach(T=>{T(void 0,g)})}function O(){N.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),N=[]}function R(T,P,G){const H=P!=="success";switch(N=N.filter(V=>V!==T),d){case"pending":break;case"failed":if(H||!n.dataAfterTimeout)return;break;default:return}if(P==="abort"){g=G,_();return}if(H){g=G,N.length||(s.length?oe():_());return}if(v(),O(),!n.random){const V=n.resources.indexOf(T.resource);V!==-1&&V!==n.index&&(n.index=V)}d="completed",y.forEach(V=>{V(G)})}function oe(){if(d!=="pending")return;v();const T=s.shift();if(T===void 0){if(N.length){E=setTimeout(()=>{v(),d==="pending"&&(O(),_())},n.timeout);return}_();return}const P={status:"pending",resource:T,callback:(G,H)=>{R(P,G,H)}};N.push(P),b++,E=setTimeout(oe,n.rotate),o(T,r,P.callback)}return setTimeout(oe),C}function Gt(n){const r={...ho,...n};let o=[];function l(){o=o.filter(c=>c().status==="pending")}function t(c,d,b){const g=mo(r,c,d,(E,N)=>{l(),b&&b(E,N)});return o.push(g),g}function a(c){return o.find(d=>c(d))||null}return{query:t,find:a,setIndex:c=>{r.index=c},getIndex:()=>r.index,cleanup:l}}function Bt(){}const Qe=Object.create(null);function po(n){if(!Qe[n]){const r=st(n);if(!r)return;const o=Gt(r),l={config:r,redundancy:o};Qe[n]=l}return Qe[n]}function vo(n,r,o){let l,t;if(typeof n=="string"){const a=Ye(n);if(!a)return o(void 0,424),Bt;t=a.send;const s=po(n);s&&(l=s.redundancy)}else{const a=at(n);if(a){l=Gt(a);const s=n.resources?n.resources[0]:"",c=Ye(s);c&&(t=c.send)}}return!l||!t?(o(void 0,424),Bt):l.query(r,t,o)().abort}const Nt="iconify2",ke="iconify",Qt=ke+"-count",zt=ke+"-version",Kt=36e5,go=168,bo=50;function Xe(n,r){try{return n.getItem(r)}catch{}}function ct(n,r,o){try{return n.setItem(r,o),!0}catch{}}function Ft(n,r){try{n.removeItem(r)}catch{}}function Ze(n,r){return ct(n,Qt,r.toString())}function et(n){return parseInt(Xe(n,Qt))||0}const Ae={local:!0,session:!0},Jt={local:new Set,session:new Set};let ut=!1;function ko(n){ut=n}let Me=typeof window>"u"?{}:window;function Yt(n){const r=n+"Storage";try{if(Me&&Me[r]&&typeof Me[r].length=="number")return Me[r]}catch{}Ae[n]=!1}function Xt(n,r){const o=Yt(n);if(!o)return;const l=Xe(o,zt);if(l!==Nt){if(l){const c=et(o);for(let d=0;d<c;d++)Ft(o,ke+d.toString())}ct(o,zt,Nt),Ze(o,0);return}const t=Math.floor(Date.now()/Kt)-go,a=c=>{const d=ke+c.toString(),b=Xe(o,d);if(typeof b=="string"){try{const g=JSON.parse(b);if(typeof g=="object"&&typeof g.cached=="number"&&g.cached>t&&typeof g.provider=="string"&&typeof g.data=="object"&&typeof g.data.prefix=="string"&&r(g,c))return!0}catch{}Ft(o,d)}};let s=et(o);for(let c=s-1;c>=0;c--)a(c)||(c===s-1?(s--,Ze(o,s)):Jt[n].add(c))}function Zt(){if(!ut){ko(!0);for(const n in Ae)Xt(n,r=>{const o=r.data,l=r.provider,t=o.prefix,a=ae(l,t);if(!rt(a,o).length)return!1;const s=o.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,s):s,!0})}}function yo(n,r){const o=n.lastModifiedCached;if(o&&o>=r)return o===r;if(n.lastModifiedCached=r,o)for(const l in Ae)Xt(l,t=>{const a=t.data;return t.provider!==n.provider||a.prefix!==n.prefix||a.lastModified===r});return!0}function Co(n,r){ut||Zt();function o(l){let t;if(!Ae[l]||!(t=Yt(l)))return;const a=Jt[l];let s;if(a.size)a.delete(s=Array.from(a).shift());else if(s=et(t),s>=bo||!Ze(t,s+1))return;const c={cached:Math.floor(Date.now()/Kt),provider:n.provider,data:r};return ct(t,ke+s.toString(),JSON.stringify(c))}r.lastModified&&!yo(n,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),o("local")||o("session"))}function Lt(){}function wo(n){n.iconsLoaderFlag||(n.iconsLoaderFlag=!0,setTimeout(()=>{n.iconsLoaderFlag=!1,so(n)}))}function Eo(n,r){n.iconsToLoad?n.iconsToLoad=n.iconsToLoad.concat(r).sort():n.iconsToLoad=r,n.iconsQueueFlag||(n.iconsQueueFlag=!0,setTimeout(()=>{n.iconsQueueFlag=!1;const{provider:o,prefix:l}=n,t=n.iconsToLoad;delete n.iconsToLoad;let a;if(!t||!(a=Ye(o)))return;a.prepare(o,l,t).forEach(c=>{vo(o,c,d=>{if(typeof d!="object")c.icons.forEach(b=>{n.missing.add(b)});else try{const b=rt(n,d);if(!b.length)return;const g=n.pendingIcons;g&&b.forEach(E=>{g.delete(E)}),Co(n,d)}catch(b){console.error(b)}wo(n)})})}))}const So=(n,r)=>{const o=fo(n,!0,Wt()),l=io(o);if(!l.pending.length){let d=!0;return r&&setTimeout(()=>{d&&r(l.loaded,l.missing,l.pending,Lt)}),()=>{d=!1}}const t=Object.create(null),a=[];let s,c;return l.pending.forEach(d=>{const{provider:b,prefix:g}=d;if(g===c&&b===s)return;s=b,c=g,a.push(ae(b,g));const E=t[b]||(t[b]=Object.create(null));E[g]||(E[g]=[])}),l.pending.forEach(d=>{const{provider:b,prefix:g,name:E}=d,N=ae(b,g),y=N.pendingIcons||(N.pendingIcons=new Set);y.has(E)||(y.add(E),t[b][g].push(E))}),a.forEach(d=>{const{provider:b,prefix:g}=d;t[b][g].length&&Eo(d,t[b][g])}),r?uo(r,l,a):Lt};function xo(n,r){const o={...n};for(const l in r){const t=r[l],a=typeof t;l in Ht?(t===null||t&&(a==="string"||a==="number"))&&(o[l]=t):a===typeof o[l]&&(o[l]=l==="rotate"?t%4:t)}return o}const Bo=/[\s,]+/;function No(n,r){r.split(Bo).forEach(o=>{switch(o.trim()){case"horizontal":n.hFlip=!0;break;case"vertical":n.vFlip=!0;break}})}function zo(n,r=0){const o=n.replace(/^-?[0-9.]*/,"");function l(t){for(;t<0;)t+=4;return t%4}if(o===""){const t=parseInt(n);return isNaN(t)?0:l(t)}else if(o!==n){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let a=parseFloat(n.slice(0,n.length-o.length));return isNaN(a)?0:(a=a/t,a%1===0?l(a):0)}}return r}function Fo(n,r){let o=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in r)o+=" "+l+'="'+r[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+n+"</svg>"}function Lo(n){return n.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mo(n){return"data:image/svg+xml,"+Lo(n)}function Vo(n){return'url("'+Mo(n)+'")'}const Mt={...jt,inline:!1},_o={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},To={display:"inline-block"},tt={backgroundColor:"currentColor"},en={backgroundColor:"transparent"},Vt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},_t={webkitMask:tt,mask:tt,background:en};for(const n in _t){const r=_t[n];for(const o in Vt)r[n+o]=Vt[o]}const Ie={};["horizontal","vertical"].forEach(n=>{const r=n.slice(0,1)+"Flip";Ie[n+"-flip"]=r,Ie[n.slice(0,1)+"-flip"]=r,Ie[n+"Flip"]=r});function Tt(n){return n+(n.match(/^[-0-9.]+$/)?"px":"")}const It=(n,r)=>{const o=xo(Mt,r),l={..._o},t=r.mode||"svg",a={},s=r.style,c=typeof s=="object"&&!(s instanceof Array)?s:{};for(let f in r){const h=r[f];if(h!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":o[f]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&No(o,h);break;case"color":a.color=h;break;case"rotate":typeof h=="string"?o[f]=zo(h):typeof h=="number"&&(o[f]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete l["aria-hidden"];break;default:{const C=Ie[f];C?(h===!0||h==="true"||h===1)&&(o[C]=!0):Mt[f]===void 0&&(l[f]=h)}}}const d=Gn(n,o),b=d.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),t==="svg"){l.style={...a,...c},Object.assign(l,b);let f=0,h=r.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),l.innerHTML=Yn(d.body,h?()=>h+"ID"+f++:"iconifyVue"),e.h("svg",l)}const{body:g,width:E,height:N}=n,y=t==="mask"||(t==="bg"?!1:g.indexOf("currentColor")!==-1),v=Fo(g,{...b,width:E+"",height:N+""});return l.style={...a,"--svg":Vo(v),width:Tt(b.width),height:Tt(b.height),...To,...y?tt:en,...c},e.h("span",l)};Wt(!0);Xn("",ao);if(typeof document<"u"&&typeof window<"u"){Zt();const n=window;if(n.IconifyPreload!==void 0){const r=n.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(l=>{try{(typeof l!="object"||l===null||l instanceof Array||typeof l.icons!="object"||typeof l.prefix!="string"||!Rn(l))&&console.error(o)}catch{console.error(o)}})}if(n.IconifyProviders!==void 0){const r=n.IconifyProviders;if(typeof r=="object"&&r!==null)for(let o in r){const l="IconifyProviders["+o+"] is invalid.";try{const t=r[o];if(typeof t!="object"||!t||t.resources===void 0)continue;Zn(o,t)||console.error(l)}catch{console.error(l)}}}}const Io={...Re,body:""},te=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(n,r){if(typeof n=="object"&&n!==null&&typeof n.body=="string")return this._name="",this.abortLoading(),{data:n};let o;if(typeof n!="string"||(o=Oe(n,!1,!0))===null)return this.abortLoading(),null;const l=$n(o);if(!l)return(!this._loadingIcon||this._loadingIcon.name!==n)&&(this.abortLoading(),this._name="",l!==null&&(this._loadingIcon={name:n,abort:So([o],()=>{this.counter++})})),null;this.abortLoading(),this._name!==n&&(this._name=n,r&&r(n));const t=["iconify"];return o.prefix!==""&&t.push("iconify--"+o.prefix),o.provider!==""&&t.push("iconify--"+o.provider),{data:l,classes:t}}},render(){this.counter;const n=this.$attrs,r=this.iconMounted||n.ssr?this.getIcon(n.icon,n.onLoad):null;if(!r)return It(Io,n);let o=n;return r.classes&&(o={...n,class:(typeof n.class=="string"?n.class+" ":"")+r.classes.join(" ")}),It({...Re,...r.data},o)}}),Po={name:"buttonExpand"},Do=e.defineComponent({...Po,props:{item:{default:[]},expandedrows:{default:()=>new Map},expandall:{type:Boolean,default:!1}},setup(n){const r=n,o=e.toRef(r,"expandedrows"),l=e.ref(!1);function t(c){if(r.expandall)l.value=!l.value,o.value.forEach((d,b)=>{o.value.set(b,l.value)});else{const d=o.value.get(c);o.value.set(c,!d)}}const a=c=>c._rowIndex!==void 0?c._rowIndex:c.id||0,s=e.ref(-1);return e.watch(()=>o.value,()=>{if(!r.expandall)return;const c=Array.from(o.value.values());new Set(c).size>1?(s.value=-1,l.value=!0):c[0]?(s.value=0,l.value=!0):(s.value=1,l.value=!1)},{deep:!0}),(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:"expandbtn",onClick:d[0]||(d[0]=b=>t(a(c.item)))},[o.value.get(a(c.item))===!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r.expandall?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createBlock(e.unref(te),{key:0,icon:"fluent:chevron-down-up-16-filled"})):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"}))],64)):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"}))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[r.expandall?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value==-1?(e.openBlock(),e.createBlock(e.unref(te),{key:0,icon:"ion:chevron-expand"})):s.value==0?(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-down"})):(e.openBlock(),e.createBlock(e.unref(te),{key:2,icon:"mdi:chevron-right"}))],64)):(e.openBlock(),e.createBlock(e.unref(te),{key:1,icon:"mdi:chevron-right"}))],64))]))}}),ye=(n,r)=>{const o=n.__vccOpts||n;for(const[l,t]of r)o[l]=t;return o},nt=ye(Do,[["__scopeId","data-v-da3bc8d5"]]),$o={name:"ButtonRightPanel"},Oo=e.defineComponent({...$o,props:{item:{default:[]}},emits:["rightPanelClick"],setup(n,{emit:r}){const o=n,l=r;function t(){l("rightPanelClick",o.item)}return(a,s)=>(e.openBlock(),e.createElementBlock("button",{class:"rightpanelbtn",onClick:e.withModifiers(t,["stop"])},[e.createVNode(e.unref(te),{icon:"lucide:plus"})]))}}),Pt=ye(Oo,[["__scopeId","data-v-b373d5f7"]]),Ro={class:"bh-text-[13px] bh-font-normal bh-rounded bh-overflow-hidden"},Ao={name:"columnFilter"},qo=e.defineComponent({...Ao,props:["column","columnFilterLang"],emits:["close","filterChange"],setup(n,{emit:r}){const o=n,l=r,t=e.ref(null);Nn(t,()=>{l("close")});const a=s=>{o.column.condition=s,s===""&&(o.column.value=""),l("filterChange",o.column),l("close")};return(s,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"menuRef",ref:t,class:"bh-filter-menu bh-absolute bh-z-[1] bh-bg-white dark:bh-bg-gray-800 bh-shadow-md bh-rounded-md bh-top-full bh-right-0 bh-w-32 bh-mt-1 bh-border bh-border-solid bh-border-gray-200 dark:bh-border-gray-600"},[e.createElementVNode("div",Ro,[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition===""}),onClick:c[0]||(c[0]=e.withModifiers(d=>a(""),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NoFilter)??"No filter"),3),o.column.type==="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Contains"}),onClick:c[1]||(c[1]=e.withModifiers(d=>a("Contains"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Contains)??"Contains"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotContains"}),onClick:c[2]||(c[2]=e.withModifiers(d=>a("NotContains"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotContains)??"NotContains"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[3]||(c[3]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[4]||(c[4]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"NotEqual (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="StartsWith"}),onClick:c[5]||(c[5]=e.withModifiers(d=>a("StartsWith"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.StartsWith)??"StartsWith"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="EndsWith"}),onClick:c[6]||(c[6]=e.withModifiers(d=>a("EndsWith"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.EndsWith)??"EndsWith"),3)],64)):o.column.type==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[7]||(c[7]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[8]||(c[8]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"NotEqual (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThan"}),onClick:c[9]||(c[9]=e.withModifiers(d=>a("GreaterThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThan)??"GreaterThan (>)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThanOrEqual"}),onClick:c[10]||(c[10]=e.withModifiers(d=>a("GreaterThanOrEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThanOrEqual)??"GreaterThanOrEqual (>=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThan"}),onClick:c[11]||(c[11]=e.withModifiers(d=>a("LessThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThan)??"LessThan (<)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThanOrEqual"}),onClick:c[12]||(c[12]=e.withModifiers(d=>a("LessThanOrEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThanOrEqual)??"LessThanOrEqual (<=)"),3)],64)):o.column.type==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="Equal"}),onClick:c[13]||(c[13]=e.withModifiers(d=>a("Equal"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.Equal)??"Equal (=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="NotEqual"}),onClick:c[14]||(c[14]=e.withModifiers(d=>a("NotEqual"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.NotEqual)??"Not equal (!=)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="GreaterThan"}),onClick:c[15]||(c[15]=e.withModifiers(d=>a("GreaterThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.GreaterThan)??"GreaterThan (>)"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="LessThan"}),onClick:c[16]||(c[16]=e.withModifiers(d=>a("LessThan"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.LessThan)??"LessThan (<)"),3)],64)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="IsNull"}),onClick:c[17]||(c[17]=e.withModifiers(d=>a("IsNull"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.IsNull)??"IsNull"),3),e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:o.column.condition==="IsNotNull"}),onClick:c[18]||(c[18]=e.withModifiers(d=>a("IsNotNull"),["stop"]))},e.toDisplayString((o.columnFilterLang&&o.columnFilterLang.IsNotNull)??"IsNotNull"),3)])],512))}}),De={string:[{value:"",label:"No Filter",icon:""},{value:"Contains",label:"Contains",icon:"⊃"},{value:"NotContains",label:"Not Contains",icon:"⊅"},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"StartsWith",label:"Starts With",icon:"a.."},{value:"EndsWith",label:"Ends With",icon:"..a"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],number:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"Greater Than (>)",icon:">"},{value:"GreaterThanOrEqual",label:"Greater or Equal (≥)",icon:"≥"},{value:"LessThan",label:"Less Than (<)",icon:"<"},{value:"LessThanOrEqual",label:"Less or Equal (≤)",icon:"≤"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],integer:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"Greater Than (>)",icon:">"},{value:"GreaterThanOrEqual",label:"Greater or Equal (≥)",icon:"≥"},{value:"LessThan",label:"Less Than (<)",icon:"<"},{value:"LessThanOrEqual",label:"Less or Equal (≤)",icon:"≤"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],date:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal (=)",icon:"="},{value:"NotEqual",label:"Not Equal (≠)",icon:"≠"},{value:"GreaterThan",label:"After (>)",icon:">"},{value:"LessThan",label:"Before (<)",icon:"<"},{value:"IsNull",label:"Is Empty",icon:"∅"},{value:"IsNotNull",label:"Is Not Empty",icon:"∅̸"}],bool:[{value:"",label:"No Filter",icon:""},{value:"Equal",label:"Equal",icon:"="},{value:"NotEqual",label:"Not Equal",icon:"≠"}]},Wo={class:"bh-p-2 bh-min-w-[200px]"},Ho={class:"bh-mb-2"},jo=e.createElementVNode("label",{class:"bh-text-xs bh-font-medium bh-text-gray-600 dark:bh-text-gray-400 bh-block bh-mb-1"}," Filter Condition ",-1),Uo=["value"],Go={key:0,class:"bh-border-t bh-border-gray-200 dark:bh-border-gray-600 bh-pt-2 bh-mt-2"},Qo=e.createElementVNode("label",{class:"bh-text-xs bh-font-medium bh-text-gray-600 dark:bh-text-gray-400 bh-block bh-mb-1"}," Sort ",-1),Ko={class:"bh-flex bh-flex-col bh-gap-1"},Jo={name:"columnFilterNew"},Yo=e.defineComponent({...Jo,props:["column","columnFilterLang","currentSortColumn","currentSortDirection"],emits:["close","filterChange","sortChange","clearFilter","conditionChange"],setup(n,{emit:r}){const o=n,l=r,t=e.ref(null),a=e.ref(null),s=e.ref(o.column.condition||""),c=e.ref(!1),d=e.computed(()=>{var C;const h=((C=o.column.type)==null?void 0:C.toLowerCase())||"string";return De[h]||De.string}),b=h=>{if(!o.columnFilterLang)return h.label;const C=h.value===""?"NoFilter":h.value;return o.columnFilterLang[C]||h.label},g=h=>{const _=h.target.value;c.value=!1,s.value=_,l("conditionChange",o.column.field,_),_===""&&(o.column.value=""),l("filterChange",o.column)},E=h=>o.currentSortColumn===o.column.field&&o.currentSortDirection===h,N=h=>{l("sortChange",o.column.field,h),l("close")},y=()=>{var C;const h=((C=o.column.type)==null?void 0:C.toLowerCase())||"string";o.column.condition=h==="string"?"Contains":"Equal",o.column.value="",s.value=o.column.condition,l("clearFilter",o.column),l("close")},v=h=>{const C=h.target;c.value||C.tagName==="SELECT"||C.tagName==="OPTION"||t.value&&t.value.contains(C)||C.closest(".bh-filter-button")||l("close")},f=h=>{h.key==="Escape"&&l("close")};return e.onMounted(()=>{e.nextTick(()=>{var h;(h=a.value)==null||h.focus(),document.addEventListener("click",v,!0),document.addEventListener("keydown",f)})}),e.onUnmounted(()=>{document.removeEventListener("click",v,!0),document.removeEventListener("keydown",f)}),(h,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:t,class:"bh-filter-dropdown-container bh-absolute bh-z-[100] bh-bg-white dark:bh-bg-gray-800 bh-shadow-lg bh-rounded bh-top-full bh-right-0 bh-mt-1 bh-border bh-border-solid bh-border-gray-300 dark:bh-border-gray-600"},[e.createElementVNode("div",Wo,[e.createElementVNode("div",Ho,[jo,e.withDirectives(e.createElementVNode("select",{ref_key:"selectRef",ref:a,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_),class:"bh-filter-select bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-border bh-border-gray-300 dark:bh-border-gray-600 bh-rounded bh-bg-white dark:bh-bg-gray-700 hover:bh-border-primary focus:bh-border-primary focus:bh-ring-1 focus:bh-ring-primary bh-outline-none bh-cursor-pointer bh-transition-colors",onFocus:C[1]||(C[1]=_=>c.value=!0),onBlur:C[2]||(C[2]=_=>c.value=!1),onChange:g},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,_=>(e.openBlock(),e.createElementBlock("option",{key:_.value,value:_.value},e.toDisplayString(_.icon?_.icon+" ":"")+e.toDisplayString(b(_)),9,Uo))),128))],544),[[e.vModelSelect,s.value]])]),o.column.sort!==!1?(e.openBlock(),e.createElementBlock("div",Go,[Qo,e.createElementVNode("div",Ko,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors",{"bh-bg-primary/10 bh-text-primary":E("asc"),"bh-bg-gray-50 dark:bh-bg-gray-700 hover:bh-bg-gray-100 dark:hover:bh-bg-gray-600":!E("asc")}]),onClick:C[3]||(C[3]=_=>N("asc"))}," ↑ Sort Ascending ",2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors",{"bh-bg-primary/10 bh-text-primary":E("desc"),"bh-bg-gray-50 dark:bh-bg-gray-700 hover:bh-bg-gray-100 dark:hover:bh-bg-gray-600":!E("desc")}]),onClick:C[4]||(C[4]=_=>N("desc"))}," ↓ Sort Descending ",2)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"bh-border-t bh-border-gray-200 dark:bh-border-gray-600 bh-pt-2 bh-mt-2"},[e.createElementVNode("button",{type:"button",class:"bh-w-full bh-px-2.5 bh-py-1.5 bh-text-sm bh-text-left bh-rounded bh-transition-colors bh-text-red-600 hover:bh-bg-red-50 dark:hover:bh-bg-red-900/20",onClick:y}," ✕ Clear Filter ")])])],512))}}),Xo={},Zo={version:"1.1",viewBox:"0 0 17 12",xmlns:"http://www.w3.org/2000/svg"},el=e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(-9 -11)",fill:"currentColor","fill-rule":"nonzero"},[e.createElementVNode("path",{d:"m25.576 11.414c0.56558 0.55188 0.56558 1.4439 0 1.9961l-9.404 9.176c-0.28213 0.27529-0.65247 0.41385-1.0228 0.41385-0.37034 0-0.74068-0.13855-1.0228-0.41385l-4.7019-4.588c-0.56584-0.55188-0.56584-1.4442 0-1.9961 0.56558-0.55214 1.4798-0.55214 2.0456 0l3.679 3.5899 8.3812-8.1779c0.56558-0.55214 1.4798-0.55214 2.0456 0z"})])],-1),tl=[el];function nl(n,r){return e.openBlock(),e.createElementBlock("svg",Zo,tl)}const ot=ye(Xo,[["render",nl]]),ol={},ll={viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:"css-i6dzq1"},rl=e.createElementVNode("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),al=[rl];function il(n,r){return e.openBlock(),e.createElementBlock("svg",ll,al)}const sl=ye(ol,[["render",il]]),cl={},ul={viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:"css-i6dzq1"},dl=e.createElementVNode("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"},null,-1),fl=[dl];function hl(n,r){return e.openBlock(),e.createElementBlock("svg",ul,fl)}const ml=ye(cl,[["render",hl]]),pl={key:"hdrrow"},vl={class:"bh-checkbox"},gl=["onClick"],bl={width:"16",height:"16",viewBox:"0 0 14 14",fill:"none"},kl={key:0,class:"bh-filter bh-relative"},yl=["onUpdate:modelValue"],Cl=["onUpdate:modelValue"],wl=["onUpdate:modelValue"],El=["onUpdate:modelValue"],Sl=e.createElementVNode("option",{value:void 0},"All",-1),xl=e.createElementVNode("option",{value:!0},"True",-1),Bl=e.createElementVNode("option",{value:!1},"False",-1),Nl=[Sl,xl,Bl],zl={key:1,class:"bh-filter-input-wrapper"},Fl=["onUpdate:modelValue"],Ll=["onUpdate:modelValue"],Ml=["onUpdate:modelValue"],Vl=["onUpdate:modelValue"],_l=e.createElementVNode("option",{value:void 0},"All",-1),Tl=e.createElementVNode("option",{value:!0},"True",-1),Il=e.createElementVNode("option",{value:!1},"False",-1),Pl=[_l,Tl,Il],Dl=["onClick"],$l={name:"columnHeader"},Ve=e.defineComponent({...$l,props:["all","expandedrows","currentSortColumn","currentSortDirection","isOpenFilter","isFooter","checkAll","columnFilterLang"],emits:["selectAll","sortChange","filterChange","toggleFilterMenu","clearColumnFilter"],setup(n,{emit:r}){const o=e.ref(null),l=n,t=r,a=e.ref({}),s=e.ref({}),c=e.computed(()=>{var v;const y=new Map;return(v=l.all)!=null&&v.columns&&l.all.columns.forEach(f=>{f.field&&y.set(f.field,f)}),y});e.watch(()=>{var y;return(y=l.all)==null?void 0:y.columns},()=>{},{immediate:!0,deep:!0}),e.onMounted(()=>{var y;(y=l.all)!=null&&y.columns&&l.all.columns.forEach(v=>{v.filter&&v.field&&(a.value[v.field]=v.value||"",Bn(()=>a.value[v.field],f=>{const h=c.value.get(v.field);h&&(h.type==="string"||h.type==="String"?h.value=typeof f=="string"?f.trim():f:h.value=f,t("filterChange"))},{debounce:300}))})});const d=()=>{o.value&&(o.value.indeterminate=l.checkAll!==0?!l.checkAll:!1,o.value.checked=l.checkAll)};e.watch(()=>l.checkAll,d);const b=y=>{if(!y.field)return!1;const v=a.value[y.field];return v!==""&&v!==null&&v!==void 0},g=y=>{const v=s.value[y.field]??y.condition;return v&&v!==""},E=y=>s.value[y.field]??y.condition??"",N=y=>{var _;const v=E(y);if(!v||v==="")return"";const f=((_=y.type)==null?void 0:_.toLowerCase())||"string",C=(De[f]||De.string).find(O=>O.value===v);return C?l.columnFilterLang&&l.columnFilterLang[v]?l.columnFilterLang[v]:C.label:v};return(y,v)=>(e.openBlock(),e.createElementBlock("tr",pl,[l.all.hasCheckbox?(e.openBlock(),e.createElementBlock("th",{key:"chkall",style:e.normalizeStyle({width:l.all.checkboxColumnWidth+" !important",minWidth:l.all.checkboxColumnWidth+" !important"}),class:e.normalizeClass({"bh-sticky bh-bg-blue-light bh-z-[1]":l.all.stickyHeader||l.all.stickyFirstColumn,"bh-top-0":l.all.stickyHeader,"bh-left-0":l.all.stickyFirstColumn})},[e.createElementVNode("div",vl,[e.createElementVNode("input",{ref_key:"selectedAll",ref:o,type:"checkbox",onClick:v[0]||(v[0]=e.withModifiers(f=>{var h;return t("selectAll",(h=f==null?void 0:f.target)==null?void 0:h.checked)},["stop"]))},null,512),e.createElementVNode("div",null,[e.createVNode(ot,{class:"check"}),e.createVNode(sl,{class:"intermediate"})])])],6)):e.createCommentVNode("",!0),l.all.hasRightPanel?(e.openBlock(),e.createElementBlock("th",{key:1,style:e.normalizeStyle({width:l.all.rightPanelColumnWidth+" !important",minWidth:l.all.rightPanelColumnWidth+" !important"}),class:e.normalizeClass({"bh-sticky bh-bg-blue-light bh-z-[1]":l.all.stickyHeader||l.all.stickyFirstColumn,"bh-top-0":l.all.stickyHeader,"bh-left-0":l.all.stickyFirstColumn})},null,6)):e.createCommentVNode("",!0),l.all.hasSubtable?(e.openBlock(),e.createElementBlock("th",{key:2,style:e.normalizeStyle({width:l.all.subtableColumnWidth+" !important",minWidth:l.all.subtableColumnWidth+" !important"})},[l.all.expandall?(e.openBlock(),e.createBlock(nt,{key:0,expandedrows:l.expandedrows,expandall:l.all.expandall},null,8,["expandedrows","expandall"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.all.columns,(f,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.hide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("th",{key:f.field,class:e.normalizeClass(["bh-select-none bh-z-[1]",[l.all.sortable&&f.sort?"bh-cursor-pointer":"",h===0&&l.all.stickyFirstColumn?"bh-sticky bh-left-0 bh-bg-blue-light":"",l.all.hasCheckbox&&h===0&&l.all.stickyFirstColumn?"bh-left-[52px]":""]]),style:e.normalizeStyle({width:f.width,"min-width":f.minWidth,"max-width":f.maxWidth})},[e.createElementVNode("div",{class:e.normalizeClass(["bh-flex bh-items-center",[f.headerClass?f.headerClass:""]]),onClick:C=>l.all.sortable&&f.sort&&t("sortChange",f.field)},[e.createTextVNode(e.toDisplayString(f.title)+" ",1),l.all.sortable&&f.sort?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["bh-ml-3 bh-sort bh-flex bh-items-center",[l.currentSortColumn,l.currentSortDirection]])},[(e.openBlock(),e.createElementBlock("svg",bl,[e.createElementVNode("polygon",{points:"3.11,6.25 10.89,6.25 7,1.75 ",fill:"currentColor",class:e.normalizeClass(["bh-text-black/20",[n.currentSortColumn===f.field&&n.currentSortDirection==="asc"?"!bh-text-primary":""]])},null,2),e.createElementVNode("polygon",{points:"7,12.25 10.89,7.75 3.11,7.75 ",fill:"currentColor",class:e.normalizeClass(["bh-text-black/20",[n.currentSortColumn===f.field&&n.currentSortDirection==="desc"?"!bh-text-primary":""]])},null,2)]))],2)):e.createCommentVNode("",!0)],10,gl),l.all.columnFilter&&!l.isFooter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.filter?(e.openBlock(),e.createElementBlock("div",kl,[l.all.showFloatingFilterLabel?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.type==="string"||f.type==="String"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"text",class:"bh-form-control"},null,8,yl)),[[e.vModelText,a.value[f.field]]]):e.createCommentVNode("",!0),f.type==="number"||f.type==="integer"||f.type==="Integer"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"number",class:"bh-form-control"},null,8,Cl)),[[e.vModelText,a.value[f.field],void 0,{number:!0}]]):f.type==="date"||f.type==="DateTime"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"date",class:"bh-form-control"},null,8,wl)),[[e.vModelText,a.value[f.field]]]):f.type==="bool"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:3,"onUpdate:modelValue":C=>a.value[f.field]=C,class:"bh-form-control",onClick:v[1]||(v[1]=(...C)=>l.isOpenFilter&&l.isOpenFilter(...C))},Nl,8,El)),[[e.vModelSelect,a.value[f.field]]]):e.createCommentVNode("",!0)],64)),l.all.showFloatingFilterLabel?(e.openBlock(),e.createElementBlock("div",zl,[g(f)&&l.all.useNewColumnFilter?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["bh-floating-label",{"bh-floating-label--active":b(f)}])},e.toDisplayString(N(f)),3)):e.createCommentVNode("",!0),f.type==="string"||f.type==="String"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"text",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Fl)),[[e.vModelText,a.value[f.field]]]):e.createCommentVNode("",!0),f.type==="number"||f.type==="integer"||f.type==="Integer"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"number",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Ll)),[[e.vModelText,a.value[f.field],void 0,{number:!0}]]):f.type==="date"||f.type==="DateTime"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:3,"onUpdate:modelValue":C=>a.value[f.field]=C,type:"date",class:e.normalizeClass(["bh-form-control",{"bh-form-control--with-label":g(f)&&l.all.useNewColumnFilter}])},null,10,Ml)),[[e.vModelText,a.value[f.field]]]):f.type==="bool"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:4,"onUpdate:modelValue":C=>a.value[f.field]=C,class:"bh-form-control",onClick:v[2]||(v[2]=(...C)=>l.isOpenFilter&&l.isOpenFilter(...C))},Pl,8,Vl)),[[e.vModelSelect,a.value[f.field]]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.type!=="bool"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["bh-filter-button",{"!bh-bg-primary/10 !bh-border-primary":g(f),"bh-bg-[#e0e6ed] dark:bh-bg-gray-700":!g(f),"bh-filter-button--with-label":l.all.showFloatingFilterLabel}]),onClick:e.withModifiers(C=>t("toggleFilterMenu",f),["stop"])},[e.createVNode(ml,{class:e.normalizeClass(["bh-w-4",{"bh-text-primary":g(f),"bh-text-black/70 dark:bh-text-gray-300":!g(f)}])},null,8,["class"])],10,Dl)):e.createCommentVNode("",!0),l.all.useNewColumnFilter?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(qo,{key:3,column:f,type:f.type,columnFilterLang:l.columnFilterLang,onClose:v[3]||(v[3]=C=>t("toggleFilterMenu",null)),onFilterChange:v[4]||(v[4]=C=>t("filterChange"))},null,8,["column","type","columnFilterLang"])),[[e.vShow,l.isOpenFilter===f.field]]),l.all.useNewColumnFilter?e.withDirectives((e.openBlock(),e.createBlock(Yo,{key:4,column:f,columnFilterLang:l.columnFilterLang,currentSortColumn:l.currentSortColumn,currentSortDirection:l.currentSortDirection,onClose:v[5]||(v[5]=C=>t("toggleFilterMenu",null)),onFilterChange:v[6]||(v[6]=C=>t("filterChange")),onSortChange:v[7]||(v[7]=(C,_)=>t("sortChange",C,_)),onConditionChange:v[8]||(v[8]=(C,_)=>{const O=c.value.value.get(C);O&&(O.condition=_,s.value.value[C]=_)}),onClearFilter:C=>{a.value[C.field]="",C.value="",C.condition="",s.value.value[C.field]="",l.currentSortColumn===C.field&&t("sortChange",l.all.sortColumn||C.field,"asc"),t("filterChange")}},null,8,["column","columnFilterLang","currentSortColumn","currentSortDirection","onClearFilter"])),[[e.vShow,l.isOpenFilter===f.field]]):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],6))],64))),256))]))}}),Ol={class:"bh-datatable bh-antialiased bh-relative bh-text-black bh-text-sm bh-font-normal"},Rl={class:"bh-flex bh-h-full"},Al=e.createElementVNode("span",null,"##Left Menu Slot##",-1),ql={key:0,class:"menu-resize-controls bh-absolute bh-right-0 bh-top-1/2 bh-transform -bh-translate-y-1/2 bh-z-10 bh-bg-gray-100 bh-rounded-l bh-shadow-md bh-select-none"},Wl=e.createElementVNode("path",{d:"M7 1L1 6L7 11",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Hl=[Wl],jl={class:"bh-flex-1",style:{overflow:"auto","min-width":"0",width:"100%"}},Ul=e.createElementVNode("span",null,"##Top Menu Slot##",-1),Gl=e.createElementVNode("span",null,"##Table Header Area Slot##",-1),Ql=e.createElementVNode("span",null,"##Table Action Header Slot##",-1),Kl=["onClick"],Jl={class:"bh-checkbox"},Yl=["value"],Xl=["innerHTML"],Zl=["onClick"],er=["colspan"],tr=["colspan"],nr=e.createElementVNode("div",{class:"bh-skeleton-box bh-h-8"},null,-1),or=[nr],lr=["colspan"],rr=e.createElementVNode("span",null,"##Table Header Area Slot##",-1),ar=["onClick"],ir={class:"bh-checkbox"},sr=["value"],cr=["innerHTML"],ur=["onClick"],dr=["colspan"],fr=["colspan"],hr=e.createElementVNode("div",{class:"bh-skeleton-box bh-h-8"},null,-1),mr=[hr],pr=["colspan"],vr={class:"bh-flex bh-items-center bh-flex-wrap bh-flex-col sm:bh-flex-row bh-gap-4"},gr={class:"bh-pagination-info bh-flex bh-items-center"},br={class:"bh-mr-2"},kr=["value"],yr={class:"bh-pagination-number sm:bh-ml-auto bh-inline-flex bh-items-center bh-space-x-1"},Cr=["innerHTML"],wr={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Er=e.createElementVNode("g",{fill:"currentColor","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"}),e.createElementVNode("path",{d:"M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"})],-1),Sr=[Er],xr=["innerHTML"],Br={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Nr=e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"},null,-1),zr=[Nr],Fr=["onClick"],Lr=["innerHTML"],Mr={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Vr=e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708z"},null,-1),_r=[Vr],Tr=["innerHTML"],Ir={key:1,"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 16 16"},Pr=e.createElementVNode("g",{fill:"currentColor","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8L3.646 2.354a.5.5 0 0 1 0-.708z"}),e.createElementVNode("path",{d:"M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8L7.646 2.354a.5.5 0 0 1 0-.708z"})],-1),Dr=[Pr],$r={name:"Vue3Datatable"},Or=e.defineComponent({...$r,props:{loading:{type:Boolean,default:!1},isServerMode:{type:Boolean,default:!1},skin:{default:"bh-table-striped bh-table-hover"},totalRows:{default:0},rows:{default:()=>[]},footerRows:{default:()=>[]},columns:{default:()=>[]},hasCheckbox:{type:Boolean,default:!1},hasSubtable:{type:Boolean,default:!1},hasRightPanel:{type:Boolean,default:!1},checkboxColumnWidth:{default:"40px"},rightPanelColumnWidth:{default:"40px"},subtableColumnWidth:{default:"40px"},subtableMaxHeight:{default:"400px"},subtableLazyLoading:{type:Boolean,default:!1},expandall:{type:Boolean,default:!1},search:{default:""},columnChooser:{type:Boolean,default:!1},page:{default:1},pageSize:{default:10},pageSizeOptions:{default:()=>[10,20,30,50,100]},showPageSize:{type:Boolean,default:!0},rowClass:{default:[]},cellClass:{default:[]},sortable:{type:Boolean,default:!1},sortColumn:{default:"id"},sortDirection:{default:"asc"},columnFilter:{type:Boolean,default:!1},columnFilterLang:{default:null},useNewColumnFilter:{type:Boolean,default:!1},showFloatingFilterLabel:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},showNumbers:{type:Boolean,default:!0},showNumbersCount:{default:5},showFirstPage:{type:Boolean,default:!0},showLastPage:{type:Boolean,default:!0},firstArrow:{default:""},lastArrow:{default:""},nextArrow:{default:""},previousArrow:{default:""},paginationInfo:{default:"Showing {0} to {1} of {2} entries"},noDataContent:{default:"There is no data that match your query."},stickyHeader:{type:Boolean,default:!1},stickyFooter:{type:Boolean,default:!1},height:{default:"500px"},stickyFirstColumn:{type:Boolean,default:!1},cloneHeaderInFooter:{type:Boolean,default:!1},selectRowOnClick:{type:Boolean,default:!1},enableleftmenu:{type:Boolean},enabletopmenu:{type:Boolean},enableHeaderArea:{type:Boolean,default:!1},headerAreaHeight:{default:"80px"},leftmenuMinWidth:{default:50},leftmenuDefaultWidth:{default:250},showResizeButton:{type:Boolean,default:!1},topmenusize:{},topmenumax:{},topmenumin:{},skeletonloader:{type:Boolean},enableloadinganimation:{type:Boolean},enablefooterpagination:{type:Boolean},alwaysShowPagination:{type:Boolean,default:!1},footerOffset:{default:0},tableRightOffset:{default:0},tableLeftOffset:{default:5},initialLeftMenuState:{type:Boolean,default:void 0}},emits:["change","sortChange","searchChange","pageChange","pageSizeChange","rowSelect","filterChange","rowClick","rowDBClick","currentTopMenuSize","currentLeftMenuSize","rowRightPanelClick"],setup(n,{expose:r,emit:o}){var pt,vt;const l=e.useSlots(),t=n;for(const i of t.columns||[]){const m=((pt=i.type)==null?void 0:pt.toLowerCase())||"string";i.type=m,i.isUnique=i.isUnique!==void 0?i.isUnique:!1,i.hide=i.hide!==void 0?i.hide:!1,i.filter=i.filter!==void 0?i.filter:!0,i.search=i.search!==void 0?i.search:!0,i.sort=i.sort!==void 0?i.sort:!0,i.html=i.html!==void 0?i.html:!1,i.condition=!m||m==="string"?"Contains":"Equal"}const a=e.ref([]),s=e.ref(t.page),c=e.ref(t.pagination?t.pageSize:(vt=t.rows)==null?void 0:vt.length),d=t.pageSize,b=e.ref(t.sortColumn),g=t.sortColumn,E=e.ref(t.sortDirection),N=t.sortDirection,y=e.ref(t.totalRows),v=e.ref([]),f=e.ref(null),h=e.ref(t.loading),C=e.ref(t.search);JSON.parse(JSON.stringify(t.columns));const _=e.ref(null),O=e.ref(null);let R=e.ref(0);const oe=e.ref(230),T=e.ref(t.leftmenuDefaultWidth),P=e.ref(!1),G=e.ref(null),H=new Map,V=(i,m)=>{if(!m)return;const p=`${i.id||JSON.stringify(i)}-${m}`;if(H.has(p))return H.get(p);const M=m.split(".").reduce((z,A)=>z==null?void 0:z[A],i);return H.set(p,M),M};e.watch(()=>t.rows,()=>{H.clear()},{deep:!1});const W=e.computed(()=>{const i=t.columns.find(m=>m.isUnique);return(i==null?void 0:i.field)||null}),X=e.computed(()=>W.value?new Map(a.value.map((i,m)=>[m,i[W.value]])):null),ie=i=>{var m;return W.value?((m=X.value)==null?void 0:m.get(i))??i:i},ue=(i,m)=>{const p=i._rowIndex!==void 0?i._rowIndex:i.id||m;return U.value.get(p)===!0},se=e.computed(()=>typeof t.rowClass=="function"),Z=e.computed(()=>typeof t.cellClass=="function"),de=new Map,qe=i=>{const m=i?"numeric":"string";return de.has(m)||de.set(m,new Intl.Collator(void 0,{numeric:i,sensitivity:"base"})),de.get(m)},Ce=e.computed(()=>{var M,z,A;let i=t.rows||[];if(!t.isServerMode){if((M=t.columns)==null||M.forEach(k=>{k.filter&&(k.value!==void 0&&k.value!==null&&k.value!==""||k.condition==="IsNull"||k.condition=="IsNotNull")&&(k.type==="string"?(k.value&&!k.condition&&(k.condition="Contains"),k.condition==="Contains"?i=i.filter(F=>{var $;return($=V(F,k.field))==null?void 0:$.toString().toLowerCase().includes(k.value.toLowerCase())}):k.condition==="NotContains"?i=i.filter(F=>{var $;return!(($=V(F,k.field))!=null&&$.toString().toLowerCase().includes(k.value.toLowerCase()))}):k.condition==="Equal"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase())===k.value.toLowerCase()}):k.condition==="NotEqual"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase())!==k.value.toLowerCase()}):k.condition=="StartsWith"?i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase().indexOf(k.value.toLowerCase()))===0}):k.condition=="EndsWith"&&(i=i.filter(F=>{var $;return(($=V(F,k.field))==null?void 0:$.toString().toLowerCase().substr(k.value.length*-1))===k.value.toLowerCase()}))):k.type==="number"?(k.value&&!k.condition&&(k.condition="Equal"),k.condition==="Equal"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))===parseFloat(k.value)):k.condition==="NotEqual"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))!==parseFloat(k.value)):k.condition==="GreaterThan"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))>parseFloat(k.value)):k.condition==="GreaterThanOrEqual"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))>=parseFloat(k.value)):k.condition==="LessThan"?i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))<parseFloat(k.value)):k.condition==="LessThanOrEqual"&&(i=i.filter(F=>V(F,k.field)&&parseFloat(V(F,k.field))<=parseFloat(k.value)))):k.type==="date"?(k.value&&!k.condition&&(k.condition="Equal"),k.condition==="Equal"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))===k.value):k.condition==="NotEqual"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))!==k.value):k.condition==="GreaterThan"?i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))>k.value):k.condition==="LessThan"&&(i=i.filter(F=>V(F,k.field)&&Ne(V(F,k.field))<k.value))):k.type==="bool"&&(i=i.filter(F=>V(F,k.field)===k.value)),k.condition==="IsNull"?(i=i.filter(F=>V(F,k.field)==null||V(F,k.field)==""),k.value=""):k.condition==="IsNotNull"&&(k.value="",i=i.filter(F=>V(F,k.field))))}),C.value&&(i!=null&&i.length)){let k=[];const F=(t.columns||[]).filter($=>$.search&&!$.hide).map($=>$.field);for(var m=0;m<(i==null?void 0:i.length);m++)for(var p=0;p<F.length;p++)if((z=V(i[m],F[p]))!=null&&z.toString().toLowerCase().includes(C.value.toLowerCase())){k.push(i[m]);break}i=k}const ee=((A=t.columns.find(k=>k.field==b.value))==null?void 0:A.type)==="number",hn=qe(ee||!1),mn=E.value==="desc"?-1:1;i.sort((k,F)=>{var gt,bt;const $=(gt=b.value)==null?void 0:gt.split(".").reduce((re,He)=>re==null?void 0:re[He],k),pn=(bt=b.value)==null?void 0:bt.split(".").reduce((re,He)=>re==null?void 0:re[He],F);return hn.compare($,pn)*mn})}return i}),U=e.ref(new Map),Y=()=>{let i=[],m=Ce.value;t.isServerMode?(y.value=t.totalRows||0,i=m):(y.value=(m==null?void 0:m.length)||0,i=m.slice(w.value-1,B.value)),t.hasSubtable&&i.forEach(function(p,M){if(p.isExpanded!==void 0){const z=p._rowIndex!==void 0?p._rowIndex:p.id||M;U.value.set(z,p.isExpanded)}}),a.value=i||[]},le=()=>{if(G.value){const i=P.value?t.leftmenuMinWidth:t.leftmenuDefaultWidth;G.value.style.cssText=`
|
|
2
2
|
width: ${T.value}px !important;
|
|
3
3
|
min-width: ${i}px !important;
|
|
4
4
|
max-width: ${i}px !important;
|
package/dist/vue3-datatable.js
CHANGED
|
@@ -2455,7 +2455,7 @@ const Xo = /* @__PURE__ */ je(Go, [["render", Yo]]), Zo = { key: "hdrrow" }, ei
|
|
|
2455
2455
|
onFilterChange: b[6] || (b[6] = (x) => e("filterChange")),
|
|
2456
2456
|
onSortChange: b[7] || (b[7] = (x, R) => e("sortChange", x, R)),
|
|
2457
2457
|
onConditionChange: b[8] || (b[8] = (x, R) => {
|
|
2458
|
-
const J = a.value.get(x);
|
|
2458
|
+
const J = a.value.value.get(x);
|
|
2459
2459
|
J && (J.condition = R, r.value.value[x] = R);
|
|
2460
2460
|
}),
|
|
2461
2461
|
onClearFilter: (x) => {
|