import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{Kr as t,nt as n,q as r,rt as i}from"./assetDetailsContext-C5OMsT3l.js";var a=e(t()),o=e=>{let[t,n]=(0,a.useState)(!1),i=(0,a.useRef)(!0),[o,s]=r();return(0,a.useEffect)(()=>{e.forEach(({key:e,value:t,setter:n})=>{o.has(e)&&i.current?n(decodeURIComponent(o.get(e)||``)):o.set(e,t)}),s(o,{replace:!0}),i.current=!1,t||n(!0)},[o,JSON.stringify(e)]),t};i();var s=(e,t)=>{if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;var r=n(e,`DD/MM/YYYY HH:mm:ss`),i=n(t,`DD/MM/YYYY HH:mm:ss`);return!r.isValid()&&!i.isValid()?0:r.isValid()?i.isValid()?r.valueOf()-i.valueOf():1:-1},c=(e,t)=>{if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;var r=n(e,`DD/MM/YYYY`),i=n(t,`DD/MM/YYYY`);if(!r.isValid()&&!i.isValid())return 0;if(!r.isValid())return-1;if(!i.isValid())return 1;let a=r.format(`YYYYMMDD`),o=i.format(`YYYYMMDD`);return a===o?0:a<o?-1:1};export{c as n,o as r,s as t};
//# sourceMappingURL=dateComparator-CQKge_6G.js.map