@shifl-inc/ui 0.9.13 → 0.9.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shifl-ui.umd CHANGED
@@ -1,5 +1,5 @@
1
- (function(le,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(le=typeof globalThis<"u"?globalThis:le||self,e(le.ShiflGrid={},le.Vue))})(this,function(le,e){"use strict";function vn(l){var d;const r=(l.columns||[]).map(f=>({...f,freeze:f.freeze??!1,visible:f.visible??!0,protected:f.protected??!1})),i=(d=l.availableColumns)==null?void 0:d.map(f=>({...f,freeze:f.freeze??!1,visible:!1,protected:f.protected??!1})),a=l.apiConfig?"server":l.searchMode||"client";return{...l,columns:r,availableColumns:i,rows:l.rows??[],search:l.search??[],searchMode:a,filters:l.filters??[],paginationMeta:l.paginationMeta?{show:l.paginationMeta.show??!0,currentPage:l.paginationMeta.currentPage??1,perPage:l.paginationMeta.perPage??20,total:l.paginationMeta.total??0,from:l.paginationMeta.from,to:l.paginationMeta.to,...l.paginationMeta}:void 0}}function vt(l){const r=[...l],i=e.ref([...l]);function a(m){i.value=i.value.map(y=>y.key===m?{...y,visible:!y.visible}:y)}function d(m){i.value=i.value.map(y=>({...y,visible:m}))}function f(m){const y=i.value.map(N=>N.key===m?{...N,freeze:!N.freeze}:N),p=y.filter(N=>N.freeze),B=y.filter(N=>!N.freeze);i.value=[...p,...B]}function u(m,y){if(m===y||y<0||y>=i.value.length)return;const p=i.value[m];if(p!=null&&p.freeze)return;const B=[...i.value],[N]=B.splice(m,1);B.splice(y,0,N),B.forEach((T,L)=>{T.order=L+1}),i.value=B}function k(){const m=r.map((y,p)=>({...y,order:p+1}));m.sort((y,p)=>{const B=!!y.actionColumn,N=!!p.actionColumn;return B&&!N?1:!B&&N?-1:(y.order||0)-(p.order||0)}),i.value=m}const h=e.computed(()=>i.value.filter(m=>m.visible));return{columns:i,visibleColumns:h,toggleColumnVisibility:a,setAllVisible:d,toggleFreeze:f,moveColumn:u,resetColumns:k}}function xt(l){const r=e.ref(l);function i(d){var f;r.value=((f=r.value)==null?void 0:f.key)===d&&r.value.order==="asc"?{key:d,order:"desc"}:{key:d,order:"asc"}}function a(d){if(!r.value)return d;const{key:f,order:u}=r.value;return[...d].sort((k,h)=>{const m=k[f],y=h[f];if(m===y)return 0;if(m==null)return 1;if(y==null)return-1;const p=String(m).localeCompare(String(y),void 0,{numeric:!0});return u==="asc"?p:-p})}return{sort:r,setSort:i,applySort:a}}function $t(l,r={}){const{onFiltersChange:i,debounceTime:a=300,onPaginationReset:d}=r,f=e.ref({});let u=null;const k=()=>{const C={};l.forEach(P=>{C[P.key]=null}),f.value=C},h=e.computed(()=>Object.values(f.value).some(C=>typeof C=="boolean"?C:Array.isArray(C)?C.length>0:typeof C=="object"&&C!==null?Object.values(C).some(P=>P!=null&&P!==""):C!=null&&C!=="")),m=()=>{const C=[],P=[],F=[],Z=[];return Object.entries(f.value).forEach(([O,q])=>{if(!q)return;const z=l.find(j=>j.key===O);if(!z){console.warn("No config found for filter key:",O);return}if(z.type==="date"){if(typeof q=="object"&&("start"in q||"end"in q)){const j=q;if(j.start||j.end){const Y={field:O,operation:"orBetween",from:j.start,to:j.end};if(j.start&&j.end)O==="eta"?P.push(Y):O==="etd"?F.push(Y):Z.push(Y);else if(j.start){const K={field:O,operation:">=",value:j.start};O==="eta"?P.push(K):O==="etd"?F.push(K):Z.push(K)}else if(j.end){const K={field:O,operation:"<=",value:j.end};O==="eta"?P.push(K):O==="etd"?F.push(K):Z.push(K)}}}}else z.type==="select"?Array.isArray(q)&&q.length>0?C.push({field:O,operation:"in",value:q}):!Array.isArray(q)&&q!==null&&C.push({field:O,operation:"=",value:q}):z.type==="checkbox"&&q===!0&&C.push({field:O,operation:"=",value:!0})}),P.forEach(O=>{C.push(O)}),F.forEach(O=>{C.push(O)}),Z.length>0&&C.push({field:"",operation:"OR",value:Z}),C.length>0?C:null},y=()=>{d&&d();const C=m();i&&i(C)},p=()=>{u&&clearTimeout(u),u=setTimeout(()=>{y()},a)},B=(C,P)=>{f.value[C]=P;const F=l.find(Z=>Z.key===C);((F==null?void 0:F.type)==="select"||(F==null?void 0:F.type)==="checkbox")&&p()},N=(C,P)=>{f.value[C]=P,y()},T=C=>{f.value[C]=null,y()},L=()=>{Object.keys(f.value).forEach(C=>{f.value[C]=null}),y()},b=()=>{k(),y()};return k(),e.watch(f,()=>{},{deep:!0}),{filterValues:f,updateFilterValue:B,confirmFilterValue:N,clearAllFilters:L,clearFilter:T,hasActiveFilters:h,getApiFilters:m,applyFilters:y,resetFilters:b}}function xn(){function l(r,i,a){const d=(a||"").trim().toLowerCase();return d?r.filter(f=>(i&&i.length?i.map(k=>f[k]):Object.values(f)).some(k=>String(k??"").toLowerCase().includes(d))):r}return{applyGlobalFilter:l}}function $n(){const l=e.ref({rowIndex:null,position:null});function r(u,k){const h=k.getBoundingClientRect();l.value={rowIndex:u,position:{top:h.bottom+6,left:0}},requestAnimationFrame(()=>{i(k)})}function i(u){const k=document.querySelector(".shifl-grid__action-menu");if(!k)return;const h=k.offsetWidth,m=u.getBoundingClientRect(),y=8;let p=m.left+m.width-h;p+h>window.innerWidth-y&&(p=window.innerWidth-h-y),p<y&&(p=y),l.value.position={...l.value.position,left:p}}function a(){l.value={rowIndex:null,position:null}}function d(u){return l.value.rowIndex===u}function f(u){u.key==="Escape"&&l.value.rowIndex!==null&&a()}return e.onMounted(()=>{document.addEventListener("keydown",f)}),e.onUnmounted(()=>{document.removeEventListener("keydown",f)}),{menuState:l,openMenu:r,closeMenu:a,isMenuOpen:d}}function Tn(l,r){const i=e.ref(!1),a=e.ref(null),d=e.ref([]),f=e.ref(void 0);let u=null,k=null;function h(){k&&(k.abort(),k=null),u&&(clearTimeout(u),u=null)}function m(b){const C=new URLSearchParams;if(b.search&&C.append("search",b.search),b.page!==void 0&&C.append("page",String(b.page)),b.perPage!==void 0&&C.append("per_page",String(b.perPage)),b.sort&&(C.append("sort",b.sort.key),C.append("order",b.sort.order)),b.tabName&&C.append("tabName",b.tabName),b.filters&&b.filters.length>0){const P=JSON.stringify(b.filters);C.append("filters",P)}if(r!=null&&r.additionalParams){const P=typeof r.additionalParams=="function"?r.additionalParams(b):r.additionalParams;Object.entries(P).forEach(([F,Z])=>{F==="tabName"&&b.tabName||Z!=null&&Z!==""&&(Array.isArray(Z)?Z.forEach(O=>C.append(`${F}[]`,String(O))):C.append(F,String(Z)))})}return C}function y(b){var C,P,F;return r!=null&&r.bodyBuilder?r.bodyBuilder(b):{search:b.search,page:b.page,per_page:b.perPage,sort:(C=b.sort)==null?void 0:C.key,order:(P=b.sort)==null?void 0:P.order,tabName:b.tabName,filters:(F=b.filters)==null?void 0:F.reduce((Z,O)=>(O.value!==void 0&&O.value!==null&&O.value!==""&&(Z[O.field]=O.value),Z),{}),"filters[]":b.filters||[],...typeof(r==null?void 0:r.additionalParams)=="function"?r.additionalParams(b):Object.fromEntries(Object.entries((r==null?void 0:r.additionalParams)||{}).filter(([Z])=>Z!=="tabName"||!b.tabName))||{}}}function p(){const b={"Content-Type":"application/json",...(r==null?void 0:r.headers)||{}};if(r!=null&&r.getAuthToken){const C=r.getAuthToken();C&&(b.Authorization=`Bearer ${C}`)}return b}function B(b){if(r!=null&&r.responseTransformer)return r.responseTransformer(b);const C=b;return{data:C.data||C.rows||[],meta:C.meta}}async function N(b){if(!l){a.value=new Error("API URL is required");return}h(),k=new AbortController;const C=k;i.value=!0,a.value=null;try{const P=(r==null?void 0:r.method)||"GET",F=p();let Z=l,O;if(P==="GET"){const Y=r!=null&&r.paramsBuilder?r.paramsBuilder(b):m(b);if(Y instanceof URLSearchParams){const K=Y.toString();Z=K?`${l}?${K}`:l}else{const K=new URLSearchParams;Object.entries(Y).forEach(([x,Q])=>{Q!=null&&Q!==""&&(Array.isArray(Q)?Q.forEach(X=>K.append(`${x}[]`,String(X))):K.append(x,String(Q)))});const D=K.toString();Z=D?`${l}?${D}`:l}}else O=y(b);const q=await fetch(Z,{method:P,headers:F,body:O?JSON.stringify(O):void 0,signal:C.signal});if(C.signal.aborted)return;if(!q.ok)throw new Error(`API request failed: ${q.status} ${q.statusText}`);const z=await q.json(),j=B(z);C.signal.aborted||(d.value=j.data,f.value=j.meta)}catch(P){P instanceof Error&&P.name!=="AbortError"&&!C.signal.aborted&&(a.value=P,d.value=[],f.value=void 0)}finally{k===C&&(i.value=!1,k=null)}}function T(b,C=!1){h();const P=(r==null?void 0:r.debounceMs)??300;C?N(b):(i.value=!0,u=setTimeout(()=>{N(b)},P))}function L(b){T(b,!0)}return{loading:e.computed(()=>i.value),error:e.computed(()=>a.value),data:e.computed(()=>d.value),paginationMeta:e.computed(()=>f.value),fetchData:N,fetchDataDebounced:T,refresh:L,cancelCurrentRequest:h}}function Tt(l,r){var h,m;const i=(r==null?void 0:r.search)||e.ref(void 0),a=(r==null?void 0:r.filters)||e.ref(null),d=(r==null?void 0:r.sort)||e.ref(l.sort),f=(r==null?void 0:r.pagination)||e.ref({page:((h=l.paginationMeta)==null?void 0:h.currentPage)||1,perPage:((m=l.paginationMeta)==null?void 0:m.perPage)||20}),u=(r==null?void 0:r.extraState)||e.ref(void 0),k=(r==null?void 0:r.tabName)||e.ref(void 0);if(l.apiConfig&&l.searchMode==="server"){let y=function(){var L,b;return{search:i.value,filters:a.value,sort:d.value,page:(L=f.value)==null?void 0:L.page,perPage:(b=f.value)==null?void 0:b.perPage,extraState:u.value,tabName:k.value}},p=function(L){var b,C,P,F;return T?L.search!==T.search||L.page!==T.page||L.perPage!==T.perPage||L.tabName!==T.tabName||((b=L.sort)==null?void 0:b.key)!==((C=T.sort)==null?void 0:C.key)||((P=L.sort)==null?void 0:P.order)!==((F=T.sort)==null?void 0:F.order)||JSON.stringify(L.filters)!==JSON.stringify(T.filters)||JSON.stringify(L.extraState)!==JSON.stringify(T.extraState):!0};const B=Tn(l.apiConfig.apiUrl,l.apiConfig);let N=!1,T=null;return e.watch([i,a,d,f,u,k],()=>{if(N)return;const L=y();if(!p(L))return;const b=(T==null?void 0:T.search)!==L.search;T=L,B.fetchDataDebounced(L,!b)},{immediate:!0,deep:!0}),e.watch(B.paginationMeta,L=>{if(L&&f.value){const b=L.perPage||f.value.perPage;b!==f.value.perPage&&(N=!0,f.value.perPage=b,e.nextTick(()=>{N=!1}))}}),{rows:B.data,loading:B.loading,error:B.error,paginationMeta:B.paginationMeta,refresh:()=>{var b,C;const L={search:i.value,filters:a.value,sort:d.value,page:(b=f.value)==null?void 0:b.page,perPage:(C=f.value)==null?void 0:C.perPage,extraState:u.value,tabName:k.value};B.refresh(L)},cancelCurrentRequest:B.cancelCurrentRequest}}return{rows:e.computed(()=>l.rows),loading:e.computed(()=>!1),error:e.computed(()=>null),paginationMeta:e.computed(()=>l.paginationMeta),refresh:()=>{},cancelCurrentRequest:()=>{}}}function Lt(l){if(!l)return"";if(typeof l=="string"){let r=new Date;if(l.includes("-")&&l.includes(" ")){const f=l.split(" ")[0].split("-");if(f.length===3){const[u,k,h]=f;r=new Date(`${u}-${k}-${h}`)}}else if(l.match(/^\d{4}-\d{2}-\d{2}$/)){const[f,u,k]=l.split("-");r=new Date(`${f}-${u}-${k}`)}else if(l.match(/^\d{2}-\d{2}-\d{4}$/)){const[f,u,k]=l.split("-");r=new Date(`${k}-${u}-${f}`)}else if(l.match(/^\d{2}\/\d{2}\/\d{4}$/)){const[f,u,k]=l.split("/");r=new Date(`${k}-${u}-${f}`)}else r=new Date(l);if(!r||isNaN(r.getTime()))return l;const i=r.getMonth()+1,a=r.getDate(),d=r.getFullYear();return`${i}/${a}/${d}`}if(l instanceof Date){if(isNaN(l.getTime()))return"";const r=l.getMonth()+1,i=l.getDate(),a=l.getFullYear();return`${r}/${i}/${a}`}return String(l)}function At(l){return["eta","etd","cut_off_date","lfd"].some(i=>l.toLowerCase().includes(i))}function Ft(l,r){if(!l.smartTrackingColumn)return"";const i=l.smartTrackingColumn.dataKey,a=r[i];if(a===!0||a===1)return"true";if(typeof a=="string"){const d=a.toLowerCase().trim();return d==="true"||d==="1"||d==="yes"?"true":""}return""}function Ln(l){const{rows:r,columns:i}=l;if(r.length===0)return"";const a=i.filter(u=>u.visible&&u.key!=="_actions").sort((u,k)=>(u.order||0)-(k.order||0)),f=[a.map(u=>{let k=u.label||u.key;return u.key==="_smart_tracking"&&(k="Smart Tracking"),`"${k}"`}).join(",")];return r.forEach(u=>{const k=a.map(h=>{let m="";if(h.key==="_smart_tracking"&&h.smartTrackingColumn)m=Ft(h,u);else{const p=u[h.key];if(p==null?m="":Array.isArray(p)?m=p.map(B=>typeof B=="object"&&B!==null&&"name"in B?B.name:String(B)).join(", "):typeof p=="object"&&p!==null?m="name"in p?String(p.name):JSON.stringify(p):m=String(p),At(h.key)){const B=Lt(p);B?m=`="${B}"`:m=""}}const y=m.replace(/\r?\n/g," ");return!y.startsWith('"')&&(y.includes('"')||y.includes(","))?m=`"${y.replace(/"/g,'""')}"`:y.startsWith('"')||(m=y),m});f.push(k.join(","))}),f.join(`
2
- `)}function Pt(l,r,i){const a=new Blob([l],{type:i}),d=window.URL.createObjectURL(a),f=document.createElement("a");f.href=d,f.download=r,document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(d)}function Ot(l,r){const i=Ln(l),a=r.endsWith(".csv")?r:`${r}.csv`;Pt(i,a,"text/csv;charset=utf-8;")}function An(l,r){const{rows:i,columns:a}=l,d=a.filter(k=>k.visible&&k.key!=="_actions").sort((k,h)=>(k.order||0)-(h.order||0));let f=`
1
+ (function(ne,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(ne=typeof globalThis<"u"?globalThis:ne||self,e(ne.ShiflGrid={},ne.Vue))})(this,function(ne,e){"use strict";function xn(l){var d;const r=(l.columns||[]).map(u=>({...u,freeze:u.freeze??!1,visible:u.visible??!0,protected:u.protected??!1})),i=(d=l.availableColumns)==null?void 0:d.map(u=>({...u,freeze:u.freeze??!1,visible:!1,protected:u.protected??!1})),a=l.apiConfig?"server":l.searchMode||"client";return{...l,columns:r,availableColumns:i,rows:l.rows??[],search:l.search??[],searchMode:a,filters:l.filters??[],paginationMeta:l.paginationMeta?{show:l.paginationMeta.show??!0,currentPage:l.paginationMeta.currentPage??1,perPage:l.paginationMeta.perPage??20,total:l.paginationMeta.total??0,from:l.paginationMeta.from,to:l.paginationMeta.to,...l.paginationMeta}:void 0}}function xt(l){const r=[...l],i=e.ref([...l]);function a(m){i.value=i.value.map(y=>y.key===m?{...y,visible:!y.visible}:y)}function d(m){i.value=i.value.map(y=>({...y,visible:m}))}function u(m){const y=i.value.map(N=>N.key===m?{...N,freeze:!N.freeze}:N),p=y.filter(N=>N.freeze),w=y.filter(N=>!N.freeze);i.value=[...p,...w]}function f(m,y){if(m===y||y<0||y>=i.value.length)return;const p=i.value[m];if(p!=null&&p.freeze)return;const w=[...i.value],[N]=w.splice(m,1);w.splice(y,0,N),w.forEach((A,L)=>{A.order=L+1}),i.value=w}function C(){const m=r.map((y,p)=>({...y,order:p+1}));m.sort((y,p)=>{const w=!!y.actionColumn,N=!!p.actionColumn;return w&&!N?1:!w&&N?-1:(y.order||0)-(p.order||0)}),i.value=m}const h=e.computed(()=>i.value.filter(m=>m.visible));return{columns:i,visibleColumns:h,toggleColumnVisibility:a,setAllVisible:d,toggleFreeze:u,moveColumn:f,resetColumns:C}}function Tt(l){const r=e.ref(l);function i(d){var u;r.value=((u=r.value)==null?void 0:u.key)===d&&r.value.order==="asc"?{key:d,order:"desc"}:{key:d,order:"asc"}}function a(d){if(!r.value)return d;const{key:u,order:f}=r.value;return[...d].sort((C,h)=>{const m=C[u],y=h[u];if(m===y)return 0;if(m==null)return 1;if(y==null)return-1;const p=String(m).localeCompare(String(y),void 0,{numeric:!0});return f==="asc"?p:-p})}return{sort:r,setSort:i,applySort:a}}function $t(l,r={}){const{onFiltersChange:i,debounceTime:a=300,onPaginationReset:d}=r,u=e.ref({});let f=null;const C=()=>{const D={};l.forEach(R=>{D[R.key]=R.defaultValue!==void 0?R.defaultValue:null}),u.value=D},h=e.computed(()=>Object.values(u.value).some(D=>typeof D=="boolean"?D:Array.isArray(D)?D.length>0:typeof D=="object"&&D!==null?Object.values(D).some(R=>R!=null&&R!==""):D!=null&&D!=="")),m=()=>{const D=[];return Object.entries(u.value).forEach(([R,v])=>{if(!v)return;const I=l.find(Z=>Z.key===R);if(!I){console.warn("No config found for filter key:",R);return}if(I.type==="date"){if(typeof v=="object"&&("start"in v||"end"in v)){const Z=v;(Z.start||Z.end)&&(Z.start&&Z.end?D.push({field:R,operation:"orBetween",from:Z.start,to:Z.end}):Z.start?D.push({field:R,operation:">=",value:Z.start}):Z.end&&D.push({field:R,operation:"<=",value:Z.end}))}}else I.type==="select"?Array.isArray(v)&&v.length>0?D.push({field:R,operation:"in",value:v}):!Array.isArray(v)&&v!==null&&D.push({field:R,operation:"=",value:v}):I.type==="checkbox"&&v===!0&&D.push({field:R,operation:"=",value:!0})}),D.length>0?D:null},y=()=>{d&&d();const D=m();i&&i(D)},p=()=>{f&&clearTimeout(f),f=setTimeout(()=>{y()},a)},w=(D,R)=>{u.value[D]=R;const v=l.find(I=>I.key===D);((v==null?void 0:v.type)==="select"||(v==null?void 0:v.type)==="checkbox")&&p()},N=(D,R)=>{u.value[D]=R,y()},A=D=>{u.value[D]=null,y()},L=()=>{Object.keys(u.value).forEach(D=>{u.value[D]=null}),y()},b=()=>{C(),y()};return C(),e.computed(()=>l.some(D=>D.defaultValue!==void 0)).value&&i&&setTimeout(()=>{y()},0),e.watch(u,()=>{},{deep:!0}),{filterValues:u,updateFilterValue:w,confirmFilterValue:N,clearAllFilters:L,clearFilter:A,hasActiveFilters:h,getApiFilters:m,applyFilters:y,resetFilters:b}}function Tn(){function l(r,i,a){const d=(a||"").trim().toLowerCase();return d?r.filter(u=>(i&&i.length?i.map(C=>u[C]):Object.values(u)).some(C=>String(C??"").toLowerCase().includes(d))):r}return{applyGlobalFilter:l}}function $n(){const l=e.ref({rowIndex:null,position:null});function r(f,C){const h=C.getBoundingClientRect();l.value={rowIndex:f,position:{top:h.bottom+6,left:0}},requestAnimationFrame(()=>{i(C)})}function i(f){const C=document.querySelector(".shifl-grid__action-menu");if(!C)return;const h=C.offsetWidth,m=f.getBoundingClientRect(),y=8;let p=m.left+m.width-h;p+h>window.innerWidth-y&&(p=window.innerWidth-h-y),p<y&&(p=y),l.value.position={...l.value.position,left:p}}function a(){l.value={rowIndex:null,position:null}}function d(f){return l.value.rowIndex===f}function u(f){f.key==="Escape"&&l.value.rowIndex!==null&&a()}return e.onMounted(()=>{document.addEventListener("keydown",u)}),e.onUnmounted(()=>{document.removeEventListener("keydown",u)}),{menuState:l,openMenu:r,closeMenu:a,isMenuOpen:d}}function Ln(l,r){const i=e.ref(!1),a=e.ref(null),d=e.ref([]),u=e.ref(void 0);let f=null,C=null;function h(){C&&(C.abort(),C=null),f&&(clearTimeout(f),f=null)}function m(b){const T=new URLSearchParams;if(b.search&&T.append("search",b.search),b.page!==void 0&&T.append("page",String(b.page)),b.perPage!==void 0&&T.append("per_page",String(b.perPage)),b.sort&&(T.append("sort",b.sort.key),T.append("order",b.sort.order)),b.tabName&&T.append("tabName",b.tabName),b.filters&&b.filters.length>0){const D=JSON.stringify(b.filters);T.append("filters",D)}if(r!=null&&r.additionalParams){const D=typeof r.additionalParams=="function"?r.additionalParams(b):r.additionalParams;Object.entries(D).forEach(([R,v])=>{R==="tabName"&&b.tabName||v!=null&&v!==""&&(Array.isArray(v)?v.forEach(I=>T.append(`${R}[]`,String(I))):T.append(R,String(v)))})}return T}function y(b){var T,D,R;return r!=null&&r.bodyBuilder?r.bodyBuilder(b):{search:b.search,page:b.page,per_page:b.perPage,sort:(T=b.sort)==null?void 0:T.key,order:(D=b.sort)==null?void 0:D.order,tabName:b.tabName,filters:(R=b.filters)==null?void 0:R.reduce((v,I)=>(I.value!==void 0&&I.value!==null&&I.value!==""&&(v[I.field]=I.value),v),{}),"filters[]":b.filters||[],...typeof(r==null?void 0:r.additionalParams)=="function"?r.additionalParams(b):Object.fromEntries(Object.entries((r==null?void 0:r.additionalParams)||{}).filter(([v])=>v!=="tabName"||!b.tabName))||{}}}function p(){const b={"Content-Type":"application/json",...(r==null?void 0:r.headers)||{}};if(r!=null&&r.getAuthToken){const T=r.getAuthToken();T&&(b.Authorization=`Bearer ${T}`)}return b}function w(b){if(r!=null&&r.responseTransformer)return r.responseTransformer(b);const T=b;return{data:T.data||T.rows||[],meta:T.meta}}async function N(b){if(!l){a.value=new Error("API URL is required");return}h(),C=new AbortController;const T=C;i.value=!0,a.value=null;try{const D=(r==null?void 0:r.method)||"GET",R=p();let v=l,I;if(D==="GET"){const ee=r!=null&&r.paramsBuilder?r.paramsBuilder(b):m(b);if(ee instanceof URLSearchParams){const W=ee.toString();v=W?`${l}?${W}`:l}else{const W=new URLSearchParams;Object.entries(ee).forEach(([P,U])=>{U!=null&&U!==""&&(Array.isArray(U)?U.forEach(J=>W.append(`${P}[]`,String(J))):W.append(P,String(U)))});const M=W.toString();v=M?`${l}?${M}`:l}}else I=y(b);const Z=await fetch(v,{method:D,headers:R,body:I?JSON.stringify(I):void 0,signal:T.signal,credentials:(r==null?void 0:r.credentials)??"same-origin",redirect:(r==null?void 0:r.redirect)??"follow"});if(T.signal.aborted)return;if(!Z.ok)throw new Error(`API request failed: ${Z.status} ${Z.statusText}`);const j=await Z.json(),Y=w(j);T.signal.aborted||(d.value=Y.data,u.value=Y.meta)}catch(D){D instanceof Error&&D.name!=="AbortError"&&!T.signal.aborted&&(a.value=D,d.value=[],u.value=void 0)}finally{C===T&&(i.value=!1,C=null)}}function A(b,T=!1){h();const D=(r==null?void 0:r.debounceMs)??300;T?N(b):(i.value=!0,f=setTimeout(()=>{N(b)},D))}function L(b){A(b,!0)}return{loading:e.computed(()=>i.value),error:e.computed(()=>a.value),data:e.computed(()=>d.value),paginationMeta:e.computed(()=>u.value),fetchData:N,fetchDataDebounced:A,refresh:L,cancelCurrentRequest:h}}function Lt(l,r){var h,m;const i=(r==null?void 0:r.search)||e.ref(void 0),a=(r==null?void 0:r.filters)||e.ref(null),d=(r==null?void 0:r.sort)||e.ref(l.sort),u=(r==null?void 0:r.pagination)||e.ref({page:((h=l.paginationMeta)==null?void 0:h.currentPage)||1,perPage:((m=l.paginationMeta)==null?void 0:m.perPage)||20}),f=(r==null?void 0:r.extraState)||e.ref(void 0),C=(r==null?void 0:r.tabName)||e.ref(void 0);if(l.apiConfig&&l.searchMode==="server"){let y=function(){var L,b;return{search:i.value,filters:a.value,sort:d.value,page:(L=u.value)==null?void 0:L.page,perPage:(b=u.value)==null?void 0:b.perPage,extraState:f.value,tabName:C.value}},p=function(L){var b,T,D,R;return A?L.search!==A.search||L.page!==A.page||L.perPage!==A.perPage||L.tabName!==A.tabName||((b=L.sort)==null?void 0:b.key)!==((T=A.sort)==null?void 0:T.key)||((D=L.sort)==null?void 0:D.order)!==((R=A.sort)==null?void 0:R.order)||JSON.stringify(L.filters)!==JSON.stringify(A.filters)||JSON.stringify(L.extraState)!==JSON.stringify(A.extraState):!0};const w=Ln(l.apiConfig.apiUrl,l.apiConfig);let N=!1,A=null;return e.watch([i,a,d,u,f,C],()=>{if(N)return;const L=y();if(!p(L))return;const b=(A==null?void 0:A.search)!==L.search;A=L,w.fetchDataDebounced(L,!b)},{immediate:!0,deep:!0}),e.onActivated(()=>{const L=y();w.refresh(L)}),e.watch(w.paginationMeta,L=>{if(L&&u.value){const b=L.perPage||u.value.perPage;b!==u.value.perPage&&(N=!0,u.value.perPage=b,e.nextTick(()=>{N=!1}))}}),{rows:w.data,loading:w.loading,error:w.error,paginationMeta:w.paginationMeta,refresh:()=>{var b,T;const L={search:i.value,filters:a.value,sort:d.value,page:(b=u.value)==null?void 0:b.page,perPage:(T=u.value)==null?void 0:T.perPage,extraState:f.value,tabName:C.value};w.refresh(L)},cancelCurrentRequest:w.cancelCurrentRequest}}return{rows:e.computed(()=>l.rows),loading:e.computed(()=>!1),error:e.computed(()=>null),paginationMeta:e.computed(()=>l.paginationMeta),refresh:()=>{},cancelCurrentRequest:()=>{}}}function At(l){if(!l)return"";if(typeof l=="string"){let r=new Date;if(l.includes("-")&&l.includes(" ")){const u=l.split(" ")[0].split("-");if(u.length===3){const[f,C,h]=u;r=new Date(`${f}-${C}-${h}`)}}else if(l.match(/^\d{4}-\d{2}-\d{2}$/)){const[u,f,C]=l.split("-");r=new Date(`${u}-${f}-${C}`)}else if(l.match(/^\d{2}-\d{2}-\d{4}$/)){const[u,f,C]=l.split("-");r=new Date(`${C}-${f}-${u}`)}else if(l.match(/^\d{2}\/\d{2}\/\d{4}$/)){const[u,f,C]=l.split("/");r=new Date(`${C}-${f}-${u}`)}else r=new Date(l);if(!r||isNaN(r.getTime()))return l;const i=r.getMonth()+1,a=r.getDate(),d=r.getFullYear();return`${i}/${a}/${d}`}if(l instanceof Date){if(isNaN(l.getTime()))return"";const r=l.getMonth()+1,i=l.getDate(),a=l.getFullYear();return`${r}/${i}/${a}`}return String(l)}function Ft(l){return["eta","etd","cut_off_date","lfd"].some(i=>l.toLowerCase().includes(i))}function Pt(l,r){if(!l.smartTrackingColumn)return"";const i=l.smartTrackingColumn.dataKey,a=r[i];if(a===!0||a===1)return"true";if(typeof a=="string"){const d=a.toLowerCase().trim();return d==="true"||d==="1"||d==="yes"?"true":""}return""}function An(l){const{rows:r,columns:i}=l;if(r.length===0)return"";const a=i.filter(f=>f.visible&&f.key!=="_actions").sort((f,C)=>(f.order||0)-(C.order||0)),u=[a.map(f=>{let C=f.label||f.key;return f.key==="_smart_tracking"&&(C="Smart Tracking"),`"${C}"`}).join(",")];return r.forEach(f=>{const C=a.map(h=>{let m="";if(h.key==="_smart_tracking"&&h.smartTrackingColumn)m=Pt(h,f);else{const p=f[h.key];if(p==null?m="":Array.isArray(p)?m=p.map(w=>typeof w=="object"&&w!==null&&"name"in w?w.name:String(w)).join(", "):typeof p=="object"&&p!==null?m="name"in p?String(p.name):JSON.stringify(p):m=String(p),Ft(h.key)){const w=At(p);w?m=`="${w}"`:m=""}}const y=m.replace(/\r?\n/g," ");return!y.startsWith('"')&&(y.includes('"')||y.includes(","))?m=`"${y.replace(/"/g,'""')}"`:y.startsWith('"')||(m=y),m});u.push(C.join(","))}),u.join(`
2
+ `)}function Ot(l,r,i){const a=new Blob([l],{type:i}),d=window.URL.createObjectURL(a),u=document.createElement("a");u.href=d,u.download=r,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)}function Rt(l,r){const i=An(l),a=r.endsWith(".csv")?r:`${r}.csv`;Ot(i,a,"text/csv;charset=utf-8;")}function Fn(l,r){const{rows:i,columns:a}=l,d=a.filter(C=>C.visible&&C.key!=="_actions").sort((C,h)=>(C.order||0)-(h.order||0));let u=`
3
3
  <!DOCTYPE html>
4
4
  <html>
5
5
  <head>
@@ -32,29 +32,49 @@
32
32
  <body>
33
33
  <table>
34
34
  <colgroup>
35
- `;d.forEach(k=>{const h=k.width||"auto",m=k.align||"left";f+=` <col style="width: ${h}; text-align: ${m};">
36
- `}),f+=`
35
+ `;d.forEach(C=>{const h=C.width||"auto",m=C.align||"left";u+=` <col style="width: ${h}; text-align: ${m};">
36
+ `}),u+=`
37
37
  </colgroup>
38
38
  <thead>
39
39
  <tr>
40
- `,d.forEach(k=>{let h=k.label||k.key;k.key==="_smart_tracking"&&(h="Smart Tracking"),f+=` <th>${Rt(h)}</th>
41
- `}),f+=`
40
+ `,d.forEach(C=>{let h=C.label||C.key;C.key==="_smart_tracking"&&(h="Smart Tracking"),u+=` <th>${zt(h)}</th>
41
+ `}),u+=`
42
42
  </tr>
43
43
  </thead>
44
44
  <tbody>
45
- `,i.forEach(k=>{f+=` <tr>
46
- `,d.forEach(h=>{let m="";if(h.key==="_smart_tracking"&&h.smartTrackingColumn)m=Ft(h,k);else{const p=k[h.key];p==null?m="":Array.isArray(p)?m=p.map(B=>typeof B=="object"&&B!==null&&"name"in B?B.name:String(B)).join(", "):typeof p=="object"&&p!==null?m="name"in p?String(p.name):JSON.stringify(p):m=String(p),At(h.key)&&(m=Lt(p))}const y=m.replace(/\r?\n/g,`
47
- `);f+=` <td>${Rt(y)}</td>
48
- `}),f+=` </tr>
49
- `}),f+=`
45
+ `,i.forEach(C=>{u+=` <tr>
46
+ `,d.forEach(h=>{let m="";if(h.key==="_smart_tracking"&&h.smartTrackingColumn)m=Pt(h,C);else{const p=C[h.key];p==null?m="":Array.isArray(p)?m=p.map(w=>typeof w=="object"&&w!==null&&"name"in w?w.name:String(w)).join(", "):typeof p=="object"&&p!==null?m="name"in p?String(p.name):JSON.stringify(p):m=String(p),Ft(h.key)&&(m=At(p))}const y=m.replace(/\r?\n/g,`
47
+ `);u+=` <td>${zt(y)}</td>
48
+ `}),u+=` </tr>
49
+ `}),u+=`
50
50
  </tbody>
51
51
  </table>
52
52
  </body>
53
- </html>`;const u=r.endsWith(".xlsx")?r:`${r}.xlsx`;Pt(f,u,"application/vnd.ms-excel")}function Rt(l){const r=document.createElement("div");return r.textContent=l,r.innerHTML}function Fn(l){const{exportType:r,fileName:i,data:a}=l;if(!a.rows||a.rows.length===0){console.warn("No data to export");return}switch(r){case"csv":Ot(a,i);break;case"excel":case"xlsx":An(a,i);break;default:Ot(a,i);break}}function Pn(l,r,i,a){return{rows:[...l],columns:[...r],sort:i,filters:a}}function zt(l){const r=[];return(!l.exportFileName||l.exportFileName.trim()==="")&&r.push("Export file name is required"),l.exportType?["csv","excel","xlsx"].includes(l.exportType)||r.push("Invalid export type. Must be csv, excel, or xlsx"):r.push("Export type is required"),l.source?["client","server"].includes(l.source)||r.push("Invalid export source. Must be client or server"):r.push("Export source is required"),{isValid:r.length===0,errors:r}}const On={shipment:[{key:"eta",label:"ETA",type:"date",defaultOperator:"between",placeholder:"Select ETA range"},{key:"etd",label:"ETD",type:"date",defaultOperator:"between",placeholder:"Select ETD range"},{key:"type",label:"Type",type:"select",defaultOperator:"=",placeholder:"Select type",config:{select:{multiple:!1}},options:[{label:"FCL",value:"FCL"},{label:"LCL",value:"LCL"},{label:"Air",value:"Air"}]},{key:"supplier_id",label:"Supplier",type:"select",defaultOperator:"in",placeholder:"Select suppliers",config:{select:{multiple:!0}},options:[]},{key:"status",label:"Status",type:"select",defaultOperator:"in",placeholder:"Select status",config:{select:{multiple:!0}},options:[{label:"Pending",value:"pending"},{label:"Confirmed",value:"confirmed"},{label:"In Transit",value:"in_transit"},{label:"Delivered",value:"delivered"},{label:"Cancelled",value:"cancelled"}]},{key:"origin",label:"Origin",type:"select",defaultOperator:"=",placeholder:"Select origin",config:{select:{multiple:!1}},options:[]},{key:"destination",label:"Destination",type:"select",defaultOperator:"=",placeholder:"Select destination",config:{select:{multiple:!1}},options:[]}]},Rn={width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zn=["fill"],Ht=e.defineComponent({__name:"ChevronRightIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Rn,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292892C0.683418 -0.0976301 1.31643 -0.0976314 1.70696 0.292892L6.70696 5.29289C7.0974 5.68342 7.09745 6.31646 6.70696 6.70695L1.70696 11.707C1.31646 12.0975 0.683424 12.0974 0.292893 11.707C-0.0976311 11.3164 -0.0976311 10.6834 0.292893 10.2929L4.58586 5.99992L0.292893 1.70695C-0.0976311 1.31643 -0.0976311 0.683417 0.292893 0.292892Z",fill:l.color},null,8,zn)]))}}),ae=(l,r)=>{const i=l.__vccOpts||l;for(const[a,d]of r)i[a]=d;return i},Hn={},In={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zn(l,r){return e.openBlock(),e.createElementBlock("svg",In,[...r[0]||(r[0]=[e.createStaticVNode('<path d="M5.33333 4.00016C6.06971 4.00016 6.66667 3.40321 6.66667 2.66683C6.66667 1.93045 6.06971 1.3335 5.33333 1.3335C4.59695 1.3335 4 1.93045 4 2.66683C4 3.40321 4.59695 4.00016 5.33333 4.00016Z" fill="#9CA5B4"></path><path d="M5.33333 9.33317C6.06971 9.33317 6.66667 8.73622 6.66667 7.99984C6.66667 7.26346 6.06971 6.6665 5.33333 6.6665C4.59695 6.6665 4 7.26346 4 7.99984C4 8.73622 4.59695 9.33317 5.33333 9.33317Z" fill="#9CA5B4"></path><path d="M5.33333 14.6667C6.06971 14.6667 6.66667 14.0697 6.66667 13.3333C6.66667 12.597 6.06971 12 5.33333 12C4.59695 12 4 12.597 4 13.3333C4 14.0697 4.59695 14.6667 5.33333 14.6667Z" fill="#9CA5B4"></path><path d="M10.6668 4.00016C11.4032 4.00016 12.0002 3.40321 12.0002 2.66683C12.0002 1.93045 11.4032 1.3335 10.6668 1.3335C9.93045 1.3335 9.3335 1.93045 9.3335 2.66683C9.3335 3.40321 9.93045 4.00016 10.6668 4.00016Z" fill="#9CA5B4"></path><path d="M10.6668 9.33317C11.4032 9.33317 12.0002 8.73622 12.0002 7.99984C12.0002 7.26346 11.4032 6.6665 10.6668 6.6665C9.93045 6.6665 9.3335 7.26346 9.3335 7.99984C9.3335 8.73622 9.93045 9.33317 10.6668 9.33317Z" fill="#9CA5B4"></path><path d="M10.6668 14.6667C11.4032 14.6667 12.0002 14.0697 12.0002 13.3333C12.0002 12.597 11.4032 12 10.6668 12C9.93045 12 9.3335 12.597 9.3335 13.3333C9.3335 14.0697 9.93045 14.6667 10.6668 14.6667Z" fill="#9CA5B4"></path>',6)])])}const jn=ae(Hn,[["render",Zn]]),qn={class:"shifl-column-manager__header"},Wn={class:"shifl-column-manager__title-wrapper"},Gn={class:"shifl-column-manager__title"},Kn={key:0},Un={key:0,class:"shifl-column-manager__context"},Yn={class:"shifl-column-manager__controls"},Jn={class:"shifl-column-manager__controls-left"},Qn=["disabled"],Xn={class:"shifl-column-manager__content"},eo={class:"shifl-column-manager__list"},to=["data-key","draggable","onDragover","onDragstart"],no=["aria-label","disabled"],oo=["checked","disabled","onChange"],lo={class:"shifl-column-manager__label-text"},ao={class:"shifl-column-manager__footer"},ro=["disabled"],io=ae(e.defineComponent({__name:"GridColumnManager",props:{titlePrefix:{},columns:{},isNewViewMode:{type:Boolean},savedViewConfig:{},defaultColumns:{}},emits:["close","apply","toggle","move","toggleFreeze","reset"],setup(l,{emit:r}){const i=l,a=e.computed(()=>(m.value.length>0?m.value:i.columns.map(w=>w.key)).map(w=>i.columns.find(A=>A.key===w)).filter(w=>w!==void 0).map(w=>({...w,visible:h.value[w.key]??w.visible,draggable:!(i.isNewViewMode&&w.freeze)&&!w.protected}))),d=e.computed(()=>i.columns.filter(S=>!S.freeze).map(S=>S.key)),f=e.computed(()=>d.value.every(S=>h.value[S]===!0)),u=e.computed(()=>f.value),k=e.computed(()=>{if(!p.value||!y.value)return!1;const S=JSON.stringify(h.value),v=JSON.stringify(y.value.changes),w=JSON.stringify(m.value),A=JSON.stringify(y.value.order),H=w!==A,_=S!==v;return H?!0:i.isNewViewMode?d.value.some(R=>h.value[R]===!0)||_:(B.value,_)}),h=e.ref({}),m=e.ref([]),y=e.ref(null),p=e.ref(!1),B=e.computed(()=>!i.isNewViewMode&&i.savedViewConfig!=null),N=()=>{if(h.value={},m.value=i.columns.map(S=>S.key),i.columns.forEach(S=>{if(i.isNewViewMode)S.visible===!1?h.value[S.key]=!1:h.value[S.key]=!0;else if(B.value&&i.savedViewConfig){const v=i.savedViewConfig.columns.find(w=>w.key===S.key);h.value[S.key]=(v==null?void 0:v.visible)??S.visible}else h.value[S.key]=S.visible}),B.value&&i.savedViewConfig){const S=i.savedViewConfig.columns.map(A=>A.key),v=S.filter(A=>i.columns.some(H=>H.key===A)),w=i.columns.map(A=>A.key).filter(A=>!S.includes(A));m.value=[...v,...w]}else m.value=i.columns.map(S=>S.key);y.value={changes:{...h.value},order:[...m.value]}};e.watch([()=>i.isNewViewMode,()=>i.savedViewConfig,()=>i.columns.length],()=>{N(),p.value=!0},{immediate:!0});const T=(S,v)=>{const w=v.target;h.value[S]=w.checked},L=()=>{Object.entries(h.value).forEach(([w,A])=>{const H=i.columns.find(E=>E.key===w);(H&&H.visible===!1&&A===!0||H&&H.visible!==A)&&Z("toggle",w)});const S=i.columns.map(w=>w.key),v=m.value;if(JSON.stringify(S)!==JSON.stringify(v)){let w=[...S];for(let A=0;A<v.length;A++){const H=v[A],_=w.indexOf(H);if(_!==-1&&_!==A){Z("move",_,A);const[E]=w.splice(_,1);w.splice(A,0,E)}}}Z("apply")},b=()=>{Object.keys(h.value).forEach(S=>{h.value[S]=!0})},C=()=>{Object.keys(h.value).forEach(S=>{const v=i.columns.find(w=>w.key===S);v&&!v.freeze&&(h.value[S]=!1)})},P=()=>{if(y.value)if(i.isNewViewMode)h.value={...y.value.changes},m.value=[...y.value.order];else if(B.value&&i.savedViewConfig){const S=i.savedViewConfig.columns.map(A=>A.key);i.columns.forEach(A=>{var _;const H=(_=i.savedViewConfig)==null?void 0:_.columns.find(E=>E.key===A.key);h.value[A.key]=(H==null?void 0:H.visible)??A.visible});const v=S.filter(A=>i.columns.some(H=>H.key===A)),w=i.columns.map(A=>A.key).filter(A=>!S.includes(A));m.value=[...v,...w]}else i.defaultColumns&&i.defaultColumns.length>0?(i.defaultColumns.forEach(S=>{h.value[S.key]=S.visible!==!1}),m.value=i.defaultColumns.map(S=>S.key)):(h.value={...y.value.changes},m.value=[...y.value.order])},F=()=>{Z("close")},Z=r,O=new Map,q=e.ref(null),z=e.ref(!1),j=e.ref(!1);function Y(S,v){var A;const w=a.value[v];if(!(w!=null&&w.draggable)||w!=null&&w.freeze||w!=null&&w.protected){S.preventDefault();return}q.value=v,z.value=!0,(A=S.dataTransfer)==null||A.setData("text/plain",w.key),S.dataTransfer.effectAllowed="move",requestAnimationFrame(()=>{Q()})}let K=0;function D(S,v){if(v.preventDefault(),q.value===null||q.value===S)return;const w=a.value.filter(E=>E.freeze).length;if(S<w)return;const A=performance.now();if(A-K<40)return;K=A;const H=q.value,_=S;X(H,_),q.value=_}function x(){q.value=null,z.value=!1}function Q(){O.clear(),document.querySelectorAll(".shifl-column-manager__item").forEach(S=>{const v=S.dataset.key;v&&O.set(v,S.getBoundingClientRect())})}function X(S,v){const w=[...m.value],[A]=w.splice(S,1);w.splice(v,0,A),m.value=w,requestAnimationFrame(()=>{$()})}function $(){if(j.value)return;j.value=!0;const S=document.querySelectorAll(".shifl-column-manager__item");let v=!1;S.forEach(w=>{const A=w.dataset.key;if(!A)return;const H=O.get(A),_=w.getBoundingClientRect();if(!H)return;const E=H.left-_.left,R=H.top-_.top;E===0&&R===0||(v=!0,w.style.transition="none",w.style.transform=`translate(${E}px, ${R}px)`,requestAnimationFrame(()=>{w.style.transition="transform 260ms cubic-bezier(0.22, 1, 0.36, 1)",w.style.transform=""}))}),v?setTimeout(()=>{j.value=!1},280):j.value=!1}function J(){z.value=!1,q.value=null}return(S,v)=>(e.openBlock(),e.createElementBlock("div",{class:"shifl-column-manager__backdrop",onClick:v[2]||(v[2]=e.withModifiers(w=>S.$emit("close"),["self"]))},[e.createElementVNode("div",{class:"shifl-column-manager__dialog",role:"dialog","aria-modal":"true",onClick:v[1]||(v[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("header",qn,[e.createElementVNode("div",Wn,[e.createElementVNode("h2",Gn,[l.titlePrefix?(e.openBlock(),e.createElementBlock("span",Kn,e.toDisplayString(l.titlePrefix),1)):e.createCommentVNode("",!0),l.titlePrefix?(e.openBlock(),e.createBlock(Ht,{key:1,color:"#253041"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.isNewViewMode?"Select Columns":"Edit Columns"),1)])]),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__close",onClick:v[0]||(v[0]=w=>S.$emit("close"))},[...v[3]||(v[3]=[e.createElementVNode("span",null,"✕",-1)])])]),l.isNewViewMode?(e.openBlock(),e.createElementBlock("div",Un," Choose the relevant columns and set their order. On the next screen, you can add filters and save this view for future access. ")):e.createCommentVNode("",!0),e.createElementVNode("div",Yn,[e.createElementVNode("div",Jn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-column-manager__link-button shifl-column-manager__link-button--primary",{"shifl-column-manager__link-button--disabled":u.value}]),disabled:u.value,onClick:b}," Select All ",10,Qn),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__link-button",onClick:C}," Deselect All ")]),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__link-button shifl-column-manager__link-button--primary",onClick:P}," Restore Default ")]),e.createElementVNode("div",Xn,[e.createElementVNode("ul",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(w,A)=>(e.openBlock(),e.createElementBlock("li",{key:w.key,"data-key":w.key,class:e.normalizeClass(["shifl-column-manager__item",{"shifl-column-manager__item--disabled":w.freeze||w.protected,"shifl-column-manager__item--dragging":z.value&&q.value===A}]),draggable:w.draggable,onDragover:e.withModifiers(H=>D(A,H),["prevent"]),onDragstart:H=>Y(H,A),onDragend:J,onDrop:x},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-column-manager__drag-handle",{"shifl-column-manager__drag-handle--disabled":w.freeze||w.protected||!w.draggable}]),"aria-label":`Move ${w.label}`,disabled:w.freeze||w.protected||!w.draggable},[e.createVNode(jn)],10,no),e.createElementVNode("label",{class:e.normalizeClass(["shifl-column-manager__checkbox-label",{"shifl-column-manager__checkbox-label--disabled":w.freeze||w.protected||i.isNewViewMode&&w.freeze}])},[e.createElementVNode("input",{type:"checkbox",class:"shifl-column-manager__checkbox",checked:h.value[w.key]??w.visible,disabled:w.freeze||w.protected||i.isNewViewMode&&w.freeze,onChange:H=>T(w.key,H)},null,40,oo),v[4]||(v[4]=e.createElementVNode("span",{class:"shifl-column-manager__checkbox-custom"},null,-1)),e.createElementVNode("span",lo,e.toDisplayString(w.label),1)],2)],42,to))),128))])]),e.createElementVNode("footer",ao,[e.createElementVNode("button",{type:"button",class:"shifl-column-manager__button shifl-column-manager__button--primary",disabled:!k.value,onClick:L}," Confirm & Next ",8,ro),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__button shifl-column-manager__button--secondary",onClick:F}," Cancel ")])])]))}}),[["__scopeId","data-v-a6a18230"]]),so={class:"shifl-grid__tooltip-content"},co=["innerHTML"],fo=ae(e.defineComponent({__name:"GridTooltip",props:{content:{},visible:{type:Boolean},triggerElement:{},isHtml:{type:Boolean}},setup(l){const r=l,i=e.ref(null),a=e.ref({}),d=e.computed(()=>r.content.includes(`
54
- `)),f=e.computed(()=>d.value?r.content.split(`
55
- `).filter(y=>y.trim().length>0):[]),u=e.ref("top"),k=e.ref({});function h(){if(!r.triggerElement||!i.value)return;const y=i.value;a.value={position:"fixed",top:"0px",left:"0px",visibility:"hidden",zIndex:"10000"},y.getBoundingClientRect(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!r.triggerElement||!i.value)return;const p=r.triggerElement.getBoundingClientRect(),B=y.offsetWidth,N=y.offsetHeight,T=window.innerWidth,L=window.innerHeight,b=12;let C=p.right-B,P=p.bottom+8,F=!0;P+N>L-b&&(P=p.top-N-8,F=!1),C<b&&(C=b),C+B>T-b&&(C=T-B-b),a.value={position:"fixed",top:`${P}px`,left:`${C}px`,visibility:"visible",zIndex:"10000"};let O=B-18;const q=12,z=B-12;O<q&&(O=q),O>z&&(O=z),k.value={left:`${O}px`},u.value=F?"top":"bottom"})})}function m(){r.visible&&h()}return e.watch(()=>r.visible,async y=>{y&&(await e.nextTick(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{h()})}))}),e.watch(()=>r.content,async()=>{r.visible&&(await e.nextTick(),requestAnimationFrame(()=>{h()}))}),e.onMounted(()=>{r.visible&&e.nextTick(()=>{requestAnimationFrame(()=>{h()})}),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}),(y,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.visible?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:i,class:"shifl-grid__tooltip",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:e.normalizeClass(["shifl-grid__tooltip-arrow",u.value]),style:e.normalizeStyle(k.value)},null,6),e.createElementVNode("div",so,[l.isHtml?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.content},null,8,co)):d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(f.value,(B,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"shifl-grid__tooltip-line"},e.toDisplayString(B),1))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(l.content),1)],64))])],4)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-79fb386f"]]),uo={},mo={width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"shifl-smart-tracking-icon"};function po(l,r){return e.openBlock(),e.createElementBlock("svg",mo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M1.03223 9.27441C1.22778 9.27445 1.40954 9.32951 1.57812 9.43066L3.86523 10.8594C4.1957 11.0618 4.3916 11.4202 4.3916 11.8047C4.39151 12.189 4.19562 12.5467 3.86523 12.749L1.57812 14.1797C1.41642 14.2806 1.22754 14.334 1.03223 14.334V14.3408C0.465713 14.3408 0.000165713 13.8751 0 13.3086V10.3066C0.000236867 9.74022 0.465756 9.27443 1.03223 9.27441ZM1.01172 13.3018L3.3252 11.8916C3.32796 11.8884 3.3728 11.8374 3.37305 11.8047C3.37305 11.771 3.35218 11.737 3.3252 11.7168L1.03906 10.2871L1.01172 13.3018ZM6.07129 3.37305C6.35041 3.37318 6.5771 3.59977 6.57715 3.87891C6.57715 4.15809 6.35044 4.38463 6.07129 4.38477H5.05957C4.03708 4.38477 3.20433 5.06537 3.2041 5.90234C3.2041 6.73947 4.03694 7.4209 5.05957 7.4209H7.08301C8.66344 7.42096 9.95019 8.55525 9.9502 9.9502C9.95009 11.3451 8.66338 12.4794 7.08301 12.4795H6.07129C5.79202 12.4795 5.56543 12.2529 5.56543 11.9736C5.56548 11.6944 5.79205 11.4678 6.07129 11.4678H7.08301C8.10552 11.4677 8.93739 10.7872 8.9375 9.9502C8.93749 9.11311 8.10558 8.43267 7.08301 8.43262H5.05957C3.47908 8.43262 2.19238 7.29733 2.19238 5.90234C2.19259 4.50751 3.4792 3.37305 5.05957 3.37305H6.07129ZM10.7939 0C12.0694 0.000131868 13.2591 0.779675 13.7549 1.94043C14.6093 3.9666 13.0453 5.42741 11.9033 6.49316L11.8818 6.51367C11.7964 6.59308 11.711 6.67193 11.6289 6.75C11.4057 6.96444 11.1095 7.08195 10.7939 7.08203C10.4783 7.08203 10.1803 6.9642 9.95703 6.74902C9.86266 6.65937 9.76511 6.56666 9.66602 6.47363L9.66016 6.46875C8.53029 5.40836 6.98418 3.95585 7.83203 1.94238C8.32854 0.77953 9.51841 6.29203e-06 10.7939 0ZM10.7939 1.01172C9.91775 1.01173 9.10234 1.54537 8.76367 2.33789C8.22961 3.60525 9.04604 4.50453 10.3525 5.73145L10.4229 5.79688C10.5024 5.87104 10.5804 5.94604 10.6572 6.01953C10.7267 6.08617 10.861 6.08446 10.9277 6.02051L10.9307 6.01758C11.0223 5.93066 11.1172 5.84284 11.2129 5.75391C12.5356 4.51951 13.3612 3.61352 12.8223 2.33594C12.4849 1.54493 11.6691 1.0127 10.793 1.0127L10.7939 1.01172ZM10.7998 2.53027C11.1719 2.53041 11.4734 2.83199 11.4736 3.2041C11.4736 3.57637 11.172 3.87877 10.7998 3.87891C10.4275 3.87882 10.1221 3.57641 10.1221 3.2041C10.1223 2.8319 10.4207 2.53027 10.793 2.53027H10.7998Z",fill:"#05963F"},null,-1)])])}const go=ae(uo,[["render",po]]),ho={name:"SortAscendingIcon",props:{color:{type:String,default:"#1A6D9E"}}},yo={width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ko=["fill"];function Co(l,r,i,a,d,f){return e.openBlock(),e.createElementBlock("svg",yo,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:i.color,d:"M0 0.666667C0 0.298477 0.314186 2.98023e-08 0.701754 2.98023e-08H4.2807C4.66827 2.98023e-08 4.98246 0.298477 4.98246 0.666667C4.98246 1.03486 4.66827 1.33333 4.2807 1.33333H0.701754C0.314186 1.33333 0 1.03486 0 0.666667ZM10.0301 0.195262C10.3042 -0.0650874 10.7485 -0.0650874 11.0225 0.195262L13.1278 2.19526C13.4018 2.45561 13.4018 2.87772 13.1278 3.13807C12.8537 3.39842 12.4094 3.39842 12.1354 3.13807L11.2281 2.27614V8.66667C11.2281 9.03486 10.9139 9.33333 10.5263 9.33333C10.1387 9.33333 9.82456 9.03486 9.82456 8.66667V2.27614L8.91727 3.13807C8.64322 3.39842 8.19889 3.39842 7.92484 3.13807C7.65079 2.87772 7.65079 2.45561 7.92484 2.19526L10.0301 0.195262ZM0 4.66667C0 4.29848 0.314186 4 0.701754 4H5.61404C6.0016 4 6.31579 4.29848 6.31579 4.66667C6.31579 5.03486 6.0016 5.33333 5.61404 5.33333H0.701754C0.314186 5.33333 0 5.03486 0 4.66667ZM0 8.66667C0 8.29848 0.314186 8 0.701754 8H7.01754C7.40511 8 7.7193 8.29848 7.7193 8.66667C7.7193 9.03486 7.40511 9.33333 7.01754 9.33333H0.701754C0.314186 9.33333 0 9.03486 0 8.66667Z"},null,8,ko)])}const It=ae(ho,[["render",Co]]),_o={},bo={width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wo(l,r){return e.openBlock(),e.createElementBlock("svg",bo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M4.28125 8C4.66872 8.00011 4.98242 8.29887 4.98242 8.66699C4.98242 9.03511 4.66872 9.33387 4.28125 9.33398H0.702148C0.314581 9.33398 8.1338e-07 9.03518 0 8.66699C0 8.2988 0.31458 8 0.702148 8H4.28125ZM10.5264 0C10.9139 0 11.2285 0.298802 11.2285 0.666992V7.05762L12.1357 6.19531C12.4097 5.93519 12.8539 5.93524 13.1279 6.19531C13.402 6.45566 13.402 6.87832 13.1279 7.13867L11.0225 9.13867C10.7484 9.39867 10.3042 9.39886 10.0303 9.13867L7.9248 7.13867C7.65082 6.87834 7.65082 6.45565 7.9248 6.19531C8.19886 5.93496 8.64392 5.93496 8.91797 6.19531L9.8252 7.05762V0.666992C9.8252 0.298891 10.1389 0.000143144 10.5264 0ZM5.61426 4C6.00183 4 6.31641 4.2988 6.31641 4.66699C6.31641 5.03518 6.00183 5.33398 5.61426 5.33398H0.702148C0.314581 5.33398 6.77817e-07 5.03518 0 4.66699C0 4.2988 0.31458 4 0.702148 4H5.61426ZM7.01758 0C7.40515 0 7.71973 0.298802 7.71973 0.666992C7.71973 1.03518 7.40515 1.33398 7.01758 1.33398H0.702148C0.31458 1.33398 5.42254e-07 1.03518 0 0.666992C0 0.298802 0.31458 0 0.702148 0H7.01758Z",fill:"#1A6D9E"},null,-1)])])}const Bo=ae(_o,[["render",wo]]),Vo={},Eo={width:"21",height:"13",viewBox:"0 0 21 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function So(l,r){return e.openBlock(),e.createElementBlock("svg",Eo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M19.6426 4.61523C19.9311 4.61524 20.1317 4.90139 20.0342 5.17285L17.499 12.2246C17.4395 12.3899 17.2821 12.5 17.1064 12.5H1.5459C1.35628 12.5 1.19044 12.3719 1.14258 12.1885L0.0136719 7.83887C-0.0548101 7.575 0.14438 7.31738 0.416992 7.31738H12.6016L14.71 4.61523H19.6426ZM3.51465 8.82324C3.11322 8.82324 2.78728 9.15265 2.78711 9.55859C2.78711 9.96468 3.11312 10.2939 3.51465 10.2939C3.9161 10.2938 4.24121 9.96462 4.24121 9.55859C4.24104 9.15271 3.91599 8.82334 3.51465 8.82324ZM7.87695 8.82324C7.47553 8.82324 7.14958 9.15265 7.14941 9.55859C7.14941 9.96468 7.47542 10.2939 7.87695 10.2939C8.27846 10.2939 8.60352 9.96466 8.60352 9.55859C8.60335 9.15267 8.27835 8.82327 7.87695 8.82324ZM12.2393 8.82324C11.8378 8.82324 11.5119 9.15265 11.5117 9.55859C11.5117 9.96468 11.8377 10.2939 12.2393 10.2939C12.6407 10.2938 12.9658 9.96458 12.9658 9.55859C12.9657 9.15275 12.6405 8.82341 12.2393 8.82324ZM10.3291 3.67676C10.5591 3.67679 10.7459 3.86283 10.7461 4.09277V5.46582C10.746 5.69585 10.5591 5.88278 10.3291 5.88281H1.75C1.51993 5.88281 1.33309 5.69587 1.33301 5.46582V4.09277C1.3332 3.86282 1.52 3.67676 1.75 3.67676H10.3291ZM8.91406 0C9.14418 0 9.33105 0.186874 9.33105 0.416992V1.78906C9.33105 2.01918 9.14418 2.20605 8.91406 2.20605H3.2041C2.97398 2.20605 2.78711 2.01918 2.78711 1.78906V0.416992C2.78711 0.186874 2.97398 1.52829e-06 3.2041 0H8.91406Z",fill:"#69758C"},null,-1)])])}const Zt=ae(Vo,[["render",So]]),Mo={},Do={width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function No(l,r){return e.openBlock(),e.createElementBlock("svg",Do,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M5.42553 0C5.58189 0.00192429 5.73535 0.043682 5.87279 0.120117C6.01022 0.196567 6.12781 0.306144 6.21459 0.439453L9.22631 5.26562L12.0212 4.98438C12.3226 4.95527 12.6267 4.99067 12.9138 5.08887C13.201 5.18709 13.4653 5.34586 13.6892 5.55469C13.9131 5.76351 14.0922 6.01802 14.2146 6.30176C14.337 6.58554 14.4001 6.89286 14.4001 7.20312C14.4001 7.51317 14.3369 7.81992 14.2146 8.10352C14.0922 8.38716 13.913 8.64181 13.6892 8.85059C13.4653 9.05938 13.201 9.21818 12.9138 9.31641C12.6267 9.41461 12.3226 9.45001 12.0212 9.4209L9.22631 9.1748L6.20971 13.9619C6.12292 14.0952 6.00534 14.2048 5.86791 14.2812C5.7305 14.3576 5.57696 14.3985 5.42064 14.4004H4.45873C4.31062 14.3953 4.16539 14.3552 4.0349 14.2832C3.90429 14.2111 3.79151 14.1085 3.7058 13.9844C3.62009 13.8603 3.56371 13.7176 3.54076 13.5674C3.51782 13.4172 3.5284 13.2632 3.57299 13.1182L5.10326 8.73145L2.37084 8.45508C0.648588 10.22 -0.150004 9.58381 0.0231828 8.9873C0.677387 6.74942 0.677426 7.65604 0.0231828 5.41797C-0.14495 4.83137 0.648862 4.18148 2.37572 5.96094L5.10814 5.68457L3.57299 1.28711C3.52744 1.14153 3.5161 0.987038 3.53881 0.835938C3.56158 0.684721 3.61848 0.540845 3.70482 0.416016C3.79115 0.291217 3.90422 0.18831 4.03588 0.116211C4.16757 0.044106 4.31436 0.00416693 4.46361 0H5.42553Z",fill:"#69758C"},null,-1)])])}const vo=ae(Mo,[["render",No]]),xo={},$o={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function To(l,r){return e.openBlock(),e.createElementBlock("svg",$o,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M6.66699 0C10.3489 9.66369e-08 13.334 2.98509 13.334 6.66699C13.334 10.3489 10.3489 13.334 6.66699 13.334C2.98509 13.334 0 10.3489 0 6.66699C1.28849e-07 2.98509 2.98509 0 6.66699 0ZM6.65137 7.75195C4.80676 7.75195 3.30417 9.21841 3.24707 11.0488C3.24495 11.1167 3.22812 11.181 3.2002 11.2383C4.16313 11.9697 5.36451 12.4033 6.66699 12.4033C7.96843 12.4033 9.16832 11.9696 10.1309 11.2393C10.0853 11.1711 10.0577 11.0899 10.0537 11.002C9.97262 9.19348 8.48018 7.75209 6.65137 7.75195ZM6.66699 0.930664C3.49885 0.930664 0.930664 3.49885 0.930664 6.66699C0.930664 8.12457 1.47456 9.45485 2.37012 10.4668C2.60929 8.97274 3.61177 7.73387 4.96484 7.16211C4.34363 6.66629 3.94543 5.90254 3.94531 5.0459C3.94531 3.55114 5.15713 2.33984 6.65137 2.33984C8.14579 2.34005 9.35742 3.55121 9.35742 5.0459C9.35731 5.90256 8.95917 6.6663 8.33789 7.16211C9.70006 7.73773 10.7071 8.9894 10.9375 10.4971C11.8489 9.48149 12.4033 8.13901 12.4033 6.66699C12.4033 3.49885 9.83514 0.930664 6.66699 0.930664ZM6.65137 3.26953C5.67077 3.26953 4.875 4.065 4.875 5.0459C4.8752 6.02674 5.671 6.82129 6.65137 6.82129C7.63203 6.82109 8.42656 6.02656 8.42676 5.0459C8.42676 4.06518 7.63226 3.26973 6.65137 3.26953Z",fill:"#3D485C"},null,-1)])])}const jt=ae(xo,[["render",To]]),Lo={},Ao={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fo(l,r){return e.openBlock(),e.createElementBlock("svg",Ao,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M7.99976 0.799561C11.9761 0.799561 15.1998 4.0234 15.2 7.99976C15.2 11.9762 11.9762 15.2 7.99976 15.2C4.0234 15.1998 0.799561 11.9761 0.799561 7.99976C0.799666 4.02346 4.02346 0.799666 7.99976 0.799561ZM7.99976 1.87964C4.61984 1.87974 1.87974 4.61984 1.87964 7.99976C1.87964 11.3798 4.61977 14.1198 7.99976 14.1199C11.3798 14.1199 14.1199 11.3798 14.1199 7.99976C14.1198 4.61977 11.3798 1.87964 7.99976 1.87964ZM7.9978 6.91968C8.27087 6.91973 8.49698 7.12223 8.53296 7.3855L8.53784 7.45874L8.53979 11.4197C8.5399 11.7178 8.29882 11.9595 8.00073 11.9597C7.72754 11.9599 7.50169 11.7572 7.46558 11.4939L7.46069 11.4207L7.45776 7.45972C7.45757 7.16153 7.69962 6.91987 7.9978 6.91968ZM8.00073 4.40112C8.39742 4.40137 8.71923 4.72319 8.71948 5.11987C8.71948 5.51677 8.39757 5.83935 8.00073 5.8396C7.60368 5.8396 7.28101 5.51692 7.28101 5.11987C7.28126 4.72304 7.60384 4.40112 8.00073 4.40112Z",fill:"#69758C"},null,-1)])])}const Po=ae(Lo,[["render",Fo]]),Oo={},Ro={width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zo(l,r){return e.openBlock(),e.createElementBlock("svg",Ro,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M6.00044 6.12787L6 15.75C6 17.7382 7.5473 19.3651 9.50344 19.492L9.75 19.5L16.3716 19.5011C16.0624 20.3744 15.2293 21 14.25 21H9C6.51472 21 4.5 18.9853 4.5 16.5V8.25C4.5 7.27017 5.12631 6.43663 6.00044 6.12787ZM17.25 3C18.4926 3 19.5 4.00736 19.5 5.25V15.75C19.5 16.9926 18.4926 18 17.25 18H9.75C8.50736 18 7.5 16.9926 7.5 15.75V5.25C7.5 4.00736 8.50736 3 9.75 3H17.25ZM17.25 4.5H9.75C9.33579 4.5 9 4.83579 9 5.25V15.75C9 16.1642 9.33579 16.5 9.75 16.5H17.25C17.6642 16.5 18 16.1642 18 15.75V5.25C18 4.83579 17.6642 4.5 17.25 4.5Z",fill:"#1A6D9E"},null,-1)])])}const Ho=ae(Oo,[["render",zo]]),Io={},Zo={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jo(l,r){return e.openBlock(),e.createElementBlock("svg",Zo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.00098 0.666992C12.0511 0.666992 15.334 3.94991 15.334 8C15.334 12.0501 12.0511 15.333 8.00098 15.333C3.95089 15.333 0.667969 12.0501 0.667969 8C0.667969 3.94991 3.95089 0.666992 8.00098 0.666992ZM8.00098 1.7666C4.5584 1.7666 1.76758 4.55743 1.76758 8C1.76758 11.4426 4.5584 14.2334 8.00098 14.2334C11.4436 14.2334 14.2344 11.4426 14.2344 8C14.2344 4.55743 11.4436 1.7666 8.00098 1.7666ZM10.3623 5.77734C10.577 5.56299 10.9249 5.56299 11.1396 5.77734C11.3349 5.97261 11.3531 6.27883 11.1934 6.49414L11.1396 6.55566L7.47363 10.2227C7.27837 10.4179 6.97215 10.4352 6.75684 10.2754L6.69531 10.2227L4.8623 8.38867C4.64752 8.17388 4.64752 7.82612 4.8623 7.61133C5.05752 7.41611 5.36282 7.39798 5.57812 7.55762L5.63965 7.61133L7.08398 9.05566L10.3623 5.77734Z",fill:"#10BC55"},null,-1)])])}const qo=ae(Io,[["render",jo]]),Wo={},Go={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ko(l,r){return e.openBlock(),e.createElementBlock("svg",Go,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.00098 0.666992C12.0511 0.666993 15.334 3.94991 15.334 8C15.334 12.0501 12.0511 15.333 8.00098 15.333C3.95089 15.333 0.667969 12.0501 0.667969 8C0.667969 3.94991 3.95089 0.666992 8.00098 0.666992ZM8.00098 1.66699C4.50317 1.66699 1.66797 4.5022 1.66797 8C1.66797 11.4978 4.50317 14.333 8.00098 14.333C11.4988 14.333 14.334 11.4978 14.334 8C14.334 4.5022 11.4988 1.66699 8.00098 1.66699ZM9.5293 5.52832C9.78965 5.26797 10.2123 5.26797 10.4727 5.52832C10.733 5.78867 10.733 6.21133 10.4727 6.47168L8.94336 8L10.4727 9.52832C10.733 9.78867 10.733 10.2113 10.4727 10.4717C10.2123 10.732 9.78965 10.732 9.5293 10.4717L8.00098 8.94238L6.47266 10.4717C6.21231 10.732 5.78965 10.732 5.5293 10.4717C5.26895 10.2113 5.26895 9.78867 5.5293 9.52832L7.05859 8L5.5293 6.47168C5.26895 6.21133 5.26895 5.78867 5.5293 5.52832C5.78965 5.26797 6.21231 5.26797 6.47266 5.52832L8.00098 7.05762L9.5293 5.52832Z",fill:"#EF4444"},null,-1)])])}const Uo=ae(Wo,[["render",Ko]]),Yo={width:"9",height:"11",viewBox:"0 0 9 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jo=["fill"],Qo=e.defineComponent({__name:"ExportIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Yo,[e.createElementVNode("path",{d:"M7.89355 9.78711C8.17317 9.78711 8.40039 10.0134 8.40039 10.293C8.40039 10.5493 8.20906 10.7614 7.96191 10.7949L7.89355 10.7988H0.505859C0.226345 10.7987 0 10.5726 0 10.293C1.00773e-06 10.0367 0.190375 9.82457 0.4375 9.79102L0.505859 9.78711H7.89355ZM4.22559 0C4.48191 0 4.69399 0.190367 4.72754 0.4375L4.73242 0.505859L4.73145 7.38672L6.73438 5.38184C6.91401 5.20192 7.19522 5.18515 7.39355 5.33203L7.4502 5.38086C7.63007 5.5604 7.64681 5.84171 7.5 6.04004L7.45117 6.09668L4.58691 8.9668L4.53906 9.00879L4.47754 9.04785L4.45312 9.0625L4.3916 9.08789L4.31055 9.1084L4.26367 9.11426L4.22266 9.11523C4.1889 9.11522 4.15458 9.11156 4.12109 9.10449L4.06641 9.08887C4.00161 9.06794 3.94262 9.03397 3.89258 8.99023L0.99707 6.09766C0.799322 5.90018 0.798882 5.57976 0.996094 5.38184C1.17562 5.20205 1.45697 5.18536 1.65527 5.33203L1.71289 5.38086L3.71973 7.38379V0.505859C3.71976 0.226386 3.94619 0.000201029 4.22559 0Z",fill:l.color},null,8,Jo)]))}}),Xo={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},el=["fill"],qt=e.defineComponent({__name:"SearchIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Xo,[e.createElementVNode("path",{d:"M4.83333 0C7.50271 0 9.66667 2.16396 9.66667 4.83333C9.66667 5.98791 9.26183 7.04794 8.58636 7.87921L11.8536 11.1464C12.0488 11.3417 12.0488 11.6583 11.8536 11.8536C11.676 12.0311 11.3983 12.0472 11.2025 11.902L11.1464 11.8536L7.87921 8.58636C7.04794 9.26183 5.98791 9.66667 4.83333 9.66667C2.16396 9.66667 0 7.50271 0 4.83333C0 2.16396 2.16396 0 4.83333 0ZM4.83333 1C2.71624 1 1 2.71624 1 4.83333C1 6.95042 2.71624 8.66667 4.83333 8.66667C6.95042 8.66667 8.66667 6.95042 8.66667 4.83333C8.66667 2.71624 6.95042 1 4.83333 1Z",fill:l.color},null,8,el)]))}}),tl={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nl=["fill"],Xe=e.defineComponent({__name:"ClearIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",tl,[e.createElementVNode("path",{d:"M8.21967 0.219669C8.51256 -0.0732234 8.98732 -0.073222 9.28022 0.219669C9.57311 0.512562 9.57311 0.987323 9.28022 1.28022L5.81049 4.74994L9.28022 8.21967C9.57311 8.51256 9.57311 8.98732 9.28022 9.28022C8.98732 9.57311 8.51256 9.57311 8.21967 9.28022L4.74994 5.81049L1.28022 9.28022C0.987322 9.57311 0.512561 9.57311 0.219669 9.28022C-0.0732222 8.98732 -0.0732228 8.51256 0.219669 8.21967L3.6894 4.74994L0.219669 1.28022C-0.0732225 0.987323 -0.0732229 0.512562 0.219669 0.219669C0.512561 -0.0732235 0.987322 -0.0732223 1.28022 0.219669L4.74994 3.6894L8.21967 0.219669Z",fill:l.color},null,8,nl)]))}}),ol={},ll={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function al(l,r){return e.openBlock(),e.createElementBlock("svg",ll,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M7.3125 0C7.41196 0 7.5078 0.0400254 7.57812 0.110352L9.89062 2.42285C9.96065 2.49313 10 2.58827 10 2.6875V8.46875C10 8.87486 9.83892 9.26459 9.55176 9.55176C9.26459 9.83892 8.87486 10 8.46875 10H1.53125C1.12537 10 0.736336 9.83862 0.449219 9.55176C0.162054 9.26459 0 8.87486 0 8.46875V1.53125C0 1.12514 0.162054 0.736384 0.449219 0.449219C0.736384 0.162054 1.12514 0 1.53125 0H7.3125ZM1.53125 0.75C1.32405 0.75 1.126 0.832979 0.979492 0.979492C0.832979 1.126 0.75 1.32405 0.75 1.53125V8.46875L0.753906 8.5459C0.771652 8.72477 0.851279 8.89327 0.979492 9.02148C1.12596 9.16769 1.32428 9.25 1.53125 9.25H8.46875C8.67595 9.25 8.87497 9.168 9.02148 9.02148C9.168 8.87497 9.25 8.67595 9.25 8.46875V2.84277L7.15723 0.75H6.53125V2.6875C6.53125 2.89461 6.36336 3.0625 6.15625 3.0625H2.6875C2.48039 3.0625 2.3125 2.89461 2.3125 2.6875V0.75H1.53125ZM5 4.625C5.40611 4.625 5.79584 4.78705 6.08301 5.07422C6.36987 5.36134 6.53125 5.75037 6.53125 6.15625C6.53125 6.56236 6.37017 6.95209 6.08301 7.23926C5.79584 7.52642 5.40611 7.6875 5 7.6875C4.59412 7.6875 4.20509 7.52612 3.91797 7.23926C3.6308 6.95209 3.46875 6.56236 3.46875 6.15625C3.46875 5.75014 3.6308 5.36138 3.91797 5.07422C4.20513 4.78705 4.59389 4.625 5 4.625ZM5 5.375C4.7928 5.375 4.59476 5.45798 4.44824 5.60449C4.30173 5.75101 4.21875 5.94905 4.21875 6.15625C4.21875 6.36345 4.30173 6.56247 4.44824 6.70898C4.59471 6.85519 4.79303 6.9375 5 6.9375C5.2072 6.9375 5.40622 6.8555 5.55273 6.70898C5.69925 6.56247 5.78125 6.36345 5.78125 6.15625C5.78125 5.94928 5.69894 5.75096 5.55273 5.60449C5.40622 5.45798 5.2072 5.375 5 5.375ZM3.0625 2.3125H5.78125V0.75H3.0625V2.3125Z",fill:"#1A6D9E"},null,-1)])])}const rl=ae(ol,[["render",al]]),il={},sl={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cl(l,r){return e.openBlock(),e.createElementBlock("svg",sl,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.15137 5.92969C8.35847 5.92969 8.52637 6.09758 8.52637 6.30469V6.69336C8.73304 6.75221 8.92443 6.86053 9.08301 7.00977L9.44043 6.80859C9.62086 6.70691 9.84949 6.77074 9.95117 6.95117C10.0525 7.13153 9.98886 7.36033 9.80859 7.46191L9.45996 7.65723C9.48428 7.75715 9.49902 7.86014 9.49902 7.96484C9.49902 8.06926 9.48416 8.17182 9.45996 8.27148L9.80957 8.46875C9.98949 8.57057 10.0536 8.79927 9.95215 8.97949C9.85055 9.15953 9.62168 9.22317 9.44141 9.12207L9.08301 8.91992C8.92441 9.0693 8.73313 9.17644 8.52637 9.23535V9.625C8.52637 9.83211 8.35847 10 8.15137 10C7.9443 9.99995 7.77637 9.83208 7.77637 9.625V9.23535C7.56985 9.17648 7.37918 9.06906 7.2207 8.91992L6.8623 9.12207C6.68203 9.22341 6.45326 9.15953 6.35156 8.97949C6.24994 8.79903 6.31465 8.57037 6.49512 8.46875L6.84277 8.27148C6.81858 8.17183 6.8047 8.06924 6.80469 7.96484C6.80469 7.86019 6.81848 7.75711 6.84277 7.65723L6.49512 7.46191C6.31481 7.36038 6.2503 7.13156 6.35156 6.95117C6.45315 6.77076 6.68187 6.70613 6.8623 6.80762L7.2207 7.00977C7.37925 6.86053 7.56973 6.75223 7.77637 6.69336V6.30469C7.77637 6.09761 7.9443 5.92973 8.15137 5.92969ZM8.15137 0C8.50546 0.000125989 8.84745 0.137785 9.10059 0.384766C9.35386 0.632228 9.49805 0.970403 9.49805 1.32422V4.64453C9.49778 4.85139 9.32996 5.01949 9.12305 5.01953C8.9161 5.01953 8.74831 4.85141 8.74805 4.64453V4.07031H4.15234V8.53906H4.74902C4.95611 8.53908 5.12402 8.70697 5.12402 8.91406C5.1237 9.12088 4.95591 9.28904 4.74902 9.28906H1.34766C0.993547 9.28906 0.651655 9.15118 0.398438 8.9043C0.144882 8.65681 2.71832e-05 8.31885 0 7.96484V1.32422C0 0.970173 0.144858 0.632272 0.398438 0.384766C0.651686 0.137697 0.993407 0 1.34766 0H8.15137ZM0.75 7.96484C0.750027 8.11393 0.811 8.25889 0.921875 8.36719C1.03315 8.47567 1.18655 8.53906 1.34766 8.53906H3.40234V4.07031H0.75V7.96484ZM8.15137 7.3916C7.99029 7.39162 7.83782 7.45404 7.72656 7.5625C7.61565 7.67082 7.55469 7.81571 7.55469 7.96484C7.55471 8.11398 7.61561 8.25888 7.72656 8.36719C7.83782 8.47565 7.99029 8.53904 8.15137 8.53906C8.31256 8.53906 8.46585 8.47578 8.57715 8.36719C8.68796 8.25891 8.749 8.11388 8.74902 7.96484C8.74902 7.81579 8.68796 7.6708 8.57715 7.5625C8.46585 7.45387 8.31259 7.3916 8.15137 7.3916ZM1.34766 0.75C1.18643 0.75 1.03317 0.813245 0.921875 0.921875C0.811011 1.03019 0.75 1.17512 0.75 1.32422V3.32031H3.40234V0.75H1.34766ZM4.15234 3.32031H8.74805V1.32422C8.74805 1.17514 8.68701 1.03018 8.57617 0.921875C8.46499 0.813361 8.31241 0.750127 8.15137 0.75H4.15234V3.32031Z",fill:"#253041"},null,-1)])])}const dl=ae(il,[["render",cl]]),fl={class:"shifl-grid__empty-state"},ul={class:"shifl-grid__empty-state-icon"},ml={class:"shifl-grid__empty-state-title"},pl={class:"shifl-grid__empty-state-description"},gl=e.defineComponent({__name:"GridEmptyState",props:{iconName:{},title:{},description:{}},setup(l){const a={OceanIcon:Zt}[l.iconName]??null;return(d,f)=>(e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",ul,[e.unref(a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)),{key:0})):e.createCommentVNode("",!0)]),e.createElementVNode("p",ml,e.toDisplayString(l.title),1),e.createElementVNode("p",pl,e.toDisplayString(l.description),1)]))}}),et={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",select:"Select",cancel:"Cancel",previousMonth:"Previous month",nextMonth:"Next month",weekStart:"Week start",weekEnd:"Week end"};function ue(l,r="MM/dd/yyyy",i=et){if(!l)return"";const a=l.getDate(),d=l.getMonth(),f=l.getFullYear(),u=i.days[l.getDay()],k=i.daysShort[l.getDay()],h=i.months[d],m=i.monthsShort[d];return r.replace(/dddd/g,u).replace(/ddd/g,k).replace(/MMMM/g,h).replace(/MMM/g,m).replace(/yyyy/g,f.toString()).replace(/yy/g,f.toString().slice(-2)).replace(/y/g,f.toString()).replace(/MM/g,(d+1).toString().padStart(2,"0")).replace(/M/g,(d+1).toString()).replace(/dd/g,a.toString().padStart(2,"0")).replace(/d/g,a.toString())}function hl(l,r){if(!l)return null;try{const i=r.split(/[^A-Za-z]+/),a=l.split(/[^0-9]+/);let d=1,f=0,u=new Date().getFullYear();return i.forEach((k,h)=>{const m=parseInt(a[h]||"0");k.includes("d")?d=m:k.includes("M")?f=m-1:k.includes("y")&&(u=m)}),new Date(u,f,d)}catch{return null}}function ht(l){const r=new Date;return l.toDateString()===r.toDateString()}function yt(l){const r=l.getDay();return r===0||r===6}function ce(l,r){return l.toDateString()===r.toDateString()}function Wt(l,r=0){const i=new Date(l),a=i.getDay(),d=(a<r?7:0)+a-r;return i.setDate(i.getDate()-d),i}function yl(l,r=0){const i=Wt(l,r),a=new Date(i);return a.setDate(a.getDate()+6),a}function Ze(l,r){const i=new Date(l);return i.setMonth(i.getMonth()+r),i}function Gt(l,r=0){const i=l.getFullYear(),a=l.getMonth(),d=new Date(i,a,1),f=new Date(i,a+1,0),u=Wt(d,r),k=yl(f,r),h=[],m=new Date(u);for(;m<=k;){const y=m.getMonth()===a,p={date:new Date(m),text:m.getDate().toString(),current:y,selected:!1,disabled:!1,highlighted:!1,today:ht(m),weekend:yt(m),inRange:!1,rangePosition:null,isCurrentMonth:y,isToday:ht(m),isSelected:!1,isDisabled:!1,isWeekend:yt(m),isInRange:!1};h.push(p),m.setDate(m.getDate()+1)}return h}function kl(l,r,i,a,d){if(r&&l<r||i&&l>i)return!0;if(d&&d.length>0)return!d.some(f=>ce(l,f));if(a){if(Array.isArray(a))return a.some(f=>ce(l,f));if(typeof a=="function")return a(l)}return!1}function Cl(l=0,r=et){const i=[...r.daysShort],a=l%7;return[...i.slice(a),...i.slice(0,a)]}function _l(l){if(l instanceof Date)return isNaN(l.getTime())?null:l;if(Array.isArray(l))return l.filter(r=>r instanceof Date&&!isNaN(r.getTime()));if(typeof l=="object"&&l!==null){const{start:r,end:i}=l,a={start:r instanceof Date&&!isNaN(r.getTime())?r:null,end:i instanceof Date&&!isNaN(i.getTime())?i:null};return a.start||a.end?a:null}return null}function bl(l,r,i=0){const a=[];for(let d=0;d<r;d++){const f=Ze(l,d);a.push({days:Gt(f,i),month:f.getMonth(),year:f.getFullYear()})}return a}const wl={width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bl=["fill"],Vl=e.defineComponent({__name:"ChevronLeftIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",wl,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.29289 0.292892C5.68342 -0.0976302 6.31643 -0.0976314 6.70696 0.292892C7.0974 0.683422 7.09745 1.31646 6.70696 1.70695L2.41399 5.99992L6.70696 10.2929C7.0974 10.6834 7.09745 11.3165 6.70696 11.707C6.31646 12.0975 5.68342 12.0974 5.29289 11.707L0.292893 6.70695C-0.0976311 6.31643 -0.097631 5.68342 0.292893 5.29289L5.29289 0.292892Z",fill:l.color},null,8,Bl)]))}}),El={width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Sl=["fill"],Kt=e.defineComponent({__name:"ChevronUpIcon",props:{color:{default:"#1A6D9E"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",El,[e.createElementVNode("path",{d:"M4.49992 0C4.76514 3.15705e-07 5.01942 0.105433 5.20696 0.292969L8.70696 3.79297C9.09748 4.18349 9.09748 4.81651 8.70696 5.20703C8.31643 5.59756 7.68342 5.59755 7.29289 5.20703L4.49992 2.41406L1.70696 5.20703C1.31643 5.59756 0.683417 5.59756 0.292893 5.20703C-0.0976312 4.81651 -0.097631 4.18349 0.292893 3.79297L3.79289 0.292969L3.86614 0.226562C4.04409 0.0807277 4.26783 0 4.49992 0Z",fill:l.color},null,8,Sl)]))}}),Ml={width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Dl=["fill"],De=e.defineComponent({__name:"ChevronDownIcon",props:{color:{default:"#69758C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Ml,[e.createElementVNode("path",{d:"M7.29289 0.292893C7.68342 -0.0976298 8.31643 -0.0976306 8.70696 0.292893C9.09748 0.683417 9.09748 1.31643 8.70696 1.70696L5.20696 5.20696C5.01942 5.39449 4.76514 5.49992 4.49992 5.49992C4.23471 5.49992 3.98043 5.39449 3.79289 5.20696L0.292893 1.70696C-0.097631 1.31643 -0.097631 0.683417 0.292893 0.292893C0.683417 -0.097631 1.31643 -0.097631 1.70696 0.292893L4.49992 3.08586L7.29289 0.292893Z",fill:l.color},null,8,Dl)]))}}),Nl={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vl=["fill"],xl=e.defineComponent({__name:"CalendarIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Nl,[e.createElementVNode("path",{d:"M15.3408 0C16.8094 0 17.9999 1.19065 18 2.65918V15.3408C18 16.8094 16.8094 18 15.3408 18H2.65918C1.19065 17.9999 0 16.8094 0 15.3408V2.65918C5.20826e-05 1.19068 1.19068 5.29008e-05 2.65918 0H15.3408ZM1.22754 5.32129V15.3408C1.22754 16.1316 1.86845 16.7724 2.65918 16.7725H15.3408C16.1316 16.7725 16.7725 16.1316 16.7725 15.3408V5.32129H1.22754ZM7.33398 9C8.25424 9.00026 9 9.74668 9 10.667C8.99992 11.5872 8.25419 12.3337 7.33398 12.334C6.41356 12.334 5.66707 11.5874 5.66699 10.667C5.66699 9.74652 6.41351 9 7.33398 9ZM2.65918 1.22754C1.86849 1.22759 1.22759 1.86849 1.22754 2.65918V4.09375H16.7725V2.65918C16.7724 1.86845 16.1316 1.22754 15.3408 1.22754H2.65918Z",fill:l.color},null,8,vl)]))}}),$l={class:"datepicker-calendar__header"},Tl={class:"datepicker-calendar__dropdowns"},Ll=["disabled"],Al={class:"datepicker-calendar__dropdown-text"},Fl={key:0,class:"datepicker-calendar__dropdown-menu"},Pl=["onClick"],Ol=["disabled"],Rl={class:"datepicker-calendar__dropdown-text"},zl={key:0,class:"datepicker-calendar__dropdown-menu"},Hl=["data-year","onClick"],Il={key:0,class:"datepicker-calendar__nav-section"},Zl=["disabled","aria-label"],jl=["disabled"],ql=["disabled","aria-label"],Wl={class:"datepicker-calendar__month-views"},Gl={class:"datepicker-calendar__weekdays",role:"row"},Kl=["aria-label"],Ul=["aria-label"],Yl=["onClick","onKeydown","onMouseenter","disabled","aria-label","aria-selected","aria-disabled","aria-current","aria-pressed","data-date"],Jl={style:{position:"relative","z-index":"1"}},Ut=ae(e.defineComponent({__name:"DatePickerCalendar",props:{month:{},selectedDate:{},selectedDates:{},selectedRange:{},minDate:{},maxDate:{},disabledDates:{},allowedDates:{},disabled:{type:Boolean,default:!1},weekStart:{default:0},locale:{},showNavigation:{type:Boolean,default:!0},calendarIndex:{default:0},totalCalendars:{default:1},hideOffsetDates:{type:Boolean,default:!1},hoverDate:{}},emits:["update:month","select-date","hover-date"],setup(l,{emit:r}){const i=l;e.watch(()=>i.hideOffsetDates,g=>{console.log("hideOffsetDates prop changed to:",g),e.nextTick(()=>{const M=y.value;M?console.log("Calendar element classes:",M.className):console.log("Calendar element not yet initialized")})},{immediate:!0});const a=r,d=e.computed(()=>i.month.getMonth()),f=e.computed(()=>i.month.getFullYear()),u=e.ref(d.value),k=e.ref(f.value),h=e.ref(!1),m=e.ref(!1),y=e.ref(),p=e.computed(()=>{var g;return((g=i.locale)==null?void 0:g.months)||["January","February","March","April","May","June","July","August","September","October","November","December"]}),B=e.computed(()=>Cl(i.weekStart,i.locale)),N=e.computed(()=>{const g=new Date().getFullYear(),M=[];for(let U=g-50;U<=g+50;U++)M.push(U);return M}),T=e.computed(()=>Gt(i.month,i.weekStart).map(g=>({...g,selected:L(g.date),disabled:g.disabled||kl(g.date,i.minDate,i.maxDate,i.disabledDates,i.allowedDates),today:ht(g.date),weekend:yt(g.date),inRange:b(g.date)})));function L(g){return i.selectedDate&&ce(g,i.selectedDate)?!0:i.selectedDates?i.selectedDates.some(M=>ce(g,M)):!!(i.selectedRange&&(i.selectedRange.start&&ce(g,i.selectedRange.start)||i.selectedRange.end&&ce(g,i.selectedRange.end)))}function b(g){var M,U;return!((M=i.selectedRange)!=null&&M.start)||!((U=i.selectedRange)!=null&&U.end)?!1:g>=i.selectedRange.start&&g<=i.selectedRange.end}function C(g){var M;return(M=i.selectedRange)!=null&&M.start?ce(g,i.selectedRange.start):!1}function P(g){var M;return(M=i.selectedRange)!=null&&M.end?ce(g,i.selectedRange.end):!1}function F(g){var U,G;return{"datepicker-calendar__day--today":g.today,"datepicker-calendar__day--weekend":g.weekend,"datepicker-calendar__day--selected":g.selected,"datepicker-calendar__day--in-range":g.inRange,"datepicker-calendar__day--range-start":C(g.date),"datepicker-calendar__day--range-end":P(g.date),"datepicker-calendar__day--disabled":g.disabled,"datepicker-calendar__day--other-month":!g.current,"datepicker-calendar__day--in-hover-range":pe(g.date),"datepicker-calendar__day--hover-end":!((U=i.selectedRange)!=null&&U.end)&&!!((G=i.selectedRange)!=null&&G.start)&&!!i.hoverDate&&ce(g.date,i.hoverDate)&&!ce(g.date,i.selectedRange.start)}}function Z(){a("update:month",Ze(i.month,-1))}function O(){a("update:month",Ze(i.month,1))}function q(){const g=new Date(k.value,u.value,1);a("update:month",g)}function z(){const g=new Date(k.value,u.value,1);a("update:month",g)}function j(g){g&&g.stopPropagation(),h.value=!h.value,m.value=!1}function Y(g){g&&g.stopPropagation(),m.value=!m.value,h.value=!1,m.value&&e.nextTick(()=>{const M=document.querySelector(`[data-year="${k.value}"]`),U=document.querySelector(".datepicker-calendar__dropdown-menu");if(M&&U){const G=M.offsetTop,I=U.clientHeight,de=G-I/2+M.clientHeight/2;U.scrollTop=de}})}function K(g,M){M.stopPropagation(),u.value=g,h.value=!1,q()}function D(g,M){M.stopPropagation(),k.value=g,m.value=!1,z()}function x(g){const M=g.target;y.value&&!y.value.contains(M)&&(h.value=!1,m.value=!1)}e.onMounted(()=>{document.addEventListener("mousedown",x)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",x)});function Q(){const g=new Date;a("update:month",new Date(g.getFullYear(),g.getMonth(),1)),e.nextTick(()=>{const M=document.querySelector(`button[data-date="${g.toISOString()}"]`);M==null||M.focus()})}function X(g){!g.disabled&&!i.disabled&&a("select-date",g.date)}function $(g,M){if(!(M.disabled||i.disabled))switch(g.key){case"Enter":case" ":g.preventDefault(),X(M);break;case"ArrowRight":g.preventDefault(),S(M);break;case"ArrowLeft":g.preventDefault(),v(M);break;case"ArrowDown":g.preventDefault(),w(M);break;case"ArrowUp":g.preventDefault(),A(M);break;case"Home":g.preventDefault(),H();break;case"End":g.preventDefault(),_();break;case"PageDown":g.preventDefault(),g.shiftKey?te():E();break;case"PageUp":g.preventDefault(),g.shiftKey?ne():R();break}}function J(g){let G=g.date.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});return g.today&&(G+=", Today"),g.selected&&(G+=", Selected"),g.disabled&&(G+=", Disabled"),g.current||(G+=", Other month"),G}function S(g){const U=T.value.findIndex(G=>ce(G.date,g.date))+1;if(U<T.value.length){const G=T.value[U],I=document.querySelector(`button[data-date="${G.date.toISOString()}"]`);I==null||I.focus()}}function v(g){const U=T.value.findIndex(G=>ce(G.date,g.date))-1;if(U>=0){const G=T.value[U],I=document.querySelector(`button[data-date="${G.date.toISOString()}"]`);I==null||I.focus()}}function w(g){const M=new Date(g.date);M.setDate(M.getDate()+7);const U=T.value.find(G=>ce(G.date,M));if(U){const G=document.querySelector(`button[data-date="${U.date.toISOString()}"]`);G==null||G.focus()}}function A(g){const M=new Date(g.date);M.setDate(M.getDate()-7);const U=T.value.find(G=>ce(G.date,M));if(U){const G=document.querySelector(`button[data-date="${U.date.toISOString()}"]`);G==null||G.focus()}}function H(){const g=T.value.find(M=>M.current&&M.date.getDate()===1);if(g){const M=document.querySelector(`button[data-date="${g.date.toISOString()}"]`);M==null||M.focus()}}function _(){const g=T.value.filter(M=>M.current).pop();if(g){const M=document.querySelector(`button[data-date="${g.date.toISOString()}"]`);M==null||M.focus()}}function E(){a("update:month",Ze(i.month,1)),e.nextTick(()=>{H()})}function R(){a("update:month",Ze(i.month,-1)),e.nextTick(()=>{H()})}function te(){const g=new Date(i.month);g.setFullYear(g.getFullYear()+1),a("update:month",g),e.nextTick(()=>{H()})}function ne(){const g=new Date(i.month);g.setFullYear(g.getFullYear()-1),a("update:month",g),e.nextTick(()=>{H()})}function pe(g){var G,I;if(!((G=i.selectedRange)!=null&&G.start)||(I=i.selectedRange)!=null&&I.end||!i.hoverDate)return!1;const M=i.selectedRange.start,U=i.hoverDate;return ce(g,M)||ce(g,U)?!1:U>=M?g>M&&g<U:g<M&&g>U}return e.watch(()=>i.month,g=>{u.value=g.getMonth(),k.value=g.getFullYear()},{immediate:!0}),(g,M)=>{var U,G;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datepicker-calendar",{"datepicker-calendar--hide-offset-dates":l.hideOffsetDates}]),ref_key:"calendarRef",ref:y},[e.createElementVNode("div",$l,[e.createElementVNode("div",Tl,[e.createElementVNode("div",{class:e.normalizeClass(["datepicker-calendar__custom-dropdown",{"is-open":h.value}])},[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__dropdown-button",onClick:M[0]||(M[0]=I=>j(I)),disabled:l.disabled},[e.createElementVNode("span",Al,e.toDisplayString(p.value[u.value]),1),h.value?(e.openBlock(),e.createBlock(Kt,{key:0,color:"#253041",class:"datepicker-calendar__dropdown-icon"})):(e.openBlock(),e.createBlock(De,{key:1,color:"#253041",class:"datepicker-calendar__dropdown-icon"}))],8,Ll),h.value?(e.openBlock(),e.createElementBlock("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(I,de)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:e.normalizeClass(["datepicker-calendar__dropdown-item",{"is-selected":de===u.value}]),onClick:Ne=>K(de,Ne)},e.toDisplayString(I),11,Pl))),128))])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["datepicker-calendar__custom-dropdown",{"is-open":m.value}])},[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__dropdown-button",onClick:M[1]||(M[1]=I=>Y(I)),disabled:l.disabled},[e.createElementVNode("span",Rl,e.toDisplayString(k.value),1),m.value?(e.openBlock(),e.createBlock(Kt,{key:0,color:"#253041",class:"datepicker-calendar__dropdown-icon"})):(e.openBlock(),e.createBlock(De,{key:1,color:"#253041",class:"datepicker-calendar__dropdown-icon"}))],8,Ol),m.value?(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,I=>(e.openBlock(),e.createElementBlock("div",{key:I,class:e.normalizeClass(["datepicker-calendar__dropdown-item",{"is-selected":I===k.value}]),"data-year":I,onClick:de=>D(I,de)},e.toDisplayString(I),11,Hl))),128))])):e.createCommentVNode("",!0)],2)]),l.showNavigation&&l.calendarIndex===l.totalCalendars-1?(e.openBlock(),e.createElementBlock("div",Il,[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:Z,disabled:l.disabled,"aria-label":((U=l.locale)==null?void 0:U.previousMonth)||"Previous month",tabindex:"0"},[e.createVNode(Vl,{color:"#4B586C"})],8,Zl),e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:Q,disabled:l.disabled,"aria-label":"Focus current date",tabindex:"0"},[e.createVNode(xl,{color:"#4B586C"})],8,jl),e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:O,disabled:l.disabled,"aria-label":((G=l.locale)==null?void 0:G.nextMonth)||"Next month",tabindex:"0"},[e.createVNode(Ht,{color:"#4B586C"})],8,ql)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Wl,[e.createElementVNode("div",Gl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,I=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"datepicker-calendar__weekday",role:"columnheader","aria-label":I},e.toDisplayString(I),9,Kl))),128))]),e.createElementVNode("div",{class:"datepicker-calendar__days",role:"grid","aria-label":`${p.value[d.value]} ${f.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,I=>(e.openBlock(),e.createElementBlock("button",{key:I.date.toISOString(),type:"button",class:e.normalizeClass(["datepicker-calendar__day",F(I)]),onClick:de=>X(I),onKeydown:de=>$(de,I),onMouseenter:de=>a("hover-date",I.date),onMouseleave:M[2]||(M[2]=de=>a("hover-date",null)),disabled:I.disabled||l.disabled,"aria-label":J(I),"aria-selected":I.selected,"aria-disabled":I.disabled||l.disabled,"aria-current":I.today?"date":void 0,"aria-pressed":I.selected,tabindex:"0","data-date":I.date.toISOString()},[e.createElementVNode("span",Jl,e.toDisplayString(I.text),1)],42,Yl))),128))],8,Ul)])],2)}}}),[["__scopeId","data-v-e5d35ef6"]]),Ql={key:0,class:"datepicker__input-wrapper"},Xl=["placeholder","disabled","readonly","required","autocomplete","inputmode","name","id"],ea=["disabled"],ta=["disabled"],na={class:"datepicker__content"},oa={key:1,class:"datepicker__range"},la={key:2,class:"datepicker__actions"},aa=["disabled"],Yt=ae(e.defineComponent({__name:"DatePicker",props:{modelValue:{},config:{default:()=>({disabled:!1,readonly:!1,autoApply:!1,noToday:!1,clearable:!0,showCalendarIcon:!0,weekStart:0,format:"MM/dd/yyyy",placeholder:"Select date",autocomplete:"off",inputmode:"none",actionRow:{selectBtnLabel:"Select",cancelBtnLabel:"Cancel",showSelect:!0,showCancel:!0}})}},emits:["update:modelValue","confirm","open","closed","cleared","focus","blur","text-input","text-change","request-close","request-open"],setup(l,{expose:r,emit:i}){const a=l,d=i,f=e.ref(),u=e.ref(),k=e.ref(!1),h=e.ref(""),m=e.ref(new Date),y=e.ref(null),p=e.ref(null),B=e.ref(null);e.onMounted(()=>{N()});function N(){var _,E,R;if((_=a.config)!=null&&_.startDate){m.value=new Date(a.config.startDate);return}(E=a.config)!=null&&E.minDate?m.value=new Date(a.config.minDate):(R=a.config)!=null&&R.maxDate&&a.config.maxDate<new Date&&(m.value=new Date(a.config.maxDate))}const T=e.computed(()=>{var _,E;return typeof((_=a.config)==null?void 0:_.locale)=="string"?et:((E=a.config)==null?void 0:E.locale)||et}),L=e.computed(()=>{var _,E,R;return{"datepicker--disabled":(_=a.config)==null?void 0:_.disabled,"datepicker--readonly":(E=a.config)==null?void 0:E.readonly,"datepicker--open":k.value,"datepicker--filter-mode":(R=a.config)==null?void 0:R.filterMode}}),b=e.computed(()=>({"datepicker__input--error":!1})),C=e.computed(()=>{var _;return{"datepicker__dropdown--range":!!((_=a.config)!=null&&_.range)}}),P=e.computed(()=>{var _,E,R;return!!(!((_=a.config)!=null&&_.autoApply)&&((E=a.config)!=null&&E.range||(R=a.config)!=null&&R.actionRow))}),F=e.computed(()=>{var _,E,R;return(_=a.config)!=null&&_.range?((E=p.value)==null?void 0:E.start)&&((R=p.value)==null?void 0:R.end):y.value!==null}),Z=e.computed(()=>{var R,te;const _=(R=a.config)==null?void 0:R.multiCalendars,E=typeof _=="number"?_:typeof _=="object"&&_.count?Number(_.count):1;return bl(m.value,E,((te=a.config)==null?void 0:te.weekStart)||0)}),O=e.ref(null);function q(_){m.value=_}function z(_,E){const R=new Date(m.value);R.setMonth(R.getMonth()+_);const te=(E.getFullYear()-R.getFullYear())*12+(E.getMonth()-R.getMonth()),ne=new Date(m.value);ne.setMonth(ne.getMonth()+te),m.value=ne}function j(_){var E,R;y.value=_,h.value=ue(_,((E=a.config)==null?void 0:E.format)||"MM/dd/yyyy",T.value),(R=a.config)!=null&&R.autoApply?K():P.value||$()}function Y(_){var E,R,te,ne;if(!p.value)p.value={start:_,end:null};else if(p.value.end)p.value={start:_,end:null};else{if(p.value.start&&ce(_,p.value.start))return;p.value.start&&_>=p.value.start?p.value={...p.value,end:_}:p.value={start:_,end:p.value.start},(E=a.config)!=null&&E.autoApply&&p.value.start&&p.value.end&&(h.value=ue(p.value.start,((R=a.config)==null?void 0:R.format)||"MM/dd/yyyy",T.value)+" - "+ue(p.value.end,((te=a.config)==null?void 0:te.format)||"MM/dd/yyyy",T.value)),(ne=a.config)!=null&&ne.autoApply?K():!P.value&&p.value.start&&p.value.end&&$()}}function K(){var _,E,R,te,ne,pe,g;(_=a.config)!=null&&_.range?(B.value=p.value,(E=p.value)!=null&&E.start&&((R=p.value)!=null&&R.end)&&(h.value=ue(p.value.start,((te=a.config)==null?void 0:te.format)||"MM/dd/yyyy",T.value)+" - "+ue(p.value.end,((ne=a.config)==null?void 0:ne.format)||"MM/dd/yyyy",T.value))):(B.value=y.value,y.value&&(h.value=ue(y.value,((pe=a.config)==null?void 0:pe.format)||"MM/dd/yyyy",T.value))),d("update:modelValue",B.value),d("confirm",B.value),(g=a.config)!=null&&g.autoApply||$()}function D(){y.value=null,p.value=null,$()}function x(){B.value=null,y.value=null,p.value=null,h.value="",d("update:modelValue",null),d("cleared"),$()}function Q(){k.value?$():X()}function X(){var _,E;!((_=a.config)!=null&&_.disabled)&&!((E=a.config)!=null&&E.readonly)&&(k.value=!0,d("open"),e.nextTick(()=>{f.value&&f.value.focus()}))}function $(){var _;k.value=!1,d("closed"),(_=a.config)!=null&&_.filterMode&&d("request-close")}function J(_){var E,R;_.stopPropagation(),!((E=a.config)!=null&&E.disabled)&&!((R=a.config)!=null&&R.readonly)&&X()}function S(){var _,E;!((_=a.config)!=null&&_.disabled)&&!((E=a.config)!=null&&E.readonly)&&setTimeout(()=>{X()},0),d("focus")}function v(){d("blur")}function w(_){var te;const E=_.target;h.value=E.value;const R=hl(E.value,((te=a.config)==null?void 0:te.format)||"MM/dd/yyyy");R&&(B.value=R,d("update:modelValue",R)),d("text-input",E.value)}function A(_){_.key==="Escape"?$():_.key==="Enter"?k.value?K():X():_.key==="Tab"&&$()}function H(_){const E=_.target;u.value&&!u.value.contains(E)&&f.value&&!f.value.contains(E)&&$()}return e.onMounted(()=>{document.addEventListener("mousedown",H)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",H)}),e.watch(()=>a.modelValue,_=>{var E,R,te,ne,pe;if(B.value=_l(_||null),(E=a.config)!=null&&E.range&&typeof B.value=="object"&&B.value!==null&&"start"in B.value){const g=B.value;p.value=g,g.start&&(m.value=new Date(g.start)),h.value=ue(g.start,((R=a.config)==null?void 0:R.format)||"MM/dd/yyyy",T.value)+" - "+ue(g.end,((te=a.config)==null?void 0:te.format)||"MM/dd/yyyy",T.value)}else!((ne=a.config)!=null&&ne.range)&&B.value instanceof Date?(y.value=B.value,m.value=new Date(B.value),h.value=ue(B.value,((pe=a.config)==null?void 0:pe.format)||"MM/dd/yyyy",T.value)):h.value=""},{immediate:!0}),r({selectDate:_=>{Array.isArray(_)||j(_)},closeMenu:$,openMenu:X,clearValue:x,focusInput:()=>{var _;return(_=f.value)==null?void 0:_.focus()},blurInput:()=>{var _;return(_=f.value)==null?void 0:_.blur()}}),(_,E)=>{var R,te,ne,pe,g,M,U,G,I,de,Ne,tt,nt,ot,je,qe,We,Ge,ve,xe,Ke,$e,Te,lt,me,Be,Ve,Ee,Le,ye,at,Ae,Fe,Se,Pe,ge;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datepicker",L.value])},[(R=l.config)!=null&&R.filterMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ql,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:f,"onUpdate:modelValue":E[0]||(E[0]=re=>h.value=re),type:"text",class:e.normalizeClass(["datepicker__input",b.value]),placeholder:(te=l.config)==null?void 0:te.placeholder,disabled:(ne=l.config)==null?void 0:ne.disabled,readonly:(pe=l.config)==null?void 0:pe.readonly,required:(M=(g=l.config)==null?void 0:g.input)==null?void 0:M.required,autocomplete:(G=(U=l.config)==null?void 0:U.input)==null?void 0:G.autocomplete,inputmode:(de=(I=l.config)==null?void 0:I.input)==null?void 0:de.inputmode,name:(tt=(Ne=l.config)==null?void 0:Ne.input)==null?void 0:tt.name,id:(ot=(nt=l.config)==null?void 0:nt.input)==null?void 0:ot.id,onFocus:S,onBlur:v,onInput:w,onKeydown:A,onClick:J},null,42,Xl),[[e.vModelText,h.value]]),(je=l.config)!=null&&je.showCalendarIcon?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"datepicker__toggle",onClick:Q,disabled:(qe=l.config)==null?void 0:qe.disabled},[...E[3]||(E[3]=[e.createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" data-v-69a7fb78><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke-width="2" data-v-69a7fb78></rect><line x1="16" y1="2" x2="16" y2="6" stroke-width="2" data-v-69a7fb78></line><line x1="8" y1="2" x2="8" y2="6" stroke-width="2" data-v-69a7fb78></line><line x1="3" y1="10" x2="21" y2="10" stroke-width="2" data-v-69a7fb78></line></svg>',1)])],8,ea)):e.createCommentVNode("",!0),(We=l.config)!=null&&We.clearable&&h.value&&!((Ge=l.config)!=null&&Ge.readonly)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"datepicker__clear",onClick:x,disabled:(ve=l.config)==null?void 0:ve.disabled},[...E[4]||(E[4]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18","stroke-width":"2"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18","stroke-width":"2"})],-1)])],8,ta)):e.createCommentVNode("",!0)])),(xe=l.config)!=null&&xe.filterMode||k.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["datepicker__dropdown",C.value]),ref_key:"dropdownRef",ref:u},[e.createElementVNode("div",na,[(Ke=l.config)!=null&&Ke.range?(e.openBlock(),e.createElementBlock("div",oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.value,(re,Oe)=>{var rt,Ue,ke,Re,Ye,Je,it;return e.openBlock(),e.createBlock(Ut,{key:Oe,month:new Date(re.year,re.month,1),"selected-range":p.value,"min-date":(rt=l.config)==null?void 0:rt.minDate,"max-date":(Ue=l.config)==null?void 0:Ue.maxDate,"disabled-dates":(ke=l.config)==null?void 0:ke.disabledDates,"allowed-dates":(Re=l.config)==null?void 0:Re.allowedDates,disabled:(Ye=l.config)==null?void 0:Ye.disabled,"week-start":(Je=l.config)==null?void 0:Je.weekStart,locale:T.value,"show-navigation":Oe===Z.value.length-1,"calendar-index":Oe,"total-calendars":Z.value.length,"hide-offset-dates":(it=l.config)==null?void 0:it.hideOffsetDates,"onUpdate:month":Qe=>z(Oe,Qe),onSelectDate:Y,"hover-date":O.value,onHoverDate:E[2]||(E[2]=Qe=>O.value=Qe)},null,8,["month","selected-range","min-date","max-date","disabled-dates","allowed-dates","disabled","week-start","locale","show-navigation","calendar-index","total-calendars","hide-offset-dates","onUpdate:month","hover-date"])}),128))])):(e.openBlock(),e.createBlock(Ut,{key:0,month:m.value,"selected-date":y.value,"min-date":($e=l.config)==null?void 0:$e.minDate,"max-date":(Te=l.config)==null?void 0:Te.maxDate,"disabled-dates":(lt=l.config)==null?void 0:lt.disabledDates,"allowed-dates":(me=l.config)==null?void 0:me.allowedDates,disabled:(Be=l.config)==null?void 0:Be.disabled,"week-start":(Ve=l.config)==null?void 0:Ve.weekStart,locale:T.value,"show-navigation":!0,"calendar-index":0,"total-calendars":1,"hide-offset-dates":(Ee=l.config)==null?void 0:Ee.hideOffsetDates,"onUpdate:month":q,onSelectDate:j,"hover-date":O.value,onHoverDate:E[1]||(E[1]=re=>O.value=re)},null,8,["month","selected-date","min-date","max-date","disabled-dates","allowed-dates","disabled","week-start","locale","hide-offset-dates","hover-date"])),P.value?(e.openBlock(),e.createElementBlock("div",la,[(ye=(Le=l.config)==null?void 0:Le.actionRow)!=null&&ye.showSelect?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"datepicker__btn datepicker__btn--primary",onClick:K,disabled:!F.value},e.toDisplayString(((Ae=(at=l.config)==null?void 0:at.actionRow)==null?void 0:Ae.selectBtnLabel)||"Select"),9,aa)):e.createCommentVNode("",!0),(Se=(Fe=l.config)==null?void 0:Fe.actionRow)!=null&&Se.showCancel?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"datepicker__btn datepicker__btn--secondary",onClick:D},e.toDisplayString(((ge=(Pe=l.config)==null?void 0:Pe.actionRow)==null?void 0:ge.cancelBtnLabel)||"Cancel"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-69a7fb78"]]),ra={class:"filter-label"},ia={key:0,class:"filter-value"},sa=ae(e.defineComponent({__name:"DateFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm"],setup(l,{expose:r,emit:i}){const a=l,d=i,f=e.ref(!1),u=e.ref(null),k=e.ref("down"),h=e.ref(),m=e.ref(!1),y=e.computed(()=>{var D,x;return((x=(D=a.config.config)==null?void 0:D.datePicker)==null?void 0:x.mode)||"range"}),p=e.computed(()=>{var Q,X,$,J;const D=((X=(Q=a.config.config)==null?void 0:Q.datePicker)==null?void 0:X.hideOffsetDates)||!1,x={placeholder:a.config.placeholder||(y.value==="single"?"Select date":"Select date range"),clearable:!0,format:((J=($=a.config.config)==null?void 0:$.datePicker)==null?void 0:J.format)||"MM/dd/yyyy",autoApply:!1,readonly:!1,showCalendarIcon:!1,filterMode:!0,hideOffsetDates:D,startDate:N.value,actionRow:{showSelect:!0,showCancel:!0,selectBtnLabel:"Confirm",cancelBtnLabel:"Cancel"}};return y.value==="range"?{...x,range:{},multiCalendars:2}:x}),B=e.computed(()=>!!u.value),N=e.computed(()=>{if(!u.value)return new Date;if(u.value instanceof Date)return u.value;if(typeof u.value=="object"&&"start"in u.value){const D=u.value;if(D.start)return D.start}return new Date});function T(){if(!h.value)return;const D=h.value.getBoundingClientRect(),x=window.innerHeight,Q=window.innerWidth,X=x-D.bottom,$=350,J=620;k.value=X>=$?"down":"up";const S=D.left+J>Q;m.value=S}function L(){return a.config.label||"ETD"}function b(){if(!u.value)return null;const D="MM/dd/yy";if(y.value==="single")return u.value instanceof Date?ue(u.value,D):null;{if(typeof u.value!="object"||!("start"in u.value))return null;const x=u.value;return x.start&&x.end?`${ue(x.start,D)} - ${ue(x.end,D)}`:x.start?`From ${ue(x.start,D)}`:x.end?`To ${ue(x.end,D)}`:null}}function C(D){if(!D)return null;if(y.value==="single")return"date"in D&&D.date?new Date(D.date):"start"in D&&D.start?new Date(D.start):null;if("start"in D||"end"in D){const x=D;return{start:x.start?new Date(x.start):null,end:x.end?new Date(x.end):null}}return"date"in D,null}function P(D){if(!D)return{};if(y.value==="single"){if(D instanceof Date){const x=D.getFullYear(),Q=String(D.getMonth()+1).padStart(2,"0"),X=String(D.getDate()).padStart(2,"0");return{mode:"single",date:`${x}-${Q}-${X}`}}return{mode:"single"}}else{if(typeof D=="object"&&"start"in D){const x=D,Q=X=>{const $=X.getFullYear(),J=String(X.getMonth()+1).padStart(2,"0"),S=String(X.getDate()).padStart(2,"0");return`${$}-${J}-${S}`};return{start:x.start?Q(x.start):void 0,end:x.end?Q(x.end):void 0}}if(D instanceof Date){const x=D.getFullYear(),Q=String(D.getMonth()+1).padStart(2,"0"),X=String(D.getDate()).padStart(2,"0"),$=`${x}-${Q}-${X}`;return{start:$,end:$}}return{}}}function F(D){if(u.value=D,!D){const x=y.value==="single"?{mode:"single"}:{};d("update:modelValue",x),d("confirm",x)}}function Z(){const D=P(u.value);d("confirm",D),z()}function O(){f.value=!f.value}function q(){f.value=!0}function z(){f.value=!1}function j(){u.value=null;let D;y.value==="single"?D={mode:"single"}:D={},d("update:modelValue",D),d("confirm",D),z()}function Y(){j()}e.watch(()=>a.modelValue,D=>{if(D&&typeof D=="object"){const x=C(D);u.value=x}else u.value=null},{immediate:!0}),e.watch(f,async D=>{D&&(await e.nextTick(),T())});function K(){f.value&&T()}return e.onMounted(()=>{window.addEventListener("scroll",K,!0),window.addEventListener("resize",K)}),e.onUnmounted(()=>{window.removeEventListener("scroll",K,!0),window.removeEventListener("resize",K)}),r({resetFilter:Y,openDatePicker:q}),(D,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["date-filter",{"is-open":f.value,"is-applied":B.value}]),ref_key:"filterElement",ref:h},[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["date-picker-dropdown",{"date-picker-dropdown--up":k.value==="up","date-picker-dropdown--down":k.value==="down","date-picker-dropdown--right":m.value}])},[e.createVNode(Yt,{modelValue:u.value,"onUpdate:modelValue":[x[0]||(x[0]=Q=>u.value=Q),F],config:p.value,onConfirm:Z,onClose:z,onClosed:z,onRequestClose:z},null,8,["modelValue","config"])],2)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"date-filter-trigger",onClick:O},[e.createElementVNode("span",ra,e.toDisplayString(L()),1),b()?(e.openBlock(),e.createElementBlock("span",ia,e.toDisplayString(b()),1)):e.createCommentVNode("",!0),e.createVNode(De,{class:e.normalizeClass(["chevron-icon",{"is-open":f.value}])},null,8,["class"]),B.value?(e.openBlock(),e.createBlock(Xe,{key:1,class:"clear-icon",onClick:e.withModifiers(j,["stop"]),color:"#69758C"})):e.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-2a56899a"]]),ca={class:"checkbox-icon"},da={key:0,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fa={key:1,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jt=e.defineComponent({__name:"CheckBoxIcon",props:{isChecked:{type:Boolean,default:!1}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ca,[l.isChecked?(e.openBlock(),e.createElementBlock("svg",da,[...i[0]||(i[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.75 1.5C10.5449 1.5 12 2.95508 12 4.75V8.75C12 10.5449 10.5449 12 8.75 12H4.75C2.95508 12 1.5 10.5449 1.5 8.75V4.75C1.5 2.95507 2.95507 1.5 4.75 1.5H8.75ZM8.75 13.5C11.3734 13.5 13.5 11.3734 13.5 8.75V4.75C13.5 2.12665 11.3734 0 8.75 0H4.75C2.12665 2.98023e-07 0 2.12665 0 4.75V8.75C0 11.3734 2.12665 13.5 4.75 13.5H8.75ZM11.0785 3.33333C10.6645 2.96808 10.0328 3.00758 9.66732 3.42122L5.46517 8.18294L3.8724 6.13607C3.5333 5.70024 2.90498 5.62125 2.46908 5.96029C2.03317 6.29934 1.95527 6.92767 2.29427 7.36361L4.62728 10.3636C4.81007 10.5986 5.08848 10.7401 5.38607 10.7493C5.68353 10.7585 5.96943 10.6346 6.16634 10.4115L11.1663 4.74544C11.5317 4.33132 11.4926 3.69874 11.0785 3.33333Z",fill:"#1A6D9E"},null,-1)])])):e.createCommentVNode("",!0),l.isChecked?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",fa,[...i[1]||(i[1]=[e.createElementVNode("path",{d:"M8.75 0C11.3734 0 13.5 2.12665 13.5 4.75V8.75C13.5 11.3734 11.3734 13.5 8.75 13.5H4.75C2.12665 13.5 0 11.3734 0 8.75V4.75C0 2.12665 2.12665 6.44262e-07 4.75 0H8.75ZM4.75 1.5C2.95507 1.5 1.5 2.95508 1.5 4.75V8.75C1.5 10.5449 2.95508 12 4.75 12H8.75C10.5449 12 12 10.5449 12 8.75V4.75C12 2.95508 10.5449 1.5 8.75 1.5H4.75Z",fill:"#9CA5B4"},null,-1)])]))]))}}),he=e.ref(null);function Qt(){function l(d){if(he.value&&he.value!==d){const f=new CustomEvent("close-filter",{detail:{filterKey:he.value}});window.dispatchEvent(f)}he.value=d}function r(d){he.value===d&&(he.value=null)}function i(d){return he.value===d}function a(){if(he.value){const d=new CustomEvent("close-filter",{detail:{filterKey:he.value}});window.dispatchEvent(d),he.value=null}}return{currentOpenFilter:he,openFilter:l,closeFilter:r,isFilterOpen:i,closeAllFilters:a}}const ua={class:"grid__select-filter"},ma={class:"grid__filter-trigger-content"},pa={class:"grid__filter-label"},ga={key:0,class:"grid__filter-selection-text"},ha={class:"grid__selection-main-text"},ya={key:0,class:"grid__selection-additional-count"},ka={key:0,class:"grid__filter-options"},Ca={key:0,class:"grid__filter-search"},_a=["placeholder"],ba={class:"grid__filter-options-list"},wa=["onClick"],Ba=["title"],Va={key:1,class:"grid__filter-empty"},Ea=ae(e.defineComponent({__name:"SelectFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]},isOpen:{type:Boolean},searchable:{type:Boolean},multiple:{type:Boolean}},emits:["update:modelValue","request-toggle","request-close"],setup(l,{expose:r,emit:i}){const a=l,d=i,{isFilterOpen:f,openFilter:u,closeFilter:k}=Qt(),h=e.ref(),m=e.computed(()=>a.isOpen!==void 0?a.isOpen:f(a.config.key)),y=e.computed(()=>{var $,J;return a.multiple||((J=($=a.config.config)==null?void 0:$.select)==null?void 0:J.multiple)}),p=e.ref(y.value&&Array.isArray(a.modelValue)?[...a.modelValue]:[]),B=e.ref(!y.value&&!Array.isArray(a.modelValue)&&typeof a.modelValue!="object"&&typeof a.modelValue!="boolean"&&a.modelValue||null),N=e.ref(""),T=$=>B.value!==null&&B.value===$,L=e.computed(()=>{if(!N.value.trim()||!a.searchable)return a.config.options||[];const $=N.value.toLowerCase();return(a.config.options||[]).filter(J=>J.label.toLowerCase().includes($)||String(J.value).toLowerCase().includes($))}),b=e.computed(()=>a.config.key),C=e.computed(()=>y.value?p.value&&p.value.length>0:B.value!==null),P=e.computed(()=>{var $,J,S;if(y.value){if(!p.value||p.value.length===0)return"";if(p.value.length===1){const A=p.value[0],H=($=a.config.options)==null?void 0:$.find(_=>_.value===A);return(H==null?void 0:H.label)||String(A)}const v=p.value[0],w=(J=a.config.options)==null?void 0:J.find(A=>A.value===v);return(w==null?void 0:w.label)||String(v)}else{if(!B.value)return"";const v=(S=a.config.options)==null?void 0:S.find(w=>w.value===B.value);return(v==null?void 0:v.label)||String(B.value)}}),F=e.computed(()=>y.value&&p.value&&p.value.length>1?p.value.length-1:0),Z=e.computed(()=>C.value);function O(){}function q($){return p.value.includes($)}function z($){var S;const J=(S=a.config.options)==null?void 0:S.find(v=>v.value===$);if(!(J!=null&&J.disabled))if(y.value){const v=p.value.indexOf($);v>-1?p.value.splice(v,1):p.value.push($),d("update:modelValue",p.value.length>0?p.value:null)}else B.value=$,a.isOpen===void 0&&k(a.config.key),d("update:modelValue",$)}function j(){a.isOpen===void 0?f(a.config.key)?k(a.config.key):u(a.config.key):d("request-toggle")}function Y(){y.value?(p.value=[],d("update:modelValue",null)):(B.value=null,d("update:modelValue",null))}function K(){a.isOpen===void 0&&(f(a.config.key)?k(a.config.key):u(a.config.key))}function D(){a.isOpen===void 0&&u(a.config.key)}function x(){a.isOpen===void 0&&k(a.config.key)}function Q($){setTimeout(()=>{const J=$.relatedTarget;h.value&&(!J||!h.value.contains(J))&&(a.isOpen===void 0?k(a.config.key):d("request-close"),y.value&&p.value.length>0&&d("update:modelValue",p.value))},10)}function X($){if(!m.value)return;const J=$.target;h.value&&!h.value.contains(J)&&(a.isOpen===void 0?k(a.config.key):d("request-close"),y.value&&p.value.length>0&&d("update:modelValue",p.value))}return e.onMounted(()=>{document.addEventListener("click",X,{capture:!0})}),e.onUnmounted(()=>{document.removeEventListener("click",X,{capture:!0})}),e.watch(()=>a.modelValue,$=>{y.value?Array.isArray($)?p.value=[...$]:$==null&&(p.value=[]):!Array.isArray($)&&typeof $!="object"&&$!==void 0?B.value=$:B.value=null},{immediate:!0,deep:!0}),r({openDropdown:D,closeDropdown:x,toggleDropdown:K}),($,J)=>{var S;return e.openBlock(),e.createElementBlock("div",ua,[e.createElementVNode("div",{ref_key:"dropdownRef",ref:h,class:e.normalizeClass(["grid__filter-dropdown",{"is-open":m.value,[`filter-key-${b.value}`]:!0}])},[e.createElementVNode("button",{type:"button",class:"grid__filter-trigger",onClick:j,onBlur:Q},[e.createElementVNode("span",ma,[e.createElementVNode("span",pa,e.toDisplayString(l.config.label),1),C.value?(e.openBlock(),e.createElementBlock("span",ga,[e.createElementVNode("span",ha,e.toDisplayString(P.value),1),F.value>0?(e.openBlock(),e.createElementBlock("span",ya,"+"+e.toDisplayString(F.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createVNode(De,{class:"grid__filter-trigger-arrow"}),Z.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"grid__filter-clear-btn",onClick:e.withModifiers(Y,["stop"]),title:"Clear selections"},[e.createVNode(Xe,{color:"#69758C"})])):e.createCommentVNode("",!0)],32),m.value?(e.openBlock(),e.createElementBlock("div",ka,[l.searchable&&(((S=l.config.options)==null?void 0:S.length)??0)>0?(e.openBlock(),e.createElementBlock("div",Ca,[e.createVNode(qt,{class:"grid-select__search-icon"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":J[0]||(J[0]=v=>N.value=v),placeholder:`Search ${l.config.label}`,class:"grid-select__search-input",onInput:O},null,40,_a),[[e.vModelText,N.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",ba,[L.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(L.value,v=>(e.openBlock(),e.createElementBlock("label",{key:String(v.value),class:e.normalizeClass(["grid__filter-option",{"is-disabled":v.disabled,"is-selected":y.value?q(v.value):T(v.value)}]),onClick:w=>z(v.value)},[y.value?(e.openBlock(),e.createBlock(Jt,{key:0,"is-checked":q(v.value),class:"grid__filter-option-checkbox"},null,8,["is-checked"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"grid__filter-option-label",title:v.label},e.toDisplayString(v.label||""),9,Ba)],10,wa))),128)):(e.openBlock(),e.createElementBlock("div",Va,e.toDisplayString(N.value?"No results found":"No data available"),1))])])):e.createCommentVNode("",!0)],2)])}}}),[["__scopeId","data-v-33996fe8"]]),Sa={key:0,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ma={key:1,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Da={class:"checkbox-filter__text"},Na=ae(e.defineComponent({__name:"CheckboxFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm"],setup(l,{emit:r}){const i=l,a=r,d=e.computed(()=>!!i.modelValue);function f(){const u=!d.value;a("update:modelValue",u),a("confirm",u)}return(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox-filter",{"is-checked":d.value}]),onClick:f},[d.value?(e.openBlock(),e.createElementBlock("svg",Sa,[...k[0]||(k[0]=[e.createElementVNode("path",{d:"M9.91699 1.3125C11.447 1.31268 12.6873 2.55298 12.6875 4.08301V9.91699C12.6873 11.447 11.447 12.6873 9.91699 12.6875H4.08301C2.55298 12.6873 1.31268 11.447 1.3125 9.91699V4.08301C1.31268 2.55298 2.55298 1.31268 4.08301 1.3125H9.91699ZM4.08301 2.1875C3.03623 2.18768 2.18768 3.03623 2.1875 4.08301V9.91699C2.18768 10.9638 3.03623 11.8123 4.08301 11.8125H9.91699C10.9638 11.8123 11.8123 10.9638 11.8125 9.91699V4.08301C11.8123 3.03623 10.9638 2.18768 9.91699 2.1875H4.08301ZM9.77148 4.28125C9.98464 4.03968 10.3532 4.01634 10.5947 4.22949C10.8358 4.4426 10.8592 4.81128 10.6465 5.05273L6.27148 10.0117C6.15665 10.1418 5.98888 10.2133 5.81543 10.208C5.64205 10.2026 5.47964 10.1202 5.37305 9.9834L3.33105 7.3584C3.13357 7.10419 3.1796 6.73781 3.43359 6.54004C3.68789 6.34229 4.05515 6.38829 4.25293 6.64258L5.86133 8.71094L9.77148 4.28125Z",fill:"#253041"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Ma,[...k[1]||(k[1]=[e.createElementVNode("path",{d:"M9.91699 1.3125C11.447 1.31268 12.6873 2.55298 12.6875 4.08301V9.91699C12.6873 11.447 11.447 12.6873 9.91699 12.6875H4.08301C2.55298 12.6873 1.31268 11.447 1.3125 9.91699V4.08301C1.31268 2.55298 2.55298 1.31268 4.08301 1.3125H9.91699ZM4.08301 2.1875C3.03623 2.18768 2.18768 3.03623 2.1875 4.08301V9.91699C2.18768 10.9638 3.03623 11.8123 4.08301 11.8125H9.91699C10.9638 11.8123 11.8123 10.9638 11.8125 9.91699V4.08301C11.8123 3.03623 10.9638 2.18768 9.91699 2.1875H4.08301Z",fill:"#69758C"},null,-1)])])),e.createElementVNode("span",Da,e.toDisplayString(l.config.label),1)],2))}}),[["__scopeId","data-v-007ba890"]]),va={class:"grid-filter-label"},xa={key:0,class:"grid-filter-value"},$a={key:1,class:"grid-filter-count"},Ta={key:1,class:"grid-filter-content"},La=ae(e.defineComponent({__name:"GridFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm","clear"],setup(l,{expose:r,emit:i}){const a=l,d=i,{openFilter:f,closeFilter:u,isFilterOpen:k}=Qt(),h=e.ref(!1),m=e.ref(),y=e.ref(),p=e.computed(()=>{if(typeof a.modelValue=="boolean")return a.modelValue;if(!a.modelValue)return!1;if(Array.isArray(a.modelValue))return a.modelValue.length>0;if(typeof a.modelValue=="object"&&a.modelValue!==null){const z=a.modelValue;return!!(z.start||z.end)}return a.modelValue!==null&&a.modelValue!==""&&a.modelValue!==void 0});function B(){k(a.config.key)?(u(a.config.key),h.value=!1):(f(a.config.key),h.value=!0,e.nextTick(()=>{a.config.type==="date"&&m.value&&m.value.openDatePicker()}))}function N(){u(a.config.key),h.value=!1}function T(){h.value=!0}function L(){f(a.config.key),h.value=!0,e.nextTick(()=>{a.config.type==="date"&&m.value&&m.value.openDatePicker()})}function b(z){d("update:modelValue",z)}function C(z){d("confirm",z)}function P(){return a.config.label}function F(){if(!a.modelValue)return null;if(a.config.type==="select"){const z=a.config.options||[];if(Array.isArray(a.modelValue)){if(a.modelValue.length===0)return null;const j=z.find(Y=>Y.value===a.modelValue[0]);return(j==null?void 0:j.label)||String(a.modelValue[0])}else{const j=z.find(Y=>Y.value===a.modelValue);return(j==null?void 0:j.label)||String(a.modelValue)}}if(a.config.type==="date"){const z=a.modelValue;if(!z)return null;const j=Y=>{const K=new Date(Y),D=String(K.getMonth()+1).padStart(2,"0"),x=String(K.getDate()).padStart(2,"0"),Q=String(K.getFullYear()).slice(-2);return`${D}/${x}/${Q}`};if(z.start&&z.end)return`${j(z.start)} - ${j(z.end)}`;if(z.start)return j(z.start)}return null}function Z(){return a.config.type==="select"&&Array.isArray(a.modelValue)&&a.modelValue.length>1?`+${a.modelValue.length-1}`:null}function O(){d("update:modelValue",null),h.value=!1,u(a.config.key),a.config.type==="date"&&m.value?m.value.resetFilter():a.config.type==="select"&&y.value&&y.value.resetFilter(),d("clear",a.config.key)}function q(z){z.detail.filterKey===a.config.key&&(h.value=!1)}return e.onMounted(()=>{window.addEventListener("close-filter",q)}),e.onUnmounted(()=>{window.removeEventListener("close-filter",q)}),r({showFilter:T,resetFilter:O,openFilter:L}),(z,j)=>{var Y,K,D,x;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-filter",{"is-applied":p.value}])},[l.config.type==="checkbox"?(e.openBlock(),e.createBlock(Na,{key:0,config:l.config,"model-value":l.modelValue,"onUpdate:modelValue":b,onConfirm:C},null,8,["config","model-value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("div",Ta,[l.config.type==="date"?(e.openBlock(),e.createBlock(sa,{key:0,ref_key:"dateFilterRef",ref:m,config:l.config,"model-value":l.modelValue,class:e.normalizeClass({"is-applied":p.value}),"onUpdate:modelValue":b,onConfirm:C},null,8,["config","model-value","class"])):l.config.type==="select"?(e.openBlock(),e.createBlock(Ea,{key:1,ref_key:"selectFilterRef",ref:y,config:l.config,"model-value":l.modelValue,"is-open":e.unref(k)(l.config.key),searchable:(K=(Y=l.config.config)==null?void 0:Y.select)==null?void 0:K.searchable,multiple:(x=(D=l.config.config)==null?void 0:D.select)==null?void 0:x.multiple,class:e.normalizeClass({"is-applied":p.value}),"onUpdate:modelValue":b,onRequestToggle:B,onRequestClose:N},null,8,["config","model-value","is-open","searchable","multiple","class"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid-filter-trigger",onClick:L},[e.createElementVNode("span",va,e.toDisplayString(P()),1),F()?(e.openBlock(),e.createElementBlock("span",xa,e.toDisplayString(F()),1)):e.createCommentVNode("",!0),Z()?(e.openBlock(),e.createElementBlock("span",$a,e.toDisplayString(Z()),1)):e.createCommentVNode("",!0),e.createVNode(De),p.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"grid-filter-clear",onClick:e.withModifiers(O,["stop"])},[e.createVNode(Xe,{color:"#69758C"})])):e.createCommentVNode("",!0)]))],64))],2)}}}),[["__scopeId","data-v-35a46493"]]),Aa={key:0,class:"filter-dropdown-menu"},Fa={class:"filter-dropdown-content"},Pa=["onClick"],Oa={class:"filter-dropdown-item-content"},Ra={class:"filter-dropdown-item-label"},za=ae(e.defineComponent({__name:"FilterDropdown",props:{availableFilters:{},activeFilterKeys:{},defaultFilterKeys:{default:()=>[]},hasActiveFiltersWithValue:{type:Boolean}},emits:["add-filter","remove-filter","update-default-filters","clear-all-filters"],setup(l,{expose:r,emit:i}){const a=l,d=i,f=e.ref(!1),u=e.ref(),k=e.computed(()=>new Set([...a.defaultFilterKeys||[],...a.activeFilterKeys])),h=e.computed(()=>a.availableFilters);function m(){f.value=!f.value}function y(){f.value=!1}function p(L){k.value.has(L.key)?d("remove-filter",L.key):d("add-filter",L);const C=a.activeFilterKeys.filter(P=>{var F;return!((F=a.defaultFilterKeys)!=null&&F.includes(P))});d("update-default-filters",[...a.defaultFilterKeys||[],...C])}function B(L){return k.value.has(L.key)}function N(){d("clear-all-filters",a.activeFilterKeys)}function T(L){const b=L.target;u.value&&!u.value.contains(b)&&(f.value=!1)}return e.onMounted(()=>{document.addEventListener("mousedown",T)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",T)}),r({closeDropdown:y}),(L,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["filter-dropdown",{"is-open":f.value}]),ref_key:"dropdownRef",ref:u},[e.createElementVNode("button",{type:"button",class:"filter-dropdown-trigger",onClick:m},[b[0]||(b[0]=e.createElementVNode("span",null,"More Filters",-1)),e.createVNode(De,{class:"filter-dropdown-arrow"})]),f.value?(e.openBlock(),e.createElementBlock("div",Aa,[e.createElementVNode("div",Fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,C=>(e.openBlock(),e.createElementBlock("div",{key:C.key,class:e.normalizeClass(["filter-dropdown-item",{"is-selected":B(C)}])},[e.createElementVNode("button",{type:"button",class:"filter-dropdown-item-button",onClick:e.withModifiers(P=>p(C),["stop"])},[e.createElementVNode("div",Oa,[e.createVNode(Jt,{"is-checked":B(C),class:"filter-dropdown-checkbox-icon"},null,8,["is-checked"]),e.createElementVNode("span",Ra,e.toDisplayString(C.label),1)])],8,Pa)],2))),128))])])):e.createCommentVNode("",!0)],2),l.hasActiveFiltersWithValue?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__clear-filters",onClick:N}," Clear Filters ")):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-0d61b3e7"]]),Ha={class:"shifl-grid relative"},Ia={class:"shifl-grid__controls"},Za={class:"shifl-grid__controls-left"},ja={key:0,class:"shifl-grid__search-container"},qa={class:"shifl-grid__search-input-wrapper"},Wa={class:"shifl-grid__controls-right"},Ga=["disabled"],Ka=["disabled"],Ua={class:"shifl-grid__table"},Ya=["onClick"],Ja={class:"shifl-grid__header-content"},Qa={key:0,class:"shifl-grid__header-label"},Xa={key:1,class:"shifl-grid__sort-icon shifl-grid__sort-icon--active"},er={key:2,class:"shifl-grid__sort-icon shifl-grid__sort-icon--hover"},tr=["onClick"],nr={key:0,class:"shifl-grid__smart-tracking-icon"},or={key:0,class:"shifl-grid__action-icon-wrapper"},lr=["onClick"],ar={key:0},rr=["innerHTML"],ir={key:1,class:"shifl-grid__action-button-wrapper"},sr=["onClick"],cr={key:2,class:"shifl-grid__action-icon-wrapper"},dr=["onClick"],fr=["innerHTML"],ur={key:3,class:"shifl-grid__action-button-icon-wrapper"},mr=["onClick"],pr=["innerHTML"],gr={class:"shifl-grid__action-button-text"},hr={key:2,class:"shifl-grid__composite-cell"},yr={key:1,class:"shifl-grid__cell-blank"},kr={key:3,class:"shifl-grid__type-cell"},Cr={key:1,class:"shifl-grid__cell-blank"},_r={key:2,class:"shifl-grid__container-badge"},br={key:0,class:"shifl-grid__cell-blank"},wr={key:1,class:"shifl-grid__tags-cell"},Br={class:"shifl-grid__tags-wrapper"},Vr=["onMouseenter"],Er={key:5,class:"shifl-grid__chips-container"},Sr={key:6,class:"shifl-grid__icon-text-cell"},Mr={key:0,class:"shifl-grid__icon-text-wrapper"},Dr={class:"shifl-grid__icon-text-container"},Nr=["title"],vr=["onMouseenter"],xr={key:0,class:"shifl-grid__icon-text-badge"},$r=["title"],Tr={key:7,class:"shifl-grid__truncated-cell"},Lr=["onMouseenter"],Ar=["onMouseenter"],Fr=["href"],Pr=["onMouseenter"],Or={class:"shifl-grid__reference-value"},Rr=["onClick"],zr={key:0},Hr={key:0,class:"shifl-grid__empty-state-wrapper"},Ir={key:1,class:"text-center text-gray-500 py-6 shifl-grid__empty-state-wrapper empty--rows"},Zr={key:0,class:"shifl-grid__pagination"},jr={class:"shifl-grid__pagination-left"},qr={class:"shifl-grid__pagination-range"},Wr={class:"shifl-grid__pagination-range-numbers"},Gr={class:"shifl-grid__pagination-right"},Kr={class:"shifl-grid__pagination-rows"},Ur=["value","disabled"],Yr={class:"shifl-grid__pagination-nav"},Jr=["disabled"],Qr={class:"shifl-grid__pagination-pages"},Xr=["disabled","onClick"],ei={key:1,class:"shifl-grid__pagination-ellipsis"},ti=["disabled"],ni=["onClick"],oi=["innerHTML"],li={class:"shifl-grid__copy-tooltip-content"},Xt=e.defineComponent({__name:"ShiflGrid",props:{config:{},search:{},loading:{type:Boolean},isNewViewMode:{type:Boolean},gridConfig:{},openColumnManager:{type:Boolean}},emits:["action-click","search-change","pagination-change","row-click","view:updated","view:save","view:apply","view:reset","view:dirty","view:unsaved","export-data"],setup(l,{emit:r}){var Vn,En,Sn,Mn,Dn;function i(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(Array.isArray(t))return t.map(i);if(typeof t=="object"){const o={};for(const n in t)t.hasOwnProperty(n)&&(o[n]=i(t[n]));return o}return t}function a(t,o){if(t===o)return!0;if(t==null||o==null)return!1;if(Array.isArray(t)&&Array.isArray(o))return t.length!==o.length?!1:t.every((n,s)=>a(n,o[s]));if(typeof t=="object"&&typeof o=="object"){const n=Object.keys(t),s=Object.keys(o);return n.length!==s.length?!1:n.every(c=>a(t[c],o[c]))}return!1}const d=l,f=r,u=e.computed(()=>vn(d.config)),k=e.computed(()=>d.isNewViewMode||!1),h=e.ref(d.search),m=e.ref(d.search||""),y=e.ref(!1),p=e.ref(null),B=e.ref(u.value.sort),N=e.ref({page:((Vn=u.value.paginationMeta)==null?void 0:Vn.currentPage)||1,perPage:((En=u.value.paginationMeta)==null?void 0:En.perPage)||20}),T=e.ref(typeof((Sn=u.value.apiConfig)==null?void 0:Sn.additionalParams)=="function"||(Dn=(Mn=u.value.apiConfig)==null?void 0:Mn.additionalParams)==null?void 0:Dn.tabName),L=Tt(u.value,{search:h,filters:p,sort:B,pagination:N,tabName:T}),b=e.computed(()=>{var t;if(d.loading===!0)return!0;try{return((t=L==null?void 0:L.loading)==null?void 0:t.value)??!1}catch{return!1}}),C=e.computed(()=>{const o=[...u.value.columns,...u.value.availableColumns||[]].filter(n=>!n.smartTrackingColumn);return o.sort((n,s)=>{const c=be(n),V=be(s);return c&&!V?1:!c&&V?-1:(n.order||0)-(s.order||0)}),o}),P=e.computed(()=>(d.config.columns||[]).filter(n=>!n.smartTrackingColumn).map((n,s)=>({...n,key:n.key,label:n.label||n.key,order:s+1,visible:n.visible!==!1,freeze:n.freeze||!1,sortable:n.sortable||!1,width:n.width,cellType:n.cellType,align:n.align||"left"}))),{columns:F,visibleColumns:Z,toggleColumnVisibility:O,toggleFreeze:q,moveColumn:z,resetColumns:j}=vt(C.value),{sort:Y,setSort:K,applySort:D}=xt(u.value.sort),{menuState:x,openMenu:Q,closeMenu:X}=$n(),$=e.ref(!1),J=e.ref(!1),S=e.computed(()=>J.value?!1:k.value),v=()=>{J.value=!0,$.value=!0},w=e.computed(()=>{var t;return S.value?d.config.name||"Add New View":pe.value&&((t=d.gridConfig)!=null&&t.name)?d.gridConfig.name:d.config.name==="Add New View"?d.config.module||"":d.config.name||""});e.watch(()=>d.openColumnManager,t=>{t!==void 0&&($.value=t)},{immediate:!0});const A=e.ref(null),H=e.ref(null),_=e.ref(!1),E=e.computed(()=>{var t,o,n;return{name:d.config.name||((t=d.gridConfig)==null?void 0:t.name)||"",columns:F.value.map(s=>({key:s.key,label:s.label,order:s.order??0,sortable:s.sortable??!1,width:s.width,height:s.height,freeze:s.freeze??!1,visible:s.visible??!0,protected:s.protected,isDefault:s.isDefault,actionColumn:s.actionColumn,smartTrackingColumn:s.smartTrackingColumn,blankStyle:s.blankStyle,cellType:s.cellType,truncate:s.truncate??!0,filterable:s.filterable??!1,filterType:s.filterType,align:s.align??"left"})),filters:p.value||[],sort:Y.value,pagination:{page:((o=N.value)==null?void 0:o.page)||1,perPage:((n=N.value)==null?void 0:n.perPage)||20}}}),R=e.computed(()=>ne.value!=="saved"?null:{columns:F.value.map(t=>({key:t.key,order:t.order??0,visible:t.visible??!0}))}),te=e.computed(()=>H.value?!a(E.value,H.value):!1),ne=e.computed(()=>{const t=d.gridConfig;return t!=null&&t.id&&(t!=null&&t.name)&&(t!=null&&t.user_id)?"saved":t!=null&&t.name&&!(t!=null&&t.id)&&!(t!=null&&t.user_id)?"new":"default"}),pe=e.computed(()=>{var t,o,n;return((t=d.gridConfig)==null?void 0:t.name)!==void 0&&((o=d.gridConfig)==null?void 0:o.name)!==null&&((n=d.gridConfig)==null?void 0:n.name)!==""}),g=e.computed(()=>ne.value==="new"||ne.value==="saved"?!0:te.value);function M(t){if(!t)return;t.columns&&(t.columns.forEach((n,s)=>{const c=F.value.find(V=>V.key===n.key);c&&(c.visible=n.visible!==!1,c.order=n.order||s+1)}),F.value.sort((n,s)=>{const c=be(n),V=be(s);return c&&!V?1:!c&&V?-1:(n.order||0)-(s.order||0)}));const o={};Object.keys(ie.value).forEach(n=>{o[n]=null}),He.value.forEach(n=>{o[n]=null}),ie.value=o,bt(),t.filters&&(Array.isArray(t.filters)?t.filters.forEach(n=>{n.field&&n.value!==void 0?st(n.field,n.value):n.field&&n.operation==="orBetween"&&(n.from||n.to)&&st(n.field,{start:n.from,end:n.to})}):Object.entries(t.filters).forEach(([n,s])=>{s!=null&&st(n,s)})),t.sort&&(B.value=t.sort,Y.value=t.sort),t.pagination&&N.value&&(N.value.page=t.pagination.page||1,N.value.perPage=t.pagination.perPage||20),Ni(),_.value?_.value=!1:H.value=i(E.value)}function U(t){if(!t)return;const o=i(t);return o.filterConfigs&&Array.isArray(o.filterConfigs)&&(o.filterConfigs=o.filterConfigs.map(n=>{const s={...n};return delete s.options,s})),o}function G(){var s,c,V,W,oe;const t=F.value.map(ee=>({key:ee.key,label:ee.label,order:ee.order??0,sortable:ee.sortable??!1,width:ee.width,height:ee.height,freeze:ee.freeze??!1,visible:ee.visible??!0,protected:ee.protected??!1,isDefault:ee.isDefault,actionColumn:ee.actionColumn,smartTrackingColumn:ee.smartTrackingColumn,blankStyle:ee.blankStyle,cellType:ee.cellType,truncate:ee.truncate??!0,filterable:ee.filterable??!1,filterType:ee.filterType,align:ee.align??"left"})),o={};Object.entries(ie.value).forEach(([ee,se])=>{se!=null&&se!==""&&!(Array.isArray(se)&&se.length===0)&&!(typeof se=="object"&&Object.keys(se).length===0)&&(o[ee]=se)});const n={columns:t,sort:Y.value,paginationMeta:{show:((s=u.value.paginationMeta)==null?void 0:s.show)??!0,currentPage:((c=N.value)==null?void 0:c.page)||1,perPage:((V=N.value)==null?void 0:V.perPage)||20,total:Se.value},search:u.value.search??[],searchMode:u.value.searchMode??"client",showSearch:u.value.showSearch??!0,filterConfig:U(u.value.filterConfig),exportConfig:u.value.exportConfig,emptyState:u.value.emptyState,module:u.value.module,filters:o};return{module_name:u.value.module||"shipment",view_name:((W=d.gridConfig)==null?void 0:W.name)||d.config.name||"",view_config:n,...(oe=d.gridConfig)!=null&&oe.id?{id:d.gridConfig.id}:{}}}function I(){const t=G();console.log("[ShiflGrid] Save View Payload:",t),console.log("[ShiflGrid] View Config (view_config):",JSON.parse(JSON.stringify(t.view_config))),f("view:save",t),H.value=i(E.value)}function de(t){var n;if(!F.value.find(s=>s.key===t)){const s=(n=u.value.availableColumns)==null?void 0:n.find(c=>c.key===t);if(s){F.value=[...F.value,{...s,visible:!0}];return}}O(t)}function Ne(t,o){z(t,o)}function tt(){j()}const nt=()=>{$.value=!1,k.value?(f("view:apply",E.value),H.value=i(E.value),console.log("Applied new view configuration")):ne.value==="default"?(f("view:apply",E.value),_.value=!0):(H.value=i(E.value),console.log("Applied column changes to saved view (unsaved modifications)"))},ot=()=>{$.value=!1,J.value=!1,d.openColumnManager!==void 0&&f("view:reset")},je=e.ref({}),qe=e.ref({}),We=e.ref(null),Ge=e.ref(null),ve=e.ref(null),xe=e.ref(!1),Ke=e.ref(""),$e=e.ref(null),Te=e.ref(!1),lt=e.ref({});e.ref({});const me=e.ref({}),Be=e.ref(!1),Ve=e.ref("Copy To Clipboard"),Ee=e.ref(null),Le=e.ref({top:0,left:0});function ye(){if(!Ee.value||!Be.value)return;const t=Ee.value.getBoundingClientRect(),o=120,n=32,s=window.innerWidth,c=window.innerHeight,V=4;let W=t.right+V,oe=t.top+t.height/2-n/2;W+o>s&&(W=t.left-o-V),W<0&&(W=10),oe+n>c&&(oe=c-n-10),oe<0&&(oe=10),Le.value={top:oe,left:W}}e.watch(()=>u.value.paginationMeta,t=>{u.value.searchMode!=="server"&&t&&N.value&&(N.value.page=t.currentPage||N.value.page,N.value.perPage=t.perPage||N.value.perPage)},{deep:!0}),e.watch(()=>u.value.columns,t=>{const o=t.filter(c=>!c.smartTrackingColumn),n=new Map(F.value.map(c=>[c.key,c])),s=o.map((c,V)=>{const W=n.get(c.key);return{...c,order:(W==null?void 0:W.order)??V+1}});F.value=s},{deep:!0}),e.watch(()=>u.value.sort,t=>{t&&(Y.value=t,B.value=t)},{deep:!0}),e.watch(()=>{var t;return(t=u.value.apiConfig)==null?void 0:t.additionalParams},t=>{if(t&&typeof t!="function"){const o=t;o.tabName!==void 0&&T.value!==o.tabName&&(at(),T.value=o.tabName,ln())}},{deep:!0});function at(){var o;const t=((o=u.value.paginationMeta)==null?void 0:o.perPage)||20;N.value={page:1,perPage:t},h.value=void 0,B.value=u.value.sort,p.value=null,f("search-change",""),f("pagination-change",1,t)}e.watch(()=>d.search,(t,o)=>{var n;if(h.value=t,m.value=t||"",u.value.searchMode==="server")f("search-change",t||"");else if(u.value.searchMode==="client"&&t!==o){const s=((n=N.value)==null?void 0:n.perPage)||20;N.value={page:1,perPage:s},f("pagination-change",1,s)}},{immediate:!0}),e.watch(()=>Y.value,t=>{B.value=t});const Ae=e.computed(()=>L.rows.value||[]),Fe=e.computed(()=>{try{return(u.value.searchMode||"client")==="server"?Ae.value||[]:Ae.value||[]}catch(t){return console.warn("Error in filteredRows computed:",t),[]}}),Se=e.computed(()=>{var t;try{return(u.value.searchMode||"client")==="client"?(Fe.value||[]).length:((t=L.paginationMeta.value)==null?void 0:t.total)||0}catch(o){return console.warn("Error in effectiveTotal computed:",o),0}}),Pe=e.computed(()=>{try{return(u.value.searchMode||"client")==="server"?Fe.value||[]:D(Fe.value||[])}catch(t){return console.warn("Error in sortedRows computed:",t),[]}}),ge=e.computed(()=>{try{if((u.value.searchMode||"client")==="server")return Pe.value||[];const o=re.value;if(!o||!o.show)return Pe.value||[];const n=o.perPage||20,c=((o.currentPage||1)-1)*n,V=c+n;return(Pe.value||[]).slice(c,V)}catch(t){return console.warn("Error in displayRows computed:",t),[]}});e.watch(()=>ge.value,()=>{me.value={}},{deep:!0});const re=e.computed(()=>{var t;return u.value.searchMode==="server"&&L.paginationMeta.value?{show:!0,...L.paginationMeta.value,currentPage:((t=N.value)==null?void 0:t.page)||L.paginationMeta.value.currentPage||1}:u.value.paginationMeta}),Oe=e.computed(()=>{var t;return((t=re.value)==null?void 0:t.perPage)===100}),rt=e.computed(()=>{var t;return((t=re.value)==null?void 0:t.perPage)||10}),Ue=e.computed(()=>{const t=re.value;if(!t||t.show===!1)return{from:0,to:0};const o=Se.value,n=t.perPage||20,s=t.currentPage||1;if((u.value.searchMode||"client")==="server"&&t.from!==void 0&&t.to!==void 0)return{from:t.from,to:t.to};const V=(s-1)*n+1,W=Math.min(s*n,o);return o===0?{from:0,to:0}:{from:V,to:W}}),ke=e.computed(()=>{var t;return((t=re.value)==null?void 0:t.currentPage)||1}),Re=e.computed(()=>{const t=re.value;if(!t||t.show===!1)return 1;const o=Se.value;if(o===0)return 1;const n=t.perPage||20,s=Math.ceil(o/n);return Math.max(1,s)}),Ye=e.computed(()=>ke.value<=1),Je=e.computed(()=>ke.value>=Re.value),it=e.computed(()=>{const t=Re.value,o=ke.value,n=[];if(t<=7)for(let s=1;s<=t;s++)n.push(s);else if(o<=4){for(let s=1;s<=5;s++)n.push(s);n.push(-1),n.push(t)}else if(o>=t-3){n.push(1),n.push(-1);for(let s=t-4;s<=t;s++)n.push(s)}else{n.push(1),n.push(-1);for(let s=o-1;s<=o+1;s++)n.push(s);n.push(-1),n.push(t)}return n});function Qe(t){var n;if(t<1||t>Re.value||t===ke.value||b.value)return;const o=((n=re.value)==null?void 0:n.perPage)||20;N.value={page:t,perPage:o},f("pagination-change",t,o)}function pi(){var n;if(Ye.value||b.value)return;const t=((n=re.value)==null?void 0:n.perPage)||20,o=ke.value-1;N.value={page:o,perPage:t},f("pagination-change",o,t)}function gi(){var n;if(Je.value||b.value)return;const t=((n=re.value)==null?void 0:n.perPage)||20,o=ke.value+1;N.value={page:o,perPage:t},f("pagination-change",o,t)}function hi(t){var s;if(b.value)return;const o=t.target,n=parseInt(o.value,10);n&&n!==(((s=re.value)==null?void 0:s.perPage)||20)&&(N.value={page:1,perPage:n},f("pagination-change",1,n))}const yi=e.computed(()=>{const t=u.value.columns.find(n=>n.smartTrackingColumn);if(!(t!=null&&t.smartTrackingColumn))return!1;const o=t.smartTrackingColumn.dataKey;return Ae.value.some(n=>{const s=n[o];return s===!0||s===1||s==="true"||s==="1"})}),Ct=e.computed(()=>u.value.columns.find(t=>t.smartTrackingColumn)),ze=e.computed(()=>{var n;const t=Z.value.filter(s=>!s.smartTrackingColumn);if(yi.value&&Ct.value){const s={key:"_smart_tracking",label:"",order:-1,freeze:!0,visible:!0,protected:!0,sortable:!1,width:((n=Ct.value.smartTrackingColumn)==null?void 0:n.width)||"36px",smartTrackingColumn:Ct.value.smartTrackingColumn,cellType:"icon"},c=t.findIndex(V=>V.key==="ref");c>=0?t.splice(c,0,s):t.unshift(s)}const o=t.find(s=>s.key==="ref");return o&&(o.freeze=!0,o.protected=!0),t}),ki=e.computed(()=>{let t=0;const o={};for(const n of ze.value){n.freeze&&(o[n.key]=t);const s=parseInt(n.width??"160",10);Number.isNaN(s)||(t+=s)}return o}),Ci=e.computed(()=>{const t=u.value.exportConfig;return(t==null?void 0:t.show)===!0}),_i=e.computed(()=>{const t=u.value.exportConfig;return!(t!=null&&t.show)||!ge.value||ge.value.length===0?!0:!zt(t).isValid});function bi(){const t=u.value.exportConfig;if(!t)return;const o=zt(t);if(!o.isValid){console.error("Export configuration is invalid:",o.errors);return}const n=Pn(ge.value,ze.value,Y.value,p.value);if(t.source==="client")Fn({exportType:t.exportType||"csv",fileName:t.exportFileName||"export",data:n});else if(t.source==="server"){const s={columns:[...u.value.columns,...u.value.availableColumns||[]],filters:p.value||[],sort:Y.value,exportType:t.exportType||"csv",exportFileName:t.exportFileName||"export",search:h.value};f("export-data",s)}}const wi=e.computed(()=>{var o,n;const t=u.value.filterConfig;return!!(t!=null&&t.filters&&(((o=t.filters.default)==null?void 0:o.length)>0||((n=t.filters.available)==null?void 0:n.length)>0))}),Bi=e.computed(()=>!!u.value.showSearch),_t=e.computed(()=>{const t=u.value.filterConfig,o=u.value.module||"shipment";return t!=null&&t.filterConfigs?t.filterConfigs:On[o]||[]}),Vi=e.computed(()=>{const t=[];return _t.value.forEach(o=>{t.push(o)}),t});function Ei(){if(N.value){const t=N.value.perPage;N.value={page:1,perPage:t},f("pagination-change",1,t)}}const{updateFilterValue:Si,confirmFilterValue:Mi,clearFilter:Di,clearAllFilters:bt,applyFilters:Ni}=$t(Vi.value,{onFiltersChange:t=>{p.value=t,f("search-change","")},onPaginationReset:Ei,debounceTime:300}),He=e.computed(()=>{var o;const t=u.value.filterConfig;return((o=t==null?void 0:t.filters)==null?void 0:o.default)||[]}),ie=e.ref({});e.watch(()=>d.gridConfig,t=>{t&&M(t)},{immediate:!0,deep:!0}),e.watch(()=>d.isNewViewMode,(t,o)=>{if(t&&!o&&ne.value==="saved"&&te.value){f("view:unsaved",{message:"You have unsaved changes. Save before creating a new view"});return}if(t){console.log("Entered new view mode - keeping current columns unchanged until confirmation");const n={};Object.keys(ie.value).forEach(s=>{n[s]=null}),He.value.forEach(s=>{n[s]=null}),ie.value=n,bt()}else console.log("Exited new view mode")},{immediate:!0}),e.onMounted(()=>{!d.gridConfig&&!d.isNewViewMode&&(H.value=i(E.value))}),e.watch(E,t=>{f("view:updated",t),f("view:dirty",te.value)},{deep:!0});const vi=e.computed(()=>Object.keys(ie.value).map(t=>{const o=_t.value.find(n=>n.key===t);return o?{config:o,value:ie.value[t]}:null}).filter(Boolean)),nn=e.computed(()=>_t.value.filter(t=>!He.value.includes(t.key))),on=e.computed(()=>Object.values(ie.value).some(t=>{if(t==null||t===""||t===!1||Array.isArray(t)&&t.length===0)return!1;if(typeof t=="object"&&t!==null){const o=t;if("start"in t||"end"in t||"date"in t||"mode"in t?!o.start&&!o.end&&!o.date:Object.keys(t).length===0)return!1}return!0})),xi=e.computed(()=>Object.keys(ie.value));function st(t,o){ie.value[t]=o,Si(t,o)}function $i(t){ie.value[t.key]=null,A.value&&A.value.closeDropdown(),e.nextTick(()=>{const o=je.value[t.key];o&&typeof o=="object"&&o!==null&&"openFilter"in o&&typeof o.openFilter=="function"&&o.openFilter()})}function Ti(t){delete ie.value[t]}function Li(t){console.log("Updated default filters:",t)}function Ai(t,o){ie.value[t]=o,Mi(t,o)}function Fi(t){t.forEach(n=>{ie.value[n]!==void 0&&(ie.value[n]=null)});const o={};He.value.forEach(n=>{o[n]=null}),ie.value=o,bt()}function Pi(t){ie.value[t]=null,Di(t)}function Oi(t){var c;const n=t.target.value;m.value=n,h.value=n||void 0,f("search-change",n);const s=((c=re.value)==null?void 0:c.perPage)||20;N.value={page:1,perPage:s},f("pagination-change",1,s)}function ln(){var o;m.value="",h.value=void 0,f("search-change","");const t=((o=re.value)==null?void 0:o.perPage)||20;N.value={page:1,perPage:t},f("pagination-change",1,t)}const an=e.computed(()=>{const t=!!d.search&&d.search.trim().length>0,o=!!m.value&&m.value.trim().length>0;return t||o}),wt=e.ref(null);e.watch(()=>!ge.value.length&&an.value&&u.value.emptyState,t=>{t&&wt.value&&(wt.value.scrollLeft=0)});const rn=e.ref(0);function Ri(t){const o=t.target;rn.value=o.scrollLeft}function zi(t){const o=F.value.find(n=>n.key===t);!(o!=null&&o.sortable)||be(o)||mt(o)||K(t)}function Ie(t,o){if(t==null||t===""||t===void 0)return Me(o.blankStyle);const n=o.cellType;if(Array.isArray(n)){const s=n.find(c=>typeof c=="string"&&c!=="icon");return s&&typeof s=="string"?hn(t,s,o):""}if(!n)return typeof t=="object"?JSON.stringify(t):String(t);switch(n){case"number":return sn(t);case"date":return cn(t);case"time":return fn(t);case"datetime":return un(t);case"boolean":return mn(t);case"text":default:return typeof t=="object"?JSON.stringify(t):String(t)}}function Me(t){switch(t){case"dash":return"--";case"zero":return"0";case"na":return"N/A";case"empty":default:return""}}function sn(t){if(typeof t=="number")return t.toLocaleString();const o=Number(t);return Number.isNaN(o)?String(t):o.toLocaleString()}function cn(t){if(t instanceof Date)return Vt(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return Vt(o)}return String(t)}function Bt(t){const o=t.getHours(),n=t.getMinutes(),s=o>=12?"PM":"AM",V=(o%12||12).toString().padStart(2,"0"),W=n.toString().padStart(2,"0");return`${V}:${W} ${s}`}function Vt(t){const o=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0"),s=t.getFullYear().toString().slice(-2);return`${o}/${n}/${s}`}function dn(t){const o=Bt(t),n=Vt(t);return`${o} ${n}`}function fn(t){if(t instanceof Date)return Bt(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return Bt(o)}return String(t)}function un(t){if(t instanceof Date)return dn(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return dn(o)}return String(t)}function mn(t){return typeof t=="boolean"?t?"Yes":"No":t===1||t==="1"||t==="true"||t==="True"?"Yes":t===0||t==="0"||t==="false"||t==="False"?"No":String(t)}function ct(t){if(typeof t=="boolean")return t?qo:Uo;if(Array.isArray(t)){if(t.length===0)return null;for(const o of t)if(typeof o=="string"){const n=pn(o);if(n)return n}return null}return typeof t=="string"?pn(t):null}function pn(t){switch(t.toLowerCase().trim()){case"ocean":return Zt;case"air":return vo;default:return null}}function Hi(t){const o=t.toLowerCase();return["supplier","suppliers","po","pos","product_description"].includes(o)}function gn(t){if(t.cellType==="badge")return!0;const o=t.key.toLowerCase();return o==="tag"||o==="tags"}function Ii(t){return t.cellType==="status"?!0:t.key.toLowerCase()==="status"}function Zi(t){return t.cellType==="icon"?!0:t.key.toLowerCase()==="type"}function ji(t){return!t||typeof t!="string"?"shifl-grid__chip shifl-grid__chip--status":`shifl-grid__chip shifl-grid__chip--status shifl-grid__chip--${t.toLowerCase().replace(/\s+/g,"_")}`}function qi(t){return Array.isArray(t.cellType)&&t.cellType.length>0}function Wi(t){return Array.isArray(t.cellType)?t.cellType.filter(o=>typeof o=="string"):t.cellType&&typeof t.cellType=="string"?[t.cellType]:[]}function hn(t,o,n){if(t==null||t===""||t===void 0)return Me(n.blankStyle);switch(o){case"number":return sn(t);case"date":return cn(t);case"time":return fn(t);case"datetime":return un(t);case"boolean":return mn(t);case"text":default:return typeof t=="object"?JSON.stringify(t):String(t)}}function Gi(t){return{number:"shifl-grid__composite-number",date:"shifl-grid__composite-date",boolean:"shifl-grid__composite-boolean",text:"shifl-grid__composite-text"}[t]||"shifl-grid__composite-text"}function Ki(t,o){if(t==null||t==="")return Me(o.blankStyle);if(Array.isArray(t)){if(t.length===0)return Me(o.blankStyle);const n=t.join(", ");return yn(n,45)}return typeof t=="string"?yn(t,45):String(t)}function yn(t,o){return t.length<=o?t:t.substring(0,o)+"..."}function Et(t){const o=t.toLowerCase();return["po","pos","supplier","suppliers","tag","tags"].includes(o)}function Ui(t,o){return t==null||Et(o)?!1:Array.isArray(t)?t.length===0?!1:t.join(", ").length>30:typeof t=="string"?t.length>30:!1}function Yi(t){return t==null?!1:Array.isArray(t)?t.length===0?!1:t.join(", ").length>45:typeof t=="string"?t.length>45:!1}function Ji(t){if(t==null)return 0;if(Array.isArray(t)){if(t.length===0||t.join(", ").length<=45)return 0;let n=0,s=0;for(const c of t){const V=String(c);if(n+V.length>45)break;n+=V.length+2,s++}return t.length-s}return typeof t=="string"&&t.length>45?1:0}function St(t,o,n){if(!Array.isArray(t))return[];const s=t.filter(_e=>_e!=null&&_e!==""&&_e!==void 0);if(s.length===0)return[];const c=`${o}-${n}`;if(me.value[c])return me.value[c];const V=120,W=12,oe=4,ee=14,se=20;let we=0;const fe=[];for(const _e of s){const hs=String(_e).length*6,Nn=ee+hs+W+oe,ys=s.length-fe.length-1>0?V-se:V;if(we+Nn>ys&&fe.length>0)break;fe.push(_e),we+=Nn}return fe.length===0&&s.length>0&&fe.push(s[0]),me.value[c]=fe,fe}function Qi(t,o,n){if(!Array.isArray(t))return!1;const s=t.filter(V=>V!=null&&V!==""&&V!==void 0),c=St(t,o,n);return s.length>c.length}function Xi(t,o,n){if(!Array.isArray(t))return 0;const s=t.filter(V=>V!=null&&V!==""&&V!==void 0),c=St(t,o,n);return Math.max(0,s.length-c.length)}function es(t,o,n,s){dt(t,o,n,s)}function dt(t,o,n,s){let c="",V=!1;const W=ze.value.find(oe=>oe.key===t);if(W&&gn(W)){const oe=kn(n);oe.length>0&&(V=!0,c=oe.map(ee=>`<span class="shifl-grid__tooltip-badge" style="border-left-color: ${bn(ee)} !important">${ee.name}</span>`).join(""))}else Array.isArray(n)?n.length>0&&(c=n.join(`
56
- `)):n!=null&&(c=String(n));Ke.value=c,Te.value=V,$e.value=s,xe.value=!0}function ft(){xe.value=!1,$e.value=null,Te.value=!1}function ts(t,o){Ve.value="Copy To Clipboard",Ee.value=o,Be.value=!0,ye()}function Mt(){Be.value=!1,Ee.value=null}async function ns(t){try{await navigator.clipboard.writeText(t),Ve.value="Copied!",setTimeout(()=>{Mt()},2e3)}catch(o){console.error("Failed to copy text: ",o);const n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),Ve.value="Copied!",setTimeout(()=>{Mt()},2e3)}}function os(t,o,n){n&&(lt.value[`${t}-${o}`]=n)}function ut(t){return t==null?[]:Array.isArray(t)?t.map(o=>typeof o=="object"&&o!==null&&"name"in o?String(o.name):String(o)).filter(o=>o.length>0):typeof t=="string"?t.split(",").map(o=>o.trim()).filter(o=>o.length>0):[String(t)]}function kn(t){return t==null?[]:Array.isArray(t)?t.map(o=>typeof o=="object"&&o!==null&&"name"in o?{name:String(o.name),color:"color"in o?String(o.color):void 0}:{name:String(o),color:void 0}).filter(o=>o.name.length>0):typeof t=="string"?t.split(",").map(o=>o.trim()).filter(o=>o.length>0).map(o=>({name:o,color:void 0})):[{name:String(t),color:void 0}]}function Cn(t,o,n){const s=ut(t);if(s.length===0)return[];const c=`${o}-${n}`;if(me.value[c])return me.value[c];const V=130,W=8,oe=4;let ee=0;const se=[];for(const we of s){const fe=we.length*8+W+oe;if(ee+fe>V&&se.length>0)break;se.push(we),ee+=fe}return me.value[c]=se,se}function _n(t,o,n,s){const c=kn(t);if(c.length===0)return[];const V=(s==null?void 0:s.id)||n,W=`${o}-${V}-objects`;if(me.value[W])return me.value[W];const oe=130,ee=8,se=4;let we=0;const fe=[];for(const _e of c){const gt=_e.name.length*8+ee+se;if(fe.length===0){fe.push(_e),we+=gt;continue}if(we+gt>oe)break;fe.push(_e),we+=gt}return me.value[W]=fe,fe}function ls(t,o,n){const s=ut(t),c=Cn(t,o,n);return s.length>c.length}function as(t,o,n){const s=ut(t),c=Cn(t,o,n);return s.length-c.length}function rs(t){const o=t.toLowerCase(),n={"high priority":"var(--shifl-color-error-r70)",express:"var(--shifl-color-primary-b80)",fragile:"var(--shifl-color-warning-o70)","temperature controlled":"var(--shifl-color-primary-b70)","customs clearance required":"var(--shifl-color-accent-p80)","insurance required":"var(--shifl-color-primary-b90)","special handling":"var(--shifl-color-warning-o80)","urgent delivery":"var(--shifl-color-error-r80)",normal:"var(--shifl-color-neutral-n60)",low:"var(--shifl-color-neutral-n50)"};if(n[o])return n[o];for(const[s,c]of Object.entries(n))if(o.includes(s)||s.includes(o))return c;return is(t)}function bn(t){return t.color&&t.color!==""?t.color:rs(t.name)}function is(t){let o=0;for(let s=0;s<t.length;s++)o=t.charCodeAt(s)+((o<<5)-o);const n=["var(--shifl-color-primary-b80)","var(--shifl-color-success-g70)","var(--shifl-color-warning-o70)","var(--shifl-color-error-r70)","var(--shifl-color-accent-p80)","var(--shifl-color-primary-b70)","var(--shifl-color-success-g60)","var(--shifl-color-warning-o60)"];return n[Math.abs(o)%n.length]}function Dt(t,o=!0){const s={...{width:t.width??"160px",minWidth:t.width??"160px"}},c=rn.value>0,V=F.value.filter(oe=>oe.freeze),W=V[V.length-1];if(t.freeze){const oe=ki.value[t.key]??0;s.position="sticky",s.left=`${oe}px`,s.background="#ffffff",s.zIndex=o?40:10,t.key===(W==null?void 0:W.key)&&c?s.boxShadow="2px 0px 4px -2px #121b2b0d, 2px 0px 2px 0px #121b2b0d":s.boxShadow="none"}return o&&(s.position="sticky",s.top="0px"),s}const ss=e.computed(()=>[...F.value,...u.value.availableColumns||[]].reduce((n,s)=>(n.some(c=>c.key===s.key)||n.push(s),n),[]).filter(n=>!n.smartTrackingColumn));function be(t){return!!t.actionColumn}function mt(t){return!!t.smartTrackingColumn}function cs(t){return t.key==="ref"}function ds(t,o){if(!t.smartTrackingColumn)return!1;const n=t.smartTrackingColumn.dataKey,s=o[n];if(s===!0||s===1)return!0;if(typeof s=="string"){const c=s.toLowerCase().trim();return c==="true"||c==="1"||c==="yes"}return!1}function Ce(t,o){if(!t.actionColumn)return null;const n=t.actionColumn.icon;return n?typeof n=="function"?n(o):n:null}function fs(t,o,n,s){if(!n.actionColumn)return;const c=s.currentTarget;if(x.value.rowIndex===t){X();return}Ge.value=n,ve.value=o,Q(t,c)}function us(t,o){return!(t!=null&&t.actionColumn)||!o?[]:(typeof t.actionColumn.actions=="function"?t.actionColumn.actions(o):t.actionColumn.actions||[]).filter(s=>s.show?s.show(o):!0)}function ms(t,o,n){f("action-click",t.key,o,n),X()}function pt(t){var o;return((o=t.actionColumn)==null?void 0:o.displayType)||"menu"}function wn(t,o){var n;return(n=t.actionColumn)!=null&&n.buttonText?typeof t.actionColumn.buttonText=="function"?t.actionColumn.buttonText(o):t.actionColumn.buttonText:"Actions"}function Nt(t,o,n){var s;(s=t.actionColumn)!=null&&s.onAction?t.actionColumn.onAction(o,n):f("action-click","default",o,n)}const ps=(t,o)=>{["BUTTON","A","INPUT","SELECT","TEXTAREA","SVG","PATH"].includes(o.target.tagName)||f("row-click",t)};function gs(t,o){o&&(qe.value[t]=o)}function Bn(t){if(x.value.rowIndex===null)return;const o=t.target,n=We.value,s=Object.values(qe.value),c=n==null?void 0:n.contains(o),V=s.some(W=>W.contains(o));!c&&!V&&X()}return e.onMounted(()=>{document.addEventListener("click",Bn),document.addEventListener("scroll",ye),window.addEventListener("scroll",ye),window.addEventListener("resize",ye)}),e.watch(He,t=>{t.forEach(o=>{o in ie.value||(ie.value[o]=null)})},{immediate:!0}),e.onUnmounted(()=>{document.removeEventListener("click",Bn),document.removeEventListener("scroll",ye),window.removeEventListener("scroll",ye),window.removeEventListener("resize",ye),L.cancelCurrentRequest()}),(t,o)=>(e.openBlock(),e.createElementBlock("div",Ha,[e.createElementVNode("div",Ia,[e.createElementVNode("div",Za,[Bi.value?(e.openBlock(),e.createElementBlock("div",ja,[e.createElementVNode("div",qa,[e.createVNode(qt,{class:"shifl-grid__search-icon",color:"#253041"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=n=>m.value=n),type:"text",placeholder:"Search",class:"shifl-grid__search-input",onInput:Oi,onFocus:o[1]||(o[1]=n=>y.value=!0),onBlur:o[2]||(o[2]=n=>y.value=!1)},null,544),[[e.vModelText,m.value]]),m.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__search-clear",onClick:ln},[e.createVNode(Xe,{class:"shifl-grid__clear-icon",color:y.value?"#1A6D9E":"#253041"},null,8,["color"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),wi.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vi.value,n=>{var s;return e.openBlock(),e.createBlock(La,{key:((s=n==null?void 0:n.config)==null?void 0:s.key)||"",ref_for:!0,ref:c=>{var V;return je.value[((V=n==null?void 0:n.config)==null?void 0:V.key)||""]=c},config:n==null?void 0:n.config,"model-value":n==null?void 0:n.value,"onUpdate:modelValue":c=>{var V;return st(((V=n==null?void 0:n.config)==null?void 0:V.key)||"",c)},onConfirm:c=>{var V;return Ai(((V=n==null?void 0:n.config)==null?void 0:V.key)||"",c)},onClear:o[3]||(o[3]=c=>Pi(c))},null,8,["config","model-value","onUpdate:modelValue","onConfirm"])}),128)),nn.value.length>0?(e.openBlock(),e.createBlock(za,{key:0,ref_key:"filterDropdownRef",ref:A,"available-filters":nn.value,"active-filter-keys":xi.value,"default-filter-keys":He.value,"has-active-filters-with-value":on.value,onAddFilter:$i,onRemoveFilter:Ti,onUpdateDefaultFilters:Li,onClearAllFilters:Fi},null,8,["available-filters","active-filter-keys","default-filter-keys","has-active-filters-with-value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Wa,[e.createElementVNode("button",{type:"button",class:"shifl-grid__pill-button whitespace-nowrap",onClick:v},[e.createVNode(dl),o[6]||(o[6]=e.createTextVNode(" Edit Column ",-1))]),Ci.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__pill-button whitespace-nowrap flex items-center",disabled:_i.value,onClick:bi,title:"Export Data"},[e.createVNode(Qo),o[7]||(o[7]=e.createTextVNode(" Export ",-1))],8,Ga)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-grid__pill-button whitespace-nowrap flex items-center save-view",{"shifl-grid__pill-button--disabled":!g.value}]),disabled:!g.value,title:"Save View",onClick:I},[e.createVNode(rl),o[8]||(o[8]=e.createTextVNode(" Save View ",-1))],10,Ka)])]),e.createElementVNode("div",{ref_key:"gridViewport",ref:wt,class:e.normalizeClass(["shifl-grid__viewport",{"shifl-grid__viewport--scroll":Oe.value,"shifl-grid__viewport--empty":!ge.value.length}]),onScroll:Ri},[e.createElementVNode("table",Ua,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,n=>{var s;return e.openBlock(),e.createElementBlock("th",{key:n.key,style:e.normalizeStyle(Dt(n,!0)),onClick:()=>zi(n.key),class:e.normalizeClass(["shifl-grid__header-cell",`shifl-grid__header-align-${n!=null&&n.align?n.align:"left"}`,{"shifl-grid__cell--sticky":n.freeze,"shifl-grid__sortable-col":n.sortable,"shifl-grid__icon":n.cellType==="icon","shifl-grid__hover-sortable":n.sortable&&!be(n)&&!mt(n)}])},[e.createElementVNode("div",Ja,[n.label?(e.openBlock(),e.createElementBlock("span",Qa,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),((s=e.unref(Y))==null?void 0:s.key)===n.key&&e.unref(Y).order?(e.openBlock(),e.createElementBlock("span",Xa,[e.unref(Y).order==="asc"?(e.openBlock(),e.createBlock(It,{key:0})):(e.openBlock(),e.createBlock(Bo,{key:1}))])):n.sortable&&!be(n)&&!mt(n)?(e.openBlock(),e.createElementBlock("span",er,[e.createVNode(It,{color:"#69758C"})])):e.createCommentVNode("",!0)])],14,Ya)}),128))])]),e.createElementVNode("tbody",null,[b.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(rt.value,n=>(e.openBlock(),e.createElementBlock("tr",{key:`skeleton-${n}`,class:"shifl-grid__skeleton-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,s=>(e.openBlock(),e.createElementBlock("td",{key:s.key,style:e.normalizeStyle(Dt(s,!1)),class:e.normalizeClass({"shifl-grid__cell--sticky":s.freeze})},[...o[9]||(o[9]=[e.createElementVNode("div",{class:"shifl-grid__skeleton-cell"},null,-1)])],6))),128))]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(ge.value,(n,s)=>(e.openBlock(),e.createElementBlock("tr",{key:s,onClick:c=>ps(n,c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,c=>(e.openBlock(),e.createElementBlock("td",{key:c.key,style:e.normalizeStyle(Dt(c,!1)),class:e.normalizeClass([{"shifl-grid__cell--sticky":c.freeze},{"shifl-grid__cell--action":be(c)},`shifl-grid__cell-align-${c!=null&&c.align?c.align:"left"}`,{"shifl-grid__icon":c.cellType==="icon"}])},[mt(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[ds(c,n)?(e.openBlock(),e.createElementBlock("div",nr,[e.createVNode(go)])):e.createCommentVNode("",!0)],64)):be(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[pt(c)==="menu"?(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-icon",ref_for:!0,ref:V=>gs(s,V),onClick:e.withModifiers(V=>fs(s,n,c,V),["stop"])},[Ce(c,n)?typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,rr)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:2,class:"w-4 h-4"})):(e.openBlock(),e.createElementBlock("span",ar,"⋯"))],8,lr)])):pt(c)==="button"?(e.openBlock(),e.createElementBlock("div",ir,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-button",onClick:e.withModifiers(()=>Nt(c,n,s),["stop"])},e.toDisplayString(wn(c,n)),9,sr)])):pt(c)==="icon"?(e.openBlock(),e.createElementBlock("div",cr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-icon",onClick:e.withModifiers(()=>Nt(c,n,s),["stop"])},[typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,fr)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:1,class:"w-4 h-4"}))],8,dr)])):pt(c)==="button-icon"?(e.openBlock(),e.createElementBlock("div",ur,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-button-icon",onClick:e.withModifiers(()=>Nt(c,n,s),["stop"])},[typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,pr)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:1,class:"w-4 h-4"})),e.createElementVNode("span",gr,e.toDisplayString(wn(c,n)),1)],8,mr)])):e.createCommentVNode("",!0)],64)):qi(c)?(e.openBlock(),e.createElementBlock("div",hr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Wi(c),(V,W)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:W},[V==="icon"&&ct(n[c.key])?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ct(n[c.key])),{key:0,class:"shifl-grid__type-icon"})):V==="icon"?(e.openBlock(),e.createElementBlock("span",yr,e.toDisplayString(Me(c.blankStyle)),1)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(Gi(V))},e.toDisplayString(hn(n[c.key],V,c)),3))],64))),128))])):Zi(c)?(e.openBlock(),e.createElementBlock("div",kr,[ct(n[c.key])?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ct(n[c.key])),{key:0,class:"shifl-grid__type-icon"})):(e.openBlock(),e.createElementBlock("span",Cr,e.toDisplayString(Me(c.blankStyle)),1)),n.container_count!=null?(e.openBlock(),e.createElementBlock("span",_r," ("+e.toDisplayString(n.container_count)+") ",1)):e.createCommentVNode("",!0)])):gn(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[n[c.key]==null||_n(n[c.key],c.key,s,n).length===0?(e.openBlock(),e.createElementBlock("div",br,e.toDisplayString(Me(c.blankStyle)),1)):(e.openBlock(),e.createElementBlock("div",wr,[e.createElementVNode("div",Br,[e.createElementVNode("div",{ref_for:!0,ref:"(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",class:"shifl-grid__chips-container shifl-grid__chips-container--single-line"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_n(n[c.key],c.key,s,n),(V,W)=>(e.openBlock(),e.createElementBlock("span",{key:W,class:"shifl-grid__chip shifl-grid__chip--tag",style:e.normalizeStyle({borderLeftColor:bn(V)})},e.toDisplayString(V.name),5))),128))],512)]),ls(n[c.key],c.key,s)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:V=>dt(c.key,s,n[c.key],V.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(as(n[c.key],c.key,s)),41,Vr)):e.createCommentVNode("",!0)]))],64)):Ii(c)?(e.openBlock(),e.createElementBlock("div",Er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ut(n[c.key]),(V,W)=>(e.openBlock(),e.createElementBlock("span",{key:W,class:e.normalizeClass(ji(V))},e.toDisplayString(V),3))),128))])):c.cellType==="icon-text"?(e.openBlock(),e.createElementBlock("div",Sr,[Array.isArray(n[c.key])?(e.openBlock(),e.createElementBlock("div",Mr,[e.createElementVNode("div",Dr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(St(n[c.key],c.key,s),(V,W)=>(e.openBlock(),e.createElementBlock("div",{key:W,class:"shifl-grid__icon-text-badge"},[e.createVNode(jt,{class:"shifl-grid__icon-text-icon"}),e.createElementVNode("span",{class:"shifl-grid__icon-text-name",title:String(V||"")},e.toDisplayString(Ie(V,c)),9,Nr)]))),128))]),Qi(n[c.key],c.key,s)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:V=>es(c.key,s,n[c.key],V.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(Xi(n[c.key],c.key,s)),41,vr)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n[c.key]&&Ie(n[c.key],c)?(e.openBlock(),e.createElementBlock("div",xr,[e.createVNode(jt,{class:"shifl-grid__icon-text-icon"}),e.createElementVNode("span",{class:"shifl-grid__icon-text-name",title:String(n[c.key]||"")},e.toDisplayString(Ie(n[c.key],c)),9,$r)])):e.createCommentVNode("",!0)],64))])):c.truncate!==!1&&(c.truncate===!0||Hi(c.key))?(e.openBlock(),e.createElementBlock("div",Tr,[e.createElementVNode("span",{class:"shifl-grid__truncated-text",ref_for:!0,ref:V=>os(c.key,s,V)},e.toDisplayString(Ki(n[c.key],c)),513),Et(c.key)&&Yi(n[c.key])?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:V=>dt(c.key,s,n[c.key],V.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(Ji(n[c.key])),41,Lr)):!Et(c.key)&&Ui(n[c.key],c.key)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"shifl-grid__info-icon-button",onMouseenter:V=>dt(c.key,s,n[c.key],V.currentTarget),onMouseleave:ft},[e.createVNode(Po)],40,Ar)):e.createCommentVNode("",!0)])):c.cellType==="link"?(e.openBlock(),e.createElementBlock("a",{key:8,href:String(n[c.key]||""),class:"shifl-grid__link-cell",onClick:o[4]||(o[4]=e.withModifiers(()=>{},["stop"]))},e.toDisplayString(Ie(n[c.key],c)),9,Fr)):cs(c)?(e.openBlock(),e.createElementBlock("div",{key:9,class:"shifl-grid__reference-cell",onMouseenter:V=>ts(String(n[c.key]||""),V.currentTarget),onMouseleave:Mt},[e.createElementVNode("span",Or,e.toDisplayString(Ie(n[c.key],c)),1),n[c.key]?(e.openBlock(),e.createElementBlock("button",{key:0,class:"shifl-grid__copy-icon",onClick:e.withModifiers(()=>ns(String(n[c.key]||"")),["stop"]),type:"button"},[e.createVNode(Ho)],8,Rr)):e.createCommentVNode("",!0)],40,Pr)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[e.createTextVNode(e.toDisplayString(Ie(n[c.key],c)),1)],64))],6))),128))],8,tr))),128))])]),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",zr,[!ge.value.length&&(an.value||on.value)&&u.value.emptyState?(e.openBlock(),e.createElementBlock("div",Hr,[e.createVNode(gl,{"icon-name":u.value.emptyState.iconName,title:u.value.emptyState.title,description:u.value.emptyState.description},null,8,["icon-name","title","description"])])):ge.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ir," No data available "))]))],34),re.value&&re.value.show!==!1?(e.openBlock(),e.createElementBlock("div",Zr,[e.createElementVNode("div",jr,[e.createElementVNode("span",qr,[o[10]||(o[10]=e.createTextVNode(" Showing ",-1)),e.createElementVNode("span",Wr,e.toDisplayString(Ue.value.from)+"–"+e.toDisplayString(Ue.value.to),1),e.createTextVNode(" of "+e.toDisplayString(Se.value),1)])]),e.createElementVNode("div",Gr,[e.createElementVNode("div",Kr,[o[12]||(o[12]=e.createElementVNode("label",{class:"shifl-grid__pagination-label"},"Row per page",-1)),e.createElementVNode("select",{value:re.value.perPage||20,disabled:b.value,onChange:hi,class:"shifl-grid__pagination-select"},[...o[11]||(o[11]=[e.createStaticVNode('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>',5)])],40,Ur)]),e.createElementVNode("div",Yr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__pagination-button",disabled:Ye.value||d.loading,onClick:pi,"aria-label":"Previous page"}," ‹ ",8,Jr),e.createElementVNode("div",Qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(it.value,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n!==-1?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["shifl-grid__pagination-page",{"shifl-grid__pagination-page--active":n===ke.value}]),disabled:b.value,onClick:s=>Qe(n)},e.toDisplayString(n),11,Xr)):(e.openBlock(),e.createElementBlock("span",ei,"…"))],64))),128))]),e.createElementVNode("button",{type:"button",class:"shifl-grid__pagination-button",disabled:Je.value||d.loading,onClick:gi,"aria-label":"Next page"}," › ",8,ti)])])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(x).rowIndex!==null&&e.unref(x).position?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"actionMenuRef",ref:We,class:"shifl-grid__action-menu",style:e.normalizeStyle(`
53
+ </html>`;const f=r.endsWith(".xlsx")?r:`${r}.xlsx`;Ot(u,f,"application/vnd.ms-excel")}function zt(l){const r=document.createElement("div");return r.textContent=l,r.innerHTML}function Pn(l){const{exportType:r,fileName:i,data:a}=l;if(!a.rows||a.rows.length===0){console.warn("No data to export");return}switch(r){case"csv":Rt(a,i);break;case"excel":case"xlsx":Fn(a,i);break;default:Rt(a,i);break}}function On(l,r,i,a){return{rows:[...l],columns:[...r],sort:i,filters:a}}function Ht(l){const r=[];return(!l.exportFileName||l.exportFileName.trim()==="")&&r.push("Export file name is required"),l.exportType?["csv","excel","xlsx"].includes(l.exportType)||r.push("Invalid export type. Must be csv, excel, or xlsx"):r.push("Export type is required"),l.source?["client","server"].includes(l.source)||r.push("Invalid export source. Must be client or server"):r.push("Export source is required"),{isValid:r.length===0,errors:r}}const Rn={shipment:[{key:"eta",label:"ETA",type:"date",defaultOperator:"between",placeholder:"Select ETA range"},{key:"etd",label:"ETD",type:"date",defaultOperator:"between",placeholder:"Select ETD range"},{key:"type",label:"Type",type:"select",defaultOperator:"=",placeholder:"Select type",config:{select:{multiple:!1}},options:[{label:"FCL",value:"FCL"},{label:"LCL",value:"LCL"},{label:"Air",value:"Air"}]},{key:"supplier_id",label:"Supplier",type:"select",defaultOperator:"in",placeholder:"Select suppliers",config:{select:{multiple:!0}},options:[]},{key:"status",label:"Status",type:"select",defaultOperator:"in",placeholder:"Select status",config:{select:{multiple:!0}},options:[{label:"Pending",value:"pending"},{label:"Confirmed",value:"confirmed"},{label:"In Transit",value:"in_transit"},{label:"Delivered",value:"delivered"},{label:"Cancelled",value:"cancelled"}]},{key:"origin",label:"Origin",type:"select",defaultOperator:"=",placeholder:"Select origin",config:{select:{multiple:!1}},options:[]},{key:"destination",label:"Destination",type:"select",defaultOperator:"=",placeholder:"Select destination",config:{select:{multiple:!1}},options:[]}]},zn={width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Hn=["fill"],It=e.defineComponent({__name:"ChevronRightIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",zn,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292892C0.683418 -0.0976301 1.31643 -0.0976314 1.70696 0.292892L6.70696 5.29289C7.0974 5.68342 7.09745 6.31646 6.70696 6.70695L1.70696 11.707C1.31646 12.0975 0.683424 12.0974 0.292893 11.707C-0.0976311 11.3164 -0.0976311 10.6834 0.292893 10.2929L4.58586 5.99992L0.292893 1.70695C-0.0976311 1.31643 -0.0976311 0.683417 0.292893 0.292892Z",fill:l.color},null,8,Hn)]))}}),oe=(l,r)=>{const i=l.__vccOpts||l;for(const[a,d]of r)i[a]=d;return i},In={},Zn={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jn(l,r){return e.openBlock(),e.createElementBlock("svg",Zn,[...r[0]||(r[0]=[e.createStaticVNode('<path d="M5.33333 4.00016C6.06971 4.00016 6.66667 3.40321 6.66667 2.66683C6.66667 1.93045 6.06971 1.3335 5.33333 1.3335C4.59695 1.3335 4 1.93045 4 2.66683C4 3.40321 4.59695 4.00016 5.33333 4.00016Z" fill="#9CA5B4"></path><path d="M5.33333 9.33317C6.06971 9.33317 6.66667 8.73622 6.66667 7.99984C6.66667 7.26346 6.06971 6.6665 5.33333 6.6665C4.59695 6.6665 4 7.26346 4 7.99984C4 8.73622 4.59695 9.33317 5.33333 9.33317Z" fill="#9CA5B4"></path><path d="M5.33333 14.6667C6.06971 14.6667 6.66667 14.0697 6.66667 13.3333C6.66667 12.597 6.06971 12 5.33333 12C4.59695 12 4 12.597 4 13.3333C4 14.0697 4.59695 14.6667 5.33333 14.6667Z" fill="#9CA5B4"></path><path d="M10.6668 4.00016C11.4032 4.00016 12.0002 3.40321 12.0002 2.66683C12.0002 1.93045 11.4032 1.3335 10.6668 1.3335C9.93045 1.3335 9.3335 1.93045 9.3335 2.66683C9.3335 3.40321 9.93045 4.00016 10.6668 4.00016Z" fill="#9CA5B4"></path><path d="M10.6668 9.33317C11.4032 9.33317 12.0002 8.73622 12.0002 7.99984C12.0002 7.26346 11.4032 6.6665 10.6668 6.6665C9.93045 6.6665 9.3335 7.26346 9.3335 7.99984C9.3335 8.73622 9.93045 9.33317 10.6668 9.33317Z" fill="#9CA5B4"></path><path d="M10.6668 14.6667C11.4032 14.6667 12.0002 14.0697 12.0002 13.3333C12.0002 12.597 11.4032 12 10.6668 12C9.93045 12 9.3335 12.597 9.3335 13.3333C9.3335 14.0697 9.93045 14.6667 10.6668 14.6667Z" fill="#9CA5B4"></path>',6)])])}const qn=oe(In,[["render",jn]]),Wn={class:"shifl-column-manager__header"},Gn={class:"shifl-column-manager__title-wrapper"},Kn={class:"shifl-column-manager__title"},Un={key:0},Yn={key:0,class:"shifl-column-manager__context"},Jn={class:"shifl-column-manager__controls"},Qn={class:"shifl-column-manager__controls-left"},Xn=["disabled"],eo={class:"shifl-column-manager__content"},to={class:"shifl-column-manager__list"},no=["data-key","draggable","onDragover","onDragstart"],oo=["aria-label","disabled"],lo=["checked","disabled","onChange"],ao={class:"shifl-column-manager__label-text"},ro={class:"shifl-column-manager__footer"},io=["disabled"],so=oe(e.defineComponent({__name:"GridColumnManager",props:{titlePrefix:{},columns:{},isNewViewMode:{type:Boolean},savedViewConfig:{},defaultColumns:{}},emits:["close","apply","toggle","move","toggleFreeze","reset"],setup(l,{emit:r}){const i=l,a=e.computed(()=>(m.value.length>0?m.value:i.columns.map(B=>B.key)).map(B=>i.columns.find(x=>x.key===B)).filter(B=>B!==void 0).map(B=>({...B,visible:h.value[B.key]??B.visible,draggable:!(i.isNewViewMode&&B.freeze)&&!B.protected}))),d=e.computed(()=>i.columns.filter(V=>!V.freeze).map(V=>V.key)),u=e.computed(()=>d.value.every(V=>h.value[V]===!0)),f=e.computed(()=>u.value),C=e.computed(()=>{if(!p.value||!y.value)return!1;const V=JSON.stringify(h.value),O=JSON.stringify(y.value.changes),B=JSON.stringify(m.value),x=JSON.stringify(y.value.order),k=B!==x,E=V!==O;return k?!0:i.isNewViewMode?d.value.some(X=>h.value[X]===!0)||E:(w.value,E)}),h=e.ref({}),m=e.ref([]),y=e.ref(null),p=e.ref(!1),w=e.computed(()=>!i.isNewViewMode&&i.savedViewConfig!=null),N=()=>{if(h.value={},m.value=i.columns.map(V=>V.key),i.columns.forEach(V=>{if(i.isNewViewMode)V.visible===!1?h.value[V.key]=!1:h.value[V.key]=!0;else if(w.value&&i.savedViewConfig){const O=i.savedViewConfig.columns.find(B=>B.key===V.key);h.value[V.key]=(O==null?void 0:O.visible)??V.visible}else h.value[V.key]=V.visible}),w.value&&i.savedViewConfig){const V=i.savedViewConfig.columns.map(x=>x.key),O=V.filter(x=>i.columns.some(k=>k.key===x)),B=i.columns.map(x=>x.key).filter(x=>!V.includes(x));m.value=[...O,...B]}else m.value=i.columns.map(V=>V.key);y.value={changes:{...h.value},order:[...m.value]}};e.watch([()=>i.isNewViewMode,()=>i.savedViewConfig,()=>i.columns.length],()=>{N(),p.value=!0},{immediate:!0});const A=(V,O)=>{const B=O.target;h.value[V]=B.checked},L=()=>{Object.entries(h.value).forEach(([B,x])=>{const k=i.columns.find($=>$.key===B);(k&&k.visible===!1&&x===!0||k&&k.visible!==x)&&v("toggle",B)});const V=i.columns.map(B=>B.key),O=m.value;if(JSON.stringify(V)!==JSON.stringify(O)){let B=[...V];for(let x=0;x<O.length;x++){const k=O[x],E=B.indexOf(k);if(E!==-1&&E!==x){v("move",E,x);const[$]=B.splice(E,1);B.splice(x,0,$)}}}v("apply")},b=()=>{Object.keys(h.value).forEach(V=>{h.value[V]=!0})},T=()=>{Object.keys(h.value).forEach(V=>{const O=i.columns.find(B=>B.key===V);O&&!O.freeze&&(h.value[V]=!1)})},D=()=>{if(y.value)if(i.isNewViewMode)h.value={...y.value.changes},m.value=[...y.value.order];else if(w.value&&i.savedViewConfig){const V=i.savedViewConfig.columns.map(x=>x.key);i.columns.forEach(x=>{var E;const k=(E=i.savedViewConfig)==null?void 0:E.columns.find($=>$.key===x.key);h.value[x.key]=(k==null?void 0:k.visible)??x.visible});const O=V.filter(x=>i.columns.some(k=>k.key===x)),B=i.columns.map(x=>x.key).filter(x=>!V.includes(x));m.value=[...O,...B]}else i.defaultColumns&&i.defaultColumns.length>0?(i.defaultColumns.forEach(V=>{h.value[V.key]=V.visible!==!1}),m.value=i.defaultColumns.map(V=>V.key)):(h.value={...y.value.changes},m.value=[...y.value.order])},R=()=>{v("close")},v=r,I=new Map,Z=e.ref(null),j=e.ref(null),Y=e.ref(!1),ee=e.ref(!1);function W(V,O){var E;const B=a.value[O];if(!(B!=null&&B.draggable)||B!=null&&B.freeze||B!=null&&B.protected){V.preventDefault();return}Z.value=O,Y.value=!0,(E=V.dataTransfer)==null||E.setData("text/plain",B.key),V.dataTransfer.effectAllowed="move";const x=document.createElement("div");x.style.cssText=`
54
+ position: fixed;
55
+ top: -9999px;
56
+ left: -9999px;
57
+ display: inline-flex;
58
+ align-items: center;
59
+ gap: 12px;
60
+ padding: 0 12px;
61
+ height: 44px;
62
+ background: #ffffff;
63
+ border: 1px solid rgba(0,0,0,0.08);
64
+ border-radius: 4px;
65
+ box-shadow: 0px 8px 24px -4px rgba(18,27,43,0.16), 0px 2px 8px -1px rgba(18,27,43,0.10);
66
+ font-family: inherit;
67
+ font-size: 13px;
68
+ color: #253041;
69
+ white-space: nowrap;
70
+ pointer-events: none;
71
+ z-index: 9999;
72
+ min-width: 230px;
73
+ `;const k=V.currentTarget;x.innerHTML=k.innerHTML,document.body.appendChild(x),V.dataTransfer.setDragImage(x,20,22),requestAnimationFrame(()=>{document.body.removeChild(x),J()})}let M=0;function P(V,O){if(O.preventDefault(),Z.value===null||Z.value===V)return;const B=a.value.filter($=>$.freeze).length;if(V<B)return;j.value=V;const x=performance.now();if(x-M<40)return;M=x;const k=Z.value,E=V;F(k,E),Z.value=E}function U(){Z.value=null,j.value=null,Y.value=!1}function J(){I.clear(),document.querySelectorAll(".shifl-column-manager__item").forEach(V=>{const O=V.dataset.key;O&&I.set(O,V.getBoundingClientRect())})}function F(V,O){const B=[...m.value],[x]=B.splice(V,1);B.splice(O,0,x),m.value=B,requestAnimationFrame(()=>{G()})}function G(){if(ee.value)return;ee.value=!0;const V=document.querySelectorAll(".shifl-column-manager__item");let O=!1;V.forEach(B=>{const x=B.dataset.key;if(!x)return;const k=I.get(x),E=B.getBoundingClientRect();if(!k)return;const $=k.left-E.left,X=k.top-E.top;$===0&&X===0||(O=!0,B.style.transition="none",B.style.transform=`translate(${$}px, ${X}px)`,requestAnimationFrame(()=>{B.style.transition="transform 260ms cubic-bezier(0.22, 1, 0.36, 1)",B.style.transform=""}))}),O?setTimeout(()=>{ee.value=!1},280):ee.value=!1}function le(){Y.value=!1,Z.value=null,j.value=null}return(V,O)=>(e.openBlock(),e.createElementBlock("div",{class:"shifl-column-manager__backdrop",onClick:O[2]||(O[2]=e.withModifiers(B=>V.$emit("close"),["self"]))},[e.createElementVNode("div",{class:"shifl-column-manager__dialog",role:"dialog","aria-modal":"true",onClick:O[1]||(O[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("header",Wn,[e.createElementVNode("div",Gn,[e.createElementVNode("h2",Kn,[l.titlePrefix?(e.openBlock(),e.createElementBlock("span",Un,e.toDisplayString(l.titlePrefix),1)):e.createCommentVNode("",!0),l.titlePrefix?(e.openBlock(),e.createBlock(It,{key:1,color:"#253041"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(l.isNewViewMode?"Select Columns":"Edit Columns"),1)])]),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__close",onClick:O[0]||(O[0]=B=>V.$emit("close"))},[...O[3]||(O[3]=[e.createElementVNode("span",null,"✕",-1)])])]),l.isNewViewMode?(e.openBlock(),e.createElementBlock("div",Yn," Choose the relevant columns and set their order. On the next screen, you can add filters and save this view for future access. ")):e.createCommentVNode("",!0),e.createElementVNode("div",Jn,[e.createElementVNode("div",Qn,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-column-manager__link-button shifl-column-manager__link-button--primary",{"shifl-column-manager__link-button--disabled":f.value}]),disabled:f.value,onClick:b}," Select All ",10,Xn),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__link-button",onClick:T}," Deselect All ")]),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__link-button shifl-column-manager__link-button--primary",onClick:D}," Restore Default ")]),e.createElementVNode("div",eo,[e.createElementVNode("ul",to,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(B,x)=>(e.openBlock(),e.createElementBlock("li",{key:B.key,"data-key":B.key,class:e.normalizeClass(["shifl-column-manager__item",{"shifl-column-manager__item--disabled":B.freeze||B.protected,"shifl-column-manager__item--dragging":Y.value&&Z.value===x,"shifl-column-manager__item--drag-over":Y.value&&j.value===x&&Z.value!==x}]),draggable:B.draggable,onDragover:e.withModifiers(k=>P(x,k),["prevent"]),onDragstart:k=>W(k,x),onDragend:le,onDrop:U},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-column-manager__drag-handle",{"shifl-column-manager__drag-handle--disabled":B.freeze||B.protected||!B.draggable}]),"aria-label":`Move ${B.label}`,disabled:B.freeze||B.protected||!B.draggable},[e.createVNode(qn)],10,oo),e.createElementVNode("label",{class:e.normalizeClass(["shifl-column-manager__checkbox-label",{"shifl-column-manager__checkbox-label--disabled":B.freeze||B.protected||i.isNewViewMode&&B.freeze}])},[e.createElementVNode("input",{type:"checkbox",class:"shifl-column-manager__checkbox",checked:h.value[B.key]??B.visible,disabled:B.freeze||B.protected||i.isNewViewMode&&B.freeze,onChange:k=>A(B.key,k)},null,40,lo),O[4]||(O[4]=e.createElementVNode("span",{class:"shifl-column-manager__checkbox-custom"},null,-1)),e.createElementVNode("span",ao,e.toDisplayString(B.label),1)],2)],42,no))),128))])]),e.createElementVNode("footer",ro,[e.createElementVNode("button",{type:"button",class:"shifl-column-manager__button shifl-column-manager__button--primary",disabled:!C.value,onClick:L}," Confirm & Next ",8,io),e.createElementVNode("button",{type:"button",class:"shifl-column-manager__button shifl-column-manager__button--secondary",onClick:R}," Cancel ")])])]))}}),[["__scopeId","data-v-a7ced890"]]),co={class:"shifl-grid__tooltip-content"},uo=["innerHTML"],fo=oe(e.defineComponent({__name:"GridTooltip",props:{content:{},visible:{type:Boolean},triggerElement:{},isHtml:{type:Boolean}},setup(l){const r=l,i=e.ref(null),a=e.ref({}),d=e.computed(()=>r.content.includes(`
74
+ `)),u=e.computed(()=>d.value?r.content.split(`
75
+ `).filter(y=>y.trim().length>0):[]),f=e.ref("top"),C=e.ref({});function h(){if(!r.triggerElement||!i.value)return;const y=i.value;a.value={position:"fixed",top:"0px",left:"0px",visibility:"hidden",zIndex:"10000"},y.getBoundingClientRect(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!r.triggerElement||!i.value)return;const p=r.triggerElement.getBoundingClientRect(),w=y.offsetWidth,N=y.offsetHeight,A=window.innerWidth,L=window.innerHeight,b=12;let T=p.right-w,D=p.bottom+8,R=!0;D+N>L-b&&(D=p.top-N-8,R=!1),T<b&&(T=b),T+w>A-b&&(T=A-w-b),a.value={position:"fixed",top:`${D}px`,left:`${T}px`,visibility:"visible",zIndex:"10000"};let I=w-18;const Z=12,j=w-12;I<Z&&(I=Z),I>j&&(I=j),C.value={left:`${I}px`},f.value=R?"top":"bottom"})})}function m(){r.visible&&h()}return e.watch(()=>r.visible,async y=>{y&&(await e.nextTick(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{h()})}))}),e.watch(()=>r.content,async()=>{r.visible&&(await e.nextTick(),requestAnimationFrame(()=>{h()}))}),e.onMounted(()=>{r.visible&&e.nextTick(()=>{requestAnimationFrame(()=>{h()})}),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}),(y,p)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.visible?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltipRef",ref:i,class:"shifl-grid__tooltip",style:e.normalizeStyle(a.value)},[e.createElementVNode("div",{class:e.normalizeClass(["shifl-grid__tooltip-arrow",f.value]),style:e.normalizeStyle(C.value)},null,6),e.createElementVNode("div",co,[l.isHtml?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.content},null,8,uo)):d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u.value,(w,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"shifl-grid__tooltip-line"},e.toDisplayString(w),1))),128)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(l.content),1)],64))])],4)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-79fb386f"]]),mo={},po={width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"shifl-smart-tracking-icon"};function go(l,r){return e.openBlock(),e.createElementBlock("svg",po,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M1.03223 9.27441C1.22778 9.27445 1.40954 9.32951 1.57812 9.43066L3.86523 10.8594C4.1957 11.0618 4.3916 11.4202 4.3916 11.8047C4.39151 12.189 4.19562 12.5467 3.86523 12.749L1.57812 14.1797C1.41642 14.2806 1.22754 14.334 1.03223 14.334V14.3408C0.465713 14.3408 0.000165713 13.8751 0 13.3086V10.3066C0.000236867 9.74022 0.465756 9.27443 1.03223 9.27441ZM1.01172 13.3018L3.3252 11.8916C3.32796 11.8884 3.3728 11.8374 3.37305 11.8047C3.37305 11.771 3.35218 11.737 3.3252 11.7168L1.03906 10.2871L1.01172 13.3018ZM6.07129 3.37305C6.35041 3.37318 6.5771 3.59977 6.57715 3.87891C6.57715 4.15809 6.35044 4.38463 6.07129 4.38477H5.05957C4.03708 4.38477 3.20433 5.06537 3.2041 5.90234C3.2041 6.73947 4.03694 7.4209 5.05957 7.4209H7.08301C8.66344 7.42096 9.95019 8.55525 9.9502 9.9502C9.95009 11.3451 8.66338 12.4794 7.08301 12.4795H6.07129C5.79202 12.4795 5.56543 12.2529 5.56543 11.9736C5.56548 11.6944 5.79205 11.4678 6.07129 11.4678H7.08301C8.10552 11.4677 8.93739 10.7872 8.9375 9.9502C8.93749 9.11311 8.10558 8.43267 7.08301 8.43262H5.05957C3.47908 8.43262 2.19238 7.29733 2.19238 5.90234C2.19259 4.50751 3.4792 3.37305 5.05957 3.37305H6.07129ZM10.7939 0C12.0694 0.000131868 13.2591 0.779675 13.7549 1.94043C14.6093 3.9666 13.0453 5.42741 11.9033 6.49316L11.8818 6.51367C11.7964 6.59308 11.711 6.67193 11.6289 6.75C11.4057 6.96444 11.1095 7.08195 10.7939 7.08203C10.4783 7.08203 10.1803 6.9642 9.95703 6.74902C9.86266 6.65937 9.76511 6.56666 9.66602 6.47363L9.66016 6.46875C8.53029 5.40836 6.98418 3.95585 7.83203 1.94238C8.32854 0.77953 9.51841 6.29203e-06 10.7939 0ZM10.7939 1.01172C9.91775 1.01173 9.10234 1.54537 8.76367 2.33789C8.22961 3.60525 9.04604 4.50453 10.3525 5.73145L10.4229 5.79688C10.5024 5.87104 10.5804 5.94604 10.6572 6.01953C10.7267 6.08617 10.861 6.08446 10.9277 6.02051L10.9307 6.01758C11.0223 5.93066 11.1172 5.84284 11.2129 5.75391C12.5356 4.51951 13.3612 3.61352 12.8223 2.33594C12.4849 1.54493 11.6691 1.0127 10.793 1.0127L10.7939 1.01172ZM10.7998 2.53027C11.1719 2.53041 11.4734 2.83199 11.4736 3.2041C11.4736 3.57637 11.172 3.87877 10.7998 3.87891C10.4275 3.87882 10.1221 3.57641 10.1221 3.2041C10.1223 2.8319 10.4207 2.53027 10.793 2.53027H10.7998Z",fill:"#05963F"},null,-1)])])}const ho=oe(mo,[["render",go]]),yo={name:"SortAscendingIcon",props:{color:{type:String,default:"#1A6D9E"}}},ko={width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Co=["fill"];function _o(l,r,i,a,d,u){return e.openBlock(),e.createElementBlock("svg",ko,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:i.color,d:"M0 0.666667C0 0.298477 0.314186 2.98023e-08 0.701754 2.98023e-08H4.2807C4.66827 2.98023e-08 4.98246 0.298477 4.98246 0.666667C4.98246 1.03486 4.66827 1.33333 4.2807 1.33333H0.701754C0.314186 1.33333 0 1.03486 0 0.666667ZM10.0301 0.195262C10.3042 -0.0650874 10.7485 -0.0650874 11.0225 0.195262L13.1278 2.19526C13.4018 2.45561 13.4018 2.87772 13.1278 3.13807C12.8537 3.39842 12.4094 3.39842 12.1354 3.13807L11.2281 2.27614V8.66667C11.2281 9.03486 10.9139 9.33333 10.5263 9.33333C10.1387 9.33333 9.82456 9.03486 9.82456 8.66667V2.27614L8.91727 3.13807C8.64322 3.39842 8.19889 3.39842 7.92484 3.13807C7.65079 2.87772 7.65079 2.45561 7.92484 2.19526L10.0301 0.195262ZM0 4.66667C0 4.29848 0.314186 4 0.701754 4H5.61404C6.0016 4 6.31579 4.29848 6.31579 4.66667C6.31579 5.03486 6.0016 5.33333 5.61404 5.33333H0.701754C0.314186 5.33333 0 5.03486 0 4.66667ZM0 8.66667C0 8.29848 0.314186 8 0.701754 8H7.01754C7.40511 8 7.7193 8.29848 7.7193 8.66667C7.7193 9.03486 7.40511 9.33333 7.01754 9.33333H0.701754C0.314186 9.33333 0 9.03486 0 8.66667Z"},null,8,Co)])}const Zt=oe(yo,[["render",_o]]),bo={},wo={width:"14",height:"10",viewBox:"0 0 14 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Vo(l,r){return e.openBlock(),e.createElementBlock("svg",wo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M4.28125 8C4.66872 8.00011 4.98242 8.29887 4.98242 8.66699C4.98242 9.03511 4.66872 9.33387 4.28125 9.33398H0.702148C0.314581 9.33398 8.1338e-07 9.03518 0 8.66699C0 8.2988 0.31458 8 0.702148 8H4.28125ZM10.5264 0C10.9139 0 11.2285 0.298802 11.2285 0.666992V7.05762L12.1357 6.19531C12.4097 5.93519 12.8539 5.93524 13.1279 6.19531C13.402 6.45566 13.402 6.87832 13.1279 7.13867L11.0225 9.13867C10.7484 9.39867 10.3042 9.39886 10.0303 9.13867L7.9248 7.13867C7.65082 6.87834 7.65082 6.45565 7.9248 6.19531C8.19886 5.93496 8.64392 5.93496 8.91797 6.19531L9.8252 7.05762V0.666992C9.8252 0.298891 10.1389 0.000143144 10.5264 0ZM5.61426 4C6.00183 4 6.31641 4.2988 6.31641 4.66699C6.31641 5.03518 6.00183 5.33398 5.61426 5.33398H0.702148C0.314581 5.33398 6.77817e-07 5.03518 0 4.66699C0 4.2988 0.31458 4 0.702148 4H5.61426ZM7.01758 0C7.40515 0 7.71973 0.298802 7.71973 0.666992C7.71973 1.03518 7.40515 1.33398 7.01758 1.33398H0.702148C0.31458 1.33398 5.42254e-07 1.03518 0 0.666992C0 0.298802 0.31458 0 0.702148 0H7.01758Z",fill:"#1A6D9E"},null,-1)])])}const Bo=oe(bo,[["render",Vo]]),Eo={},So={width:"21",height:"13",viewBox:"0 0 21 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mo(l,r){return e.openBlock(),e.createElementBlock("svg",So,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M19.6426 4.61523C19.9311 4.61524 20.1317 4.90139 20.0342 5.17285L17.499 12.2246C17.4395 12.3899 17.2821 12.5 17.1064 12.5H1.5459C1.35628 12.5 1.19044 12.3719 1.14258 12.1885L0.0136719 7.83887C-0.0548101 7.575 0.14438 7.31738 0.416992 7.31738H12.6016L14.71 4.61523H19.6426ZM3.51465 8.82324C3.11322 8.82324 2.78728 9.15265 2.78711 9.55859C2.78711 9.96468 3.11312 10.2939 3.51465 10.2939C3.9161 10.2938 4.24121 9.96462 4.24121 9.55859C4.24104 9.15271 3.91599 8.82334 3.51465 8.82324ZM7.87695 8.82324C7.47553 8.82324 7.14958 9.15265 7.14941 9.55859C7.14941 9.96468 7.47542 10.2939 7.87695 10.2939C8.27846 10.2939 8.60352 9.96466 8.60352 9.55859C8.60335 9.15267 8.27835 8.82327 7.87695 8.82324ZM12.2393 8.82324C11.8378 8.82324 11.5119 9.15265 11.5117 9.55859C11.5117 9.96468 11.8377 10.2939 12.2393 10.2939C12.6407 10.2938 12.9658 9.96458 12.9658 9.55859C12.9657 9.15275 12.6405 8.82341 12.2393 8.82324ZM10.3291 3.67676C10.5591 3.67679 10.7459 3.86283 10.7461 4.09277V5.46582C10.746 5.69585 10.5591 5.88278 10.3291 5.88281H1.75C1.51993 5.88281 1.33309 5.69587 1.33301 5.46582V4.09277C1.3332 3.86282 1.52 3.67676 1.75 3.67676H10.3291ZM8.91406 0C9.14418 0 9.33105 0.186874 9.33105 0.416992V1.78906C9.33105 2.01918 9.14418 2.20605 8.91406 2.20605H3.2041C2.97398 2.20605 2.78711 2.01918 2.78711 1.78906V0.416992C2.78711 0.186874 2.97398 1.52829e-06 3.2041 0H8.91406Z",fill:"#69758C"},null,-1)])])}const jt=oe(Eo,[["render",Mo]]),Do={},No={width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vo(l,r){return e.openBlock(),e.createElementBlock("svg",No,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M5.42553 0C5.58189 0.00192429 5.73535 0.043682 5.87279 0.120117C6.01022 0.196567 6.12781 0.306144 6.21459 0.439453L9.22631 5.26562L12.0212 4.98438C12.3226 4.95527 12.6267 4.99067 12.9138 5.08887C13.201 5.18709 13.4653 5.34586 13.6892 5.55469C13.9131 5.76351 14.0922 6.01802 14.2146 6.30176C14.337 6.58554 14.4001 6.89286 14.4001 7.20312C14.4001 7.51317 14.3369 7.81992 14.2146 8.10352C14.0922 8.38716 13.913 8.64181 13.6892 8.85059C13.4653 9.05938 13.201 9.21818 12.9138 9.31641C12.6267 9.41461 12.3226 9.45001 12.0212 9.4209L9.22631 9.1748L6.20971 13.9619C6.12292 14.0952 6.00534 14.2048 5.86791 14.2812C5.7305 14.3576 5.57696 14.3985 5.42064 14.4004H4.45873C4.31062 14.3953 4.16539 14.3552 4.0349 14.2832C3.90429 14.2111 3.79151 14.1085 3.7058 13.9844C3.62009 13.8603 3.56371 13.7176 3.54076 13.5674C3.51782 13.4172 3.5284 13.2632 3.57299 13.1182L5.10326 8.73145L2.37084 8.45508C0.648588 10.22 -0.150004 9.58381 0.0231828 8.9873C0.677387 6.74942 0.677426 7.65604 0.0231828 5.41797C-0.14495 4.83137 0.648862 4.18148 2.37572 5.96094L5.10814 5.68457L3.57299 1.28711C3.52744 1.14153 3.5161 0.987038 3.53881 0.835938C3.56158 0.684721 3.61848 0.540845 3.70482 0.416016C3.79115 0.291217 3.90422 0.18831 4.03588 0.116211C4.16757 0.044106 4.31436 0.00416693 4.46361 0H5.42553Z",fill:"#69758C"},null,-1)])])}const xo=oe(Do,[["render",vo]]),To={},$o={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lo(l,r){return e.openBlock(),e.createElementBlock("svg",$o,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M6.66699 0C10.3489 9.66369e-08 13.334 2.98509 13.334 6.66699C13.334 10.3489 10.3489 13.334 6.66699 13.334C2.98509 13.334 0 10.3489 0 6.66699C1.28849e-07 2.98509 2.98509 0 6.66699 0ZM6.65137 7.75195C4.80676 7.75195 3.30417 9.21841 3.24707 11.0488C3.24495 11.1167 3.22812 11.181 3.2002 11.2383C4.16313 11.9697 5.36451 12.4033 6.66699 12.4033C7.96843 12.4033 9.16832 11.9696 10.1309 11.2393C10.0853 11.1711 10.0577 11.0899 10.0537 11.002C9.97262 9.19348 8.48018 7.75209 6.65137 7.75195ZM6.66699 0.930664C3.49885 0.930664 0.930664 3.49885 0.930664 6.66699C0.930664 8.12457 1.47456 9.45485 2.37012 10.4668C2.60929 8.97274 3.61177 7.73387 4.96484 7.16211C4.34363 6.66629 3.94543 5.90254 3.94531 5.0459C3.94531 3.55114 5.15713 2.33984 6.65137 2.33984C8.14579 2.34005 9.35742 3.55121 9.35742 5.0459C9.35731 5.90256 8.95917 6.6663 8.33789 7.16211C9.70006 7.73773 10.7071 8.9894 10.9375 10.4971C11.8489 9.48149 12.4033 8.13901 12.4033 6.66699C12.4033 3.49885 9.83514 0.930664 6.66699 0.930664ZM6.65137 3.26953C5.67077 3.26953 4.875 4.065 4.875 5.0459C4.8752 6.02674 5.671 6.82129 6.65137 6.82129C7.63203 6.82109 8.42656 6.02656 8.42676 5.0459C8.42676 4.06518 7.63226 3.26973 6.65137 3.26953Z",fill:"#3D485C"},null,-1)])])}const qt=oe(To,[["render",Lo]]),Ao={},Fo={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Po(l,r){return e.openBlock(),e.createElementBlock("svg",Fo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M7.99976 0.799561C11.9761 0.799561 15.1998 4.0234 15.2 7.99976C15.2 11.9762 11.9762 15.2 7.99976 15.2C4.0234 15.1998 0.799561 11.9761 0.799561 7.99976C0.799666 4.02346 4.02346 0.799666 7.99976 0.799561ZM7.99976 1.87964C4.61984 1.87974 1.87974 4.61984 1.87964 7.99976C1.87964 11.3798 4.61977 14.1198 7.99976 14.1199C11.3798 14.1199 14.1199 11.3798 14.1199 7.99976C14.1198 4.61977 11.3798 1.87964 7.99976 1.87964ZM7.9978 6.91968C8.27087 6.91973 8.49698 7.12223 8.53296 7.3855L8.53784 7.45874L8.53979 11.4197C8.5399 11.7178 8.29882 11.9595 8.00073 11.9597C7.72754 11.9599 7.50169 11.7572 7.46558 11.4939L7.46069 11.4207L7.45776 7.45972C7.45757 7.16153 7.69962 6.91987 7.9978 6.91968ZM8.00073 4.40112C8.39742 4.40137 8.71923 4.72319 8.71948 5.11987C8.71948 5.51677 8.39757 5.83935 8.00073 5.8396C7.60368 5.8396 7.28101 5.51692 7.28101 5.11987C7.28126 4.72304 7.60384 4.40112 8.00073 4.40112Z",fill:"#69758C"},null,-1)])])}const Oo=oe(Ao,[["render",Po]]),Ro={},zo={width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ho(l,r){return e.openBlock(),e.createElementBlock("svg",zo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M6.00044 6.12787L6 15.75C6 17.7382 7.5473 19.3651 9.50344 19.492L9.75 19.5L16.3716 19.5011C16.0624 20.3744 15.2293 21 14.25 21H9C6.51472 21 4.5 18.9853 4.5 16.5V8.25C4.5 7.27017 5.12631 6.43663 6.00044 6.12787ZM17.25 3C18.4926 3 19.5 4.00736 19.5 5.25V15.75C19.5 16.9926 18.4926 18 17.25 18H9.75C8.50736 18 7.5 16.9926 7.5 15.75V5.25C7.5 4.00736 8.50736 3 9.75 3H17.25ZM17.25 4.5H9.75C9.33579 4.5 9 4.83579 9 5.25V15.75C9 16.1642 9.33579 16.5 9.75 16.5H17.25C17.6642 16.5 18 16.1642 18 15.75V5.25C18 4.83579 17.6642 4.5 17.25 4.5Z",fill:"#1A6D9E"},null,-1)])])}const Io=oe(Ro,[["render",Ho]]),Zo={},jo={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qo(l,r){return e.openBlock(),e.createElementBlock("svg",jo,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.00098 0.666992C12.0511 0.666992 15.334 3.94991 15.334 8C15.334 12.0501 12.0511 15.333 8.00098 15.333C3.95089 15.333 0.667969 12.0501 0.667969 8C0.667969 3.94991 3.95089 0.666992 8.00098 0.666992ZM8.00098 1.7666C4.5584 1.7666 1.76758 4.55743 1.76758 8C1.76758 11.4426 4.5584 14.2334 8.00098 14.2334C11.4436 14.2334 14.2344 11.4426 14.2344 8C14.2344 4.55743 11.4436 1.7666 8.00098 1.7666ZM10.3623 5.77734C10.577 5.56299 10.9249 5.56299 11.1396 5.77734C11.3349 5.97261 11.3531 6.27883 11.1934 6.49414L11.1396 6.55566L7.47363 10.2227C7.27837 10.4179 6.97215 10.4352 6.75684 10.2754L6.69531 10.2227L4.8623 8.38867C4.64752 8.17388 4.64752 7.82612 4.8623 7.61133C5.05752 7.41611 5.36282 7.39798 5.57812 7.55762L5.63965 7.61133L7.08398 9.05566L10.3623 5.77734Z",fill:"#10BC55"},null,-1)])])}const Wo=oe(Zo,[["render",qo]]),Go={},Ko={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Uo(l,r){return e.openBlock(),e.createElementBlock("svg",Ko,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.00098 0.666992C12.0511 0.666993 15.334 3.94991 15.334 8C15.334 12.0501 12.0511 15.333 8.00098 15.333C3.95089 15.333 0.667969 12.0501 0.667969 8C0.667969 3.94991 3.95089 0.666992 8.00098 0.666992ZM8.00098 1.66699C4.50317 1.66699 1.66797 4.5022 1.66797 8C1.66797 11.4978 4.50317 14.333 8.00098 14.333C11.4988 14.333 14.334 11.4978 14.334 8C14.334 4.5022 11.4988 1.66699 8.00098 1.66699ZM9.5293 5.52832C9.78965 5.26797 10.2123 5.26797 10.4727 5.52832C10.733 5.78867 10.733 6.21133 10.4727 6.47168L8.94336 8L10.4727 9.52832C10.733 9.78867 10.733 10.2113 10.4727 10.4717C10.2123 10.732 9.78965 10.732 9.5293 10.4717L8.00098 8.94238L6.47266 10.4717C6.21231 10.732 5.78965 10.732 5.5293 10.4717C5.26895 10.2113 5.26895 9.78867 5.5293 9.52832L7.05859 8L5.5293 6.47168C5.26895 6.21133 5.26895 5.78867 5.5293 5.52832C5.78965 5.26797 6.21231 5.26797 6.47266 5.52832L8.00098 7.05762L9.5293 5.52832Z",fill:"#EF4444"},null,-1)])])}const Yo=oe(Go,[["render",Uo]]),Jo={width:"9",height:"11",viewBox:"0 0 9 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qo=["fill"],Xo=e.defineComponent({__name:"ExportIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Jo,[e.createElementVNode("path",{d:"M7.89355 9.78711C8.17317 9.78711 8.40039 10.0134 8.40039 10.293C8.40039 10.5493 8.20906 10.7614 7.96191 10.7949L7.89355 10.7988H0.505859C0.226345 10.7987 0 10.5726 0 10.293C1.00773e-06 10.0367 0.190375 9.82457 0.4375 9.79102L0.505859 9.78711H7.89355ZM4.22559 0C4.48191 0 4.69399 0.190367 4.72754 0.4375L4.73242 0.505859L4.73145 7.38672L6.73438 5.38184C6.91401 5.20192 7.19522 5.18515 7.39355 5.33203L7.4502 5.38086C7.63007 5.5604 7.64681 5.84171 7.5 6.04004L7.45117 6.09668L4.58691 8.9668L4.53906 9.00879L4.47754 9.04785L4.45312 9.0625L4.3916 9.08789L4.31055 9.1084L4.26367 9.11426L4.22266 9.11523C4.1889 9.11522 4.15458 9.11156 4.12109 9.10449L4.06641 9.08887C4.00161 9.06794 3.94262 9.03397 3.89258 8.99023L0.99707 6.09766C0.799322 5.90018 0.798882 5.57976 0.996094 5.38184C1.17562 5.20205 1.45697 5.18536 1.65527 5.33203L1.71289 5.38086L3.71973 7.38379V0.505859C3.71976 0.226386 3.94619 0.000201029 4.22559 0Z",fill:l.color},null,8,Qo)]))}}),el={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tl=["fill"],Wt=e.defineComponent({__name:"SearchIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",el,[e.createElementVNode("path",{d:"M4.83333 0C7.50271 0 9.66667 2.16396 9.66667 4.83333C9.66667 5.98791 9.26183 7.04794 8.58636 7.87921L11.8536 11.1464C12.0488 11.3417 12.0488 11.6583 11.8536 11.8536C11.676 12.0311 11.3983 12.0472 11.2025 11.902L11.1464 11.8536L7.87921 8.58636C7.04794 9.26183 5.98791 9.66667 4.83333 9.66667C2.16396 9.66667 0 7.50271 0 4.83333C0 2.16396 2.16396 0 4.83333 0ZM4.83333 1C2.71624 1 1 2.71624 1 4.83333C1 6.95042 2.71624 8.66667 4.83333 8.66667C6.95042 8.66667 8.66667 6.95042 8.66667 4.83333C8.66667 2.71624 6.95042 1 4.83333 1Z",fill:l.color},null,8,tl)]))}}),nl={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ol=["fill"],et=e.defineComponent({__name:"ClearIcon",props:{color:{default:"#253041"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",nl,[e.createElementVNode("path",{d:"M8.21967 0.219669C8.51256 -0.0732234 8.98732 -0.073222 9.28022 0.219669C9.57311 0.512562 9.57311 0.987323 9.28022 1.28022L5.81049 4.74994L9.28022 8.21967C9.57311 8.51256 9.57311 8.98732 9.28022 9.28022C8.98732 9.57311 8.51256 9.57311 8.21967 9.28022L4.74994 5.81049L1.28022 9.28022C0.987322 9.57311 0.512561 9.57311 0.219669 9.28022C-0.0732222 8.98732 -0.0732228 8.51256 0.219669 8.21967L3.6894 4.74994L0.219669 1.28022C-0.0732225 0.987323 -0.0732229 0.512562 0.219669 0.219669C0.512561 -0.0732235 0.987322 -0.0732223 1.28022 0.219669L4.74994 3.6894L8.21967 0.219669Z",fill:l.color},null,8,ol)]))}}),ll={},al={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rl(l,r){return e.openBlock(),e.createElementBlock("svg",al,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M7.3125 0C7.41196 0 7.5078 0.0400254 7.57812 0.110352L9.89062 2.42285C9.96065 2.49313 10 2.58827 10 2.6875V8.46875C10 8.87486 9.83892 9.26459 9.55176 9.55176C9.26459 9.83892 8.87486 10 8.46875 10H1.53125C1.12537 10 0.736336 9.83862 0.449219 9.55176C0.162054 9.26459 0 8.87486 0 8.46875V1.53125C0 1.12514 0.162054 0.736384 0.449219 0.449219C0.736384 0.162054 1.12514 0 1.53125 0H7.3125ZM1.53125 0.75C1.32405 0.75 1.126 0.832979 0.979492 0.979492C0.832979 1.126 0.75 1.32405 0.75 1.53125V8.46875L0.753906 8.5459C0.771652 8.72477 0.851279 8.89327 0.979492 9.02148C1.12596 9.16769 1.32428 9.25 1.53125 9.25H8.46875C8.67595 9.25 8.87497 9.168 9.02148 9.02148C9.168 8.87497 9.25 8.67595 9.25 8.46875V2.84277L7.15723 0.75H6.53125V2.6875C6.53125 2.89461 6.36336 3.0625 6.15625 3.0625H2.6875C2.48039 3.0625 2.3125 2.89461 2.3125 2.6875V0.75H1.53125ZM5 4.625C5.40611 4.625 5.79584 4.78705 6.08301 5.07422C6.36987 5.36134 6.53125 5.75037 6.53125 6.15625C6.53125 6.56236 6.37017 6.95209 6.08301 7.23926C5.79584 7.52642 5.40611 7.6875 5 7.6875C4.59412 7.6875 4.20509 7.52612 3.91797 7.23926C3.6308 6.95209 3.46875 6.56236 3.46875 6.15625C3.46875 5.75014 3.6308 5.36138 3.91797 5.07422C4.20513 4.78705 4.59389 4.625 5 4.625ZM5 5.375C4.7928 5.375 4.59476 5.45798 4.44824 5.60449C4.30173 5.75101 4.21875 5.94905 4.21875 6.15625C4.21875 6.36345 4.30173 6.56247 4.44824 6.70898C4.59471 6.85519 4.79303 6.9375 5 6.9375C5.2072 6.9375 5.40622 6.8555 5.55273 6.70898C5.69925 6.56247 5.78125 6.36345 5.78125 6.15625C5.78125 5.94928 5.69894 5.75096 5.55273 5.60449C5.40622 5.45798 5.2072 5.375 5 5.375ZM3.0625 2.3125H5.78125V0.75H3.0625V2.3125Z",fill:"#1A6D9E"},null,-1)])])}const il=oe(ll,[["render",rl]]),sl={},cl={width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dl(l,r){return e.openBlock(),e.createElementBlock("svg",cl,[...r[0]||(r[0]=[e.createElementVNode("path",{d:"M8.15137 5.92969C8.35847 5.92969 8.52637 6.09758 8.52637 6.30469V6.69336C8.73304 6.75221 8.92443 6.86053 9.08301 7.00977L9.44043 6.80859C9.62086 6.70691 9.84949 6.77074 9.95117 6.95117C10.0525 7.13153 9.98886 7.36033 9.80859 7.46191L9.45996 7.65723C9.48428 7.75715 9.49902 7.86014 9.49902 7.96484C9.49902 8.06926 9.48416 8.17182 9.45996 8.27148L9.80957 8.46875C9.98949 8.57057 10.0536 8.79927 9.95215 8.97949C9.85055 9.15953 9.62168 9.22317 9.44141 9.12207L9.08301 8.91992C8.92441 9.0693 8.73313 9.17644 8.52637 9.23535V9.625C8.52637 9.83211 8.35847 10 8.15137 10C7.9443 9.99995 7.77637 9.83208 7.77637 9.625V9.23535C7.56985 9.17648 7.37918 9.06906 7.2207 8.91992L6.8623 9.12207C6.68203 9.22341 6.45326 9.15953 6.35156 8.97949C6.24994 8.79903 6.31465 8.57037 6.49512 8.46875L6.84277 8.27148C6.81858 8.17183 6.8047 8.06924 6.80469 7.96484C6.80469 7.86019 6.81848 7.75711 6.84277 7.65723L6.49512 7.46191C6.31481 7.36038 6.2503 7.13156 6.35156 6.95117C6.45315 6.77076 6.68187 6.70613 6.8623 6.80762L7.2207 7.00977C7.37925 6.86053 7.56973 6.75223 7.77637 6.69336V6.30469C7.77637 6.09761 7.9443 5.92973 8.15137 5.92969ZM8.15137 0C8.50546 0.000125989 8.84745 0.137785 9.10059 0.384766C9.35386 0.632228 9.49805 0.970403 9.49805 1.32422V4.64453C9.49778 4.85139 9.32996 5.01949 9.12305 5.01953C8.9161 5.01953 8.74831 4.85141 8.74805 4.64453V4.07031H4.15234V8.53906H4.74902C4.95611 8.53908 5.12402 8.70697 5.12402 8.91406C5.1237 9.12088 4.95591 9.28904 4.74902 9.28906H1.34766C0.993547 9.28906 0.651655 9.15118 0.398438 8.9043C0.144882 8.65681 2.71832e-05 8.31885 0 7.96484V1.32422C0 0.970173 0.144858 0.632272 0.398438 0.384766C0.651686 0.137697 0.993407 0 1.34766 0H8.15137ZM0.75 7.96484C0.750027 8.11393 0.811 8.25889 0.921875 8.36719C1.03315 8.47567 1.18655 8.53906 1.34766 8.53906H3.40234V4.07031H0.75V7.96484ZM8.15137 7.3916C7.99029 7.39162 7.83782 7.45404 7.72656 7.5625C7.61565 7.67082 7.55469 7.81571 7.55469 7.96484C7.55471 8.11398 7.61561 8.25888 7.72656 8.36719C7.83782 8.47565 7.99029 8.53904 8.15137 8.53906C8.31256 8.53906 8.46585 8.47578 8.57715 8.36719C8.68796 8.25891 8.749 8.11388 8.74902 7.96484C8.74902 7.81579 8.68796 7.6708 8.57715 7.5625C8.46585 7.45387 8.31259 7.3916 8.15137 7.3916ZM1.34766 0.75C1.18643 0.75 1.03317 0.813245 0.921875 0.921875C0.811011 1.03019 0.75 1.17512 0.75 1.32422V3.32031H3.40234V0.75H1.34766ZM4.15234 3.32031H8.74805V1.32422C8.74805 1.17514 8.68701 1.03018 8.57617 0.921875C8.46499 0.813361 8.31241 0.750127 8.15137 0.75H4.15234V3.32031Z",fill:"#253041"},null,-1)])])}const ul=oe(sl,[["render",dl]]),fl={class:"shifl-grid__empty-state"},ml={class:"shifl-grid__empty-state-icon"},pl={class:"shifl-grid__empty-state-title"},gl={class:"shifl-grid__empty-state-description"},hl=e.defineComponent({__name:"GridEmptyState",props:{iconName:{},title:{},description:{}},setup(l){const a={OceanIcon:jt}[l.iconName]??null;return(d,u)=>(e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",ml,[e.unref(a)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)),{key:0})):e.createCommentVNode("",!0)]),e.createElementVNode("p",pl,e.toDisplayString(l.title),1),e.createElementVNode("p",gl,e.toDisplayString(l.description),1)]))}}),tt={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",select:"Select",cancel:"Cancel",previousMonth:"Previous month",nextMonth:"Next month",weekStart:"Week start",weekEnd:"Week end"};function pe(l,r="MM/dd/yyyy",i=tt){if(!l)return"";const a=l.getDate(),d=l.getMonth(),u=l.getFullYear(),f=i.days[l.getDay()],C=i.daysShort[l.getDay()],h=i.months[d],m=i.monthsShort[d];return r.replace(/dddd/g,f).replace(/ddd/g,C).replace(/MMMM/g,h).replace(/MMM/g,m).replace(/yyyy/g,u.toString()).replace(/yy/g,u.toString().slice(-2)).replace(/y/g,u.toString()).replace(/MM/g,(d+1).toString().padStart(2,"0")).replace(/M/g,(d+1).toString()).replace(/dd/g,a.toString().padStart(2,"0")).replace(/d/g,a.toString())}function yl(l,r){if(!l)return null;try{const i=r.split(/[^A-Za-z]+/),a=l.split(/[^0-9]+/);let d=1,u=0,f=new Date().getFullYear();return i.forEach((C,h)=>{const m=parseInt(a[h]||"0");C.includes("d")?d=m:C.includes("M")?u=m-1:C.includes("y")&&(f=m)}),new Date(f,u,d)}catch{return null}}function yt(l){const r=new Date;return l.toDateString()===r.toDateString()}function kt(l){const r=l.getDay();return r===0||r===6}function ce(l,r){return l.toDateString()===r.toDateString()}function Gt(l,r=0){const i=new Date(l),a=i.getDay(),d=(a<r?7:0)+a-r;return i.setDate(i.getDate()-d),i}function kl(l,r=0){const i=Gt(l,r),a=new Date(i);return a.setDate(a.getDate()+6),a}function Ie(l,r){const i=new Date(l);return i.setMonth(i.getMonth()+r),i}function Kt(l,r=0){const i=l.getFullYear(),a=l.getMonth(),d=new Date(i,a,1),u=new Date(i,a+1,0),f=Gt(d,r),C=kl(u,r),h=[],m=new Date(f);for(;m<=C;){const y=m.getMonth()===a,p={date:new Date(m),text:m.getDate().toString(),current:y,selected:!1,disabled:!1,highlighted:!1,today:yt(m),weekend:kt(m),inRange:!1,rangePosition:null,isCurrentMonth:y,isToday:yt(m),isSelected:!1,isDisabled:!1,isWeekend:kt(m),isInRange:!1};h.push(p),m.setDate(m.getDate()+1)}return h}function Cl(l,r,i,a,d){if(r&&l<r||i&&l>i)return!0;if(d&&d.length>0)return!d.some(u=>ce(l,u));if(a){if(Array.isArray(a))return a.some(u=>ce(l,u));if(typeof a=="function")return a(l)}return!1}function _l(l=0,r=tt){const i=[...r.daysShort],a=l%7;return[...i.slice(a),...i.slice(0,a)]}function bl(l){if(l instanceof Date)return isNaN(l.getTime())?null:l;if(Array.isArray(l))return l.filter(r=>r instanceof Date&&!isNaN(r.getTime()));if(typeof l=="object"&&l!==null){const{start:r,end:i}=l,a={start:r instanceof Date&&!isNaN(r.getTime())?r:null,end:i instanceof Date&&!isNaN(i.getTime())?i:null};return a.start||a.end?a:null}return null}function wl(l,r,i=0){const a=[];for(let d=0;d<r;d++){const u=Ie(l,d);a.push({days:Kt(u,i),month:u.getMonth(),year:u.getFullYear()})}return a}const Vl={width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bl=["fill"],El=e.defineComponent({__name:"ChevronLeftIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Vl,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.29289 0.292892C5.68342 -0.0976302 6.31643 -0.0976314 6.70696 0.292892C7.0974 0.683422 7.09745 1.31646 6.70696 1.70695L2.41399 5.99992L6.70696 10.2929C7.0974 10.6834 7.09745 11.3165 6.70696 11.707C6.31646 12.0975 5.68342 12.0974 5.29289 11.707L0.292893 6.70695C-0.0976311 6.31643 -0.097631 5.68342 0.292893 5.29289L5.29289 0.292892Z",fill:l.color},null,8,Bl)]))}}),Sl={width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ml=["fill"],Ut=e.defineComponent({__name:"ChevronUpIcon",props:{color:{default:"#1A6D9E"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Sl,[e.createElementVNode("path",{d:"M4.49992 0C4.76514 3.15705e-07 5.01942 0.105433 5.20696 0.292969L8.70696 3.79297C9.09748 4.18349 9.09748 4.81651 8.70696 5.20703C8.31643 5.59756 7.68342 5.59755 7.29289 5.20703L4.49992 2.41406L1.70696 5.20703C1.31643 5.59756 0.683417 5.59756 0.292893 5.20703C-0.0976312 4.81651 -0.097631 4.18349 0.292893 3.79297L3.79289 0.292969L3.86614 0.226562C4.04409 0.0807277 4.26783 0 4.49992 0Z",fill:l.color},null,8,Ml)]))}}),Dl={width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Nl=["fill"],De=e.defineComponent({__name:"ChevronDownIcon",props:{color:{default:"#69758C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",Dl,[e.createElementVNode("path",{d:"M7.29289 0.292893C7.68342 -0.0976298 8.31643 -0.0976306 8.70696 0.292893C9.09748 0.683417 9.09748 1.31643 8.70696 1.70696L5.20696 5.20696C5.01942 5.39449 4.76514 5.49992 4.49992 5.49992C4.23471 5.49992 3.98043 5.39449 3.79289 5.20696L0.292893 1.70696C-0.097631 1.31643 -0.097631 0.683417 0.292893 0.292893C0.683417 -0.097631 1.31643 -0.097631 1.70696 0.292893L4.49992 3.08586L7.29289 0.292893Z",fill:l.color},null,8,Nl)]))}}),vl={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xl=["fill"],Tl=e.defineComponent({__name:"CalendarIcon",props:{color:{default:"#4B586C"}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("svg",vl,[e.createElementVNode("path",{d:"M15.3408 0C16.8094 0 17.9999 1.19065 18 2.65918V15.3408C18 16.8094 16.8094 18 15.3408 18H2.65918C1.19065 17.9999 0 16.8094 0 15.3408V2.65918C5.20826e-05 1.19068 1.19068 5.29008e-05 2.65918 0H15.3408ZM1.22754 5.32129V15.3408C1.22754 16.1316 1.86845 16.7724 2.65918 16.7725H15.3408C16.1316 16.7725 16.7725 16.1316 16.7725 15.3408V5.32129H1.22754ZM7.33398 9C8.25424 9.00026 9 9.74668 9 10.667C8.99992 11.5872 8.25419 12.3337 7.33398 12.334C6.41356 12.334 5.66707 11.5874 5.66699 10.667C5.66699 9.74652 6.41351 9 7.33398 9ZM2.65918 1.22754C1.86849 1.22759 1.22759 1.86849 1.22754 2.65918V4.09375H16.7725V2.65918C16.7724 1.86845 16.1316 1.22754 15.3408 1.22754H2.65918Z",fill:l.color},null,8,xl)]))}}),$l={class:"datepicker-calendar__header"},Ll={class:"datepicker-calendar__dropdowns"},Al=["disabled"],Fl={class:"datepicker-calendar__dropdown-text"},Pl={key:0,class:"datepicker-calendar__dropdown-menu"},Ol=["onClick"],Rl=["disabled"],zl={class:"datepicker-calendar__dropdown-text"},Hl={key:0,class:"datepicker-calendar__dropdown-menu"},Il=["data-year","onClick"],Zl={key:0,class:"datepicker-calendar__nav-section"},jl=["disabled","aria-label"],ql=["disabled"],Wl=["disabled","aria-label"],Gl={class:"datepicker-calendar__month-views"},Kl={class:"datepicker-calendar__weekdays",role:"row"},Ul=["aria-label"],Yl=["aria-label"],Jl=["onClick","onKeydown","onMouseenter","disabled","aria-label","aria-selected","aria-disabled","aria-current","aria-pressed","data-date"],Ql={style:{position:"relative","z-index":"1"}},Yt=oe(e.defineComponent({__name:"DatePickerCalendar",props:{month:{},selectedDate:{},selectedDates:{},selectedRange:{},minDate:{},maxDate:{},disabledDates:{},allowedDates:{},disabled:{type:Boolean,default:!1},weekStart:{default:0},locale:{},showNavigation:{type:Boolean,default:!0},calendarIndex:{default:0},totalCalendars:{default:1},hideOffsetDates:{type:Boolean,default:!1},hoverDate:{}},emits:["update:month","select-date","hover-date"],setup(l,{emit:r}){const i=l;e.watch(()=>i.hideOffsetDates,g=>{console.log("hideOffsetDates prop changed to:",g),e.nextTick(()=>{const S=y.value;S?console.log("Calendar element classes:",S.className):console.log("Calendar element not yet initialized")})},{immediate:!0});const a=r,d=e.computed(()=>i.month.getMonth()),u=e.computed(()=>i.month.getFullYear()),f=e.ref(d.value),C=e.ref(u.value),h=e.ref(!1),m=e.ref(!1),y=e.ref(),p=e.computed(()=>{var g;return((g=i.locale)==null?void 0:g.months)||["January","February","March","April","May","June","July","August","September","October","November","December"]}),w=e.computed(()=>_l(i.weekStart,i.locale)),N=e.computed(()=>{const g=new Date().getFullYear(),S=[];for(let K=g-50;K<=g+50;K++)S.push(K);return S}),A=e.computed(()=>Kt(i.month,i.weekStart).map(g=>({...g,selected:L(g.date),disabled:g.disabled||Cl(g.date,i.minDate,i.maxDate,i.disabledDates,i.allowedDates),today:yt(g.date),weekend:kt(g.date),inRange:b(g.date)})));function L(g){return i.selectedDate&&ce(g,i.selectedDate)?!0:i.selectedDates?i.selectedDates.some(S=>ce(g,S)):!!(i.selectedRange&&(i.selectedRange.start&&ce(g,i.selectedRange.start)||i.selectedRange.end&&ce(g,i.selectedRange.end)))}function b(g){var S,K;return!((S=i.selectedRange)!=null&&S.start)||!((K=i.selectedRange)!=null&&K.end)?!1:g>=i.selectedRange.start&&g<=i.selectedRange.end}function T(g){var S;return(S=i.selectedRange)!=null&&S.start?ce(g,i.selectedRange.start):!1}function D(g){var S;return(S=i.selectedRange)!=null&&S.end?ce(g,i.selectedRange.end):!1}function R(g){var K,q;return{"datepicker-calendar__day--today":g.today,"datepicker-calendar__day--weekend":g.weekend,"datepicker-calendar__day--selected":g.selected,"datepicker-calendar__day--in-range":g.inRange,"datepicker-calendar__day--range-start":T(g.date),"datepicker-calendar__day--range-end":D(g.date),"datepicker-calendar__day--disabled":g.disabled,"datepicker-calendar__day--other-month":!g.current,"datepicker-calendar__day--in-hover-range":de(g.date),"datepicker-calendar__day--hover-end":!((K=i.selectedRange)!=null&&K.end)&&!!((q=i.selectedRange)!=null&&q.start)&&!!i.hoverDate&&ce(g.date,i.hoverDate)&&!ce(g.date,i.selectedRange.start)}}function v(){a("update:month",Ie(i.month,-1))}function I(){a("update:month",Ie(i.month,1))}function Z(){const g=new Date(C.value,f.value,1);a("update:month",g)}function j(){const g=new Date(C.value,f.value,1);a("update:month",g)}function Y(g){g&&g.stopPropagation(),h.value=!h.value,m.value=!1}function ee(g){g&&g.stopPropagation(),m.value=!m.value,h.value=!1,m.value&&e.nextTick(()=>{const S=document.querySelector(`[data-year="${C.value}"]`),K=document.querySelector(".datepicker-calendar__dropdown-menu");if(S&&K){const q=S.offsetTop,z=K.clientHeight,ue=q-z/2+S.clientHeight/2;K.scrollTop=ue}})}function W(g,S){S.stopPropagation(),f.value=g,h.value=!1,Z()}function M(g,S){S.stopPropagation(),C.value=g,m.value=!1,j()}function P(g){const S=g.target;y.value&&!y.value.contains(S)&&(h.value=!1,m.value=!1)}e.onMounted(()=>{document.addEventListener("mousedown",P)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",P)});function U(){const g=new Date;a("update:month",new Date(g.getFullYear(),g.getMonth(),1)),e.nextTick(()=>{const S=document.querySelector(`button[data-date="${g.toISOString()}"]`);S==null||S.focus()})}function J(g){!g.disabled&&!i.disabled&&a("select-date",g.date)}function F(g,S){if(!(S.disabled||i.disabled))switch(g.key){case"Enter":case" ":g.preventDefault(),J(S);break;case"ArrowRight":g.preventDefault(),le(S);break;case"ArrowLeft":g.preventDefault(),V(S);break;case"ArrowDown":g.preventDefault(),O(S);break;case"ArrowUp":g.preventDefault(),B(S);break;case"Home":g.preventDefault(),x();break;case"End":g.preventDefault(),k();break;case"PageDown":g.preventDefault(),g.shiftKey?X():E();break;case"PageUp":g.preventDefault(),g.shiftKey?ae():$();break}}function G(g){let q=g.date.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});return g.today&&(q+=", Today"),g.selected&&(q+=", Selected"),g.disabled&&(q+=", Disabled"),g.current||(q+=", Other month"),q}function le(g){const K=A.value.findIndex(q=>ce(q.date,g.date))+1;if(K<A.value.length){const q=A.value[K],z=document.querySelector(`button[data-date="${q.date.toISOString()}"]`);z==null||z.focus()}}function V(g){const K=A.value.findIndex(q=>ce(q.date,g.date))-1;if(K>=0){const q=A.value[K],z=document.querySelector(`button[data-date="${q.date.toISOString()}"]`);z==null||z.focus()}}function O(g){const S=new Date(g.date);S.setDate(S.getDate()+7);const K=A.value.find(q=>ce(q.date,S));if(K){const q=document.querySelector(`button[data-date="${K.date.toISOString()}"]`);q==null||q.focus()}}function B(g){const S=new Date(g.date);S.setDate(S.getDate()-7);const K=A.value.find(q=>ce(q.date,S));if(K){const q=document.querySelector(`button[data-date="${K.date.toISOString()}"]`);q==null||q.focus()}}function x(){const g=A.value.find(S=>S.current&&S.date.getDate()===1);if(g){const S=document.querySelector(`button[data-date="${g.date.toISOString()}"]`);S==null||S.focus()}}function k(){const g=A.value.filter(S=>S.current).pop();if(g){const S=document.querySelector(`button[data-date="${g.date.toISOString()}"]`);S==null||S.focus()}}function E(){a("update:month",Ie(i.month,1)),e.nextTick(()=>{x()})}function $(){a("update:month",Ie(i.month,-1)),e.nextTick(()=>{x()})}function X(){const g=new Date(i.month);g.setFullYear(g.getFullYear()+1),a("update:month",g),e.nextTick(()=>{x()})}function ae(){const g=new Date(i.month);g.setFullYear(g.getFullYear()-1),a("update:month",g),e.nextTick(()=>{x()})}function de(g){var q,z;if(!((q=i.selectedRange)!=null&&q.start)||(z=i.selectedRange)!=null&&z.end||!i.hoverDate)return!1;const S=i.selectedRange.start,K=i.hoverDate;return ce(g,S)||ce(g,K)?!1:K>=S?g>S&&g<K:g<S&&g>K}return e.watch(()=>i.month,g=>{f.value=g.getMonth(),C.value=g.getFullYear()},{immediate:!0}),(g,S)=>{var K,q;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datepicker-calendar",{"datepicker-calendar--hide-offset-dates":l.hideOffsetDates}]),ref_key:"calendarRef",ref:y},[e.createElementVNode("div",$l,[e.createElementVNode("div",Ll,[e.createElementVNode("div",{class:e.normalizeClass(["datepicker-calendar__custom-dropdown",{"is-open":h.value}])},[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__dropdown-button",onClick:S[0]||(S[0]=z=>Y(z)),disabled:l.disabled},[e.createElementVNode("span",Fl,e.toDisplayString(p.value[f.value]),1),h.value?(e.openBlock(),e.createBlock(Ut,{key:0,color:"#253041",class:"datepicker-calendar__dropdown-icon"})):(e.openBlock(),e.createBlock(De,{key:1,color:"#253041",class:"datepicker-calendar__dropdown-icon"}))],8,Al),h.value?(e.openBlock(),e.createElementBlock("div",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(z,ue)=>(e.openBlock(),e.createElementBlock("div",{key:z,class:e.normalizeClass(["datepicker-calendar__dropdown-item",{"is-selected":ue===f.value}]),onClick:Ne=>W(ue,Ne)},e.toDisplayString(z),11,Ol))),128))])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(["datepicker-calendar__custom-dropdown",{"is-open":m.value}])},[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__dropdown-button",onClick:S[1]||(S[1]=z=>ee(z)),disabled:l.disabled},[e.createElementVNode("span",zl,e.toDisplayString(C.value),1),m.value?(e.openBlock(),e.createBlock(Ut,{key:0,color:"#253041",class:"datepicker-calendar__dropdown-icon"})):(e.openBlock(),e.createBlock(De,{key:1,color:"#253041",class:"datepicker-calendar__dropdown-icon"}))],8,Rl),m.value?(e.openBlock(),e.createElementBlock("div",Hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,z=>(e.openBlock(),e.createElementBlock("div",{key:z,class:e.normalizeClass(["datepicker-calendar__dropdown-item",{"is-selected":z===C.value}]),"data-year":z,onClick:ue=>M(z,ue)},e.toDisplayString(z),11,Il))),128))])):e.createCommentVNode("",!0)],2)]),l.showNavigation&&l.calendarIndex===l.totalCalendars-1?(e.openBlock(),e.createElementBlock("div",Zl,[e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:v,disabled:l.disabled,"aria-label":((K=l.locale)==null?void 0:K.previousMonth)||"Previous month",tabindex:"0"},[e.createVNode(El,{color:"#4B586C"})],8,jl),e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:U,disabled:l.disabled,"aria-label":"Focus current date",tabindex:"0"},[e.createVNode(Tl,{color:"#4B586C"})],8,ql),e.createElementVNode("button",{type:"button",class:"datepicker-calendar__nav-btn",onClick:I,disabled:l.disabled,"aria-label":((q=l.locale)==null?void 0:q.nextMonth)||"Next month",tabindex:"0"},[e.createVNode(It,{color:"#4B586C"})],8,Wl)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Gl,[e.createElementVNode("div",Kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,z=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"datepicker-calendar__weekday",role:"columnheader","aria-label":z},e.toDisplayString(z),9,Ul))),128))]),e.createElementVNode("div",{class:"datepicker-calendar__days",role:"grid","aria-label":`${p.value[d.value]} ${u.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,z=>(e.openBlock(),e.createElementBlock("button",{key:z.date.toISOString(),type:"button",class:e.normalizeClass(["datepicker-calendar__day",R(z)]),onClick:ue=>J(z),onKeydown:ue=>F(ue,z),onMouseenter:ue=>a("hover-date",z.date),onMouseleave:S[2]||(S[2]=ue=>a("hover-date",null)),disabled:z.disabled||l.disabled,"aria-label":G(z),"aria-selected":z.selected,"aria-disabled":z.disabled||l.disabled,"aria-current":z.today?"date":void 0,"aria-pressed":z.selected,tabindex:"0","data-date":z.date.toISOString()},[e.createElementVNode("span",Ql,e.toDisplayString(z.text),1)],42,Jl))),128))],8,Yl)])],2)}}}),[["__scopeId","data-v-e5d35ef6"]]),Xl={key:0,class:"datepicker__input-wrapper"},ea=["placeholder","disabled","readonly","required","autocomplete","inputmode","name","id"],ta=["disabled"],na=["disabled"],oa={class:"datepicker__content"},la={key:1,class:"datepicker__range"},aa={key:2,class:"datepicker__actions"},ra=["disabled"],Jt=oe(e.defineComponent({__name:"DatePicker",props:{modelValue:{},config:{default:()=>({disabled:!1,readonly:!1,autoApply:!1,noToday:!1,clearable:!0,showCalendarIcon:!0,weekStart:0,format:"MM/dd/yyyy",placeholder:"Select date",autocomplete:"off",inputmode:"none",actionRow:{selectBtnLabel:"Select",cancelBtnLabel:"Cancel",showSelect:!0,showCancel:!0}})}},emits:["update:modelValue","confirm","open","closed","cleared","focus","blur","text-input","text-change","request-close","request-open"],setup(l,{expose:r,emit:i}){const a=l,d=i,u=e.ref(),f=e.ref(),C=e.ref(!1),h=e.ref(""),m=e.ref(new Date),y=e.ref(null),p=e.ref(null),w=e.ref(null);e.onMounted(()=>{N()});function N(){var k,E,$;if((k=a.config)!=null&&k.startDate){m.value=new Date(a.config.startDate);return}(E=a.config)!=null&&E.minDate?m.value=new Date(a.config.minDate):($=a.config)!=null&&$.maxDate&&a.config.maxDate<new Date&&(m.value=new Date(a.config.maxDate))}const A=e.computed(()=>{var k,E;return typeof((k=a.config)==null?void 0:k.locale)=="string"?tt:((E=a.config)==null?void 0:E.locale)||tt}),L=e.computed(()=>{var k,E,$;return{"datepicker--disabled":(k=a.config)==null?void 0:k.disabled,"datepicker--readonly":(E=a.config)==null?void 0:E.readonly,"datepicker--open":C.value,"datepicker--filter-mode":($=a.config)==null?void 0:$.filterMode}}),b=e.computed(()=>({"datepicker__input--error":!1})),T=e.computed(()=>{var k;return{"datepicker__dropdown--range":!!((k=a.config)!=null&&k.range)}}),D=e.computed(()=>{var k,E,$;return!!(!((k=a.config)!=null&&k.autoApply)&&((E=a.config)!=null&&E.range||($=a.config)!=null&&$.actionRow))}),R=e.computed(()=>{var k,E,$;return(k=a.config)!=null&&k.range?((E=p.value)==null?void 0:E.start)&&(($=p.value)==null?void 0:$.end):y.value!==null}),v=e.computed(()=>{var $,X;const k=($=a.config)==null?void 0:$.multiCalendars,E=typeof k=="number"?k:typeof k=="object"&&k.count?Number(k.count):1;return wl(m.value,E,((X=a.config)==null?void 0:X.weekStart)||0)}),I=e.ref(null);function Z(k){m.value=k}function j(k,E){const $=new Date(m.value);$.setMonth($.getMonth()+k);const X=(E.getFullYear()-$.getFullYear())*12+(E.getMonth()-$.getMonth()),ae=new Date(m.value);ae.setMonth(ae.getMonth()+X),m.value=ae}function Y(k){var E,$;y.value=k,h.value=pe(k,((E=a.config)==null?void 0:E.format)||"MM/dd/yyyy",A.value),($=a.config)!=null&&$.autoApply?W():D.value||F()}function ee(k){var E,$,X,ae;if(!p.value)p.value={start:k,end:null};else if(p.value.end)p.value={start:k,end:null};else{if(p.value.start&&ce(k,p.value.start))return;p.value.start&&k>=p.value.start?p.value={...p.value,end:k}:p.value={start:k,end:p.value.start},(E=a.config)!=null&&E.autoApply&&p.value.start&&p.value.end&&(h.value=pe(p.value.start,(($=a.config)==null?void 0:$.format)||"MM/dd/yyyy",A.value)+" - "+pe(p.value.end,((X=a.config)==null?void 0:X.format)||"MM/dd/yyyy",A.value)),(ae=a.config)!=null&&ae.autoApply?W():!D.value&&p.value.start&&p.value.end&&F()}}function W(){var k,E,$,X,ae,de,g;(k=a.config)!=null&&k.range?(w.value=p.value,(E=p.value)!=null&&E.start&&(($=p.value)!=null&&$.end)&&(h.value=pe(p.value.start,((X=a.config)==null?void 0:X.format)||"MM/dd/yyyy",A.value)+" - "+pe(p.value.end,((ae=a.config)==null?void 0:ae.format)||"MM/dd/yyyy",A.value))):(w.value=y.value,y.value&&(h.value=pe(y.value,((de=a.config)==null?void 0:de.format)||"MM/dd/yyyy",A.value))),d("update:modelValue",w.value),d("confirm",w.value),(g=a.config)!=null&&g.autoApply||F()}function M(){y.value=null,p.value=null,F()}function P(){w.value=null,y.value=null,p.value=null,h.value="",d("update:modelValue",null),d("cleared"),F()}function U(){C.value?F():J()}function J(){var k,E;!((k=a.config)!=null&&k.disabled)&&!((E=a.config)!=null&&E.readonly)&&(C.value=!0,d("open"),e.nextTick(()=>{u.value&&u.value.focus()}))}function F(){var k;C.value=!1,d("closed"),(k=a.config)!=null&&k.filterMode&&d("request-close")}function G(k){var E,$;k.stopPropagation(),!((E=a.config)!=null&&E.disabled)&&!(($=a.config)!=null&&$.readonly)&&J()}function le(){var k,E;!((k=a.config)!=null&&k.disabled)&&!((E=a.config)!=null&&E.readonly)&&setTimeout(()=>{J()},0),d("focus")}function V(){d("blur")}function O(k){var X;const E=k.target;h.value=E.value;const $=yl(E.value,((X=a.config)==null?void 0:X.format)||"MM/dd/yyyy");$&&(w.value=$,d("update:modelValue",$)),d("text-input",E.value)}function B(k){k.key==="Escape"?F():k.key==="Enter"?C.value?W():J():k.key==="Tab"&&F()}function x(k){const E=k.target;f.value&&!f.value.contains(E)&&u.value&&!u.value.contains(E)&&F()}return e.onMounted(()=>{document.addEventListener("mousedown",x)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",x)}),e.watch(()=>a.modelValue,k=>{var E,$,X,ae,de;if(w.value=bl(k||null),(E=a.config)!=null&&E.range&&typeof w.value=="object"&&w.value!==null&&"start"in w.value){const g=w.value;p.value=g,g.start&&(m.value=new Date(g.start)),h.value=pe(g.start,(($=a.config)==null?void 0:$.format)||"MM/dd/yyyy",A.value)+" - "+pe(g.end,((X=a.config)==null?void 0:X.format)||"MM/dd/yyyy",A.value)}else!((ae=a.config)!=null&&ae.range)&&w.value instanceof Date?(y.value=w.value,m.value=new Date(w.value),h.value=pe(w.value,((de=a.config)==null?void 0:de.format)||"MM/dd/yyyy",A.value)):h.value=""},{immediate:!0}),r({selectDate:k=>{Array.isArray(k)||Y(k)},closeMenu:F,openMenu:J,clearValue:P,focusInput:()=>{var k;return(k=u.value)==null?void 0:k.focus()},blurInput:()=>{var k;return(k=u.value)==null?void 0:k.blur()}}),(k,E)=>{var $,X,ae,de,g,S,K,q,z,ue,Ne,nt,ot,lt,at,Ze,je,qe,We,ve,xe,Ge,Te,$e,rt,ge,Ve,Be,Ee,Le,ye,it,Ae,Fe,Se,Pe;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["datepicker",L.value])},[($=l.config)!=null&&$.filterMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xl,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":E[0]||(E[0]=fe=>h.value=fe),type:"text",class:e.normalizeClass(["datepicker__input",b.value]),placeholder:(X=l.config)==null?void 0:X.placeholder,disabled:(ae=l.config)==null?void 0:ae.disabled,readonly:(de=l.config)==null?void 0:de.readonly,required:(S=(g=l.config)==null?void 0:g.input)==null?void 0:S.required,autocomplete:(q=(K=l.config)==null?void 0:K.input)==null?void 0:q.autocomplete,inputmode:(ue=(z=l.config)==null?void 0:z.input)==null?void 0:ue.inputmode,name:(nt=(Ne=l.config)==null?void 0:Ne.input)==null?void 0:nt.name,id:(lt=(ot=l.config)==null?void 0:ot.input)==null?void 0:lt.id,onFocus:le,onBlur:V,onInput:O,onKeydown:B,onClick:G},null,42,ea),[[e.vModelText,h.value]]),(at=l.config)!=null&&at.showCalendarIcon?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"datepicker__toggle",onClick:U,disabled:(Ze=l.config)==null?void 0:Ze.disabled},[...E[3]||(E[3]=[e.createStaticVNode('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" data-v-69a7fb78><rect x="3" y="4" width="18" height="18" rx="2" ry="2" stroke-width="2" data-v-69a7fb78></rect><line x1="16" y1="2" x2="16" y2="6" stroke-width="2" data-v-69a7fb78></line><line x1="8" y1="2" x2="8" y2="6" stroke-width="2" data-v-69a7fb78></line><line x1="3" y1="10" x2="21" y2="10" stroke-width="2" data-v-69a7fb78></line></svg>',1)])],8,ta)):e.createCommentVNode("",!0),(je=l.config)!=null&&je.clearable&&h.value&&!((qe=l.config)!=null&&qe.readonly)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"datepicker__clear",onClick:P,disabled:(We=l.config)==null?void 0:We.disabled},[...E[4]||(E[4]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18","stroke-width":"2"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18","stroke-width":"2"})],-1)])],8,na)):e.createCommentVNode("",!0)])),(ve=l.config)!=null&&ve.filterMode||C.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["datepicker__dropdown",T.value]),ref_key:"dropdownRef",ref:f},[e.createElementVNode("div",oa,[(xe=l.config)!=null&&xe.range?(e.openBlock(),e.createElementBlock("div",la,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(fe,ie)=>{var st,ct,Ke,ke,Oe,Ue,Ye;return e.openBlock(),e.createBlock(Yt,{key:ie,month:new Date(fe.year,fe.month,1),"selected-range":p.value,"min-date":(st=l.config)==null?void 0:st.minDate,"max-date":(ct=l.config)==null?void 0:ct.maxDate,"disabled-dates":(Ke=l.config)==null?void 0:Ke.disabledDates,"allowed-dates":(ke=l.config)==null?void 0:ke.allowedDates,disabled:(Oe=l.config)==null?void 0:Oe.disabled,"week-start":(Ue=l.config)==null?void 0:Ue.weekStart,locale:A.value,"show-navigation":ie===v.value.length-1,"calendar-index":ie,"total-calendars":v.value.length,"hide-offset-dates":(Ye=l.config)==null?void 0:Ye.hideOffsetDates,"onUpdate:month":Je=>j(ie,Je),onSelectDate:ee,"hover-date":I.value,onHoverDate:E[2]||(E[2]=Je=>I.value=Je)},null,8,["month","selected-range","min-date","max-date","disabled-dates","allowed-dates","disabled","week-start","locale","show-navigation","calendar-index","total-calendars","hide-offset-dates","onUpdate:month","hover-date"])}),128))])):(e.openBlock(),e.createBlock(Yt,{key:0,month:m.value,"selected-date":y.value,"min-date":(Ge=l.config)==null?void 0:Ge.minDate,"max-date":(Te=l.config)==null?void 0:Te.maxDate,"disabled-dates":($e=l.config)==null?void 0:$e.disabledDates,"allowed-dates":(rt=l.config)==null?void 0:rt.allowedDates,disabled:(ge=l.config)==null?void 0:ge.disabled,"week-start":(Ve=l.config)==null?void 0:Ve.weekStart,locale:A.value,"show-navigation":!0,"calendar-index":0,"total-calendars":1,"hide-offset-dates":(Be=l.config)==null?void 0:Be.hideOffsetDates,"onUpdate:month":Z,onSelectDate:Y,"hover-date":I.value,onHoverDate:E[1]||(E[1]=fe=>I.value=fe)},null,8,["month","selected-date","min-date","max-date","disabled-dates","allowed-dates","disabled","week-start","locale","hide-offset-dates","hover-date"])),D.value?(e.openBlock(),e.createElementBlock("div",aa,[(Le=(Ee=l.config)==null?void 0:Ee.actionRow)!=null&&Le.showSelect?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"datepicker__btn datepicker__btn--primary",onClick:W,disabled:!R.value},e.toDisplayString(((it=(ye=l.config)==null?void 0:ye.actionRow)==null?void 0:it.selectBtnLabel)||"Select"),9,ra)):e.createCommentVNode("",!0),(Fe=(Ae=l.config)==null?void 0:Ae.actionRow)!=null&&Fe.showCancel?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"datepicker__btn datepicker__btn--secondary",onClick:M},e.toDisplayString(((Pe=(Se=l.config)==null?void 0:Se.actionRow)==null?void 0:Pe.cancelBtnLabel)||"Cancel"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-69a7fb78"]]),ia={class:"filter-label"},sa={key:0,class:"filter-value"},ca=oe(e.defineComponent({__name:"DateFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm"],setup(l,{expose:r,emit:i}){const a=l,d=i,u=e.ref(!1),f=e.ref(null),C=e.ref("down"),h=e.ref(),m=e.ref(!1),y=e.computed(()=>{var M,P;return((P=(M=a.config.config)==null?void 0:M.datePicker)==null?void 0:P.mode)||"range"}),p=e.computed(()=>{var U,J,F,G;const M=((J=(U=a.config.config)==null?void 0:U.datePicker)==null?void 0:J.hideOffsetDates)||!1,P={placeholder:a.config.placeholder||(y.value==="single"?"Select date":"Select date range"),clearable:!0,format:((G=(F=a.config.config)==null?void 0:F.datePicker)==null?void 0:G.format)||"MM/dd/yyyy",autoApply:!1,readonly:!1,showCalendarIcon:!1,filterMode:!0,hideOffsetDates:M,startDate:N.value,actionRow:{showSelect:!0,showCancel:!0,selectBtnLabel:"Confirm",cancelBtnLabel:"Cancel"}};return y.value==="range"?{...P,range:{},multiCalendars:2}:P}),w=e.computed(()=>!!f.value),N=e.computed(()=>{if(!f.value)return new Date;if(f.value instanceof Date)return f.value;if(typeof f.value=="object"&&"start"in f.value){const M=f.value;if(M.start)return M.start}return new Date});function A(){if(!h.value)return;const M=h.value.getBoundingClientRect(),P=window.innerHeight,U=window.innerWidth,J=P-M.bottom,F=350,G=620;C.value=J>=F?"down":"up";const le=M.left+G>U;m.value=le}function L(){return a.config.label||"ETD"}function b(){if(!f.value)return null;const M="MM/dd/yy";if(y.value==="single")return f.value instanceof Date?pe(f.value,M):null;{if(typeof f.value!="object"||!("start"in f.value))return null;const P=f.value;return P.start&&P.end?`${pe(P.start,M)} - ${pe(P.end,M)}`:P.start?`From ${pe(P.start,M)}`:P.end?`To ${pe(P.end,M)}`:null}}function T(M){if(!M)return null;if(y.value==="single")return"date"in M&&M.date?new Date(M.date):"start"in M&&M.start?new Date(M.start):null;if("start"in M||"end"in M){const P=M;return{start:P.start?new Date(P.start):null,end:P.end?new Date(P.end):null}}return"date"in M,null}function D(M){if(!M)return{};if(y.value==="single"){if(M instanceof Date){const P=M.getFullYear(),U=String(M.getMonth()+1).padStart(2,"0"),J=String(M.getDate()).padStart(2,"0");return{mode:"single",date:`${P}-${U}-${J}`}}return{mode:"single"}}else{if(typeof M=="object"&&"start"in M){const P=M,U=J=>{const F=J.getFullYear(),G=String(J.getMonth()+1).padStart(2,"0"),le=String(J.getDate()).padStart(2,"0");return`${F}-${G}-${le}`};return{start:P.start?U(P.start):void 0,end:P.end?U(P.end):void 0}}if(M instanceof Date){const P=M.getFullYear(),U=String(M.getMonth()+1).padStart(2,"0"),J=String(M.getDate()).padStart(2,"0"),F=`${P}-${U}-${J}`;return{start:F,end:F}}return{}}}function R(M){if(f.value=M,!M){const P=y.value==="single"?{mode:"single"}:{};d("update:modelValue",P),d("confirm",P)}}function v(){const M=D(f.value);d("confirm",M),j()}function I(){u.value=!u.value}function Z(){u.value=!0}function j(){u.value=!1}function Y(){f.value=null;let M;y.value==="single"?M={mode:"single"}:M={},d("update:modelValue",M),d("confirm",M),j()}function ee(){Y()}e.watch(()=>a.modelValue,M=>{if(M&&typeof M=="object"){const P=T(M);f.value=P}else f.value=null},{immediate:!0}),e.watch(u,async M=>{M&&(await e.nextTick(),A())});function W(){u.value&&A()}return e.onMounted(()=>{window.addEventListener("scroll",W,!0),window.addEventListener("resize",W)}),e.onUnmounted(()=>{window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W)}),r({resetFilter:ee,openDatePicker:Z}),(M,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["date-filter",{"is-open":u.value,"is-applied":w.value}]),ref_key:"filterElement",ref:h},[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["date-picker-dropdown",{"date-picker-dropdown--up":C.value==="up","date-picker-dropdown--down":C.value==="down","date-picker-dropdown--right":m.value}])},[e.createVNode(Jt,{modelValue:f.value,"onUpdate:modelValue":[P[0]||(P[0]=U=>f.value=U),R],config:p.value,onConfirm:v,onClose:j,onClosed:j,onRequestClose:j},null,8,["modelValue","config"])],2)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"date-filter-trigger",onClick:I},[e.createElementVNode("span",ia,e.toDisplayString(L()),1),b()?(e.openBlock(),e.createElementBlock("span",sa,e.toDisplayString(b()),1)):e.createCommentVNode("",!0),e.createVNode(De,{class:e.normalizeClass(["chevron-icon",{"is-open":u.value}])},null,8,["class"]),w.value?(e.openBlock(),e.createBlock(et,{key:1,class:"clear-icon",onClick:e.withModifiers(Y,["stop"]),color:"#69758C"})):e.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-2a56899a"]]),da={class:"checkbox-icon"},ua={key:0,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fa={key:1,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Qt=e.defineComponent({__name:"CheckBoxIcon",props:{isChecked:{type:Boolean,default:!1}},setup(l){return(r,i)=>(e.openBlock(),e.createElementBlock("div",da,[l.isChecked?(e.openBlock(),e.createElementBlock("svg",ua,[...i[0]||(i[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.75 1.5C10.5449 1.5 12 2.95508 12 4.75V8.75C12 10.5449 10.5449 12 8.75 12H4.75C2.95508 12 1.5 10.5449 1.5 8.75V4.75C1.5 2.95507 2.95507 1.5 4.75 1.5H8.75ZM8.75 13.5C11.3734 13.5 13.5 11.3734 13.5 8.75V4.75C13.5 2.12665 11.3734 0 8.75 0H4.75C2.12665 2.98023e-07 0 2.12665 0 4.75V8.75C0 11.3734 2.12665 13.5 4.75 13.5H8.75ZM11.0785 3.33333C10.6645 2.96808 10.0328 3.00758 9.66732 3.42122L5.46517 8.18294L3.8724 6.13607C3.5333 5.70024 2.90498 5.62125 2.46908 5.96029C2.03317 6.29934 1.95527 6.92767 2.29427 7.36361L4.62728 10.3636C4.81007 10.5986 5.08848 10.7401 5.38607 10.7493C5.68353 10.7585 5.96943 10.6346 6.16634 10.4115L11.1663 4.74544C11.5317 4.33132 11.4926 3.69874 11.0785 3.33333Z",fill:"#1A6D9E"},null,-1)])])):e.createCommentVNode("",!0),l.isChecked?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",fa,[...i[1]||(i[1]=[e.createElementVNode("path",{d:"M8.75 0C11.3734 0 13.5 2.12665 13.5 4.75V8.75C13.5 11.3734 11.3734 13.5 8.75 13.5H4.75C2.12665 13.5 0 11.3734 0 8.75V4.75C0 2.12665 2.12665 6.44262e-07 4.75 0H8.75ZM4.75 1.5C2.95507 1.5 1.5 2.95508 1.5 4.75V8.75C1.5 10.5449 2.95508 12 4.75 12H8.75C10.5449 12 12 10.5449 12 8.75V4.75C12 2.95508 10.5449 1.5 8.75 1.5H4.75Z",fill:"#9CA5B4"},null,-1)])]))]))}}),he=e.ref(null);function Xt(){function l(d){if(he.value&&he.value!==d){const u=new CustomEvent("close-filter",{detail:{filterKey:he.value}});window.dispatchEvent(u)}he.value=d}function r(d){he.value===d&&(he.value=null)}function i(d){return he.value===d}function a(){if(he.value){const d=new CustomEvent("close-filter",{detail:{filterKey:he.value}});window.dispatchEvent(d),he.value=null}}return{currentOpenFilter:he,openFilter:l,closeFilter:r,isFilterOpen:i,closeAllFilters:a}}const ma={class:"grid__select-filter"},pa={class:"grid__filter-trigger-content"},ga={class:"grid__filter-label"},ha={key:0,class:"grid__filter-selection-text"},ya={class:"grid__selection-main-text"},ka={key:0,class:"grid__selection-additional-count"},Ca={key:0,class:"grid__filter-options"},_a={key:0,class:"grid__filter-search"},ba=["placeholder"],wa={class:"grid__filter-options-list"},Va=["onClick"],Ba=["title"],Ea={key:1,class:"grid__filter-empty"},Sa=oe(e.defineComponent({__name:"SelectFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]},isOpen:{type:Boolean},searchable:{type:Boolean},multiple:{type:Boolean}},emits:["update:modelValue","request-toggle","request-close"],setup(l,{expose:r,emit:i}){const a=l,d=i,{isFilterOpen:u,openFilter:f,closeFilter:C}=Xt(),h=e.ref(),m=e.computed(()=>a.isOpen!==void 0?a.isOpen:u(a.config.key)),y=e.computed(()=>{var F,G;return a.multiple||((G=(F=a.config.config)==null?void 0:F.select)==null?void 0:G.multiple)}),p=e.ref(y.value&&Array.isArray(a.modelValue)?[...a.modelValue]:[]),w=e.ref(!y.value&&!Array.isArray(a.modelValue)&&typeof a.modelValue!="object"&&typeof a.modelValue!="boolean"&&a.modelValue||null),N=e.ref(""),A=F=>w.value!==null&&w.value===F,L=e.computed(()=>{if(!N.value.trim()||!a.searchable)return a.config.options||[];const F=N.value.toLowerCase();return(a.config.options||[]).filter(G=>G.label.toLowerCase().includes(F)||String(G.value).toLowerCase().includes(F))}),b=e.computed(()=>a.config.key),T=e.computed(()=>y.value?p.value&&p.value.length>0:w.value!==null),D=e.computed(()=>{var F,G,le;if(y.value){if(!p.value||p.value.length===0)return"";if(p.value.length===1){const B=p.value[0],x=(F=a.config.options)==null?void 0:F.find(k=>k.value===B);return(x==null?void 0:x.label)||String(B)}const V=p.value[0],O=(G=a.config.options)==null?void 0:G.find(B=>B.value===V);return(O==null?void 0:O.label)||String(V)}else{if(!w.value)return"";const V=(le=a.config.options)==null?void 0:le.find(O=>O.value===w.value);return(V==null?void 0:V.label)||String(w.value)}}),R=e.computed(()=>y.value&&p.value&&p.value.length>1?p.value.length-1:0),v=e.computed(()=>T.value);function I(){}function Z(F){return p.value.includes(F)}function j(F){var le;const G=(le=a.config.options)==null?void 0:le.find(V=>V.value===F);if(!(G!=null&&G.disabled))if(y.value){const V=p.value.indexOf(F);V>-1?p.value.splice(V,1):p.value.push(F),d("update:modelValue",p.value.length>0?p.value:null)}else w.value=F,a.isOpen===void 0&&C(a.config.key),d("update:modelValue",F)}function Y(){a.isOpen===void 0?u(a.config.key)?C(a.config.key):f(a.config.key):d("request-toggle")}function ee(){y.value?(p.value=[],d("update:modelValue",null)):(w.value=null,d("update:modelValue",null))}function W(){a.isOpen===void 0&&(u(a.config.key)?C(a.config.key):f(a.config.key))}function M(){a.isOpen===void 0&&f(a.config.key)}function P(){a.isOpen===void 0&&C(a.config.key)}function U(F){setTimeout(()=>{const G=F.relatedTarget;h.value&&(!G||!h.value.contains(G))&&(a.isOpen===void 0?C(a.config.key):d("request-close"),y.value&&p.value.length>0&&d("update:modelValue",p.value))},10)}function J(F){if(!m.value)return;const G=F.target;h.value&&!h.value.contains(G)&&(a.isOpen===void 0?C(a.config.key):d("request-close"),y.value&&p.value.length>0&&d("update:modelValue",p.value))}return e.onMounted(()=>{document.addEventListener("click",J,{capture:!0})}),e.onUnmounted(()=>{document.removeEventListener("click",J,{capture:!0})}),e.watch(()=>a.modelValue,F=>{y.value?Array.isArray(F)?p.value=[...F]:F==null&&(p.value=[]):!Array.isArray(F)&&typeof F!="object"&&F!==void 0?w.value=F:w.value=null},{immediate:!0,deep:!0}),r({openDropdown:M,closeDropdown:P,toggleDropdown:W}),(F,G)=>{var le;return e.openBlock(),e.createElementBlock("div",ma,[e.createElementVNode("div",{ref_key:"dropdownRef",ref:h,class:e.normalizeClass(["grid__filter-dropdown",{"is-open":m.value,[`filter-key-${b.value}`]:!0}])},[e.createElementVNode("button",{type:"button",class:"grid__filter-trigger",onClick:Y,onBlur:U},[e.createElementVNode("span",pa,[e.createElementVNode("span",ga,e.toDisplayString(l.config.label),1),T.value?(e.openBlock(),e.createElementBlock("span",ha,[e.createElementVNode("span",ya,e.toDisplayString(D.value),1),R.value>0?(e.openBlock(),e.createElementBlock("span",ka,"+"+e.toDisplayString(R.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createVNode(De,{class:"grid__filter-trigger-arrow"}),v.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"grid__filter-clear-btn",onClick:e.withModifiers(ee,["stop"]),title:"Clear selections"},[e.createVNode(et,{color:"#69758C"})])):e.createCommentVNode("",!0)],32),m.value?(e.openBlock(),e.createElementBlock("div",Ca,[l.searchable&&(((le=l.config.options)==null?void 0:le.length)??0)>0?(e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(Wt,{class:"grid-select__search-icon"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":G[0]||(G[0]=V=>N.value=V),placeholder:`Search ${l.config.label}`,class:"grid-select__search-input",onInput:I},null,40,ba),[[e.vModelText,N.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",wa,[L.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(L.value,V=>(e.openBlock(),e.createElementBlock("label",{key:String(V.value),class:e.normalizeClass(["grid__filter-option",{"is-disabled":V.disabled,"is-selected":y.value?Z(V.value):A(V.value)}]),onClick:O=>j(V.value)},[y.value?(e.openBlock(),e.createBlock(Qt,{key:0,"is-checked":Z(V.value),class:"grid__filter-option-checkbox"},null,8,["is-checked"])):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"grid__filter-option-label",title:V.label},e.toDisplayString(V.label||""),9,Ba)],10,Va))),128)):(e.openBlock(),e.createElementBlock("div",Ea,e.toDisplayString(N.value?"No results found":"No data available"),1))])])):e.createCommentVNode("",!0)],2)])}}}),[["__scopeId","data-v-33996fe8"]]),Ma={key:0,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Da={key:1,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Na={class:"checkbox-filter__text"},va=oe(e.defineComponent({__name:"CheckboxFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm"],setup(l,{emit:r}){const i=l,a=r,d=e.computed(()=>!!i.modelValue);function u(){const f=!d.value;a("update:modelValue",f),a("confirm",f)}return(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox-filter",{"is-checked":d.value}]),onClick:u},[d.value?(e.openBlock(),e.createElementBlock("svg",Ma,[...C[0]||(C[0]=[e.createElementVNode("path",{d:"M9.91699 1.3125C11.447 1.31268 12.6873 2.55298 12.6875 4.08301V9.91699C12.6873 11.447 11.447 12.6873 9.91699 12.6875H4.08301C2.55298 12.6873 1.31268 11.447 1.3125 9.91699V4.08301C1.31268 2.55298 2.55298 1.31268 4.08301 1.3125H9.91699ZM4.08301 2.1875C3.03623 2.18768 2.18768 3.03623 2.1875 4.08301V9.91699C2.18768 10.9638 3.03623 11.8123 4.08301 11.8125H9.91699C10.9638 11.8123 11.8123 10.9638 11.8125 9.91699V4.08301C11.8123 3.03623 10.9638 2.18768 9.91699 2.1875H4.08301ZM9.77148 4.28125C9.98464 4.03968 10.3532 4.01634 10.5947 4.22949C10.8358 4.4426 10.8592 4.81128 10.6465 5.05273L6.27148 10.0117C6.15665 10.1418 5.98888 10.2133 5.81543 10.208C5.64205 10.2026 5.47964 10.1202 5.37305 9.9834L3.33105 7.3584C3.13357 7.10419 3.1796 6.73781 3.43359 6.54004C3.68789 6.34229 4.05515 6.38829 4.25293 6.64258L5.86133 8.71094L9.77148 4.28125Z",fill:"#253041"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Da,[...C[1]||(C[1]=[e.createElementVNode("path",{d:"M9.91699 1.3125C11.447 1.31268 12.6873 2.55298 12.6875 4.08301V9.91699C12.6873 11.447 11.447 12.6873 9.91699 12.6875H4.08301C2.55298 12.6873 1.31268 11.447 1.3125 9.91699V4.08301C1.31268 2.55298 2.55298 1.31268 4.08301 1.3125H9.91699ZM4.08301 2.1875C3.03623 2.18768 2.18768 3.03623 2.1875 4.08301V9.91699C2.18768 10.9638 3.03623 11.8123 4.08301 11.8125H9.91699C10.9638 11.8123 11.8123 10.9638 11.8125 9.91699V4.08301C11.8123 3.03623 10.9638 2.18768 9.91699 2.1875H4.08301Z",fill:"#69758C"},null,-1)])])),e.createElementVNode("span",Na,e.toDisplayString(l.config.label),1)],2))}}),[["__scopeId","data-v-007ba890"]]),xa={class:"grid-filter-label"},Ta={key:0,class:"grid-filter-value"},$a={key:1,class:"grid-filter-count"},La={key:1,class:"grid-filter-content"},Aa=oe(e.defineComponent({__name:"GridFilter",props:{config:{},modelValue:{type:[String,Number,Boolean,Array,Object,null]}},emits:["update:modelValue","confirm","clear"],setup(l,{expose:r,emit:i}){const a=l,d=i,{openFilter:u,closeFilter:f,isFilterOpen:C}=Xt(),h=e.ref(!1),m=e.ref(),y=e.ref(),p=e.computed(()=>{if(typeof a.modelValue=="boolean")return a.modelValue;if(!a.modelValue)return!1;if(Array.isArray(a.modelValue))return a.modelValue.length>0;if(typeof a.modelValue=="object"&&a.modelValue!==null){const j=a.modelValue;return!!(j.start||j.end)}return a.modelValue!==null&&a.modelValue!==""&&a.modelValue!==void 0});function w(){C(a.config.key)?(f(a.config.key),h.value=!1):(u(a.config.key),h.value=!0,e.nextTick(()=>{a.config.type==="date"&&m.value&&m.value.openDatePicker()}))}function N(){f(a.config.key),h.value=!1}function A(){h.value=!0}function L(){u(a.config.key),h.value=!0,e.nextTick(()=>{a.config.type==="date"&&m.value&&m.value.openDatePicker()})}function b(j){d("update:modelValue",j)}function T(j){d("confirm",j)}function D(){return a.config.label}function R(){if(!a.modelValue)return null;if(a.config.type==="select"){const j=a.config.options||[];if(Array.isArray(a.modelValue)){if(a.modelValue.length===0)return null;const Y=j.find(ee=>ee.value===a.modelValue[0]);return(Y==null?void 0:Y.label)||String(a.modelValue[0])}else{const Y=j.find(ee=>ee.value===a.modelValue);return(Y==null?void 0:Y.label)||String(a.modelValue)}}if(a.config.type==="date"){const j=a.modelValue;if(!j)return null;const Y=ee=>{const W=new Date(ee),M=String(W.getMonth()+1).padStart(2,"0"),P=String(W.getDate()).padStart(2,"0"),U=String(W.getFullYear()).slice(-2);return`${M}/${P}/${U}`};if(j.start&&j.end)return`${Y(j.start)} - ${Y(j.end)}`;if(j.start)return Y(j.start)}return null}function v(){return a.config.type==="select"&&Array.isArray(a.modelValue)&&a.modelValue.length>1?`+${a.modelValue.length-1}`:null}function I(){d("update:modelValue",null),h.value=!1,f(a.config.key),a.config.type==="date"&&m.value?m.value.resetFilter():a.config.type==="select"&&y.value&&y.value.resetFilter(),d("clear",a.config.key)}function Z(j){j.detail.filterKey===a.config.key&&(h.value=!1)}return e.onMounted(()=>{window.addEventListener("close-filter",Z)}),e.onUnmounted(()=>{window.removeEventListener("close-filter",Z)}),r({showFilter:A,resetFilter:I,openFilter:L}),(j,Y)=>{var ee,W,M,P;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-filter",{"is-applied":p.value}])},[l.config.type==="checkbox"?(e.openBlock(),e.createBlock(va,{key:0,config:l.config,"model-value":l.modelValue,"onUpdate:modelValue":b,onConfirm:T},null,8,["config","model-value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("div",La,[l.config.type==="date"?(e.openBlock(),e.createBlock(ca,{key:0,ref_key:"dateFilterRef",ref:m,config:l.config,"model-value":l.modelValue,class:e.normalizeClass({"is-applied":p.value}),"onUpdate:modelValue":b,onConfirm:T},null,8,["config","model-value","class"])):l.config.type==="select"?(e.openBlock(),e.createBlock(Sa,{key:1,ref_key:"selectFilterRef",ref:y,config:l.config,"model-value":l.modelValue,"is-open":e.unref(C)(l.config.key),searchable:(W=(ee=l.config.config)==null?void 0:ee.select)==null?void 0:W.searchable,multiple:(P=(M=l.config.config)==null?void 0:M.select)==null?void 0:P.multiple,class:e.normalizeClass({"is-applied":p.value}),"onUpdate:modelValue":b,onRequestToggle:w,onRequestClose:N},null,8,["config","model-value","is-open","searchable","multiple","class"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid-filter-trigger",onClick:L},[e.createElementVNode("span",xa,e.toDisplayString(D()),1),R()?(e.openBlock(),e.createElementBlock("span",Ta,e.toDisplayString(R()),1)):e.createCommentVNode("",!0),v()?(e.openBlock(),e.createElementBlock("span",$a,e.toDisplayString(v()),1)):e.createCommentVNode("",!0),e.createVNode(De),p.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"grid-filter-clear",onClick:e.withModifiers(I,["stop"])},[e.createVNode(et,{color:"#69758C"})])):e.createCommentVNode("",!0)]))],64))],2)}}}),[["__scopeId","data-v-35a46493"]]),Fa={key:0,class:"filter-dropdown-menu"},Pa={class:"filter-dropdown-content"},Oa=["onClick"],Ra={class:"filter-dropdown-item-content"},za={class:"filter-dropdown-item-label"},Ha=oe(e.defineComponent({__name:"FilterDropdown",props:{availableFilters:{},activeFilterKeys:{},defaultFilterKeys:{default:()=>[]},hasActiveFiltersWithValue:{type:Boolean}},emits:["add-filter","remove-filter","update-default-filters","clear-all-filters"],setup(l,{expose:r,emit:i}){const a=l,d=i,u=e.ref(!1),f=e.ref(),C=e.computed(()=>new Set([...a.defaultFilterKeys||[],...a.activeFilterKeys])),h=e.computed(()=>a.availableFilters);function m(){u.value=!u.value}function y(){u.value=!1}function p(L){C.value.has(L.key)?d("remove-filter",L.key):d("add-filter",L);const T=a.activeFilterKeys.filter(D=>{var R;return!((R=a.defaultFilterKeys)!=null&&R.includes(D))});d("update-default-filters",[...a.defaultFilterKeys||[],...T])}function w(L){return C.value.has(L.key)}function N(){d("clear-all-filters",a.activeFilterKeys)}function A(L){const b=L.target;f.value&&!f.value.contains(b)&&(u.value=!1)}return e.onMounted(()=>{document.addEventListener("mousedown",A)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",A)}),r({closeDropdown:y}),(L,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["filter-dropdown",{"is-open":u.value}]),ref_key:"dropdownRef",ref:f},[e.createElementVNode("button",{type:"button",class:"filter-dropdown-trigger",onClick:m},[b[0]||(b[0]=e.createElementVNode("span",null,"More Filters",-1)),e.createVNode(De,{class:"filter-dropdown-arrow"})]),u.value?(e.openBlock(),e.createElementBlock("div",Fa,[e.createElementVNode("div",Pa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,T=>(e.openBlock(),e.createElementBlock("div",{key:T.key,class:e.normalizeClass(["filter-dropdown-item",{"is-selected":w(T)}])},[e.createElementVNode("button",{type:"button",class:"filter-dropdown-item-button",onClick:e.withModifiers(D=>p(T),["stop"])},[e.createElementVNode("div",Ra,[e.createVNode(Qt,{"is-checked":w(T),class:"filter-dropdown-checkbox-icon"},null,8,["is-checked"]),e.createElementVNode("span",za,e.toDisplayString(T.label),1)])],8,Oa)],2))),128))])])):e.createCommentVNode("",!0)],2),l.hasActiveFiltersWithValue?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__clear-filters",onClick:N}," Clear Filters ")):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-5fbe1c78"]]),Ia={class:"shifl-grid relative"},Za={class:"shifl-grid__controls"},ja={class:"shifl-grid__controls-left"},qa={key:0,class:"shifl-grid__search-container"},Wa={class:"shifl-grid__search-input-wrapper"},Ga={class:"shifl-grid__controls-right"},Ka=["disabled"],Ua=["disabled"],Ya={class:"shifl-grid__table"},Ja=["onClick"],Qa={class:"shifl-grid__header-content"},Xa={key:0,class:"shifl-grid__header-label"},er={key:1,class:"shifl-grid__sort-icon shifl-grid__sort-icon--active"},tr={key:2,class:"shifl-grid__sort-icon shifl-grid__sort-icon--hover"},nr=["onClick"],or={key:0,class:"shifl-grid__smart-tracking-icon"},lr={key:0,class:"shifl-grid__action-icon-wrapper"},ar=["onClick"],rr={key:0},ir=["innerHTML"],sr={key:1,class:"shifl-grid__action-button-wrapper"},cr=["onClick"],dr={key:2,class:"shifl-grid__action-icon-wrapper"},ur=["onClick"],fr=["innerHTML"],mr={key:3,class:"shifl-grid__action-button-icon-wrapper"},pr=["onClick"],gr=["innerHTML"],hr={class:"shifl-grid__action-button-text"},yr={key:2,class:"shifl-grid__composite-cell"},kr={key:1,class:"shifl-grid__cell-blank"},Cr={key:3,class:"shifl-grid__type-cell"},_r={key:1,class:"shifl-grid__cell-blank"},br={key:2,class:"shifl-grid__container-badge"},wr={key:0,class:"shifl-grid__cell-blank"},Vr={key:1,class:"shifl-grid__tags-cell"},Br={class:"shifl-grid__tags-wrapper"},Er=["onMouseenter"],Sr={key:5,class:"shifl-grid__chips-container"},Mr={key:6,class:"shifl-grid__icon-text-cell"},Dr={key:0,class:"shifl-grid__icon-text-wrapper"},Nr={class:"shifl-grid__icon-text-container"},vr=["title"],xr=["onMouseenter"],Tr={key:0,class:"shifl-grid__icon-text-badge"},$r=["title"],Lr={key:7,class:"shifl-grid__truncated-cell"},Ar=["onMouseenter"],Fr=["onMouseenter"],Pr=["href"],Or=["onMouseenter"],Rr={class:"shifl-grid__reference-value"},zr=["onClick"],Hr={key:0},Ir={key:0,class:"shifl-grid__empty-state-wrapper"},Zr={key:1,class:"text-center text-gray-500 py-6 shifl-grid__empty-state-wrapper empty--rows"},jr={key:0,class:"shifl-grid__pagination"},qr={class:"shifl-grid__pagination-left"},Wr={class:"shifl-grid__pagination-range"},Gr={class:"shifl-grid__pagination-range-numbers"},Kr={class:"shifl-grid__pagination-right"},Ur={class:"shifl-grid__pagination-rows"},Yr=["value","disabled"],Jr={class:"shifl-grid__pagination-nav"},Qr=["disabled"],Xr={class:"shifl-grid__pagination-pages"},ei=["disabled","onClick"],ti={key:1,class:"shifl-grid__pagination-ellipsis"},ni=["disabled"],oi=["onClick"],li=["innerHTML"],ai={class:"shifl-grid__copy-tooltip-content"},en=e.defineComponent({__name:"ShiflGrid",props:{config:{},search:{},loading:{type:Boolean},isNewViewMode:{type:Boolean},gridConfig:{},openColumnManager:{type:Boolean}},emits:["action-click","search-change","pagination-change","row-click","view:updated","view:save","view:apply","view:reset","view:dirty","view:unsaved","export-data"],setup(l,{emit:r}){var En,Sn,Mn,Dn,Nn;function i(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(Array.isArray(t))return t.map(i);if(typeof t=="object"){const o={};for(const n in t)t.hasOwnProperty(n)&&(o[n]=i(t[n]));return o}return t}function a(t,o){if(t===o)return!0;if(t==null||o==null)return!1;if(Array.isArray(t)&&Array.isArray(o))return t.length!==o.length?!1:t.every((n,s)=>a(n,o[s]));if(typeof t=="object"&&typeof o=="object"){const n=Object.keys(t),s=Object.keys(o);return n.length!==s.length?!1:n.every(c=>a(t[c],o[c]))}return!1}const d=l,u=r,f=e.computed(()=>xn(d.config)),C=e.computed(()=>d.isNewViewMode||!1),h=e.ref(d.search),m=e.ref(d.search||""),y=e.ref(!1),p=e.ref(null),w=e.ref(f.value.sort),N=e.ref({page:((En=f.value.paginationMeta)==null?void 0:En.currentPage)||1,perPage:((Sn=f.value.paginationMeta)==null?void 0:Sn.perPage)||20}),A=e.ref(typeof((Mn=f.value.apiConfig)==null?void 0:Mn.additionalParams)=="function"||(Nn=(Dn=f.value.apiConfig)==null?void 0:Dn.additionalParams)==null?void 0:Nn.tabName),L=Lt(f.value,{search:h,filters:p,sort:w,pagination:N,tabName:A}),b=e.computed(()=>{var t;if(d.loading===!0)return!0;try{return((t=L==null?void 0:L.loading)==null?void 0:t.value)??!1}catch{return!1}}),T=e.computed(()=>{var s,c;const t=f.value.availableColumns||[],o=((c=(s=d.gridConfig)==null?void 0:s.availableColumns)==null?void 0:c.map(_=>({..._,freeze:_.freeze??!1,visible:!1,protected:_.protected??!1})))??[];return[...t,...o].reduce((_,H)=>(_.some(te=>te.key===H.key)||_.push(H),_),[])}),D=e.computed(()=>{const o=[...f.value.columns,...T.value].filter(n=>!n.smartTrackingColumn);return o.sort((n,s)=>{const c=be(n),_=be(s);return c&&!_?1:!c&&_?-1:(n.order||0)-(s.order||0)}),o}),R=e.computed(()=>(d.config.columns||[]).filter(n=>!n.smartTrackingColumn).map((n,s)=>({...n,key:n.key,label:n.label||n.key,order:s+1,visible:n.visible!==!1,freeze:n.freeze||!1,sortable:n.sortable||!1,width:n.width,cellType:n.cellType,align:n.align||"left"}))),{columns:v,visibleColumns:I,toggleColumnVisibility:Z,toggleFreeze:j,moveColumn:Y,resetColumns:ee}=xt(D.value),{sort:W,setSort:M,applySort:P}=Tt(f.value.sort),{menuState:U,openMenu:J,closeMenu:F}=$n(),G=e.ref(!1),le=e.ref(!1),V=e.computed(()=>le.value?!1:C.value),O=()=>{le.value=!0,G.value=!0},B=e.computed(()=>{var t;return V.value?d.config.name||"Add New View":g.value&&((t=d.gridConfig)!=null&&t.name)?d.gridConfig.name:d.config.name==="Add New View"?d.config.module||"":d.config.name||""});e.watch(()=>d.openColumnManager,t=>{t!==void 0&&(G.value=t)},{immediate:!0});const x=e.ref(null),k=e.ref(null),E=e.ref(!1),$=e.computed(()=>{var t,o,n;return{name:d.config.name||((t=d.gridConfig)==null?void 0:t.name)||"",columns:v.value.map(s=>({key:s.key,label:s.label,order:s.order??0,sortable:s.sortable??!1,width:s.width,height:s.height,freeze:s.freeze??!1,visible:s.visible??!0,protected:s.protected,isDefault:s.isDefault,actionColumn:s.actionColumn,smartTrackingColumn:s.smartTrackingColumn,blankStyle:s.blankStyle,cellType:s.cellType,truncate:s.truncate??!0,filterable:s.filterable??!1,filterType:s.filterType,align:s.align??"left"})),availableColumns:T.value,filters:p.value||[],sort:W.value,pagination:{page:((o=N.value)==null?void 0:o.page)||1,perPage:((n=N.value)==null?void 0:n.perPage)||20}}}),X=e.computed(()=>de.value!=="saved"?null:{columns:v.value.map(t=>({key:t.key,order:t.order??0,visible:t.visible??!0}))}),ae=e.computed(()=>k.value?!a($.value,k.value):!1),de=e.computed(()=>{const t=d.gridConfig;return t!=null&&t.id&&(t!=null&&t.name)&&(t!=null&&t.user_id)?"saved":t!=null&&t.name&&!(t!=null&&t.id)&&!(t!=null&&t.user_id)?"new":"default"}),g=e.computed(()=>{var t,o,n;return((t=d.gridConfig)==null?void 0:t.name)!==void 0&&((o=d.gridConfig)==null?void 0:o.name)!==null&&((n=d.gridConfig)==null?void 0:n.name)!==""}),S=e.computed(()=>de.value==="new"||de.value==="saved"?!0:ae.value);function K(t){if(!t)return;t.columns&&(t.columns.forEach((n,s)=>{const c=v.value.find(_=>_.key===n.key);c&&(c.visible=n.visible!==!1,c.order=n.order||s+1)}),t.availableColumns&&t.availableColumns.forEach(n=>{v.value.some(s=>s.key===n.key)||v.value.push({...n,freeze:n.freeze??!1,visible:n.visible??!1,protected:n.protected??!1})}),v.value.sort((n,s)=>{const c=be(n),_=be(s);return c&&!_?1:!c&&_?-1:(n.order||0)-(s.order||0)}));const o={};Object.keys(re.value).forEach(n=>{o[n]=null}),ze.value.forEach(n=>{o[n]=null}),re.value=o,wt(),t.filters&&(Array.isArray(t.filters)?t.filters.forEach(n=>{n.field&&n.value!==void 0?Xe(n.field,n.value):n.field&&n.operation==="orBetween"&&(n.from||n.to)&&Xe(n.field,{start:n.from,end:n.to})}):Object.entries(t.filters).forEach(([n,s])=>{s!=null&&Xe(n,s)})),Qe.value.forEach(n=>{n.defaultValue!==void 0&&(re.value[n.key]===null||re.value[n.key]===void 0)&&Xe(n.key,n.defaultValue)}),t.sort&&(w.value=t.sort,W.value=t.sort),t.pagination&&N.value&&(N.value.page=t.pagination.page||1,N.value.perPage=t.pagination.perPage||20),vi(),E.value?E.value=!1:k.value=i($.value)}function q(t){if(!t)return;const o=i(t);return o.filterConfigs&&Array.isArray(o.filterConfigs)&&(o.filterConfigs=o.filterConfigs.map(n=>{const s={...n};return delete s.options,s})),o}function z(){var s,c,_,H,te;const t=v.value.map(Q=>({key:Q.key,label:Q.label,order:Q.order??0,sortable:Q.sortable??!1,width:Q.width,height:Q.height,freeze:Q.freeze??!1,visible:Q.visible??!0,protected:Q.protected??!1,isDefault:Q.isDefault,actionColumn:Q.actionColumn,smartTrackingColumn:Q.smartTrackingColumn,blankStyle:Q.blankStyle,cellType:Q.cellType,truncate:Q.truncate??!0,filterable:Q.filterable??!1,filterType:Q.filterType,align:Q.align??"left"})),o={};Object.entries(re.value).forEach(([Q,se])=>{se!=null&&se!==""&&!(Array.isArray(se)&&se.length===0)&&!(typeof se=="object"&&Object.keys(se).length===0)&&(o[Q]=se)});const n={columns:t,availableColumns:T.value,sort:W.value,paginationMeta:{show:((s=f.value.paginationMeta)==null?void 0:s.show)??!0,currentPage:((c=N.value)==null?void 0:c.page)||1,perPage:((_=N.value)==null?void 0:_.perPage)||20,total:Se.value},search:f.value.search??[],searchMode:f.value.searchMode??"client",showSearch:f.value.showSearch??!0,filterConfig:q(f.value.filterConfig),exportConfig:f.value.exportConfig,emptyState:f.value.emptyState,module:f.value.module,filters:o};return{module_name:f.value.module||"shipment",view_name:((H=d.gridConfig)==null?void 0:H.name)||d.config.name||"",view_config:n,...(te=d.gridConfig)!=null&&te.id?{id:d.gridConfig.id}:{}}}function ue(){const t=z();console.log("[ShiflGrid] Save View Payload:",t),console.log("[ShiflGrid] View Config (view_config):",JSON.parse(JSON.stringify(t.view_config))),u("view:save",t),k.value=i($.value)}function Ne(t){var n;if(!v.value.find(s=>s.key===t)){const s=(n=f.value.availableColumns)==null?void 0:n.find(c=>c.key===t);if(s){v.value=[...v.value,{...s,visible:!0}];return}}Z(t)}function nt(t,o){Y(t,o)}function ot(){ee()}const lt=()=>{G.value=!1,C.value?(u("view:apply",$.value),k.value=i($.value),console.log("Applied new view configuration")):de.value==="default"?(u("view:apply",$.value),E.value=!0):(k.value=i($.value),console.log("Applied column changes to saved view (unsaved modifications)"))},at=()=>{G.value=!1,le.value=!1,d.openColumnManager!==void 0&&u("view:reset")},Ze=e.ref({}),je=e.ref({}),qe=e.ref(null),We=e.ref(null),ve=e.ref(null),xe=e.ref(!1),Ge=e.ref(""),Te=e.ref(null),$e=e.ref(!1),rt=e.ref({});e.ref({});const ge=e.ref({}),Ve=e.ref(!1),Be=e.ref("Copy To Clipboard"),Ee=e.ref(null),Le=e.ref({top:0,left:0});function ye(){if(!Ee.value||!Ve.value)return;const t=Ee.value.getBoundingClientRect(),o=120,n=32,s=window.innerWidth,c=window.innerHeight,_=4;let H=t.right+_,te=t.top+t.height/2-n/2;H+o>s&&(H=t.left-o-_),H<0&&(H=10),te+n>c&&(te=c-n-10),te<0&&(te=10),Le.value={top:te,left:H}}e.watch(()=>f.value.paginationMeta,t=>{f.value.searchMode!=="server"&&t&&N.value&&(N.value.page=t.currentPage||N.value.page,N.value.perPage=t.perPage||N.value.perPage)},{deep:!0}),e.watch(()=>f.value.columns,t=>{const o=t.filter(c=>!c.smartTrackingColumn),n=new Map(v.value.map(c=>[c.key,c])),s=o.map((c,_)=>{const H=n.get(c.key);return{...c,order:(H==null?void 0:H.order)??_+1}});v.value=s},{deep:!0}),e.watch(()=>f.value.sort,t=>{t&&(W.value=t,w.value=t)},{deep:!0}),e.watch(()=>{var t;return(t=f.value.apiConfig)==null?void 0:t.additionalParams},t=>{if(t&&typeof t!="function"){const o=t;o.tabName!==void 0&&A.value!==o.tabName&&(it(),A.value=o.tabName,an())}},{deep:!0});function it(){var o;const t=((o=f.value.paginationMeta)==null?void 0:o.perPage)||20;N.value={page:1,perPage:t},h.value=void 0,w.value=f.value.sort,p.value=null,u("search-change",""),u("pagination-change",1,t)}e.watch(()=>d.search,(t,o)=>{var n;if(h.value=t,m.value=t||"",f.value.searchMode==="server")u("search-change",t||"");else if(f.value.searchMode==="client"&&t!==o){const s=((n=N.value)==null?void 0:n.perPage)||20;N.value={page:1,perPage:s},u("pagination-change",1,s)}},{immediate:!0}),e.watch(()=>W.value,t=>{w.value=t});const Ae=e.computed(()=>L.rows.value||[]),Fe=e.computed(()=>{try{return(f.value.searchMode||"client")==="server"?Ae.value||[]:Ae.value||[]}catch(t){return console.warn("Error in filteredRows computed:",t),[]}}),Se=e.computed(()=>{var t;try{return(f.value.searchMode||"client")==="client"?(Fe.value||[]).length:((t=L.paginationMeta.value)==null?void 0:t.total)||0}catch(o){return console.warn("Error in effectiveTotal computed:",o),0}}),Pe=e.computed(()=>{try{return(f.value.searchMode||"client")==="server"?Fe.value||[]:P(Fe.value||[])}catch(t){return console.warn("Error in sortedRows computed:",t),[]}}),fe=e.computed(()=>{try{if((f.value.searchMode||"client")==="server")return Pe.value||[];const o=ie.value;if(!o||!o.show)return Pe.value||[];const n=o.perPage||20,c=((o.currentPage||1)-1)*n,_=c+n;return(Pe.value||[]).slice(c,_)}catch(t){return console.warn("Error in displayRows computed:",t),[]}});e.watch(()=>fe.value,()=>{ge.value={}},{deep:!0});const ie=e.computed(()=>{var t;return f.value.searchMode==="server"&&L.paginationMeta.value?{show:!0,...L.paginationMeta.value,currentPage:((t=N.value)==null?void 0:t.page)||L.paginationMeta.value.currentPage||1}:f.value.paginationMeta}),st=e.computed(()=>{var t;return((t=ie.value)==null?void 0:t.perPage)===100}),ct=e.computed(()=>{var t;return((t=ie.value)==null?void 0:t.perPage)||10}),Ke=e.computed(()=>{const t=ie.value;if(!t||t.show===!1)return{from:0,to:0};const o=Se.value,n=t.perPage||20,s=t.currentPage||1;if((f.value.searchMode||"client")==="server"&&t.from!==void 0&&t.to!==void 0)return{from:t.from,to:t.to};const _=(s-1)*n+1,H=Math.min(s*n,o);return o===0?{from:0,to:0}:{from:_,to:H}}),ke=e.computed(()=>{var t;return((t=ie.value)==null?void 0:t.currentPage)||1}),Oe=e.computed(()=>{const t=ie.value;if(!t||t.show===!1)return 1;const o=Se.value;if(o===0)return 1;const n=t.perPage||20,s=Math.ceil(o/n);return Math.max(1,s)}),Ue=e.computed(()=>ke.value<=1),Ye=e.computed(()=>ke.value>=Oe.value),Je=e.computed(()=>{const t=Oe.value,o=ke.value,n=[];if(t<=7)for(let s=1;s<=t;s++)n.push(s);else if(o<=4){for(let s=1;s<=5;s++)n.push(s);n.push(-1),n.push(t)}else if(o>=t-3){n.push(1),n.push(-1);for(let s=t-4;s<=t;s++)n.push(s)}else{n.push(1),n.push(-1);for(let s=o-1;s<=o+1;s++)n.push(s);n.push(-1),n.push(t)}return n});function gi(t){var n;if(t<1||t>Oe.value||t===ke.value||b.value)return;const o=((n=ie.value)==null?void 0:n.perPage)||20;N.value={page:t,perPage:o},u("pagination-change",t,o)}function hi(){var n;if(Ue.value||b.value)return;const t=((n=ie.value)==null?void 0:n.perPage)||20,o=ke.value-1;N.value={page:o,perPage:t},u("pagination-change",o,t)}function yi(){var n;if(Ye.value||b.value)return;const t=((n=ie.value)==null?void 0:n.perPage)||20,o=ke.value+1;N.value={page:o,perPage:t},u("pagination-change",o,t)}function ki(t){var s;if(b.value)return;const o=t.target,n=parseInt(o.value,10);n&&n!==(((s=ie.value)==null?void 0:s.perPage)||20)&&(N.value={page:1,perPage:n},u("pagination-change",1,n))}const Ci=e.computed(()=>{const t=f.value.columns.find(n=>n.smartTrackingColumn);if(!(t!=null&&t.smartTrackingColumn))return!1;const o=t.smartTrackingColumn.dataKey;return Ae.value.some(n=>{const s=n[o];return s===!0||s===1||s==="true"||s==="1"})}),_t=e.computed(()=>f.value.columns.find(t=>t.smartTrackingColumn)),Re=e.computed(()=>{var n;const t=I.value.filter(s=>!s.smartTrackingColumn);if(Ci.value&&_t.value){const s={key:"_smart_tracking",label:"",order:-1,freeze:!0,visible:!0,protected:!0,sortable:!1,width:((n=_t.value.smartTrackingColumn)==null?void 0:n.width)||"36px",smartTrackingColumn:_t.value.smartTrackingColumn,cellType:"icon"},c=t.findIndex(_=>_.key==="ref");c>=0?t.splice(c,0,s):t.unshift(s)}const o=t.find(s=>s.key==="ref");return o&&(o.freeze=!0,o.protected=!0),t}),_i=e.computed(()=>{let t=0;const o={};for(const n of Re.value){n.freeze&&(o[n.key]=t);const s=parseInt(n.width??"160",10);Number.isNaN(s)||(t+=s)}return o}),bi=e.computed(()=>{const t=f.value.exportConfig;return(t==null?void 0:t.show)===!0}),wi=e.computed(()=>{const t=f.value.exportConfig;return!(t!=null&&t.show)||!fe.value||fe.value.length===0?!0:!Ht(t).isValid});function Vi(){const t=f.value.exportConfig;if(!t)return;const o=Ht(t);if(!o.isValid){console.error("Export configuration is invalid:",o.errors);return}const n=On(fe.value,Re.value,W.value,p.value);if(t.source==="client")Pn({exportType:t.exportType||"csv",fileName:t.exportFileName||"export",data:n});else if(t.source==="server"){const s={columns:[...f.value.columns,...f.value.availableColumns||[]],filters:p.value||[],sort:W.value,exportType:t.exportType||"csv",exportFileName:t.exportFileName||"export",search:h.value};u("export-data",s)}}const Bi=e.computed(()=>{var o,n;const t=f.value.filterConfig;return!!(t!=null&&t.filters&&(((o=t.filters.default)==null?void 0:o.length)>0||((n=t.filters.available)==null?void 0:n.length)>0))}),Ei=e.computed(()=>!!f.value.showSearch),Qe=e.computed(()=>{const t=f.value.filterConfig,o=f.value.module||"shipment";return t!=null&&t.filterConfigs?t.filterConfigs:Rn[o]||[]}),Si=e.computed(()=>{const t=[];return Qe.value.forEach(o=>{t.push(o)}),t});function Mi(){if(N.value){const t=N.value.perPage;N.value={page:1,perPage:t},u("pagination-change",1,t)}}const{updateFilterValue:bt,confirmFilterValue:Di,clearFilter:Ni,clearAllFilters:wt,applyFilters:vi}=$t(Si.value,{onFiltersChange:t=>{p.value=t,u("search-change","")},onPaginationReset:Mi,debounceTime:300}),ze=e.computed(()=>{var o;const t=f.value.filterConfig;return((o=t==null?void 0:t.filters)==null?void 0:o.default)||[]}),re=e.ref({});e.watch(()=>d.gridConfig,t=>{t&&K(t)},{immediate:!0,deep:!0}),e.watch(()=>d.isNewViewMode,(t,o)=>{if(t&&!o&&de.value==="saved"&&ae.value){u("view:unsaved",{message:"You have unsaved changes. Save before creating a new view"});return}if(t){console.log("Entered new view mode - keeping current columns unchanged until confirmation");const n={};Object.keys(re.value).forEach(s=>{n[s]=null}),ze.value.forEach(s=>{n[s]=null}),re.value=n,wt()}else console.log("Exited new view mode")},{immediate:!0}),e.onMounted(()=>{!d.gridConfig&&!d.isNewViewMode&&(k.value=i($.value))}),e.watch($,t=>{u("view:updated",t),u("view:dirty",ae.value)},{deep:!0});const xi=e.computed(()=>Object.keys(re.value).map(t=>{const o=Qe.value.find(n=>n.key===t);return o?{config:o,value:re.value[t]}:null}).filter(Boolean)),on=e.computed(()=>Qe.value.filter(t=>!ze.value.includes(t.key))),ln=e.computed(()=>Object.values(re.value).some(t=>{if(t==null||t===""||t===!1||Array.isArray(t)&&t.length===0)return!1;if(typeof t=="object"&&t!==null){const o=t;if("start"in t||"end"in t||"date"in t||"mode"in t?!o.start&&!o.end&&!o.date:Object.keys(t).length===0)return!1}return!0})),Ti=e.computed(()=>Object.keys(re.value));function Xe(t,o){re.value[t]=o,bt(t,o)}function $i(t){const o=t.defaultValue!==void 0?t.defaultValue:null;re.value[t.key]=o,bt(t.key,o),x.value&&x.value.closeDropdown(),e.nextTick(()=>{const n=Ze.value[t.key];n&&typeof n=="object"&&n!==null&&"openFilter"in n&&typeof n.openFilter=="function"&&n.openFilter()})}function Li(t){delete re.value[t]}function Ai(t){console.log("Updated default filters:",t)}function Fi(t,o){re.value[t]=o,Di(t,o)}function Pi(t){t.forEach(n=>{re.value[n]!==void 0&&(re.value[n]=null)});const o={};ze.value.forEach(n=>{o[n]=null}),re.value=o,wt()}function Oi(t){re.value[t]=null,Ni(t)}function Ri(t){var c;const n=t.target.value;m.value=n,h.value=n||void 0,u("search-change",n);const s=((c=ie.value)==null?void 0:c.perPage)||20;N.value={page:1,perPage:s},u("pagination-change",1,s)}function an(){var o;m.value="",h.value=void 0,u("search-change","");const t=((o=ie.value)==null?void 0:o.perPage)||20;N.value={page:1,perPage:t},u("pagination-change",1,t)}const rn=e.computed(()=>{const t=!!d.search&&d.search.trim().length>0,o=!!m.value&&m.value.trim().length>0;return t||o}),Vt=e.ref(null);e.watch(()=>!fe.value.length&&rn.value&&f.value.emptyState,t=>{t&&Vt.value&&(Vt.value.scrollLeft=0)});const sn=e.ref(0);function zi(t){const o=t.target;sn.value=o.scrollLeft}function Hi(t){const o=v.value.find(n=>n.key===t);!(o!=null&&o.sortable)||be(o)||pt(o)||M(t)}function He(t,o){if(t==null||t===""||t===void 0)return Me(o.blankStyle);const n=o.cellType;if(Array.isArray(n)){const s=n.find(c=>typeof c=="string"&&c!=="icon");return s&&typeof s=="string"?yn(t,s,o):""}if(!n)return typeof t=="object"?JSON.stringify(t):String(t);switch(n){case"number":return cn(t);case"date":return dn(t);case"time":return fn(t);case"datetime":return mn(t);case"boolean":return pn(t);case"text":default:return typeof t=="object"?JSON.stringify(t):String(t)}}function Me(t){switch(t){case"dash":return"--";case"zero":return"0";case"na":return"N/A";case"empty":default:return""}}function cn(t){if(typeof t=="number")return t.toLocaleString();const o=Number(t);return Number.isNaN(o)?String(t):o.toLocaleString()}function dn(t){if(t instanceof Date)return Et(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return Et(o)}return String(t)}function Bt(t){const o=t.getHours(),n=t.getMinutes(),s=o>=12?"PM":"AM",_=(o%12||12).toString().padStart(2,"0"),H=n.toString().padStart(2,"0");return`${_}:${H} ${s}`}function Et(t){const o=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0"),s=t.getFullYear().toString().slice(-2);return`${o}/${n}/${s}`}function un(t){const o=Bt(t),n=Et(t);return`${o} ${n}`}function fn(t){if(t instanceof Date)return Bt(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return Bt(o)}return String(t)}function mn(t){if(t instanceof Date)return un(t);if(typeof t=="string"){const o=new Date(t);if(!Number.isNaN(o.getTime()))return un(o)}return String(t)}function pn(t){return typeof t=="boolean"?t?"Yes":"No":t===1||t==="1"||t==="true"||t==="True"?"Yes":t===0||t==="0"||t==="false"||t==="False"?"No":String(t)}function dt(t){if(typeof t=="boolean")return t?Wo:Yo;if(Array.isArray(t)){if(t.length===0)return null;for(const o of t)if(typeof o=="string"){const n=gn(o);if(n)return n}return null}return typeof t=="string"?gn(t):null}function gn(t){switch(t.toLowerCase().trim()){case"ocean":return jt;case"air":return xo;default:return null}}function Ii(t){const o=t.toLowerCase();return["supplier","suppliers","po","pos","product_description"].includes(o)}function hn(t){if(t.cellType==="badge")return!0;const o=t.key.toLowerCase();return o==="tag"||o==="tags"}function Zi(t){return t.cellType==="status"?!0:t.key.toLowerCase()==="status"}function ji(t){return t.cellType==="icon"?!0:t.key.toLowerCase()==="type"}function qi(t){return!t||typeof t!="string"?"shifl-grid__chip shifl-grid__chip--status":`shifl-grid__chip shifl-grid__chip--status shifl-grid__chip--${t.toLowerCase().replace(/\s+/g,"_")}`}function Wi(t){return Array.isArray(t.cellType)&&t.cellType.length>0}function Gi(t){return Array.isArray(t.cellType)?t.cellType.filter(o=>typeof o=="string"):t.cellType&&typeof t.cellType=="string"?[t.cellType]:[]}function yn(t,o,n){if(t==null||t===""||t===void 0)return Me(n.blankStyle);switch(o){case"number":return cn(t);case"date":return dn(t);case"time":return fn(t);case"datetime":return mn(t);case"boolean":return pn(t);case"text":default:return typeof t=="object"?JSON.stringify(t):String(t)}}function Ki(t){return{number:"shifl-grid__composite-number",date:"shifl-grid__composite-date",boolean:"shifl-grid__composite-boolean",text:"shifl-grid__composite-text"}[t]||"shifl-grid__composite-text"}function Ui(t,o){if(t==null||t==="")return Me(o.blankStyle);if(Array.isArray(t)){if(t.length===0)return Me(o.blankStyle);const n=t.join(", ");return kn(n,45)}return typeof t=="string"?kn(t,45):String(t)}function kn(t,o){return t.length<=o?t:t.substring(0,o)+"..."}function St(t){const o=t.toLowerCase();return["po","pos","supplier","suppliers","tag","tags"].includes(o)}function Yi(t,o){return t==null||St(o)?!1:Array.isArray(t)?t.length===0?!1:t.join(", ").length>30:typeof t=="string"?t.length>30:!1}function Ji(t){return t==null?!1:Array.isArray(t)?t.length===0?!1:t.join(", ").length>45:typeof t=="string"?t.length>45:!1}function Qi(t){if(t==null)return 0;if(Array.isArray(t)){if(t.length===0||t.join(", ").length<=45)return 0;let n=0,s=0;for(const c of t){const _=String(c);if(n+_.length>45)break;n+=_.length+2,s++}return t.length-s}return typeof t=="string"&&t.length>45?1:0}function Mt(t,o,n){if(!Array.isArray(t))return[];const s=t.filter(_e=>_e!=null&&_e!==""&&_e!==void 0);if(s.length===0)return[];const c=`${o}-${n}`;if(ge.value[c])return ge.value[c];const _=120,H=12,te=4,Q=14,se=20;let we=0;const me=[];for(const _e of s){const ys=String(_e).length*6,vn=Q+ys+H+te,ks=s.length-me.length-1>0?_-se:_;if(we+vn>ks&&me.length>0)break;me.push(_e),we+=vn}return me.length===0&&s.length>0&&me.push(s[0]),ge.value[c]=me,me}function Xi(t,o,n){if(!Array.isArray(t))return!1;const s=t.filter(_=>_!=null&&_!==""&&_!==void 0),c=Mt(t,o,n);return s.length>c.length}function es(t,o,n){if(!Array.isArray(t))return 0;const s=t.filter(_=>_!=null&&_!==""&&_!==void 0),c=Mt(t,o,n);return Math.max(0,s.length-c.length)}function ts(t,o,n,s){ut(t,o,n,s)}function ut(t,o,n,s){let c="",_=!1;const H=Re.value.find(te=>te.key===t);if(H&&hn(H)){const te=Cn(n);te.length>0&&(_=!0,c=te.map(Q=>`<span class="shifl-grid__tooltip-badge" style="border-left-color: ${wn(Q)} !important">${Q.name}</span>`).join(""))}else Array.isArray(n)?n.length>0&&(c=n.join(`
76
+ `)):n!=null&&(c=String(n));Ge.value=c,$e.value=_,Te.value=s,xe.value=!0}function ft(){xe.value=!1,Te.value=null,$e.value=!1}function ns(t,o){Be.value="Copy To Clipboard",Ee.value=o,Ve.value=!0,ye()}function Dt(){Ve.value=!1,Ee.value=null}async function os(t){try{await navigator.clipboard.writeText(t),Be.value="Copied!",setTimeout(()=>{Dt()},2e3)}catch(o){console.error("Failed to copy text: ",o);const n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),Be.value="Copied!",setTimeout(()=>{Dt()},2e3)}}function ls(t,o,n){n&&(rt.value[`${t}-${o}`]=n)}function mt(t){return t==null?[]:Array.isArray(t)?t.map(o=>typeof o=="object"&&o!==null&&"name"in o?String(o.name):String(o)).filter(o=>o.length>0):typeof t=="string"?t.split(",").map(o=>o.trim()).filter(o=>o.length>0):[String(t)]}function Cn(t){return t==null?[]:Array.isArray(t)?t.map(o=>typeof o=="object"&&o!==null&&"name"in o?{name:String(o.name),color:"color"in o?String(o.color):void 0}:{name:String(o),color:void 0}).filter(o=>o.name.length>0):typeof t=="string"?t.split(",").map(o=>o.trim()).filter(o=>o.length>0).map(o=>({name:o,color:void 0})):[{name:String(t),color:void 0}]}function _n(t,o,n){const s=mt(t);if(s.length===0)return[];const c=`${o}-${n}`;if(ge.value[c])return ge.value[c];const _=130,H=8,te=4;let Q=0;const se=[];for(const we of s){const me=we.length*8+H+te;if(Q+me>_&&se.length>0)break;se.push(we),Q+=me}return ge.value[c]=se,se}function bn(t,o,n,s){const c=Cn(t);if(c.length===0)return[];const _=(s==null?void 0:s.id)||n,H=`${o}-${_}-objects`;if(ge.value[H])return ge.value[H];const te=130,Q=8,se=4;let we=0;const me=[];for(const _e of c){const ht=_e.name.length*8+Q+se;if(me.length===0){me.push(_e),we+=ht;continue}if(we+ht>te)break;me.push(_e),we+=ht}return ge.value[H]=me,me}function as(t,o,n){const s=mt(t),c=_n(t,o,n);return s.length>c.length}function rs(t,o,n){const s=mt(t),c=_n(t,o,n);return s.length-c.length}function is(t){const o=t.toLowerCase(),n={"high priority":"var(--shifl-color-error-r70)",express:"var(--shifl-color-primary-b80)",fragile:"var(--shifl-color-warning-o70)","temperature controlled":"var(--shifl-color-primary-b70)","customs clearance required":"var(--shifl-color-accent-p80)","insurance required":"var(--shifl-color-primary-b90)","special handling":"var(--shifl-color-warning-o80)","urgent delivery":"var(--shifl-color-error-r80)",normal:"var(--shifl-color-neutral-n60)",low:"var(--shifl-color-neutral-n50)"};if(n[o])return n[o];for(const[s,c]of Object.entries(n))if(o.includes(s)||s.includes(o))return c;return ss(t)}function wn(t){return t.color&&t.color!==""?t.color:is(t.name)}function ss(t){let o=0;for(let s=0;s<t.length;s++)o=t.charCodeAt(s)+((o<<5)-o);const n=["var(--shifl-color-primary-b80)","var(--shifl-color-success-g70)","var(--shifl-color-warning-o70)","var(--shifl-color-error-r70)","var(--shifl-color-accent-p80)","var(--shifl-color-primary-b70)","var(--shifl-color-success-g60)","var(--shifl-color-warning-o60)"];return n[Math.abs(o)%n.length]}function Nt(t,o=!0){const s={...{width:t.width??"160px",minWidth:t.width??"160px"}},c=sn.value>0,_=v.value.filter(te=>te.freeze),H=_[_.length-1];if(t.freeze){const te=_i.value[t.key]??0;s.position="sticky",s.left=`${te}px`,s.background="#ffffff",s.zIndex=o?40:10,t.key===(H==null?void 0:H.key)&&c?s.boxShadow="2px 0px 4px -2px #121b2b0d, 2px 0px 2px 0px #121b2b0d":s.boxShadow="none"}return o&&(s.position="sticky",s.top="0px"),s}const cs=e.computed(()=>[...v.value,...f.value.availableColumns||[]].reduce((n,s)=>(n.some(c=>c.key===s.key)||n.push(s),n),[]).filter(n=>!n.smartTrackingColumn));function be(t){return!!t.actionColumn}function pt(t){return!!t.smartTrackingColumn}function ds(t){return t.key==="ref"}function us(t,o){if(!t.smartTrackingColumn)return!1;const n=t.smartTrackingColumn.dataKey,s=o[n];if(s===!0||s===1)return!0;if(typeof s=="string"){const c=s.toLowerCase().trim();return c==="true"||c==="1"||c==="yes"}return!1}function Ce(t,o){if(!t.actionColumn)return null;const n=t.actionColumn.icon;return n?typeof n=="function"?n(o):n:null}function fs(t,o,n,s){if(!n.actionColumn)return;const c=s.currentTarget;if(U.value.rowIndex===t){F();return}We.value=n,ve.value=o,J(t,c)}function ms(t,o){return!(t!=null&&t.actionColumn)||!o?[]:(typeof t.actionColumn.actions=="function"?t.actionColumn.actions(o):t.actionColumn.actions||[]).filter(s=>s.show?s.show(o):!0)}function ps(t,o,n){u("action-click",t.key,o,n),F()}function gt(t){var o;return((o=t.actionColumn)==null?void 0:o.displayType)||"menu"}function Vn(t,o){var n;return(n=t.actionColumn)!=null&&n.buttonText?typeof t.actionColumn.buttonText=="function"?t.actionColumn.buttonText(o):t.actionColumn.buttonText:"Actions"}function vt(t,o,n){var s;(s=t.actionColumn)!=null&&s.onAction?t.actionColumn.onAction(o,n):u("action-click","default",o,n)}const gs=(t,o)=>{["BUTTON","A","INPUT","SELECT","TEXTAREA","SVG","PATH"].includes(o.target.tagName)||u("row-click",t)};function hs(t,o){o&&(je.value[t]=o)}function Bn(t){if(U.value.rowIndex===null)return;const o=t.target,n=qe.value,s=Object.values(je.value),c=n==null?void 0:n.contains(o),_=s.some(H=>H.contains(o));!c&&!_&&F()}return e.onMounted(()=>{document.addEventListener("click",Bn),document.addEventListener("scroll",ye),window.addEventListener("scroll",ye),window.addEventListener("resize",ye)}),e.watch(ze,t=>{t.forEach(o=>{if(!(o in re.value)){const n=Qe.value.find(c=>c.key===o),s=(n==null?void 0:n.defaultValue)!==void 0?n.defaultValue:null;re.value[o]=s,bt(o,s)}})},{immediate:!0}),e.onUnmounted(()=>{document.removeEventListener("click",Bn),document.removeEventListener("scroll",ye),window.removeEventListener("scroll",ye),window.removeEventListener("resize",ye),L.cancelCurrentRequest()}),(t,o)=>(e.openBlock(),e.createElementBlock("div",Ia,[e.createElementVNode("div",Za,[e.createElementVNode("div",ja,[Ei.value?(e.openBlock(),e.createElementBlock("div",qa,[e.createElementVNode("div",Wa,[e.createVNode(Wt,{class:"shifl-grid__search-icon",color:"#253041"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=n=>m.value=n),type:"text",placeholder:"Search",class:"shifl-grid__search-input",onInput:Ri,onFocus:o[1]||(o[1]=n=>y.value=!0),onBlur:o[2]||(o[2]=n=>y.value=!1)},null,544),[[e.vModelText,m.value]]),m.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__search-clear",onClick:an},[e.createVNode(et,{class:"shifl-grid__clear-icon",color:y.value?"#1A6D9E":"#253041"},null,8,["color"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),Bi.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xi.value,n=>{var s;return e.openBlock(),e.createBlock(Aa,{key:((s=n==null?void 0:n.config)==null?void 0:s.key)||"",ref_for:!0,ref:c=>{var _;return Ze.value[((_=n==null?void 0:n.config)==null?void 0:_.key)||""]=c},config:n==null?void 0:n.config,"model-value":n==null?void 0:n.value,"onUpdate:modelValue":c=>{var _;return Xe(((_=n==null?void 0:n.config)==null?void 0:_.key)||"",c)},onConfirm:c=>{var _;return Fi(((_=n==null?void 0:n.config)==null?void 0:_.key)||"",c)},onClear:o[3]||(o[3]=c=>Oi(c))},null,8,["config","model-value","onUpdate:modelValue","onConfirm"])}),128)),on.value.length>0?(e.openBlock(),e.createBlock(Ha,{key:0,ref_key:"filterDropdownRef",ref:x,"available-filters":on.value,"active-filter-keys":Ti.value,"default-filter-keys":ze.value,"has-active-filters-with-value":ln.value,onAddFilter:$i,onRemoveFilter:Li,onUpdateDefaultFilters:Ai,onClearAllFilters:Pi},null,8,["available-filters","active-filter-keys","default-filter-keys","has-active-filters-with-value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ga,[e.createElementVNode("button",{type:"button",class:"shifl-grid__pill-button whitespace-nowrap",onClick:O},[e.createVNode(ul),o[6]||(o[6]=e.createTextVNode(" Edit Column ",-1))]),bi.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__pill-button whitespace-nowrap flex items-center",disabled:wi.value,onClick:Vi,title:"Export Data"},[e.createVNode(Xo),o[7]||(o[7]=e.createTextVNode(" Export ",-1))],8,Ka)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["shifl-grid__pill-button whitespace-nowrap flex items-center save-view",{"shifl-grid__pill-button--disabled":!S.value}]),disabled:!S.value,title:"Save View",onClick:ue},[e.createVNode(il),o[8]||(o[8]=e.createTextVNode(" Save View ",-1))],10,Ua)])]),e.createElementVNode("div",{ref_key:"gridViewport",ref:Vt,class:e.normalizeClass(["shifl-grid__viewport",{"shifl-grid__viewport--scroll":st.value,"shifl-grid__viewport--empty":!fe.value.length}]),onScroll:zi},[e.createElementVNode("table",Ya,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,n=>{var s;return e.openBlock(),e.createElementBlock("th",{key:n.key,style:e.normalizeStyle(Nt(n,!0)),onClick:()=>Hi(n.key),class:e.normalizeClass(["shifl-grid__header-cell",`shifl-grid__header-align-${n!=null&&n.align?n.align:"left"}`,{"shifl-grid__cell--sticky":n.freeze,"shifl-grid__sortable-col":n.sortable,"shifl-grid__icon":n.cellType==="icon","shifl-grid__hover-sortable":n.sortable&&!be(n)&&!pt(n)}])},[e.createElementVNode("div",Qa,[n.label?(e.openBlock(),e.createElementBlock("span",Xa,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),((s=e.unref(W))==null?void 0:s.key)===n.key&&e.unref(W).order?(e.openBlock(),e.createElementBlock("span",er,[e.unref(W).order==="asc"?(e.openBlock(),e.createBlock(Zt,{key:0})):(e.openBlock(),e.createBlock(Bo,{key:1}))])):n.sortable&&!be(n)&&!pt(n)?(e.openBlock(),e.createElementBlock("span",tr,[e.createVNode(Zt,{color:"#69758C"})])):e.createCommentVNode("",!0)])],14,Ja)}),128))])]),e.createElementVNode("tbody",null,[b.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ct.value,n=>(e.openBlock(),e.createElementBlock("tr",{key:`skeleton-${n}`,class:"shifl-grid__skeleton-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,s=>(e.openBlock(),e.createElementBlock("td",{key:s.key,style:e.normalizeStyle(Nt(s,!1)),class:e.normalizeClass({"shifl-grid__cell--sticky":s.freeze})},[...o[9]||(o[9]=[e.createElementVNode("div",{class:"shifl-grid__skeleton-cell"},null,-1)])],6))),128))]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(fe.value,(n,s)=>(e.openBlock(),e.createElementBlock("tr",{key:s,onClick:c=>gs(n,c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Re.value,c=>(e.openBlock(),e.createElementBlock("td",{key:c.key,style:e.normalizeStyle(Nt(c,!1)),class:e.normalizeClass([{"shifl-grid__cell--sticky":c.freeze},{"shifl-grid__cell--action":be(c)},`shifl-grid__cell-align-${c!=null&&c.align?c.align:"left"}`,{"shifl-grid__icon":c.cellType==="icon"}])},[pt(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[us(c,n)?(e.openBlock(),e.createElementBlock("div",or,[e.createVNode(ho)])):e.createCommentVNode("",!0)],64)):be(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[gt(c)==="menu"?(e.openBlock(),e.createElementBlock("div",lr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-icon",ref_for:!0,ref:_=>hs(s,_),onClick:e.withModifiers(_=>fs(s,n,c,_),["stop"])},[Ce(c,n)?typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,ir)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:2,class:"w-4 h-4"})):(e.openBlock(),e.createElementBlock("span",rr,"⋯"))],8,ar)])):gt(c)==="button"?(e.openBlock(),e.createElementBlock("div",sr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-button",onClick:e.withModifiers(()=>vt(c,n,s),["stop"])},e.toDisplayString(Vn(c,n)),9,cr)])):gt(c)==="icon"?(e.openBlock(),e.createElementBlock("div",dr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-icon",onClick:e.withModifiers(()=>vt(c,n,s),["stop"])},[typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,fr)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:1,class:"w-4 h-4"}))],8,ur)])):gt(c)==="button-icon"?(e.openBlock(),e.createElementBlock("div",mr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__action-button-icon",onClick:e.withModifiers(()=>vt(c,n,s),["stop"])},[typeof Ce(c,n)=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Ce(c,n),class:"w-4 h-4 inline-block"},null,8,gr)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ce(c,n)),{key:1,class:"w-4 h-4"})),e.createElementVNode("span",hr,e.toDisplayString(Vn(c,n)),1)],8,pr)])):e.createCommentVNode("",!0)],64)):Wi(c)?(e.openBlock(),e.createElementBlock("div",yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Gi(c),(_,H)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:H},[_==="icon"&&dt(n[c.key])?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(dt(n[c.key])),{key:0,class:"shifl-grid__type-icon"})):_==="icon"?(e.openBlock(),e.createElementBlock("span",kr,e.toDisplayString(Me(c.blankStyle)),1)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(Ki(_))},e.toDisplayString(yn(n[c.key],_,c)),3))],64))),128))])):ji(c)?(e.openBlock(),e.createElementBlock("div",Cr,[dt(n[c.key])?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(dt(n[c.key])),{key:0,class:"shifl-grid__type-icon"})):(e.openBlock(),e.createElementBlock("span",_r,e.toDisplayString(Me(c.blankStyle)),1)),n.container_count!=null?(e.openBlock(),e.createElementBlock("span",br," ("+e.toDisplayString(n.container_count)+") ",1)):e.createCommentVNode("",!0)])):hn(c)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[n[c.key]==null||bn(n[c.key],c.key,s,n).length===0?(e.openBlock(),e.createElementBlock("div",wr,e.toDisplayString(Me(c.blankStyle)),1)):(e.openBlock(),e.createElementBlock("div",Vr,[e.createElementVNode("div",Br,[e.createElementVNode("div",{ref_for:!0,ref:"(el) => setTagsRef(col.key, rowIndex, el as HTMLElement)",class:"shifl-grid__chips-container shifl-grid__chips-container--single-line"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(bn(n[c.key],c.key,s,n),(_,H)=>(e.openBlock(),e.createElementBlock("span",{key:H,class:"shifl-grid__chip shifl-grid__chip--tag",style:e.normalizeStyle({borderLeftColor:wn(_)})},e.toDisplayString(_.name),5))),128))],512)]),as(n[c.key],c.key,s)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:_=>ut(c.key,s,n[c.key],_.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(rs(n[c.key],c.key,s)),41,Er)):e.createCommentVNode("",!0)]))],64)):Zi(c)?(e.openBlock(),e.createElementBlock("div",Sr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(mt(n[c.key]),(_,H)=>(e.openBlock(),e.createElementBlock("span",{key:H,class:e.normalizeClass(qi(_))},e.toDisplayString(_),3))),128))])):c.cellType==="icon-text"?(e.openBlock(),e.createElementBlock("div",Mr,[Array.isArray(n[c.key])?(e.openBlock(),e.createElementBlock("div",Dr,[e.createElementVNode("div",Nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Mt(n[c.key],c.key,s),(_,H)=>(e.openBlock(),e.createElementBlock("div",{key:H,class:"shifl-grid__icon-text-badge"},[e.createVNode(qt,{class:"shifl-grid__icon-text-icon"}),e.createElementVNode("span",{class:"shifl-grid__icon-text-name",title:String(_||"")},e.toDisplayString(He(_,c)),9,vr)]))),128))]),Xi(n[c.key],c.key,s)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:_=>ts(c.key,s,n[c.key],_.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(es(n[c.key],c.key,s)),41,xr)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n[c.key]&&He(n[c.key],c)?(e.openBlock(),e.createElementBlock("div",Tr,[e.createVNode(qt,{class:"shifl-grid__icon-text-icon"}),e.createElementVNode("span",{class:"shifl-grid__icon-text-name",title:String(n[c.key]||"")},e.toDisplayString(He(n[c.key],c)),9,$r)])):e.createCommentVNode("",!0)],64))])):c.truncate!==!1&&(c.truncate===!0||Ii(c.key))?(e.openBlock(),e.createElementBlock("div",Lr,[e.createElementVNode("span",{class:"shifl-grid__truncated-text",ref_for:!0,ref:_=>ls(c.key,s,_)},e.toDisplayString(Ui(n[c.key],c)),513),St(c.key)&&Ji(n[c.key])?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"shifl-grid__counter-button",onMouseenter:_=>ut(c.key,s,n[c.key],_.currentTarget),onMouseleave:ft}," +"+e.toDisplayString(Qi(n[c.key])),41,Ar)):!St(c.key)&&Yi(n[c.key],c.key)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"shifl-grid__info-icon-button",onMouseenter:_=>ut(c.key,s,n[c.key],_.currentTarget),onMouseleave:ft},[e.createVNode(Oo)],40,Fr)):e.createCommentVNode("",!0)])):c.cellType==="link"?(e.openBlock(),e.createElementBlock("a",{key:8,href:String(n[c.key]||""),class:"shifl-grid__link-cell",onClick:o[4]||(o[4]=e.withModifiers(()=>{},["stop"]))},e.toDisplayString(He(n[c.key],c)),9,Pr)):ds(c)?(e.openBlock(),e.createElementBlock("div",{key:9,class:"shifl-grid__reference-cell",onMouseenter:_=>ns(String(n[c.key]||""),_.currentTarget),onMouseleave:Dt},[e.createElementVNode("span",Rr,e.toDisplayString(He(n[c.key],c)),1),n[c.key]?(e.openBlock(),e.createElementBlock("button",{key:0,class:"shifl-grid__copy-icon",onClick:e.withModifiers(()=>os(String(n[c.key]||"")),["stop"]),type:"button"},[e.createVNode(Io)],8,zr)):e.createCommentVNode("",!0)],40,Or)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[e.createTextVNode(e.toDisplayString(He(n[c.key],c)),1)],64))],6))),128))],8,nr))),128))])]),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Hr,[!fe.value.length&&(rn.value||ln.value)&&f.value.emptyState?(e.openBlock(),e.createElementBlock("div",Ir,[e.createVNode(hl,{"icon-name":f.value.emptyState.iconName,title:f.value.emptyState.title,description:f.value.emptyState.description},null,8,["icon-name","title","description"])])):fe.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Zr," No data available "))]))],34),ie.value&&ie.value.show!==!1?(e.openBlock(),e.createElementBlock("div",jr,[e.createElementVNode("div",qr,[e.createElementVNode("span",Wr,[o[10]||(o[10]=e.createTextVNode(" Showing ",-1)),e.createElementVNode("span",Gr,e.toDisplayString(Ke.value.from)+"–"+e.toDisplayString(Ke.value.to),1),e.createTextVNode(" of "+e.toDisplayString(Se.value),1)])]),e.createElementVNode("div",Kr,[e.createElementVNode("div",Ur,[o[12]||(o[12]=e.createElementVNode("label",{class:"shifl-grid__pagination-label"},"Row per page",-1)),e.createElementVNode("select",{value:ie.value.perPage||20,disabled:b.value,onChange:ki,class:"shifl-grid__pagination-select"},[...o[11]||(o[11]=[e.createStaticVNode('<option value="20">20</option><option value="30">30</option><option value="50">50</option><option value="75">75</option><option value="100">100</option>',5)])],40,Yr)]),e.createElementVNode("div",Jr,[e.createElementVNode("button",{type:"button",class:"shifl-grid__pagination-button",disabled:Ue.value||d.loading,onClick:hi,"aria-label":"Previous page"}," ‹ ",8,Qr),e.createElementVNode("div",Xr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Je.value,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n!==-1?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:e.normalizeClass(["shifl-grid__pagination-page",{"shifl-grid__pagination-page--active":n===ke.value}]),disabled:b.value,onClick:s=>gi(n)},e.toDisplayString(n),11,ei)):(e.openBlock(),e.createElementBlock("span",ti,"…"))],64))),128))]),e.createElementVNode("button",{type:"button",class:"shifl-grid__pagination-button",disabled:Ye.value||d.loading,onClick:yi,"aria-label":"Next page"}," › ",8,ni)])])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(U).rowIndex!==null&&e.unref(U).position?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"actionMenuRef",ref:qe,class:"shifl-grid__action-menu",style:e.normalizeStyle(`
57
77
  position: fixed !important;
58
- top: ${e.unref(x).position.top}px !important;
59
- left: ${e.unref(x).position.left}px !important;
60
- z-index: 1000 !important;`),onClick:o[5]||(o[5]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(us(Ge.value,ve.value),n=>(e.openBlock(),e.createElementBlock("div",{key:n.key,class:e.normalizeClass(["shifl-grid__action-menu-item",{"shifl-grid__action-menu-item--danger":n.danger}]),onClick:()=>ms(n,ve.value,e.unref(x).rowIndex)},[n.icon&&typeof n.icon=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.icon,class:"w-4 h-4 inline-block"},null,8,oi)):n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(typeof n.icon=="function"?n.icon():n.icon),{key:1,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(n.label),1)],10,ni))),128))],4)):e.createCommentVNode("",!0)])),e.createVNode(fo,{content:Ke.value,visible:xe.value,"trigger-element":$e.value,"is-html":Te.value},null,8,["content","visible","trigger-element","is-html"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Be.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"shifl-grid__copy-tooltip",style:e.normalizeStyle({position:"fixed",top:`${Le.value.top}px`,left:`${Le.value.left}px`,zIndex:"10000"})},[o[13]||(o[13]=e.createElementVNode("div",{class:"shifl-grid__copy-tooltip-arrow"},null,-1)),e.createElementVNode("div",li,e.toDisplayString(Ve.value),1)],4)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.value?(e.openBlock(),e.createBlock(io,{key:0,"title-prefix":w.value,columns:ss.value,"is-new-view-mode":S.value,"saved-view-config":R.value,"default-columns":P.value,onApply:nt,onClose:ot,onToggle:de,onToggleFreeze:e.unref(q),onMove:Ne,onReset:tt},null,8,["title-prefix","columns","is-new-view-mode","saved-view-config","default-columns","onToggleFreeze"])):e.createCommentVNode("",!0)]))]))}}),ai={install(l){l.component("ShiflGrid",Xt)}};function ri(){const l=e.ref(new Set);function r(i){const a=i.id??JSON.stringify(i),d=new Set(l.value);d.has(a)?d.delete(a):d.add(a),l.value=d}return{selectedKeys:l,toggleRow:r}}function ii(){return{}}const en=Symbol("shifl-grid-theme"),tn={surface:"var(--shifl-surface)",surfaceAlt:"var(--shifl-surface-alt)",border:"var(--shifl-border)",text:"var(--shifl-text)",textMuted:"var(--shifl-text-muted)",accent:"var(--shifl-accent)",accentStrong:"var(--shifl-accent-strong)",focus:"var(--shifl-focus)"};function si(l){const r=e.ref({...tn,...l});return e.provide(en,r),r}function ci(){const l=e.inject(en);return e.computed(()=>(l==null?void 0:l.value)??tn)}const kt={sm:640,lg:1024};function di(){const l=e.ref(typeof window<"u"?window.innerWidth:0);function r(){l.value=window.innerWidth}return e.onMounted(()=>{window.addEventListener("resize",r)}),e.onUnmounted(()=>{window.removeEventListener("resize",r)}),{width:l,isMobile:e.computed(()=>l.value<kt.sm),isTablet:e.computed(()=>l.value>=kt.sm&&l.value<kt.lg)}}function fi(){return{}}function ui(){return{}}function mi(){return{}}le.DatePicker=Yt,le.ShiflGrid=Xt,le.ShiflGridPlugin=ai,le.provideGridTheme=si,le.useBreakpoints=di,le.useGridColumns=vt,le.useGridData=Tt,le.useGridEditing=ii,le.useGridFilter=xn,le.useGridFilterWithAPI=$t,le.useGridInfiniteScroll=fi,le.useGridSelection=ri,le.useGridSort=xt,le.useGridTheme=ci,le.useGridTour=mi,le.useVirtualScroll=ui,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
78
+ top: ${e.unref(U).position.top}px !important;
79
+ left: ${e.unref(U).position.left}px !important;
80
+ z-index: 1000 !important;`),onClick:o[5]||(o[5]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ms(We.value,ve.value),n=>(e.openBlock(),e.createElementBlock("div",{key:n.key,class:e.normalizeClass(["shifl-grid__action-menu-item",{"shifl-grid__action-menu-item--danger":n.danger}]),onClick:()=>ps(n,ve.value,e.unref(U).rowIndex)},[n.icon&&typeof n.icon=="string"?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.icon,class:"w-4 h-4 inline-block"},null,8,li)):n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(typeof n.icon=="function"?n.icon():n.icon),{key:1,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(n.label),1)],10,oi))),128))],4)):e.createCommentVNode("",!0)])),e.createVNode(fo,{content:Ge.value,visible:xe.value,"trigger-element":Te.value,"is-html":$e.value},null,8,["content","visible","trigger-element","is-html"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[Ve.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"shifl-grid__copy-tooltip",style:e.normalizeStyle({position:"fixed",top:`${Le.value.top}px`,left:`${Le.value.left}px`,zIndex:"10000"})},[o[13]||(o[13]=e.createElementVNode("div",{class:"shifl-grid__copy-tooltip-arrow"},null,-1)),e.createElementVNode("div",ai,e.toDisplayString(Be.value),1)],4)):e.createCommentVNode("",!0)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[G.value?(e.openBlock(),e.createBlock(so,{key:0,"title-prefix":B.value,columns:cs.value,"is-new-view-mode":V.value,"saved-view-config":X.value,"default-columns":R.value,onApply:lt,onClose:at,onToggle:Ne,onToggleFreeze:e.unref(j),onMove:nt,onReset:ot},null,8,["title-prefix","columns","is-new-view-mode","saved-view-config","default-columns","onToggleFreeze"])):e.createCommentVNode("",!0)]))]))}}),ri={install(l){l.component("ShiflGrid",en)}};function ii(){const l=e.ref(new Set);function r(i){const a=i.id??JSON.stringify(i),d=new Set(l.value);d.has(a)?d.delete(a):d.add(a),l.value=d}return{selectedKeys:l,toggleRow:r}}function si(){return{}}const tn=Symbol("shifl-grid-theme"),nn={surface:"var(--shifl-surface)",surfaceAlt:"var(--shifl-surface-alt)",border:"var(--shifl-border)",text:"var(--shifl-text)",textMuted:"var(--shifl-text-muted)",accent:"var(--shifl-accent)",accentStrong:"var(--shifl-accent-strong)",focus:"var(--shifl-focus)"};function ci(l){const r=e.ref({...nn,...l});return e.provide(tn,r),r}function di(){const l=e.inject(tn);return e.computed(()=>(l==null?void 0:l.value)??nn)}const Ct={sm:640,lg:1024};function ui(){const l=e.ref(typeof window<"u"?window.innerWidth:0);function r(){l.value=window.innerWidth}return e.onMounted(()=>{window.addEventListener("resize",r)}),e.onUnmounted(()=>{window.removeEventListener("resize",r)}),{width:l,isMobile:e.computed(()=>l.value<Ct.sm),isTablet:e.computed(()=>l.value>=Ct.sm&&l.value<Ct.lg)}}function fi(){return{}}function mi(){return{}}function pi(){return{}}ne.DatePicker=Jt,ne.ShiflGrid=en,ne.ShiflGridPlugin=ri,ne.provideGridTheme=ci,ne.useBreakpoints=ui,ne.useGridColumns=xt,ne.useGridData=Lt,ne.useGridEditing=si,ne.useGridFilter=Tn,ne.useGridFilterWithAPI=$t,ne.useGridInfiniteScroll=fi,ne.useGridSelection=ii,ne.useGridSort=Tt,ne.useGridTheme=di,ne.useGridTour=pi,ne.useVirtualScroll=mi,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});