@flarehr/salpac-finops-admin 1.0.893 → 1.0.895

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.
@@ -17,7 +17,7 @@ var za=Object.defineProperty;var ja=(e,t,r)=>t in e?za(e,t,{enumerable:!0,config
17
17
  ${({disabled:e})=>e&&{cursor:"not-allowed","--tw-bg-opacity":"1",backgroundColor:"rgb(156 163 175 / var(--tw-bg-opacity))",":hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(156 163 175 / var(--tw-bg-opacity))"}}}
18
18
  `,Fr=({as:e,download:t,href:r,disabled:n,children:i,onClick:o,type:a})=>x(Hl,{as:e||"button",download:t,href:r,type:a||"button",disabled:n,onClick:o,children:i}),ba=({blob:e,children:t,fileName:r})=>{const[n,i]=J();return ee(()=>{const o=URL.createObjectURL(e);return i(o),()=>{URL.revokeObjectURL(o),i(void 0)}},[e]),x(Fr,{as:"a",href:n??"#",download:r,children:t})},wa=Ue.div`
19
19
  ${()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"var(--fl-color-primary-600)",borderLeftColor:"transparent",borderTopColor:"transparent"})}
20
- `,Xn=async e=>{var t;try{const r=await((t=e.response)==null?void 0:t.text());return JSON.parse(r)}catch{return{}}},xa=e=>new Date(Date.now()+e*24*60*60*1e3).toISOString().split("T")[0],Ul=15e3;class Et extends Error{constructor(r,n){super(r);pi(this,"_response");this._response=n,Object.setPrototypeOf(this,Et.prototype)}get response(){return this._response}}const Sa=async(e,t,r,n)=>{var a;const i=n instanceof FormData,o=await fetch(e,{method:r,body:n&&!i?JSON.stringify(n):n,headers:{"x-app-version":"1.0.893",authorization:`Bearer ${t}`},signal:(a=AbortSignal==null?void 0:AbortSignal.timeout)==null?void 0:a.call(AbortSignal,Ul)});if(!o.ok)throw new Et(`[API Error] Status: ${o.status}, ${o.statusText}`,o);return o},ka=async(e,t,r,n)=>{const i=await Sa(e,t,r,n),o=i.headers.get("Content-Type");return o!=null&&o.includes("application/json")?await i.json():await i.blob()},Ca=Be({backend:{url:"",accessToken:""}}),Bl=()=>Se(Ca),Ze=e=>{const t=Bl();return ge(()=>e(t),[e,t])},Wl=e=>async t=>{const r=new FormData;r.append("source",t.source),r.append("transactionFile",t.transactionsFile);const n=new URL(`${e.backend.url}/salary-packaging/admin/v1.0/catche/receipt-batch`);return ka(n,e.backend.accessToken,"POST",r)},zl=e=>async t=>{const r=new URL(`${e.backend.url}/salary-packaging/admin/v1.0/reports/${t.report}?startDate=${t.startDate||""}&endDate=${t.endDate||""}&groupCode=${t.groupCode||""}&clientId=${t.clientId||""}`);return ka(r,e.backend.accessToken,"GET")},$t=(e,t)=>async r=>{const n=xa(2),i=new URL(`${e.backend.url}${t}`);return Sa(i,e.backend.accessToken,"POST",{startDate:r,endDate:n})},jl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/clients"),ql=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/drivers"),Gl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/contract-budgets"),Kl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/invoice-items"),Yl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/deleted-invoice-items"),Ql=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/vehicle-contracts"),Zn=()=>({postCatcheReceiptBatch:Ze(Wl),getCatcheReport:Ze(zl),ingestClients:Ze(jl),ingestDrivers:Ze(ql),ingestContractBudgets:Ze(Gl),ingestInvoiceItems:Ze(Kl),ingestDeletedInvoiceItems:Ze(Yl),ingestVehicleContracts:Ze(Ql)});var Xl=Object.defineProperty,Zl=(e,t,r)=>t in e?Xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kr=(e,t,r)=>(Zl(e,typeof t!="symbol"?t+"":t,r),r);let Jl=class{constructor(){Kr(this,"current",this.detect()),Kr(this,"handoffState","pending"),Kr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},dt=new Jl,Te=(e,t)=>{dt.isServer?ee(e,t):ot(e,t)};function He(e){let t=H(e);return Te(()=>{t.current=e},[e]),t}function Ea(e,t){let[r,n]=J(e),i=He(e);return Te(()=>n(i.current),[i,n,...t]),r}let M=function(e){let t=He(e);return P.useCallback((...r)=>t.current(...r),[t])};function ec(e,t,r){let[n,i]=J(r),o=e!==void 0,a=H(o),s=H(!1),c=H(!1);return o&&!a.current&&!s.current?(s.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!c.current&&(c.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:n,M(f=>(o||i(f),t==null?void 0:t(f)))]}function tc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function it(){let e=[],t={addEventListener(r,n,i,o){return r.addEventListener(n,i,o),t.add(()=>r.removeEventListener(n,i,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return tc(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,i){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:i}),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=it();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let i of e.splice(n,1))i()}},dispose(){for(let r of e.splice(0))r()}};return t}function St(){let[e]=J(it);return ee(()=>()=>e.dispose(),[e]),e}function rc(){let e=typeof document>"u";return"useSyncExternalStore"in sr?(t=>t.useSyncExternalStore)(sr)(()=>()=>{},()=>!1,()=>!e):!1}function Jn(){let e=rc(),[t,r]=J(dt.isHandoffComplete);return t&&dt.isHandoffComplete===!1&&r(!1),ee(()=>{t!==!0&&r(!0)},[t]),ee(()=>dt.handoff(),[]),e?!1:t}var Xi;let Lr=(Xi=P.useId)!=null?Xi:function(){let e=Jn(),[t,r]=P.useState(e?()=>dt.nextId():null);return Te(()=>{t===null&&r(dt.nextId())},[t]),t!=null?""+t:void 0};function he(e,t,...r){if(e in t){let i=t[e];return typeof i=="function"?i(...r):i}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,he),n}function $a(e){return dt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Zi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var nc=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(nc||{}),ic=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ic||{}),oc=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(oc||{}),ei=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ei||{});function Ta(e,t=0){var r;return e===((r=$a(e))==null?void 0:r.body)?!1:he(t,{0(){return e.matches(Zi)},1(){let n=e;for(;n!==null;){if(n.matches(Zi))return!0;n=n.parentElement}return!1}})}var ac=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ac||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function sc(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),o=t(n);if(i===null||o===null)return 0;let a=i.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function lc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function cc(){return/Android/gi.test(window.navigator.userAgent)}function uc(){return lc()||cc()}function Qt(e,t,r){let n=He(t);ee(()=>{function i(o){n.current(o)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function dc(e,t,r){let n=He(t);ee(()=>{function i(o){n.current(o)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function fc(e,t,r=!0){let n=H(!1);ee(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function i(a,s){if(!n.current||a.defaultPrevented)return;let c=s(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function d(l){return typeof l=="function"?d(l()):Array.isArray(l)||l instanceof Set?l:[l]}(e);for(let d of f){if(d===null)continue;let l=d instanceof HTMLElement?d:d.current;if(l!=null&&l.contains(c)||a.composed&&a.composedPath().includes(l))return}return!Ta(c,ei.Loose)&&c.tabIndex!==-1&&a.preventDefault(),t(a,c)}let o=H(null);Qt("pointerdown",a=>{var s,c;n.current&&(o.current=((c=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:c[0])||a.target)},!0),Qt("mousedown",a=>{var s,c;n.current&&(o.current=((c=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:c[0])||a.target)},!0),Qt("click",a=>{uc()||o.current&&(i(a,()=>o.current),o.current=null)},!0),Qt("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),dc("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ji(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function pc(e,t){let[r,n]=J(()=>Ji(e));return Te(()=>{n(Ji(e))},[e.type,e.as]),Te(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let hc=Symbol();function ht(...e){let t=H(e);ee(()=>{t.current=e},[e]);let r=M(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return e.every(n=>n==null||(n==null?void 0:n[hc]))?void 0:r}function eo(e){return[e.screenX,e.screenY]}function mc(){let e=H([-1,-1]);return{wasMoved(t){let r=eo(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=eo(t)}}}function mr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var gr=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gr||{}),rt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(rt||{});function at({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=s??gc;let c=Oa(t,e);if(o)return Xt(c,r,n,a,s);let f=i??0;if(f&2){let{static:d=!1,...l}=c;if(d)return Xt(l,r,n,a,s)}if(f&1){let{unmount:d=!0,...l}=c;return he(d?0:1,{0(){return null},1(){return Xt({...l,hidden:!0,style:{display:"none"}},r,n,a,s)}})}return Xt(c,r,n,a,s)}function Xt(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...c}=Yr(e,["unmount","static"]),f=e.ref!==void 0?{[s]:e.ref}:{},d=typeof a=="function"?a(t):a;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t));let l={};if(t){let b=!1,v=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(b=!0),g===!0&&v.push(h);b&&(l["data-headlessui-state"]=v.join(" "))}if(o===X&&Object.keys(pn(c)).length>0){if(!kt(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(c).map(g=>` - ${g}`).join(`
20
+ `,Xn=async e=>{var t;try{const r=await((t=e.response)==null?void 0:t.text());return JSON.parse(r)}catch{return{}}},xa=e=>new Date(Date.now()+e*24*60*60*1e3).toISOString().split("T")[0],Ul=15e3;class Et extends Error{constructor(r,n){super(r);pi(this,"_response");this._response=n,Object.setPrototypeOf(this,Et.prototype)}get response(){return this._response}}const Sa=async(e,t,r,n)=>{var a;const i=n instanceof FormData,o=await fetch(e,{method:r,body:n&&!i?JSON.stringify(n):n,headers:{"x-app-version":"1.0.895",authorization:`Bearer ${t}`},signal:(a=AbortSignal==null?void 0:AbortSignal.timeout)==null?void 0:a.call(AbortSignal,Ul)});if(!o.ok)throw new Et(`[API Error] Status: ${o.status}, ${o.statusText}`,o);return o},ka=async(e,t,r,n)=>{const i=await Sa(e,t,r,n),o=i.headers.get("Content-Type");return o!=null&&o.includes("application/json")?await i.json():await i.blob()},Ca=Be({backend:{url:"",accessToken:""}}),Bl=()=>Se(Ca),Ze=e=>{const t=Bl();return ge(()=>e(t),[e,t])},Wl=e=>async t=>{const r=new FormData;r.append("source",t.source),r.append("transactionFile",t.transactionsFile);const n=new URL(`${e.backend.url}/salary-packaging/admin/v1.0/catche/receipt-batch`);return ka(n,e.backend.accessToken,"POST",r)},zl=e=>async t=>{const r=new URL(`${e.backend.url}/salary-packaging/admin/v1.0/reports/${t.report}?startDate=${t.startDate||""}&endDate=${t.endDate||""}&groupCode=${t.groupCode||""}&clientId=${t.clientId||""}`);return ka(r,e.backend.accessToken,"GET")},$t=(e,t)=>async r=>{const n=xa(2),i=new URL(`${e.backend.url}${t}`);return Sa(i,e.backend.accessToken,"POST",{startDate:r,endDate:n})},jl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/clients"),ql=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/drivers"),Gl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/contract-budgets"),Kl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/invoice-items"),Yl=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/deleted-invoice-items"),Ql=e=>$t(e,"/salary-packaging/admin/v1.0/ingest/vehicle-contracts"),Zn=()=>({postCatcheReceiptBatch:Ze(Wl),getCatcheReport:Ze(zl),ingestClients:Ze(jl),ingestDrivers:Ze(ql),ingestContractBudgets:Ze(Gl),ingestInvoiceItems:Ze(Kl),ingestDeletedInvoiceItems:Ze(Yl),ingestVehicleContracts:Ze(Ql)});var Xl=Object.defineProperty,Zl=(e,t,r)=>t in e?Xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kr=(e,t,r)=>(Zl(e,typeof t!="symbol"?t+"":t,r),r);let Jl=class{constructor(){Kr(this,"current",this.detect()),Kr(this,"handoffState","pending"),Kr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},dt=new Jl,Te=(e,t)=>{dt.isServer?ee(e,t):ot(e,t)};function He(e){let t=H(e);return Te(()=>{t.current=e},[e]),t}function Ea(e,t){let[r,n]=J(e),i=He(e);return Te(()=>n(i.current),[i,n,...t]),r}let M=function(e){let t=He(e);return P.useCallback((...r)=>t.current(...r),[t])};function ec(e,t,r){let[n,i]=J(r),o=e!==void 0,a=H(o),s=H(!1),c=H(!1);return o&&!a.current&&!s.current?(s.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!c.current&&(c.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:n,M(f=>(o||i(f),t==null?void 0:t(f)))]}function tc(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function it(){let e=[],t={addEventListener(r,n,i,o){return r.addEventListener(n,i,o),t.add(()=>r.removeEventListener(n,i,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return tc(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,i){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:i}),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=it();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let i of e.splice(n,1))i()}},dispose(){for(let r of e.splice(0))r()}};return t}function St(){let[e]=J(it);return ee(()=>()=>e.dispose(),[e]),e}function rc(){let e=typeof document>"u";return"useSyncExternalStore"in sr?(t=>t.useSyncExternalStore)(sr)(()=>()=>{},()=>!1,()=>!e):!1}function Jn(){let e=rc(),[t,r]=J(dt.isHandoffComplete);return t&&dt.isHandoffComplete===!1&&r(!1),ee(()=>{t!==!0&&r(!0)},[t]),ee(()=>dt.handoff(),[]),e?!1:t}var Xi;let Lr=(Xi=P.useId)!=null?Xi:function(){let e=Jn(),[t,r]=P.useState(e?()=>dt.nextId():null);return Te(()=>{t===null&&r(dt.nextId())},[t]),t!=null?""+t:void 0};function he(e,t,...r){if(e in t){let i=t[e];return typeof i=="function"?i(...r):i}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,he),n}function $a(e){return dt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Zi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var nc=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(nc||{}),ic=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ic||{}),oc=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(oc||{}),ei=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ei||{});function Ta(e,t=0){var r;return e===((r=$a(e))==null?void 0:r.body)?!1:he(t,{0(){return e.matches(Zi)},1(){let n=e;for(;n!==null;){if(n.matches(Zi))return!0;n=n.parentElement}return!1}})}var ac=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ac||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function sc(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),o=t(n);if(i===null||o===null)return 0;let a=i.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function lc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function cc(){return/Android/gi.test(window.navigator.userAgent)}function uc(){return lc()||cc()}function Qt(e,t,r){let n=He(t);ee(()=>{function i(o){n.current(o)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function dc(e,t,r){let n=He(t);ee(()=>{function i(o){n.current(o)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function fc(e,t,r=!0){let n=H(!1);ee(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function i(a,s){if(!n.current||a.defaultPrevented)return;let c=s(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function d(l){return typeof l=="function"?d(l()):Array.isArray(l)||l instanceof Set?l:[l]}(e);for(let d of f){if(d===null)continue;let l=d instanceof HTMLElement?d:d.current;if(l!=null&&l.contains(c)||a.composed&&a.composedPath().includes(l))return}return!Ta(c,ei.Loose)&&c.tabIndex!==-1&&a.preventDefault(),t(a,c)}let o=H(null);Qt("pointerdown",a=>{var s,c;n.current&&(o.current=((c=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:c[0])||a.target)},!0),Qt("mousedown",a=>{var s,c;n.current&&(o.current=((c=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:c[0])||a.target)},!0),Qt("click",a=>{uc()||o.current&&(i(a,()=>o.current),o.current=null)},!0),Qt("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),dc("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ji(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function pc(e,t){let[r,n]=J(()=>Ji(e));return Te(()=>{n(Ji(e))},[e.type,e.as]),Te(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let hc=Symbol();function ht(...e){let t=H(e);ee(()=>{t.current=e},[e]);let r=M(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return e.every(n=>n==null||(n==null?void 0:n[hc]))?void 0:r}function eo(e){return[e.screenX,e.screenY]}function mc(){let e=H([-1,-1]);return{wasMoved(t){let r=eo(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=eo(t)}}}function mr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var gr=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gr||{}),rt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(rt||{});function at({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:o=!0,name:a,mergeRefs:s}){s=s??gc;let c=Oa(t,e);if(o)return Xt(c,r,n,a,s);let f=i??0;if(f&2){let{static:d=!1,...l}=c;if(d)return Xt(l,r,n,a,s)}if(f&1){let{unmount:d=!0,...l}=c;return he(d?0:1,{0(){return null},1(){return Xt({...l,hidden:!0,style:{display:"none"}},r,n,a,s)}})}return Xt(c,r,n,a,s)}function Xt(e,t={},r,n,i){let{as:o=r,children:a,refName:s="ref",...c}=Yr(e,["unmount","static"]),f=e.ref!==void 0?{[s]:e.ref}:{},d=typeof a=="function"?a(t):a;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t));let l={};if(t){let b=!1,v=[];for(let[h,g]of Object.entries(t))typeof g=="boolean"&&(b=!0),g===!0&&v.push(h);b&&(l["data-headlessui-state"]=v.join(" "))}if(o===X&&Object.keys(pn(c)).length>0){if(!kt(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(c).map(g=>` - ${g}`).join(`
21
21
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
22
22
  `)].join(`
23
23
  `));let b=d.props,v=typeof(b==null?void 0:b.className)=="function"?(...g)=>mr(b==null?void 0:b.className(...g),c.className):mr(b==null?void 0:b.className,c.className),h=v?{className:v}:{};return $n(d,Object.assign({},Oa(d.props,pn(Yr(c,["ref"]))),l,f,{ref:i(d.ref,f.ref)},h))}return K(o,Object.assign({},Yr(c,["ref"]),o!==X&&f,o!==X&&l),d)}function gc(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function Oa(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...o){let a=r[n];for(let s of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...o)}}});return t}function Qe(e){var t;return Object.assign(Ye(e),{displayName:(t=e.displayName)!=null?t:e.name})}function pn(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Yr(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let vc="div";var Ra=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ra||{});function yc(e,t){var r;let{features:n=1,...i}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:(r=i["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return at({ourProps:o,theirProps:i,slot:{},defaultTag:vc,name:"Hidden"})}let _c=Qe(yc),ti=Be(null);ti.displayName="OpenClosedContext";var Ee=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ee||{});function ri(){return Se(ti)}function Aa({value:e,children:t}){return P.createElement(ti.Provider,{value:e},t)}function bc(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&wc(r)?!1:n}function wc(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function xc(e){throw new Error("Unexpected object: "+e)}var we=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(we||{});function Sc(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),i=n??-1;switch(e.focus){case 0:{for(let o=0;o<r.length;++o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 1:{for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 2:{for(let o=i+1;o<r.length;++o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 3:{for(let o=r.length-1;o>=0;--o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 4:{for(let o=0;o<r.length;++o)if(t.resolveId(r[o],o,r)===e.id)return o;return n}case 5:return null;default:xc(e)}}function Pa(e={},t=null,r=[]){for(let[n,i]of Object.entries(e))Fa(r,Da(t,n),i);return r}function Da(e,t){return e?e+"["+t+"]":t}function Fa(e,t,r){if(Array.isArray(r))for(let[n,i]of r.entries())Fa(e,Da(t,n.toString()),i);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):Pa(r,t,e)}var de=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(de||{});function ni(){let e=H(!1);return Te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let to=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ro(e){var t,r;let n=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return n;let o=!1;for(let s of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),o=!0;let a=o?(r=i.innerText)!=null?r:"":n;return to.test(a)&&(a=a.replace(to,"")),a}function kc(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(i=>{let o=document.getElementById(i);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():ro(o).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return ro(e).trim()}function Cc(e){let t=H(""),r=H("");return M(()=>{let n=e.current;if(!n)return"";let i=n.innerText;if(t.current===i)return r.current;let o=kc(n).trim().toLowerCase();return t.current=i,r.current=o,o})}var Ec=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ec||{}),$c=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))($c||{}),Tc=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Tc||{}),Oc=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Oc||{});function Qr(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,n=sc(t(e.options.slice()),o=>o.dataRef.current.domRef.current),i=r?n.indexOf(r):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let Rc={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,n=e.options.findIndex(i=>r(i.dataRef.current.value));return n!==-1&&(t=n),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var r;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=Qr(e),i=Sc(t,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeOptionIndex:i,activationTrigger:(r=t.trigger)!=null?r:1}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(a=>{var s;return!a.dataRef.current.disabled&&((s=a.dataRef.current.textValue)==null?void 0:s.startsWith(n))}),o=i?e.options.indexOf(i):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeOptionIndex:o,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},n=Qr(e,i=>[...i,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(n.activeOptionIndex=n.options.indexOf(r)),{...e,...n}},6:(e,t)=>{let r=Qr(e,n=>{let i=n.findIndex(o=>o.id===t.id);return i!==-1&&n.splice(i,1),n});return{...e,...r,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},ii=Be(null);ii.displayName="ListboxActionsContext";function jt(e){let t=Se(ii);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,jt),r}return t}let oi=Be(null);oi.displayName="ListboxDataContext";function qt(e){let t=Se(oi);if(t===null){let r=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,qt),r}return t}function Ac(e,t){return he(t.type,Rc,e,t)}let Pc=X;function Dc(e,t){let{value:r,defaultValue:n,form:i,name:o,onChange:a,by:s=(F,Z)=>F===Z,disabled:c=!1,horizontal:f=!1,multiple:d=!1,...l}=e;const b=f?"horizontal":"vertical";let v=ht(t),[h=d?[]:void 0,g]=ec(r,a,n),[_,y]=Ut(Ac,{dataRef:gn(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),w=H({static:!1,hold:!1}),$=H(null),L=H(null),R=H(null),A=M(typeof s=="string"?(F,Z)=>{let le=s;return(F==null?void 0:F[le])===(Z==null?void 0:Z[le])}:s),O=et(F=>he(N.mode,{1:()=>h.some(Z=>A(Z,F)),0:()=>A(h,F)}),[h]),N=ge(()=>({..._,value:h,disabled:c,mode:d?1:0,orientation:b,compare:A,isSelected:O,optionsPropsRef:w,labelRef:$,buttonRef:L,optionsRef:R}),[h,c,d,_]);Te(()=>{_.dataRef.current=N},[N]),fc([N.buttonRef,N.optionsRef],(F,Z)=>{var le;y({type:1}),Ta(Z,ei.Loose)||(F.preventDefault(),(le=N.buttonRef.current)==null||le.focus())},N.listboxState===0);let U=ge(()=>({open:N.listboxState===0,disabled:c,value:h}),[N,c,h]),j=M(F=>{let Z=N.options.find(le=>le.id===F);Z&&ne(Z.dataRef.current.value)}),De=M(()=>{if(N.activeOptionIndex!==null){let{dataRef:F,id:Z}=N.options[N.activeOptionIndex];ne(F.current.value),y({type:2,focus:we.Specific,id:Z})}}),D=M(()=>y({type:0})),V=M(()=>y({type:1})),te=M((F,Z,le)=>F===we.Specific?y({type:2,focus:we.Specific,id:Z,trigger:le}):y({type:2,focus:F,trigger:le})),oe=M((F,Z)=>(y({type:5,id:F,dataRef:Z}),()=>y({type:6,id:F}))),ve=M(F=>(y({type:7,id:F}),()=>y({type:7,id:null}))),ne=M(F=>he(N.mode,{0(){return g==null?void 0:g(F)},1(){let Z=N.value.slice(),le=Z.findIndex(st=>A(st,F));return le===-1?Z.push(F):Z.splice(le,1),g==null?void 0:g(Z)}})),We=M(F=>y({type:3,value:F})),ze=M(()=>y({type:4})),Re=ge(()=>({onChange:ne,registerOption:oe,registerLabel:ve,goToOption:te,closeListbox:V,openListbox:D,selectActiveOption:De,selectOption:j,search:We,clearSearch:ze}),[]),Xe={ref:v},_e=H(null),Tt=St();return ee(()=>{_e.current&&n!==void 0&&Tt.addEventListener(_e.current,"reset",()=>{g==null||g(n)})},[_e,g]),P.createElement(ii.Provider,{value:Re},P.createElement(oi.Provider,{value:N},P.createElement(Aa,{value:he(N.listboxState,{0:Ee.Open,1:Ee.Closed})},o!=null&&h!=null&&Pa({[o]:h}).map(([F,Z],le)=>P.createElement(_c,{features:Ra.Hidden,ref:le===0?st=>{var mt;_e.current=(mt=st==null?void 0:st.closest("form"))!=null?mt:null}:void 0,...pn({key:F,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:c,name:F,value:Z})})),at({ourProps:Xe,theirProps:l,slot:U,defaultTag:Pc,name:"Listbox"}))))}let Fc="button";function Lc(e,t){var r;let n=Lr(),{id:i=`headlessui-listbox-button-${n}`,...o}=e,a=qt("Listbox.Button"),s=jt("Listbox.Button"),c=ht(a.buttonRef,t),f=St(),d=M(_=>{switch(_.key){case de.Space:case de.Enter:case de.ArrowDown:_.preventDefault(),s.openListbox(),f.nextFrame(()=>{a.value||s.goToOption(we.First)});break;case de.ArrowUp:_.preventDefault(),s.openListbox(),f.nextFrame(()=>{a.value||s.goToOption(we.Last)});break}}),l=M(_=>{switch(_.key){case de.Space:_.preventDefault();break}}),b=M(_=>{if(bc(_.currentTarget))return _.preventDefault();a.listboxState===0?(s.closeListbox(),f.nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})})):(_.preventDefault(),s.openListbox())}),v=Ea(()=>{if(a.labelId)return[a.labelId,i].join(" ")},[a.labelId,i]),h=ge(()=>({open:a.listboxState===0,disabled:a.disabled,value:a.value}),[a]),g={ref:c,id:i,type:pc(e,a.buttonRef),"aria-haspopup":"listbox","aria-controls":(r=a.optionsRef.current)==null?void 0:r.id,"aria-expanded":a.listboxState===0,"aria-labelledby":v,disabled:a.disabled,onKeyDown:d,onKeyUp:l,onClick:b};return at({ourProps:g,theirProps:o,slot:h,defaultTag:Fc,name:"Listbox.Button"})}let Ic="label";function Nc(e,t){let r=Lr(),{id:n=`headlessui-listbox-label-${r}`,...i}=e,o=qt("Listbox.Label"),a=jt("Listbox.Label"),s=ht(o.labelRef,t);Te(()=>a.registerLabel(n),[n]);let c=M(()=>{var d;return(d=o.buttonRef.current)==null?void 0:d.focus({preventScroll:!0})}),f=ge(()=>({open:o.listboxState===0,disabled:o.disabled}),[o]);return at({ourProps:{ref:s,id:n,onClick:c},theirProps:i,slot:f,defaultTag:Ic,name:"Listbox.Label"})}let Vc="ul",Mc=gr.RenderStrategy|gr.Static;function Hc(e,t){var r;let n=Lr(),{id:i=`headlessui-listbox-options-${n}`,...o}=e,a=qt("Listbox.Options"),s=jt("Listbox.Options"),c=ht(a.optionsRef,t),f=St(),d=St(),l=ri(),b=l!==null?(l&Ee.Open)===Ee.Open:a.listboxState===0;ee(()=>{var y;let w=a.optionsRef.current;w&&a.listboxState===0&&w!==((y=$a(w))==null?void 0:y.activeElement)&&w.focus({preventScroll:!0})},[a.listboxState,a.optionsRef]);let v=M(y=>{switch(d.dispose(),y.key){case de.Space:if(a.searchQuery!=="")return y.preventDefault(),y.stopPropagation(),s.search(y.key);case de.Enter:if(y.preventDefault(),y.stopPropagation(),a.activeOptionIndex!==null){let{dataRef:w}=a.options[a.activeOptionIndex];s.onChange(w.current.value)}a.mode===0&&(s.closeListbox(),it().nextFrame(()=>{var w;return(w=a.buttonRef.current)==null?void 0:w.focus({preventScroll:!0})}));break;case he(a.orientation,{vertical:de.ArrowDown,horizontal:de.ArrowRight}):return y.preventDefault(),y.stopPropagation(),s.goToOption(we.Next);case he(a.orientation,{vertical:de.ArrowUp,horizontal:de.ArrowLeft}):return y.preventDefault(),y.stopPropagation(),s.goToOption(we.Previous);case de.Home:case de.PageUp:return y.preventDefault(),y.stopPropagation(),s.goToOption(we.First);case de.End:case de.PageDown:return y.preventDefault(),y.stopPropagation(),s.goToOption(we.Last);case de.Escape:return y.preventDefault(),y.stopPropagation(),s.closeListbox(),f.nextFrame(()=>{var w;return(w=a.buttonRef.current)==null?void 0:w.focus({preventScroll:!0})});case de.Tab:y.preventDefault(),y.stopPropagation();break;default:y.key.length===1&&(s.search(y.key),d.setTimeout(()=>s.clearSearch(),350));break}}),h=Ea(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.id},[a.buttonRef.current]),g=ge(()=>({open:a.listboxState===0}),[a]),_={"aria-activedescendant":a.activeOptionIndex===null||(r=a.options[a.activeOptionIndex])==null?void 0:r.id,"aria-multiselectable":a.mode===1?!0:void 0,"aria-labelledby":h,"aria-orientation":a.orientation,id:i,onKeyDown:v,role:"listbox",tabIndex:0,ref:c};return at({ourProps:_,theirProps:o,slot:g,defaultTag:Vc,features:Mc,visible:b,name:"Listbox.Options"})}let Uc="li";function Bc(e,t){let r=Lr(),{id:n=`headlessui-listbox-option-${r}`,disabled:i=!1,value:o,...a}=e,s=qt("Listbox.Option"),c=jt("Listbox.Option"),f=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===n:!1,d=s.isSelected(o),l=H(null),b=Cc(l),v=He({disabled:i,value:o,domRef:l,get textValue(){return b()}}),h=ht(t,l);Te(()=>{if(s.listboxState!==0||!f||s.activationTrigger===0)return;let A=it();return A.requestAnimationFrame(()=>{var O,N;(N=(O=l.current)==null?void 0:O.scrollIntoView)==null||N.call(O,{block:"nearest"})}),A.dispose},[l,f,s.listboxState,s.activationTrigger,s.activeOptionIndex]),Te(()=>c.registerOption(n,v),[v,n]);let g=M(A=>{if(i)return A.preventDefault();c.onChange(o),s.mode===0&&(c.closeListbox(),it().nextFrame(()=>{var O;return(O=s.buttonRef.current)==null?void 0:O.focus({preventScroll:!0})}))}),_=M(()=>{if(i)return c.goToOption(we.Nothing);c.goToOption(we.Specific,n)}),y=mc(),w=M(A=>y.update(A)),$=M(A=>{y.wasMoved(A)&&(i||f||c.goToOption(we.Specific,n,0))}),L=M(A=>{y.wasMoved(A)&&(i||f&&c.goToOption(we.Nothing))}),R=ge(()=>({active:f,selected:d,disabled:i}),[f,d,i]);return at({ourProps:{id:n,ref:h,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":d,disabled:void 0,onClick:g,onFocus:_,onPointerEnter:w,onMouseEnter:w,onPointerMove:$,onMouseMove:$,onPointerLeave:L,onMouseLeave:L},theirProps:a,slot:R,defaultTag:Uc,name:"Listbox.Option"})}let Wc=Qe(Dc),zc=Qe(Lc),jc=Qe(Nc),qc=Qe(Hc),Gc=Qe(Bc),Lt=Object.assign(Wc,{Button:zc,Label:jc,Options:qc,Option:Gc});function Kc(e=0){let[t,r]=J(e),n=ni(),i=et(c=>{n.current&&r(f=>f|c)},[t,n]),o=et(c=>!!(t&c),[t]),a=et(c=>{n.current&&r(f=>f&~c)},[r,n]),s=et(c=>{n.current&&r(f=>f^c)},[r]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:s}}function Yc(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function Xr(e,...t){e&&t.length>0&&e.classList.add(...t)}function Zr(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Qc(e,t){let r=it();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[o,a]=[n,i].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,l)=>l-d);return f}),s=o+a;if(s!==0){r.group(f=>{f.setTimeout(()=>{t(),f.dispose()},s),f.addEventListener(e,"transitionrun",d=>{d.target===d.currentTarget&&f.dispose()})});let c=r.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return r.add(()=>t()),r.dispose}function Xc(e,t,r,n){let i=r?"enter":"leave",o=it(),a=n!==void 0?Yc(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=he(i,{enter:()=>t.enter,leave:()=>t.leave}),c=he(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=he(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Zr(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Xr(e,...t.base,...s,...f),o.nextFrame(()=>{Zr(e,...t.base,...s,...f),Xr(e,...t.base,...s,...c),Qc(e,()=>(Zr(e,...t.base,...s),Xr(e,...t.base,...t.entered),a()))}),o.dispose}function Zc({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:o}){let a=ni(),s=St(),c=He(r);Te(()=>{e&&(c.current="enter")},[e]),Te(()=>{let f=it();s.add(f.dispose);let d=t.current;if(d&&c.current!=="idle"&&a.current)return f.dispose(),i.current(c.current),f.add(Xc(d,n.current,c.current==="enter",()=>{f.dispose(),o.current(c.current)})),f.dispose},[r])}function Je(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ir=Be(null);Ir.displayName="TransitionContext";var Jc=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Jc||{});function eu(){let e=Se(Ir);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function tu(){let e=Se(Nr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Nr=Be(null);Nr.displayName="NestingContext";function Vr(e){return"children"in e?Vr(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function La(e,t){let r=He(e),n=H([]),i=ni(),o=St(),a=M((v,h=rt.Hidden)=>{let g=n.current.findIndex(({el:_})=>_===v);g!==-1&&(he(h,{[rt.Unmount](){n.current.splice(g,1)},[rt.Hidden](){n.current[g].state="hidden"}}),o.microTask(()=>{var _;!Vr(n)&&i.current&&((_=r.current)==null||_.call(r))}))}),s=M(v=>{let h=n.current.find(({el:g})=>g===v);return h?h.state!=="visible"&&(h.state="visible"):n.current.push({el:v,state:"visible"}),()=>a(v,rt.Unmount)}),c=H([]),f=H(Promise.resolve()),d=H({enter:[],leave:[],idle:[]}),l=M((v,h,g)=>{c.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([_])=>_!==v)),t==null||t.chains.current[h].push([v,new Promise(_=>{c.current.push(_)})]),t==null||t.chains.current[h].push([v,new Promise(_=>{Promise.all(d.current[h].map(([y,w])=>w)).then(()=>_())})]),h==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(h)):g(h)}),b=M((v,h,g)=>{Promise.all(d.current[h].splice(0).map(([_,y])=>y)).then(()=>{var _;(_=c.current.shift())==null||_()}).then(()=>g(h))});return ge(()=>({children:n,register:s,unregister:a,onStart:l,onStop:b,wait:f,chains:d}),[s,a,n,l,b,d,f])}function ru(){}let nu=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function no(e){var t;let r={};for(let n of nu)r[n]=(t=e[n])!=null?t:ru;return r}function iu(e){let t=H(no(e));return ee(()=>{t.current=no(e)},[e]),t}let ou="div",Ia=gr.RenderStrategy;function au(e,t){var r,n;let{beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:s,enter:c,enterFrom:f,enterTo:d,entered:l,leave:b,leaveFrom:v,leaveTo:h,...g}=e,_=H(null),y=ht(_,t),w=(r=g.unmount)==null||r?rt.Unmount:rt.Hidden,{show:$,appear:L,initial:R}=eu(),[A,O]=J($?"visible":"hidden"),N=tu(),{register:U,unregister:j}=N;ee(()=>U(_),[U,_]),ee(()=>{if(w===rt.Hidden&&_.current){if($&&A!=="visible"){O("visible");return}return he(A,{hidden:()=>j(_),visible:()=>U(_)})}},[A,_,U,j,$,w]);let De=He({base:Je(g.className),enter:Je(c),enterFrom:Je(f),enterTo:Je(d),entered:Je(l),leave:Je(b),leaveFrom:Je(v),leaveTo:Je(h)}),D=iu({beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:s}),V=Jn();ee(()=>{if(V&&A==="visible"&&_.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[_,A,V]);let te=R&&!L,oe=L&&$&&R,ve=!V||te?"idle":$?"enter":"leave",ne=Kc(0),We=M(F=>he(F,{enter:()=>{ne.addFlag(Ee.Opening),D.current.beforeEnter()},leave:()=>{ne.addFlag(Ee.Closing),D.current.beforeLeave()},idle:()=>{}})),ze=M(F=>he(F,{enter:()=>{ne.removeFlag(Ee.Opening),D.current.afterEnter()},leave:()=>{ne.removeFlag(Ee.Closing),D.current.afterLeave()},idle:()=>{}})),Re=La(()=>{O("hidden"),j(_)},N),Xe=H(!1);Zc({immediate:oe,container:_,classes:De,direction:ve,onStart:He(F=>{Xe.current=!0,Re.onStart(_,F,We)}),onStop:He(F=>{Xe.current=!1,Re.onStop(_,F,ze),F==="leave"&&!Vr(Re)&&(O("hidden"),j(_))})});let _e=g,Tt={ref:y};return oe?_e={..._e,className:mr(g.className,...De.current.enter,...De.current.enterFrom)}:Xe.current&&(_e.className=mr(g.className,(n=_.current)==null?void 0:n.className),_e.className===""&&delete _e.className),P.createElement(Nr.Provider,{value:Re},P.createElement(Aa,{value:he(A,{visible:Ee.Open,hidden:Ee.Closed})|ne.flags},at({ourProps:Tt,theirProps:_e,defaultTag:ou,features:Ia,visible:A==="visible",name:"Transition.Child"})))}function su(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,a=H(null),s=ht(a,t);Jn();let c=ri();if(r===void 0&&c!==null&&(r=(c&Ee.Open)===Ee.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,d]=J(r?"visible":"hidden"),l=La(()=>{d("hidden")}),[b,v]=J(!0),h=H([r]);Te(()=>{b!==!1&&h.current[h.current.length-1]!==r&&(h.current.push(r),v(!1))},[h,r]);let g=ge(()=>({show:r,appear:n,initial:b}),[r,n,b]);ee(()=>{if(r)d("visible");else if(!Vr(l))d("hidden");else{let $=a.current;if(!$)return;let L=$.getBoundingClientRect();L.x===0&&L.y===0&&L.width===0&&L.height===0&&d("hidden")}},[r,l]);let _={unmount:i},y=M(()=>{var $;b&&v(!1),($=e.beforeEnter)==null||$.call(e)}),w=M(()=>{var $;b&&v(!1),($=e.beforeLeave)==null||$.call(e)});return P.createElement(Nr.Provider,{value:l},P.createElement(Ir.Provider,{value:g},at({ourProps:{..._,as:X,children:P.createElement(Na,{ref:s,..._,...o,beforeEnter:y,beforeLeave:w})},theirProps:{},defaultTag:X,features:Ia,visible:f==="visible",name:"Transition"})))}function lu(e,t){let r=Se(Ir)!==null,n=ri()!==null;return P.createElement(P.Fragment,null,!r&&n?P.createElement(hn,{ref:t,...e}):P.createElement(Na,{ref:t,...e}))}let hn=Qe(su),Na=Qe(au),cu=Qe(lu),uu=Object.assign(hn,{Child:cu,Root:hn});const du=Ue(Lt.Button)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/salpac-finops-admin",
3
- "version": "1.0.893",
3
+ "version": "1.0.895",
4
4
  "description": "Salpac FinOps Admin",
5
5
  "license": "MIT",
6
6
  "files": [