@openmrs/esm-reports-app 4.4.1-pre.635 → 4.4.1-pre.651

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/2025.js CHANGED
@@ -12,7 +12,7 @@ If you're the maintainer: the 'elements' key only works with '_type' equal to 'A
12
12
  ${n}`)}return r}let tI=(e,n)=>{let t=structuredClone(n);if(!e)return t;for(let n of Object.keys(e)){let r=t[n],o=e[n];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){t.hasOwnProperty(n)||(t[n]=o._default);let e=o._elements;if(r&&tB(e)){if(o._type===n4.Array&&Array.isArray(r)){let o=r.map(n=>tI(e,n));t[n]=o}else if(o._type===n4.Object)for(let n of Object.keys(r))r[n]=tI(e,r[n])}}else if(tj(o)){let e=r??{};tj(e)&&(t[n]=tI(o,e))}}return t};function tB(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function tj(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let tR=new Set;function tF(e,n){let t=`${e}:::${n}`;tR||(tR=new Set),tR.has(t)||(console.error(n),tR.add(t))}function tL(e){e?tR.forEach(n=>{n.startsWith(e)&&tR.delete(n)}):tR.clear()}function tW(){tg.forEach(e=>e()),tg.length=0,tb()}let tV={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:n4.Object,_default:{},_validators:[n6(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let n=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${n.join(", ")}.`})]}},tG={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:n4.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:n4.String,_default:void 0}},...tV},tU=(e,n)=>n6(t=>e<=t&&t<=n,`must be between ${e} and ${n}`),tq=e=>{let n=e.concat(["openmrsBase","openmrsSpaBase"]);return n6(e=>{if(!e||"string"!=typeof e)return!1;let t=/\${(.*?)}/g,r=t.exec(e);for(;r;){if(!n.includes(r[1]))return!1;r=t.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+n.map(e=>"${"+e+"}").join(", "))},tH=tq([]),tK=e=>n6(n=>e.includes(n),`Must be one of the following: '${e.join("', '")}'.`),tY={inRange:tU,isUrl:tH,isUrlWithTemplateParameters:tq,oneOf:tK};var tZ=t(2034);let tJ=G("breadcrumbs",[]);function tX(e){return tQ([e])}function tQ(e){let n=[...t0(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,tZ.pathToRegexp)(e.matcher).regexp:(0,tZ.pathToRegexp)(e.path).regexp,settings:e}))];tJ.setState(n,!0)}function t0(){return tJ.getState()}function t1(e,n){if(n)return function(e,n){let[t]=e.filter(e=>e.matcher.test(n));return t}(e,n)||function(e,n){let t=n.split("/");for(;t.length>1;){t.pop();let n=t1(e,t.join("/"));if(n)return n}}(e,n)}function t2(e,n){if(e.length>0){let t=t1(e,n);if(t){let n=[t],r=t1(e,t.settings.parent);for(;void 0!==r;)n.push(r),r=t1(e,r.settings.parent);return n.reverse()}}return[]}function t3(e){return t2(t0(),e)}var t5=Object.freeze({__proto__:null,get start(){return ob},get ensureJQuerySupport(){return r3},get setBootstrapMaxTime(){return rj},get setMountMaxTime(){return rR},get setUnmountMaxTime(){return rF},get setUnloadMaxTime(){return rL},get registerApplication(){return oo},get unregisterApplication(){return oi},get getMountedApps(){return oe},get getAppStatus(){return ot},get unloadApplication(){return os},get checkActivityFunctions(){return oa},get getAppNames(){return on},get pathToActiveWhen(){return op},get navigateToUrl(){return rK},get patchHistoryApi(){return r0},get triggerAppChange(){return oh},get addErrorHandler(){return t9},get removeErrorHandler(){return re},get mountRootParcel(){return rT},get NOT_LOADED(){return rr},get LOADING_SOURCE_CODE(){return ro},get NOT_BOOTSTRAPPED(){return ra},get BOOTSTRAPPING(){return ri},get NOT_MOUNTED(){return rs},get MOUNTING(){return rl},get UPDATING(){return rp},get LOAD_ERROR(){return rf},get MOUNTED(){return rc},get UNLOADING(){return rd},get UNMOUNTING(){return ru},get SKIP_BECAUSE_BROKEN(){return rh}}),t4=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,t6=!function(){try{var e=new t4("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,n){var t=document.createEvent("CustomEvent");return n?t.initCustomEvent(e,n.bubbles,n.cancelable,n.detail):t.initCustomEvent(e,!1,!1,void 0),t}:function(e,n){var t=document.createEventObject();return t.type=e,n?(t.bubbles=!!n.bubbles,t.cancelable=!!n.cancelable,t.detail=n.detail):(t.bubbles=!1,t.cancelable=!1,t.detail=void 0),t}:t4;let t7=[];function t8(e,n,t){let r=rt(e,n,t);t7.length?t7.forEach(e=>e(r)):setTimeout(()=>{throw r})}function t9(e){if("function"!=typeof e)throw Error(rn(28,!1));t7.push(e)}function re(e){if("function"!=typeof e)throw Error(rn(29,!1));let n=!1;return t7=t7.filter(t=>{let r=t===e;return n=n||r,!r}),n}function rn(e,n,...t){return`single-spa minified message #${e}: ${n?n+" ":""}See https://single-spa.js.org/error/?code=${e}${t.length?`&arg=${t.join("&arg=")}`:""}`}function rt(e,n,t){let r,o=`${r_(n)} '${ry(n)}' died in status ${n.status}: `;if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(rn(30,!1,n.status,ry(n)));try{r=Error(o+JSON.stringify(e))}catch(n){r=e}}return r.appOrParcelName=ry(n),n.status=t,r}let rr="NOT_LOADED",ro="LOADING_SOURCE_CODE",ra="NOT_BOOTSTRAPPED",ri="BOOTSTRAPPING",rs="NOT_MOUNTED",rl="MOUNTING",rc="MOUNTED",rp="UPDATING",ru="UNMOUNTING",rd="UNLOADING",rf="LOAD_ERROR",rh="SKIP_BECAUSE_BROKEN";function rm(e){return e.status===rc}function rg(e){try{return e.activeWhen(window.location)}catch(n){return t8(n,e,rh),!1}}function ry(e){return e.name}function rb(e){return!!e.unmountThisParcel}function r_(e){return rb(e)?"parcel":"application"}function rv(){for(let e=arguments.length-1;e>0;e--)for(let n in arguments[e])"__proto__"!==n&&(arguments[e-1][n]=arguments[e][n]);return arguments[0]}function r$(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return e[t];return null}function rA(e){return e&&("function"==typeof e||Array.isArray(e)&&!r$(e,e=>"function"!=typeof e))}function rw(e,n){let t=e[n]||[];0===(t=Array.isArray(t)?t:[t]).length&&(t=[()=>Promise.resolve()]);let r=r_(e),o=ry(e);return function(e){return t.reduce((t,a,i)=>t.then(()=>{let t=a(e);return rk(t)?t:Promise.reject(rn(15,!1,r,o,n,i))}),Promise.resolve())}}function rk(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let rx=[];function rC(e,n){return Promise.resolve().then(()=>e.status!==ra?e:(e.status=ri,e.bootstrap?rW(e,"bootstrap").then(t).catch(t=>{if(n)throw rt(t,e,rh);return t8(t,e,rh),e}):Promise.resolve().then(t)));function t(){return e.status=rs,e}}function rE(e,n){return Promise.resolve().then(()=>{if(e.status!==rc)return e;return e.status=ru,Promise.all(Object.keys(e.parcels).map(n=>e.parcels[n].unmountThisParcel())).then(t,r=>t().then(()=>{let t=Error(r.message);if(n)throw rt(t,e,rh);t8(t,e,rh)})).then(()=>e);function t(){return rW(e,"unmount").then(()=>{e.status=rs},t=>{if(n)throw rt(t,e,rh);t8(t,e,rh)})}})}let rS=!1,rD=!1;function rz(e,n){return Promise.resolve().then(()=>e.status!==rs?e:(rS||(window.dispatchEvent(new t6("single-spa:before-first-mount")),rS=!0),e.status=rl,rW(e,"mount").then(()=>(e.status=rc,rD||(window.dispatchEvent(new t6("single-spa:first-mount")),rD=!0),e)).catch(t=>{return e.status=rc,rE(e,!0).then(r,r);function r(){if(n)throw rt(t,e,rh);return t8(t,e,rh),e}})))}let rM=0,rP={parcels:{}};function rT(){return rO.apply(rP,arguments)}function rO(e,n){let t,r,o,a=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(rn(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(rn(3,!1,typeof e.name));let i=rM++,s=e.name||`parcel-${i}`;if("object"!=typeof n)throw Error(rn(4,!1,s,typeof n));if(!n.domElement)throw Error(rn(5,!1,s));let l="function"==typeof e,c=l?e:()=>Promise.resolve(e),p={id:i,parcels:{},status:l?ro:ra,customProps:n,parentName:ry(a),unmountThisParcel:()=>f.then(()=>{if(p.status!==rc)throw Error(rn(6,!1,s,p.status));return rE(p,!0)}).then(e=>(p.parentName&&delete a.parcels[p.id],e)).then(e=>(r(e),e)).catch(e=>{throw p.status=rh,o(e),e})};a.parcels[i]=p;let u=c();if(!u||"function"!=typeof u.then)throw Error(rn(7,!1));let d=(u=u.then(e=>{if(!e)throw Error(rn(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!rA(e.bootstrap))throw Error(rn(9,!1,s));if(!rA(e.mount))throw Error(rn(10,!1,s));if(!rA(e.unmount))throw Error(rn(11,!1,s));if(e.update&&!rA(e.update))throw Error(rn(12,!1,s));let n=rw(e,"bootstrap"),r=rw(e,"mount"),o=rw(e,"unmount");p.status=ra,p.name=s,p.bootstrap=n,p.mount=r,p.unmount=o,p.timeouts=rV(e.timeouts),e.update&&(p.update=rw(e,"update"),t.update=function(e){return p.customProps=e,rN(Promise.resolve().then(()=>{if(p.status!==rc)throw Error(rn(32,!1,ry(p)));return p.status=rp,rW(p,"update").then(()=>(p.status=rc,p)).catch(e=>{throw rt(e,p,rh)})}))})})).then(()=>rC(p,!0)),f=d.then(()=>rz(p,!0)),h=new Promise((e,n)=>{r=e,o=n});return t={mount:()=>rN(Promise.resolve().then(()=>{if(p.status!==rs)throw Error(rn(13,!1,s,p.status));return a.parcels[i]=p,rz(p)})),unmount:()=>rN(p.unmountThisParcel()),getStatus:()=>p.status,loadPromise:rN(u),bootstrapPromise:rN(d),mountPromise:rN(f),unmountPromise:rN(h)}}function rN(e){return e.then(()=>null)}function rI(e){let n=ry(e),t="function"==typeof e.customProps?e.customProps(n,window.location):e.customProps;("object"!=typeof t||null===t||Array.isArray(t))&&(t={},console.warn(rn(40,!1),n,t));let r=rv({},t,{name:n,mountParcel:rO.bind(e),singleSpa:t5});return rb(e)&&(r.unmountSelf=e.unmountThisParcel),r}let rB={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rj(e,n,t){if("number"!=typeof e||e<=0)throw Error(rn(16,!1));rB.bootstrap={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function rR(e,n,t){if("number"!=typeof e||e<=0)throw Error(rn(17,!1));rB.mount={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function rF(e,n,t){if("number"!=typeof e||e<=0)throw Error(rn(18,!1));rB.unmount={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function rL(e,n,t){if("number"!=typeof e||e<=0)throw Error(rn(19,!1));rB.unload={millis:e,dieOnTimeout:n,warningMillis:t||1e3}}function rW(e,n){let t=e.timeouts[n],r=t.warningMillis,o=r_(e);return new Promise((a,i)=>{let s=!1,l=!1;e[n](rI(e)).then(e=>{s=!0,a(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>p(1),r),setTimeout(()=>p(!0),t.millis);let c=rn(31,!1,n,o,ry(e),t.millis);function p(e){s||(!0===e?(l=!0,t.dieOnTimeout?i(Error(c)):console.error(c)):!l&&(console.warn(c),e*r+r<t.millis&&setTimeout(()=>p(e+1),r)))}})}function rV(e){let n={};for(let t in rB)n[t]=rv({},rB[t],e&&e[t]||{});return n}function rG(e){return Promise.resolve().then(()=>{let n,t;return e.loadPromise?e.loadPromise:e.status!==rr&&e.status!==rf?e:(e.status=ro,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rI(e));if(!rk(r))throw t=!0,Error(rn(33,!1,ry(e)));return r.then(t=>{let r;e.loadErrorTime=null,"object"!=typeof(n=t)&&(r=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!rA(n.bootstrap)&&(r=35),rA(n.mount)||(r=36),rA(n.unmount)||(r=37);let o=r_(n);if(r){let t;try{t=JSON.stringify(n)}catch(e){}return console.error(rn(r,!1,o,ry(e),t),n),t8(void 0,e,rh),e}return n.devtools&&n.devtools.overlays&&(e.devtools.overlays=rv({},e.devtools.overlays,n.devtools.overlays)),e.status=ra,e.bootstrap=rw(n,"bootstrap"),e.mount=rw(n,"mount"),e.unmount=rw(n,"unmount"),e.unload=rw(n,"unload"),e.timeouts=rV(n.timeouts),delete e.loadPromise,e})}).catch(n=>{let r;return delete e.loadPromise,t?r=rh:(r=rf,e.loadErrorTime=(new Date).getTime()),t8(n,e,r),e}))})}let rU="u">typeof window,rq={hashchange:[],popstate:[]},rH=["hashchange","popstate"];function rK(e){let n;if("string"==typeof e)n=e;else if(this&&this.href)n=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(rn(14,!1));n=e.currentTarget.href,e.preventDefault()}let t=r1(window.location.href),r=r1(n);0===n.indexOf("#")?window.location.hash=r.hash:t.host!==r.host&&r.host?window.location.href=n:r.pathname===t.pathname&&r.search===t.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function rY(e){if(e){let n=e[0].type;rH.indexOf(n)>=0&&rq[n].forEach(n=>{try{n.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rZ(){om([],arguments)}function rJ(e,n){return function(){let t=window.location.href,o=e.apply(this,arguments),a=window.location.href;return r&&t===a||window.dispatchEvent(function(e,n){let t;try{t=new PopStateEvent("popstate",{state:e})}catch(n){(t=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return t.singleSpa=!0,t.singleSpaTrigger=n,t}(window.history.state,n)),o}}let rX=null,rQ=!1;function r0(e){if(rQ)throw Error(rn(43,!1));r=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rQ=!0,rX=window.history.replaceState,window.addEventListener("hashchange",rZ),window.addEventListener("popstate",rZ);let n=window.addEventListener,t=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&rH.indexOf(e)>=0)||r$(rq[e],e=>e===t))return n.apply(this,arguments);rq[e].push(t)},window.removeEventListener=function(e,n){return"function"==typeof n&&rH.indexOf(e)>=0&&(rq[e]=rq[e].filter(e=>e!==n)),t.apply(this,arguments)},window.history.pushState=rJ(window.history.pushState,"pushState"),window.history.replaceState=rJ(rX,"replaceState")}function r1(e){let n=document.createElement("a");return n.href=e,n}rU&&(window.singleSpaNavigate?console.warn(rn(41,!1)):window.singleSpaNavigate=rK);let r2=!1;function r3(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!r2){let n=e.fn.on,t=e.fn.off;e.fn.on=function(e,t){return r5.call(this,n,window.addEventListener,e,t,arguments)},e.fn.off=function(e,n){return r5.call(this,t,window.removeEventListener,e,n,arguments)},r2=!0}}function r5(e,n,t,r,o){return"string"!=typeof t?e.apply(this,o):(t.split(/\s+/).forEach(e=>{rH.indexOf(e)>=0&&(n(e,r),t=t.replace(e,""))}),""===t.trim()?this:e.apply(this,o))}let r4={};function r6(e){return Promise.resolve().then(()=>{let n=r4[ry(e)];if(!n)return e;if(e.status===rr)return r7(e,n),e;if(e.status===rd)return n.promise.then(()=>e);if(e.status!==rs&&e.status!==rf)return e;let t=e.status===rf?Promise.resolve():rW(e,"unload");return e.status=rd,t.then(()=>(r7(e,n),e)).catch(t=>(delete r4[ry(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,t8(t,e,rh),n.reject(t),e))})}function r7(e,n){delete r4[ry(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=rr,n.resolve()}function r8(e,n,t,r){r4[ry(e)]={app:e,resolve:t,reject:r},Object.defineProperty(r4[ry(e)],"promise",{get:n})}let r9=[];function oe(){return r9.filter(rm).map(ry)}function on(){return r9.map(ry)}function ot(e){let n=r$(r9,n=>ry(n)===e);return n?n.status:null}let or=!1;function oo(e,n,t,r){var o,a;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(rn(39,!1));let n=["name","app","activeWhen","customProps"],t=Object.keys(e).reduce((e,t)=>n.indexOf(t)>=0?e:e.concat(t),[]);if(0!==t.length)throw Error(rn(38,!1,n.join(", "),t.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(rn(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(rn(24,!1));if(!oc(e.customProps))throw Error(rn(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,n,t,r){if("string"!=typeof e||0===e.length)throw Error(rn(20,!1));if(!n)throw Error(rn(23,!1));if("function"!=typeof t)throw Error(rn(24,!1));if(!oc(r))throw Error(rn(22,!1))}(e,n,t,r),i.name=e,i.loadApp=n,i.activeWhen=t,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?()=>Promise.resolve(o):o,i.customProps=i.customProps||{},s=(s=Array.isArray(a=i.activeWhen)?a:[a]).map(e=>"function"==typeof e?e:op(e)),i.activeWhen=e=>s.some(n=>n(e)),i);if(oy||or||(or=!0,setTimeout(()=>{oy||console.warn(rn(1,!1))},5e3)),-1!==on().indexOf(l.name))throw Error(rn(21,!1,l.name));r9.push(rv({loadErrorTime:null,status:rr,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),rU&&(r3(),om())}function oa(e=window.location){return r9.filter(n=>n.activeWhen(e)).map(ry)}function oi(e){if(0===r9.filter(n=>ry(n)===e).length)throw Error(rn(25,!1,e));return(rU?os(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let n=r9.map(ry).indexOf(e);r9.splice(n,1)})}function os(e,n={waitForUnmount:!1}){if("string"!=typeof e)throw Error(rn(26,!1));let t=r$(r9,n=>ry(n)===e);if(!t)throw Error(rn(27,!1,e));let r=r4[ry(t)];if(n&&n.waitForUnmount){if(r)return r.promise;{let e=new Promise((n,r)=>{r8(t,()=>e,n,r)});return e}}{let e;return r?(e=r.promise,ol(t,r.resolve,r.reject)):e=new Promise((n,r)=>{r8(t,()=>e,n,r),ol(t,n,r)}),e}}function ol(e,n,t){Promise.resolve().then(()=>{if(r$(oa(),n=>n===ry(e)))return oh()}).then(()=>rE(e).then(r6).then(()=>{n(),setTimeout(()=>{om()})})).catch(t)}function oc(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function op(e,n){let t=function(e,n){let t=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let n=0;n<e.length;n++){let t=e[n],o=r&&"/"===t;(!r&&":"===t||o)&&a(n)}return a(e.length),RegExp(o,"i");function a(a){let i=e.slice(t,a).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":i,a===e.length)if(r)n&&(o+="$");else{let e=n?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,t=a}}(e,n);return e=>{let n=e.origin;n||(n=`${e.protocol}//${e.host}`);let r=e.href.replace(n,"").replace(e.search,"").split("?")[0];return t.test(r)}}let ou=!1,od=[],of=rU&&window.location.href;function oh(){return om()}function om(e=[],n,t=!1){let r,o,a,i,s;if(ou)return new Promise((e,t)=>{od.push({resolve:e,reject:t,eventArguments:n})});let{appsToUnload:l,appsToUnmount:c,appsToLoad:p,appsToMount:u}=(r=[],o=[],a=[],i=[],s=(new Date).getTime(),r9.forEach(e=>{let n=e.status!==rh&&rg(e);switch(e.status){case rf:n&&s-e.loadErrorTime>=200&&a.push(e);break;case rr:case ro:n&&a.push(e);break;case ra:case rs:!n&&r4[ry(e)]?r.push(e):n&&i.push(e);break;case rc:n||o.push(e)}}),{appsToUnload:r,appsToUnmount:o,appsToLoad:a,appsToMount:i}),d,f=[],h=of,m=of=window.location.href;return oy?(ou=!0,d=l.concat(p,c,u),Promise.resolve().then(()=>($(0===d.length?"before-no-app-change":"before-app-change",v(!0)),$("before-routing-event",v(!0,{cancelNavigation:g})),Promise.all(f).then(t=>{if(t.some(e=>e))return rX.call(window.history,history.state,"",h.substring(location.origin.length)),of=location.href,ou=!1,om(e,n,!0);let r=l.map(r6),o=Promise.all(c.map(rE).map(e=>e.then(r6)).concat(r));o.then(()=>{$("before-mount-routing-event",v(!0))},e=>{throw e});let a=p.map(e=>rG(e).then(e=>og(e,o))),i=u.filter(e=>0>p.indexOf(e)).map(e=>og(e,o));return o.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(a.concat(i)).catch(n=>{throw e.forEach(e=>e.reject(n)),n}).then(y).then(()=>{},e=>{throw e})))})))):(d=p,Promise.resolve().then(()=>Promise.all(p.map(rG)).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})));function g(e=!0){let n="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);f.push(n.catch(e=>(console.warn(Error(rn(42,!1))),console.warn(e),!1)))}function y(){let n=oe();e.forEach(e=>e.resolve(n));try{$(0===d.length?"no-app-change":"app-change",v()),$("routing-event",v())}catch(e){setTimeout(()=>{throw e})}if(ou=!1,od.length>0){let e=od;od=[],om(e)}return n}function b(){t||(e.forEach(e=>{rY(e.eventArguments)}),rY(n))}function v(e=!1,t){let r={},o={[rc]:[],[rs]:[],[rr]:[],[rh]:[]};e?(p.concat(u).forEach((e,n)=>{i(e,rc)}),l.forEach(e=>{i(e,rr)}),c.forEach(e=>{i(e,rs)})):d.forEach(e=>{i(e)});let a={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:d.length,originalEvent:null==n?void 0:n[0],oldUrl:h,newUrl:m}};return t&&rv(a.detail,t),a;function i(e,n){let t=ry(e);n=n||ot(t),r[t]=n,(o[n]=o[n]||[]).push(t)}}function $(e,n){t||window.dispatchEvent(new t6(`single-spa:${e}`,n))}}function og(e,n){return rg(e)?rC(e).then(e=>n.then(()=>rg(e)?rz(e):e)):n.then(()=>e)}let oy=!1;function ob(e){oy=!0,rU&&(r0(e),om())}function o_(e,n){let t=window.getOpenmrsSpaBase().replace(/\/$/,"");return ov(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t,...n}).replace(/^\/\//,"/")}function ov(e,n){return Object.keys(n).reduce((e,t)=>e.split("${"+t+"}").join(n[t]),e)}function o$({to:e,templateParams:n}){let t=window.getOpenmrsSpaBase().replace(/\/$/,""),r=o_(e,n).replace(window.location.origin,"");r.startsWith(t)?rK(r):window.location.assign(r)}rU&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...r9]},reroute:om,NOT_LOADED:rr,toLoadPromise:rG,toBootstrapPromise:rC,unregisterApplication:oi,getProfilerData:function(){return rx}});let oA="openmrs:history";function ow(e){let n=JSON.parse(sessionStorage.getItem(oA)??"[]")||[];n.push(e),n.length>50&&(n=n.slice(-50)),sessionStorage.setItem(oA,JSON.stringify(n))}function ok(){0===JSON.parse(sessionStorage.getItem(oA)??"[]").length&&document.referrer&&ow(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let n=ox();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(n[n.length-1]=window.location.href,sessionStorage.setItem(oA,JSON.stringify(n))):!e.detail.originalEvent?.singleSpa&&n.includes(window.location.href)?oC({toUrl:window.location.href}):n[n.length-1]!==window.location.href&&ow(window.location.href)})}function ox(){return JSON.parse(sessionStorage.getItem(oA)??"[]")}function oC({toUrl:e}){let n=ox(),t=n.lastIndexOf(e);if(-1!=t){let e=n.slice(0,t+1);o$({to:n[t]}),sessionStorage.setItem(oA,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function oE(){sessionStorage.removeItem(oA)}let oS="${openmrsSpaBase}/login",oD={redirectAuthFailure:{enabled:{_type:n4.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:n4.String,_default:oS,_validators:[tY.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:n4.Array,_default:[401],_elements:{_type:n4.Number,_validators:[tY.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:n4.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:n4.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function oz(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}let oM="/ws/rest/v1",oP="/ws/fhir2/R4",oT=`${oM}/session`;function oO(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function oN(e,n={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof n)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let t=oO(e);if(n.headers||(n.headers={}),em(n.body)&&(n.body=JSON.stringify(n.body)),void 0===n.headers.Accept&&(n.headers.Accept="application/json"),null===n.headers.Accept&&delete n.headers.Accept,e.startsWith(oM)&&void 0===n.headers["Disable-WWW-Authenticate"]&&(n.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(oP)){let e=new URL(t,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),t=e.toString())}let r=Error();return window.fetch(t,n).then(async e=>{let{redirectAuthFailure:n,followRedirects:o}=await tx("@openmrs/esm-api");if(e.ok){let n=e.headers.get("location");return(o&&n&&(t===oO(oT)||204===e.status)&&o$({to:n}),204===e.status)?(e.data=null,e):e.clone().text().then(n=>{try{n&&(e.data=JSON.parse(n))}catch(e){}return e})}return t===oO(oT)&&403===e.status||n.enabled&&n.errors.includes(e.status)?(oE(),o$({to:n.url||e.headers.get("location")||oS}),n.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(n=>{let o=n;try{o=JSON.parse(n)}catch(e){}throw new oB(t,e,o,r)},n=>{throw new oB(t,e,null,r)})})}function oI(e,n={}){if("object"!=typeof n)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");let t=new AbortController;return n.signal=t.signal,new es.Observable(r=>{let o=!1;return oN(e,n).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||t.abort()}})}class oB extends Error{constructor(e,n,t,r){super(),oz(this,"response",void 0),oz(this,"responseBody",void 0),this.message=`Server responded with ${n.status} (${n.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=t,this.response=n,this.stack=`Stacktrace for outgoing request:
13
13
  ${r.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let oj=G("session",{loaded:!1,session:null}),oR=0;function oF(e={includeAuthStatus:!0}){return(oR<Date.now()-6e4||!oj.getState().loaded)&&oV(),new es.Observable(n=>{let t=t=>{t.loaded&&(e.includeAuthStatus?n.next(t.session):n.next(t.session?.user))};return t(oj.getState()),oj.subscribe(t)})}function oL(){return(oR<Date.now()-6e4||!oj.getState().loaded)&&oV(),oj}function oW(e){let n=e.locale??e.user?.userProperties?.defaultLocale;n&&n.includes("_")&&(n=n.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(n)&&n!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",n)}function oV(e,n){oR=Date.now();let t={};return e&&n&&(t.Authorization=`Basic ${window.btoa(`${e}:${n}`)}`),oZ(oN(oT,{headers:t}))}function oG(){oj.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oU(e,n){var t,r;if(void 0===n)return!e;if(!e)return!0;return t=e,r=n,("string"==typeof t?!Y(r.privileges.find(e=>t===e.display)):Array.isArray(t)?t.every(e=>!Y(r.privileges.find(n=>e===n.display))):(Y(t)||console.error(`Could not understand privileges "${t}"`),!0))||!Y(n.roles.find(e=>"System Developer"===e.display))}function oq(){let e,n;return new Promise(t=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,t(r.session.user),n&&n())};r(oj.getState()),e||(n=oj.subscribe(r))})}function oH(){return new Promise((e,n)=>{oF().subscribe(n=>{e(n.sessionLocation)},n).unsubscribe()})}async function oK(e,n){return oZ(oN(oT,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal}))}async function oY(e,n,t){return t||(t=new AbortController),await oN(`${oM}/user/${e}`,{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:t.signal}),oV()}function oZ(e){return new Promise((n,t)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},oj.setState(r),n(r)):(r={loaded:!1,session:null},oj.setState(r),t(r))}).catch(e=>{O(`Failed to fetch new session information: ${e}`);let n={loaded:!1,session:null};oj.setState(n),t(n)})})}function oJ(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oj.subscribe(e=>{e.loaded&&e.session&&oW(e.session)});let oX={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function oQ(){t_("@openmrs/esm-api",oD),oV()}let o0={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",closeWorkspaces2PromptTitle:"Close workspace(s)",closeWorkspaces2PromptBody:"You are about to close the following workspace(s), which might have unsaved changes:",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var o1=t(4557),o2=t.n(o1);let o3=o2().default||o2();function o5(e,n,t,r){return o3.t(n,{ns:e,defaultValue:t,...r})}function o4(e,n,t){return o0[e]?o5("core",e,n??o0[e],t):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}o3.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let o6="import-map-override:",o7="import-map-overrides-disabled",o8="import-map-overrides:change",o9=!1,ae=null;async function an(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),n=[];for(let t=0;t<e.length;t++){let r=e[t];try{if(r.src){let e=await fetch(r.src);n.push(await e.json())}else r.textContent&&n.push(JSON.parse(r.textContent))}catch(e){console.warn(`[import-maps] Failed to parse import map from script tag at index ${t}`,e)}}return at(n)}function at(e){let n={imports:{}};for(let t of e)t?.imports&&Object.assign(n.imports,t.imports);return n}function ar(){let e={};try{let n=al();for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(o6)){let t=r.slice(o6.length);if(!n.includes(t)){let n=localStorage.getItem(r);n&&(e[t]=n)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function ao(){let e=await an();return o9?at([e,ae??ar()]):e}async function aa(){return an()}async function ai(){return o9?at([await an(),ar()]):an()}function as(e){if(!o9)return{imports:{}};if(e){let e={};for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(o6)){let n=localStorage.getItem(t);n&&(e[t.slice(o6.length)]=n)}}return{imports:e}}return ar()}function al(){if(!o9)return[];try{let e=localStorage.getItem(o7);if(e){let n=JSON.parse(e);if(Array.isArray(n))return n}}catch{}return[]}function ac(e){return!!o9&&al().includes(e)}function ap(e,n){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(o6+e,n),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function au(e){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(o6+e);let n=al().filter(n=>n!==e);n.length>0?localStorage.setItem(o7,JSON.stringify(n)):localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function ad(){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);t?.startsWith(o6)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function af(e){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let n=al().filter(n=>n!==e);n.length>0?localStorage.setItem(o7,JSON.stringify(n)):localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let ah=!1;function am(){!ah&&(ah=!0,(o9="development"===window.spaEnv)&&(ae=ar()))}function ag(e){return e.replace(/[\/\-@]/g,"_")}async function ay(e,n="./start",r){var o;let a,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([ab(e,r?.importMap),new Promise((n,t)=>{a=setTimeout(()=>{var n;t(Error(`Could not resolve requested script, ${e}, within ${(n=i)<1e3?`${n} milliseconds`:n<6e4?`${Math.floor(n/1e3)} seconds`:n<36e5?`${Math.floor(n/6e4)} minutes`:n<864e5?`${Math.floor(n/36e5)} hours`:`${Math.floor(n/864e5)} days`}.`))},i)})]),a&&clearTimeout(a);let s=ag(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(t.S.default);let c=(await l.get(n))();if("object"!=typeof c||null===c){let n=`Container for ${e} did not return an ESM module as expected`;throw console.error(n),Error(n)}return c}async function ab(e,n){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let t=ag(e);if(!window[t]){let t=n??await a_();if(!t.imports.hasOwnProperty(e)){let n=`Could not find the package ${e} defined in the current importmap`;throw console.error(n),Error(n)}let r=t.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let o=e in as().imports;try{return await new Promise((e,n)=>{!function(e,n,t){let r=document.head.querySelector(`script[src="${e}"]`),o=window[av];if(o||(o=window[av]=new Set([])),r)if(o.has(e)){let e,o,a;a=()=>{e&&r.removeEventListener("load",e),o&&r.removeEventListener("error",o)},e=()=>{a(),n(null)},o=e=>{a(),t(e.message)},r.addEventListener("load",e),r.addEventListener("error",o)}else console.warn(`Script at ${e} already loaded. Not loading it again.`),n(null);else{let r,a,i;o.add(e);let s=document.createElement("script");s.src=e,s.type="text/javascript",s.async=!0;let l=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);i=()=>{clearTimeout(l),o.delete(e),r&&s.removeEventListener("load",r),a&&s.removeEventListener("error",a)},r=()=>{i(),n(null)},a=n=>{i();let r=`Failed to load script from ${e}`;console.error(r,n),t(n.message??r)},s.addEventListener("load",r),s.addEventListener("error",a),document.head.appendChild(s)}}(r,e,n)})}catch(e){return o&&D({kind:"error",title:o4("scriptLoadingFailed","Error: Script failed to load"),description:o4("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:r}),actionButtonLabel:o4("resetOverrides","Reset overrides"),onActionButtonClick(){ad(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function a_(){return ao()}let av=Symbol("__openmrs_script_loading");function a$(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function aA(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&a$(n))}let aw="openmrs-routes:",ak="openmrs-routes:change",ax=!1,aC=null;async function aE(){let e=document.querySelectorAll("script[type='openmrs-routes']"),n=[];for(let t=0;t<e.length;t++){let r=e[t];try{let e;if(r.src){let n=await fetch(r.src);e=await n.json()}else r.textContent&&(e=JSON.parse(r.textContent));e&&aA(e)&&n.push(e)}catch(e){console.warn(`[route-maps] Failed to parse routes from script tag at index ${t}`,e)}}return aS(n)}function aS(e){let n={};for(let t of e)t&&"object"==typeof t&&Object.assign(n,t);return n}async function aD(){let e={};try{let n=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(aw)){let e=localStorage.getItem(t);e&&n.push({moduleName:t.slice(aw.length),raw:e})}}for(let t of(await Promise.allSettled(n.map(async({moduleName:e,raw:n})=>{let t=JSON.parse(n);if(a$(t))return{moduleName:e,routes:t};if("string"==typeof t&&t.startsWith("http")){let n=await fetch(t),r=await n.json();if(a$(r))return{moduleName:e,routes:r};throw Error(`${t} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===t.status?e[t.value.moduleName]=t.value.routes:console.warn("[route-maps] Failed to load route override",t.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function az(){let e=await aE();return ax?aS([e,aC??await aD()]):e}async function aM(){return aE()}async function aP(){return ax?aS([await aE(),await aD()]):aE()}function aT(){if(!ax)return{};let e={};try{for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(aw)){let n=localStorage.getItem(t);n&&(e[t.slice(aw.length)]=n)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function aO(e,n){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof n)if(n.startsWith("http"))localStorage.setItem(aw+e,JSON.stringify(n));else{let t=JSON.parse(n);if(!a$(t))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n);localStorage.setItem(aw+e,JSON.stringify(t))}else if(n instanceof URL)localStorage.setItem(aw+e,JSON.stringify(n.toString()));else{if(!a$(n))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,n);localStorage.setItem(aw+e,JSON.stringify(n))}window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function aN(e){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(aw+e),window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function aI(){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);t?.startsWith(aw)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let aB=null;function aj(){return aB||(aB=(ax="development"===window.spaEnv)?aD().then(e=>{aC=e}):Promise.resolve())}let aR=`${oM}/attachment`;function aF(e,n){return oN(`${aR}/${e}`,{signal:n.signal})}function aL(e,n,t){return oN(`${aR}?patient=${e}&includeEncounterless=${n}`,{signal:t.signal})}async function aW(e,n){let t=new FormData;return t.append("fileCaption",n.fileDescription),t.append("patient",e),n.file?t.append("file",n.file,n.fileName):(t.append("file",new File([""],n.fileName),n.fileName),t.append("base64Content",n.base64Content)),oN(`${aR}`,{method:"POST",body:t})}function aV(e,n){return oN(`${aR}/${e}`,{method:"DELETE",signal:n.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function aG(e,n){return new Promise(function(t){var r=new MessageChannel;r.port1.onmessage=function(e){t(e.data)},e.postMessage(n,[r.port2])})}function aU(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aq(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var aH=function(){var e=this;this.promise=new Promise(function(n,t){e.resolve=n,e.reject=t})};function aK(e,n){var t=location.href;return new URL(e,t).href===new URL(n,t).href}var aY=function(e,n){this.type=e,Object.assign(this,n)};function aZ(e,n,t){return t?n?n(e):e:(e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e)}function aJ(){}var aX={type:"SKIP_WAITING"};function aQ(e,n){if(!n)return e&&e.then?e.then(aJ):Promise.resolve()}var a0=function(e){function n(n,t){var r,o;return void 0===t&&(t={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new aH,r.en=new aH,r.on=new aH,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,n=e.installing;r.tn>0||!aK(n.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=n,e.removeEventListener("updatefound",r.cn)):(r.hn=n,r.an.add(n),r.rn.resolve(n)),++r.tn,n.addEventListener("statechange",r.ln)},r.ln=function(e){var n=r.fn,t=e.target,o=t.state,a=t===r.vn,i={sw:t,isExternal:a,originalEvent:e};!a&&r.mn&&(i.isUpdate=!0),r.dispatchEvent(new aY(o,i)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&n.waiting===t&&r.dispatchEvent(new aY("waiting",i))},200):"activating"===o&&(clearTimeout(r.wn),a||r.en.resolve(t))},r.dn=function(e){var n=r.hn,t=n!==navigator.serviceWorker.controller;r.dispatchEvent(new aY("controlling",{isExternal:t,originalEvent:e,sw:n,isUpdate:r.mn})),t||r.on.resolve(n)},o=function(e){var n=e.data,t=e.ports,o=e.source;return aZ(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new aY("message",{data:n,originalEvent:e,ports:t,sw:o}))})},r.gn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},r.sn=n,r.nn=t,navigator.serviceWorker.addEventListener("message",r.gn),r}n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var t,r,o=n.prototype;return o.register=function(e){var n=(void 0===e?{}:e).immediate,t=void 0!==n&&n;try{var r,o,a,i=this;return r=function(){if(!t&&"complete"!==document.readyState)return aQ(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return i.mn=!!navigator.serviceWorker.controller,i.yn=i.pn(),aZ(i.bn(),function(e){i.fn=e,i.yn&&(i.hn=i.yn,i.en.resolve(i.yn),i.on.resolve(i.yn),i.yn.addEventListener("statechange",i.ln,{once:!0}));var n=i.fn.waiting;return n&&aK(n.scriptURL,i.sn.toString())&&(i.hn=n,Promise.resolve().then(function(){i.dispatchEvent(new aY("waiting",{sw:n,wasWaitingBeforeRegister:!0}))}).then(function(){})),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.dn),i.fn})},(a=r())&&a.then?a.then(o):o(a)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?aQ(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return aZ(this.getSW(),function(n){return aG(n,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&aG(this.fn.waiting,aX)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&aK(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}(function(){return aZ(navigator.serviceWorker.register(e.sn,e.nn),function(n){return e.un=performance.now(),n})},function(e){throw e})}catch(e){return Promise.reject(e)}},t=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],aU(n.prototype,t),r&&aU(n,r),n}(function(){function e(){this.Pn=new Map}var n=e.prototype;return n.addEventListener=function(e,n){this.Sn(e).add(n)},n.removeEventListener=function(e,n){this.Sn(e).delete(n)},n.dispatchEvent=function(e){e.target=this;for(var n,t=function(e){var n;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return aq(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aq(e,void 0):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(n=t()).done;)(0,n.value)(e)},n.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function a1(e,n){if(void 0!==u)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),u;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let t=new a0(e,n);return u=t.register().then(()=>t.controlling.then(()=>t))}function a2(){return u??Promise.resolve(void 0)}let a3="x-omrs-offline-response-body",a5="x-omrs-offline-response-status",a4="x-omrs-offline-caching-strategy";async function a6(e){let n=await a2();return n?await n.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function a7(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(n){if(n.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function a8(){return!window.indexedDB}async function a9(){return new Promise(e=>{let n=indexedDB.open("test");n.onerror=()=>e(!0),n.onsuccess=()=>e(!1)})}async function ie(){return await a9()||await a8()||await a7()}let it="openmrs3:offline-mode",ir="unavailable";function io(){return{current:ir,notAvailable:"unavailable"===ir,active:"on"===ir}}function ia(e){"unavailable"!==ir&&"unavailable"!==e&&(localStorage.setItem(it,"on"===e?"active":"disabled"),ir=e)}async function ii(){await ie()||(ir="active"===localStorage.getItem(it)?"on":"off"),navigator.onLine}let is="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,il=Object.keys,ic=Array.isArray;function ip(e,n){return"object"!=typeof n||il(n).forEach(function(t){e[t]=n[t]}),e}"u"<typeof Promise||is.Promise||(is.Promise=Promise);let iu=Object.getPrototypeOf,id={}.hasOwnProperty;function ih(e,n){return id.call(e,n)}function im(e,n){"function"==typeof n&&(n=n(iu(e))),("u"<typeof Reflect?il:Reflect.ownKeys)(n).forEach(t=>{iy(e,t,n[t])})}let ig=Object.defineProperty;function iy(e,n,t,r){ig(e,n,ip(t&&ih(t,"get")&&"function"==typeof t.get?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function ib(e){return{from:function(n){return e.prototype=Object.create(n.prototype),iy(e.prototype,"constructor",e),{extend:im.bind(null,e.prototype)}}}}let i_=Object.getOwnPropertyDescriptor;function iv(e,n){let t;return i_(e,n)||(t=iu(e))&&iv(t,n)}let i$=[].slice;function iA(e,n,t){return i$.call(e,n,t)}function iw(e,n){return n(e)}function ik(e){if(!e)throw Error("Assertion Failed")}function ix(e){is.setImmediate?setImmediate(e):setTimeout(e,0)}function iC(e,n){return e.reduce((e,t,r)=>{var o=n(t,r);return o&&(e[o[0]]=o[1]),e},{})}function iE(e,n){if(ih(e,n))return e[n];if(!n)return e;if("string"!=typeof n){for(var t=[],r=0,o=n.length;r<o;++r){var a=iE(e,n[r]);t.push(a)}return t}var i=n.indexOf(".");if(-1!==i){var s=e[n.substr(0,i)];return void 0===s?void 0:iE(s,n.substr(i+1))}}function iS(e,n,t){if(e&&void 0!==n&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof n&&"length"in n){ik("string"!=typeof t&&"length"in t);for(var r=0,o=n.length;r<o;++r)iS(e,n[r],t[r])}else{var a=n.indexOf(".");if(-1!==a){var i=n.substr(0,a),s=n.substr(a+1);if(""===s)void 0===t?ic(e)&&!isNaN(parseInt(i))?e.splice(i,1):delete e[i]:e[i]=t;else{var l=e[i];l&&ih(e,i)||(l=e[i]={}),iS(l,s,t)}}else void 0===t?ic(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function iD(e){var n={};for(var t in e)ih(e,t)&&(n[t]=e[t]);return n}let iz=[].concat;function iM(e){return iz.apply([],e)}let iP="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(iM([8,16,32,64].map(e=>["Int","Uint","Float"].map(n=>n+e+"Array")))).filter(e=>is[e]),iT=iP.map(e=>is[e]);iC(iP,e=>[e,!0]);let iO=null;function iN(e){iO="u">typeof WeakMap&&new WeakMap;let n=function e(n){if(!n||"object"!=typeof n)return n;let t=iO&&iO.get(n);if(t)return t;if(ic(n)){t=[],iO&&iO.set(n,t);for(var r=0,o=n.length;r<o;++r)t.push(e(n[r]))}else if(iT.indexOf(n.constructor)>=0)t=n;else{let r=iu(n);for(var a in t=r===Object.prototype?{}:Object.create(r),iO&&iO.set(n,t),n)ih(n,a)&&(t[a]=e(n[a]))}return t}(e);return iO=null,n}let{toString:iI}={};function iB(e){return iI.call(e).slice(8,-1)}let ij="u">typeof Symbol?Symbol.iterator:"@@iterator",iR="symbol"==typeof ij?function(e){var n;return null!=e&&(n=e[ij])&&n.apply(e)}:function(){return null},iF={};function iL(e){var n,t,r,o;if(1==arguments.length){if(ic(e))return e.slice();if(this===iF&&"string"==typeof e)return[e];if(o=iR(e)){for(t=[];!(r=o.next()).done;)t.push(r.value);return t}if(null==e)return[e];if("number"==typeof(n=e.length)){for(t=Array(n);n--;)t[n]=e[n];return t}return[e]}for(n=arguments.length,t=Array(n);n--;)t[n]=arguments[n];return t}let iW="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var iV="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),iG=()=>!0;let iU=!Error("").stack;function iq(){if(iU)try{throw iq.arguments,Error()}catch(e){return e}return Error()}function iH(e,n){var t=e.stack;return t?(n=n||0,0===t.indexOf(e.name)&&(n+=(e.name+e.message).split("\n").length),t.split("\n").slice(n).filter(iG).map(e=>"\n"+e).join("")):""}var iK=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],iY=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(iK),iZ={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function iJ(e,n){this._e=iq(),this.name=e,this.message=n}function iX(e,n){return e+". Errors: "+Object.keys(n).map(e=>n[e].toString()).filter((e,n,t)=>t.indexOf(e)===n).join("\n")}function iQ(e,n,t,r){this._e=iq(),this.failures=n,this.failedKeys=r,this.successCount=t,this.message=iX(e,n)}function i0(e,n){this._e=iq(),this.name="BulkError",this.failures=Object.keys(n).map(e=>n[e]),this.failuresByPos=n,this.message=iX(e,n)}ib(iJ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+iH(this._e,2))}},toString:function(){return this.name+": "+this.message}}),ib(iQ).from(iJ),ib(i0).from(iJ);var i1=iY.reduce((e,n)=>(e[n]=n+"Error",e),{}),i2=iY.reduce((e,n)=>{var t=n+"Error";function r(e,r){this._e=iq(),this.name=t,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=iZ[n]||t,this.inner=null)}return ib(r).from(iJ),e[n]=r,e},{});i2.Syntax=SyntaxError,i2.Type=TypeError,i2.Range=RangeError;var i3=iK.reduce((e,n)=>(e[n+"Error"]=i2[n],e),{}),i5=iY.reduce((e,n)=>(-1===["Syntax","Type","Range"].indexOf(n)&&(e[n+"Error"]=i2[n]),e),{});function i4(){}function i6(e){return e}function i7(e,n){return null==e||e===i6?n:function(t){return n(e(t))}}function i8(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function i9(e,n){return e===i4?n:function(){var t=e.apply(this,arguments);void 0!==t&&(arguments[0]=t);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=n.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?i8(r,this.onsuccess):r),o&&(this.onerror=this.onerror?i8(o,this.onerror):o),void 0!==a?a:t}}function se(e,n){return e===i4?n:function(){e.apply(this,arguments);var t=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?i8(t,this.onsuccess):t),r&&(this.onerror=this.onerror?i8(r,this.onerror):r)}}function sn(e,n){return e===i4?n:function(t){var r=e.apply(this,arguments);ip(t,r);var o=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var i=n.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?i8(o,this.onsuccess):o),a&&(this.onerror=this.onerror?i8(a,this.onerror):a),void 0===r?void 0===i?void 0:i:ip(r,i)}}function st(e,n){return e===i4?n:function(){return!1!==n.apply(this,arguments)&&e.apply(this,arguments)}}function sr(e,n){return e===i4?n:function(){var t=e.apply(this,arguments);if(t&&"function"==typeof t.then){for(var r=this,o=arguments.length,a=Array(o);o--;)a[o]=arguments[o];return t.then(function(){return n.apply(r,a)})}return n.apply(this,arguments)}}i5.ModifyError=iQ,i5.DexieError=iJ,i5.BulkError=i0;var so={};let[sa,si,ss]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iu(e),e];let n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,iu(n),e]})(),sl=si&&si.then,sc=sa&&sa.constructor,sp=!!ss;var su=!1,sd=ss?()=>{ss.then(sT)}:is.setImmediate?setImmediate.bind(null,sT):is.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{sT(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(sT,0)},sf=function(e,n){sA.push([e,n]),sm&&(sd(),sm=!1)},sh=!0,sm=!0,sg=[],sy=[],sb=null,s_=i6,sv={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:s3,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{s3(e[0],e[1])}catch(e){}})}},s$=sv,sA=[],sw=0,sk=[];function sx(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=i4,this._lib=!1;var n=this._PSD=s$;if(iV&&(this._stackHolder=iq(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==so)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&sS(this,this._value))}this._state=null,this._value=null,++n.ref,function e(n,t){try{t(t=>{if(null===n._state){if(t===n)throw TypeError("A promise cannot be resolved with itself.");var r=n._lib&&sO();t&&"function"==typeof t.then?e(n,(e,n)=>{t instanceof sx?t._then(e,n):t.then(e,n)}):(n._state=!0,n._value=t,sD(n)),r&&sN()}},sS.bind(null,n))}catch(e){sS(n,e)}}(this,e)}let sC={get:function(){var e=s$,n=sV;function t(t,r){var o=!e.global&&(e!==s$||n!==sV);let a=o&&!sH();var i=new sx((n,i)=>{sz(this,new sE(s0(t,e,o,a),s0(r,e,o,a),n,i,e))});return iV&&sP(i,this),i}return t.prototype=so,t},set:function(e){iy(this,"then",e&&e.prototype===so?sC:{get:function(){return e},set:sC.set})}};function sE(e,n,t,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=r,this.psd=o}function sS(e,n){if(sy.push(n),null===e._state){var t=e._lib&&sO();n=s_(n),e._state=!1,e._value=n,iV&&null!==n&&"object"==typeof n&&!n._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var t=iv(n,"stack");n._promise=e,iy(n,"stack",{get:()=>su?t&&(t.get?t.get.apply(n):t.value):e.stack})}),sg.some(n=>n._value===e._value)||sg.push(e),sD(e),t&&sN()}}function sD(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t<r;++t)sz(e,n[t]);var o=e._PSD;--o.ref||o.finalize(),0===sw&&(++sw,sf(()=>{0==--sw&&sI()},[]))}function sz(e,n){if(null!==e._state){var t=e._state?n.onFulfilled:n.onRejected;if(null===t)return(e._state?n.resolve:n.reject)(e._value);++n.psd.ref,++sw,sf(sM,[t,e,n])}else e._listeners.push(n)}function sM(e,n,t){try{sb=n;var r,o=n._value;n._state?r=e(o):(sy.length&&(sy=[]),r=e(o),-1===sy.indexOf(o)&&function(e){for(var n=sg.length;n;)if(sg[--n]._value===e._value)return void sg.splice(n,1)}(n)),t.resolve(r)}catch(e){t.reject(e)}finally{sb=null,0==--sw&&sI(),--t.psd.ref||t.psd.finalize()}}function sP(e,n){var t=n?n._numPrev+1:0;t<100&&(e._prev=n,e._numPrev=t)}function sT(){sO()&&sN()}function sO(){var e=sh;return sh=!1,sm=!1,e}function sN(){var e,n,t;do for(;sA.length>0;)for(e=sA,sA=[],t=e.length,n=0;n<t;++n){var r=e[n];r[0].apply(null,r[1])}while(sA.length>0);sh=!0,sm=!0}function sI(){var e=sg;sg=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var n=sk.slice(0),t=n.length;t;)n[--t]()}function sB(e){return new sx(so,!1,e)}function sj(e,n){var t=s$;return function(){var r=sO(),o=s$;try{return sJ(t,!0),e.apply(this,arguments)}catch(e){n&&n(e)}finally{sJ(o,!1),r&&sN()}}}im(sx.prototype,{then:sC,_then:function(e,n){sz(this,new sE(null,null,e,n,s$))},catch:function(e){if(1==arguments.length)return this.then(null,e);var n=arguments[0],t=arguments[1];return"function"==typeof n?this.then(null,e=>e instanceof n?t(e):sB(e)):this.then(null,e=>e&&e.name===n?t(e):sB(e))},finally:function(e){return this.then(n=>(e(),n),n=>(e(),sB(n)))},stack:{get:function(){if(this._stack)return this._stack;try{su=!0;var e=(function e(n,t,r){if(t.length===r)return t;var o="";if(!1===n._state){var a,i,s=n._value;null!=s?(a=s.name||"Error",i=s.message||s,o=iH(s,0)):(a=s,i=""),t.push(a+(i?": "+i:"")+o)}return iV&&((o=iH(n._stackHolder,2))&&-1===t.indexOf(o)&&t.push(o),n._prev&&e(n._prev,t,r)),t})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{su=!1}}},timeout:function(e,n){return e<1/0?new sx((t,r)=>{var o=setTimeout(()=>r(new i2.Timeout(n)),e);this.then(t,r).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iy(sx.prototype,Symbol.toStringTag,"Dexie.Promise"),sv.env=sX(),im(sx,{all:function(){var e=iL.apply(null,arguments).map(sK);return new sx(function(n,t){0===e.length&&n([]);var r=e.length;e.forEach((o,a)=>sx.resolve(o).then(t=>{e[a]=t,--r||n(e)},t))})},resolve:e=>{if(e instanceof sx)return e;if(e&&"function"==typeof e.then)return new sx((n,t)=>{e.then(n,t)});var n=new sx(so,!0,e);return sP(n,sb),n},reject:sB,race:function(){var e=iL.apply(null,arguments).map(sK);return new sx((n,t)=>{e.map(e=>sx.resolve(e).then(n,t))})},PSD:{get:()=>s$,set:e=>s$=e},totalEchoes:{get:()=>sV},newPSD:sU,usePSD:sQ,scheduler:{get:()=>sf,set:e=>{sf=e}},rejectionMapper:{get:()=>s_,set:e=>{s_=e}},follow:(e,n)=>new sx((t,r)=>sU((n,t)=>{var r=s$;r.unhandleds=[],r.onunhandled=t,r.finalize=i8(function(){var e;e=()=>{0===this.unhandleds.length?n():t(this.unhandleds[0])},sk.push(function n(){e(),sk.splice(sk.indexOf(n),1)}),++sw,sf(()=>{0==--sw&&sI()},[])},r.finalize),e()},n,t,r))}),sc&&(sc.allSettled&&iy(sx,"allSettled",function(){let e=iL.apply(null,arguments).map(sK);return new sx(n=>{0===e.length&&n([]);let t=e.length,r=Array(t);e.forEach((e,o)=>sx.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--t||n(r)))})}),sc.any&&"u">typeof AggregateError&&iy(sx,"any",function(){let e=iL.apply(null,arguments).map(sK);return new sx((n,t)=>{0===e.length&&t(AggregateError([]));let r=e.length,o=Array(r);e.forEach((e,a)=>sx.resolve(e).then(e=>n(e),e=>{o[a]=e,--r||t(AggregateError(o))}))})}));let sR={awaits:0,echoes:0,id:0};var sF=0,sL=[],sW=0,sV=0,sG=0;function sU(e,n,t,r){var o=s$,a=Object.create(o);a.parent=o,a.ref=0,a.global=!1,a.id=++sG;var i=sv.env;a.env=sp?{Promise:sx,PromiseProp:{value:sx,configurable:!0,writable:!0},all:sx.all,race:sx.race,allSettled:sx.allSettled,any:sx.any,resolve:sx.resolve,reject:sx.reject,nthen:s1(i.nthen,a),gthen:s1(i.gthen,a)}:{},n&&ip(a,n),++o.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sQ(a,e,t,r);return 0===a.ref&&a.finalize(),s}function sq(){return sR.id||(sR.id=++sF),++sR.awaits,sR.echoes+=100,sR.id}function sH(){return!!sR.awaits&&(0==--sR.awaits&&(sR.id=0),sR.echoes=100*sR.awaits,!0)}function sK(e){return sR.echoes&&e&&e.constructor===sc?(sq(),e.then(e=>(sH(),e),e=>(sH(),s5(e)))):e}function sY(e){++sV,sR.echoes&&0!=--sR.echoes||(sR.echoes=sR.id=0),sL.push(s$),sJ(e,!0)}function sZ(){var e=sL[sL.length-1];sL.pop(),sJ(e,!1)}function sJ(e,n){var t,r=s$;if((n?!sR.echoes||sW++&&e===s$:!sW||--sW&&e===s$)||(t=n?sY.bind(null,e):sZ,sl.call(sa,t)),e!==s$&&(s$=e,r===sv&&(sv.env=sX()),sp)){var o=sv.env.Promise,a=e.env;si.then=a.nthen,o.prototype.then=a.gthen,(r.global||e.global)&&(Object.defineProperty(is,"Promise",a.PromiseProp),o.all=a.all,o.race=a.race,o.resolve=a.resolve,o.reject=a.reject,a.allSettled&&(o.allSettled=a.allSettled),a.any&&(o.any=a.any))}}function sX(){var e=is.Promise;return sp?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(is,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:si.then,gthen:e.prototype.then}:{}}function sQ(e,n,t,r,o){var a=s$;try{return sJ(e,!0),n(t,r,o)}finally{sJ(a,!1)}}function s0(e,n,t,r){return"function"!=typeof e?e:function(){var o,a=s$;t&&sq(),sJ(n,!0);try{return e.apply(this,arguments)}finally{sJ(a,!1),r&&(o=sH,sl.call(sa,o))}}}function s1(e,n){return function(t,r){return e.call(this,s0(t,n),s0(r,n))}}-1===(""+sl).indexOf("[native code]")&&(sq=sH=i4);let s2="unhandledrejection";function s3(e,n){var t;try{t=n.onuncatched(e)}catch(e){}if(!1!==t)try{var r,o={promise:n,reason:e};if(is.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(s2,!0,!0),ip(r,o)):is.CustomEvent&&ip(r=new CustomEvent(s2,{detail:o}),o),r&&is.dispatchEvent&&(dispatchEvent(r),!is.PromiseRejectionEvent&&is.onunhandledrejection))try{is.onunhandledrejection(r)}catch(e){}iV&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var s5=sx.reject;let s4="3.2.4",s6=String.fromCharCode(65535),s7=-1/0,s8="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",s9="String expected.",le=[],ln="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),lr="__dbnames",lo="readonly",la="readwrite";function li(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}let ls={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ll(e){return"string"!=typeof e||/\./.test(e)?e=>e:n=>(void 0===n[e]&&e in n&&delete(n=iN(n))[e],n)}class lc{_trans(e,n,t){let r=this._tx||s$.trans,o=this.name;function a(e,t,r){if(!r.schema[o])throw new i2.NotFound("Table "+o+" not part of transaction");return n(r.idbtrans,r)}let i=sO();try{return r&&r.db===this.db?r===s$.trans?r._promise(e,a,t):sU(()=>r._promise(e,a,t),{trans:r,transless:s$.transless||s$}):function e(n,t,r,o){if(n.idbdb&&(n._state.openComplete||s$.letThrough||n._vip)){var a=n._createTransaction(t,r,n._dbSchema);try{a.create(),n._state.PR1398_maxLoop=3}catch(a){return a.name===i1.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,r,o))):s5(a)}return a._promise(t,(e,n)=>sU(()=>(s$.trans=a,o(e,n,a)))).then(e=>a._completion.then(()=>e))}if(n._state.openComplete)return s5(new i2.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._options.autoOpen)return s5(new i2.DatabaseClosed);n.open().catch(i4)}return n._state.dbReadyPromise.then(()=>e(n,t,r,o))}(this.db,e,[this.name],a)}finally{i&&sN()}}get(e,n){return e&&e.constructor===Object?this.where(e).first(n):this._trans("readonly",n=>this.core.get({trans:n,key:e}).then(e=>this.hook.reading.fire(e))).then(n)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(ic(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let n=il(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);let t=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&n.every(n=>e.keyPath.indexOf(n)>=0)&&e.keyPath.every(e=>n.indexOf(e)>=0))[0];if(t&&this.db._maxKey!==s6)return this.where(t.name).equals(t.keyPath.map(n=>e[n]));!t&&iV&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);let{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function a(e,n){try{return 0===o.cmp(e,n)}catch(e){return!1}}let[i,s]=n.reduce(([n,t],o)=>{let i=r[o],s=e[o];return[n||i,n||!i?li(t,i&&i.multi?e=>{let n=iE(e,o);return ic(n)&&n.some(e=>a(s,e))}:e=>a(s,iE(e,o))):t]},[null,null]);return i?this.where(i.name).equals(e[i.keyPath]).filter(s):t?this.filter(s):this.where(n).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,ic(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let n=n=>{if(!n)return n;let t=Object.create(e.prototype);for(var r in n)if(ih(n,r))try{t[r]=n[r]}catch(e){}return t};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),e}defineClass(){return this.mapToClass(function(e){ip(this,e)})}add(e,n){let{auto:t,keyPath:r}=this.schema.primKey,o=e;return r&&t&&(o=ll(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=n?[n]:null,values:[o]})).then(e=>e.numFailures?sx.reject(e.failures[0]):e.lastResult).then(n=>{if(r)try{iS(e,r,n)}catch(e){}return n})}update(e,n){if("object"!=typeof e||ic(e))return this.where(":id").equals(e).modify(n);{let t=iE(e,this.schema.primKey.keyPath);if(void 0===t)return s5(new i2.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof n?il(n).forEach(t=>{iS(e,t,n[t])}):n(e,{value:e,primKey:t})}catch(e){}return this.where(":id").equals(t).modify(n)}}put(e,n){let{auto:t,keyPath:r}=this.schema.primKey,o=e;return r&&t&&(o=ll(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=n?[n]:null})).then(e=>e.numFailures?sx.reject(e.failures[0]):e.lastResult).then(n=>{if(r)try{iS(e,r,n)}catch(e){}return n})}delete(e){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[e]})).then(e=>e.numFailures?sx.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:ls})).then(e=>e.numFailures?sx.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",n=>this.core.getMany({keys:e,trans:n}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,n,t){let r=Array.isArray(n)?n:void 0,o=(t=t||(r?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:a}=this.schema.primKey;if(a&&r)throw new i2.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new i2.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=a&&t?e.map(ll(a)):e;return this.core.mutate({trans:n,type:"add",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:r})=>{if(0===e)return o?n:t;throw new i0(`${this.name}.bulkAdd(): ${e} of ${i} operations failed`,r)})})}bulkPut(e,n,t){let r=Array.isArray(n)?n:void 0,o=(t=t||(r?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:a}=this.schema.primKey;if(a&&r)throw new i2.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new i2.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=a&&t?e.map(ll(a)):e;return this.core.mutate({trans:n,type:"put",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:r})=>{if(0===e)return o?n:t;throw new i0(`${this.name}.bulkPut(): ${e} of ${i} operations failed`,r)})})}bulkDelete(e){let n=e.length;return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:e})).then(({numFailures:e,lastResult:t,failures:r})=>{if(0===e)return t;throw new i0(`${this.name}.bulkDelete(): ${e} of ${n} operations failed`,r)})}}function lp(e){var n={},t=function(t,r){if(r){for(var o=arguments.length,a=Array(o-1);--o;)a[o-1]=arguments[o];return n[t].subscribe.apply(null,a),e}if("string"==typeof t)return n[t]};t.addEventType=a;for(var r=1,o=arguments.length;r<o;++r)a(arguments[r]);return t;function a(e,r,o){if("object"!=typeof e){r||(r=st),o||(o=i4);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter(function(n){return n!==e}),i.fire=i.subscribers.reduce(r,o)}};return n[e]=t[e]=i,i}il(e).forEach(function(n){var t=e[n];if(ic(t))a(n,e[n][0],e[n][1]);else{if("asap"!==t)throw new i2.InvalidArgument("Invalid event config");var r=a(n,i6,function(){for(var e=arguments.length,n=Array(e);e--;)n[e]=arguments[e];r.subscribers.forEach(function(e){ix(function(){e.apply(null,n)})})})}})}}function lu(e,n){return ib(n).from({prototype:e}),n}function ld(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function lf(e,n){e.filter=li(e.filter,n)}function lh(e,n,t){var r=e.replayFilter;e.replayFilter=r?()=>li(r(),n()):n,e.justLimit=t&&!r}function lm(e,n){if(e.isPrimKey)return n.primaryKey;let t=n.getIndexByKeyPath(e.index);if(!t)throw new i2.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function lg(e,n,t){let r=lm(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function ly(e,n,t,r){let o=e.replayFilter?li(e.filter,e.replayFilter()):e.filter;if(e.or){let a={},i=(e,t,r)=>{if(!o||o(t,r,e=>t.stop(e),e=>t.fail(e))){var i=t.primaryKey,s=""+i;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(i)),ih(a,s)||(a[s]=!0,n(e,t,r))}};return Promise.all([e.or._iterate(i,t),lb(lg(e,r,t),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return lb(lg(e,r,t),li(e.algorithm,o),n,!e.keysOnly&&e.valueMapper)}function lb(e,n,t,r){var o=sj(r?(e,n,o)=>t(r(e),n,o):t);return e.then(e=>{if(e)return e.start(()=>{var t=()=>e.continue();n&&!n(e,e=>t=e,n=>{e.stop(n),t=i4},n=>{e.fail(n),t=i4})||o(e.value,e,e=>t=e),t()})})}function l_(e,n){try{let t=lv(e),r=lv(n);if(t!==r)return"Array"===t?1:"Array"===r?-1:"binary"===t?1:"binary"===r?-1:"string"===t?1:"string"===r?-1:"Date"===t?1:"Date"!==r?NaN:-1;switch(t){case"number":case"Date":case"string":return e>n?1:e<n?-1:0;case"binary":return function(e,n){let t=e.length,r=n.length,o=t<r?t:r;for(let t=0;t<o;++t)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return t===r?0:t<r?-1:1}(l$(e),l$(n));case"Array":return function(e,n){let t=e.length,r=n.length,o=t<r?t:r;for(let t=0;t<o;++t){let r=l_(e[t],n[t]);if(0!==r)return r}return t===r?0:t<r?-1:1}(e,n)}}catch(e){}return NaN}function lv(e){let n=typeof e;if("object"!==n)return n;if(ArrayBuffer.isView(e))return"binary";let t=iB(e);return"ArrayBuffer"===t?"binary":t}function l$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lA{_read(e,n){var t=this._ctx;return t.error?t.table._trans(null,s5.bind(null,t.error)):t.table._trans("readonly",e).then(n)}_write(e){var n=this._ctx;return n.error?n.table._trans(null,s5.bind(null,n.error)):n.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var n=this._ctx;n.algorithm=li(n.algorithm,e)}_iterate(e,n){return ly(this._ctx,e,n,this._ctx.table.core)}clone(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&ip(t,e),n._ctx=t,n}raw(){return this._ctx.valueMapper=null,this}each(e){var n=this._ctx;return this._read(t=>ly(n,e,t,n.table.core))}count(e){return this._read(e=>{let n=this._ctx,t=n.table.core;if(ld(n,!0))return t.count({trans:e,query:{index:lm(n,t.schema),range:n.range}}).then(e=>Math.min(e,n.limit));var r=0;return ly(n,()=>(++r,!1),e,t).then(()=>r)}).then(e)}sortBy(e,n){let t=e.split(".").reverse(),r=t[0],o=t.length-1;function a(e,n){return n?a(e[t[n]],n-1):e[r]}var i="next"===this._ctx.dir?1:-1;function s(e,n){var t=a(e,o),r=a(n,o);return t<r?-i:t>r?i:0}return this.toArray(function(e){return e.sort(s)}).then(n)}toArray(e){return this._read(e=>{var n=this._ctx;if("next"===n.dir&&ld(n,!0)&&n.limit>0){let{valueMapper:t}=n,r=lm(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:r,range:n.range}}).then(({result:e})=>t?e.map(t):e)}{let t=[];return ly(n,e=>t.push(e),e,n.table.core).then(()=>t)}},e)}offset(e){var n=this._ctx;return e<=0||(n.offset+=e,ld(n)?lh(n,()=>{var n=e;return(e,t)=>0===n||(1===n?--n:t(()=>{e.advance(n),n=0}),!1)}):lh(n,()=>{var n=e;return()=>--n<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lh(this._ctx,()=>{var n=e;return function(e,t,r){return--n<=0&&t(r),n>=0}},!0),this}until(e,n){return lf(this._ctx,function(t,r,o){return!e(t.value)||(r(o),n)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var n;return lf(this._ctx,function(n){return e(n.value)}),(n=this._ctx).isMatch=li(n.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(n,t){e(t.key,t)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(n,t){e(t.primaryKey,t)})}keys(e){var n=this._ctx;n.keysOnly=!n.isMatch;var t=[];return this.each(function(e,n){t.push(n.key)}).then(function(){return t}).then(e)}primaryKeys(e){var n=this._ctx;if("next"===n.dir&&ld(n,!0)&&n.limit>0)return this._read(e=>{var t=lm(n,n.table.core.schema);return n.table.core.query({trans:e,values:!1,limit:n.limit,query:{index:t,range:n.range}})}).then(({result:e})=>e).then(e);n.keysOnly=!n.isMatch;var t=[];return this.each(function(e,n){t.push(n.primaryKey)}).then(function(){return t}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,n=e.index&&e.table.schema.idxByName[e.index];if(!n||!n.multi)return this;var t={};return lf(this._ctx,function(e){var n=e.primaryKey.toString(),r=ih(t,n);return t[n]=!0,!r}),this}modify(e){var n=this._ctx;return this._write(t=>{var r;if("function"==typeof e)r=e;else{var o=il(e),a=o.length;r=function(n){for(var t=!1,r=0;r<a;++r){var i=o[r],s=e[i];iE(n,i)!==s&&(iS(n,i,s),t=!0)}return t}}let i=n.table.core,{outbound:s,extractKey:l}=i.schema.primaryKey,c=this.db._options.modifyChunkSize||200,p=[],u=0,d=[],f=(e,n)=>{let{failures:t,numFailures:r}=n;for(let n of(u+=e-r,il(t)))p.push(t[n])};return this.clone().primaryKeys().then(o=>{let a=p=>{let u=Math.min(c,o.length-p);return i.getMany({trans:t,keys:o.slice(p,p+u),cache:"immutable"}).then(d=>{let h=[],m=[],g=s?[]:null,y=[];for(let e=0;e<u;++e){let n=d[e],t={value:iN(n),primKey:o[p+e]};!1!==r.call(t,t.value,t)&&(null==t.value?y.push(o[p+e]):s||0===l_(l(n),l(t.value))?(m.push(t.value),s&&g.push(o[p+e])):(y.push(o[p+e]),h.push(t.value)))}let b=ld(n)&&n.limit===1/0&&("function"!=typeof e||e===lw)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&i.mutate({trans:t,type:"add",values:h}).then(e=>{for(let n in e.failures)y.splice(parseInt(n),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&i.mutate({trans:t,type:"put",keys:g,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(y.length>0||b&&e===lw)&&i.mutate({trans:t,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>o.length>p+u&&a(p+c))})};return a(0).then(()=>{if(p.length>0)throw new iQ("Error modifying one or more objects",p,u,d);return o.length})})})}delete(){var e=this._ctx,n=e.range;return ld(e)&&(e.isPrimKey&&!ln||3===n.type)?this._write(t=>{let{primaryKey:r}=e.table.core.schema;return e.table.core.count({trans:t,query:{index:r,range:n}}).then(r=>e.table.core.mutate({trans:t,type:"deleteRange",range:n}).then(({failures:e,lastResult:n,results:t,numFailures:o})=>{if(o)throw new iQ("Could not delete some values",Object.keys(e).map(n=>e[n]),r-o);return r-o}))}):this.modify(lw)}}let lw=(e,n)=>n.value=null;function lk(e,n){return e<n?-1:+(e!==n)}function lx(e,n){return e>n?-1:+(e!==n)}function lC(e,n,t){var r=e instanceof lM?new e.Collection(e):e;return r._ctx.error=t?new t(n):TypeError(n),r}function lE(e){return new e.Collection(e,()=>lz("")).limit(0)}function lS(e,n,t,r){var o,a,i,s,l,c,p,u=t.length;if(!t.every(e=>"string"==typeof e))return lC(e,s9);function d(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),a="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),i="next"===e?lk:lx;var n=t.map(function(e){return{lower:a(e),upper:o(e)}}).sort(function(e,n){return i(e.lower,n.lower)});s=n.map(function(e){return e.upper}),l=n.map(function(e){return e.lower}),c=e,p="next"===e?"":r}d("next");var f=new e.Collection(e,()=>lD(s[0],l[u-1]+r));f._ondirectionchange=function(e){d(e)};var h=0;return f._addAlgorithm(function(e,t,r){var o=e.key;if("string"!=typeof o)return!1;var d=a(o);if(n(d,l,h))return!0;for(var f=null,m=h;m<u;++m){var g=function(e,n,t,r,o,a){for(var i=Math.min(e.length,r.length),s=-1,l=0;l<i;++l){var c=n[l];if(c!==r[l])return 0>o(e[l],t[l])?e.substr(0,l)+t[l]+t.substr(l+1):0>o(e[l],r[l])?e.substr(0,l)+r[l]+t.substr(l+1):s>=0?e.substr(0,s)+n[s]+t.substr(s+1):null;0>o(e[l],c)&&(s=l)}return i<r.length&&"next"===a?e+t.substr(e.length):i<e.length&&"prev"===a?e.substr(0,t.length):s<0?null:e.substr(0,s)+r[s]+t.substr(s+1)}(o,d,s[m],l[m],i,c);null===g&&null===f?h=m+1:(null===f||i(f,g)>0)&&(f=g)}return t(null!==f?function(){e.continue(f+p)}:r),!1}),f}function lD(e,n,t,r){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:r}}function lz(e){return{type:1,lower:e,upper:e}}class lM{get Collection(){return this._ctx.table.db.Collection}between(e,n,t,r){t=!1!==t,r=!0===r;try{return this._cmp(e,n)>0||0===this._cmp(e,n)&&(t||r)&&(!t||!r)?lE(this):new this.Collection(this,()=>lD(e,n,!t,!r))}catch(e){return lC(this,s8)}}equals(e){return null==e?lC(this,s8):new this.Collection(this,()=>lz(e))}above(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(e,void 0,!0))}aboveOrEqual(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(e,void 0,!1))}below(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(void 0,e))}startsWith(e){return"string"!=typeof e?lC(this,s9):this.between(e,e+s6,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lS(this,(e,n)=>0===e.indexOf(n[0]),[e],s6)}equalsIgnoreCase(e){return lS(this,(e,n)=>e===n[0],[e],"")}anyOfIgnoreCase(){var e=iL.apply(iF,arguments);return 0===e.length?lE(this):lS(this,(e,n)=>-1!==n.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=iL.apply(iF,arguments);return 0===e.length?lE(this):lS(this,(e,n)=>n.some(n=>0===e.indexOf(n)),e,s6)}anyOf(){let e=iL.apply(iF,arguments),n=this._cmp;try{e.sort(n)}catch(e){return lC(this,s8)}if(0===e.length)return lE(this);let t=new this.Collection(this,()=>lD(e[0],e[e.length-1]));t._ondirectionchange=t=>{n="next"===t?this._ascending:this._descending,e.sort(n)};let r=0;return t._addAlgorithm((t,o,a)=>{let i=t.key;for(;n(i,e[r])>0;)if(++r===e.length)return o(a),!1;return 0===n(i,e[r])||(o(()=>{t.continue(e[r])}),!1)}),t}notEqual(e){return this.inAnyRange([[s7,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=iL.apply(iF,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lC(this,s8)}let n=e.reduce((e,n)=>e?e.concat([[e[e.length-1][1],n]]):[[s7,n]],null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,n){let t=this._cmp,r=this._ascending,o=this._descending,a=this._min,i=this._max;if(0===e.length)return lE(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=r(e[0],e[1])))return lC(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",i2.InvalidArgument);let s=!n||!1!==n.includeLowers,l=n&&!0===n.includeUppers,c,p=r;function u(e,n){return p(e[0],n[0])}try{(c=e.reduce(function(e,n){let r=0,o=e.length;for(;r<o;++r){let o=e[r];if(0>t(n[0],o[1])&&t(n[1],o[0])>0){o[0]=a(o[0],n[0]),o[1]=i(o[1],n[1]);break}}return r===o&&e.push(n),e},[])).sort(u)}catch(e){return lC(this,s8)}let d=0,f=l?e=>r(e,c[d][1])>0:e=>r(e,c[d][1])>=0,h=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0,m=f,g=new this.Collection(this,()=>lD(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(m=f,p=r):(m=h,p=o),c.sort(u)},g._addAlgorithm((e,n,t)=>{for(var o=e.key;m(o);)if(++d===c.length)return n(t),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||n(()=>{p===r?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=iL.apply(iF,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lE(this):this.inAnyRange(e.map(e=>[e,e+s6])):lC(this,"startsWithAnyOf() only works with strings")}}function lP(e){return sj(function(n){return lT(n),e(n.target.error),!1})}function lT(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let lO="storagemutated",lN="x-storagemutated-1",lI=lp(null,lO);class lB{_lock(){return ik(!s$.global),++this._reculock,1!==this._reculock||s$.global||(s$.lockOwnerFor=this),this}_unlock(){if(ik(!s$.global),0==--this._reculock)for(s$.global||(s$.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sQ(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&s$.lockOwnerFor!==this}create(e){if(!this.mode)return this;let n=this.db.idbdb,t=this.db._state.dbOpenError;if(ik(!this.idbtrans),!e&&!n)switch(t&&t.name){case"DatabaseClosedError":throw new i2.DatabaseClosed(t);case"MissingAPIError":throw new i2.MissingAPI(t.message,t);default:throw new i2.OpenFailed(t)}if(!this.active)throw new i2.TransactionInactive;return ik(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sj(n=>{lT(n),this._reject(e.error)}),e.onabort=sj(n=>{lT(n),this.active&&this._reject(new i2.Abort(e.error)),this.active=!1,this.on("abort").fire(n)}),e.oncomplete=sj(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&lI.storagemutated.fire(e.mutatedParts)}),this}_promise(e,n,t){if("readwrite"===e&&"readwrite"!==this.mode)return s5(new i2.ReadOnly("Transaction is readonly"));if(!this.active)return s5(new i2.TransactionInactive);if(this._locked())return new sx((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,n,t).then(r,o)},s$])});if(t)return sU(()=>{var e=new sx((e,t)=>{this._lock();let r=n(e,t,this);r&&r.then&&r.then(e,t)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new sx((e,t)=>{var r=n(e,t,this);r&&r.then&&r.then(e,t)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var n=this._root();let t=sx.resolve(e);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>t);else{n._waitingFor=t,n._waitingQueue=[];var r=n.idbtrans.objectStore(n.storeNames[0]);!function e(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=n._waitingFor;return new sx((e,r)=>{t.then(t=>n._waitingQueue.push(sj(e.bind(null,t))),e=>n._waitingQueue.push(sj(r.bind(null,e)))).finally(()=>{n._waitingFor===o&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new i2.Abort))}table(e){let n=this._memoizedTables||(this._memoizedTables={});if(ih(n,e))return n[e];let t=this.schema[e];if(!t)throw new i2.NotFound("Table "+e+" not part of transaction");let r=new this.db.Table(e,t,this);return r.core=this.db.core.table(e),n[e]=r,r}}function lj(e,n,t,r,o,a,i){return{name:e,keyPath:n,unique:t,multi:r,auto:o,compound:a,src:(t&&!i?"&":"")+(r?"*":"")+(o?"++":"")+lR(n)}}function lR(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function lF(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:iC(t,e=>[e.name,e])}}let lL=e=>{try{return e.only([[]]),lL=()=>[[]],[[]]}catch(e){return lL=()=>s6,s6}};function lW(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?n=>n[e]:n=>iE(n,e):n=>iE(n,e)}function lV(e){return[].slice.call(e)}let lG=0;function lU(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function lq({_novip:e},n){let t=n.db,r=function(e,n,{IDBKeyRange:t,indexedDB:r},o){var a;return{dbcore:(a=function(e,n,t){let r;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:t,upper:r,lowerOpen:o,upperOpen:a}=e;return void 0===t?void 0===r?null:n.upperBound(r,!!a):void 0===r?n.lowerBound(t,!!o):n.bound(t,r,!!o,!!a)}let{schema:a,hasGetAll:i}=(r=lV(e.objectStoreNames),{schema:{name:e.name,tables:r.map(e=>t.objectStore(e)).map(e=>{let{keyPath:n,autoIncrement:t}=e,r=ic(n),o=null==n,a={},i={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:n,autoIncrement:t,unique:!0,extractKey:lW(n)},indexes:lV(e.indexNames).map(n=>e.index(n)).map(e=>{let{name:n,unique:t,multiEntry:r,keyPath:o}=e,i={name:n,compound:ic(o),keyPath:o,unique:t,multiEntry:r,extractKey:lW(o)};return a[lU(o)]=i,i}),getIndexByKeyPath:e=>a[lU(e)]};return a[":id"]=i.primaryKey,null!=n&&(a[lU(n)]=i.primaryKey),i})},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=a.tables.map(e=>{let n;return{name:n=e.name,schema:e,mutate:function({trans:e,type:t,keys:r,values:a,range:i}){return new Promise((s,l)=>{let c;s=sj(s);let p=e.objectStore(n),u=null==p.keyPath,d="put"===t||"add"===t;if(!d&&"delete"!==t&&"deleteRange"!==t)throw Error("Invalid operation type: "+t);let{length:f}=r||a||{length:1};if(r&&a&&r.length!==a.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],g=0,y=e=>{++g,lT(e)};if("deleteRange"===t){if(4===i.type)return s({numFailures:g,failures:m,results:[],lastResult:void 0});3===i.type?h.push(c=p.clear()):h.push(c=p.delete(o(i)))}else{let[e,n]=d?u?[a,r]:[a,null]:[r,null];if(d)for(let r=0;r<f;++r)h.push(c=n&&void 0!==n[r]?p[t](e[r],n[r]):p[t](e[r])),c.onerror=y;else for(let n=0;n<f;++n)h.push(c=p[t](e[n])),c.onerror=y}let b=e=>{let n=e.target.result;h.forEach((e,n)=>null!=e.error&&(m[n]=e.error)),s({numFailures:g,failures:m,results:"delete"===t?r:h.map(e=>e.result),lastResult:n})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:t})=>new Promise((r,o)=>{r=sj(r);let a=e.objectStore(n),i=t.length,s=Array(i),l,c=0,p=0,u=e=>{let n=e.target;s[n._pos]=n.result,++p===c&&r(s)},d=lP(o);for(let e=0;e<i;++e)null!=t[e]&&((l=a.get(t[e]))._pos=e,l.onsuccess=u,l.onerror=d,++c);0===c&&r(s)}),get:({trans:e,key:t})=>new Promise((r,o)=>{r=sj(r);let a=e.objectStore(n).get(t);a.onsuccess=e=>r(e.target.result),a.onerror=lP(o)}),query:e=>new Promise((t,r)=>{t=sj(t);let{trans:a,values:s,limit:l,query:c}=e,p=l===1/0?void 0:l,{index:u,range:d}=c,f=a.objectStore(n),h=u.isPrimaryKey?f:f.index(u.name),m=o(d);if(0===l)return t({result:[]});if(i){let e=s?h.getAll(m,p):h.getAllKeys(m,p);e.onsuccess=e=>t({result:e.target.result}),e.onerror=lP(r)}else{let e=0,n=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];n.onsuccess=r=>{let a=n.result;return a?(o.push(s?a.value:a.primaryKey),++e===l?t({result:o}):void a.continue()):t({result:o})},n.onerror=lP(r)}}),openCursor:function({trans:e,values:t,query:r,reverse:a,unique:i}){return new Promise((s,l)=>{s=sj(s);let{index:c,range:p}=r,u=e.objectStore(n),d=c.isPrimaryKey?u:u.index(c.name),f=a?i?"prevunique":"prev":i?"nextunique":"next",h=!t&&"openKeyCursor"in d?d.openKeyCursor(o(p),f):d.openCursor(o(p),f);h.onerror=lP(l),h.onsuccess=sj(n=>{let t=h.result;if(!t)return void s(null);t.___id=++lG,t.done=!1;let r=t.continue.bind(t),o=t.continuePrimaryKey;o&&(o=o.bind(t));let a=t.advance.bind(t),i=()=>{throw Error("Cursor not stopped")};t.trans=e,t.stop=t.continue=t.continuePrimaryKey=t.advance=()=>{throw Error("Cursor not started")},t.fail=sj(l),t.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},t.start=e=>{let n=new Promise((e,n)=>{e=sj(e),h.onerror=lP(n),t.fail=n,t.stop=n=>{t.stop=t.continue=t.continuePrimaryKey=t.advance=i,e(n)}}),s=()=>{if(h.result)try{e()}catch(e){t.fail(e)}else t.done=!0,t.start=()=>{throw Error("Cursor behind last entry")},t.stop()};return h.onsuccess=sj(e=>{h.onsuccess=s,s()}),t.continue=r,t.continuePrimaryKey=o,t.advance=a,s(),n},s(t)},l)})},count({query:e,trans:t}){let{index:r,range:a}=e;return new Promise((e,i)=>{let s=t.objectStore(n),l=r.isPrimaryKey?s:s.index(r.name),c=o(a),p=c?l.count(c):l.count();p.onsuccess=sj(n=>e(n.target.result)),p.onerror=lP(i)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:lL(n),schema:a}}(n,t,o),e.dbcore.reduce((e,{create:n})=>({...e,...n(e)}),a))}}(e._middlewares,t,e._deps,n);e.core=r.dbcore,e.tables.forEach(n=>{let t=n.name;e.core.schema.tables.some(e=>e.name===t)&&(n.core=e.core.table(t),e[t]instanceof e.Table&&(e[t].core=n.core))})}function lH({_novip:e},n,t,r){t.forEach(t=>{let o=r[t];n.forEach(n=>{let r=iv(n,t);(!r||"value"in r&&void 0===r.value)&&(n===e.Transaction.prototype||n instanceof e.Transaction?iy(n,t,{get(){return this.table(t)},set(e){ig(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):n[t]=new e.Table(t,o))})})}function lK({_novip:e},n){n.forEach(n=>{for(let t in n)n[t]instanceof e.Table&&delete n[t]})}function lY(e,n){return e._cfg.version-n._cfg.version}function lZ(e,n){let t,r={del:[],add:[],change:[]};for(t in e)n[t]||r.del.push(t);for(t in n){let o=e[t],a=n[t];if(o){let e={name:t,def:a,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(a.primKey.keyPath||"")&&(o.primKey.auto===a.primKey.auto||ln)){let n,t=o.idxByName,i=a.idxByName;for(n in t)i[n]||e.del.push(n);for(n in i){let r=t[n],o=i[n];r?r.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}else e.recreate=!0,r.change.push(e)}else r.add.push([t,a])}return r}function lJ(e,n,t,r){let o=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return r.forEach(e=>lX(o,e)),o}function lX(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function lQ(e,n,t){let r={};return iA(n.objectStoreNames,0).forEach(e=>{let n=t.objectStore(e),o=n.keyPath,a=lj(lR(o),o||"",!1,!1,!!n.autoIncrement,o&&"string"!=typeof o,!0),i=[];for(let e=0;e<n.indexNames.length;++e){let t=n.index(n.indexNames[e]);o=t.keyPath;var s=lj(t.name,o,!!t.unique,!!t.multiEntry,!1,o&&"string"!=typeof o,!1);i.push(s)}r[e]=lF(e,a,i)}),r}function l0({_novip:e},n,t){let r=t.db.objectStoreNames;for(let o=0;o<r.length;++o){let a=r[o],i=t.objectStore(a);e._hasGetAll="getAll"in i;for(let e=0;e<i.indexNames.length;++e){let t=i.indexNames[e],r=i.index(t).keyPath,o="string"==typeof r?r:"["+iA(r).join("+")+"]";if(n[a]){let e=n[a].idxByName[o];e&&(e.name=t,delete n[a].idxByName[o],n[a].idxByName[t]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&is.WorkerGlobalScope&&is instanceof is.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class l1{_parseStoresSpec(e,n){il(e).forEach(t=>{if(null!==e[t]){var r=e[t].split(",").map((e,n)=>{let t=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(t)?t.match(/^\[(.*)\]$/)[1].split("+"):t;return lj(t,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),ic(r),0===n)}),o=r.shift();if(o.multi)throw new i2.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new i2.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new i2.Schema("Index must have a name and cannot be an empty string")}),n[t]=lF(t,o,r)}})}stores(e){let n=this.db;this._cfg.storesSource=this._cfg.storesSource?ip(this._cfg.storesSource,e):e;let t=n._versions,r={},o={};return t.forEach(e=>{ip(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)}),n._dbSchema=o,lK(n,[n._allTables,n,n.Transaction.prototype]),lH(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],il(o),o),n._storeNames=il(o),this}upgrade(e){return this._cfg.contentUpgrade=sr(this._cfg.contentUpgrade||i4,e),this}}function l2(e,n){let t=e._dbNamesDB;return t||(t=e._dbNamesDB=new cu(lr,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function l3(e){return e&&"function"==typeof e.databases}function l5(e){return sU(function(){return s$.letThrough=!0,e()})}function l4(e){var n=n=>e.next(n),t=o(n),r=o(n=>e.throw(n));function o(e){return n=>{var o=e(n),a=o.value;return o.done?a:a&&"function"==typeof a.then?a.then(t,r):ic(a)?Promise.all(a).then(t,r):t(a)}}return o(n)()}function l6(e,n,t){var r=arguments.length;if(r<2)throw new i2.InvalidArgument("Too few arguments");for(var o=Array(r-1);--r;)o[r-1]=arguments[r];return t=o.pop(),[e,iM(o),t]}function l7(e,n,t){let r=ic(e)?e.slice():[e];for(let e=0;e<t;++e)r.push(n);return r}let l8={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(n){let t=e.table(n),{schema:r}=t,o={},a=[];function i(e,n,t){let r=lU(e),s=o[r]=o[r]||[],l=null==e?0:"string"==typeof e?1:e.length,c=n>0,p={...t,isVirtual:c,keyTail:n,keyLength:l,extractKey:lW(e),unique:!c&&t.unique};return s.push(p),p.isPrimaryKey||a.push(p),l>1&&i(2===l?e[0]:e.slice(0,l-1),n+1,t),s.sort((e,n)=>e.keyTail-n.keyTail),p}let s=i(r.primaryKey.keyPath,0,r.primaryKey);for(let e of(o[":id"]=[s],r.indexes))i(e.keyPath,0,e);function l(n){var t,r;let o=n.query.index;return o.isVirtual?{...n,query:{index:o,range:(t=n.query.range,r=o.keyTail,{type:1===t.type?2:t.type,lower:l7(t.lower,t.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:l7(t.upper,t.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}:n}return{...t,schema:{...r,primaryKey:s,indexes:a,getIndexByKeyPath:function(e){let n=o[lU(e)];return n&&n[0]}},count:e=>t.count(l(e)),query:e=>t.query(l(e)),openCursor(n){let{keyTail:r,isVirtual:o,keyLength:a}=n.query.index;return o?t.openCursor(l(n)).then(t=>t&&Object.create(t,{continue:{value:function(o){null!=o?t.continue(l7(o,n.reverse?e.MAX_KEY:e.MIN_KEY,r)):n.unique?t.continue(t.key.slice(0,a).concat(n.reverse?e.MIN_KEY:e.MAX_KEY,r)):t.continue()}},continuePrimaryKey:{value(n,o){t.continuePrimaryKey(l7(n,e.MAX_KEY,r),o)}},primaryKey:{get:()=>t.primaryKey},key:{get(){let e=t.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:()=>t.value}})):t.openCursor(n)}}}}}};function l9(e,n,t,r){return t=t||{},r=r||"",il(e).forEach(o=>{if(ih(n,o)){var a=e[o],i=n[o];if("object"==typeof a&&"object"==typeof i&&a&&i){let e=iB(a);e!==iB(i)?t[r+o]=n[o]:"Object"===e?l9(a,i,t,r+o+"."):a!==i&&(t[r+o]=n[o])}else a!==i&&(t[r+o]=n[o])}else t[r+o]=void 0}),il(n).forEach(o=>{ih(e,o)||(t[r+o]=n[o])}),t}let ce={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(n){let t=e.table(n),{primaryKey:r}=t.schema;return{...t,mutate(e){let o=s$.trans,{deleting:a,creating:i,updating:s}=o.table(n).hook;switch(e.type){case"add":if(i.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(i.fire===i4&&s.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(a.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(a.fire===i4)break;return o._promise("readwrite",()=>(function e(n,o,a){return t.query({trans:n,values:!1,query:{index:r,range:o},limit:a}).then(({result:t})=>l({type:"delete",keys:t,trans:n}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):t.length<a?{failures:[],numFailures:0,lastResult:void 0}:e(n,{...o,lower:t[t.length-1],lowerOpen:!0},a)))})(e.trans,e.range,1e4),!0)}return t.mutate(e);function l(e){var n,o;let l=s$.trans,c=e.keys||("delete"===(n=e).type?n.keys:n.keys||n.values.map(r.extractKey));if(!c)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:c}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):t.getMany({trans:o.trans,keys:c,cache:"immutable"})).then(n=>{let o=c.map((t,o)=>{let c=n[o],p={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(p,t,c,l);else if("add"===e.type||void 0===c){let n=i.fire.call(p,t,e.values[o],l);null==t&&null!=n&&(t=n,e.keys[o]=t,r.outbound||iS(e.values[o],r.keyPath,t))}else{let n=l9(c,e.values[o]),r=s.fire.call(p,n,t,c,l);if(r){let n=e.values[o];Object.keys(r).forEach(e=>{ih(n,e)?n[e]=r[e]:iS(n,e,r[e])})}}return p});return t.mutate(e).then(({failures:t,results:r,numFailures:a,lastResult:i})=>{for(let a=0;a<c.length;++a){let i=r?r[a]:c[a],s=o[a];null==i?s.onerror&&s.onerror(t[a]):s.onsuccess&&s.onsuccess("put"===e.type&&n[a]?e.values[a]:i)}return{failures:t,results:r,numFailures:a,lastResult:i}}).catch(e=>(o.forEach(n=>n.onerror&&n.onerror(e)),Promise.reject(e)))})}}}}})};function cn(e,n,t){try{if(!n||n.keys.length<e.length)return null;let r=[];for(let o=0,a=0;o<n.keys.length&&a<e.length;++o)0===l_(n.keys[o],e[a])&&(r.push(t?iN(n.values[o]):n.values[o]),++a);return r.length===e.length?r:null}catch(e){return null}}let ct={stack:"dbcore",level:-1,create:e=>({table:n=>{let t=e.table(n);return{...t,getMany:e=>{if(!e.cache)return t.getMany(e);let n=cn(e.keys,e.trans._cache,"clone"===e.cache);return n?sx.resolve(n):t.getMany(e).then(n=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?iN(n):n},n))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),t.mutate(e))}}})};function cr(e){return!("from"in e)}let co=function(e,n){if(!this){let n=new co;return e&&"d"in e&&ip(n,e),n}ip(this,arguments.length?{d:1,from:e,to:arguments.length>1?n:e}:{d:0})};function ca(e,n,t){let r=l_(n,t);if(isNaN(r))return;if(r>0)throw RangeError();if(cr(e))return ip(e,{from:n,to:t,d:1});let o=e.l,a=e.r;if(0>l_(t,e.from))return o?ca(o,n,t):e.l={from:n,to:t,d:1,l:null,r:null},cl(e);if(l_(n,e.to)>0)return a?ca(a,n,t):e.r={from:n,to:t,d:1,l:null,r:null},cl(e);0>l_(n,e.from)&&(e.from=n,e.l=null,e.d=a?a.d+1:1),l_(t,e.to)>0&&(e.to=t,e.r=null,e.d=e.l?e.l.d+1:1);let i=!e.r;o&&!e.l&&ci(e,o),a&&i&&ci(e,a)}function ci(e,n){cr(n)||function e(n,{from:t,to:r,l:o,r:a}){ca(n,t,r),o&&e(n,o),a&&e(n,a)}(e,n)}function cs(e){let n=cr(e)?null:{s:0,n:e};return{next(e){let t=arguments.length>0;for(;n;)switch(n.s){case 0:if(n.s=1,t)for(;n.n.l&&0>l_(e,n.n.from);)n={up:n,n:n.n.l,s:1};else for(;n.n.l;)n={up:n,n:n.n.l,s:1};case 1:if(n.s=2,!t||0>=l_(e,n.n.to))return{value:n.n,done:!1};case 2:if(n.n.r){n.s=3,n={up:n,n:n.n.r,s:0};continue}case 3:n=n.up}return{done:!0}}}}function cl(e){var n,t;let r=((null==(n=e.r)?void 0:n.d)||0)-((null==(t=e.l)?void 0:t.d)||0),o=r>1?"r":r<-1?"l":"";if(o){let n="r"===o?"l":"r",t={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],t[o]=r[n],e[n]=t,t.d=cc(t)}e.d=cc(e)}function cc({r:e,l:n}){return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1}im(co.prototype,{add(e){return ci(this,e),this},addKey(e){return ca(this,e,e),this},addKeys(e){return e.forEach(e=>ca(this,e,e)),this},[ij](){return cs(this)}});let cp={stack:"dbcore",level:0,create:e=>{let n=e.schema.name,t=new co(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{let o=e.table(r),{schema:a}=o,{primaryKey:i}=a,{extractKey:s,outbound:l}=i,c={...o,mutate:e=>{let i=e.trans,s=i.mutatedParts||(i.mutatedParts={}),l=e=>{let t=`idb://${n}/${r}/${e}`;return s[t]||(s[t]=new co)},c=l(""),p=l(":dels"),{type:u}=e,[d,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(ic(d)){"delete"!==u&&(d=e.results),c.addKeys(d);let n=cn(d,h);n||"add"===u||p.addKeys(d),(n||f)&&a.indexes.forEach(function(e){let t=l(e.name||"");function r(n){return null!=n?e.extractKey(n):null}let o=n=>e.multiEntry&&ic(n)?n.forEach(e=>t.addKey(e)):t.addKey(n);(n||f).forEach((e,t)=>{let a=n&&r(n[t]),i=f&&r(f[t]);0!==l_(a,i)&&(null!=a&&o(a),null!=i&&o(i))})})}else if(d){let e={from:d.lower,to:d.upper};p.add(e),c.add(e)}else c.add(t),p.add(t),a.indexes.forEach(e=>l(e.name).add(t));return e})}},p=({query:{index:n,range:t}})=>{var r,o;return[n,new co(null!=(r=t.lower)?r:e.MIN_KEY,null!=(o=t.upper)?o:e.MAX_KEY)]},u={get:e=>[i,new co(e.key)],getMany:e=>[i,(new co).addKeys(e.keys)],count:p,query:p,openCursor:p};return il(u).forEach(e=>{c[e]=function(a){let{subscr:i}=s$;if(i){let c=e=>{let t=`idb://${n}/${r}/${e}`;return i[t]||(i[t]=new co)},p=c(""),d=c(":dels"),[f,h]=u[e](a);if(c(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let n="query"===e&&l&&a.values&&o.query({...a,values:!1});return o[e].apply(this,arguments).then(t=>{if("query"===e){if(l&&a.values)return n.then(({result:e})=>(p.addKeys(e),t));let e=a.values?t.result.map(s):t.result;a.values?p.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=a.values;return t&&Object.create(t,{key:{get:()=>(d.addKey(t.primaryKey),t.key)},primaryKey:{get(){let e=t.primaryKey;return d.addKey(e),e}},value:{get:()=>(e&&p.addKey(t.primaryKey),t.value)}})}return t})}d.add(t)}}return o[e].apply(this,arguments)}}),c}}}};class cu{constructor(e,n){var t;this._middlewares={},this.verno=0;const r=cu.dependencies;this._options=n={addons:cu.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:o}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:i4,dbReadyPromise:null,cancelOpen:i4,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new sx(e=>{a.dbReadyResolve=e}),a.openCanceller=new sx((e,n)=>{a.cancelOpen=n}),this._state=a,this.name=e,this.on=lp(this,"populate","blocked","versionchange","close",{ready:[sr,i4]}),this.on.ready.subscribe=iw(this.on.ready.subscribe,e=>(n,t)=>{cu.vip(()=>{let r=this._state;if(r.openComplete)r.dbOpenError||sx.resolve().then(n),t&&e(n);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(n),t&&e(n);else{e(n);let r=this;t||e(function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)})}})}),this.Collection=(t=this,lu(lA.prototype,function(e,n){this.db=t;let r=ls,o=null;if(n)try{r=n()}catch(e){o=e}let a=e._ctx,i=a.table,s=i.hook.reading.fire;this._ctx={table:i,index:a.index,isPrimKey:!a.index||i.schema.primKey.keyPath&&a.index===i.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:s!==i6?s:null}})),this.Table=function(e){return lu(lc.prototype,function(n,t,r){this.db=e,this._tx=r,this.name=n,this.schema=t,this.hook=e._allTables[n]?e._allTables[n].hook:lp(null,{creating:[i9,i4],reading:[i7,i6],updating:[sn,i4],deleting:[se,i4]})})}(this),this.Transaction=function(e){return lu(lB.prototype,function(n,t,r,o,a){this.db=e,this.mode=n,this.storeNames=t,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lp(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new sx((e,n)=>{this._resolve=e,this._reject=n}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var n=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):n&&this.idbtrans&&this.idbtrans.abort(),s5(e)})})}(this),this.Version=function(e){return lu(l1.prototype,function(n){this.db=e,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lu(lM.prototype,function(n,t,r){this.db=e,this._ctx={table:n,index:":id"===t?null:t,or:r};let o=e._deps.indexedDB;if(!o)throw new i2.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,n)=>o.cmp(n,e),this._max=(e,n)=>o.cmp(e,n)>0?e:n,this._min=(e,n)=>0>o.cmp(e,n)?e:n,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=lL(n.IDBKeyRange),this._createTransaction=(e,n,t,r)=>new this.Transaction(e,n,t,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),le.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(n=>n.on("versionchange").fire(e))},this.use(l8),this.use(ce),this.use(cp),this.use(ct),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new i2.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new i2.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let n=this._versions;var t=n.filter(n=>n._cfg.version===e)[0];return t||(t=new this.Version(e),n.push(t),n.sort(lY),t.stores({}),this._state.autoSchema=!1,t)}_whenReady(e){return this.idbdb&&(this._state.openComplete||s$.letThrough||this._vip)?e():new sx((e,n)=>{if(this._state.openComplete)return n(new i2.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void n(new i2.DatabaseClosed);this.open().catch(i4)}this._state.dbReadyPromise.then(e,n)}).then(e)}use({stack:e,create:n,level:t,name:r}){r&&this.unuse({stack:e,name:r});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:n,level:null==t?10:t,name:r}),o.sort((e,n)=>e.level-n.level),this}unuse({stack:e,name:n,create:t}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>t?e.create!==t:!!n&&e.name!==n)),this}open(){return function(e){var n;let t=e._state,{indexedDB:r}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?s5(t.dbOpenError):e);iV&&(t.openCanceller._stackHolder=iq()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;let o=t.openCanceller;function a(){if(t.openCanceller!==o)throw new i2.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,l=!1;return sx.race([o,("u"<typeof navigator?sx.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var t=function(){return indexedDB.databases().finally(e)};n=setInterval(t,100),t()}).finally(function(){return clearInterval(n)}):Promise.resolve()).then(()=>new sx((n,o)=>{if(a(),!r)throw new i2.MissingAPI;let i=e.name,c=t.autoSchema?r.open(i):r.open(i,Math.round(10*e.verno));if(!c)throw new i2.MissingAPI;c.onerror=lP(o),c.onblocked=sj(e._fireOnBlocked),c.onupgradeneeded=sj(n=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=lT,s.abort(),c.result.close();let e=r.deleteDatabase(i);e.onsuccess=e.onerror=sj(()=>{o(new i2.NoSuchDatabase(`Database ${i} doesnt exist`))})}else{let t,r,i,d;s.onerror=lP(o);var a,p,u=n.oldVersion>0x4000000000000000?0:n.oldVersion;l=u<1,e._novip.idbdb=c.result,a=u/10,p=s,t=e._dbSchema,(r=e._createTransaction("readwrite",e._storeNames,t)).create(p),r._completion.catch(o),i=r._reject.bind(r),d=s$.transless||s$,sU(()=>{s$.trans=r,s$.transless=d,0===a?(il(t).forEach(e=>{lJ(p,e,t[e].primKey,t[e].indexes)}),lq(e,p),sx.follow(()=>e.on.populate.fire(r)).catch(i)):(function({_novip:e},n,t,r){let o=[],a=e._versions,i=e._dbSchema=lQ(e,e.idbdb,r),s=!1;return a.filter(e=>e._cfg.version>=n).forEach(a=>{o.push(()=>{let o=i,l=a._cfg.dbschema;l0(e,o,r),l0(e,l,r),i=e._dbSchema=l;let c=lZ(o,l);c.add.forEach(e=>{lJ(r,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new i2.Upgrade("Not yet support for changing primary key");{let n=r.objectStore(e.name);e.add.forEach(e=>lX(n,e)),e.change.forEach(e=>{n.deleteIndex(e.name),lX(n,e)}),e.del.forEach(e=>n.deleteIndex(e))}});let p=a._cfg.contentUpgrade;if(p&&a._cfg.version>n){let n;lq(e,r),t._memoizedTables={},s=!0;let a=iD(l);c.del.forEach(e=>{a[e]=o[e]}),lK(e,[e.Transaction.prototype]),lH(e,[e.Transaction.prototype],il(a),a),t.schema=a;let i=iW(p);i&&sq();let u=sx.follow(()=>{if((n=p(t))&&i){var e=sH.bind(null,null);n.then(e,e)}});return n&&"function"==typeof n.then?sx.resolve(n):u.then(()=>n)}}),o.push(n=>{var r;s&&ln||(r=a._cfg.dbschema,[].slice.call(n.db.objectStoreNames).forEach(e=>null==r[e]&&n.db.deleteObjectStore(e))),lK(e,[e.Transaction.prototype]),lH(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),t.schema=e._dbSchema})}),(function e(){return o.length?sx.resolve(o.shift()(t.idbtrans)).then(e):sx.resolve()})().then(()=>{var e;il(e=i).forEach(n=>{r.db.objectStoreNames.contains(n)||lJ(r,n,e[n].primKey,e[n].indexes)})})})(e,a,r,p).catch(i)})}},o),c.onsuccess=sj(()=>{s=null;let r=e._novip.idbdb=c.result,o=iA(r.objectStoreNames);if(o.length>0)try{let n,a=r.transaction(1===o.length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},n,t){e.verno=n.version/10;let r=e._dbSchema=lQ(0,n,t);e._storeNames=iA(n.objectStoreNames,0),lH(e,[e._allTables],il(r),r)}(e,r,a):(l0(e,e._dbSchema,a),((n=lZ(lQ(0,e.idbdb,a),e._dbSchema)).add.length||n.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),lq(e,a)}catch(e){}le.push(e),r.onversionchange=sj(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),r.onclose=sj(n=>{e.on("close").fire(n)}),l&&function({indexedDB:e,IDBKeyRange:n},t){l3(e)||t===lr||l2(e,n).put({name:t}).catch(i4)}(e._deps,i),n()},o)}))]).then(()=>(a(),t.onReadyBeingFired=[],sx.resolve(l5(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(sr,i4);return t.onReadyBeingFired=[],sx.resolve(l5(()=>r(e.vip))).then(n)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(n=>{t.dbOpenError=n;try{s&&s.abort()}catch(e){}return o===t.openCanceller&&e._close(),s5(n)}).finally(()=>{t.openComplete=!0,i()})}(this)}_close(){let e=this._state,n=le.indexOf(this);if(n>=0&&le.splice(n,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sx(n=>{e.dbReadyResolve=n}),e.openCanceller=new sx((n,t)=>{e.cancelOpen=t})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new i2.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,n=this._state;return new sx((t,r)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=sj(()=>{!function({indexedDB:e,IDBKeyRange:n},t){l3(e)||t===lr||l2(e,n).delete(t).catch(i4)}(this._deps,this.name),t()}),e.onerror=lP(r),e.onblocked=this._fireOnBlocked};if(e)throw new i2.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return il(this._allTables).map(e=>this._allTables[e])}transaction(){let e=l6.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,n,t){let r,o,a=s$.trans;a&&a.db===this&&-1===e.indexOf("!")||(a=null);let i=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=n.map(e=>{var n=e instanceof this.Table?e.name:e;if("string"!=typeof n)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return n}),"r"==e||e===lo)r=lo;else{if("rw"!=e&&e!=la)throw new i2.InvalidArgument("Invalid transaction mode: "+e);r=la}if(a){if(a.mode===lo&&r===la){if(!i)throw new i2.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&o.forEach(e=>{if(a&&-1===a.storeNames.indexOf(e)){if(!i)throw new i2.SubTransaction("Table "+e+" not included in parent transaction.");a=null}}),i&&a&&!a.active&&(a=null)}}catch(e){return a?a._promise(null,(n,t)=>{t(e)}):s5(e)}let s=(function e(n,t,r,o,a){return sx.resolve().then(()=>{let i,s=s$.transless||s$,l=n._createTransaction(t,r,n._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),n._state.PR1398_maxLoop=3}catch(o){return o.name===i1.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,r,null,a))):s5(o)}let c=iW(a);c&&sq();let p=sx.follow(()=>{if(i=a.call(l,l))if(c){var e=sH.bind(null,null);i.then(e,e)}else"function"==typeof i.next&&"function"==typeof i.throw&&(i=l4(i))},{trans:l,transless:s});return(i&&"function"==typeof i.then?sx.resolve(i).then(e=>l.active?e:s5(new i2.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):p.then(()=>i)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),s5(e)))})}).bind(null,this,r,o,a,t);return a?a._promise(r,s,"lock"):s$.trans?sQ(s$.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!ih(this._allTables,e))throw new i2.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let cd="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class cf{constructor(e){this._subscribe=e}subscribe(e,n,t){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:n,complete:t})}[cd](){return this}}function ch(e,n){return il(n).forEach(t=>{ci(e[t]||(e[t]=new co),n[t])}),e}try{o={indexedDB:is.indexedDB||is.mozIndexedDB||is.webkitIndexedDB||is.msIndexedDB,IDBKeyRange:is.IDBKeyRange||is.webkitIDBKeyRange}}catch(e){o={indexedDB:null,IDBKeyRange:null}}function cm(e){let n=cg;try{cg=!0,lI.storagemutated.fire(e)}finally{cg=n}}im(cu,{...i5,delete:e=>new cu(e,{addons:[]}).delete(),exists:e=>new cu(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:n}){return l3(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==lr)):l2(e,n).toCollection().primaryKeys()})(cu.dependencies).then(e)}catch(e){return s5(new i2.MissingAPI)}},defineClass:()=>function(e){ip(this,e)},ignoreTransaction:e=>s$.trans?sQ(s$.transless,e):e(),vip:l5,async:function(e){return function(){try{var n=l4(e.apply(this,arguments));return n&&"function"==typeof n.then?n:sx.resolve(n)}catch(e){return s5(e)}}},spawn:function(e,n,t){try{var r=l4(e.apply(t,n||[]));return r&&"function"==typeof r.then?r:sx.resolve(r)}catch(e){return s5(e)}},currentTransaction:{get:()=>s$.trans||null},waitFor:function(e,n){let t=sx.resolve("function"==typeof e?cu.ignoreTransaction(e):e).timeout(n||6e4);return s$.trans?s$.trans.waitFor(t):t},Promise:sx,debug:{get:()=>iV,set:e=>{iV=e,iG="dexie"===e?()=>!0:lt}},derive:ib,extend:ip,props:im,override:iw,Events:lp,on:lI,liveQuery:function(e){let n,t=!1,r=new cf(r=>{let o=iW(e),a=!1,i={},s={},l={get closed(){return a},unsubscribe:()=>{a=!0,lI.storagemutated.unsubscribe(d)}};r.start&&r.start(l);let c=!1,p=!1;function u(){return il(s).some(e=>i[e]&&function(e,n){let t=cs(n),r=t.next();if(r.done)return!1;let o=r.value,a=cs(e),i=a.next(o.from),s=i.value;for(;!r.done&&!i.done;){if(0>=l_(s.from,o.to)&&l_(s.to,o.from)>=0)return!0;0>l_(o.from,s.from)?o=(r=t.next(s.from)).value:s=(i=a.next(o.from)).value}return!1}(i[e],s[e]))}let d=e=>{ch(i,e),u()&&f()},f=()=>{let h,m;if(c||a)return;i={};let g={},y=(o&&sq(),h=()=>sU(e,{subscr:g,trans:null}),m=s$.trans?sQ(s$.transless,h):h(),o&&m.then(sH,sH),m);p||(lI(lO,d),p=!0),c=!0,Promise.resolve(y).then(e=>{t=!0,n=e,c=!1,a||(u()?f():(i={},s=g,r.next&&r.next(e)))},e=>{c=!1,t=!1,r.error&&r.error(e),l.unsubscribe()})};return f(),l});return r.hasValue=()=>t,r.getValue=()=>n,r},extendObservabilitySet:ch,getByKeyPath:iE,setByKeyPath:iS,delByKeyPath:function(e,n){"string"==typeof n?iS(e,n,void 0):"length"in n&&[].map.call(n,function(n){iS(e,n,void 0)})},shallowClone:iD,deepClone:iN,getObjectDiff:l9,cmp:l_,asap:ix,minKey:s7,addons:[],connections:le,errnames:i1,dependencies:o,semVer:s4,version:s4.split(".").map(e=>parseInt(e)).reduce((e,n,t)=>e+n/Math.pow(10,2*t))}),cu.maxKey=lL(cu.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(lI(lO,e=>{if(!cg){let n;ln?(n=document.createEvent("CustomEvent")).initCustomEvent(lN,!0,!0,e):n=new CustomEvent(lN,{detail:e}),cg=!0,dispatchEvent(n),cg=!1}}),addEventListener(lN,({detail:e})=>{cg||cm(e)}));let cg=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(lN);"function"==typeof e.unref&&e.unref(),lI(lO,n=>{cg||e.postMessage(n)}),e.onmessage=e=>{e.data&&cm(e.data)}}else if("u">typeof self&&"u">typeof navigator){lI(lO,e=>{try{cg||("u">typeof localStorage&&localStorage.setItem(lN,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:lN,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===lN){let n=JSON.parse(e.newValue);n&&cm(n.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===lN&&cm(e.changedParts)})}function cy(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}sx.rejectionMapper=function(e,n){if(!e||e instanceof iJ||e instanceof TypeError||e instanceof SyntaxError||!e.name||!i3[e.name])return e;var t=new i3[e.name](n||e.message,e);return"stack"in e&&iy(t,"stack",{get:function(){return this.inner.stack}}),t},iG=lt;class cb extends cu{constructor(){super("EsmOffline"),cy(this,"syncQueue",void 0),cy(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function c_(){return new cb}let cv=new cb,c$={},cA=G("offline-synchronization",{});function cw(){return cA}async function ck(){if(cA.getState().synchronization)return;let e=await cv.syncQueue.count(),n={},t=Object.entries(c$),r=t.length,o={},a=new AbortController,i=()=>{let e=cA.getState().synchronization;cA.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{cA.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}});for(let e=0;e<r&&t.length>0;e++)for(let e=t.length;e--;){let[r,s]=t[e],l=s.dependsOn.map(e=>n[e]);l.every(Boolean)&&(o[r]={},await Promise.all(l),n[r]=cx(s,o,a,i),t.splice(e,1))}await Promise.allSettled(Object.values(n))}finally{cA.setState({synchronization:void 0})}}async function cx({type:e,dependsOn:n,process:t},r,o,a){let i=[],s=[],l=await cC();await cv.syncQueue.where({type:e,userId:l}).each((e,n)=>{i.push([n.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let c=0;c<i.length;c++){let[p,u,{id:d,dependencies:f=[]}]=i[c];try{let a=await t(u,{abort:o,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:t})=>n.includes(t)?r[t][e]:void 0)});void 0!==d&&(r[e][d]=a),await cv.syncQueue.delete(p)}catch(e){await cv.syncQueue.update(p,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{a()}}}async function cC(){let e=await oq();return e?.uuid||"*"}async function cE(e,n,t,r){let o=r&&r.id;return void 0!==o&&await cv.syncQueue.where({type:n,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(cu.errnames.DatabaseClosed),await cv.syncQueue.add({type:n,content:t,userId:e,descriptor:r||{},createdOn:new Date}).catch(cu.errnames.DatabaseClosed,()=>-1)}async function cS(e,n,t){let r=await cC();return await cE(r,e,n,t)}async function cD(e,n){return(await cz(e,n)).map(e=>e.content)}async function cz(e,n){return await cv.syncQueue.where(n?{type:n,userId:e}:{userId:e}).toArray().catch(cu.errnames.DatabaseClosed,()=>[])}async function cM(e){let n=await cC();return await cD(n,e)}async function cP(e){let n=await cC();return await cz(n,e)}async function cT(e){return await cv.syncQueue.get(e).catch(cu.errnames.DatabaseClosed,()=>void 0)}function cO(e){return!!c$[e]?.options.onBeginEditSyncItem}async function cN(e){let n=await cT(e);if(!n)throw Error(`No sync item with the ID ${e} exists.`);let t=c$[n.type]?.options.onBeginEditSyncItem;if(!t)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${n.type}" supports editing items.`);t(n)}async function cI(e){await cv.syncQueue.delete(e).catch(cu.errnames.DatabaseClosed)}function cB(e,n,t,r={}){c$[e]={type:e,dependsOn:n,process:t,options:r}}let cj="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cR=new Uint8Array(16),cF=[];for(let e=0;e<256;++e)cF.push((e+256).toString(16).slice(1));let cL=function(e,n,t){if(cj&&!n&&!e)return cj();let r=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(cR)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){t=t||0;for(let e=0;e<16;++e)n[t+e]=r[e];return n}return function(e,n=0){return cF[e[n+0]]+cF[e[n+1]]+cF[e[n+2]]+cF[e[n+3]]+"-"+cF[e[n+4]]+cF[e[n+5]]+"-"+cF[e[n+6]]+cF[e[n+7]]+"-"+cF[e[n+8]]+cF[e[n+9]]+"-"+cF[e[n+10]]+cF[e[n+11]]+cF[e[n+12]]+cF[e[n+13]]+cF[e[n+14]]+cF[e[n+15]]}(r)},cW="OFFLINE+";function cV(){return cW+cL()}function cG(e){return e.startsWith(cW)}let cU={};function cq(){return Object.values(cU)}function cH(e){cU[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),cU[e.id]=e}async function cK(e){let n=await c2();return await cY(n,e)}async function cY(e,n){let t=new cb;return await t.dynamicOfflineData.where(n?{type:n,users:e}:{users:e}).toArray().catch(cu.errnames.DatabaseClosed,()=>[])}async function cZ(e,n){let t=await c2();return await cJ(t,e,n)}async function cJ(e,n,t){let r=new cb,o=await r.dynamicOfflineData.get({type:n,identifier:t}).catch(cu.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(cu.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:n,identifier:t}).catch(cu.errnames.DatabaseClosed)}async function cX(e,n){let t=await c2();return await cQ(t,e,n)}async function cQ(e,n,t){let r=new cb,o=await r.dynamicOfflineData.get({type:n,identifier:t,users:e}).catch(cu.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(n=>n!==e)}).catch(cu.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(cu.errnames.DatabaseClosed))}async function c0(e,n){let t=await cK(e);await Promise.all(t.map(async e=>c1(e.type,e.identifier,n)))}async function c1(e,n,t){await cZ(e,n);let r=new cb,o=await c2(),a=await r.dynamicOfflineData.get({type:e,identifier:n}).catch(cu.errnames.DatabaseClosed,()=>void 0),i=cq().filter(n=>n.type===e);if(!a)return;let s=await Promise.all(i.map(async e=>{try{return e.sync(n,t),{id:e.id,error:void 0}}catch(t){let n=t.message?.toString()??t.toString();return{id:e.id,error:n}}})),l=s.filter(e=>!e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>e.id),p=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),u={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:c,errors:p};a.id&&await r.dynamicOfflineData.update(a.id,{syncState:u}).catch(cu.errnames.DatabaseClosed)}async function c2(){let e=(await oq()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let c3=G("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function c5(){return c7(),c3}function c4(e,n){c7(),cH({type:"patient",displayName:n.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,t)=>n.onOfflinePatientAdded({patientUuid:e,signal:t??new AbortController().signal})})}async function c6(e){c7(),await c1("patient",e)}function c7(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function c8(e,n,t=!0){if(e){let r=null,[o,a]=await Promise.all([oN(`${oP}/Patient/${e}`,n).catch(e=>r=e),t?c9(e):Promise.resolve(null)]);if(o.ok)return o.data;if(a)return a;if(r)throw r}return null}async function c9(e){let n=(await cM("patient-registration")).find(n=>n.fhirPatient.id===e);return n?.fhirPatient??null}function pe(e,n){let t=new CustomEvent(`openmrs:${e}`,{detail:n??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(t)}function pn(e,n){let t=e=>{n("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,t),()=>{window.removeEventListener(`openmrs:${e}`,t)}}var pt=t(9549);function pr(e){return{uuid:e.uuid,display:e.display}}function po(e=null,n=null){let t=new URLSearchParams;e&&t.set("tag",e),n&&t.set("q",n);let r=t.toString();return oI(`${oM}/location${r?"?"+r:""}`).pipe((0,pt.map)(e=>e.data.results.map(pr))).pipe((0,pt.take)(1))}function pa(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pi(){return oI(`${oM}/visittype`).pipe((0,pt.map)(e=>e.data.results.map(pa))).pipe((0,pt.take)(1))}var ps=((er={}).NEWVISIT="startVisit",er.EDITVISIT="editVisit",er.LOADING="loadingVisit",er),pl=((eo={}).NOTSTARTED="notStarted",eo.ONGOING="ongoing",eo);let pc="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",pp=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function pu(){return q("visit",pp)}function pd(e,n){pu().setState({patientUuid:e,manuallySetVisitUuid:n})}function pf(e,n){return oN(`${oM}/visit`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function ph(e,n,t){return oN(`${oM}/visit/${e}`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:n})}function pm(e,n,t){return oN(`${oM}/visit?patient=${e}&v=${t??pc}`,{signal:n.signal,method:"GET",headers:{"Content-type":"application/json"}})}pu().subscribe(e=>{var n;n=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(n))});let pg=new es.BehaviorSubject(null);class py{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+py.version}static addUnaryOp(e){return py.max_unop_len=Math.max(e.length,py.max_unop_len),py.unary_ops[e]=1,py}static addBinaryOp(e,n,t){return py.max_binop_len=Math.max(e.length,py.max_binop_len),py.binary_ops[e]=n,t?py.right_associative.add(e):py.right_associative.delete(e),py}static addIdentifierChar(e){return py.additional_identifier_chars.add(e),py}static addLiteral(e,n){return py.literals[e]=n,py}static removeUnaryOp(e){return delete py.unary_ops[e],e.length===py.max_unop_len&&(py.max_unop_len=py.getMaxKeyLen(py.unary_ops)),py}static removeAllUnaryOps(){return py.unary_ops={},py.max_unop_len=0,py}static removeIdentifierChar(e){return py.additional_identifier_chars.delete(e),py}static removeBinaryOp(e){return delete py.binary_ops[e],e.length===py.max_binop_len&&(py.max_binop_len=py.getMaxKeyLen(py.binary_ops)),py.right_associative.delete(e),py}static removeAllBinaryOps(){return py.binary_ops={},py.max_binop_len=0,py}static removeLiteral(e){return delete py.literals[e],py}static removeAllLiterals(){return py.literals={},py}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new py(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return py.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!py.binary_ops[String.fromCharCode(e)]||py.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return py.isIdentifierStart(e)||py.isDecimalDigit(e)}throwError(e){let n=Error(e+" at character "+this.index);throw n.index=this.index,n.description=e,n}runHook(e,n){if(py.hooks[e]){let t={context:this,node:n};return py.hooks.run(e,t),t.node}return n}searchHook(e){if(py.hooks[e]){let n={context:this};return py.hooks[e].find(function(e){return e.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let e=this.code;for(;e===py.SPACE_CODE||e===py.TAB_CODE||e===py.LF_CODE||e===py.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),n=1===e.length?e[0]:{type:py.COMPOUND,body:e};return this.runHook("after-all",n)}gobbleExpressions(e){let n=[],t,r;for(;this.index<this.expr.length;)if((t=this.code)===py.SEMCOL_CODE||t===py.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())n.push(r);else if(this.index<this.expr.length){if(t===e)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,py.max_binop_len),n=e.length;for(;n>0;){if(py.binary_ops.hasOwnProperty(e)&&(!py.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!py.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=n,e;e=e.substr(0,--n)}return!1}gobbleBinaryExpression(){let e,n,t,r,o,a,i,s,l;if(!(a=this.gobbleToken())||!(n=this.gobbleBinaryOp()))return a;for(o={value:n,prec:py.binaryPrecedence(n),right_a:py.right_associative.has(n)},(i=this.gobbleToken())||this.throwError("Expected expression after "+n),r=[a,o,i];n=this.gobbleBinaryOp();){if(0===(t=py.binaryPrecedence(n))){this.index-=n.length;break}o={value:n,prec:t,right_a:py.right_associative.has(n)},l=n;let s=e=>o.right_a&&e.right_a?t>e.prec:t<=e.prec;for(;r.length>2&&s(r[r.length-2]);)i=r.pop(),n=r.pop().value,a=r.pop(),e={type:py.BINARY_EXP,operator:n,left:a,right:i},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(o,e)}for(s=r.length-1,e=r[s];s>1;)e={type:py.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,n,t,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,py.isDecimalDigit(e)||e===py.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===py.SQUOTE_CODE||e===py.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===py.OBRACK_CODE)r=this.gobbleArray();else{for(t=(n=this.expr.substr(this.index,py.max_unop_len)).length;t>0;){if(py.unary_ops.hasOwnProperty(n)&&(!py.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!py.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=t;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:py.UNARY_EXP,operator:n,argument:e,prefix:!0})}n=n.substr(0,--t)}py.isIdentifierStart(e)?(r=this.gobbleIdentifier(),py.literals.hasOwnProperty(r.name)?r={type:py.LITERAL,value:py.literals[r.name],raw:r.name}:r.name===py.this_str&&(r={type:py.THIS_EXP})):e===py.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let n=this.code;for(;n===py.PERIOD_CODE||n===py.OBRACK_CODE||n===py.OPAREN_CODE||n===py.QUMARK_CODE;){let t;if(n===py.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==py.PERIOD_CODE)break;t=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===py.OBRACK_CODE?((e={type:py.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==py.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===py.OPAREN_CODE?e={type:py.CALL_EXP,arguments:this.gobbleArguments(py.CPAREN_CODE),callee:e}:(n===py.PERIOD_CODE||t)&&(t&&this.index--,this.gobbleSpaces(),e={type:py.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),t&&(e.optional=!0),this.gobbleSpaces(),n=this.code}return e}gobbleNumericLiteral(){let e="",n,t;for(;py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===py.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(n=this.char)||"E"===n){for(e+=this.expr.charAt(this.index++),("+"===(n=this.char)||"-"===n)&&(e+=this.expr.charAt(this.index++));py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);py.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return t=this.code,py.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(t===py.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===py.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:py.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",n=this.index,t=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let n=this.expr.charAt(this.index++);if(n===t){r=!0;break}if("\\"===n)switch(n=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=n}else e+=n}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:py.LITERAL,value:e,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let e=this.code,n=this.index;for(py.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,py.isIdentifierPart(e))this.index++;else break;return{type:py.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(e){let n=[],t=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){t=!0,this.index++,e===py.CPAREN_CODE&&r&&r>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===py.COMMA_CODE){if(this.index++,++r!==n.length){if(e===py.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===py.CBRACK_CODE)for(let e=n.length;e<r;e++)n.push(null)}}else if(n.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==py.COMPOUND||this.throwError("Expected comma"),n.push(e)}}return t||this.throwError("Expected "+String.fromCharCode(e)),n}gobbleGroup(){this.index++;let e=this.gobbleExpressions(py.CPAREN_CODE);if(this.code===py.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:py.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:py.ARRAY_EXP,elements:this.gobbleArguments(py.CBRACK_CODE)}}}Object.assign(py,{hooks:new class{add(e,n,t){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],n&&this[e][t?"unshift":"push"](n)},this)}run(e,n){this[e]=this[e]||[],this[e].forEach(function(e){e.call(n&&n.context?n.context:n,n)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(py),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),py.max_unop_len=py.getMaxKeyLen(py.unary_ops),py.max_binop_len=py.getMaxKeyLen(py.binary_ops);let pb=e=>new py(e).parse(),p_=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(py).filter(e=>!p_.includes(e)&&void 0===pb[e]).forEach(e=>{pb[e]=py[e]}),pb.Jsep=py,pb.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let t=n.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",test:t,consequent:r,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let r=t;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;n.node.test=r.right,r.right=n.node,n.node=t}}else this.throwError("Expected :")}})}});let pv="ArrowFunctionExpression",p$={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},pA={...p$,Promise};function pw(e,n={}){return pD(e,n,pP)}async function pk(e,n={}){return pz(e,n,pP)}function px(e,n={}){return pD(e,n,pT)}function pC(e,n={}){return pz(e,n,pT)}function pE(e,n={}){return pD(e,n,pO)}function pS(e,n={}){return pz(e,n,pO)}function pD(e,n={},t){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==n&&(n={});let r=pB(n,p$),o=pN("string"==typeof e?pb(e):e,r);if(t(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function pz(e,n={},t){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==n&&(n={});let r=pB(n,pA);return Promise.resolve(pN("string"==typeof e?pb(e):e,r)).then(n=>{if(t(n))return n;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function pM(e){return pb(e)}function pP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function pT(e){return"boolean"==typeof e}function pO(e){return"number"==typeof e}function pN(e,n){switch(e.type){case"UnaryExpression":var t,r,o,a,i,s,l,c,p,u,d,f,h=e,m=n;let g=pN(h.argument,m);switch(h.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var y=e,b=n;let v=pN(y.left,b),$=pN(y.right,b);switch(y.operator){case"+":return v+$;case"-":return v-$;case"*":return v*$;case"/":return v/$;case"%":return v%$;case"**":return v**$;case"==":return v==$;case"===":return v===$;case"!=":return v!=$;case"!==":return v!==$;case">":return v>$;case">=":return v>=$;case"<":return v<$;case"<=":return v<=$;case"in":return v in $;case"&&":return v&&$;case"||":return v||$;case"??":return v??$;default:throw`Expression evaluator does not support operator '${y.operator}' operator`}case"ConditionalExpression":return t=e,r=n,pN(t.test,r)?pN(t.consequent,r):pN(t.alternate,r);case"CallExpression":var A=e,w=n;let k=A.arguments?.map(pj(w)),x=pN(A.callee,w);if(x){if("function"!=typeof x)throw`${pF(A.callee)} is not a function`}else throw`No function named ${pF(A.callee)} is defined in this context`;return x(...k);case"ArrowFunctionExpression":let C;return o=e,a=n,C=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<C.length)throw`Required argument(s) ${C.slice(e.length,-1).join(", ")} were not provided`;let n=Object.fromEntries(C.reduce((n,t,r)=>{let o=e[r];return function e(n){if("string"==typeof n||"number"==typeof n||"boolean"==typeof n||"function"==typeof n||null===n||n instanceof RegExp)return!0;if("object"==typeof n){for(let t of Object.keys(n))if(!e(n[t]))return!1;return!0}if(Array.isArray(n)){for(let t of n)if(!e(t))break}return!1}(o)&&n.push([t,o]),n},[]));return pN(o.body,a.addVariables(n))}).bind(a.thisObj??null);case"MemberExpression":return function(e,n){let t,r=pN(e.object,n);if(void 0===r)switch(e.object.type){case"Identifier":{let t=pI(e.object,n);throw ReferenceError(`ReferenceError: ${t} is not defined`)}case"MemberExpression":{let t=pI(e.property,n);throw TypeError(`TypeError: cannot read properties of undefined (reading '${t}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let o=r;if("string"==typeof r)o=String.prototype;else if("number"==typeof r)o=Number.prototype;else if("function"==typeof r);else if("object"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;switch(n.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":t=pN(e.property,n);break;default:{let o=pN(e.property,n);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};pR(o),t=r[o]}}return"function"==typeof t?t.bind(r):t}(e,n);case"ArrayExpression":return i=e,s=n,i.elements?.map(pj(s));case"SequenceExpression":let E;return l=e,c=n,(E=l.expressions.map(pj(c)))[E.length-1];case"NewExpression":var S=e,D=n;if(S.callee&&"Identifier"===S.callee.type){let e=S.arguments?.map(pj(D));switch(S.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${S.callee.name}`}}if(S.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return pR((p=e).value),p.value;case"Identifier":var z=e,M=n;pR(z.name);let P=M.thisObj;if(P&&("object"==typeof P||"function"==typeof P)&&z.name in P){let e=P[z.name];return pR(e),e}if(M.variables&&z.name in M.variables){let e=M.variables[z.name];return pR(e),e}return z.name in M.globals?M.globals[z.name]:void 0;case"TemplateLiteral":let T,O;return u=e,d=n,T=u.expressions?.map(pj(d))??[],(O=u.quasis?.map(pj(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+T.join("")+O.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function pI(e,n){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return pI(e.property,n);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function pB(e,n){let t={thisObj:void 0,variables:{...e},globals:{...n},addVariables(e){return this.variables={...this.variables,...e},this}};return t.addVariables.bind(t),t}function pj(e){return function(n){return null===n?null:pN(n,e)}}function pR(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function pF(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function pL(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let n={globals:{...pA},isLocalExpression:!1,variables:new Set};return pW("string"==typeof e?pb(e):e,n),[...n.variables]}function pW(e,n){switch(e.type){case"UnaryExpression":return r=e,o=n,pW(r.argument,o);case"BinaryExpression":return a=e,i=n,[pW(a.left,i),pW(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=n,[pW(s.consequent,l),pW(s.test,l),pW(s.alternate,l)].filter(Boolean);case"CallExpression":let t;return c=e,p=n,t=pW(c.callee,p),c.arguments?.map(pV(p)),t;case"ArrowFunctionExpression":var r,o,a,i,s,l,c,p,u,d,f,h,m,g,y,b,v,$,A=e,w=n;let k={...w};k.isLocalExpression=!0;let x=A.params?.map(pV(k))??[],C=pW(A.body,k)??[];if(C&&Array.isArray(C))for(let e of C)x.includes(e)||w.variables.add(e);return;case"MemberExpression":let E;return u=e,d=n,pW(u.object,d),void((E={...d}).isLocalExpression=!0,pW(u.property,E));case"ArrayExpression":return f=e,h=n,void f.elements?.map(pV(h));case"SequenceExpression":return m=e,g=n,void m.expressions?.map(pV(g));case"NewExpression":return y=e,b=n,void y.arguments?.map(pV(b));case"Literal":case"TemplateElement":return;case"Identifier":var S=e,D=n;if(!(S.name in D.globals))if(D.isLocalExpression)return S.name;else D.variables.add(S.name);return;case"TemplateLiteral":return v=e,$=n,void(v.expressions?.map(pV($)),v.quasis?.map(pV($)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function pV(e){return function(n){return null===n?null:pW(n,e)}}pb.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(n){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let t=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let t=this.gobbleBinaryExpression();t||this.throwError("Expected expression after "+e),n.node={type:pv,params:null,body:t};return}}this.index=t}}),e.hooks.add("after-expression",function(n){!function n(t){t&&(Object.values(t).forEach(e=>{e&&"object"==typeof e&&n(e)}),"=>"===t.operator&&(t.type=pv,t.params=t.left?[t.left]:null,t.body=t.right,t.params&&t.params[0].type===e.SEQUENCE_EXP&&(t.params=t.params[0].expressions),delete t.left,delete t.right,delete t.operator))}(n.node)})}}),pb.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(n){let t=n.node;if(t&&"new"===t.operator){t.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(t.argument.type)||this.throwError("Expected new function()"),n.node=t.argument;let r=n.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),pb.plugins.register({name:"numbers",init(e){function n(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function t(n){let t=this.index,r="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(r+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(r+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(i===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:r},null,2)}`),this.index=t;return}n.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(t,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),c=n.call(this,l);if(!c)return;let p="";for(;o=this.code,a=c,95===o||a.some(([e,n])=>o>=e&&o<=n);)95===this.code?this.index++:p+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,t.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(p,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&t.call(this,r)})}}),pb.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(n){if(47===this.code){let t=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,o=this.expr.slice(t,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{r=new RegExp(o,a)}catch(e){this.throwError(e.message)}return n.node={type:e.LITERAL,value:r,raw:this.expr.slice(t-1,this.index)},n.node=this.gobbleTokenProperty(n.node),n.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),pb.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let t=n.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",test:t,consequent:r,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let r=t;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;n.node.test=r.right,r.right=n.node,n.node=t}}else this.throwError("Expected :")}})}}),pb.plugins.register({name:"jsepTemplateLiteral",init(e){function n(e,t=!0){if(96===this.code){let n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",o="",a=!1,i=this.expr.length,s=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",r="",n.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=i}else r+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",n),e.hooks.add("after-token",function(t){if((t.node.type===e.IDENTIFIER||t.node.type===e.MEMBER_EXP)&&96===this.code)return t.node={type:"TaggedTemplateExpression",tag:t.node,quasi:n.bind(this)(t,!1)},t.node=this.gobbleTokenProperty(t.node),t.node})}}),pb.addBinaryOp("in",7),pb.addBinaryOp("??",1);let pG=q("feature-flags",{flags:function(){let e={};for(let n of Object.keys(localStorage))if(n.startsWith("openmrs:feature-flag:")){let t=n.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${t}`)||"{}");e[t]={enabled:"true"===localStorage.getItem(n),...r}}return e}()});function pU(e,n,t){pG.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:n,description:t}}}))}function pq(){let e=pG.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(n=>{let t=n.replace("openmrs:feature-flag:","");e[t]||(localStorage.removeItem(n),localStorage.removeItem(`openmrs:feature-flag-meta:${t}`))})}function pH(e){return pG.getState().flags[e].enabled}function pK(e,n){pG.subscribe(t=>{n(t.flags[e].enabled)})}function pY(e,n){pG.setState(t=>({flags:{...t.flags,[e]:{...t.flags[e],enabled:n}}}))}function pZ(e){return!window.offlineEnabled||(e??navigator.onLine)}pG.subscribe(e=>{for(let[n,t]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${n}`,t.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${n}`,JSON.stringify({label:t.label,description:t.description}))});var pJ=e9(function(e,n,t){e0(e,n,t)});function pX(e=!0,n=!1){return pQ(pZ(),e,n)}function pQ(e,n=!0,t=!1){return!!(e?n:t)}let p0=G("extensionsInternal",{slots:{},extensions:{}}),p1=()=>q("extensionsInternal",{slots:{},extensions:{}});function p2(e){let n=p0.getState(),t=e(n);t!==n&&p0.setState(t)}let p3=()=>q("extensions",{slots:{}});function p5(e){let n=[];for(let t of Object.values(e.extensions))for(let e of t.instances)n.push({slotModuleName:e.slotModuleName,extensionModuleName:t.moduleName,slotName:e.slotName,extensionId:e.id});(0,nn.A)(ta.getState().mountedExtensions,n)||ta.setState({mountedExtensions:n})}p5(p0.getState()),p0.subscribe(p5);let p4=p1(),p6=p3(),p7=ts(),p8=tp();function p9(e,n,t,r,o){let a={},i=pZ(),s=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,l]of Object.entries(e.slots)){let{config:c}=tc(n,l.name),p=up(r,e,c,t,s,i,o.session);a[r]={moduleName:l.moduleName,assignedExtensions:p}}(0,nn.A)(p6.getState().slots,a)||p6.setState({slots:a})}function ue(){p9(p4.getState(),p7.getState(),p8.getState(),pG.getState(),oj.getState())}function un(e,n,t){return{moduleName:n,name:e,attachedIds:[],config:null,state:t}}function ut(e){let[n]=e.split("#");return n}function ur(e,n){let t=ut(n);return e.extensions[t]}function uo(e){return ur(p4.getState(),e)}p4.subscribe(e=>{p9(e,p7.getState(),p8.getState(),pG.getState(),oj.getState())}),p7.subscribe(e=>{p9(p4.getState(),e,p8.getState(),pG.getState(),oj.getState())}),p8.subscribe(e=>{p9(p4.getState(),p7.getState(),e,pG.getState(),oj.getState())}),pG.subscribe(e=>{p9(p4.getState(),p7.getState(),p8.getState(),e,oj.getState())}),oj.subscribe(e=>{p9(p4.getState(),p7.getState(),p8.getState(),pG.getState(),e)}),ue(),g(ue);let ua=e=>p4.setState(n=>(n.extensions[e.name]={...e,instances:[]},n));function ui(e,n){p2(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[...r.attachedIds,n]}}}:{...t,slots:{...t.slots,[e]:{...un(e),attachedIds:[n]}}}})}function us(e,n){p2(t=>{let r=t.slots[e];return r&&r.attachedIds.includes(n)?{...t,slots:{...t.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==n)}}}:t})}function ul(e){p2(n=>{let t=n.slots[e];return t?{...n,slots:{...n.slots,[e]:{...t,attachedIds:[]}}}:n})}function uc(e,n,t,r){let o=n.indexOf(e);if(-1!==o)return o;{if(void 0!==t)return 1e3+t;let n=r.indexOf(e);return -1!==n?2e3+n:-1}}function up(e,n,t,r,o,a,i){let s=function(e,n){let t=e.add||[],r=e.remove||[],o=e.order||[],{extensions:a}=p4.getState();return[...n,...t].filter(e=>!r.includes(e)).sort((e,t)=>{let r=uc(e,o,a[ut(e)]?.order,n),i=uc(t,o,a[ut(t)]?.order,n);return -1===i?-1:-1===r?1:r-i})}(t,n.slots[e].attachedIds),l=[],c=n.slots[e]?.state,p=c&&"object"==typeof c?{session:i,...c}:{session:i};for(let c of s){let{config:s}=td(r,e,c),u=pJ(s,tf(t,e,c)),d=ut(c),f=n.extensions[d];if(f){let n=u?.["Display conditions"]?.privileges??f.privileges??[];if(n&&("string"==typeof n||Array.isArray(n)&&n.length>0)&&(!i?.user||!oU(n,i.user)))continue;let t=u?.["Display conditions"]?.expression||f.displayExpression;if(void 0!==t&&"string"==typeof t&&t.trim().length>0)try{if(!px(t,p))continue}catch(n){console.error(`Error while evaluating expression '${t}' for extension ${d} in slot ${e}`,n);continue}if(f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!pQ(a,f.online,f.offline))continue;l.push({id:c,name:d,moduleName:f.moduleName,config:u,featureFlag:f.featureFlag,meta:f.meta,online:u?.["Display conditions"]?.online??f.online??!0,offline:u?.["Display conditions"]?.offline??f.offline??!1})}}return l}function uu(e){let n=p4.getState(),{config:t}=tl(e),r=p8.getState(),o=pG.getState(),a=oj.getState(),i=pZ();return up(e,n,t,r,Object.entries(o.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),i,a.session)}let ud=(e,n,t)=>p4.setState(r=>{let o=r.slots[n]?.moduleName;if(o&&o!=e)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${o}.`),r;if(o&&o==e)return r;if(r.slots[n])return{...r,slots:{...r.slots,[n]:{...r.slots[n],moduleName:e,state:t}}};let a=un(n,e,t);return{...r,slots:{...r.slots,[n]:{...a}}}});function uf(e,n,t=!1){p4.setState(r=>{let o=t?pJ(r.slots[e].state,n):n;return{...r,slots:{...r.slots,[e]:{...r.slots[e],state:o}}}})}let uh=()=>p6.setState(()=>({slots:{},extensions:{}})),um=G("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function ug({name:e,basePath:n,mode:t,componentContext:r,state:o}){um.setState({slotName:e,basePath:n,mode:t??"normal",componentContext:r,state:o})}function uy(e){um.getState().slotName===e&&um.setState(um.getInitialState(),!0)}let ub=G("modalRegistry",{modals:{}});function u_(e){ub.setState(n=>(n.modals[e.name]=e,n))}function uv(e){let n=ub.getState().modals[e];if(!n){let t=uo(e);t&&(n={name:e,load:t.load,moduleName:t.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),u_(n))}return n}let u$=G("workspaceRegistrations",{workspaces:{}}),uA=G("workspaceGroups",{workspaceGroups:{}});function uw(e){u$.setState(n=>({workspaces:{...n.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function uk(e){uA.setState(n=>{let t=n.workspaceGroups[e.name];return t?{workspaceGroups:{...n.workspaceGroups,[e.name]:{...t,members:Array.from(new Set([...t.members,...e.members]))}}}:{workspaceGroups:{...n.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let ux=new Set;function uC(e){let n=u$.getState().workspaces;if(n[e])return n[e];{let n=uo(e);if(n){var t;let r;return ux.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),ux.add(e)),{name:n.name,title:(t=n,"string"==typeof(r=t?.meta?.title)?r:r&&"object"==typeof r?o5(t.moduleName,r.key,r.default):t.name),moduleName:n.moduleName,preferredWindowSize:n.meta?.screenSize??"normal",load:n.load,type:n.meta?.type??"form",canHide:n.meta?.canHide??!1,canMaximize:n.meta?.canMaximize??!1,width:n.meta?.width??"narrow",groups:n.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function uE(e){let n=uA.getState().workspaceGroups;if(n[e])return n[e];throw Error(`No workspace group named '${e}' has been registered.`)}let uS=G("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function uD(e){let{registeredWorkspacesByName:n,registeredWindowsByName:t}=uS.getState(),r=n[e];if(r){let n=t[r.window];if(n)return n;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function uz(e){let{registeredGroupsByName:n,registeredWindowsByName:t}=uS.getState(),r=t[e];if(r){let t=n[r.group];if(t)return t;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function uM(e){let{openedWindows:n}=uS.getState();return n.findIndex(n=>n.openedWorkspaces.find(n=>n.workspaceName===e))}function uP(e,n){if(0==n.length)return;let{registeredGroupsByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace group ${t.name} more than once`);r[t.name]={...t,moduleName:e}}uS.setState({registeredGroupsByName:r})}function uT(e,n){if(0==n.length)return;let{registeredWindowsByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace window ${t.name} more than once`);let n={...t,moduleName:e};r[t.name]=n}uS.setState({registeredWindowsByName:r})}function uO(e,n){if(0==n.length)return;let{registeredWorkspacesByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace ${t.name} more than once`);let n={...t,moduleName:e};r[t.name]=n}uS.setState({registeredWorkspacesByName:r})}let uN=0;async function uI(e,n,t,r,o=e=>e,a={}){let i=ut(r),s=uo(r),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${n}'`);let{meta:c,moduleName:p,online:u,offline:d,load:f}=s;if(pX(u,d)){p2(o=>({...o,extensions:{...o.extensions,[i]:{...o.extensions[i],instances:[...o.extensions[i].instances,{domElement:e,id:r,slotName:n,slotModuleName:t}]}}}));let s=await f(),u=uN++;l=rT(o({...s,name:`${n}/${i}-${u}`}),{...a,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:n,extensionSlotModuleName:t,extensionModuleName:p},domElement:e})}}else console.warn(`Tried to render ${r} into ${n} but no DOM element was available.`);return l}var uB=t(2491),uj=t.n(uB);let uR=(0,uB.createContext)({moduleName:"",featureName:""});function uF({to:e,templateParams:n,onBeforeNavigate:t,children:r,...o}){return(0,uB.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),uj().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),t?.(r),o$({to:e,templateParams:n})),0===r.button&&(r.ctrlKey||r.metaKey)&&t?.(r),0===r.button&&r.shiftKey&&t?.(r),1===r.button&&t?.(r)},href:o_(e,n),...o},r)}let uL=({state:e,children:n,...t})=>{let{extension:r}=(0,uB.useContext)(uR),o=(0,uB.useRef)(null),a=(0,uB.useRef)(Promise.resolve()),i=(0,uB.useCallback)(n=>{r?.extensionSlotName&&r.extensionSlotModuleName&&r.extensionSlotModuleName&&!o.current&&uI(n,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,uB.useEffect)(()=>()=>{if(o&&o.current)switch(o.current.getStatus()){case"MOUNTING":o.current.mountPromise.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()});break;case"MOUNTED":o.current.unmount();break;case"UPDATING":a.current&&a.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,uB.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,a.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(a.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),r?uj().createElement("div",{ref:i,"data-extension-id":r?.extensionId,style:{position:"relative"},...t}):null};function uW(e,n){"function"==typeof n&&(n=n(e));let t={};for(let[r,o]of Object.entries(n)){let n=function(...n){e.setState(e=>o(e,...n))};t[r]=n}return t}let uV=()=>e=>e;function uG(e,n=uV(),t){let r=(0,uB.useCallback)(n=>e.subscribe(n),[e]),o=(0,uB.useCallback)(()=>n(e.getState()),[e,n]),a=(0,uB.useSyncExternalStore)(r,o,o),i=(0,uB.useMemo)(()=>t?uW(e,t):{},[e,t]);return{...a,...i}}function uU(e,n){return uG(e,uV(),n)}function uq(e){return function(n){let t=(0,uB.useCallback)(n=>e.subscribe(n),[]),r=(0,uB.useCallback)(()=>e.getState(),[]),o=(0,uB.useSyncExternalStore)(t,r,r),a=(0,uB.useMemo)(()=>n?uW(e,n):{},[n]);return{...o,...a}}}let uH=e=>uG(p3(),n=>n.slots?.[e]);function uK(e){let n=uH(e);return n?.assignedExtensions??[]}function uY(e,n){let{moduleName:t}=(0,uB.useContext)(uR),r=(0,uB.useRef)(!0);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,uB.useEffect)(()=>{ud(t,e,n),r.current=!1},[]),(0,uB.useEffect)(()=>{r.current||uf(e,n)},[e,n]),{extensions:uK(e),extensionSlotName:e,extensionSlotModuleName:t}}function uZ(e){return e}function uJ({name:e,extensionSlotName:n,select:t=uZ,children:r,state:o,style:a,...i}){if(r&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??n,l=(0,uB.useRef)(null),{extensions:c,extensionSlotModuleName:p}=uY(s,o),u=(0,uB.useMemo)(()=>t(c),[t,c]),d=(0,uB.useMemo)(()=>{if("function"==typeof r&&!uj().isValidElement(r))return u.map(e=>r(e,o))},[r,u]);return uj().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":p,style:{...a,position:"relative"},...i},s&&u?.map((e,n)=>uj().createElement(uR.Provider,{key:e.id,value:{moduleName:p,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:p}}},d?.[n]??("function"!=typeof r?r:null)??uj().createElement(uL,{state:o}))))}var uX=t(5873);function uQ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function u0(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uQ(Object(t),!0).forEach(function(n){var r,o,a;r=e,o=n,a=t[n],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uQ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function u1(e){return(u1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u2(e){return(u2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u3(e,n){var t;if("function"!=typeof(t=n.domElement?function(){return n.domElement}:n.domElementGetter?n.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var n=e.appName||e.name;if(!n)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var t="single-spa-application:".concat(n);return function(){var e=document.getElementById(t);return e||((e=document.createElement("div")).id=t,document.body.appendChild(e)),e}}(n)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(n.name,"'. Expected a function, received ").concat(u2(t)));return function(){var e=t(n);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(n.name,"'. Expected HTMLElement, received ").concat(u2(e)));return e}}var u5=null;try{u5=require("react").createContext()}catch(e){}var u4={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function u6(e,n){return e.rootComponent?Promise.resolve():e.loadRootComponent(n).then(function(n){e.rootComponent=n})}function u7(e,n){return new Promise(function(t,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var n=e.version.slice(0,e.version.indexOf("."));try{return Number(n)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(n.name||n.appName||n.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(n.name||n.appName||n.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,a=dn(e,n,function(){t(this)}),i=u3(e,n)(),s=function(e){var n=e.reactDom,t=e.renderType,r=e.elementToRender,o=e.domElement,a=n[t];if("function"!=typeof a)throw Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(r),i;case"hydrateRoot":return a(o,r);default:return a(r,o),null}}({elementToRender:a,domElement:i,reactDom:de(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[n.name]=i,e.renderResults[n.name]=s})}function u8(e,n){return new Promise(function(t){e.unmountResolves[n.name]=t;var r=e.renderResults[n.name];r&&r.unmount?r.unmount():de(e).unmountComponentAtNode(e.domElements[n.name]),delete e.domElements[n.name],delete e.renderResults[n.name]})}function u9(e,n){return new Promise(function(t){e.updateResolves[n.name]||(e.updateResolves[n.name]=[]),e.updateResolves[n.name].push(t);var r=dn(e,n,null),o=e.renderResults[n.name];if(o&&o.render)o.render(r);else{var a=u3(e,n)();de(e).render(r,a)}})}function de(e){return e.ReactDOMClient||e.ReactDOM}function dn(e,n,t){var r=e.React.createElement(e.rootComponent,n),o=u5?e.React.createElement(u5.Provider,{value:n},r):r;return(e.errorBoundary||n.errorBoundary||e.errorBoundaryClass||n.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||n.errorBoundaryClass||function(e,n){function t(n){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},t.displayName="SingleSpaReactErrorBoundary(".concat(n.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||n.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},t.prototype.componentDidCatch=function(e,n){this.setState({caughtError:e,caughtErrorInfo:n})},t}(e,n),o=e.React.createElement(e.errorBoundaryClass,n,o)),o=e.React.createElement(e.SingleSpaRoot,u0(u0({},n),{},{mountFinished:t,updateFinished:function(){e.updateResolves[n.name]&&(e.updateResolves[n.name].forEach(function(e){return e()}),delete e.updateResolves[n.name])},unmountFinished:function(){e.unmountResolves[n.name]&&(e.unmountResolves[n.name](),delete e.unmountResolves[n.name])}}),o)}var dt=t(4011),dr=t(1123),da=t(2372);let di={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},ds=new Map;(0,da.r2)(ds);let dl={errorRetryCount:3,fetcher:oN,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof oB){let n=e.response.status;return!!(n>=500)||401===n||403===n||429===n}return!0},provider:()=>ds};function dc(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let n=Object.assign({},di,e),t={...dl,...n.swrConfig};return function(e){var r,o,a,i,s;return a=o=class extends(r=uj().Component){componentDidCatch(e,t){t&&t.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:t.componentStack})),n.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:t})}render(){if(this.state.caughtError)return uj().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=uj().createElement(uB.Suspense,{fallback:null},uj().createElement(dr.BE,{value:t},uj().createElement(uR.Provider,{value:this.state.config},n.disableTranslations?uj().createElement(e,this.props):uj().createElement(dt.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},uj().createElement(e,this.props)))));return n.strictMode&&uj().StrictMode?uj().createElement(uj().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:n.moduleName,featureName:n.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${n.featureName})`,i in a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function dp(e,n){return function(e){if("object"!==u1(e))throw Error("single-spa-react requires a configuration object");var n,t=u0(u0({},u4),e);if(!t.React)throw Error("single-spa-react must be passed opts.React");if(!t.ReactDOM&&!t.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(t.renderType||(null!=(n=t.ReactDOMClient)&&n.createRoot?t.renderType="createRoot":t.renderType="render"),!t.rootComponent&&!t.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!u5&&t.React.createContext&&(u5=t.React.createContext()),t.SingleSpaRoot=function(e){function n(e){n.displayName="SingleSpaRoot(".concat(e.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},n.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},n.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},n}(t);var r={bootstrap:u6.bind(null,t),mount:u7.bind(null,t),unmount:u8.bind(null,t)};return t.parcelCanUpdate&&(r.update=u9.bind(null,t)),r}({React:uj(),ReactDOMClient:uX,rootComponent:dc(n)(e)})}function du(e,n){return()=>e().then(({default:e})=>dp(e,n))}function dd(e,n){return()=>Promise.resolve(dp(e,n))}let df=du,dh=L()(()=>({}));U("openmrs-app-context",dh);let dm={};function dg(e,n=e=>e){let t=dh.getState();return e in t?Object.freeze(Object.assign({},n?n(t[e]):t[e])):null}function dy(e,n){dh.setState(t=>(e in t||(t[e]={}),t[e]=n(t[e]),Object.assign({},t)))}function db(e){return null===e?null:Object.freeze(Object.assign({},e))}let d_=new Map;function dv(e,n){let t=(0,uB.useRef)(n??{}),r=(0,uB.useRef)(n=>dy(e,n)),o=(0,uB.useRef)(Symbol());return(0,uB.useEffect)(()=>{let t=n??{},r=o.current;return null===dg(e)?!function(e,n=dm){dh.setState(t=>{if(e in t)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},t,{[e]:n===dm?{}:n})})}(e,t):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),dy(e,()=>t)),d_.set(e,r),()=>{d_.get(e)===r&&(dh.setState(n=>(e in n&&delete n[e],n)),d_.delete(e))}},[e]),(0,uB.useEffect)(()=>{let r=n??{};B(t.current,r)||(dy(e,()=>r),t.current=r)},[n]),r.current}function d$({namespace:e,value:n}){return dv(e,n),null}let dA=({children:e,value:n,fallback:t})=>n?uj().createElement(uj().Fragment,null,e):t?uj().createElement(uj().Fragment,null,t):null;function dw(){let e=(0,uB.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,uB.useEffect)(()=>{let n=e.current;return()=>n?.abort()},[]),e.current}function dk(e,n=e=>e??{}){let[t,r]=(0,uB.useState)(()=>{if(dx(e))return;let t=dg(e);if(null!==t)return n?n(t):t});return(0,uB.useEffect)(()=>{if(dx(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,uB.useEffect)(()=>{var t;let o;return(t=e=>{if(null==e)return void r(void 0);let t=n?n(e):e;r(e=>B(e,t)?e:t)})(db(o=dg(e))),dh.subscribe(n=>{let r=e in n?n[e]:null;r!==o&&(o=r,t(db(r)))})},[e,n]),t}function dx(e){return"string"!=typeof e||0===e.trim().length}function dC(e){let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>p3().subscribe(r=>{let o=r.slots[e]?.assignedExtensions.map(e=>e.id)??[];(0,nn.A)(o,n)||t(o)}),[]),n}function dE(e,n){let{data:t,error:r,mutate:o,isLoading:a,isValidating:i}=(0,dr.Ay)(`${aR}?patient=${e}&includeEncounterless=${n}`,oN);return(0,uB.useMemo)(()=>({isLoading:a,data:t?.data.results??[],error:r,mutate:o,isValidating:i}),[t,r,a,i,o])}function dS(e){(0,uB.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dD={},dz=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
15
+ ${this.stack}`}}let oj=G("session",{loaded:!1,session:null}),oR=0;function oF(e={includeAuthStatus:!0}){return(oR<Date.now()-6e4||!oj.getState().loaded)&&oV(),new es.Observable(n=>{let t=t=>{t.loaded&&(e.includeAuthStatus?n.next(t.session):n.next(t.session?.user))};return t(oj.getState()),oj.subscribe(t)})}function oL(){return(oR<Date.now()-6e4||!oj.getState().loaded)&&oV(),oj}function oW(e){let n=e.locale??e.user?.userProperties?.defaultLocale;n&&n.includes("_")&&(n=n.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(n)&&n!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",n)}function oV(e,n){oR=Date.now();let t={};return e&&n&&(t.Authorization=`Basic ${window.btoa(`${e}:${n}`)}`),oZ(oN(oT,{headers:t}))}function oG(){oj.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oU(e,n){var t,r;if(void 0===n)return!e;if(!e)return!0;return t=e,r=n,("string"==typeof t?!Y(r.privileges.find(e=>t===e.display)):Array.isArray(t)?t.every(e=>!Y(r.privileges.find(n=>e===n.display))):(Y(t)||console.error(`Could not understand privileges "${t}"`),!0))||!Y(n.roles.find(e=>"System Developer"===e.display))}function oq(){let e,n;return new Promise(t=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,t(r.session.user),n&&n())};r(oj.getState()),e||(n=oj.subscribe(r))})}function oH(){return new Promise((e,n)=>{oF().subscribe(n=>{e(n.sessionLocation)},n).unsubscribe()})}async function oK(e,n){return oZ(oN(oT,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal}))}async function oY(e,n,t){return t||(t=new AbortController),await oN(`${oM}/user/${e}`,{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:t.signal}),oV()}function oZ(e){return new Promise((n,t)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},oj.setState(r),n(r)):(r={loaded:!1,session:null},oj.setState(r),t(r))}).catch(e=>{O(`Failed to fetch new session information: ${e}`);let n={loaded:!1,session:null};oj.setState(n),t(n)})})}function oJ(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}oj.subscribe(e=>{e.loaded&&e.session&&oW(e.session)});let oX={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function oQ(){t_("@openmrs/esm-api",oD),oV()}let o0={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",male:"Male",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"};var o1=t(4557),o2=t.n(o1);let o3=o2().default||o2();function o5(e,n,t,r){return o3.t(n,{ns:e,defaultValue:t,...r})}function o4(e,n,t){return o0[e]?o5("core",e,n??o0[e],t):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}o3.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let o6="import-map-override:",o7="import-map-overrides-disabled",o8="import-map-overrides:change",o9=!1,ae=null;async function an(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),n=[];for(let t=0;t<e.length;t++){let r=e[t];try{if(r.src){let e=await fetch(r.src);n.push(await e.json())}else r.textContent&&n.push(JSON.parse(r.textContent))}catch(e){console.warn(`[import-maps] Failed to parse import map from script tag at index ${t}`,e)}}return at(n)}function at(e){let n={imports:{}};for(let t of e)t?.imports&&Object.assign(n.imports,t.imports);return n}function ar(){let e={};try{let n=al();for(let t=0;t<localStorage.length;t++){let r=localStorage.key(t);if(r?.startsWith(o6)){let t=r.slice(o6.length);if(!n.includes(t)){let n=localStorage.getItem(r);n&&(e[t]=n)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function ao(){let e=await an();return o9?at([e,ae??ar()]):e}async function aa(){return an()}async function ai(){return o9?at([await an(),ar()]):an()}function as(e){if(!o9)return{imports:{}};if(e){let e={};for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(o6)){let n=localStorage.getItem(t);n&&(e[t.slice(o6.length)]=n)}}return{imports:e}}return ar()}function al(){if(!o9)return[];try{let e=localStorage.getItem(o7);if(e){let n=JSON.parse(e);if(Array.isArray(n))return n}}catch{}return[]}function ac(e){return!!o9&&al().includes(e)}function ap(e,n){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(o6+e,n),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function au(e){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(o6+e);let n=al().filter(n=>n!==e);n.length>0?localStorage.setItem(o7,JSON.stringify(n)):localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function ad(){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);t?.startsWith(o6)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function af(e){if(!o9)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let n=al().filter(n=>n!==e);n.length>0?localStorage.setItem(o7,JSON.stringify(n)):localStorage.removeItem(o7),window.dispatchEvent(new CustomEvent(o8))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let ah=!1;function am(){!ah&&(ah=!0,(o9="development"===window.spaEnv)&&(ae=ar()))}function ag(e){return e.replace(/[\/\-@]/g,"_")}async function ay(e,n="./start",r){var o;let a,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([ab(e,r?.importMap),new Promise((n,t)=>{a=setTimeout(()=>{var n;t(Error(`Could not resolve requested script, ${e}, within ${(n=i)<1e3?`${n} milliseconds`:n<6e4?`${Math.floor(n/1e3)} seconds`:n<36e5?`${Math.floor(n/6e4)} minutes`:n<864e5?`${Math.floor(n/36e5)} hours`:`${Math.floor(n/864e5)} days`}.`))},i)})]),a&&clearTimeout(a);let s=ag(e),l=window[s];if(!("object"==typeof(o=l)&&null!==o&&"init"in o&&"function"==typeof o.init&&"get"in o&&"function"==typeof o.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(t.S.default);let c=(await l.get(n))();if("object"!=typeof c||null===c){let n=`Container for ${e} did not return an ESM module as expected`;throw console.error(n),Error(n)}return c}async function ab(e,n){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let t=ag(e);if(!window[t]){let t=n??await a_();if(!t.imports.hasOwnProperty(e)){let n=`Could not find the package ${e} defined in the current importmap`;throw console.error(n),Error(n)}let r=t.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let o=e in as().imports;try{return await new Promise((e,n)=>{!function(e,n,t){let r=document.head.querySelector(`script[src="${e}"]`),o=window[av];if(o||(o=window[av]=new Set([])),r)if(o.has(e)){let e,o,a;a=()=>{e&&r.removeEventListener("load",e),o&&r.removeEventListener("error",o)},e=()=>{a(),n(null)},o=e=>{a(),t(e.message)},r.addEventListener("load",e),r.addEventListener("error",o)}else console.warn(`Script at ${e} already loaded. Not loading it again.`),n(null);else{let r,a,i;o.add(e);let s=document.createElement("script");s.src=e,s.type="text/javascript",s.async=!0;let l=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);i=()=>{clearTimeout(l),o.delete(e),r&&s.removeEventListener("load",r),a&&s.removeEventListener("error",a)},r=()=>{i(),n(null)},a=n=>{i();let r=`Failed to load script from ${e}`;console.error(r,n),t(n.message??r)},s.addEventListener("load",r),s.addEventListener("error",a),document.head.appendChild(s)}}(r,e,n)})}catch(e){return o&&D({kind:"error",title:o4("scriptLoadingFailed","Error: Script failed to load"),description:o4("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:r}),actionButtonLabel:o4("resetOverrides","Reset overrides"),onActionButtonClick(){ad(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function a_(){return ao()}let av=Symbol("__openmrs_script_loading");function a$(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function aA(e){return!!e&&"object"==typeof e&&Object.entries(e).every(([e,n])=>"string"==typeof e&&a$(n))}let aw="openmrs-routes:",ak="openmrs-routes:change",ax=!1,aC=null;async function aE(){let e=document.querySelectorAll("script[type='openmrs-routes']"),n=[];for(let t=0;t<e.length;t++){let r=e[t];try{let e;if(r.src){let n=await fetch(r.src);e=await n.json()}else r.textContent&&(e=JSON.parse(r.textContent));e&&aA(e)&&n.push(e)}catch(e){console.warn(`[route-maps] Failed to parse routes from script tag at index ${t}`,e)}}return aS(n)}function aS(e){let n={};for(let t of e)t&&"object"==typeof t&&Object.assign(n,t);return n}async function aD(){let e={};try{let n=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(t?.startsWith(aw)){let e=localStorage.getItem(t);e&&n.push({moduleName:t.slice(aw.length),raw:e})}}for(let t of(await Promise.allSettled(n.map(async({moduleName:e,raw:n})=>{let t=JSON.parse(n);if(a$(t))return{moduleName:e,routes:t};if("string"==typeof t&&t.startsWith("http")){let n=await fetch(t),r=await n.json();if(a$(r))return{moduleName:e,routes:r};throw Error(`${t} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===t.status?e[t.value.moduleName]=t.value.routes:console.warn("[route-maps] Failed to load route override",t.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function az(){let e=await aE();return ax?aS([e,aC??await aD()]):e}async function aM(){return aE()}async function aP(){return ax?aS([await aE(),await aD()]):aE()}function aT(){if(!ax)return{};let e={};try{for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);if(t?.startsWith(aw)){let n=localStorage.getItem(t);n&&(e[t.slice(aw.length)]=n)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function aO(e,n){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof n)if(n.startsWith("http"))localStorage.setItem(aw+e,JSON.stringify(n));else{let t=JSON.parse(n);if(!a$(t))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,n);localStorage.setItem(aw+e,JSON.stringify(t))}else if(n instanceof URL)localStorage.setItem(aw+e,JSON.stringify(n.toString()));else{if(!a$(n))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,n);localStorage.setItem(aw+e,JSON.stringify(n))}window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function aN(e){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(aw+e),window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function aI(){if(!ax)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let n=0;n<localStorage.length;n++){let t=localStorage.key(n);t?.startsWith(aw)&&e.push(t)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(ak))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let aB=null;function aj(){return aB||(aB=(ax="development"===window.spaEnv)?aD().then(e=>{aC=e}):Promise.resolve())}let aR=`${oM}/attachment`;function aF(e,n){return oN(`${aR}/${e}`,{signal:n.signal})}function aL(e,n,t){return oN(`${aR}?patient=${e}&includeEncounterless=${n}`,{signal:t.signal})}async function aW(e,n){let t=new FormData;return t.append("fileCaption",n.fileDescription),t.append("patient",e),n.file?t.append("file",n.file,n.fileName):(t.append("file",new File([""],n.fileName),n.fileName),t.append("base64Content",n.base64Content)),oN(`${aR}`,{method:"POST",body:t})}function aV(e,n){return oN(`${aR}/${e}`,{method:"DELETE",signal:n.signal})}try{self["workbox:window:6.5.4"]&&_()}catch(e){}function aG(e,n){return new Promise(function(t){var r=new MessageChannel;r.port1.onmessage=function(e){t(e.data)},e.postMessage(n,[r.port2])})}function aU(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aq(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}try{self["workbox:core:6.5.4"]&&_()}catch(e){}var aH=function(){var e=this;this.promise=new Promise(function(n,t){e.resolve=n,e.reject=t})};function aK(e,n){var t=location.href;return new URL(e,t).href===new URL(n,t).href}var aY=function(e,n){this.type=e,Object.assign(this,n)};function aZ(e,n,t){return t?n?n(e):e:(e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e)}function aJ(){}var aX={type:"SKIP_WAITING"};function aQ(e,n){if(!n)return e&&e.then?e.then(aJ):Promise.resolve()}var a0=function(e){function n(n,t){var r,o;return void 0===t&&(t={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new aH,r.en=new aH,r.on=new aH,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,n=e.installing;r.tn>0||!aK(n.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=n,e.removeEventListener("updatefound",r.cn)):(r.hn=n,r.an.add(n),r.rn.resolve(n)),++r.tn,n.addEventListener("statechange",r.ln)},r.ln=function(e){var n=r.fn,t=e.target,o=t.state,a=t===r.vn,i={sw:t,isExternal:a,originalEvent:e};!a&&r.mn&&(i.isUpdate=!0),r.dispatchEvent(new aY(o,i)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&n.waiting===t&&r.dispatchEvent(new aY("waiting",i))},200):"activating"===o&&(clearTimeout(r.wn),a||r.en.resolve(t))},r.dn=function(e){var n=r.hn,t=n!==navigator.serviceWorker.controller;r.dispatchEvent(new aY("controlling",{isExternal:t,originalEvent:e,sw:n,isUpdate:r.mn})),t||r.on.resolve(n)},o=function(e){var n=e.data,t=e.ports,o=e.source;return aZ(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new aY("message",{data:n,originalEvent:e,ports:t,sw:o}))})},r.gn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}},r.sn=n,r.nn=t,navigator.serviceWorker.addEventListener("message",r.gn),r}n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var t,r,o=n.prototype;return o.register=function(e){var n=(void 0===e?{}:e).immediate,t=void 0!==n&&n;try{var r,o,a,i=this;return r=function(){if(!t&&"complete"!==document.readyState)return aQ(new Promise(function(e){return window.addEventListener("load",e)}))},o=function(){return i.mn=!!navigator.serviceWorker.controller,i.yn=i.pn(),aZ(i.bn(),function(e){i.fn=e,i.yn&&(i.hn=i.yn,i.en.resolve(i.yn),i.on.resolve(i.yn),i.yn.addEventListener("statechange",i.ln,{once:!0}));var n=i.fn.waiting;return n&&aK(n.scriptURL,i.sn.toString())&&(i.hn=n,Promise.resolve().then(function(){i.dispatchEvent(new aY("waiting",{sw:n,wasWaitingBeforeRegister:!0}))}).then(function(){})),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.dn),i.fn})},(a=r())&&a.then?a.then(o):o(a)}catch(e){return Promise.reject(e)}},o.update=function(){try{return this.fn?aQ(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},o.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(e){try{return aZ(this.getSW(),function(n){return aG(n,e)})}catch(e){return Promise.reject(e)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&aG(this.fn.waiting,aX)},o.pn=function(){var e=navigator.serviceWorker.controller;return e&&aK(e.scriptURL,this.sn.toString())?e:void 0},o.bn=function(){try{var e=this;return function(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}(function(){return aZ(navigator.serviceWorker.register(e.sn,e.nn),function(n){return e.un=performance.now(),n})},function(e){throw e})}catch(e){return Promise.reject(e)}},t=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}],aU(n.prototype,t),r&&aU(n,r),n}(function(){function e(){this.Pn=new Map}var n=e.prototype;return n.addEventListener=function(e,n){this.Sn(e).add(n)},n.removeEventListener=function(e,n){this.Sn(e).delete(n)},n.dispatchEvent=function(e){e.target=this;for(var n,t=function(e){var n;if("u"<typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return aq(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aq(e,void 0):void 0}}(e))){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(n=t()).done;)(0,n.value)(e)},n.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());function a1(e,n){if(void 0!==u)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),u;if(!("serviceWorker"in navigator))throw Error("Registering the Service Worker is not possible due to missing browser capabilities.");let t=new a0(e,n);return u=t.register().then(()=>t.controlling.then(()=>t))}function a2(){return u??Promise.resolve(void 0)}let a3="x-omrs-offline-response-body",a5="x-omrs-offline-response-status",a4="x-omrs-offline-caching-strategy";async function a6(e){let n=await a2();return n?await n.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}async function a7(){let e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(n){if(n.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}async function a8(){return!window.indexedDB}async function a9(){return new Promise(e=>{let n=indexedDB.open("test");n.onerror=()=>e(!0),n.onsuccess=()=>e(!1)})}async function ie(){return await a9()||await a8()||await a7()}let it="openmrs3:offline-mode",ir="unavailable";function io(){return{current:ir,notAvailable:"unavailable"===ir,active:"on"===ir}}function ia(e){"unavailable"!==ir&&"unavailable"!==e&&(localStorage.setItem(it,"on"===e?"active":"disabled"),ir=e)}async function ii(){await ie()||(ir="active"===localStorage.getItem(it)?"on":"off"),navigator.onLine}let is="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,il=Object.keys,ic=Array.isArray;function ip(e,n){return"object"!=typeof n||il(n).forEach(function(t){e[t]=n[t]}),e}"u"<typeof Promise||is.Promise||(is.Promise=Promise);let iu=Object.getPrototypeOf,id={}.hasOwnProperty;function ih(e,n){return id.call(e,n)}function im(e,n){"function"==typeof n&&(n=n(iu(e))),("u"<typeof Reflect?il:Reflect.ownKeys)(n).forEach(t=>{iy(e,t,n[t])})}let ig=Object.defineProperty;function iy(e,n,t,r){ig(e,n,ip(t&&ih(t,"get")&&"function"==typeof t.get?{get:t.get,set:t.set,configurable:!0}:{value:t,configurable:!0,writable:!0},r))}function ib(e){return{from:function(n){return e.prototype=Object.create(n.prototype),iy(e.prototype,"constructor",e),{extend:im.bind(null,e.prototype)}}}}let i_=Object.getOwnPropertyDescriptor;function iv(e,n){let t;return i_(e,n)||(t=iu(e))&&iv(t,n)}let i$=[].slice;function iA(e,n,t){return i$.call(e,n,t)}function iw(e,n){return n(e)}function ik(e){if(!e)throw Error("Assertion Failed")}function ix(e){is.setImmediate?setImmediate(e):setTimeout(e,0)}function iC(e,n){return e.reduce((e,t,r)=>{var o=n(t,r);return o&&(e[o[0]]=o[1]),e},{})}function iE(e,n){if(ih(e,n))return e[n];if(!n)return e;if("string"!=typeof n){for(var t=[],r=0,o=n.length;r<o;++r){var a=iE(e,n[r]);t.push(a)}return t}var i=n.indexOf(".");if(-1!==i){var s=e[n.substr(0,i)];return void 0===s?void 0:iE(s,n.substr(i+1))}}function iS(e,n,t){if(e&&void 0!==n&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof n&&"length"in n){ik("string"!=typeof t&&"length"in t);for(var r=0,o=n.length;r<o;++r)iS(e,n[r],t[r])}else{var a=n.indexOf(".");if(-1!==a){var i=n.substr(0,a),s=n.substr(a+1);if(""===s)void 0===t?ic(e)&&!isNaN(parseInt(i))?e.splice(i,1):delete e[i]:e[i]=t;else{var l=e[i];l&&ih(e,i)||(l=e[i]={}),iS(l,s,t)}}else void 0===t?ic(e)&&!isNaN(parseInt(n))?e.splice(n,1):delete e[n]:e[n]=t}}function iD(e){var n={};for(var t in e)ih(e,t)&&(n[t]=e[t]);return n}let iz=[].concat;function iM(e){return iz.apply([],e)}let iP="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(iM([8,16,32,64].map(e=>["Int","Uint","Float"].map(n=>n+e+"Array")))).filter(e=>is[e]),iT=iP.map(e=>is[e]);iC(iP,e=>[e,!0]);let iO=null;function iN(e){iO="u">typeof WeakMap&&new WeakMap;let n=function e(n){if(!n||"object"!=typeof n)return n;let t=iO&&iO.get(n);if(t)return t;if(ic(n)){t=[],iO&&iO.set(n,t);for(var r=0,o=n.length;r<o;++r)t.push(e(n[r]))}else if(iT.indexOf(n.constructor)>=0)t=n;else{let r=iu(n);for(var a in t=r===Object.prototype?{}:Object.create(r),iO&&iO.set(n,t),n)ih(n,a)&&(t[a]=e(n[a]))}return t}(e);return iO=null,n}let{toString:iI}={};function iB(e){return iI.call(e).slice(8,-1)}let ij="u">typeof Symbol?Symbol.iterator:"@@iterator",iR="symbol"==typeof ij?function(e){var n;return null!=e&&(n=e[ij])&&n.apply(e)}:function(){return null},iF={};function iL(e){var n,t,r,o;if(1==arguments.length){if(ic(e))return e.slice();if(this===iF&&"string"==typeof e)return[e];if(o=iR(e)){for(t=[];!(r=o.next()).done;)t.push(r.value);return t}if(null==e)return[e];if("number"==typeof(n=e.length)){for(t=Array(n);n--;)t[n]=e[n];return t}return[e]}for(n=arguments.length,t=Array(n);n--;)t[n]=arguments[n];return t}let iW="u">typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var iV="u">typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),iG=()=>!0;let iU=!Error("").stack;function iq(){if(iU)try{throw iq.arguments,Error()}catch(e){return e}return Error()}function iH(e,n){var t=e.stack;return t?(n=n||0,0===t.indexOf(e.name)&&(n+=(e.name+e.message).split("\n").length),t.split("\n").slice(n).filter(iG).map(e=>"\n"+e).join("")):""}var iK=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],iY=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(iK),iZ={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function iJ(e,n){this._e=iq(),this.name=e,this.message=n}function iX(e,n){return e+". Errors: "+Object.keys(n).map(e=>n[e].toString()).filter((e,n,t)=>t.indexOf(e)===n).join("\n")}function iQ(e,n,t,r){this._e=iq(),this.failures=n,this.failedKeys=r,this.successCount=t,this.message=iX(e,n)}function i0(e,n){this._e=iq(),this.name="BulkError",this.failures=Object.keys(n).map(e=>n[e]),this.failuresByPos=n,this.message=iX(e,n)}ib(iJ).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+iH(this._e,2))}},toString:function(){return this.name+": "+this.message}}),ib(iQ).from(iJ),ib(i0).from(iJ);var i1=iY.reduce((e,n)=>(e[n]=n+"Error",e),{}),i2=iY.reduce((e,n)=>{var t=n+"Error";function r(e,r){this._e=iq(),this.name=t,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=iZ[n]||t,this.inner=null)}return ib(r).from(iJ),e[n]=r,e},{});i2.Syntax=SyntaxError,i2.Type=TypeError,i2.Range=RangeError;var i3=iK.reduce((e,n)=>(e[n+"Error"]=i2[n],e),{}),i5=iY.reduce((e,n)=>(-1===["Syntax","Type","Range"].indexOf(n)&&(e[n+"Error"]=i2[n]),e),{});function i4(){}function i6(e){return e}function i7(e,n){return null==e||e===i6?n:function(t){return n(e(t))}}function i8(e,n){return function(){e.apply(this,arguments),n.apply(this,arguments)}}function i9(e,n){return e===i4?n:function(){var t=e.apply(this,arguments);void 0!==t&&(arguments[0]=t);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=n.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?i8(r,this.onsuccess):r),o&&(this.onerror=this.onerror?i8(o,this.onerror):o),void 0!==a?a:t}}function se(e,n){return e===i4?n:function(){e.apply(this,arguments);var t=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,n.apply(this,arguments),t&&(this.onsuccess=this.onsuccess?i8(t,this.onsuccess):t),r&&(this.onerror=this.onerror?i8(r,this.onerror):r)}}function sn(e,n){return e===i4?n:function(t){var r=e.apply(this,arguments);ip(t,r);var o=this.onsuccess,a=this.onerror;this.onsuccess=null,this.onerror=null;var i=n.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?i8(o,this.onsuccess):o),a&&(this.onerror=this.onerror?i8(a,this.onerror):a),void 0===r?void 0===i?void 0:i:ip(r,i)}}function st(e,n){return e===i4?n:function(){return!1!==n.apply(this,arguments)&&e.apply(this,arguments)}}function sr(e,n){return e===i4?n:function(){var t=e.apply(this,arguments);if(t&&"function"==typeof t.then){for(var r=this,o=arguments.length,a=Array(o);o--;)a[o]=arguments[o];return t.then(function(){return n.apply(r,a)})}return n.apply(this,arguments)}}i5.ModifyError=iQ,i5.DexieError=iJ,i5.BulkError=i0;var so={};let[sa,si,ss]="u"<typeof Promise?[]:(()=>{let e=Promise.resolve();if("u"<typeof crypto||!crypto.subtle)return[e,iu(e),e];let n=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[n,iu(n),e]})(),sl=si&&si.then,sc=sa&&sa.constructor,sp=!!ss;var su=!1,sd=ss?()=>{ss.then(sT)}:is.setImmediate?setImmediate.bind(null,sT):is.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{sT(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(sT,0)},sf=function(e,n){sA.push([e,n]),sm&&(sd(),sm=!1)},sh=!0,sm=!0,sg=[],sy=[],sb=null,s_=i6,sv={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:s3,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{s3(e[0],e[1])}catch(e){}})}},s$=sv,sA=[],sw=0,sk=[];function sx(e){if("object"!=typeof this)throw TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=i4,this._lib=!1;var n=this._PSD=s$;if(iV&&(this._stackHolder=iq(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==so)throw TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&sS(this,this._value))}this._state=null,this._value=null,++n.ref,function e(n,t){try{t(t=>{if(null===n._state){if(t===n)throw TypeError("A promise cannot be resolved with itself.");var r=n._lib&&sO();t&&"function"==typeof t.then?e(n,(e,n)=>{t instanceof sx?t._then(e,n):t.then(e,n)}):(n._state=!0,n._value=t,sD(n)),r&&sN()}},sS.bind(null,n))}catch(e){sS(n,e)}}(this,e)}let sC={get:function(){var e=s$,n=sV;function t(t,r){var o=!e.global&&(e!==s$||n!==sV);let a=o&&!sH();var i=new sx((n,i)=>{sz(this,new sE(s0(t,e,o,a),s0(r,e,o,a),n,i,e))});return iV&&sP(i,this),i}return t.prototype=so,t},set:function(e){iy(this,"then",e&&e.prototype===so?sC:{get:function(){return e},set:sC.set})}};function sE(e,n,t,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=r,this.psd=o}function sS(e,n){if(sy.push(n),null===e._state){var t=e._lib&&sO();n=s_(n),e._state=!1,e._value=n,iV&&null!==n&&"object"==typeof n&&!n._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var t=iv(n,"stack");n._promise=e,iy(n,"stack",{get:()=>su?t&&(t.get?t.get.apply(n):t.value):e.stack})}),sg.some(n=>n._value===e._value)||sg.push(e),sD(e),t&&sN()}}function sD(e){var n=e._listeners;e._listeners=[];for(var t=0,r=n.length;t<r;++t)sz(e,n[t]);var o=e._PSD;--o.ref||o.finalize(),0===sw&&(++sw,sf(()=>{0==--sw&&sI()},[]))}function sz(e,n){if(null!==e._state){var t=e._state?n.onFulfilled:n.onRejected;if(null===t)return(e._state?n.resolve:n.reject)(e._value);++n.psd.ref,++sw,sf(sM,[t,e,n])}else e._listeners.push(n)}function sM(e,n,t){try{sb=n;var r,o=n._value;n._state?r=e(o):(sy.length&&(sy=[]),r=e(o),-1===sy.indexOf(o)&&function(e){for(var n=sg.length;n;)if(sg[--n]._value===e._value)return void sg.splice(n,1)}(n)),t.resolve(r)}catch(e){t.reject(e)}finally{sb=null,0==--sw&&sI(),--t.psd.ref||t.psd.finalize()}}function sP(e,n){var t=n?n._numPrev+1:0;t<100&&(e._prev=n,e._numPrev=t)}function sT(){sO()&&sN()}function sO(){var e=sh;return sh=!1,sm=!1,e}function sN(){var e,n,t;do for(;sA.length>0;)for(e=sA,sA=[],t=e.length,n=0;n<t;++n){var r=e[n];r[0].apply(null,r[1])}while(sA.length>0);sh=!0,sm=!0}function sI(){var e=sg;sg=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var n=sk.slice(0),t=n.length;t;)n[--t]()}function sB(e){return new sx(so,!1,e)}function sj(e,n){var t=s$;return function(){var r=sO(),o=s$;try{return sJ(t,!0),e.apply(this,arguments)}catch(e){n&&n(e)}finally{sJ(o,!1),r&&sN()}}}im(sx.prototype,{then:sC,_then:function(e,n){sz(this,new sE(null,null,e,n,s$))},catch:function(e){if(1==arguments.length)return this.then(null,e);var n=arguments[0],t=arguments[1];return"function"==typeof n?this.then(null,e=>e instanceof n?t(e):sB(e)):this.then(null,e=>e&&e.name===n?t(e):sB(e))},finally:function(e){return this.then(n=>(e(),n),n=>(e(),sB(n)))},stack:{get:function(){if(this._stack)return this._stack;try{su=!0;var e=(function e(n,t,r){if(t.length===r)return t;var o="";if(!1===n._state){var a,i,s=n._value;null!=s?(a=s.name||"Error",i=s.message||s,o=iH(s,0)):(a=s,i=""),t.push(a+(i?": "+i:"")+o)}return iV&&((o=iH(n._stackHolder,2))&&-1===t.indexOf(o)&&t.push(o),n._prev&&e(n._prev,t,r)),t})(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{su=!1}}},timeout:function(e,n){return e<1/0?new sx((t,r)=>{var o=setTimeout(()=>r(new i2.Timeout(n)),e);this.then(t,r).finally(clearTimeout.bind(null,o))}):this}}),"u">typeof Symbol&&Symbol.toStringTag&&iy(sx.prototype,Symbol.toStringTag,"Dexie.Promise"),sv.env=sX(),im(sx,{all:function(){var e=iL.apply(null,arguments).map(sK);return new sx(function(n,t){0===e.length&&n([]);var r=e.length;e.forEach((o,a)=>sx.resolve(o).then(t=>{e[a]=t,--r||n(e)},t))})},resolve:e=>{if(e instanceof sx)return e;if(e&&"function"==typeof e.then)return new sx((n,t)=>{e.then(n,t)});var n=new sx(so,!0,e);return sP(n,sb),n},reject:sB,race:function(){var e=iL.apply(null,arguments).map(sK);return new sx((n,t)=>{e.map(e=>sx.resolve(e).then(n,t))})},PSD:{get:()=>s$,set:e=>s$=e},totalEchoes:{get:()=>sV},newPSD:sU,usePSD:sQ,scheduler:{get:()=>sf,set:e=>{sf=e}},rejectionMapper:{get:()=>s_,set:e=>{s_=e}},follow:(e,n)=>new sx((t,r)=>sU((n,t)=>{var r=s$;r.unhandleds=[],r.onunhandled=t,r.finalize=i8(function(){var e;e=()=>{0===this.unhandleds.length?n():t(this.unhandleds[0])},sk.push(function n(){e(),sk.splice(sk.indexOf(n),1)}),++sw,sf(()=>{0==--sw&&sI()},[])},r.finalize),e()},n,t,r))}),sc&&(sc.allSettled&&iy(sx,"allSettled",function(){let e=iL.apply(null,arguments).map(sK);return new sx(n=>{0===e.length&&n([]);let t=e.length,r=Array(t);e.forEach((e,o)=>sx.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--t||n(r)))})}),sc.any&&"u">typeof AggregateError&&iy(sx,"any",function(){let e=iL.apply(null,arguments).map(sK);return new sx((n,t)=>{0===e.length&&t(AggregateError([]));let r=e.length,o=Array(r);e.forEach((e,a)=>sx.resolve(e).then(e=>n(e),e=>{o[a]=e,--r||t(AggregateError(o))}))})}));let sR={awaits:0,echoes:0,id:0};var sF=0,sL=[],sW=0,sV=0,sG=0;function sU(e,n,t,r){var o=s$,a=Object.create(o);a.parent=o,a.ref=0,a.global=!1,a.id=++sG;var i=sv.env;a.env=sp?{Promise:sx,PromiseProp:{value:sx,configurable:!0,writable:!0},all:sx.all,race:sx.race,allSettled:sx.allSettled,any:sx.any,resolve:sx.resolve,reject:sx.reject,nthen:s1(i.nthen,a),gthen:s1(i.gthen,a)}:{},n&&ip(a,n),++o.ref,a.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sQ(a,e,t,r);return 0===a.ref&&a.finalize(),s}function sq(){return sR.id||(sR.id=++sF),++sR.awaits,sR.echoes+=100,sR.id}function sH(){return!!sR.awaits&&(0==--sR.awaits&&(sR.id=0),sR.echoes=100*sR.awaits,!0)}function sK(e){return sR.echoes&&e&&e.constructor===sc?(sq(),e.then(e=>(sH(),e),e=>(sH(),s5(e)))):e}function sY(e){++sV,sR.echoes&&0!=--sR.echoes||(sR.echoes=sR.id=0),sL.push(s$),sJ(e,!0)}function sZ(){var e=sL[sL.length-1];sL.pop(),sJ(e,!1)}function sJ(e,n){var t,r=s$;if((n?!sR.echoes||sW++&&e===s$:!sW||--sW&&e===s$)||(t=n?sY.bind(null,e):sZ,sl.call(sa,t)),e!==s$&&(s$=e,r===sv&&(sv.env=sX()),sp)){var o=sv.env.Promise,a=e.env;si.then=a.nthen,o.prototype.then=a.gthen,(r.global||e.global)&&(Object.defineProperty(is,"Promise",a.PromiseProp),o.all=a.all,o.race=a.race,o.resolve=a.resolve,o.reject=a.reject,a.allSettled&&(o.allSettled=a.allSettled),a.any&&(o.any=a.any))}}function sX(){var e=is.Promise;return sp?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(is,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:si.then,gthen:e.prototype.then}:{}}function sQ(e,n,t,r,o){var a=s$;try{return sJ(e,!0),n(t,r,o)}finally{sJ(a,!1)}}function s0(e,n,t,r){return"function"!=typeof e?e:function(){var o,a=s$;t&&sq(),sJ(n,!0);try{return e.apply(this,arguments)}finally{sJ(a,!1),r&&(o=sH,sl.call(sa,o))}}}function s1(e,n){return function(t,r){return e.call(this,s0(t,n),s0(r,n))}}-1===(""+sl).indexOf("[native code]")&&(sq=sH=i4);let s2="unhandledrejection";function s3(e,n){var t;try{t=n.onuncatched(e)}catch(e){}if(!1!==t)try{var r,o={promise:n,reason:e};if(is.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(s2,!0,!0),ip(r,o)):is.CustomEvent&&ip(r=new CustomEvent(s2,{detail:o}),o),r&&is.dispatchEvent&&(dispatchEvent(r),!is.PromiseRejectionEvent&&is.onunhandledrejection))try{is.onunhandledrejection(r)}catch(e){}iV&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var s5=sx.reject;let s4="3.2.4",s6=String.fromCharCode(65535),s7=-1/0,s8="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",s9="String expected.",le=[],ln="u">typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),lt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),lr="__dbnames",lo="readonly",la="readwrite";function li(e,n){return e?n?function(){return e.apply(this,arguments)&&n.apply(this,arguments)}:e:n}let ls={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ll(e){return"string"!=typeof e||/\./.test(e)?e=>e:n=>(void 0===n[e]&&e in n&&delete(n=iN(n))[e],n)}class lc{_trans(e,n,t){let r=this._tx||s$.trans,o=this.name;function a(e,t,r){if(!r.schema[o])throw new i2.NotFound("Table "+o+" not part of transaction");return n(r.idbtrans,r)}let i=sO();try{return r&&r.db===this.db?r===s$.trans?r._promise(e,a,t):sU(()=>r._promise(e,a,t),{trans:r,transless:s$.transless||s$}):function e(n,t,r,o){if(n.idbdb&&(n._state.openComplete||s$.letThrough||n._vip)){var a=n._createTransaction(t,r,n._dbSchema);try{a.create(),n._state.PR1398_maxLoop=3}catch(a){return a.name===i1.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,r,o))):s5(a)}return a._promise(t,(e,n)=>sU(()=>(s$.trans=a,o(e,n,a)))).then(e=>a._completion.then(()=>e))}if(n._state.openComplete)return s5(new i2.DatabaseClosed(n._state.dbOpenError));if(!n._state.isBeingOpened){if(!n._options.autoOpen)return s5(new i2.DatabaseClosed);n.open().catch(i4)}return n._state.dbReadyPromise.then(()=>e(n,t,r,o))}(this.db,e,[this.name],a)}finally{i&&sN()}}get(e,n){return e&&e.constructor===Object?this.where(e).first(n):this._trans("readonly",n=>this.core.get({trans:n,key:e}).then(e=>this.hook.reading.fire(e))).then(n)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(ic(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);let n=il(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);let t=this.schema.indexes.concat(this.schema.primKey).filter(e=>e.compound&&n.every(n=>e.keyPath.indexOf(n)>=0)&&e.keyPath.every(e=>n.indexOf(e)>=0))[0];if(t&&this.db._maxKey!==s6)return this.where(t.name).equals(t.keyPath.map(n=>e[n]));!t&&iV&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);let{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function a(e,n){try{return 0===o.cmp(e,n)}catch(e){return!1}}let[i,s]=n.reduce(([n,t],o)=>{let i=r[o],s=e[o];return[n||i,n||!i?li(t,i&&i.multi?e=>{let n=iE(e,o);return ic(n)&&n.some(e=>a(s,e))}:e=>a(s,iE(e,o))):t]},[null,null]);return i?this.where(i.name).equals(e[i.keyPath]).filter(s):t?this.filter(s):this.where(n).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,ic(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;let n=n=>{if(!n)return n;let t=Object.create(e.prototype);for(var r in n)if(ih(n,r))try{t[r]=n[r]}catch(e){}return t};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),e}defineClass(){return this.mapToClass(function(e){ip(this,e)})}add(e,n){let{auto:t,keyPath:r}=this.schema.primKey,o=e;return r&&t&&(o=ll(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=n?[n]:null,values:[o]})).then(e=>e.numFailures?sx.reject(e.failures[0]):e.lastResult).then(n=>{if(r)try{iS(e,r,n)}catch(e){}return n})}update(e,n){if("object"!=typeof e||ic(e))return this.where(":id").equals(e).modify(n);{let t=iE(e,this.schema.primKey.keyPath);if(void 0===t)return s5(new i2.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof n?il(n).forEach(t=>{iS(e,t,n[t])}):n(e,{value:e,primKey:t})}catch(e){}return this.where(":id").equals(t).modify(n)}}put(e,n){let{auto:t,keyPath:r}=this.schema.primKey,o=e;return r&&t&&(o=ll(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=n?[n]:null})).then(e=>e.numFailures?sx.reject(e.failures[0]):e.lastResult).then(n=>{if(r)try{iS(e,r,n)}catch(e){}return n})}delete(e){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[e]})).then(e=>e.numFailures?sx.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:ls})).then(e=>e.numFailures?sx.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",n=>this.core.getMany({keys:e,trans:n}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,n,t){let r=Array.isArray(n)?n:void 0,o=(t=t||(r?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:a}=this.schema.primKey;if(a&&r)throw new i2.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new i2.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=a&&t?e.map(ll(a)):e;return this.core.mutate({trans:n,type:"add",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:r})=>{if(0===e)return o?n:t;throw new i0(`${this.name}.bulkAdd(): ${e} of ${i} operations failed`,r)})})}bulkPut(e,n,t){let r=Array.isArray(n)?n:void 0,o=(t=t||(r?void 0:n))?t.allKeys:void 0;return this._trans("readwrite",n=>{let{auto:t,keyPath:a}=this.schema.primKey;if(a&&r)throw new i2.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new i2.InvalidArgument("Arguments objects and keys must have the same length");let i=e.length,s=a&&t?e.map(ll(a)):e;return this.core.mutate({trans:n,type:"put",keys:r,values:s,wantResults:o}).then(({numFailures:e,results:n,lastResult:t,failures:r})=>{if(0===e)return o?n:t;throw new i0(`${this.name}.bulkPut(): ${e} of ${i} operations failed`,r)})})}bulkDelete(e){let n=e.length;return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:e})).then(({numFailures:e,lastResult:t,failures:r})=>{if(0===e)return t;throw new i0(`${this.name}.bulkDelete(): ${e} of ${n} operations failed`,r)})}}function lp(e){var n={},t=function(t,r){if(r){for(var o=arguments.length,a=Array(o-1);--o;)a[o-1]=arguments[o];return n[t].subscribe.apply(null,a),e}if("string"==typeof t)return n[t]};t.addEventType=a;for(var r=1,o=arguments.length;r<o;++r)a(arguments[r]);return t;function a(e,r,o){if("object"!=typeof e){r||(r=st),o||(o=i4);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter(function(n){return n!==e}),i.fire=i.subscribers.reduce(r,o)}};return n[e]=t[e]=i,i}il(e).forEach(function(n){var t=e[n];if(ic(t))a(n,e[n][0],e[n][1]);else{if("asap"!==t)throw new i2.InvalidArgument("Invalid event config");var r=a(n,i6,function(){for(var e=arguments.length,n=Array(e);e--;)n[e]=arguments[e];r.subscribers.forEach(function(e){ix(function(){e.apply(null,n)})})})}})}}function lu(e,n){return ib(n).from({prototype:e}),n}function ld(e,n){return!(e.filter||e.algorithm||e.or)&&(n?e.justLimit:!e.replayFilter)}function lf(e,n){e.filter=li(e.filter,n)}function lh(e,n,t){var r=e.replayFilter;e.replayFilter=r?()=>li(r(),n()):n,e.justLimit=t&&!r}function lm(e,n){if(e.isPrimKey)return n.primaryKey;let t=n.getIndexByKeyPath(e.index);if(!t)throw new i2.Schema("KeyPath "+e.index+" on object store "+n.name+" is not indexed");return t}function lg(e,n,t){let r=lm(e,n.schema);return n.openCursor({trans:t,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function ly(e,n,t,r){let o=e.replayFilter?li(e.filter,e.replayFilter()):e.filter;if(e.or){let a={},i=(e,t,r)=>{if(!o||o(t,r,e=>t.stop(e),e=>t.fail(e))){var i=t.primaryKey,s=""+i;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(i)),ih(a,s)||(a[s]=!0,n(e,t,r))}};return Promise.all([e.or._iterate(i,t),lb(lg(e,r,t),e.algorithm,i,!e.keysOnly&&e.valueMapper)])}return lb(lg(e,r,t),li(e.algorithm,o),n,!e.keysOnly&&e.valueMapper)}function lb(e,n,t,r){var o=sj(r?(e,n,o)=>t(r(e),n,o):t);return e.then(e=>{if(e)return e.start(()=>{var t=()=>e.continue();n&&!n(e,e=>t=e,n=>{e.stop(n),t=i4},n=>{e.fail(n),t=i4})||o(e.value,e,e=>t=e),t()})})}function l_(e,n){try{let t=lv(e),r=lv(n);if(t!==r)return"Array"===t?1:"Array"===r?-1:"binary"===t?1:"binary"===r?-1:"string"===t?1:"string"===r?-1:"Date"===t?1:"Date"!==r?NaN:-1;switch(t){case"number":case"Date":case"string":return e>n?1:e<n?-1:0;case"binary":return function(e,n){let t=e.length,r=n.length,o=t<r?t:r;for(let t=0;t<o;++t)if(e[t]!==n[t])return e[t]<n[t]?-1:1;return t===r?0:t<r?-1:1}(l$(e),l$(n));case"Array":return function(e,n){let t=e.length,r=n.length,o=t<r?t:r;for(let t=0;t<o;++t){let r=l_(e[t],n[t]);if(0!==r)return r}return t===r?0:t<r?-1:1}(e,n)}}catch(e){}return NaN}function lv(e){let n=typeof e;if("object"!==n)return n;if(ArrayBuffer.isView(e))return"binary";let t=iB(e);return"ArrayBuffer"===t?"binary":t}function l$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class lA{_read(e,n){var t=this._ctx;return t.error?t.table._trans(null,s5.bind(null,t.error)):t.table._trans("readonly",e).then(n)}_write(e){var n=this._ctx;return n.error?n.table._trans(null,s5.bind(null,n.error)):n.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var n=this._ctx;n.algorithm=li(n.algorithm,e)}_iterate(e,n){return ly(this._ctx,e,n,this._ctx.table.core)}clone(e){var n=Object.create(this.constructor.prototype),t=Object.create(this._ctx);return e&&ip(t,e),n._ctx=t,n}raw(){return this._ctx.valueMapper=null,this}each(e){var n=this._ctx;return this._read(t=>ly(n,e,t,n.table.core))}count(e){return this._read(e=>{let n=this._ctx,t=n.table.core;if(ld(n,!0))return t.count({trans:e,query:{index:lm(n,t.schema),range:n.range}}).then(e=>Math.min(e,n.limit));var r=0;return ly(n,()=>(++r,!1),e,t).then(()=>r)}).then(e)}sortBy(e,n){let t=e.split(".").reverse(),r=t[0],o=t.length-1;function a(e,n){return n?a(e[t[n]],n-1):e[r]}var i="next"===this._ctx.dir?1:-1;function s(e,n){var t=a(e,o),r=a(n,o);return t<r?-i:t>r?i:0}return this.toArray(function(e){return e.sort(s)}).then(n)}toArray(e){return this._read(e=>{var n=this._ctx;if("next"===n.dir&&ld(n,!0)&&n.limit>0){let{valueMapper:t}=n,r=lm(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:r,range:n.range}}).then(({result:e})=>t?e.map(t):e)}{let t=[];return ly(n,e=>t.push(e),e,n.table.core).then(()=>t)}},e)}offset(e){var n=this._ctx;return e<=0||(n.offset+=e,ld(n)?lh(n,()=>{var n=e;return(e,t)=>0===n||(1===n?--n:t(()=>{e.advance(n),n=0}),!1)}):lh(n,()=>{var n=e;return()=>--n<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),lh(this._ctx,()=>{var n=e;return function(e,t,r){return--n<=0&&t(r),n>=0}},!0),this}until(e,n){return lf(this._ctx,function(t,r,o){return!e(t.value)||(r(o),n)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var n;return lf(this._ctx,function(n){return e(n.value)}),(n=this._ctx).isMatch=li(n.isMatch,e),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(n,t){e(t.key,t)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(n,t){e(t.primaryKey,t)})}keys(e){var n=this._ctx;n.keysOnly=!n.isMatch;var t=[];return this.each(function(e,n){t.push(n.key)}).then(function(){return t}).then(e)}primaryKeys(e){var n=this._ctx;if("next"===n.dir&&ld(n,!0)&&n.limit>0)return this._read(e=>{var t=lm(n,n.table.core.schema);return n.table.core.query({trans:e,values:!1,limit:n.limit,query:{index:t,range:n.range}})}).then(({result:e})=>e).then(e);n.keysOnly=!n.isMatch;var t=[];return this.each(function(e,n){t.push(n.primaryKey)}).then(function(){return t}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,n=e.index&&e.table.schema.idxByName[e.index];if(!n||!n.multi)return this;var t={};return lf(this._ctx,function(e){var n=e.primaryKey.toString(),r=ih(t,n);return t[n]=!0,!r}),this}modify(e){var n=this._ctx;return this._write(t=>{var r;if("function"==typeof e)r=e;else{var o=il(e),a=o.length;r=function(n){for(var t=!1,r=0;r<a;++r){var i=o[r],s=e[i];iE(n,i)!==s&&(iS(n,i,s),t=!0)}return t}}let i=n.table.core,{outbound:s,extractKey:l}=i.schema.primaryKey,c=this.db._options.modifyChunkSize||200,p=[],u=0,d=[],f=(e,n)=>{let{failures:t,numFailures:r}=n;for(let n of(u+=e-r,il(t)))p.push(t[n])};return this.clone().primaryKeys().then(o=>{let a=p=>{let u=Math.min(c,o.length-p);return i.getMany({trans:t,keys:o.slice(p,p+u),cache:"immutable"}).then(d=>{let h=[],m=[],g=s?[]:null,y=[];for(let e=0;e<u;++e){let n=d[e],t={value:iN(n),primKey:o[p+e]};!1!==r.call(t,t.value,t)&&(null==t.value?y.push(o[p+e]):s||0===l_(l(n),l(t.value))?(m.push(t.value),s&&g.push(o[p+e])):(y.push(o[p+e]),h.push(t.value)))}let b=ld(n)&&n.limit===1/0&&("function"!=typeof e||e===lw)&&{index:n.index,range:n.range};return Promise.resolve(h.length>0&&i.mutate({trans:t,type:"add",values:h}).then(e=>{for(let n in e.failures)y.splice(parseInt(n),1);f(h.length,e)})).then(()=>(m.length>0||b&&"object"==typeof e)&&i.mutate({trans:t,type:"put",keys:g,values:m,criteria:b,changeSpec:"function"!=typeof e&&e}).then(e=>f(m.length,e))).then(()=>(y.length>0||b&&e===lw)&&i.mutate({trans:t,type:"delete",keys:y,criteria:b}).then(e=>f(y.length,e))).then(()=>o.length>p+u&&a(p+c))})};return a(0).then(()=>{if(p.length>0)throw new iQ("Error modifying one or more objects",p,u,d);return o.length})})})}delete(){var e=this._ctx,n=e.range;return ld(e)&&(e.isPrimKey&&!ln||3===n.type)?this._write(t=>{let{primaryKey:r}=e.table.core.schema;return e.table.core.count({trans:t,query:{index:r,range:n}}).then(r=>e.table.core.mutate({trans:t,type:"deleteRange",range:n}).then(({failures:e,lastResult:n,results:t,numFailures:o})=>{if(o)throw new iQ("Could not delete some values",Object.keys(e).map(n=>e[n]),r-o);return r-o}))}):this.modify(lw)}}let lw=(e,n)=>n.value=null;function lk(e,n){return e<n?-1:+(e!==n)}function lx(e,n){return e>n?-1:+(e!==n)}function lC(e,n,t){var r=e instanceof lM?new e.Collection(e):e;return r._ctx.error=t?new t(n):TypeError(n),r}function lE(e){return new e.Collection(e,()=>lz("")).limit(0)}function lS(e,n,t,r){var o,a,i,s,l,c,p,u=t.length;if(!t.every(e=>"string"==typeof e))return lC(e,s9);function d(e){o="next"===e?e=>e.toUpperCase():e=>e.toLowerCase(),a="next"===e?e=>e.toLowerCase():e=>e.toUpperCase(),i="next"===e?lk:lx;var n=t.map(function(e){return{lower:a(e),upper:o(e)}}).sort(function(e,n){return i(e.lower,n.lower)});s=n.map(function(e){return e.upper}),l=n.map(function(e){return e.lower}),c=e,p="next"===e?"":r}d("next");var f=new e.Collection(e,()=>lD(s[0],l[u-1]+r));f._ondirectionchange=function(e){d(e)};var h=0;return f._addAlgorithm(function(e,t,r){var o=e.key;if("string"!=typeof o)return!1;var d=a(o);if(n(d,l,h))return!0;for(var f=null,m=h;m<u;++m){var g=function(e,n,t,r,o,a){for(var i=Math.min(e.length,r.length),s=-1,l=0;l<i;++l){var c=n[l];if(c!==r[l])return 0>o(e[l],t[l])?e.substr(0,l)+t[l]+t.substr(l+1):0>o(e[l],r[l])?e.substr(0,l)+r[l]+t.substr(l+1):s>=0?e.substr(0,s)+n[s]+t.substr(s+1):null;0>o(e[l],c)&&(s=l)}return i<r.length&&"next"===a?e+t.substr(e.length):i<e.length&&"prev"===a?e.substr(0,t.length):s<0?null:e.substr(0,s)+r[s]+t.substr(s+1)}(o,d,s[m],l[m],i,c);null===g&&null===f?h=m+1:(null===f||i(f,g)>0)&&(f=g)}return t(null!==f?function(){e.continue(f+p)}:r),!1}),f}function lD(e,n,t,r){return{type:2,lower:e,upper:n,lowerOpen:t,upperOpen:r}}function lz(e){return{type:1,lower:e,upper:e}}class lM{get Collection(){return this._ctx.table.db.Collection}between(e,n,t,r){t=!1!==t,r=!0===r;try{return this._cmp(e,n)>0||0===this._cmp(e,n)&&(t||r)&&(!t||!r)?lE(this):new this.Collection(this,()=>lD(e,n,!t,!r))}catch(e){return lC(this,s8)}}equals(e){return null==e?lC(this,s8):new this.Collection(this,()=>lz(e))}above(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(e,void 0,!0))}aboveOrEqual(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(e,void 0,!1))}below(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(void 0,e,!1,!0))}belowOrEqual(e){return null==e?lC(this,s8):new this.Collection(this,()=>lD(void 0,e))}startsWith(e){return"string"!=typeof e?lC(this,s9):this.between(e,e+s6,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):lS(this,(e,n)=>0===e.indexOf(n[0]),[e],s6)}equalsIgnoreCase(e){return lS(this,(e,n)=>e===n[0],[e],"")}anyOfIgnoreCase(){var e=iL.apply(iF,arguments);return 0===e.length?lE(this):lS(this,(e,n)=>-1!==n.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=iL.apply(iF,arguments);return 0===e.length?lE(this):lS(this,(e,n)=>n.some(n=>0===e.indexOf(n)),e,s6)}anyOf(){let e=iL.apply(iF,arguments),n=this._cmp;try{e.sort(n)}catch(e){return lC(this,s8)}if(0===e.length)return lE(this);let t=new this.Collection(this,()=>lD(e[0],e[e.length-1]));t._ondirectionchange=t=>{n="next"===t?this._ascending:this._descending,e.sort(n)};let r=0;return t._addAlgorithm((t,o,a)=>{let i=t.key;for(;n(i,e[r])>0;)if(++r===e.length)return o(a),!1;return 0===n(i,e[r])||(o(()=>{t.continue(e[r])}),!1)}),t}notEqual(e){return this.inAnyRange([[s7,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){let e=iL.apply(iF,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return lC(this,s8)}let n=e.reduce((e,n)=>e?e.concat([[e[e.length-1][1],n]]):[[s7,n]],null);return n.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,n){let t=this._cmp,r=this._ascending,o=this._descending,a=this._min,i=this._max;if(0===e.length)return lE(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&0>=r(e[0],e[1])))return lC(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",i2.InvalidArgument);let s=!n||!1!==n.includeLowers,l=n&&!0===n.includeUppers,c,p=r;function u(e,n){return p(e[0],n[0])}try{(c=e.reduce(function(e,n){let r=0,o=e.length;for(;r<o;++r){let o=e[r];if(0>t(n[0],o[1])&&t(n[1],o[0])>0){o[0]=a(o[0],n[0]),o[1]=i(o[1],n[1]);break}}return r===o&&e.push(n),e},[])).sort(u)}catch(e){return lC(this,s8)}let d=0,f=l?e=>r(e,c[d][1])>0:e=>r(e,c[d][1])>=0,h=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0,m=f,g=new this.Collection(this,()=>lD(c[0][0],c[c.length-1][1],!s,!l));return g._ondirectionchange=e=>{"next"===e?(m=f,p=r):(m=h,p=o),c.sort(u)},g._addAlgorithm((e,n,t)=>{for(var o=e.key;m(o);)if(++d===c.length)return n(t),!1;return!!(!f(o)&&!h(o))||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||n(()=>{p===r?e.continue(c[d][0]):e.continue(c[d][1])}),!1)}),g}startsWithAnyOf(){let e=iL.apply(iF,arguments);return e.every(e=>"string"==typeof e)?0===e.length?lE(this):this.inAnyRange(e.map(e=>[e,e+s6])):lC(this,"startsWithAnyOf() only works with strings")}}function lP(e){return sj(function(n){return lT(n),e(n.target.error),!1})}function lT(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}let lO="storagemutated",lN="x-storagemutated-1",lI=lp(null,lO);class lB{_lock(){return ik(!s$.global),++this._reculock,1!==this._reculock||s$.global||(s$.lockOwnerFor=this),this}_unlock(){if(ik(!s$.global),0==--this._reculock)for(s$.global||(s$.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{sQ(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&s$.lockOwnerFor!==this}create(e){if(!this.mode)return this;let n=this.db.idbdb,t=this.db._state.dbOpenError;if(ik(!this.idbtrans),!e&&!n)switch(t&&t.name){case"DatabaseClosedError":throw new i2.DatabaseClosed(t);case"MissingAPIError":throw new i2.MissingAPI(t.message,t);default:throw new i2.OpenFailed(t)}if(!this.active)throw new i2.TransactionInactive;return ik(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=sj(n=>{lT(n),this._reject(e.error)}),e.onabort=sj(n=>{lT(n),this.active&&this._reject(new i2.Abort(e.error)),this.active=!1,this.on("abort").fire(n)}),e.oncomplete=sj(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&lI.storagemutated.fire(e.mutatedParts)}),this}_promise(e,n,t){if("readwrite"===e&&"readwrite"!==this.mode)return s5(new i2.ReadOnly("Transaction is readonly"));if(!this.active)return s5(new i2.TransactionInactive);if(this._locked())return new sx((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,n,t).then(r,o)},s$])});if(t)return sU(()=>{var e=new sx((e,t)=>{this._lock();let r=n(e,t,this);r&&r.then&&r.then(e,t)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new sx((e,t)=>{var r=n(e,t,this);r&&r.then&&r.then(e,t)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var n=this._root();let t=sx.resolve(e);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>t);else{n._waitingFor=t,n._waitingQueue=[];var r=n.idbtrans.objectStore(n.storeNames[0]);!function e(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=n._waitingFor;return new sx((e,r)=>{t.then(t=>n._waitingQueue.push(sj(e.bind(null,t))),e=>n._waitingQueue.push(sj(r.bind(null,e)))).finally(()=>{n._waitingFor===o&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new i2.Abort))}table(e){let n=this._memoizedTables||(this._memoizedTables={});if(ih(n,e))return n[e];let t=this.schema[e];if(!t)throw new i2.NotFound("Table "+e+" not part of transaction");let r=new this.db.Table(e,t,this);return r.core=this.db.core.table(e),n[e]=r,r}}function lj(e,n,t,r,o,a,i){return{name:e,keyPath:n,unique:t,multi:r,auto:o,compound:a,src:(t&&!i?"&":"")+(r?"*":"")+(o?"++":"")+lR(n)}}function lR(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function lF(e,n,t){return{name:e,primKey:n,indexes:t,mappedClass:null,idxByName:iC(t,e=>[e.name,e])}}let lL=e=>{try{return e.only([[]]),lL=()=>[[]],[[]]}catch(e){return lL=()=>s6,s6}};function lW(e){return null==e?()=>{}:"string"==typeof e?1===e.split(".").length?n=>n[e]:n=>iE(n,e):n=>iE(n,e)}function lV(e){return[].slice.call(e)}let lG=0;function lU(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function lq({_novip:e},n){let t=n.db,r=function(e,n,{IDBKeyRange:t,indexedDB:r},o){var a;return{dbcore:(a=function(e,n,t){let r;function o(e){if(3===e.type)return null;if(4===e.type)throw Error("Cannot convert never type to IDBKeyRange");let{lower:t,upper:r,lowerOpen:o,upperOpen:a}=e;return void 0===t?void 0===r?null:n.upperBound(r,!!a):void 0===r?n.lowerBound(t,!!o):n.bound(t,r,!!o,!!a)}let{schema:a,hasGetAll:i}=(r=lV(e.objectStoreNames),{schema:{name:e.name,tables:r.map(e=>t.objectStore(e)).map(e=>{let{keyPath:n,autoIncrement:t}=e,r=ic(n),o=null==n,a={},i={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:n,autoIncrement:t,unique:!0,extractKey:lW(n)},indexes:lV(e.indexNames).map(n=>e.index(n)).map(e=>{let{name:n,unique:t,multiEntry:r,keyPath:o}=e,i={name:n,compound:ic(o),keyPath:o,unique:t,multiEntry:r,extractKey:lW(o)};return a[lU(o)]=i,i}),getIndexByKeyPath:e=>a[lU(e)]};return a[":id"]=i.primaryKey,null!=n&&(a[lU(n)]=i.primaryKey),i})},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),s=a.tables.map(e=>{let n;return{name:n=e.name,schema:e,mutate:function({trans:e,type:t,keys:r,values:a,range:i}){return new Promise((s,l)=>{let c;s=sj(s);let p=e.objectStore(n),u=null==p.keyPath,d="put"===t||"add"===t;if(!d&&"delete"!==t&&"deleteRange"!==t)throw Error("Invalid operation type: "+t);let{length:f}=r||a||{length:1};if(r&&a&&r.length!==a.length)throw Error("Given keys array must have same length as given values array.");if(0===f)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h=[],m=[],g=0,y=e=>{++g,lT(e)};if("deleteRange"===t){if(4===i.type)return s({numFailures:g,failures:m,results:[],lastResult:void 0});3===i.type?h.push(c=p.clear()):h.push(c=p.delete(o(i)))}else{let[e,n]=d?u?[a,r]:[a,null]:[r,null];if(d)for(let r=0;r<f;++r)h.push(c=n&&void 0!==n[r]?p[t](e[r],n[r]):p[t](e[r])),c.onerror=y;else for(let n=0;n<f;++n)h.push(c=p[t](e[n])),c.onerror=y}let b=e=>{let n=e.target.result;h.forEach((e,n)=>null!=e.error&&(m[n]=e.error)),s({numFailures:g,failures:m,results:"delete"===t?r:h.map(e=>e.result),lastResult:n})};c.onerror=e=>{y(e),b(e)},c.onsuccess=b})},getMany:({trans:e,keys:t})=>new Promise((r,o)=>{r=sj(r);let a=e.objectStore(n),i=t.length,s=Array(i),l,c=0,p=0,u=e=>{let n=e.target;s[n._pos]=n.result,++p===c&&r(s)},d=lP(o);for(let e=0;e<i;++e)null!=t[e]&&((l=a.get(t[e]))._pos=e,l.onsuccess=u,l.onerror=d,++c);0===c&&r(s)}),get:({trans:e,key:t})=>new Promise((r,o)=>{r=sj(r);let a=e.objectStore(n).get(t);a.onsuccess=e=>r(e.target.result),a.onerror=lP(o)}),query:e=>new Promise((t,r)=>{t=sj(t);let{trans:a,values:s,limit:l,query:c}=e,p=l===1/0?void 0:l,{index:u,range:d}=c,f=a.objectStore(n),h=u.isPrimaryKey?f:f.index(u.name),m=o(d);if(0===l)return t({result:[]});if(i){let e=s?h.getAll(m,p):h.getAllKeys(m,p);e.onsuccess=e=>t({result:e.target.result}),e.onerror=lP(r)}else{let e=0,n=!s&&"openKeyCursor"in h?h.openKeyCursor(m):h.openCursor(m),o=[];n.onsuccess=r=>{let a=n.result;return a?(o.push(s?a.value:a.primaryKey),++e===l?t({result:o}):void a.continue()):t({result:o})},n.onerror=lP(r)}}),openCursor:function({trans:e,values:t,query:r,reverse:a,unique:i}){return new Promise((s,l)=>{s=sj(s);let{index:c,range:p}=r,u=e.objectStore(n),d=c.isPrimaryKey?u:u.index(c.name),f=a?i?"prevunique":"prev":i?"nextunique":"next",h=!t&&"openKeyCursor"in d?d.openKeyCursor(o(p),f):d.openCursor(o(p),f);h.onerror=lP(l),h.onsuccess=sj(n=>{let t=h.result;if(!t)return void s(null);t.___id=++lG,t.done=!1;let r=t.continue.bind(t),o=t.continuePrimaryKey;o&&(o=o.bind(t));let a=t.advance.bind(t),i=()=>{throw Error("Cursor not stopped")};t.trans=e,t.stop=t.continue=t.continuePrimaryKey=t.advance=()=>{throw Error("Cursor not started")},t.fail=sj(l),t.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},t.start=e=>{let n=new Promise((e,n)=>{e=sj(e),h.onerror=lP(n),t.fail=n,t.stop=n=>{t.stop=t.continue=t.continuePrimaryKey=t.advance=i,e(n)}}),s=()=>{if(h.result)try{e()}catch(e){t.fail(e)}else t.done=!0,t.start=()=>{throw Error("Cursor behind last entry")},t.stop()};return h.onsuccess=sj(e=>{h.onsuccess=s,s()}),t.continue=r,t.continuePrimaryKey=o,t.advance=a,s(),n},s(t)},l)})},count({query:e,trans:t}){let{index:r,range:a}=e;return new Promise((e,i)=>{let s=t.objectStore(n),l=r.isPrimaryKey?s:s.index(r.name),c=o(a),p=c?l.count(c):l.count();p.onsuccess=sj(n=>e(n.target.result)),p.onerror=lP(i)})}}}),l={};return s.forEach(e=>l[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!l[e])throw Error(`Table '${e}' not found`);return l[e]},MIN_KEY:-1/0,MAX_KEY:lL(n),schema:a}}(n,t,o),e.dbcore.reduce((e,{create:n})=>({...e,...n(e)}),a))}}(e._middlewares,t,e._deps,n);e.core=r.dbcore,e.tables.forEach(n=>{let t=n.name;e.core.schema.tables.some(e=>e.name===t)&&(n.core=e.core.table(t),e[t]instanceof e.Table&&(e[t].core=n.core))})}function lH({_novip:e},n,t,r){t.forEach(t=>{let o=r[t];n.forEach(n=>{let r=iv(n,t);(!r||"value"in r&&void 0===r.value)&&(n===e.Transaction.prototype||n instanceof e.Transaction?iy(n,t,{get(){return this.table(t)},set(e){ig(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):n[t]=new e.Table(t,o))})})}function lK({_novip:e},n){n.forEach(n=>{for(let t in n)n[t]instanceof e.Table&&delete n[t]})}function lY(e,n){return e._cfg.version-n._cfg.version}function lZ(e,n){let t,r={del:[],add:[],change:[]};for(t in e)n[t]||r.del.push(t);for(t in n){let o=e[t],a=n[t];if(o){let e={name:t,def:a,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")==""+(a.primKey.keyPath||"")&&(o.primKey.auto===a.primKey.auto||ln)){let n,t=o.idxByName,i=a.idxByName;for(n in t)i[n]||e.del.push(n);for(n in i){let r=t[n],o=i[n];r?r.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&r.change.push(e)}else e.recreate=!0,r.change.push(e)}else r.add.push([t,a])}return r}function lJ(e,n,t,r){let o=e.db.createObjectStore(n,t.keyPath?{keyPath:t.keyPath,autoIncrement:t.auto}:{autoIncrement:t.auto});return r.forEach(e=>lX(o,e)),o}function lX(e,n){e.createIndex(n.name,n.keyPath,{unique:n.unique,multiEntry:n.multi})}function lQ(e,n,t){let r={};return iA(n.objectStoreNames,0).forEach(e=>{let n=t.objectStore(e),o=n.keyPath,a=lj(lR(o),o||"",!1,!1,!!n.autoIncrement,o&&"string"!=typeof o,!0),i=[];for(let e=0;e<n.indexNames.length;++e){let t=n.index(n.indexNames[e]);o=t.keyPath;var s=lj(t.name,o,!!t.unique,!!t.multiEntry,!1,o&&"string"!=typeof o,!1);i.push(s)}r[e]=lF(e,a,i)}),r}function l0({_novip:e},n,t){let r=t.db.objectStoreNames;for(let o=0;o<r.length;++o){let a=r[o],i=t.objectStore(a);e._hasGetAll="getAll"in i;for(let e=0;e<i.indexNames.length;++e){let t=i.indexNames[e],r=i.index(t).keyPath,o="string"==typeof r?r:"["+iA(r).join("+")+"]";if(n[a]){let e=n[a].idxByName[o];e&&(e.name=t,delete n[a].idxByName[o],n[a].idxByName[t]=e)}}}"u">typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&is.WorkerGlobalScope&&is instanceof is.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class l1{_parseStoresSpec(e,n){il(e).forEach(t=>{if(null!==e[t]){var r=e[t].split(",").map((e,n)=>{let t=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(t)?t.match(/^\[(.*)\]$/)[1].split("+"):t;return lj(t,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),ic(r),0===n)}),o=r.shift();if(o.multi)throw new i2.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new i2.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new i2.Schema("Index must have a name and cannot be an empty string")}),n[t]=lF(t,o,r)}})}stores(e){let n=this.db;this._cfg.storesSource=this._cfg.storesSource?ip(this._cfg.storesSource,e):e;let t=n._versions,r={},o={};return t.forEach(e=>{ip(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)}),n._dbSchema=o,lK(n,[n._allTables,n,n.Transaction.prototype]),lH(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],il(o),o),n._storeNames=il(o),this}upgrade(e){return this._cfg.contentUpgrade=sr(this._cfg.contentUpgrade||i4,e),this}}function l2(e,n){let t=e._dbNamesDB;return t||(t=e._dbNamesDB=new cu(lr,{addons:[],indexedDB:e,IDBKeyRange:n})).version(1).stores({dbnames:"name"}),t.table("dbnames")}function l3(e){return e&&"function"==typeof e.databases}function l5(e){return sU(function(){return s$.letThrough=!0,e()})}function l4(e){var n=n=>e.next(n),t=o(n),r=o(n=>e.throw(n));function o(e){return n=>{var o=e(n),a=o.value;return o.done?a:a&&"function"==typeof a.then?a.then(t,r):ic(a)?Promise.all(a).then(t,r):t(a)}}return o(n)()}function l6(e,n,t){var r=arguments.length;if(r<2)throw new i2.InvalidArgument("Too few arguments");for(var o=Array(r-1);--r;)o[r-1]=arguments[r];return t=o.pop(),[e,iM(o),t]}function l7(e,n,t){let r=ic(e)?e.slice():[e];for(let e=0;e<t;++e)r.push(n);return r}let l8={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(n){let t=e.table(n),{schema:r}=t,o={},a=[];function i(e,n,t){let r=lU(e),s=o[r]=o[r]||[],l=null==e?0:"string"==typeof e?1:e.length,c=n>0,p={...t,isVirtual:c,keyTail:n,keyLength:l,extractKey:lW(e),unique:!c&&t.unique};return s.push(p),p.isPrimaryKey||a.push(p),l>1&&i(2===l?e[0]:e.slice(0,l-1),n+1,t),s.sort((e,n)=>e.keyTail-n.keyTail),p}let s=i(r.primaryKey.keyPath,0,r.primaryKey);for(let e of(o[":id"]=[s],r.indexes))i(e.keyPath,0,e);function l(n){var t,r;let o=n.query.index;return o.isVirtual?{...n,query:{index:o,range:(t=n.query.range,r=o.keyTail,{type:1===t.type?2:t.type,lower:l7(t.lower,t.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:l7(t.upper,t.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}:n}return{...t,schema:{...r,primaryKey:s,indexes:a,getIndexByKeyPath:function(e){let n=o[lU(e)];return n&&n[0]}},count:e=>t.count(l(e)),query:e=>t.query(l(e)),openCursor(n){let{keyTail:r,isVirtual:o,keyLength:a}=n.query.index;return o?t.openCursor(l(n)).then(t=>t&&Object.create(t,{continue:{value:function(o){null!=o?t.continue(l7(o,n.reverse?e.MAX_KEY:e.MIN_KEY,r)):n.unique?t.continue(t.key.slice(0,a).concat(n.reverse?e.MIN_KEY:e.MAX_KEY,r)):t.continue()}},continuePrimaryKey:{value(n,o){t.continuePrimaryKey(l7(n,e.MAX_KEY,r),o)}},primaryKey:{get:()=>t.primaryKey},key:{get(){let e=t.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:()=>t.value}})):t.openCursor(n)}}}}}};function l9(e,n,t,r){return t=t||{},r=r||"",il(e).forEach(o=>{if(ih(n,o)){var a=e[o],i=n[o];if("object"==typeof a&&"object"==typeof i&&a&&i){let e=iB(a);e!==iB(i)?t[r+o]=n[o]:"Object"===e?l9(a,i,t,r+o+"."):a!==i&&(t[r+o]=n[o])}else a!==i&&(t[r+o]=n[o])}else t[r+o]=void 0}),il(n).forEach(o=>{ih(e,o)||(t[r+o]=n[o])}),t}let ce={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(n){let t=e.table(n),{primaryKey:r}=t.schema;return{...t,mutate(e){let o=s$.trans,{deleting:a,creating:i,updating:s}=o.table(n).hook;switch(e.type){case"add":if(i.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"put":if(i.fire===i4&&s.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"delete":if(a.fire===i4)break;return o._promise("readwrite",()=>l(e),!0);case"deleteRange":if(a.fire===i4)break;return o._promise("readwrite",()=>(function e(n,o,a){return t.query({trans:n,values:!1,query:{index:r,range:o},limit:a}).then(({result:t})=>l({type:"delete",keys:t,trans:n}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):t.length<a?{failures:[],numFailures:0,lastResult:void 0}:e(n,{...o,lower:t[t.length-1],lowerOpen:!0},a)))})(e.trans,e.range,1e4),!0)}return t.mutate(e);function l(e){var n,o;let l=s$.trans,c=e.keys||("delete"===(n=e).type?n.keys:n.keys||n.values.map(r.extractKey));if(!c)throw Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:c}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),("add"===(o=e).type?Promise.resolve([]):t.getMany({trans:o.trans,keys:c,cache:"immutable"})).then(n=>{let o=c.map((t,o)=>{let c=n[o],p={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(p,t,c,l);else if("add"===e.type||void 0===c){let n=i.fire.call(p,t,e.values[o],l);null==t&&null!=n&&(t=n,e.keys[o]=t,r.outbound||iS(e.values[o],r.keyPath,t))}else{let n=l9(c,e.values[o]),r=s.fire.call(p,n,t,c,l);if(r){let n=e.values[o];Object.keys(r).forEach(e=>{ih(n,e)?n[e]=r[e]:iS(n,e,r[e])})}}return p});return t.mutate(e).then(({failures:t,results:r,numFailures:a,lastResult:i})=>{for(let a=0;a<c.length;++a){let i=r?r[a]:c[a],s=o[a];null==i?s.onerror&&s.onerror(t[a]):s.onsuccess&&s.onsuccess("put"===e.type&&n[a]?e.values[a]:i)}return{failures:t,results:r,numFailures:a,lastResult:i}}).catch(e=>(o.forEach(n=>n.onerror&&n.onerror(e)),Promise.reject(e)))})}}}}})};function cn(e,n,t){try{if(!n||n.keys.length<e.length)return null;let r=[];for(let o=0,a=0;o<n.keys.length&&a<e.length;++o)0===l_(n.keys[o],e[a])&&(r.push(t?iN(n.values[o]):n.values[o]),++a);return r.length===e.length?r:null}catch(e){return null}}let ct={stack:"dbcore",level:-1,create:e=>({table:n=>{let t=e.table(n);return{...t,getMany:e=>{if(!e.cache)return t.getMany(e);let n=cn(e.keys,e.trans._cache,"clone"===e.cache);return n?sx.resolve(n):t.getMany(e).then(n=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?iN(n):n},n))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),t.mutate(e))}}})};function cr(e){return!("from"in e)}let co=function(e,n){if(!this){let n=new co;return e&&"d"in e&&ip(n,e),n}ip(this,arguments.length?{d:1,from:e,to:arguments.length>1?n:e}:{d:0})};function ca(e,n,t){let r=l_(n,t);if(isNaN(r))return;if(r>0)throw RangeError();if(cr(e))return ip(e,{from:n,to:t,d:1});let o=e.l,a=e.r;if(0>l_(t,e.from))return o?ca(o,n,t):e.l={from:n,to:t,d:1,l:null,r:null},cl(e);if(l_(n,e.to)>0)return a?ca(a,n,t):e.r={from:n,to:t,d:1,l:null,r:null},cl(e);0>l_(n,e.from)&&(e.from=n,e.l=null,e.d=a?a.d+1:1),l_(t,e.to)>0&&(e.to=t,e.r=null,e.d=e.l?e.l.d+1:1);let i=!e.r;o&&!e.l&&ci(e,o),a&&i&&ci(e,a)}function ci(e,n){cr(n)||function e(n,{from:t,to:r,l:o,r:a}){ca(n,t,r),o&&e(n,o),a&&e(n,a)}(e,n)}function cs(e){let n=cr(e)?null:{s:0,n:e};return{next(e){let t=arguments.length>0;for(;n;)switch(n.s){case 0:if(n.s=1,t)for(;n.n.l&&0>l_(e,n.n.from);)n={up:n,n:n.n.l,s:1};else for(;n.n.l;)n={up:n,n:n.n.l,s:1};case 1:if(n.s=2,!t||0>=l_(e,n.n.to))return{value:n.n,done:!1};case 2:if(n.n.r){n.s=3,n={up:n,n:n.n.r,s:0};continue}case 3:n=n.up}return{done:!0}}}}function cl(e){var n,t;let r=((null==(n=e.r)?void 0:n.d)||0)-((null==(t=e.l)?void 0:t.d)||0),o=r>1?"r":r<-1?"l":"";if(o){let n="r"===o?"l":"r",t={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],t[o]=r[n],e[n]=t,t.d=cc(t)}e.d=cc(e)}function cc({r:e,l:n}){return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1}im(co.prototype,{add(e){return ci(this,e),this},addKey(e){return ca(this,e,e),this},addKeys(e){return e.forEach(e=>ca(this,e,e)),this},[ij](){return cs(this)}});let cp={stack:"dbcore",level:0,create:e=>{let n=e.schema.name,t=new co(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{let o=e.table(r),{schema:a}=o,{primaryKey:i}=a,{extractKey:s,outbound:l}=i,c={...o,mutate:e=>{let i=e.trans,s=i.mutatedParts||(i.mutatedParts={}),l=e=>{let t=`idb://${n}/${r}/${e}`;return s[t]||(s[t]=new co)},c=l(""),p=l(":dels"),{type:u}=e,[d,f]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],h=e.trans._cache;return o.mutate(e).then(e=>{if(ic(d)){"delete"!==u&&(d=e.results),c.addKeys(d);let n=cn(d,h);n||"add"===u||p.addKeys(d),(n||f)&&a.indexes.forEach(function(e){let t=l(e.name||"");function r(n){return null!=n?e.extractKey(n):null}let o=n=>e.multiEntry&&ic(n)?n.forEach(e=>t.addKey(e)):t.addKey(n);(n||f).forEach((e,t)=>{let a=n&&r(n[t]),i=f&&r(f[t]);0!==l_(a,i)&&(null!=a&&o(a),null!=i&&o(i))})})}else if(d){let e={from:d.lower,to:d.upper};p.add(e),c.add(e)}else c.add(t),p.add(t),a.indexes.forEach(e=>l(e.name).add(t));return e})}},p=({query:{index:n,range:t}})=>{var r,o;return[n,new co(null!=(r=t.lower)?r:e.MIN_KEY,null!=(o=t.upper)?o:e.MAX_KEY)]},u={get:e=>[i,new co(e.key)],getMany:e=>[i,(new co).addKeys(e.keys)],count:p,query:p,openCursor:p};return il(u).forEach(e=>{c[e]=function(a){let{subscr:i}=s$;if(i){let c=e=>{let t=`idb://${n}/${r}/${e}`;return i[t]||(i[t]=new co)},p=c(""),d=c(":dels"),[f,h]=u[e](a);if(c(f.name||"").add(h),!f.isPrimaryKey){if("count"!==e){let n="query"===e&&l&&a.values&&o.query({...a,values:!1});return o[e].apply(this,arguments).then(t=>{if("query"===e){if(l&&a.values)return n.then(({result:e})=>(p.addKeys(e),t));let e=a.values?t.result.map(s):t.result;a.values?p.addKeys(e):d.addKeys(e)}else if("openCursor"===e){let e=a.values;return t&&Object.create(t,{key:{get:()=>(d.addKey(t.primaryKey),t.key)},primaryKey:{get(){let e=t.primaryKey;return d.addKey(e),e}},value:{get:()=>(e&&p.addKey(t.primaryKey),t.value)}})}return t})}d.add(t)}}return o[e].apply(this,arguments)}}),c}}}};class cu{constructor(e,n){var t;this._middlewares={},this.verno=0;const r=cu.dependencies;this._options=n={addons:cu.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:o}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:i4,dbReadyPromise:null,cancelOpen:i4,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new sx(e=>{a.dbReadyResolve=e}),a.openCanceller=new sx((e,n)=>{a.cancelOpen=n}),this._state=a,this.name=e,this.on=lp(this,"populate","blocked","versionchange","close",{ready:[sr,i4]}),this.on.ready.subscribe=iw(this.on.ready.subscribe,e=>(n,t)=>{cu.vip(()=>{let r=this._state;if(r.openComplete)r.dbOpenError||sx.resolve().then(n),t&&e(n);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(n),t&&e(n);else{e(n);let r=this;t||e(function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)})}})}),this.Collection=(t=this,lu(lA.prototype,function(e,n){this.db=t;let r=ls,o=null;if(n)try{r=n()}catch(e){o=e}let a=e._ctx,i=a.table,s=i.hook.reading.fire;this._ctx={table:i,index:a.index,isPrimKey:!a.index||i.schema.primKey.keyPath&&a.index===i.schema.primKey.name,range:r,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:s!==i6?s:null}})),this.Table=function(e){return lu(lc.prototype,function(n,t,r){this.db=e,this._tx=r,this.name=n,this.schema=t,this.hook=e._allTables[n]?e._allTables[n].hook:lp(null,{creating:[i9,i4],reading:[i7,i6],updating:[sn,i4],deleting:[se,i4]})})}(this),this.Transaction=function(e){return lu(lB.prototype,function(n,t,r,o,a){this.db=e,this.mode=n,this.storeNames=t,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=lp(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new sx((e,n)=>{this._resolve=e,this._reject=n}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var n=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):n&&this.idbtrans&&this.idbtrans.abort(),s5(e)})})}(this),this.Version=function(e){return lu(l1.prototype,function(n){this.db=e,this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return lu(lM.prototype,function(n,t,r){this.db=e,this._ctx={table:n,index:":id"===t?null:t,or:r};let o=e._deps.indexedDB;if(!o)throw new i2.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,n)=>o.cmp(n,e),this._max=(e,n)=>o.cmp(e,n)>0?e:n,this._min=(e,n)=>0>o.cmp(e,n)?e:n,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=lL(n.IDBKeyRange),this._createTransaction=(e,n,t,r)=>new this.Transaction(e,n,t,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),le.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(n=>n.on("versionchange").fire(e))},this.use(l8),this.use(ce),this.use(cp),this.use(ct),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new i2.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new i2.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);let n=this._versions;var t=n.filter(n=>n._cfg.version===e)[0];return t||(t=new this.Version(e),n.push(t),n.sort(lY),t.stores({}),this._state.autoSchema=!1,t)}_whenReady(e){return this.idbdb&&(this._state.openComplete||s$.letThrough||this._vip)?e():new sx((e,n)=>{if(this._state.openComplete)return n(new i2.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void n(new i2.DatabaseClosed);this.open().catch(i4)}this._state.dbReadyPromise.then(e,n)}).then(e)}use({stack:e,create:n,level:t,name:r}){r&&this.unuse({stack:e,name:r});let o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:n,level:null==t?10:t,name:r}),o.sort((e,n)=>e.level-n.level),this}unuse({stack:e,name:n,create:t}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>t?e.create!==t:!!n&&e.name!==n)),this}open(){return function(e){var n;let t=e._state,{indexedDB:r}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?s5(t.dbOpenError):e);iV&&(t.openCanceller._stackHolder=iq()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;let o=t.openCanceller;function a(){if(t.openCanceller!==o)throw new i2.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,l=!1;return sx.race([o,("u"<typeof navigator?sx.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e){var t=function(){return indexedDB.databases().finally(e)};n=setInterval(t,100),t()}).finally(function(){return clearInterval(n)}):Promise.resolve()).then(()=>new sx((n,o)=>{if(a(),!r)throw new i2.MissingAPI;let i=e.name,c=t.autoSchema?r.open(i):r.open(i,Math.round(10*e.verno));if(!c)throw new i2.MissingAPI;c.onerror=lP(o),c.onblocked=sj(e._fireOnBlocked),c.onupgradeneeded=sj(n=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=lT,s.abort(),c.result.close();let e=r.deleteDatabase(i);e.onsuccess=e.onerror=sj(()=>{o(new i2.NoSuchDatabase(`Database ${i} doesnt exist`))})}else{let t,r,i,d;s.onerror=lP(o);var a,p,u=n.oldVersion>0x4000000000000000?0:n.oldVersion;l=u<1,e._novip.idbdb=c.result,a=u/10,p=s,t=e._dbSchema,(r=e._createTransaction("readwrite",e._storeNames,t)).create(p),r._completion.catch(o),i=r._reject.bind(r),d=s$.transless||s$,sU(()=>{s$.trans=r,s$.transless=d,0===a?(il(t).forEach(e=>{lJ(p,e,t[e].primKey,t[e].indexes)}),lq(e,p),sx.follow(()=>e.on.populate.fire(r)).catch(i)):(function({_novip:e},n,t,r){let o=[],a=e._versions,i=e._dbSchema=lQ(e,e.idbdb,r),s=!1;return a.filter(e=>e._cfg.version>=n).forEach(a=>{o.push(()=>{let o=i,l=a._cfg.dbschema;l0(e,o,r),l0(e,l,r),i=e._dbSchema=l;let c=lZ(o,l);c.add.forEach(e=>{lJ(r,e[0],e[1].primKey,e[1].indexes)}),c.change.forEach(e=>{if(e.recreate)throw new i2.Upgrade("Not yet support for changing primary key");{let n=r.objectStore(e.name);e.add.forEach(e=>lX(n,e)),e.change.forEach(e=>{n.deleteIndex(e.name),lX(n,e)}),e.del.forEach(e=>n.deleteIndex(e))}});let p=a._cfg.contentUpgrade;if(p&&a._cfg.version>n){let n;lq(e,r),t._memoizedTables={},s=!0;let a=iD(l);c.del.forEach(e=>{a[e]=o[e]}),lK(e,[e.Transaction.prototype]),lH(e,[e.Transaction.prototype],il(a),a),t.schema=a;let i=iW(p);i&&sq();let u=sx.follow(()=>{if((n=p(t))&&i){var e=sH.bind(null,null);n.then(e,e)}});return n&&"function"==typeof n.then?sx.resolve(n):u.then(()=>n)}}),o.push(n=>{var r;s&&ln||(r=a._cfg.dbschema,[].slice.call(n.db.objectStoreNames).forEach(e=>null==r[e]&&n.db.deleteObjectStore(e))),lK(e,[e.Transaction.prototype]),lH(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),t.schema=e._dbSchema})}),(function e(){return o.length?sx.resolve(o.shift()(t.idbtrans)).then(e):sx.resolve()})().then(()=>{var e;il(e=i).forEach(n=>{r.db.objectStoreNames.contains(n)||lJ(r,n,e[n].primKey,e[n].indexes)})})})(e,a,r,p).catch(i)})}},o),c.onsuccess=sj(()=>{s=null;let r=e._novip.idbdb=c.result,o=iA(r.objectStoreNames);if(o.length>0)try{let n,a=r.transaction(1===o.length?o[0]:o,"readonly");t.autoSchema?function({_novip:e},n,t){e.verno=n.version/10;let r=e._dbSchema=lQ(0,n,t);e._storeNames=iA(n.objectStoreNames,0),lH(e,[e._allTables],il(r),r)}(e,r,a):(l0(e,e._dbSchema,a),((n=lZ(lQ(0,e.idbdb,a),e._dbSchema)).add.length||n.change.some(e=>e.add.length||e.change.length))&&console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),lq(e,a)}catch(e){}le.push(e),r.onversionchange=sj(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),r.onclose=sj(n=>{e.on("close").fire(n)}),l&&function({indexedDB:e,IDBKeyRange:n},t){l3(e)||t===lr||l2(e,n).put({name:t}).catch(i4)}(e._deps,i),n()},o)}))]).then(()=>(a(),t.onReadyBeingFired=[],sx.resolve(l5(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(sr,i4);return t.onReadyBeingFired=[],sx.resolve(l5(()=>r(e.vip))).then(n)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(n=>{t.dbOpenError=n;try{s&&s.abort()}catch(e){}return o===t.openCanceller&&e._close(),s5(n)}).finally(()=>{t.openComplete=!0,i()})}(this)}_close(){let e=this._state,n=le.indexOf(this);if(n>=0&&le.splice(n,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new sx(n=>{e.dbReadyResolve=n}),e.openCanceller=new sx((n,t)=>{e.cancelOpen=t})}close(){this._close();let e=this._state;this._options.autoOpen=!1,e.dbOpenError=new i2.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){let e=arguments.length>0,n=this._state;return new sx((t,r)=>{let o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=sj(()=>{!function({indexedDB:e,IDBKeyRange:n},t){l3(e)||t===lr||l2(e,n).delete(t).catch(i4)}(this._deps,this.name),t()}),e.onerror=lP(r),e.onblocked=this._fireOnBlocked};if(e)throw new i2.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){let e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return il(this._allTables).map(e=>this._allTables[e])}transaction(){let e=l6.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,n,t){let r,o,a=s$.trans;a&&a.db===this&&-1===e.indexOf("!")||(a=null);let i=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(o=n.map(e=>{var n=e instanceof this.Table?e.name:e;if("string"!=typeof n)throw TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return n}),"r"==e||e===lo)r=lo;else{if("rw"!=e&&e!=la)throw new i2.InvalidArgument("Invalid transaction mode: "+e);r=la}if(a){if(a.mode===lo&&r===la){if(!i)throw new i2.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");a=null}a&&o.forEach(e=>{if(a&&-1===a.storeNames.indexOf(e)){if(!i)throw new i2.SubTransaction("Table "+e+" not included in parent transaction.");a=null}}),i&&a&&!a.active&&(a=null)}}catch(e){return a?a._promise(null,(n,t)=>{t(e)}):s5(e)}let s=(function e(n,t,r,o,a){return sx.resolve().then(()=>{let i,s=s$.transless||s$,l=n._createTransaction(t,r,n._dbSchema,o);if(o)l.idbtrans=o.idbtrans;else try{l.create(),n._state.PR1398_maxLoop=3}catch(o){return o.name===i1.InvalidState&&n.isOpen()&&--n._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),n._close(),n.open().then(()=>e(n,t,r,null,a))):s5(o)}let c=iW(a);c&&sq();let p=sx.follow(()=>{if(i=a.call(l,l))if(c){var e=sH.bind(null,null);i.then(e,e)}else"function"==typeof i.next&&"function"==typeof i.throw&&(i=l4(i))},{trans:l,transless:s});return(i&&"function"==typeof i.then?sx.resolve(i).then(e=>l.active?e:s5(new i2.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):p.then(()=>i)).then(e=>(o&&l._resolve(),l._completion.then(()=>e))).catch(e=>(l._reject(e),s5(e)))})}).bind(null,this,r,o,a,t);return a?a._promise(r,s,"lock"):s$.trans?sQ(s$.transless,()=>this._whenReady(s)):this._whenReady(s)}table(e){if(!ih(this._allTables,e))throw new i2.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}let cd="u">typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class cf{constructor(e){this._subscribe=e}subscribe(e,n,t){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:n,complete:t})}[cd](){return this}}function ch(e,n){return il(n).forEach(t=>{ci(e[t]||(e[t]=new co),n[t])}),e}try{o={indexedDB:is.indexedDB||is.mozIndexedDB||is.webkitIndexedDB||is.msIndexedDB,IDBKeyRange:is.IDBKeyRange||is.webkitIDBKeyRange}}catch(e){o={indexedDB:null,IDBKeyRange:null}}function cm(e){let n=cg;try{cg=!0,lI.storagemutated.fire(e)}finally{cg=n}}im(cu,{...i5,delete:e=>new cu(e,{addons:[]}).delete(),exists:e=>new cu(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return(function({indexedDB:e,IDBKeyRange:n}){return l3(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==lr)):l2(e,n).toCollection().primaryKeys()})(cu.dependencies).then(e)}catch(e){return s5(new i2.MissingAPI)}},defineClass:()=>function(e){ip(this,e)},ignoreTransaction:e=>s$.trans?sQ(s$.transless,e):e(),vip:l5,async:function(e){return function(){try{var n=l4(e.apply(this,arguments));return n&&"function"==typeof n.then?n:sx.resolve(n)}catch(e){return s5(e)}}},spawn:function(e,n,t){try{var r=l4(e.apply(t,n||[]));return r&&"function"==typeof r.then?r:sx.resolve(r)}catch(e){return s5(e)}},currentTransaction:{get:()=>s$.trans||null},waitFor:function(e,n){let t=sx.resolve("function"==typeof e?cu.ignoreTransaction(e):e).timeout(n||6e4);return s$.trans?s$.trans.waitFor(t):t},Promise:sx,debug:{get:()=>iV,set:e=>{iV=e,iG="dexie"===e?()=>!0:lt}},derive:ib,extend:ip,props:im,override:iw,Events:lp,on:lI,liveQuery:function(e){let n,t=!1,r=new cf(r=>{let o=iW(e),a=!1,i={},s={},l={get closed(){return a},unsubscribe:()=>{a=!0,lI.storagemutated.unsubscribe(d)}};r.start&&r.start(l);let c=!1,p=!1;function u(){return il(s).some(e=>i[e]&&function(e,n){let t=cs(n),r=t.next();if(r.done)return!1;let o=r.value,a=cs(e),i=a.next(o.from),s=i.value;for(;!r.done&&!i.done;){if(0>=l_(s.from,o.to)&&l_(s.to,o.from)>=0)return!0;0>l_(o.from,s.from)?o=(r=t.next(s.from)).value:s=(i=a.next(o.from)).value}return!1}(i[e],s[e]))}let d=e=>{ch(i,e),u()&&f()},f=()=>{let h,m;if(c||a)return;i={};let g={},y=(o&&sq(),h=()=>sU(e,{subscr:g,trans:null}),m=s$.trans?sQ(s$.transless,h):h(),o&&m.then(sH,sH),m);p||(lI(lO,d),p=!0),c=!0,Promise.resolve(y).then(e=>{t=!0,n=e,c=!1,a||(u()?f():(i={},s=g,r.next&&r.next(e)))},e=>{c=!1,t=!1,r.error&&r.error(e),l.unsubscribe()})};return f(),l});return r.hasValue=()=>t,r.getValue=()=>n,r},extendObservabilitySet:ch,getByKeyPath:iE,setByKeyPath:iS,delByKeyPath:function(e,n){"string"==typeof n?iS(e,n,void 0):"length"in n&&[].map.call(n,function(n){iS(e,n,void 0)})},shallowClone:iD,deepClone:iN,getObjectDiff:l9,cmp:l_,asap:ix,minKey:s7,addons:[],connections:le,errnames:i1,dependencies:o,semVer:s4,version:s4.split(".").map(e=>parseInt(e)).reduce((e,n,t)=>e+n/Math.pow(10,2*t))}),cu.maxKey=lL(cu.dependencies.IDBKeyRange),"u">typeof dispatchEvent&&"u">typeof addEventListener&&(lI(lO,e=>{if(!cg){let n;ln?(n=document.createEvent("CustomEvent")).initCustomEvent(lN,!0,!0,e):n=new CustomEvent(lN,{detail:e}),cg=!0,dispatchEvent(n),cg=!1}}),addEventListener(lN,({detail:e})=>{cg||cm(e)}));let cg=!1;if("u">typeof BroadcastChannel){let e=new BroadcastChannel(lN);"function"==typeof e.unref&&e.unref(),lI(lO,n=>{cg||e.postMessage(n)}),e.onmessage=e=>{e.data&&cm(e.data)}}else if("u">typeof self&&"u">typeof navigator){lI(lO,e=>{try{cg||("u">typeof localStorage&&localStorage.setItem(lN,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:lN,changedParts:e})))}catch(e){}}),"u">typeof addEventListener&&addEventListener("storage",e=>{if(e.key===lN){let n=JSON.parse(e.newValue);n&&cm(n.changedParts)}});let e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===lN&&cm(e.changedParts)})}function cy(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}sx.rejectionMapper=function(e,n){if(!e||e instanceof iJ||e instanceof TypeError||e instanceof SyntaxError||!e.name||!i3[e.name])return e;var t=new i3[e.name](n||e.message,e);return"stack"in e&&iy(t,"stack",{get:function(){return this.inner.stack}}),t},iG=lt;class cb extends cu{constructor(){super("EsmOffline"),cy(this,"syncQueue",void 0),cy(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function c_(){return new cb}let cv=new cb,c$={},cA=G("offline-synchronization",{});function cw(){return cA}async function ck(){if(cA.getState().synchronization)return;let e=await cv.syncQueue.count(),n={},t=Object.entries(c$),r=t.length,o={},a=new AbortController,i=()=>{let e=cA.getState().synchronization;cA.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{cA.setState({synchronization:{totalCount:e,pendingCount:e,abortController:a}});for(let e=0;e<r&&t.length>0;e++)for(let e=t.length;e--;){let[r,s]=t[e],l=s.dependsOn.map(e=>n[e]);l.every(Boolean)&&(o[r]={},await Promise.all(l),n[r]=cx(s,o,a,i),t.splice(e,1))}await Promise.allSettled(Object.values(n))}finally{cA.setState({synchronization:void 0})}}async function cx({type:e,dependsOn:n,process:t},r,o,a){let i=[],s=[],l=await cC();await cv.syncQueue.where({type:e,userId:l}).each((e,n)=>{i.push([n.primaryKey,e.content,e.descriptor]),s.push(e.content)});for(let c=0;c<i.length;c++){let[p,u,{id:d,dependencies:f=[]}]=i[c];try{let a=await t(u,{abort:o,index:c,items:s,userId:l,dependencies:f.map(({id:e,type:t})=>n.includes(t)?r[t][e]:void 0)});void 0!==d&&(r[e][d]=a),await cv.syncQueue.delete(p)}catch(e){await cv.syncQueue.update(p,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{a()}}}async function cC(){let e=await oq();return e?.uuid||"*"}async function cE(e,n,t,r){let o=r&&r.id;return void 0!==o&&await cv.syncQueue.where({type:n,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(cu.errnames.DatabaseClosed),await cv.syncQueue.add({type:n,content:t,userId:e,descriptor:r||{},createdOn:new Date}).catch(cu.errnames.DatabaseClosed,()=>-1)}async function cS(e,n,t){let r=await cC();return await cE(r,e,n,t)}async function cD(e,n){return(await cz(e,n)).map(e=>e.content)}async function cz(e,n){return await cv.syncQueue.where(n?{type:n,userId:e}:{userId:e}).toArray().catch(cu.errnames.DatabaseClosed,()=>[])}async function cM(e){let n=await cC();return await cD(n,e)}async function cP(e){let n=await cC();return await cz(n,e)}async function cT(e){return await cv.syncQueue.get(e).catch(cu.errnames.DatabaseClosed,()=>void 0)}function cO(e){return!!c$[e]?.options.onBeginEditSyncItem}async function cN(e){let n=await cT(e);if(!n)throw Error(`No sync item with the ID ${e} exists.`);let t=c$[n.type]?.options.onBeginEditSyncItem;if(!t)throw Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${n.type}" supports editing items.`);t(n)}async function cI(e){await cv.syncQueue.delete(e).catch(cu.errnames.DatabaseClosed)}function cB(e,n,t,r={}){c$[e]={type:e,dependsOn:n,process:t,options:r}}let cj="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cR=new Uint8Array(16),cF=[];for(let e=0;e<256;++e)cF.push((e+256).toString(16).slice(1));let cL=function(e,n,t){if(cj&&!n&&!e)return cj();let r=(e=e||{}).random||(e.rng||function(){if(!a&&!(a="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(cR)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,n){t=t||0;for(let e=0;e<16;++e)n[t+e]=r[e];return n}return function(e,n=0){return cF[e[n+0]]+cF[e[n+1]]+cF[e[n+2]]+cF[e[n+3]]+"-"+cF[e[n+4]]+cF[e[n+5]]+"-"+cF[e[n+6]]+cF[e[n+7]]+"-"+cF[e[n+8]]+cF[e[n+9]]+"-"+cF[e[n+10]]+cF[e[n+11]]+cF[e[n+12]]+cF[e[n+13]]+cF[e[n+14]]+cF[e[n+15]]}(r)},cW="OFFLINE+";function cV(){return cW+cL()}function cG(e){return e.startsWith(cW)}let cU={};function cq(){return Object.values(cU)}function cH(e){cU[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),cU[e.id]=e}async function cK(e){let n=await c2();return await cY(n,e)}async function cY(e,n){let t=new cb;return await t.dynamicOfflineData.where(n?{type:n,users:e}:{users:e}).toArray().catch(cu.errnames.DatabaseClosed,()=>[])}async function cZ(e,n){let t=await c2();return await cJ(t,e,n)}async function cJ(e,n,t){let r=new cb,o=await r.dynamicOfflineData.get({type:n,identifier:t}).catch(cu.errnames.DatabaseClosed,()=>void 0);o?o.users.includes(e)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(cu.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:n,identifier:t}).catch(cu.errnames.DatabaseClosed)}async function cX(e,n){let t=await c2();return await cQ(t,e,n)}async function cQ(e,n,t){let r=new cb,o=await r.dynamicOfflineData.get({type:n,identifier:t,users:e}).catch(cu.errnames.DatabaseClosed,()=>void 0);o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(n=>n!==e)}).catch(cu.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(cu.errnames.DatabaseClosed))}async function c0(e,n){let t=await cK(e);await Promise.all(t.map(async e=>c1(e.type,e.identifier,n)))}async function c1(e,n,t){await cZ(e,n);let r=new cb,o=await c2(),a=await r.dynamicOfflineData.get({type:e,identifier:n}).catch(cu.errnames.DatabaseClosed,()=>void 0),i=cq().filter(n=>n.type===e);if(!a)return;let s=await Promise.all(i.map(async e=>{try{return e.sync(n,t),{id:e.id,error:void 0}}catch(t){let n=t.message?.toString()??t.toString();return{id:e.id,error:n}}})),l=s.filter(e=>!e.error).map(e=>e.id),c=s.filter(e=>e.error).map(e=>e.id),p=s.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),u={syncedOn:new Date,syncedBy:o,succeededHandlers:l,erroredHandlers:c,errors:p};a.id&&await r.dynamicOfflineData.update(a.id,{syncState:u}).catch(cu.errnames.DatabaseClosed)}async function c2(){let e=(await oq()).uuid;if(!e)throw Error("Using the dynamic offline data API requires a logged in user.");return e}let c3=G("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function c5(){return c7(),c3}function c4(e,n){c7(),cH({type:"patient",displayName:n.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,t)=>n.onOfflinePatientAdded({patientUuid:e,signal:t??new AbortController().signal})})}async function c6(e){c7(),await c1("patient",e)}function c7(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}async function c8(e,n,t=!0){if(e){let r=null,[o,a]=await Promise.all([oN(`${oP}/Patient/${e}`,n).catch(e=>r=e),t?c9(e):Promise.resolve(null)]);if(o.ok)return o.data;if(a)return a;if(r)throw r}return null}async function c9(e){let n=(await cM("patient-registration")).find(n=>n.fhirPatient.id===e);return n?.fhirPatient??null}function pe(e,n){let t=new CustomEvent(`openmrs:${e}`,{detail:n??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(t)}function pn(e,n){let t=e=>{n("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,t),()=>{window.removeEventListener(`openmrs:${e}`,t)}}var pt=t(9549);function pr(e){return{uuid:e.uuid,display:e.display}}function po(e=null,n=null){let t=new URLSearchParams;e&&t.set("tag",e),n&&t.set("q",n);let r=t.toString();return oI(`${oM}/location${r?"?"+r:""}`).pipe((0,pt.map)(e=>e.data.results.map(pr))).pipe((0,pt.take)(1))}function pa(e){return{uuid:e.uuid,display:e.display,name:e.name}}function pi(){return oI(`${oM}/visittype`).pipe((0,pt.map)(e=>e.data.results.map(pa))).pipe((0,pt.take)(1))}var ps=((er={}).NEWVISIT="startVisit",er.EDITVISIT="editVisit",er.LOADING="loadingVisit",er),pl=((eo={}).NOTSTARTED="notStarted",eo.ONGOING="ongoing",eo);let pc="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",pp=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function pu(){return q("visit",pp)}function pd(e,n){pu().setState({patientUuid:e,manuallySetVisitUuid:n})}function pf(e,n){return oN(`${oM}/visit`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function ph(e,n,t){return oN(`${oM}/visit/${e}`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:n})}function pm(e,n,t){return oN(`${oM}/visit?patient=${e}&v=${t??pc}`,{signal:n.signal,method:"GET",headers:{"Content-type":"application/json"}})}pu().subscribe(e=>{var n;n=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(n))});let pg=new es.BehaviorSubject(null);class py{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+py.version}static addUnaryOp(e){return py.max_unop_len=Math.max(e.length,py.max_unop_len),py.unary_ops[e]=1,py}static addBinaryOp(e,n,t){return py.max_binop_len=Math.max(e.length,py.max_binop_len),py.binary_ops[e]=n,t?py.right_associative.add(e):py.right_associative.delete(e),py}static addIdentifierChar(e){return py.additional_identifier_chars.add(e),py}static addLiteral(e,n){return py.literals[e]=n,py}static removeUnaryOp(e){return delete py.unary_ops[e],e.length===py.max_unop_len&&(py.max_unop_len=py.getMaxKeyLen(py.unary_ops)),py}static removeAllUnaryOps(){return py.unary_ops={},py.max_unop_len=0,py}static removeIdentifierChar(e){return py.additional_identifier_chars.delete(e),py}static removeBinaryOp(e){return delete py.binary_ops[e],e.length===py.max_binop_len&&(py.max_binop_len=py.getMaxKeyLen(py.binary_ops)),py.right_associative.delete(e),py}static removeAllBinaryOps(){return py.binary_ops={},py.max_binop_len=0,py}static removeLiteral(e){return delete py.literals[e],py}static removeAllLiterals(){return py.literals={},py}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new py(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return py.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!py.binary_ops[String.fromCharCode(e)]||py.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return py.isIdentifierStart(e)||py.isDecimalDigit(e)}throwError(e){let n=Error(e+" at character "+this.index);throw n.index=this.index,n.description=e,n}runHook(e,n){if(py.hooks[e]){let t={context:this,node:n};return py.hooks.run(e,t),t.node}return n}searchHook(e){if(py.hooks[e]){let n={context:this};return py.hooks[e].find(function(e){return e.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let e=this.code;for(;e===py.SPACE_CODE||e===py.TAB_CODE||e===py.LF_CODE||e===py.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),n=1===e.length?e[0]:{type:py.COMPOUND,body:e};return this.runHook("after-all",n)}gobbleExpressions(e){let n=[],t,r;for(;this.index<this.expr.length;)if((t=this.code)===py.SEMCOL_CODE||t===py.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())n.push(r);else if(this.index<this.expr.length){if(t===e)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,py.max_binop_len),n=e.length;for(;n>0;){if(py.binary_ops.hasOwnProperty(e)&&(!py.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!py.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=n,e;e=e.substr(0,--n)}return!1}gobbleBinaryExpression(){let e,n,t,r,o,a,i,s,l;if(!(a=this.gobbleToken())||!(n=this.gobbleBinaryOp()))return a;for(o={value:n,prec:py.binaryPrecedence(n),right_a:py.right_associative.has(n)},(i=this.gobbleToken())||this.throwError("Expected expression after "+n),r=[a,o,i];n=this.gobbleBinaryOp();){if(0===(t=py.binaryPrecedence(n))){this.index-=n.length;break}o={value:n,prec:t,right_a:py.right_associative.has(n)},l=n;let s=e=>o.right_a&&e.right_a?t>e.prec:t<=e.prec;for(;r.length>2&&s(r[r.length-2]);)i=r.pop(),n=r.pop().value,a=r.pop(),e={type:py.BINARY_EXP,operator:n,left:a,right:i},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(o,e)}for(s=r.length-1,e=r[s];s>1;)e={type:py.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,n,t,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,py.isDecimalDigit(e)||e===py.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===py.SQUOTE_CODE||e===py.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===py.OBRACK_CODE)r=this.gobbleArray();else{for(t=(n=this.expr.substr(this.index,py.max_unop_len)).length;t>0;){if(py.unary_ops.hasOwnProperty(n)&&(!py.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!py.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=t;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:py.UNARY_EXP,operator:n,argument:e,prefix:!0})}n=n.substr(0,--t)}py.isIdentifierStart(e)?(r=this.gobbleIdentifier(),py.literals.hasOwnProperty(r.name)?r={type:py.LITERAL,value:py.literals[r.name],raw:r.name}:r.name===py.this_str&&(r={type:py.THIS_EXP})):e===py.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let n=this.code;for(;n===py.PERIOD_CODE||n===py.OBRACK_CODE||n===py.OPAREN_CODE||n===py.QUMARK_CODE;){let t;if(n===py.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==py.PERIOD_CODE)break;t=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===py.OBRACK_CODE?((e={type:py.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(n=this.code)!==py.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===py.OPAREN_CODE?e={type:py.CALL_EXP,arguments:this.gobbleArguments(py.CPAREN_CODE),callee:e}:(n===py.PERIOD_CODE||t)&&(t&&this.index--,this.gobbleSpaces(),e={type:py.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),t&&(e.optional=!0),this.gobbleSpaces(),n=this.code}return e}gobbleNumericLiteral(){let e="",n,t;for(;py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===py.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(n=this.char)||"E"===n){for(e+=this.expr.charAt(this.index++),("+"===(n=this.char)||"-"===n)&&(e+=this.expr.charAt(this.index++));py.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);py.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return t=this.code,py.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(t===py.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===py.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:py.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",n=this.index,t=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let n=this.expr.charAt(this.index++);if(n===t){r=!0;break}if("\\"===n)switch(n=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=n}else e+=n}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:py.LITERAL,value:e,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let e=this.code,n=this.index;for(py.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,py.isIdentifierPart(e))this.index++;else break;return{type:py.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(e){let n=[],t=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===e){t=!0,this.index++,e===py.CPAREN_CODE&&r&&r>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===py.COMMA_CODE){if(this.index++,++r!==n.length){if(e===py.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===py.CBRACK_CODE)for(let e=n.length;e<r;e++)n.push(null)}}else if(n.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==py.COMPOUND||this.throwError("Expected comma"),n.push(e)}}return t||this.throwError("Expected "+String.fromCharCode(e)),n}gobbleGroup(){this.index++;let e=this.gobbleExpressions(py.CPAREN_CODE);if(this.code===py.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:py.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:py.ARRAY_EXP,elements:this.gobbleArguments(py.CBRACK_CODE)}}}Object.assign(py,{hooks:new class{add(e,n,t){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],n&&this[e][t?"unshift":"push"](n)},this)}run(e,n){this[e]=this[e]||[],this[e].forEach(function(e){e.call(n&&n.context?n.context:n,n)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(py),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),py.max_unop_len=py.getMaxKeyLen(py.unary_ops),py.max_binop_len=py.getMaxKeyLen(py.binary_ops);let pb=e=>new py(e).parse(),p_=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(py).filter(e=>!p_.includes(e)&&void 0===pb[e]).forEach(e=>{pb[e]=py[e]}),pb.Jsep=py,pb.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let t=n.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",test:t,consequent:r,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let r=t;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;n.node.test=r.right,r.right=n.node,n.node=t}}else this.throwError("Expected :")}})}});let pv="ArrowFunctionExpression",p$={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},pA={...p$,Promise};function pw(e,n={}){return pD(e,n,pP)}async function pk(e,n={}){return pz(e,n,pP)}function px(e,n={}){return pD(e,n,pT)}function pC(e,n={}){return pz(e,n,pT)}function pE(e,n={}){return pD(e,n,pO)}function pS(e,n={}){return pz(e,n,pO)}function pD(e,n={},t){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==n&&(n={});let r=pB(n,p$),o=pN("string"==typeof e?pb(e):e,r);if(t(o))return o;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function pz(e,n={},t){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==n&&(n={});let r=pB(n,pA);return Promise.resolve(pN("string"==typeof e?pb(e):e,r)).then(n=>{if(t(n))return n;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function pM(e){return pb(e)}function pP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function pT(e){return"boolean"==typeof e}function pO(e){return"number"==typeof e}function pN(e,n){switch(e.type){case"UnaryExpression":var t,r,o,a,i,s,l,c,p,u,d,f,h=e,m=n;let g=pN(h.argument,m);switch(h.operator){case"+":return+g;case"-":return-g;case"~":return~g;case"!":return!g;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var y=e,b=n;let v=pN(y.left,b),$=pN(y.right,b);switch(y.operator){case"+":return v+$;case"-":return v-$;case"*":return v*$;case"/":return v/$;case"%":return v%$;case"**":return v**$;case"==":return v==$;case"===":return v===$;case"!=":return v!=$;case"!==":return v!==$;case">":return v>$;case">=":return v>=$;case"<":return v<$;case"<=":return v<=$;case"in":return v in $;case"&&":return v&&$;case"||":return v||$;case"??":return v??$;default:throw`Expression evaluator does not support operator '${y.operator}' operator`}case"ConditionalExpression":return t=e,r=n,pN(t.test,r)?pN(t.consequent,r):pN(t.alternate,r);case"CallExpression":var A=e,w=n;let k=A.arguments?.map(pj(w)),x=pN(A.callee,w);if(x){if("function"!=typeof x)throw`${pF(A.callee)} is not a function`}else throw`No function named ${pF(A.callee)} is defined in this context`;return x(...k);case"ArrowFunctionExpression":let C;return o=e,a=n,C=o.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<C.length)throw`Required argument(s) ${C.slice(e.length,-1).join(", ")} were not provided`;let n=Object.fromEntries(C.reduce((n,t,r)=>{let o=e[r];return function e(n){if("string"==typeof n||"number"==typeof n||"boolean"==typeof n||"function"==typeof n||null===n||n instanceof RegExp)return!0;if("object"==typeof n){for(let t of Object.keys(n))if(!e(n[t]))return!1;return!0}if(Array.isArray(n)){for(let t of n)if(!e(t))break}return!1}(o)&&n.push([t,o]),n},[]));return pN(o.body,a.addVariables(n))}).bind(a.thisObj??null);case"MemberExpression":return function(e,n){let t,r=pN(e.object,n);if(void 0===r)switch(e.object.type){case"Identifier":{let t=pI(e.object,n);throw ReferenceError(`ReferenceError: ${t} is not defined`)}case"MemberExpression":{let t=pI(e.property,n);throw TypeError(`TypeError: cannot read properties of undefined (reading '${t}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let o=r;if("string"==typeof r)o=String.prototype;else if("number"==typeof r)o=Number.prototype;else if("function"==typeof r);else if("object"!=typeof r)throw`VisitMemberExpression does not support member access on type ${typeof r}`;switch(n.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":t=pN(e.property,n);break;default:{let o=pN(e.property,n);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};pR(o),t=r[o]}}return"function"==typeof t?t.bind(r):t}(e,n);case"ArrayExpression":return i=e,s=n,i.elements?.map(pj(s));case"SequenceExpression":let E;return l=e,c=n,(E=l.expressions.map(pj(c)))[E.length-1];case"NewExpression":var S=e,D=n;if(S.callee&&"Identifier"===S.callee.type){let e=S.arguments?.map(pj(D));switch(S.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${S.callee.name}`}}if(S.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return pR((p=e).value),p.value;case"Identifier":var z=e,M=n;pR(z.name);let P=M.thisObj;if(P&&("object"==typeof P||"function"==typeof P)&&z.name in P){let e=P[z.name];return pR(e),e}if(M.variables&&z.name in M.variables){let e=M.variables[z.name];return pR(e),e}return z.name in M.globals?M.globals[z.name]:void 0;case"TemplateLiteral":let T,O;return u=e,d=n,T=u.expressions?.map(pj(d))??[],(O=u.quasis?.map(pj(d))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+T.join("")+O.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function pI(e,n){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return pI(e.property,n);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function pB(e,n){let t={thisObj:void 0,variables:{...e},globals:{...n},addVariables(e){return this.variables={...this.variables,...e},this}};return t.addVariables.bind(t),t}function pj(e){return function(n){return null===n?null:pN(n,e)}}function pR(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function pF(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function pL(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let n={globals:{...pA},isLocalExpression:!1,variables:new Set};return pW("string"==typeof e?pb(e):e,n),[...n.variables]}function pW(e,n){switch(e.type){case"UnaryExpression":return r=e,o=n,pW(r.argument,o);case"BinaryExpression":return a=e,i=n,[pW(a.left,i),pW(a.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=n,[pW(s.consequent,l),pW(s.test,l),pW(s.alternate,l)].filter(Boolean);case"CallExpression":let t;return c=e,p=n,t=pW(c.callee,p),c.arguments?.map(pV(p)),t;case"ArrowFunctionExpression":var r,o,a,i,s,l,c,p,u,d,f,h,m,g,y,b,v,$,A=e,w=n;let k={...w};k.isLocalExpression=!0;let x=A.params?.map(pV(k))??[],C=pW(A.body,k)??[];if(C&&Array.isArray(C))for(let e of C)x.includes(e)||w.variables.add(e);return;case"MemberExpression":let E;return u=e,d=n,pW(u.object,d),void((E={...d}).isLocalExpression=!0,pW(u.property,E));case"ArrayExpression":return f=e,h=n,void f.elements?.map(pV(h));case"SequenceExpression":return m=e,g=n,void m.expressions?.map(pV(g));case"NewExpression":return y=e,b=n,void y.arguments?.map(pV(b));case"Literal":case"TemplateElement":return;case"Identifier":var S=e,D=n;if(!(S.name in D.globals))if(D.isLocalExpression)return S.name;else D.variables.add(S.name);return;case"TemplateLiteral":return v=e,$=n,void(v.expressions?.map(pV($)),v.quasis?.map(pV($)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function pV(e){return function(n){return null===n?null:pW(n,e)}}pb.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(n){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let t=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let t=this.gobbleBinaryExpression();t||this.throwError("Expected expression after "+e),n.node={type:pv,params:null,body:t};return}}this.index=t}}),e.hooks.add("after-expression",function(n){!function n(t){t&&(Object.values(t).forEach(e=>{e&&"object"==typeof e&&n(e)}),"=>"===t.operator&&(t.type=pv,t.params=t.left?[t.left]:null,t.body=t.right,t.params&&t.params[0].type===e.SEQUENCE_EXP&&(t.params=t.params[0].expressions),delete t.left,delete t.right,delete t.operator))}(n.node)})}}),pb.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(n){let t=n.node;if(t&&"new"===t.operator){t.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(t.argument.type)||this.throwError("Expected new function()"),n.node=t.argument;let r=n.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),pb.plugins.register({name:"numbers",init(e){function n(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function t(n){let t=this.index,r="",o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let a=this.char;("e"===a||"E"===a)&&(r+=this.expr.charAt(this.index++),("+"===(a=this.char)||"-"===a)&&(r+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(i===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:r},null,2)}`),this.index=t;return}n.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(t,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var o,a,i;let s=this.index,l=this.expr.charAt(this.index+1),c=n.call(this,l);if(!c)return;let p="";for(;o=this.code,a=c,95===o||a.some(([e,n])=>o>=e&&o<=n);)95===this.code?this.index++:p+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,t.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(p,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&t.call(this,r)})}}),pb.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(n){if(47===this.code){let t=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,o=this.expr.slice(t,this.index),a="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)a+=this.char;else break}try{r=new RegExp(o,a)}catch(e){this.throwError(e.message)}return n.node={type:e.LITERAL,value:r,raw:this.expr.slice(t-1,this.index)},n.node=this.gobbleTokenProperty(n.node),n.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),pb.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let t=n.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),n.node={type:"ConditionalExpression",test:t,consequent:r,alternate:o},t.operator&&e.binary_ops[t.operator]<=.9){let r=t;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;n.node.test=r.right,r.right=n.node,n.node=t}}else this.throwError("Expected :")}})}}),pb.plugins.register({name:"jsepTemplateLiteral",init(e){function n(e,t=!0){if(96===this.code){let n={type:"TemplateLiteral",quasis:[],expressions:[]},r="",o="",a=!1,i=this.expr.length,s=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:a});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,a=!0,s(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),o="",r="",n.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(o+=i,i=this.expr.charAt(++this.index),o+=i,i){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=i}else r+=i,o+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",n),e.hooks.add("after-token",function(t){if((t.node.type===e.IDENTIFIER||t.node.type===e.MEMBER_EXP)&&96===this.code)return t.node={type:"TaggedTemplateExpression",tag:t.node,quasi:n.bind(this)(t,!1)},t.node=this.gobbleTokenProperty(t.node),t.node})}}),pb.addBinaryOp("in",7),pb.addBinaryOp("??",1);let pG=q("feature-flags",{flags:function(){let e={};for(let n of Object.keys(localStorage))if(n.startsWith("openmrs:feature-flag:")){let t=n.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${t}`)||"{}");e[t]={enabled:"true"===localStorage.getItem(n),...r}}return e}()});function pU(e,n,t){pG.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:n,description:t}}}))}function pq(){let e=pG.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(n=>{let t=n.replace("openmrs:feature-flag:","");e[t]||(localStorage.removeItem(n),localStorage.removeItem(`openmrs:feature-flag-meta:${t}`))})}function pH(e){return pG.getState().flags[e].enabled}function pK(e,n){pG.subscribe(t=>{n(t.flags[e].enabled)})}function pY(e,n){pG.setState(t=>({flags:{...t.flags,[e]:{...t.flags[e],enabled:n}}}))}function pZ(e){return!window.offlineEnabled||(e??navigator.onLine)}pG.subscribe(e=>{for(let[n,t]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${n}`,t.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${n}`,JSON.stringify({label:t.label,description:t.description}))});var pJ=e9(function(e,n,t){e0(e,n,t)});function pX(e=!0,n=!1){return pQ(pZ(),e,n)}function pQ(e,n=!0,t=!1){return!!(e?n:t)}let p0=G("extensionsInternal",{slots:{},extensions:{}}),p1=()=>q("extensionsInternal",{slots:{},extensions:{}});function p2(e){let n=p0.getState(),t=e(n);t!==n&&p0.setState(t)}let p3=()=>q("extensions",{slots:{}});function p5(e){let n=[];for(let t of Object.values(e.extensions))for(let e of t.instances)n.push({slotModuleName:e.slotModuleName,extensionModuleName:t.moduleName,slotName:e.slotName,extensionId:e.id});(0,nn.A)(ta.getState().mountedExtensions,n)||ta.setState({mountedExtensions:n})}p5(p0.getState()),p0.subscribe(p5);let p4=p1(),p6=p3(),p7=ts(),p8=tp();function p9(e,n,t,r,o){let a={},i=pZ(),s=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,l]of Object.entries(e.slots)){let{config:c}=tc(n,l.name),p=up(r,e,c,t,s,i,o.session);a[r]={moduleName:l.moduleName,assignedExtensions:p}}(0,nn.A)(p6.getState().slots,a)||p6.setState({slots:a})}function ue(){p9(p4.getState(),p7.getState(),p8.getState(),pG.getState(),oj.getState())}function un(e,n,t){return{moduleName:n,name:e,attachedIds:[],config:null,state:t}}function ut(e){let[n]=e.split("#");return n}function ur(e,n){let t=ut(n);return e.extensions[t]}function uo(e){return ur(p4.getState(),e)}p4.subscribe(e=>{p9(e,p7.getState(),p8.getState(),pG.getState(),oj.getState())}),p7.subscribe(e=>{p9(p4.getState(),e,p8.getState(),pG.getState(),oj.getState())}),p8.subscribe(e=>{p9(p4.getState(),p7.getState(),e,pG.getState(),oj.getState())}),pG.subscribe(e=>{p9(p4.getState(),p7.getState(),p8.getState(),e,oj.getState())}),oj.subscribe(e=>{p9(p4.getState(),p7.getState(),p8.getState(),pG.getState(),e)}),ue(),g(ue);let ua=e=>p4.setState(n=>(n.extensions[e.name]={...e,instances:[]},n));function ui(e,n){p2(t=>{let r=t.slots[e];return r?{...t,slots:{...t.slots,[e]:{...r,attachedIds:[...r.attachedIds,n]}}}:{...t,slots:{...t.slots,[e]:{...un(e),attachedIds:[n]}}}})}function us(e,n){p2(t=>{let r=t.slots[e];return r&&r.attachedIds.includes(n)?{...t,slots:{...t.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==n)}}}:t})}function ul(e){p2(n=>{let t=n.slots[e];return t?{...n,slots:{...n.slots,[e]:{...t,attachedIds:[]}}}:n})}function uc(e,n,t,r){let o=n.indexOf(e);if(-1!==o)return o;{if(void 0!==t)return 1e3+t;let n=r.indexOf(e);return -1!==n?2e3+n:-1}}function up(e,n,t,r,o,a,i){let s=function(e,n){let t=e.add||[],r=e.remove||[],o=e.order||[],{extensions:a}=p4.getState();return[...n,...t].filter(e=>!r.includes(e)).sort((e,t)=>{let r=uc(e,o,a[ut(e)]?.order,n),i=uc(t,o,a[ut(t)]?.order,n);return -1===i?-1:-1===r?1:r-i})}(t,n.slots[e].attachedIds),l=[],c=n.slots[e]?.state,p=c&&"object"==typeof c?{session:i,...c}:{session:i};for(let c of s){let{config:s}=td(r,e,c),u=pJ(s,tf(t,e,c)),d=ut(c),f=n.extensions[d];if(f){let n=u?.["Display conditions"]?.privileges??f.privileges??[];if(n&&("string"==typeof n||Array.isArray(n)&&n.length>0)&&(!i?.user||!oU(n,i.user)))continue;let t=u?.["Display conditions"]?.expression||f.displayExpression;if(void 0!==t&&"string"==typeof t&&t.trim().length>0)try{if(!px(t,p))continue}catch(n){console.error(`Error while evaluating expression '${t}' for extension ${d} in slot ${e}`,n);continue}if(f.featureFlag&&!o.includes(f.featureFlag)||window.offlineEnabled&&!pQ(a,f.online,f.offline))continue;l.push({id:c,name:d,moduleName:f.moduleName,config:u,featureFlag:f.featureFlag,meta:f.meta,online:u?.["Display conditions"]?.online??f.online??!0,offline:u?.["Display conditions"]?.offline??f.offline??!1})}}return l}function uu(e){let n=p4.getState(),{config:t}=tl(e),r=p8.getState(),o=pG.getState(),a=oj.getState(),i=pZ();return up(e,n,t,r,Object.entries(o.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),i,a.session)}let ud=(e,n,t)=>p4.setState(r=>{let o=r.slots[n]?.moduleName;if(o&&o!=e)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${o}.`),r;if(o&&o==e)return r;if(r.slots[n])return{...r,slots:{...r.slots,[n]:{...r.slots[n],moduleName:e,state:t}}};let a=un(n,e,t);return{...r,slots:{...r.slots,[n]:{...a}}}});function uf(e,n,t=!1){p4.setState(r=>{let o=t?pJ(r.slots[e].state,n):n;return{...r,slots:{...r.slots,[e]:{...r.slots[e],state:o}}}})}let uh=()=>p6.setState(()=>({slots:{},extensions:{}})),um=G("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function ug({name:e,basePath:n,mode:t,componentContext:r,state:o}){um.setState({slotName:e,basePath:n,mode:t??"normal",componentContext:r,state:o})}function uy(e){um.getState().slotName===e&&um.setState(um.getInitialState(),!0)}let ub=G("modalRegistry",{modals:{}});function u_(e){ub.setState(n=>(n.modals[e.name]=e,n))}function uv(e){let n=ub.getState().modals[e];if(!n){let t=uo(e);t&&(n={name:e,load:t.load,moduleName:t.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),u_(n))}return n}let u$=G("workspaceRegistrations",{workspaces:{}}),uA=G("workspaceGroups",{workspaceGroups:{}});function uw(e){u$.setState(n=>({workspaces:{...n.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function uk(e){uA.setState(n=>{let t=n.workspaceGroups[e.name];return t?{workspaceGroups:{...n.workspaceGroups,[e.name]:{...t,members:Array.from(new Set([...t.members,...e.members]))}}}:{workspaceGroups:{...n.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let ux=new Set;function uC(e){let n=u$.getState().workspaces;if(n[e])return n[e];{let n=uo(e);if(n){var t;let r;return ux.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),ux.add(e)),{name:n.name,title:(t=n,"string"==typeof(r=t?.meta?.title)?r:r&&"object"==typeof r?o5(t.moduleName,r.key,r.default):t.name),moduleName:n.moduleName,preferredWindowSize:n.meta?.screenSize??"normal",load:n.load,type:n.meta?.type??"form",canHide:n.meta?.canHide??!1,canMaximize:n.meta?.canMaximize??!1,width:n.meta?.width??"narrow",groups:n.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function uE(e){let n=uA.getState().workspaceGroups;if(n[e])return n[e];throw Error(`No workspace group named '${e}' has been registered.`)}let uS=G("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function uD(e){let{registeredWorkspacesByName:n,registeredWindowsByName:t}=uS.getState(),r=n[e];if(r){let n=t[r.window];if(n)return n;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function uz(e){let{registeredGroupsByName:n,registeredWindowsByName:t}=uS.getState(),r=t[e];if(r){let t=n[r.group];if(t)return t;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function uM(e){let{openedWindows:n}=uS.getState();return n.findIndex(n=>n.openedWorkspaces.find(n=>n.workspaceName===e))}function uP(e,n){if(0==n.length)return;let{registeredGroupsByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace group ${t.name} more than once`);r[t.name]={...t,moduleName:e}}uS.setState({registeredGroupsByName:r})}function uT(e,n){if(0==n.length)return;let{registeredWindowsByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace window ${t.name} more than once`);let n={...t,moduleName:e};r[t.name]=n}uS.setState({registeredWindowsByName:r})}function uO(e,n){if(0==n.length)return;let{registeredWorkspacesByName:t}=uS.getState(),r={...t};for(let t of n){if(r[t.name])throw Error(`Cannot register workspace ${t.name} more than once`);let n={...t,moduleName:e};r[t.name]=n}uS.setState({registeredWorkspacesByName:r})}let uN=0;async function uI(e,n,t,r,o=e=>e,a={}){let i=ut(r),s=uo(r),l=null;if(e){if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${n}'`);let{meta:c,moduleName:p,online:u,offline:d,load:f}=s;if(pX(u,d)){p2(o=>({...o,extensions:{...o.extensions,[i]:{...o.extensions[i],instances:[...o.extensions[i].instances,{domElement:e,id:r,slotName:n,slotModuleName:t}]}}}));let s=await f(),u=uN++;l=rT(o({...s,name:`${n}/${i}-${u}`}),{...a,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:n,extensionSlotModuleName:t,extensionModuleName:p},domElement:e})}}else console.warn(`Tried to render ${r} into ${n} but no DOM element was available.`);return l}var uB=t(2491),uj=t.n(uB);let uR=(0,uB.createContext)({moduleName:"",featureName:""});function uF({to:e,templateParams:n,onBeforeNavigate:t,children:r,...o}){return(0,uB.useEffect)(()=>{o.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${o.href}'`),o.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),uj().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),t?.(r),o$({to:e,templateParams:n})),0===r.button&&(r.ctrlKey||r.metaKey)&&t?.(r),0===r.button&&r.shiftKey&&t?.(r),1===r.button&&t?.(r)},href:o_(e,n),...o},r)}let uL=({state:e,children:n,...t})=>{let{extension:r}=(0,uB.useContext)(uR),o=(0,uB.useRef)(null),a=(0,uB.useRef)(Promise.resolve()),i=(0,uB.useCallback)(n=>{r?.extensionSlotName&&r.extensionSlotModuleName&&r.extensionSlotModuleName&&!o.current&&uI(n,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(e=>{o.current=e})},[]);return(0,uB.useEffect)(()=>()=>{if(o&&o.current)switch(o.current.getStatus()){case"MOUNTING":o.current.mountPromise.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()});break;case"MOUNTED":o.current.unmount();break;case"UPDATING":a.current&&a.current.then(()=>{o.current?.getStatus()==="MOUNTED"&&o.current.unmount()})}},[]),(0,uB.useEffect)(()=>{o.current&&o.current.update&&"UNMOUNTING"!==o.current.getStatus()&&Promise.all([o.current.mountPromise,a.current]).then(()=>{o?.current?.getStatus()==="MOUNTED"&&o.current.update&&(a.current=o.current.update({...e}).catch(e=>{if(!(e instanceof Error)||!e.message.includes("minified message #32")||o.current?.getStatus()==="MOUNTED")throw e}))})},[e]),r?uj().createElement("div",{ref:i,"data-extension-id":r?.extensionId,style:{position:"relative"},...t}):null};function uW(e,n){"function"==typeof n&&(n=n(e));let t={};for(let[r,o]of Object.entries(n)){let n=function(...n){e.setState(e=>o(e,...n))};t[r]=n}return t}let uV=()=>e=>e;function uG(e,n=uV(),t){let r=(0,uB.useCallback)(n=>e.subscribe(n),[e]),o=(0,uB.useCallback)(()=>n(e.getState()),[e,n]),a=(0,uB.useSyncExternalStore)(r,o,o),i=(0,uB.useMemo)(()=>t?uW(e,t):{},[e,t]);return{...a,...i}}function uU(e,n){return uG(e,uV(),n)}function uq(e){return function(n){let t=(0,uB.useCallback)(n=>e.subscribe(n),[]),r=(0,uB.useCallback)(()=>e.getState(),[]),o=(0,uB.useSyncExternalStore)(t,r,r),a=(0,uB.useMemo)(()=>n?uW(e,n):{},[n]);return{...o,...a}}}let uH=e=>uG(p3(),n=>n.slots?.[e]);function uK(e){let n=uH(e);return n?.assignedExtensions??[]}function uY(e,n){let{moduleName:t}=(0,uB.useContext)(uR),r=(0,uB.useRef)(!0);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,uB.useEffect)(()=>{ud(t,e,n),r.current=!1},[]),(0,uB.useEffect)(()=>{r.current||uf(e,n)},[e,n]),{extensions:uK(e),extensionSlotName:e,extensionSlotModuleName:t}}function uZ(e){return e}function uJ({name:e,extensionSlotName:n,select:t=uZ,children:r,state:o,style:a,...i}){if(r&&o)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??n,l=(0,uB.useRef)(null),{extensions:c,extensionSlotModuleName:p}=uY(s,o),u=(0,uB.useMemo)(()=>t(c),[t,c]),d=(0,uB.useMemo)(()=>{if("function"==typeof r&&!uj().isValidElement(r))return u.map(e=>r(e,o))},[r,u]);return uj().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":p,style:{...a,position:"relative"},...i},s&&u?.map((e,n)=>uj().createElement(uR.Provider,{key:e.id,value:{moduleName:p,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:p}}},d?.[n]??("function"!=typeof r?r:null)??uj().createElement(uL,{state:o}))))}var uX=t(5873);function uQ(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function u0(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?uQ(Object(t),!0).forEach(function(n){var r,o,a;r=e,o=n,a=t[n],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uQ(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function u1(e){return(u1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u2(e){return(u2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u3(e,n){var t;if("function"!=typeof(t=n.domElement?function(){return n.domElement}:n.domElementGetter?n.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var n=e.appName||e.name;if(!n)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var t="single-spa-application:".concat(n);return function(){var e=document.getElementById(t);return e||((e=document.createElement("div")).id=t,document.body.appendChild(e)),e}}(n)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(n.name,"'. Expected a function, received ").concat(u2(t)));return function(){var e=t(n);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(n.name,"'. Expected HTMLElement, received ").concat(u2(e)));return e}}var u5=null;try{u5=require("react").createContext()}catch(e){}var u4={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function u6(e,n){return e.rootComponent?Promise.resolve():e.loadRootComponent(n).then(function(n){e.rootComponent=n})}function u7(e,n){return new Promise(function(t,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var n=e.version.slice(0,e.version.indexOf("."));try{return Number(n)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(n.name||n.appName||n.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(n.name||n.appName||n.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o,a=dn(e,n,function(){t(this)}),i=u3(e,n)(),s=function(e){var n=e.reactDom,t=e.renderType,r=e.elementToRender,o=e.domElement,a=n[t];if("function"!=typeof a)throw Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=a(o);return i.render(r),i;case"hydrateRoot":return a(o,r);default:return a(r,o),null}}({elementToRender:a,domElement:i,reactDom:de(e),renderType:"function"==typeof(o=e).renderType?o.renderType():o.renderType});e.domElements[n.name]=i,e.renderResults[n.name]=s})}function u8(e,n){return new Promise(function(t){e.unmountResolves[n.name]=t;var r=e.renderResults[n.name];r&&r.unmount?r.unmount():de(e).unmountComponentAtNode(e.domElements[n.name]),delete e.domElements[n.name],delete e.renderResults[n.name]})}function u9(e,n){return new Promise(function(t){e.updateResolves[n.name]||(e.updateResolves[n.name]=[]),e.updateResolves[n.name].push(t);var r=dn(e,n,null),o=e.renderResults[n.name];if(o&&o.render)o.render(r);else{var a=u3(e,n)();de(e).render(r,a)}})}function de(e){return e.ReactDOMClient||e.ReactDOM}function dn(e,n,t){var r=e.React.createElement(e.rootComponent,n),o=u5?e.React.createElement(u5.Provider,{value:n},r):r;return(e.errorBoundary||n.errorBoundary||e.errorBoundaryClass||n.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||n.errorBoundaryClass||function(e,n){function t(n){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},t.displayName="SingleSpaReactErrorBoundary(".concat(n.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||n.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},t.prototype.componentDidCatch=function(e,n){this.setState({caughtError:e,caughtErrorInfo:n})},t}(e,n),o=e.React.createElement(e.errorBoundaryClass,n,o)),o=e.React.createElement(e.SingleSpaRoot,u0(u0({},n),{},{mountFinished:t,updateFinished:function(){e.updateResolves[n.name]&&(e.updateResolves[n.name].forEach(function(e){return e()}),delete e.updateResolves[n.name])},unmountFinished:function(){e.unmountResolves[n.name]&&(e.unmountResolves[n.name](),delete e.unmountResolves[n.name])}}),o)}var dt=t(4011),dr=t(1123),da=t(2372);let di={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},ds=new Map;(0,da.r2)(ds);let dl={errorRetryCount:3,fetcher:oN,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof oB){let n=e.response.status;return!!(n>=500)||401===n||403===n||429===n}return!0},provider:()=>ds};function dc(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let n=Object.assign({},di,e),t={...dl,...n.swrConfig};return function(e){var r,o,a,i,s;return a=o=class extends(r=uj().Component){componentDidCatch(e,t){t&&t.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:t.componentStack})),n.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:t})}render(){if(this.state.caughtError)return uj().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=uj().createElement(uB.Suspense,{fallback:null},uj().createElement(dr.BE,{value:t},uj().createElement(uR.Provider,{value:this.state.config},n.disableTranslations?uj().createElement(e,this.props):uj().createElement(dt.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},uj().createElement(e,this.props)))));return n.strictMode&&uj().StrictMode?uj().createElement(uj().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:n.moduleName,featureName:n.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${n.featureName})`,i in a?Object.defineProperty(a,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[i]=s,o}}function dp(e,n){return function(e){if("object"!==u1(e))throw Error("single-spa-react requires a configuration object");var n,t=u0(u0({},u4),e);if(!t.React)throw Error("single-spa-react must be passed opts.React");if(!t.ReactDOM&&!t.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(t.renderType||(null!=(n=t.ReactDOMClient)&&n.createRoot?t.renderType="createRoot":t.renderType="render"),!t.rootComponent&&!t.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!u5&&t.React.createContext&&(u5=t.React.createContext()),t.SingleSpaRoot=function(e){function n(e){n.displayName="SingleSpaRoot(".concat(e.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},n.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},n.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},n}(t);var r={bootstrap:u6.bind(null,t),mount:u7.bind(null,t),unmount:u8.bind(null,t)};return t.parcelCanUpdate&&(r.update=u9.bind(null,t)),r}({React:uj(),ReactDOMClient:uX,rootComponent:dc(n)(e)})}function du(e,n){return()=>e().then(({default:e})=>dp(e,n))}function dd(e,n){return()=>Promise.resolve(dp(e,n))}let df=du,dh=L()(()=>({}));U("openmrs-app-context",dh);let dm={};function dg(e,n=e=>e){let t=dh.getState();return e in t?Object.freeze(Object.assign({},n?n(t[e]):t[e])):null}function dy(e,n){dh.setState(t=>(e in t||(t[e]={}),t[e]=n(t[e]),Object.assign({},t)))}function db(e){return null===e?null:Object.freeze(Object.assign({},e))}let d_=new Map;function dv(e,n){let t=(0,uB.useRef)(n??{}),r=(0,uB.useRef)(n=>dy(e,n)),o=(0,uB.useRef)(Symbol());return(0,uB.useEffect)(()=>{let t=n??{},r=o.current;return null===dg(e)?!function(e,n=dm){dh.setState(t=>{if(e in t)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},t,{[e]:n===dm?{}:n})})}(e,t):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),dy(e,()=>t)),d_.set(e,r),()=>{d_.get(e)===r&&(dh.setState(n=>(e in n&&delete n[e],n)),d_.delete(e))}},[e]),(0,uB.useEffect)(()=>{let r=n??{};B(t.current,r)||(dy(e,()=>r),t.current=r)},[n]),r.current}function d$({namespace:e,value:n}){return dv(e,n),null}let dA=({children:e,value:n,fallback:t})=>n?uj().createElement(uj().Fragment,null,e):t?uj().createElement(uj().Fragment,null,t):null;function dw(){let e=(0,uB.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,uB.useEffect)(()=>{let n=e.current;return()=>n?.abort()},[]),e.current}function dk(e,n=e=>e??{}){let[t,r]=(0,uB.useState)(()=>{if(dx(e))return;let t=dg(e);if(null!==t)return n?n(t):t});return(0,uB.useEffect)(()=>{if(dx(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,uB.useEffect)(()=>{var t;let o;return(t=e=>{if(null==e)return void r(void 0);let t=n?n(e):e;r(e=>B(e,t)?e:t)})(db(o=dg(e))),dh.subscribe(n=>{let r=e in n?n[e]:null;r!==o&&(o=r,t(db(r)))})},[e,n]),t}function dx(e){return"string"!=typeof e||0===e.trim().length}function dC(e){let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>p3().subscribe(r=>{let o=r.slots[e]?.assignedExtensions.map(e=>e.id)??[];(0,nn.A)(o,n)||t(o)}),[]),n}function dE(e,n){let{data:t,error:r,mutate:o,isLoading:a,isValidating:i}=(0,dr.Ay)(`${aR}?patient=${e}&includeEncounterless=${n}`,oN);return(0,uB.useMemo)(()=>({isLoading:a,data:t?.data.results??[],error:r,mutate:o,isValidating:i}),[t,r,a,i,o])}function dS(e){(0,uB.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let dD={},dz=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
16
  Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function dM(e){let{moduleName:n,extension:t}=(0,uB.useContext)(uR),r=e?.externalModuleName??n;if(!r&&!t)throw Error(dz);let o=function(e){let n=(0,uB.useMemo)(()=>ti(e),[e]),t=function(e){let[n,t]=(0,uB.useState)(()=>{let n=e.getState();return n.loaded&&n.config?n.config:null});return(0,uB.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&t(e.config)}),[e]),n}(n);if(!t)throw dD[e]||(dD[e]=new Promise(e=>{let t=n.subscribe(n=>{n.loaded&&n.config&&(e(n.config),t())})})),dD[e];return t}(r),a=function(e){let n=(0,uB.useMemo)(tp,[]),t=function(e,n){let[t,r]=(0,uB.useState)(n?()=>{let t=td(e.getState(),n.extensionSlotName,n.extensionId);if(t.loaded&&t.config)return t.config}:null);return(0,uB.useEffect)(()=>{if(n)return e.subscribe(e=>{let o=td(e,n.extensionSlotName,n.extensionId);o.loaded&&o.config&&!(0,nn.A)(o.config,t)&&r(o.config)})},[e,n,t]),t}(n,e);if(!t&&e){let t=`${e.extensionSlotName}-${e.extensionId}`;throw!dD[t]&&n&&(dD[t]=new Promise(t=>{let r=n.subscribe(n=>{let o=td(n,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(t(o.config),r())})})),dD[t]}return t||{}}(t);return(0,uB.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...o}:{...o,...a},[r,e?.externalModuleName,o,a])}let dP=uK;function dT(){let[e,n]=(0,uB.useState)(pZ());return(0,uB.useEffect)(()=>g(({online:e})=>n(e)),[]),e}function dO(e,n=300){let[t,r]=(0,uB.useState)(e);return(0,uB.useEffect)(()=>{let t=setTimeout(()=>{r(e)},n);return()=>{clearTimeout(t)}},[e,n]),t}var dN=t(9876);let dI=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,n])=>`${e}:${n}`).join(",")}`;function dB(){let e=`${oM}/emrapi/configuration?v=${dI}`,n=(0,dN.A)(e,oN);return(0,uB.useMemo)(()=>({emrConfiguration:n.data?.data,isLoadingEmrConfiguration:n.isLoading,mutateEmrConfiguration:n.mutate,errorFetchingEmrConfiguration:n.error}),[n])}let dj=uq(p1());function dR(e){let n=uK(e);return(0,uB.useMemo)(()=>Object.fromEntries(n.map(e=>[e.name,e.meta])),[n])}let dF=uq(p3());function dL(e){let{flags:n}=uG(pG);return n[e]?.enabled??!1}function dW(){let[,e]=(0,uB.useState)(0);return(0,uB.useCallback)(()=>{e(e=>e+1)},[])}function dV(e,n,t={}){return dU(e,n,dG,t)}let dG={getPaginatedUrl:(e,n,t)=>{if(!e)return null;{let r=new URL(oO(e.toString()),window.location.toString());return r.searchParams.set("limit",""+n),r.searchParams.set("startIndex",""+t),r.searchParams.set("totalCount","true"),r.toString()}},getNextUrl:e=>{let n=e?.links?.find(e=>"next"==e.rel)?.uri;if(!n)return null;{let e=new URL(n);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function dU(e,n,t,r={}){let{getPaginatedUrl:o,getTotalCount:a,getCurrentPageSize:i,getData:s}=t,{immutable:l,swrConfig:c}=r,p=r.fetcher??oN,[u,d]=(0,uB.useState)(1),f=(0,uB.useRef)(NaN),h=(0,uB.useRef)(NaN),m=(u-1)*n,g=(0,uB.useMemo)(()=>o(e,n,m),[e,n,m]),{data:y,...b}=(l?dN.A:dr.Ay)(g,p,c);y?.data&&(f.current=a(y?.data),h.current=i(y?.data));let v=Math.ceil(f.current/n),$=(0,uB.useCallback)(e=>{0<e&&e<=v?d(e):console.warn("Invalid attempt to go to out of bounds page: "+e)},[e,u,v]),A=(0,uB.useCallback)(()=>{$(u+1)},[e,u,v]),w=(0,uB.useCallback)(()=>{$(u-1)},[e,u,v]);return{data:s(y?.data),totalPages:v,totalCount:f.current,currentPage:u,currentPageSize:h,paginated:v>1,showNextButton:u<v,showPreviousButton:u>1,goTo:$,goToNext:A,goToPrevious:w,...b}}function dq(e,n,t={}){return dU(e,n,dH(),t)}function dH(){return{getPaginatedUrl:(e,n,t)=>{if(!e)return null;{let r=new URL(oO(e.toString()),window.location.toString());return r.searchParams.set("_count",""+n),r.searchParams.set("_getpagesoffset",""+t),r.toString()}},getNextUrl:e=>{let n=e?.link?.find(e=>"next"==e.relation)?.url;if(!n)return null;{let e=new URL(n);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var dK=t(8139);let dY=uj().use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(n=>{e.status="fulfilled",e.value=n},n=>{e.status="rejected",e.reason=n}),e}),dZ={dedupe:!0};da.qv.defineProperty(da.BE,"defaultValue",{value:da.sb});let dJ=(0,da.qm)((e,n,t)=>{let{cache:r,compare:o,suspense:a,fallbackData:i,revalidateOnMount:s,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:p,refreshWhenOffline:u,keepPreviousData:d}=t,[f,h,m,g]=da.bZ.get(r),[y,b]=(0,da.lK)(e),v=(0,uB.useRef)(!1),$=(0,uB.useRef)(!1),A=(0,uB.useRef)(y),w=(0,uB.useRef)(n),k=(0,uB.useRef)(t),x=()=>k.current.isVisible()&&k.current.isOnline(),[C,E,S,D]=(0,da.r9)(r,y),z=(0,uB.useRef)({}).current,M=(0,da.b0)(i)?t.fallback[y]:i,P=(e,n)=>{for(let t in z)if("data"===t){if(!o(e[t],n[t])&&(!(0,da.b0)(e[t])||!o(L,n[t])))return!1}else if(n[t]!==e[t])return!1;return!0},T=(0,uB.useMemo)(()=>{let e=!!y&&!!n&&((0,da.b0)(s)?!k.current.isPaused()&&!a&&(!!(0,da.b0)(l)||l):s),t=n=>{let t=(0,da.rL)(n);return(delete t._k,e)?{isValidating:!0,isLoading:!0,...t}:t},r=C(),o=D(),i=t(r),c=r===o?i:t(o),p=i;return[()=>{let e=t(C());return P(e,p)?(p.data=e.data,p.isLoading=e.isLoading,p.isValidating=e.isValidating,p.error=e.error,p):(p=e,e)},()=>c]},[r,y]),O=(0,dK.useSyncExternalStore)((0,uB.useCallback)(e=>S(y,(n,t)=>{P(t,n)||e()}),[r,y]),T[0],T[1]),N=!v.current,I=f[y]&&f[y].length>0,B=O.data,j=(0,da.b0)(B)?M:B,R=O.error,F=(0,uB.useRef)(j),L=d?(0,da.b0)(B)?F.current:B:j,W=(!I||!!(0,da.b0)(R))&&(N&&!(0,da.b0)(s)?s:!k.current.isPaused()&&(a?!(0,da.b0)(j)&&l:(0,da.b0)(j)||l)),V=!!(y&&n&&N&&W),G=(0,da.b0)(O.isValidating)?V:O.isValidating,U=(0,da.b0)(O.isLoading)?V:O.isLoading,q=(0,uB.useCallback)(async e=>{let n,r,a=w.current;if(!y||!a||$.current||k.current.isPaused())return!1;let i=!0,s=e||{},l=!m[y]||!s.dedupe,c=()=>da.dO?!$.current&&y===A.current&&v.current:y===A.current,p={isValidating:!1,isLoading:!1},u=()=>{E(p)},d=()=>{let e=m[y];e&&e[1]===r&&delete m[y]},g={isValidating:!0};(0,da.b0)(C().data)&&(g.isLoading=!0);try{if(l&&(E(g),t.loadingTimeout&&(0,da.b0)(C().data)&&setTimeout(()=>{i&&c()&&k.current.onLoadingSlow(y,t)},t.loadingTimeout),m[y]=[a(b),(0,da.lg)()]),[n,r]=m[y],n=await n,l&&setTimeout(d,t.dedupingInterval),!m[y]||m[y][1]!==r)return l&&c()&&k.current.onDiscarded(y),!1;p.error=da.ZH;let e=h[y];if(!(0,da.b0)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return u(),l&&c()&&k.current.onDiscarded(y),!1;let s=C().data;p.data=o(s,n)?s:n,l&&c()&&k.current.onSuccess(n,y,t)}catch(t){d();let e=k.current,{shouldRetryOnError:n}=e;!e.isPaused()&&(p.error=t,l&&c()&&(e.onError(t,y,e),(!0===n||(0,da.Tn)(n)&&n(t))&&(!k.current.revalidateOnFocus||!k.current.revalidateOnReconnect||x())&&e.onErrorRetry(t,y,e,e=>{let n=f[y];n&&n[0]&&n[0](da.bu.ERROR_REVALIDATE_EVENT,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return i=!1,u(),!0},[y,r]),H=(0,uB.useCallback)((...e)=>(0,da.mF)(r,A.current,...e),[]);if((0,da.Es)(()=>{w.current=n,k.current=t,(0,da.b0)(B)||(F.current=B)}),(0,da.Es)(()=>{if(!y)return;let e=q.bind(da.ZH,dZ),n=0,t=(0,da.aw)(y,f,(t,r={})=>{if(t==da.bu.FOCUS_EVENT){let t=Date.now();k.current.revalidateOnFocus&&t>n&&x()&&(n=t+k.current.focusThrottleInterval,e())}else if(t==da.bu.RECONNECT_EVENT)k.current.revalidateOnReconnect&&x()&&e();else if(t==da.bu.MUTATE_EVENT)return q();else if(t==da.bu.ERROR_REVALIDATE_EVENT)return q(r)});return $.current=!1,A.current=y,v.current=!0,E({_k:b}),W&&((0,da.b0)(j)||da.X3?e():(0,da.mf)(e)),()=>{$.current=!0,t()}},[y]),(0,da.Es)(()=>{let e;function n(){let n=(0,da.Tn)(c)?c(C().data):c;n&&-1!==e&&(e=setTimeout(t,n))}function t(){!C().error&&(p||k.current.isVisible())&&(u||k.current.isOnline())?q(dZ).then(n):n()}return n(),()=>{e&&(clearTimeout(e),e=-1)}},[c,p,u,y]),(0,uB.useDebugValue)(L),a&&(0,da.b0)(j)&&y){if(!da.dO&&da.X3)throw Error("Fallback data is required when using suspense in SSR.");w.current=n,k.current=t,$.current=!1;let e=g[y];if((0,da.b0)(e)||dY(H(e)),(0,da.b0)(R)){let e=q(dZ);(0,da.b0)(L)||(e.status="fulfilled",e.value=!0),dY(e)}else throw R}return{mutate:H,get data(){return z.data=!0,L},get error(){return z.error=!0,R},get isValidating(){return z.isValidating=!0,G},get isLoading(){return z.isLoading=!0,U}}}),dX=Promise.resolve(),dQ=(0,da.Ht)(dJ,e=>(n,t,r)=>{let o,a=(0,uB.useRef)(!1),{cache:i,initialSize:s=1,revalidateAll:l=!1,persistSize:c=!1,revalidateFirstPage:p=!0,revalidateOnMount:u=!1,parallel:d=!1}=r,[,,,f]=da.bZ.get(da.PP);try{(o=(0,da.lK)(n?n(0,null):null)[0])&&(o=da.q9+o)}catch(e){}let[h,m,g]=(0,da.r9)(i,o),y=(0,uB.useCallback)(()=>(0,da.b0)(h()._l)?s:h()._l,[i,o,s]);(0,dK.useSyncExternalStore)((0,uB.useCallback)(e=>o?g(o,()=>{e()}):()=>{},[i,o]),y,y);let b=(0,uB.useCallback)(()=>{let e=h()._l;return(0,da.b0)(e)?s:e},[o,s]),v=(0,uB.useRef)(b());(0,da.Es)(()=>{if(!a.current){a.current=!0;return}o&&m({_l:c?v.current:b()})},[o,i]);let $=u&&!a.current,A=e(o,async e=>{let o=h()._i,a=h()._r;m({_r:da.ZH});let s=[],c=b(),[u]=(0,da.r9)(i,e),g=u().data,y=[],v=null;for(let e=0;e<c;++e){let[c,u]=(0,da.lK)(n(e,d?null:v));if(!c)break;let[h,m]=(0,da.r9)(i,c),b=h().data,A=l||o||(0,da.b0)(b)||p&&!e&&!(0,da.b0)(g)||$||g&&!(0,da.b0)(g[e])&&!r.compare(g[e],b);if(t&&("function"==typeof a?a(b,u):A)){let n=async()=>{if(c in f){let e=f[c];delete f[c],b=await e}else b=await t(u);m({data:b,_k:u}),s[e]=b};d?y.push(n):await n()}else s[e]=b;d||(v=b)}return d&&await Promise.all(y.map(e=>e())),m({_i:da.ZH}),s},r),w=(0,uB.useCallback)(function(e,n){let t="boolean"==typeof n?{revalidate:n}:n||{},r=!1!==t.revalidate;return o?(r&&((0,da.b0)(e)?m({_i:!0,_r:t.revalidate}):m({_i:!1,_r:t.revalidate})),arguments.length?A.mutate(e,{...t,revalidate:r}):A.mutate()):dX},[o,i]),k=(0,uB.useCallback)(e=>{let t;if(!o)return dX;let[,r]=(0,da.r9)(i,o);if((0,da.Tn)(e)?t=e(b()):"number"==typeof e&&(t=e),"number"!=typeof t)return dX;r({_l:t}),v.current=t;let a=[],[s]=(0,da.r9)(i,o),l=null;for(let e=0;e<t;++e){let[t]=(0,da.lK)(n(e,l)),[r]=(0,da.r9)(i,t),o=t?r().data:da.ZH;if((0,da.b0)(o))return w(s().data);a.push(o),l=o}return w(a)},[o,i,w,b]);return{size:b(),setSize:k,mutate:w,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});function d0(e,n={}){return d1(e,dG,n)}function d1(e,n,t={}){let{swrInfiniteConfig:r,immutable:o}=t,{getNextUrl:a,getTotalCount:i,getData:s}=n,l=t.fetcher??oN,{data:c,size:p,setSize:u,...d}=dQ((0,uB.useCallback)((t,r)=>0==t?e?.toString()??null:n.getNextUrl(r.data),[e]),l,{...r,...o?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),f=a(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=f,loadMore:()=>{u((c?.length??0)+1)},nextUri:f,...d}}function d2(e,n={}){return d3(e,dG,n)}function d3(e,n,t={}){let r=d1(e,n,t),{hasMore:o,error:a,data:i,loadMore:s,isLoading:l,nextUri:c}=r;return((0,uB.useEffect)(()=>{o&&!a&&s()},[o,c]),t.partialData)?r:{...r,data:o||a?void 0:i,isLoading:l||o}}function d5(e,n={}){return d3(e,dH(),n)}function d4(e,n={}){return d1(e,dH(),n)}function d6(){let e="tablet";return document.body.classList.forEach(n=>{switch(n){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function d7(){let[e,n]=(0,uB.useState)(d6);return(0,uB.useEffect)(()=>{let e=()=>{n(d6())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let d8=e=>"small-desktop"===e||"large-desktop"===e;function d9(e){let n=(0,uB.useContext)(uR);(0,uB.useEffect)(()=>(n&&n.moduleName&&(e.componentContext=n),ug(e),()=>{uy(e.name)}),[n,e])}function fe(){return uG(um)}function fn(e=null,n=null){let[t,r]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let t=po(e,n).subscribe(e=>{r(e)},e=>{console.error(e)});return()=>t.unsubscribe()},[e,n]),t}function ft(e,n=!0){let t=(0,uB.useRef)(null);return(0,uB.useEffect)(()=>{let r=r=>{n&&t.current&&r.target&&r.target instanceof Node&&(t.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,n]),t}function fr(e){let n=(0,uB.useRef)();return(0,uB.useEffect)(()=>{let t=new IntersectionObserver(n=>{for(let t of n)if(t.isIntersecting)return void e()},{threshold:1});return n.current&&t.observe(n.current),()=>{n.current&&t.unobserve(n.current)}},[n.current,e]),n}function fo(e,n={}){let{abortController:t,fetchInit:r,url:o,swrConfig:a}=n,i=dw(),s=(0,uB.useMemo)(()=>r?.signal??t?.signal??i.signal,[t?.signal,r?.signal,i.signal]),l=(0,uB.useCallback)(e=>oN(function(e,n){if(n)return"function"==typeof n?n(e):n;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,o),{...r,signal:s}),[s,r,o]);return(0,dr.Ay)(e,l,a)}function fa(e=[],n=10){let[t,r]=(0,uB.useState)(1),o=(0,uB.useMemo)(()=>"number"==typeof n&&n>0?Math.max(1,Math.ceil(e.length/n)):1,[e.length,n]),a=(0,uB.useMemo)(()=>{let r=(t-1)*n,o=(t+0)*n;return e.slice(r,o)},[e,t,n]),i=(0,uB.useCallback)(e=>{r(Math.max(1,Math.min(o,e)))},[r,o]),s=(0,uB.useCallback)(()=>{t<o&&r(t+1)},[t,o,r]),l=(0,uB.useCallback)(()=>{t>1&&r(t-1)},[t,r]);return(0,uB.useMemo)(()=>({results:a,totalPages:o,currentPage:t,paginated:e.length>n,showNextButton:t<o,showPreviousButton:t>1,goTo:i,goToNext:s,goToPrevious:l}),[a,o,e.length,n,t,i,s,l])}function fi(e,n,t,r){return{pageSizes:(0,uB.useMemo)(()=>{let t=Math.ceil(n/e);return isNaN(t)&&(t=0),[...Array(t).keys()].map(n=>(n+1)*e)},[e,n]),pageItemsCount:(0,uB.useMemo)(()=>e>n?n:e*t>n?e*(t-1)+r:e*t,[e,n,t,r])}}function fs(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function fl(e){let[n,t]=(0,uB.useState)(e??fs()),{data:r,error:o,isValidating:a}=(0,dr.Ay)(n?["patient",n]:null,()=>c8(n,{}));return(0,uB.useEffect)(()=>{let e=()=>{let e=fs();e!==n&&t(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[n]),(0,uB.useMemo)(()=>({isLoading:a&&!o&&!r,patient:r,patientUuid:n,error:o}),[a,o,r,n])}function fc(){let e=`${oM}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:n,error:t,isLoading:r}=(0,dr.Ay)(e,oN);return(0,uB.useMemo)(()=>({primaryIdentifierCode:n?.data?.results[0]?.metadataUuid,isLoading:r,error:t}),[n,t,r])}function fp(e){let{extensions:n,extensionSlotModuleName:t}=uY(e);return e?n.map(n=>({state:r})=>uj().createElement(uR.Provider,{value:{moduleName:t,featureName:"",extension:{extensionId:n.id,extensionSlotName:e,extensionSlotModuleName:t}}},uj().createElement(uL,{state:r}))):[]}function fu(){let e=(0,uB.useRef)(),[n,t]=(0,uB.useState)(null),r=null;if(!n){if(i){let e=oL().getState();e.loaded&&(r=e.session)}else i=new Promise(n=>{let t=({loaded:t,session:o})=>{t&&(n(o),r=o,e.current&&(e.current(),e.current=void 0))};t(oL().getState()),r||(e.current=oL().subscribe(t))});if(r)t(r);else throw i}(0,uB.useEffect)(()=>(e.current||(e.current=oL().subscribe(({loaded:e,session:n})=>{e&&(r=n,t(n))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let o=n||r;if(!o)if(i)throw console.warn("useSession is in an unexpected state. Attempting to recover."),i;else throw Error("useSession is in an invalid state.");return o}let fd=({privilege:e,fallback:n,children:t})=>{let[r,o]=(0,uB.useState)(null);return((0,uB.useEffect)(()=>{let e=oF({includeAuthStatus:!1}).subscribe(o);return()=>e.unsubscribe()},[]),r&&oU(e,r))?uj().createElement(uj().Fragment,null,t):n?uj().createElement(uj().Fragment,null,n):null};var ff=t(4274),fh=t.n(ff),fm=t(5602);let fg={setVisitContext:(e,n)=>null==n?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:n.uuid,patientUuid:n.patient?.uuid},mutateVisit(e){for(let n of Object.values(e.mutateVisitCallbacks??{}))n();return{}}};function fy(e){let n=(0,uB.useId)();return(0,uB.useEffect)(()=>{let t=pu();return e&&t.setState({mutateVisitCallbacks:{...t.getState().mutateVisitCallbacks,[n]:e}}),()=>{if(e){let e={...t.getState().mutateVisitCallbacks};delete e[n],t.setState({mutateVisitCallbacks:e})}}},[n,e]),uU(pu(),fg)}function fb(e,n=pc){let{patientUuid:t,manuallySetVisitUuid:r,setVisitContext:o}=fy(),a=e&&t==e?r:null,i=`?patient=${e}&v=${n}&includeInactive=false`,s=`/${a}?v=${n}`,{data:l,error:c,mutate:p,isValidating:u}=(0,dr.Ay)(e?`${oM}/visit${i}`:null,oN),{data:d,error:f,mutate:h,isValidating:m}=(0,dr.Ay)(e&&a?`${oM}/visit${s}`:null,oN),g=(0,uB.useMemo)(()=>l?.data.results.find(e=>null===e.stopDatetime)??null,[l]),y=(0,uB.useMemo)(()=>a&&d?d.data:null,[d,a]),b=(0,uB.useRef)(null);(0,uB.useEffect)(()=>{!u&&g&&t===e&&null===r&&o(g),m||(b.current&&y&&b.current.uuid===y.uuid&&!b.current.stopDatetime&&y.stopDatetime&&o(null),b.current=y)},[y,r,g,u,m,t]);let v=(0,uB.useCallback)(()=>{p(),h()},[p,h]);fy(v);let $=!!(!l||a&&!d),A=!!(a?f:c);return{error:c||f,mutate:v,isValidating:u||m,activeVisit:g,currentVisit:y,currentVisitIsRetrospective:!!a,isLoading:$&&!A}}function f_(){let[e,n]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let e=pi().subscribe(e=>{n(e)},e=>console.error(e));return()=>e.unsubscribe()},[]),e}fh().extend(fm);let fv=new Map;async function f$(e,n){let t=n.indexOf("#"),r=t>=0,o=r?n.substring(0,t):e,a=r?n.substring(t+1):n,i=await ay(o);return i&&Object.hasOwn(i,a)&&"function"==typeof i[a]?fw(o,i).then(()=>i[a]()):(i?i&&Object.hasOwn(i,a)?console.warn(`The export ${n}, defined in ${e}'s routes.json, is not a function`):console.warn(`${o} does not define a component called "${a}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${o} for ${n} defined in ${e}'s routes.json`),fA)}let fA={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function fw(e,n){if(e in fv)await fv[e];else{let t=n??await ay(e);await (fv[e]=new Promise((n,r)=>{if(Object.hasOwn(t,"startupApp")){let o=t.startupApp;if("function"==typeof o)return Promise.resolve(o()).then(()=>{t$(e),n(null)}).catch(r)}t$(e),n(null)}))}}function fk(e,n){let t=n.name;if(!t)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
17
17
  registered. To fix this, ensure that you define the "name" field inside the
18
18
  extension definition.`,n);n.slots&&n.slot&&console.warn(`The extension ${t} from ${e} declares both a 'slots' property and
@@ -29,4 +29,4 @@ To fix this, ensure that you define the "description" field inside the feature f
29
29
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,n):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
30
  To fix this, ensure that you define the "name" field inside the feature flag definition.`,n);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,n)})}}function fE(){fx.sort((e,n)=>e.appName.localeCompare(n.appName,"en"));let e=new Map;for(let n of fx){e.has(n.appName)?e.set(n.appName,e.get(n.appName)+1):e.set(n.appName,0);let t=e.get(n.appName),r=`${n.appName}-page-${t}`,o=n.containerDomId??"omrs-apps-container",a=document.getElementById(o),i=`single-spa-application:${r}`;if(a){let e=document.createElement("div");e.id=i,a?.appendChild(e)}else throw Error(`${n.appName} ${n.component} cannot be mounted to "${o}"; DOM element does not exist.`);!function(e,n){let t=void 0!==n.route?n.route:void 0!==n.routeRegex&&new RegExp(n.routeRegex);!1===t?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
31
  To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):n.component?oo(e,()=>f$(n.appName,n.component),function(e,{online:n,offline:t,featureFlag:r}){return window.offlineEnabled?o=>!!(navigator.onLine&&(n??!0)||!navigator.onLine&&t)&&(!r||!!pH(r))&&e(o):e}(function e(n){if(Array.isArray(n)){let t=n.map(e);return e=>t.some(n=>n(e))}return"string"==typeof n?op(window.getOpenmrsSpaBase()+n):n instanceof RegExp?e=>n.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>n}(t),n)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,n)}}let fS={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function fD(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fS.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fS.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fS.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fS.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fS.SMALL_DESKTOP_MAX)}let fz=!1;function fM(){fz||(window.addEventListener("resize",fD),fD(),fz=!0)}var fP=t(1085),fT=t(3373),fO=t.n(fT),fN=t(2591),fI=t.n(fN),fB=t(1740),fj=t.n(fB),fR=t(8128),fF=t.n(fR),fL=t(855),fW=t.n(fL),fV=t(3051),fG=t.n(fV),fU=t(3656),fq=t.n(fU),fH=t(5924),fK={};fK.styleTagTransform=fq(),fK.setAttributes=fW(),fK.insert=fF().bind(null,"head"),fK.domAPI=fj(),fK.insertStyleElement=fG(),fI()(fH.A,fK);let fY=fH.A&&fH.A.locals?fH.A.locals:void 0;function fZ({title:e,children:n}){let t="tablet"===d7();return(0,fP.jsxs)("div",{className:fO()({[fY.tabletHeader]:t,[fY.desktopHeader]:!t}),children:[(0,fP.jsx)("h4",{children:e}),n]})}let fJ=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fX={primaryColor:{_type:n4.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tY.oneOf(fJ)]},secondaryColor:{_type:n4.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tY.oneOf(fJ)]}},fQ={"Brand color #1":{_default:"#005d5d",_type:n4.String},"Brand color #2":{_default:"#004144",_type:n4.String},"Brand color #3":{_default:"#007d79",_type:n4.String},excludePatientIdentifierCodeTypes:{uuids:{_type:n4.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:n4.UUID}}},implementationName:{_type:n4.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:n4.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:n4.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[tY.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:n4.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:n4.String}},diagnosisTags:fX};var f0=t(5520);let f1={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},f2=e=>(0,fP.jsx)(f0.GGC,{translateWithId:(e,n)=>{let t=f1[e];return t?o4(t,e,n):e},...e});var f3=t(3923),f5={};f5.styleTagTransform=fq(),f5.setAttributes=fW(),f5.insert=fF().bind(null,"head"),f5.domAPI=fj(),f5.insertStyleElement=fG(),fI()(f3.A,f5);let f4=f3.A&&f3.A.locals?f3.A.locals:void 0,f6=(0,uB.createContext)(null);function f7(){let e=(0,uB.useContext)(f6);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function f8({menuTitle:e,children:n}){let[t,r]=uj().useState(!1),o=ft(()=>r(!1),t),a="tablet"===d7(),i=(0,uB.useCallback)(()=>r(e=>!e),[]),s=(0,uB.useRef)(null),l=(0,uB.useRef)(null),c=(0,uB.useId)(),p=`custom-overflow-menu-trigger-${c}`,u=`custom-overflow-menu-${c}`,d=(0,uB.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,uB.useMemo)(()=>({closeMenu:d}),[d]),h=(0,uB.useCallback)(e=>{"Escape"===e.key&&t&&(e.stopPropagation(),d())},[d,t]),m=uB.Children.toArray(n);(0,uB.useEffect)(()=>{if(t&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[t]);let g=(0,uB.useCallback)(({currentIndex:e,direction:n})=>{let t=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(t).indexOf(r);if(-1===o)return void t[n>0?0:t.length-1]?.focus();let a=o+n,i=a<0?t.length-1:a>=t.length?0:a;t[i]?.focus()},[]),y=m.map((e,n)=>(0,uB.isValidElement)(e)?(0,uB.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:n}):e);return(0,fP.jsxs)("div",{"data-overflow-menu":!0,className:fO()("cds--overflow-menu",f4.container),ref:o,children:[(0,fP.jsx)("button",{className:fO()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":t},f4.overflowMenuButton),"aria-controls":u,"aria-expanded":t,"aria-haspopup":"true",id:p,onClick:i,onKeyDown:h,ref:s,children:e}),(0,fP.jsxs)("div",{className:fO()("cds--overflow-menu-options","cds--overflow-menu--flip",f4.menu,{[f4.show]:t}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:u,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,fP.jsx)("ul",{className:fO()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,fP.jsx)(f6.Provider,{value:f,children:y})}),(0,fP.jsx)("span",{})]})]})}function f9(e){let n=(0,uB.useContext)(f6);return(0,fP.jsx)(f0.XSD,{...e,closeMenu:n?.closeMenu})}var he=t(6311),hn=t(7781),ht={};ht.styleTagTransform=fq(),ht.setAttributes=fW(),ht.insert=fF().bind(null,"head"),ht.domAPI=fj(),ht.insertStyleElement=fG(),fI()(hn.A,ht);let hr=hn.A&&hn.A.locals?hn.A.locals:void 0,ho=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],ha=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-activity",iconProps:e})})),hi=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-add",iconProps:e})})),hs=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-down",iconProps:e})})),hl=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-left",iconProps:e})})),hc=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-right",iconProps:e})})),hp=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-up",iconProps:e})})),hu=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-baby",iconProps:e})})),hd=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),hf=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-calendar",iconProps:e})})),hh=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-down",iconProps:e})})),hm=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-left",iconProps:e})})),hg=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-right",iconProps:e})})),hy=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-up",iconProps:e})})),hb=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chart-average",iconProps:e})})),h_=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chart-line",iconProps:e})})),hv=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-checkmark-filled",iconProps:e})})),h$=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-checkmark-outline",iconProps:e})})),hA=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chemistry",iconProps:e})})),hw=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-down",iconProps:e})})),hk=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-left",iconProps:e})})),hx=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-right",iconProps:e})})),hC=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-up",iconProps:e})})),hE=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close",iconProps:e})})),hS=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close-filled",iconProps:e})})),hD=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close-outline",iconProps:e})})),hz=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-document",iconProps:e})})),hM=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-document-attachment",iconProps:e})})),hP=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-download",iconProps:e})})),hT=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-drug-order",iconProps:e})})),hO=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-edit",iconProps:e})})),hN=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-event-schedule",iconProps:e})})),hI=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-events",iconProps:e})})),hB=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-female",iconProps:e})})),hj=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-male",iconProps:e})})),hR=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-other",iconProps:e})})),hF=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-unknown",iconProps:e})})),hL=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-generic-order-type",iconProps:e})})),hW=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-group",iconProps:e})})),hV=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-group-access",iconProps:e})})),hG=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-hospital-bed",iconProps:e})})),hU=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-image-medical",iconProps:e})})),hq=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information",iconProps:e})})),hH=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information-filled",iconProps:e})})),hK=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information-square",iconProps:e})})),hY=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-inventory-management",iconProps:e})})),hZ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-lab-order",iconProps:e})})),hJ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-list-checked",iconProps:e})})),hX=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-location",iconProps:e})})),hQ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-material-order",iconProps:e})})),h0=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-maximize",iconProps:e})})),h1=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-medication",iconProps:e})})),h2=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-message-queue",iconProps:e})})),h3=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-microscope",iconProps:e})})),h5=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-money",iconProps:e})})),h4=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-mother",iconProps:e})})),h6=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-movement",iconProps:e})})),h7=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h8=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h9=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-password",iconProps:e})})),me=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-pedestrian-family",iconProps:e})})),mn=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-pen",iconProps:e})})),mt=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-printer",iconProps:e})})),mr=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-procedure-order",iconProps:e})})),mo=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-programs",iconProps:e})})),ma=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-referral-order",iconProps:e})})),mi=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-renew",iconProps:e})})),ms=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-report",iconProps:e})})),ml=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-reset",iconProps:e})})),mc=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-save",iconProps:e})})),mp=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-search",iconProps:e})})),mu=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-settings",iconProps:e})})),md=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-switcher",iconProps:e})})),mf=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-shopping-cart",iconProps:e})})),mh=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),mm=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-sticky-note-add",iconProps:e})})),mg=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-syringe",iconProps:e})})),my=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-table-of-contents",iconProps:e})})),mb=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-table",iconProps:e})})),m_=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-time",iconProps:e})})),mv=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-tools",iconProps:e})})),m$=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-translate",iconProps:e})})),mA=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-trash-can",iconProps:e})})),mw=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mk=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-avatar",iconProps:e})})),mx=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-follow",iconProps:e})})),mC=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-xray",iconProps:e})})),mE=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user",iconProps:e})})),mS=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-view-off",iconProps:e})})),mD=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-view",iconProps:e})})),mz=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-warning",iconProps:e})})),mM=mz,mP=hM,mT=hJ,mO=hU,mN=mh,mI=(0,uB.memo)((0,uB.forwardRef)(function({icon:e,fallback:n,...t},r){let o=(0,uB.useRef)(e?document.getElementById(e):void 0);return(0,uB.useEffect)(()=>{let n=document.getElementById("omrs-svgs-container"),t=new MutationObserver(n=>{for(let t of n)"childList"===t.type&&(o.current=e?document.getElementById(e):void 0)});return n&&t.observe(n,{childList:!0}),()=>t.disconnect()},[e]),(0,fP.jsx)(dA,{value:o.current,fallback:n,children:(0,fP.jsx)(mB,{ref:r,icon:e,iconProps:t})})})),mB=(0,uB.memo)((0,uB.forwardRef)(function({icon:e,iconProps:n},t){let{className:r,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},n);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,uB.useRef)(null);return(0,uB.useImperativeHandle)(t,()=>i.current),(0,uB.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fP.jsx)("svg",{ref:i,className:fO()("omrs-icon",hr.icon,r),height:a,width:a,viewBox:"0 0 16 16",children:(0,fP.jsx)("use",{href:`#${e}`})})}));var mj=t(3241),mR={};mR.styleTagTransform=fq(),mR.setAttributes=fW(),mR.insert=fF().bind(null,"head"),mR.domAPI=fj(),mR.insertStyleElement=fG(),fI()(mj.A,mR);let mF=mj.A&&mj.A.locals?mj.A.locals:void 0,mL=({path:e,title:n,basePath:t,icon:r})=>{let{t:o}=(0,dt.useTranslation)(),a=(0,he.useLocation)(),i=(0,uB.useMemo)(()=>{if(!e)return!1;let n=e.startsWith("/")?e.slice(1):e;if(n.startsWith("http"))return n===window.location.href;let t=n.split("/").map(e=>decodeURIComponent(e)),r=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,n)=>t.every((e,t)=>r[n+t]===e))},[a.pathname,e]);return(0,fP.jsx)("div",{children:(0,fP.jsx)(uF,{className:fO()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${t}/${encodeURIComponent(e)}`,children:(0,fP.jsxs)("span",{className:mF.menu,children:[(0,fP.jsx)(mI,{icon:r,className:mF.icon,size:16}),(0,fP.jsx)("span",{children:o(n)})]})})},e)};function mW(e){return function({basePath:n}){return(0,fP.jsx)(he.BrowserRouter,{children:(0,fP.jsx)(mL,{basePath:n,...e})})}}function mV(e){let n=(0,uB.useRef)(null);return(0,uB.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mG(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let mU="u">typeof document?uj().useLayoutEffect:()=>{};function mq(e){let n=(0,uB.useRef)(null);return mU(()=>{n.current=e},[e]),(0,uB.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let mH={prefix:String(Math.round(1e10*Math.random())),current:0},mK=uj().createContext(mH),mY=uj().createContext(!1),mZ=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mJ="function"==typeof uj().useId?function(e){let n=uj().useId(),[t]=(0,uB.useState)(m1()),r=t?"react-aria":`react-aria${mH.prefix}`;return e||`${r}-${n}`}:function(e){let n=(0,uB.useContext)(mK),t=function(e=!1){let n=(0,uB.useContext)(mK),t=(0,uB.useRef)(null);if(null===t.current&&!e){var r,o;let e=null==(o=uj().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=o.ReactCurrentOwner)?void 0:r.current;if(e){let t=mZ.get(e);null==t?mZ.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,mZ.delete(e))}t.current=++n.current}return t.current}(!!e),r=`react-aria${n.prefix}`;return e||`${r}-${t}`};function mX(){return!1}function mQ(){return!0}function m0(e){return()=>{}}function m1(){return"function"==typeof uj().useSyncExternalStore?uj().useSyncExternalStore(m0,mX,mQ):(0,uB.useContext)(mY)}let m2=!!("u">typeof window&&window.document&&window.document.createElement),m3=new Map;function m5(e){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(null),o=mJ(n),a=(0,uB.useRef)(null);if(s&&s.register(a,o),m2){let e=m3.get(o);e&&!e.includes(r)?e.push(r):m3.set(o,[r])}return mU(()=>()=>{s&&s.unregister(a),m3.delete(o)},[o]),(0,uB.useEffect)(()=>{let e=r.current;return e&&t(e),()=>{e&&(r.current=null)}}),o}function m4(e=[]){let n=m5(),[t,r]=function(e){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(null),o=mq(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}n===e.value?o():t(e.value)});mU(()=>{r.current&&o()});let a=mq(e=>{r.current=e(n),o()});return[n,a]}(n),o=(0,uB.useCallback)(()=>{r(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,r]);return mU(o,[n,o,...e]),t}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{m3.delete(e)}));let m6=function(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=function e(n){var t,r,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var a=n.length;for(t=0;t<a;t++)n[t]&&(r=e(n[t]))&&(o&&(o+=" "),o+=r)}else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=n);return r};function m7(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let e in r){let t=n[e],o=r[e];"function"==typeof t&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=mG(t,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof o?n[e]=m6(t,o):"id"===e&&t&&o?n.id=function(e,n){if(e===n)return e;let t=m3.get(e);if(t)return t.forEach(e=>e.current=n),n;let r=m3.get(n);return r?(r.forEach(n=>n.current=e),e):n}(t,o):n[e]=void 0!==o?o:t}}return n}let m8=Symbol("default");function m9({values:e,children:n}){for(let[t,r]of e)n=uj().createElement(t.Provider,{value:r},n);return n}function ge(e){let{className:n,style:t,children:r,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,uB.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:o}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:a}):null==r?a:r,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=c?c:a,"data-rac":""}},[n,t,r,o,a,i,s])}function gn(e,n){let t=(0,uB.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||m8;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),r=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return t.slots[e]}return t}function gt(e,n,t){let{ref:r,...o}=gn(t,e.slot)||{},a=mV((0,uB.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:n=>{for(let t of e)"function"==typeof t?t(n):null!=t&&(t.current=n)}})(n,r),[n,r])),i=m7(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=n=>{let t="function"==typeof o.style?o.style(n):o.style,r={...n.defaultStyle,...t},a="function"==typeof e.style?e.style({...n,defaultStyle:r}):e.style;return{...r,...a}}:i.style={...o.style,...e.style}),[i,a]}function gr(e=!0){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(!1),o=(0,uB.useCallback)(e=>{r.current=!0,t(!!e)},[]);return mU(()=>{r.current||t(!1)},[]),[o,n]}function go(e){let n=/^(data-.*)$/,t={};for(let r in e)n.test(r)||(t[r]=e[r]);return t}let ga=(0,uB.createContext)(null),gi=null;function gs(e,n="assertive",t=7e3){gi?gi.announce(e,n,t):(gi=new gl,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?gi.announce(e,n,t):setTimeout(()=>{(null==gi?void 0:gi.isAttached())&&(null==gi||gi.announce(e,n,t))},100))}class gl{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",t=7e3){var r,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===n?null==(r=this.assertiveLog)||r.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},t)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let gc=new Set(["id"]),gp=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gd=/^(data-.*)$/;function gf(e,n={}){let{labelable:t,isLink:r,propNames:o}=n,a={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(gc.has(n)||t&&gp.has(n)||r&&gu.has(n)||(null==o?void 0:o.has(n))||gd.test(n))&&(a[n]=e[n]);return a}let gh=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],gm=gh.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";gh.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let gg=gh.join(':not([hidden]):not([tabindex="-1"]),');function gy(e){return e.matches(gm)}function gb(e){return e.matches(gg)}let g_=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},gv=e=>e&&"window"in e&&e.window===e?e:g_(e).defaultView||window;function g$(e){if(function(){if(null==gA){gA=!1;try{document.createElement("div").focus({get preventScroll(){return gA=!0,!0}})}catch{}}return gA}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],r=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==r;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return r instanceof HTMLElement&&t.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:r}of e)n.scrollTop=t,n.scrollLeft=r}(n)}}let gA=null;function gw(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gk(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function gx(e){let n=(0,uB.useRef)({isFocused:!1,observer:null});mU(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=mq(n=>{null==e||e(n)});return(0,uB.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{n.current.isFocused=!1,r.disabled&&t(gw(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&r.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let gC=!1;function gE(e){var n;return!("u"<typeof window)&&null!=window.navigator&&((null==(n=window.navigator.userAgentData)?void 0:n.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent))}function gS(e){var n;return"u">typeof window&&null!=window.navigator&&e.test((null==(n=window.navigator.userAgentData)?void 0:n.platform)||window.navigator.platform)}function gD(e){let n=null;return()=>(null==n&&(n=e()),n)}let gz=gD(function(){return gS(/^Mac/i)}),gM=gD(function(){return gS(/^iPhone/i)}),gP=gD(function(){return gS(/^iPad/i)||gz()&&navigator.maxTouchPoints>1}),gT=gD(function(){return gM()||gP()});gD(function(){return gz()||gT()});let gO=gD(function(){return gE(/AppleWebKit/i)&&!gN()}),gN=gD(function(){return gE(/Chrome/i)}),gI=gD(function(){return gE(/Android/i)}),gB=gD(function(){return gE(/Firefox/i)}),gj=new Map,gR=new Set;function gF(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let r=gj.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",n),gj.delete(t.target)),0===gj.size)){for(let e of gR)e();gR.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let r=gj.get(t.target);r||(r=new Set,gj.set(t.target,r),t.target.addEventListener("transitioncancel",n,{once:!0})),r.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function gL(e){requestAnimationFrame(()=>{0===gj.size?e():gR.add(e)})}"u">typeof document&&("loading"!==document.readyState?gF():document.addEventListener("DOMContentLoaded",gF));let gW="default",gV="",gG=new WeakMap;function gU(e){if(gT())"disabled"===gW&&(gW="restoring",setTimeout(()=>{gL(()=>{if("restoring"===gW){let n=g_(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=gV||""),gV="",gW="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&gG.has(e)){let n=gG.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),gG.delete(e)}}let gq=uj().createContext({register:()=>{}});function gH(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function gK(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function gY(e,n,t){var r=gH(e,n,"set");if(r.set)r.set.call(e,t);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=t}return t}function gZ(e,n){mU(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function gJ(){let e=(0,uB.useRef)(new Map),n=(0,uB.useCallback)((n,t,r,o)=>{let a=(null==o?void 0:o.once)?(...n)=>{e.current.delete(r),r(...n)}:r;e.current.set(r,{type:t,eventTarget:n,fn:a,options:o}),n.addEventListener(t,a,o)},[]),t=(0,uB.useCallback)((n,t,r,o)=>{var a;let i=(null==(a=e.current.get(r))?void 0:a.fn)||r;n.removeEventListener(t,i,o),e.current.delete(r)},[]),r=(0,uB.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,uB.useEffect)(()=>r,[r]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:r}}gq.displayName="PressResponderContext";function gX(e,n){return!!n&&!!e&&e.contains(n)}function gQ(e){return e.target}function g0(e,n,t=!0){var r,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=n;gB()&&(null==(o=window.event)||null==(r=o.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(gz()?a=!0:i=!0);let c=gO()&&gz()&&!gP()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});g0.isOpening=t,g$(e),e.dispatchEvent(c),g0.isOpening=!1}function g1(e){return 0===e.mozInputSource&&!!e.isTrusted||(gI()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}g0.isOpening=!1;var g2=t(3144),g3=new WeakMap;class g5{continuePropagation(){gY(this,g3,!1)}get shouldStopPropagation(){var e;return e=gH(this,g3,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,r){var o;gK(this,g3,{writable:!0,value:void 0}),gY(this,g3,!0);let a=null!=(o=null==r?void 0:r.target)?o:t.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,c,p=null;null!=t.clientX&&null!=t.clientY&&(c=t.clientX,p=t.clientY),i&&(null!=c&&null!=p?(s=c-i.left,l=p-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=n,this.target=t.currentTarget,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.x=s,this.y=l}}let g4=Symbol("linkClicked");function g6(e){let{onPress:n,onPressChange:t,onPressStart:r,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:d,...f}=function(e){let n=(0,uB.useContext)(gq);if(n){let{register:t,...r}=n;e=m7(r,e),t()}return gZ(n,e.ref),e}(e),[h,m]=(0,uB.useState)(!1),g=(0,uB.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=gJ(),v=mq((e,n)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,r){let t=new g5("pressstart",n,e);r(t),a=t.shouldStopPropagation}return t&&t(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),a}),$=mq((e,r,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let n=new g5("pressend",r,e);o(n),l=n.shouldStopPropagation}if(t&&t(!1),m(!1),n&&a&&!s){let t=new g5("press",r,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),A=mq((e,n)=>{let t=g.current;if(s)return!1;if(a){t.isTriggeringEvent=!0;let r=new g5("pressup",n,e);return a(r),t.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=mq(e=>{let n=g.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&$(g9(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,b(),u||gU(n.target),n.disposables))t();n.disposables=[]}}),k=mq(e=>{p&&w(e)}),x=mq(e=>{null==i||i(e)}),C=mq((e,n)=>{if(i){let t=new MouseEvent("click",e);gk(t,n),i(gw(t))}}),E=(0,uB.useMemo)(()=>{let e=g.current,n={onKeyDown(n){if(g8(n.nativeEvent,n.currentTarget)&&gX(n.currentTarget,gQ(n.nativeEvent))){var r;ye(gQ(n.nativeEvent),n.key)&&n.preventDefault();let o=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=v(n,"keyboard");let r=n.currentTarget;y(g_(n.currentTarget),"keyup",mG(n=>{g8(n,r)&&!n.repeat&&gX(r,gQ(n))&&e.target&&A(g9(e.target,n),"keyboard")},t),!0)}o&&n.stopPropagation(),n.metaKey&&gz()&&(null==(r=e.metaKeyEvents)||r.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||gX(n.currentTarget,gQ(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!g0.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||g1(n.nativeEvent))){let e=v(n,"virtual"),r=A(n,"virtual"),o=$(n,"virtual");x(n),t=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||n.nativeEvent.pointerType||"virtual";t=$(g9(n.currentTarget,n),r,!0),e.isOverTarget=!1,x(n),w(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,r,o;if(e.isPressed&&e.target&&g8(n,e.target)){ye(gQ(n),n.key)&&n.preventDefault();let t=gQ(n),o=gX(e.target,gQ(n));$(g9(e.target,n),"keyboard",o),o&&C(n,e.target),b(),"Enter"!==n.key&&g7(e.target)&&gX(e.target,t)&&!n[g4]&&(n[g4]=!0,g0(e.target,n,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(n.key)}else if("Meta"===n.key&&(null==(t=e.metaKeyEvents)?void 0:t.size)){let n=e.metaKeyEvents;for(let t of(e.metaKeyEvents=void 0,n.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",t))}};if("u">typeof PointerEvent){n.onPointerDown=n=>{var o;if(0!==n.button||!gX(n.currentTarget,gQ(n.nativeEvent)))return;if(o=n.nativeEvent,!gI()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=n.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,u||function(e){if(gT()){if("default"===gW){let n=g_(e);gV=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}gW="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";gG.set(e,e.style[n]),e.style[n]="none"}}(e.target),a=v(n,e.pointerType);let o=gQ(n.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(n.pointerId),y(g_(n.currentTarget),"pointerup",t,!1),y(g_(n.currentTarget),"pointercancel",r,!1)}a&&n.stopPropagation()},n.onMouseDown=n=>{if(gX(n.currentTarget,gQ(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!gy(e);)e=e.parentElement;let n=gv(e),t=n.document.activeElement;if(!t||t===e)return;gC=!0;let r=!1,o=e=>{(e.target===t||r)&&e.stopImmediatePropagation()},a=n=>{(n.target===t||r)&&(n.stopImmediatePropagation(),e||r||(r=!0,g$(t),l()))},i=n=>{(n.target===e||r)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||r)&&(n.stopImmediatePropagation(),r||(r=!0,g$(t),l()))};n.addEventListener("blur",o,!0),n.addEventListener("focusout",a,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",o,!0),n.removeEventListener("focusout",a,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),gC=!1,r=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{gX(n.currentTarget,gQ(n.nativeEvent))&&"virtual"!==e.pointerType&&0===n.button&&A(n,e.pointerType||n.pointerType)},n.onPointerEnter=n=>{n.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(g9(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,$(g9(e.target,n),e.pointerType,!1),k(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(gX(e.target,gQ(n))&&null!=e.pointerType){let t=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?w(n):(g$(e.target),e.target.click()))},80);y(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(n);e.isOverTarget=!1}},r=e=>{w(e)};n.onDragStart=e=>{gX(e.currentTarget,gQ(e.nativeEvent))&&w(e)}}return n},[y,s,c,b,u,w,k,$,v,A,x,C]);return(0,uB.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof gv(e).Element&&"auto"===gv(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,uB.useEffect)(()=>{let e=g.current;return()=>{var n;for(let t of(u||gU(null!=(n=e.target)?n:void 0),e.disposables))t();e.disposables=[]}},[u]),{isPressed:l||h,pressProps:m7(f,E)}}function g7(e){return"A"===e.tagName&&e.hasAttribute("href")}function g8(e,n){let{key:t,code:r}=e,o=n.getAttribute("role");return("Enter"===t||" "===t||"Spacebar"===t||"Space"===r)&&!(n instanceof gv(n).HTMLInputElement&&!yt(n,t)||n instanceof gv(n).HTMLTextAreaElement||n.isContentEditable)&&!(("link"===o||!o&&g7(n))&&"Enter"!==t)}function g9(e,n){let t=n.clientX,r=n.clientY;return{currentTarget:e,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,clientX:t,clientY:r}}function ye(e,n){return e instanceof HTMLInputElement?!yt(e,n):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!g7(e))}let yn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yt(e,n){return"checkbox"===e.type||"radio"===e.type?" "===n:yn.has(e.type)}let yr=null,yo=new Set,ya=new Map,yi=!1,ys=!1,yl={Tab:!0,Escape:!0};function yc(e,n){for(let t of yo)t(e,n)}function yp(e){yi=!0,e.metaKey||!gz()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yr="keyboard",yc("keyboard",e))}function yu(e){yr="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(yi=!0,yc("pointer",e))}function yd(e){g1(e)&&(yi=!0,yr="virtual")}function yf(e){e.target!==window&&e.target!==document&&!gC&&e.isTrusted&&(yi||ys||(yr="virtual",yc("virtual",e)),yi=!1,ys=!1)}function yh(){gC||(yi=!1,ys=!0)}function ym(e){if("u"<typeof window||ya.get(gv(e)))return;let n=gv(e),t=g_(e),r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){yi=!0,r.apply(this,arguments)},t.addEventListener("keydown",yp,!0),t.addEventListener("keyup",yp,!0),t.addEventListener("click",yd,!0),n.addEventListener("focus",yf,!0),n.addEventListener("blur",yh,!1),"u">typeof PointerEvent&&(t.addEventListener("pointerdown",yu,!0),t.addEventListener("pointermove",yu,!0),t.addEventListener("pointerup",yu,!0)),n.addEventListener("beforeunload",()=>{yg(e)},{once:!0}),ya.set(n,{focus:r})}let yg=(e,n)=>{let t=gv(e),r=g_(e);n&&r.removeEventListener("DOMContentLoaded",n),ya.has(t)&&(t.HTMLElement.prototype.focus=ya.get(t).focus,r.removeEventListener("keydown",yp,!0),r.removeEventListener("keyup",yp,!0),r.removeEventListener("click",yd,!0),t.removeEventListener("focus",yf,!0),t.removeEventListener("blur",yh,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",yu,!0),r.removeEventListener("pointermove",yu,!0),r.removeEventListener("pointerup",yu,!0)),ya.delete(t))};function yy(){return"pointer"!==yr}"u">typeof document&&("loading"!==(d=g_(void 0)).readyState?ym(void 0):d.addEventListener("DOMContentLoaded",()=>{ym(void 0)}));let yb=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function y_(e){let n=g_(e),t=((e=document)=>e.activeElement)(n);"virtual"===yr?gL(()=>{((e=document)=>e.activeElement)(n)===t&&e.isConnected&&g$(e)}):g$(e)}function yv(e){let{isDisabled:n,onFocus:t,onBlur:r,onFocusChange:o}=e,a=(0,uB.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),i=gx(a),s=(0,uB.useCallback)(e=>{let n=g_(e.target),r=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();e.target===e.currentTarget&&r===gQ(e.nativeEvent)&&(t&&t(e),o&&o(!0),i(e))},[o,t,i]);return{focusProps:{onFocus:!n&&(t||o||r)?s:void 0,onBlur:!n&&(r||o)?a:void 0}}}function y$(e){if(!e)return;let n=!0;return t=>{e({...t,preventDefault(){t.preventDefault()},isDefaultPrevented:()=>t.isDefaultPrevented(),stopPropagation(){n=!0},continuePropagation(){n=!1},isPropagationStopped:()=>n}),n&&t.stopPropagation()}}let yA=uj().createContext(null);function yw(e,n){let{focusProps:t}=yv(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:y$(e.onKeyDown),onKeyUp:y$(e.onKeyUp)}},o=m7(t,r),a=function(e){let n=(0,uB.useContext)(yA)||{};gZ(n,e);let{ref:t,...r}=n;return r}(n),i=e.isDisabled?{}:a,s=(0,uB.useRef)(e.autoFocus);(0,uB.useEffect)(()=>{s.current&&n.current&&y_(n.current),s.current=!1},[n]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:m7({...o,tabIndex:l},i)}}function yk(e){let{isDisabled:n,onBlurWithin:t,onFocusWithin:r,onFocusWithinChange:o}=e,a=(0,uB.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=gJ(),l=(0,uB.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),t&&t(e),o&&o(!1))},[t,o,a,s]),c=gx(l),p=(0,uB.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let n=g_(e.target),t=((e=document)=>e.activeElement)(n);if(!a.current.isFocusWithin&&t===gQ(e.nativeEvent)){r&&r(e),o&&o(!0),a.current.isFocusWithin=!0,c(e);let t=e.currentTarget;i(n,"focus",e=>{if(a.current.isFocusWithin&&!gX(t,e.target)){let r=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});gk(r,t),l(gw(r))}},{capture:!0})}},[r,o,c,i,l]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:l}}}function yx(e={}){var n;let{autoFocus:t=!1,isTextInput:r,within:o}=e,a=(0,uB.useRef)({isFocused:!1,isFocusVisible:t||yy()}),[i,s]=(0,uB.useState)(!1),[l,c]=(0,uB.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),p=(0,uB.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]),u=(0,uB.useCallback)(e=>{a.current.isFocused=e,s(e),p()},[p]);n={isTextInput:r},ym(),(0,uB.useEffect)(()=>{let e=(e,t)=>{var r;let o,i,s,l,c;r=!!(null==n?void 0:n.isTextInput),o=g_(null==t?void 0:t.target),i="u">typeof window?gv(null==t?void 0:t.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?gv(null==t?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?gv(null==t?void 0:t.target).HTMLElement:HTMLElement,c="u">typeof window?gv(null==t?void 0:t.target).KeyboardEvent:KeyboardEvent,(r=r||o.activeElement instanceof i&&!yb.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&t instanceof c&&!yl[t.key]||(e=>{a.current.isFocusVisible=e,p()})(yy())};return yo.add(e),()=>{yo.delete(e)}},[]);let{focusProps:d}=yv({isDisabled:o,onFocusChange:u}),{focusWithinProps:f}=yk({isDisabled:!o,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:o?f:d}}uj().forwardRef(function(e,n){let{children:t,...r}=e,o=mV(n),a={...r,ref:o};return uj().createElement(yA.Provider,{value:a},t)});let yC=!1,yE=0;function yS(e){"touch"===e.pointerType&&(yC=!0,setTimeout(()=>{yC=!1},50))}function yD(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",yS),yE++,()=>{!(--yE>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",yS)}}function yz(e){let{onHoverStart:n,onHoverChange:t,onHoverEnd:r,isDisabled:o}=e,[a,i]=(0,uB.useState)(!1),s=(0,uB.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,uB.useEffect)(yD,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=gJ(),{hoverProps:p,triggerHoverEnd:u}=(0,uB.useMemo)(()=>{let e=(e,n)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==n&&s.isHovered&&o&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:o,pointerType:n}),t&&t(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=r=>{yC&&"mouse"===r.pointerType||((r,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let c=r.currentTarget;s.target=c,l(g_(r.target),"pointerover",n=>{s.isHovered&&s.target&&!gX(s.target,n.target)&&e(n,n.pointerType)},{capture:!0}),n&&n({type:"hoverstart",target:c,pointerType:a}),t&&t(!0),i(!0)})(r,r.pointerType)},a.onPointerLeave=n=>{!o&&n.currentTarget.contains(n.target)&&e(n,n.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[n,t,r,o,s,l,c]);return(0,uB.useEffect)(()=>{o&&u({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:p,isHovered:a}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let yM=(0,uB.createContext)(!1);function yP(e){let n=(n,t)=>(0,uB.useContext)(yM)?null:e(n,t);return n.displayName=e.displayName||e.name,(0,uB.forwardRef)(n)}let yT=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),yO=(0,uB.createContext)({}),yN=yP(function(e,n){var t;[e,n]=gt(e,n,yO);let r=((t=e).isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),e=t),{isPending:o}=r,{buttonProps:a,isPressed:i}=function(e,n){let t,{elementType:r="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:p,allowFocusWhenDisabled:u,onClick:d,href:f,target:h,rel:m,type:g="button"}=e;t="button"===r?{type:g,disabled:o}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?g:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:y,isPressed:b}=g6({onPressStart:i,onPressEnd:s,onPressChange:c,onPress:a,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:p,ref:n}),{focusableProps:v}=yw(e,n);u&&(v.tabIndex=o?-1:v.tabIndex);let $=m7(v,y,gf(e,{labelable:!0}));return{isPressed:b,buttonProps:m7(t,$,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}(e,n),{focusProps:s,isFocused:l,isFocusVisible:c}=yx(e),{hoverProps:p,isHovered:u}=yz({...e,isDisabled:e.isDisabled||o}),d={isHovered:u,isPressed:(r.isPressed||i)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=ge({...e,values:d,defaultClassName:"react-aria-Button"}),h=m5(a.id),m=m5(),g=a["aria-labelledby"];o&&(g?g=`${g} ${m}`:a["aria-label"]&&(g=`${h} ${m}`));let y=(0,uB.useRef)(o);return(0,uB.useEffect)(()=>{let e={"aria-labelledby":g||h};!y.current&&l&&o?gs(e,"assertive"):y.current&&l&&!o&&gs(e,"assertive"),y.current=o},[o,l,g,h]),uj().createElement("button",{...gf(e,{propNames:yT}),...m7(a,s,p),...f,type:"submit"===a.type&&o?"button":a.type,id:h,ref:n,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},uj().createElement(ga.Provider,{value:{id:m}},f.children))});(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null);let yI=(0,uB.createContext)({}),yB=(0,uB.createContext)({}),yj=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,yB);let{elementType:t="span",...r}=e;return uj().createElement(t,{className:"react-aria-Text",...r,ref:n})}),yR=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),yF=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yL(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),t="function"==typeof n.getTextInfo?n.getTextInfo():n.textInfo;if(t)return"rtl"===t.direction;if(n.script)return yR.has(n.script)}let n=e.split("-")[0];return yF.has(n)}let yW=Symbol.for("react-aria.i18n.locale");function yV(){let e="u">typeof window&&window[yW]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:yL(e)?"rtl":"ltr"}}let yG=yV(),yU=new Set;function yq(){for(let e of(yG=yV(),yU))e(yG)}function yH(){let e=m1(),[n,t]=(0,uB.useState)(yG);return((0,uB.useEffect)(()=>(0===yU.size&&window.addEventListener("languagechange",yq),yU.add(t),()=>{yU.delete(t),0===yU.size&&window.removeEventListener("languagechange",yq)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let yK=uj().createContext(null);function yY(e){let{locale:n,children:t}=e,r=yH(),o=uj().useMemo(()=>n?{locale:n,direction:yL(n)?"rtl":"ltr"}:r,[r,n]);return uj().createElement(yK.Provider,{value:o},t)}function yZ(){let e=yH();return(0,uB.useContext)(yK)||e}var yJ={};function yX(e,n){return e-n*Math.floor(e/n)}function yQ(e,n,t,r){let o=(n=y1(e,n))-1,a=-2;return t<=2?a=0:y0(n)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*t-362)/12+a+r)}function y0(e){return e%4==0&&(e%100!=0||e%400==0)}function y1(e,n){return"BC"===e?1-n:n}function y2(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}yJ={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let y3={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class y5{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),r=yX(n,146097),o=Math.floor(r/36524),a=yX(r,36524),i=Math.floor(a/1461),s=Math.floor(yX(a,1461)/365),[l,c]=y2(400*t+100*o+4*i+s+ +(4!==o&&4!==s)),p=e-yQ(l,c,1,1),u=2;e<yQ(l,c,3,1)?u=0:y0(c)&&(u=1);let d=Math.floor(((p+u)*12+373)/367),f=e-yQ(l,c,d,1)+1;return new bg(l,c,d,f)}toJulianDay(e){return yQ(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return y3[y0(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return y0(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function y4(e,n){let t=e.copy(),r="hour"in t?ba(t,n):0;y6(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,y7(t),y8(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=r,function(e){for(;e.day<1;)e.month--,y7(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,y7(e)}(t),t.calendar.balanceDate&&t.calendar.balanceDate(t),t.year<1&&(t.year=1,t.month=1,t.day=1);let o=t.calendar.getYearsInEra(t);if(t.year>o){var a,i;let e=null==(a=(i=t.calendar).isInverseEra)?void 0:a.call(i,t);t.year=o,t.month=e?1:t.calendar.getMonthsInYear(t),t.day=e?1:t.calendar.getDaysInMonth(t)}t.month<1&&(t.month=1,t.day=1);let s=t.calendar.getMonthsInYear(t);return t.month>s&&(t.month=s,t.day=t.calendar.getDaysInMonth(t)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day)),t}function y6(e,n){var t,r;(null==(t=(r=e.calendar).isInverseEra)?void 0:t.call(r,e))&&(n=-n),e.year+=n}function y7(e){for(;e.month<1;)y6(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,y6(e,1)}function y8(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function y9(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),y8(e)}function be(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function bn(e,n){let t=e.copy();return null!=n.era&&(t.era=n.era),null!=n.year&&(t.year=n.year),null!=n.month&&(t.month=n.month),null!=n.day&&(t.day=n.day),y9(t),t}function bt(e,n){let t=e.copy();return null!=n.hour&&(t.hour=n.hour),null!=n.minute&&(t.minute=n.minute),null!=n.second&&(t.second=n.second),null!=n.millisecond&&(t.millisecond=n.millisecond),br(t),t}function br(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bo(e,n){let t=e%n;return t<0&&(t+=n),t}function ba(e,n){let t;return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bo(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bo(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bo(e.minute,60),t=Math.floor(e.hour/24),e.hour=bo(e.hour,24),t}function bi(e,n){let t=e.copy();return ba(t,n),t}function bs(e,n,t,r){let o=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),a=n.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=bc(a,t,0,n.length-1,null==r?void 0:r.round),o.era=n[a],y9(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(t=-t),o.year=bc(e.year,t,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bc(e.month,t,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=bc(e.day,t,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),y9(o),o}function bl(e,n,t,r){let o=e.copy();switch(n){case"hour":{let n=e.hour,a=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=n>=12;a=12*!!e,i=e?23:11}o.hour=bc(n,t,a,i,null==r?void 0:r.round);break}case"minute":o.minute=bc(e.minute,t,0,59,null==r?void 0:r.round);break;case"second":o.second=bc(e.second,t,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=bc(e.millisecond,t,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return o}function bc(e,n,t,r,o=!1){if(o){(e+=Math.sign(n))<t&&(e=r);let o=Math.abs(n);(e=n>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=t)}else(e+=n)<t?e=r-(t-e-1):e>r&&(e=t+(e-r-1));return e}function bp(e,n){let t;return t=(null!=n.years&&0!==n.years||null!=n.months&&0!==n.months||null!=n.weeks&&0!==n.weeks||null!=n.days&&0!==n.days?bS(y4(bP(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):bw(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),bT(bz(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function bu(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bd(e){let n,t=bT(e,new y5);return n="BC"===t.era?1===t.year?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function bf(e){return`${bd(e)}T${bu(e)}`}function bh(e){let n,t="object"==typeof e[0]?e.shift():new y5;if("string"==typeof e[0])n=e.shift();else{let e=t.getEras();n=e[e.length-1]}return[t,n,e.shift(),e.shift(),e.shift()]}var bm=new WeakMap;class bg{copy(){return this.era?new bg(this.calendar,this.era,this.year,this.month,this.day):new bg(this.calendar,this.year,this.month,this.day)}add(e){return y4(this,e)}subtract(e){return y4(this,be(e))}set(e){return bn(this,e)}cycle(e,n,t){return bs(this,e,n,t)}toDate(e){return bD(this,e)}toString(){return bd(this)}compare(e){return bW(this,e)}constructor(...e){gK(this,bm,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e);this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,y9(this)}}var by=new WeakMap;class bb{copy(){return new bb(this.hour,this.minute,this.second,this.millisecond)}add(e){return bi(this,e)}subtract(e){return bi(this,be(e))}set(e){return bt(this,e)}cycle(e,n,t){return bl(this,e,n,t)}toString(){return bu(this)}compare(e){var n,t;return n=this,t=e,bV(n)-bV(t)}constructor(e=0,n=0,t=0,r=0){gK(this,by,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=r,br(this)}}var b_=new WeakMap;class bv{copy(){return this.era?new bv(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bv(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return y4(this,e)}subtract(e){return y4(this,be(e))}set(e){return bn(bt(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return bs(this,e,n,t);default:return bl(this,e,n,t)}}toDate(e,n){return bD(this,e,n)}toString(){return bf(this)}compare(e){var n,t;let r=bW(this,e);return 0===r?(n=this,t=bP(e),bV(n)-bV(t)):r}constructor(...e){gK(this,b_,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e);this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,y9(this)}}var b$=new WeakMap;class bA{copy(){return this.era?new bA(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bA(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bp(this,e)}subtract(e){return bp(this,be(e))}set(e,n){let t,r;return 0===(r=bt(bn(t=bP(this),e),e)).compare(t)?this:bT(bz(bS(r,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,r){switch(n){case"hour":{let n=0,o=23;if((null==r?void 0:r.hourCycle)===12){let t=e.hour>=12;n=12*!!t,o=t?23:11}let a=bP(e),i=bT(bt(a,{hour:n}),new y5),s=[bS(i,e.timeZone,"earlier"),bS(i,e.timeZone,"later")].filter(n=>bz(n,e.timeZone).day===i.day)[0],l=bT(bt(a,{hour:o}),new y5),c=[bS(l,e.timeZone,"earlier"),bS(l,e.timeZone,"later")].filter(n=>bz(n,e.timeZone).day===l.day).pop(),p=bw(e)-e.offset,u=Math.floor(p/36e5),d=p%36e5;return bT(bz(p=36e5*bc(u,t,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bl(e,n,t,r);case"era":case"year":case"month":case"day":return bT(bz(bS(bs(bP(e),n,t,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){var e;return e=this,new Date(bw(e)-e.offset)}toString(){var e;let n,t,r;return`${bf(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n){if(e instanceof bA){var t,r;return e.timeZone===n?e:(t=e,r=n,bT(bz(bw(t)-t.offset,r),t.calendar))}return bz(bS(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){gK(this,b$,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,y9(this)}}function bw(e){return bk(y1((e=bT(e,new y5)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bk(e,n,t,r,o,a,i){let s=new Date;return s.setUTCHours(r,o,a,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function bx(e,n){if("UTC"===n)return 0;if(e>0&&n===bU())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:r,day:o,hour:a,minute:i,second:s}=bE(e,n);return bk(t,r,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let bC=new Map;function bE(e,n){let t=bC.get(n);t||(t=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),bC.set(n,t));let r=t.formatToParts(new Date(e)),o={};for(let e of r)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function bS(e,n,t="compatible"){var r,o,a;let i=bP(e);if("UTC"===n)return bw(i);if(n===bU()&&"compatible"===t){i=bT(i,new y5);let e=new Date,n=y1(i.era,i.year);return e.setFullYear(n,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=bw(i),l=bx(s-864e5,n),c=bx(s+864e5,n),p=(r=i,((o=s-l)==(a=s-c)?[o]:[o,a]).filter(e=>{var t;let o;return t=r,o=bE(e,n),t.year===o.year&&t.month===o.month&&t.day===o.day&&t.hour===o.hour&&t.minute===o.minute&&t.second===o.second}));if(1===p.length)return p[0];if(p.length>1)switch(t){case"compatible":case"earlier":return p[0];case"later":return p[p.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(t){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function bD(e,n,t="compatible"){return new Date(bS(e,n,t))}function bz(e,n){let t=bx(e,n),r=new Date(e+t),o=r.getUTCFullYear();return new bA(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),n,t,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function bM(e){return new bg(e.calendar,e.era,e.year,e.month,e.day)}function bP(e,n){let t=0,r=0,o=0,a=0;if("timeZone"in e)({hour:t,minute:r,second:o,millisecond:a}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:r,second:o,millisecond:a}=n),new bv(e.calendar,e.era,e.year,e.month,e.day,t,r,o,a)}function bT(e,n){if(bB(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=n,r.era=t.era,r.year=t.year,r.month=t.month,r.day=t.day,y9(r),r}let bO={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function bN(e,n){return n=bT(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function bI(e,n){return bB(e.calendar,n.calendar)&&bN(e,n)}function bB(e,n){var t,r,o,a;return null!=(a=null!=(o=null==(t=e.isEqual)?void 0:t.call(e,n))?o:null==(r=n.isEqual)?void 0:r.call(n,e))?a:e.identifier===n.identifier}let bj={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function bR(e,n,t){let r,o=Math.ceil(e.calendar.toJulianDay(e)+1-(t?bj[t]:(r=function(e){if(Intl.Locale){let n=bY.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&bY.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&bO[r]||0))%7;return o<0&&(o+=7),o}function bF(e){return bz(Date.now(),e)}function bL(e){return bM(bF(e))}function bW(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function bV(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let bG=null;function bU(){return null==bG&&(bG=new Intl.DateTimeFormat().resolvedOptions().timeZone),bG}function bq(e){return e.subtract({days:e.day-1})}function bH(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function bK(e,n,t){let r=bR(e,n,t);return e.subtract({days:r})}let bY=new Map;function bZ(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function bJ(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}let bX=Symbol.for("react-aria.i18n.locale"),bQ=Symbol.for("react-aria.i18n.strings");class b0{getStringForLocale(e,n){let t=this.getStringsForLocale(n)[e];if(!t)throw Error(`Could not find intl message ${e} in ${n} locale`);return t}getStringsForLocale(e){let n=this.strings[e];return n||(n=function(e,n,t="en-US"){var r;if(n[e])return n[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(n[o])return n[o];for(let e in n)if(e.startsWith(o+"-"))return n[e];return n[t]}(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let n=window[bX];if(void 0===f){let e=window[bQ];if(!e)return null;for(let t in f={},e)f[t]=new b0({[n]:e[t]},n)}let t=null==f?void 0:f[e];if(!t)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return t}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=n}}let b1=new Map,b2=new Map;class b3{format(e,n){let t=this.strings.getStringForLocale(e,this.locale);return"function"==typeof t?t(n,this):t}plural(e,n,t="cardinal"){let r=n["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+t,a=b1.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:t}),b1.set(o,a)),"function"==typeof(r=n[a.select(e)]||n.other)?r():r}number(e){let n=b2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),b2.set(this.locale,n)),n.format(e)}select(e,n){let t=e[n]||e.other;return"function"==typeof t?t():t}constructor(e,n){this.locale=e,this.strings=n}}let b5=new WeakMap;function b4(e,n){let t;return n&&b0.getGlobalDictionaryForPackage(n)||((t=b5.get(e))||(t=new b0(e),b5.set(e,t)),t)}function b6(e,n){let{locale:t}=yZ(),r=b4(e,n);return(0,uB.useMemo)(()=>new b3(t,r),[t,r])}let b7=new Map;class b8{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,n);if(n<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(n)}`}formatRangeToParts(e,n){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,n);if(n<e)throw RangeError("End date must be >= start date");let t=this.formatter.formatToParts(e),r=this.formatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==_t&&(_t="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_t&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,n){if(!n.timeStyle&&!n.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let t=_e(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...n,timeZone:void 0}),r=parseInt(t.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(t.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=_e(e,n),this.options=n}}let b9={true:{ja:"h11"},false:{}};function _e(e,n={}){if("boolean"==typeof n.hour12&&(null==_n&&(_n="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_n)){let t=b9[String((n={...n}).hour12)][e.split("-")[0]],r=n.hour12?"h12":"h23";n.hourCycle=null!=t?t:r,delete n.hour12}let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(b7.has(t))return b7.get(t);let r=new Intl.DateTimeFormat(e,n);return b7.set(t,r),r}let _n=null,_t=null;function _r(e,n){let t=(0,uB.useRef)(null);return e&&t.current&&n(e,t.current)&&(e=t.current),t.current=e,e}function _o(e){e=_r(null!=e?e:{},_a);let{locale:n}=yZ();return(0,uB.useMemo)(()=>new b8(n,e),[n,e])}function _a(e,n){if(e===n)return!0;let t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(let r of t)if(n[r]!==e[r])return!1;return!0}function _i(e){return e&&e.__esModule?e.default:e}let _s=new WeakMap;function _l(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _c(e,n,t,r){let o=b6(_i(yJ),"@react-aria/calendar"),a=_l(e)||_l(n),i=_o({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:t}),s=_o({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:t});return(0,uB.useMemo)(()=>{if(bN(e,bq(e))){let a=e,s=n;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),n.calendar.getFormattableMonth&&(s=n.calendar.getFormattableMonth(n)),bN(n,bH(e)))return i.format(a.toDate(t));if(bN(n,bH(n)))return r?_p(i,o,a,s,t):i.formatRange(a.toDate(t),s.toDate(t))}return r?_p(s,o,e,n,t):s.formatRange(e.toDate(t),n.toDate(t))},[e,n,i,s,o,t,r])}function _p(e,n,t,r,o){let a=e.formatRangeToParts(t.toDate(o),r.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let n=a[e];if("shared"===n.source&&"literal"===n.type)i=e;else if("endRange"===n.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return n.format("dateRange",{startDate:s,endDate:l})}function _u(e,n){let t=(0,uB.useRef)(!0),r=(0,uB.useRef)(null);(0,uB.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),(0,uB.useEffect)(()=>{let o=r.current;t.current?t.current=!1:(!o||n.some((e,n)=>!Object.is(e,o[n])))&&e(),r.current=n},n)}function _d(e,n){let{id:t,"aria-label":r,"aria-labelledby":o}=e;return t=m5(t),o&&r?o=[...new Set([t,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!n||(r=n),{id:t,"aria-label":r,"aria-labelledby":o}}function _f(e,n){var t,r;let o,a,i,s,l,c=b6((t=yJ)&&t.__esModule?t.default:t,"@react-aria/calendar"),p=gf(e),u=_c(n.visibleRange.start,n.visibleRange.end,n.timeZone,!1),d=_c(n.visibleRange.start,n.visibleRange.end,n.timeZone,!0);_u(()=>{n.isFocused||gs(d)},[d]);let f=(i=b6(_i(yJ),"@react-aria/calendar"),"highlightedRange"in n?{start:o,end:a}=n.highlightedRange||{}:o=a=null!=(r=n.value)?r:void 0,s=_o({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_l(o)||_l(a),timeZone:n.timeZone}),l="anchorDate"in n?n.anchorDate:null,(0,uB.useMemo)(()=>{if(!l&&o&&a)if(bN(o,a)){let e=s.format(o.toDate(n.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=_p(s,i,o,a,n.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,n.timeZone,i,s]));_u(()=>{f&&gs(f,"polite",4e3)},[f]);let h=m4([!!e.errorMessage,e.isInvalid,e.validationState]);_s.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,g]=(0,uB.useState)(!1),y=e.isDisabled||n.isNextVisibleRangeInvalid();y&&m&&(g(!1),n.setFocused(!0));let[b,v]=(0,uB.useState)(!1),$=e.isDisabled||n.isPreviousVisibleRangeInvalid();return $&&b&&(v(!1),n.setFocused(!0)),{calendarProps:m7(p,_d({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>n.focusNextPage(),"aria-label":c.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>n.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:$,onFocusChange:v},errorMessageProps:{id:h},title:u}}let _h={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function _m(e){let{children:n,elementType:t="div",isFocusable:r,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:n,isFocusable:t}=e,[r,o]=(0,uB.useState)(!1),{focusWithinProps:a}=yk({isDisabled:!t,onFocusWithinChange:e=>o(e)}),i=(0,uB.useMemo)(()=>r?n:n?{..._h,...n}:_h,[r]);return{visuallyHiddenProps:{...a,style:i}}}(e);return uj().createElement(t,m7(a,i),n)}function _g(e,n,t,r){let o=mq(t),a=null==t;(0,uB.useEffect)(()=>{if(a||!e.current)return;let t=e.current;return t.addEventListener(n,o,r),()=>{t.removeEventListener(n,o,r)}},[e,n,r,a,o])}let _y=0,_b=new Map;function __(e){let[n,t]=(0,uB.useState)();return mU(()=>{if(!e)return;let n=_b.get(e);if(n)t(n.element.id);else{let r=`react-aria-description-${_y++}`;t(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},_b.set(e,n)}return n.refCount++,()=>{n&&0==--n.refCount&&(n.element.remove(),_b.delete(e))}},[e]),{"aria-describedby":e?n:void 0}}function _v(e,n){if(!e)return!1;let t=window.getComputedStyle(e),r=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return r&&n&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function _$(e,n,t){let r="left"===t?"offsetLeft":"offsetTop",o=0;for(;n.offsetParent&&(o+=n[r],n.offsetParent!==e);){if(n.offsetParent.contains(e)){o-=e[r];break}n=n.offsetParent}return o}function _A(e,n){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let n of function(e){let n=[];for(;e&&e!==document.documentElement;)_v(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,n){let t=_$(e,n,"left"),r=_$(e,n,"top"),o=n.offsetWidth,a=n.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:p,scrollPaddingRight:u,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),h=i+parseInt(c,10),m=s+parseInt(l,10),g=h+e.clientWidth,y=m+e.clientHeight,b=parseInt(p,10)||0,v=parseInt(d,10)||0,$=parseInt(u,10)||0,A=parseInt(f,10)||0;t<=i+A?i=t-parseInt(c,10)-A:t+o>g-$&&(i+=t+o-g+$),r<=m+b?s=r-parseInt(l,10)-b:r+a>y-v&&(s+=r+a-y+v),e.scrollLeft=i,e.scrollTop=s}(n,e);else{var t,r,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-c)>1)&&(null==n||null==(o=n.containingElement)||null==(r=o.scrollIntoView)||r.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function _w(e,n){let t=e;for(_v(t,n)&&(t=t.parentElement);t&&!_v(t,n);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}class _k extends y5{fromJulianDay(e){let n=super.fromJulianDay(e);return new bg(this,y1(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(_x(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(_x(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function _x(e){let[n,t]=y2(e.year+-543);return new bg(n,t,e.month,e.day)}function _C(e,n,t,r){return e+365*n+Math.floor(n/4)+30*(t-1)+r-1}function _E(e,n){let t=Math.floor(4*(n-e)/1461),r=1+Math.floor((n-_C(e,t,1,1))/30),o=n+1-_C(e,t,r,1);return[t,r,o]}function _S(e){return Math.floor(e%4/3)}function _D(e,n){return n%13!=0?30:_S(e)+5}class _z{fromJulianDay(e){let[n,t,r]=_E(1723856,e),o="AM";return n<=0&&(o="AA",n+=5500),new bg(this,o,n,t,r)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),_C(1723856,n,e.month,e.day)}getDaysInMonth(e){return _D(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+_S(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class _M extends _z{fromJulianDay(e){let[n,t,r]=_E(1723856,e);return new bg(this,"AA",n+=5500,t,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class _P extends _z{fromJulianDay(e){let[n,t,r]=_E(1824665,e),o="CE";return n<=0&&(o="BCE",n=1-n),new bg(this,o,n,t,r)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_C(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_D(n,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let _T=765433;function _O(e){return 7>yX(7*e+1,19)}function _N(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>yX(3*(t+1),7)&&(t+=1),t}function _I(e){let n,t;return _N(e)+(n=_N(e-1),t=_N(e),_N(e+1)-t==356?2:+(t-n==382))}function _B(e){return _I(e+1)-_I(e)}function _j(e,n){if(n>=6&&!_O(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=_B(e);switch(n>380&&(n-=30),n){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===n?2===t?30:29:3===n?0===t?29:30:6===n?30*!!_O(e):30}class _R{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/_T*19+234)/235)+1,r=_I(t),o=Math.floor(n-r);for(;o<1;)o=Math.floor(n-(r=_I(--t)));let a=1,i=0;for(;i<o;)i+=_j(t,a),a++;let s=o-(i-=_j(t,--a));return new bg(this,t,a,s)}toJulianDay(e){let n=_I(e.year);for(let t=1;t<e.month;t++)n+=_j(e.year,t);return n+e.day+347997}getDaysInMonth(e){return _j(e.year,e.month)}getMonthsInYear(e){return _O(e.year)?13:12}getDaysInYear(e){return _B(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(_O(n.year)&&!_O(e.year)&&n.month>6?e.month--:!_O(n.year)&&_O(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class _F extends y5{fromJulianDay(e){let n,t,r,o=super.fromJulianDay(e),a=o.year-78,i=e-yQ(o.era,o.year,1,1);if(i<80?(a--,i+=(n=y0(o.year-1)?31:30)+155+90+10):(n=y0(o.year)?31:30,i-=80),i<n)t=1,r=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,r=e%31+1):(e-=155,t=Math.floor(e/30)+7,r=e%30+1)}return new bg(this,a,t,r)}toJulianDay(e){let n,t,[r,o]=y2(e.year+78);return(y0(o)?(n=31,t=yQ(r,o,3,21)):(n=30,t=yQ(r,o,3,22)),1===e.month)?t+e.day-1:(t+=n+31*Math.min(e.month-2,5),e.month>=8&&(t+=(e.month-7)*30),t+=e.day-1)}getDaysInMonth(e){return 1===e.month&&y0(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function _L(e,n,t,r){return r+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function _W(e,n,t){let r=Math.floor((30*(t-n)+10646)/10631),o=Math.min(12,Math.ceil((t-(29+_L(n,r,1,1)))/29.5)+1),a=t-_L(n,r,o,1)+1;return new bg(e,r,o,a)}function _V(e){return(14+11*e)%30<11}class _G{fromJulianDay(e){return _W(this,1948440,e)}toJulianDay(e){return _L(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&_V(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return _V(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class _U extends _G{fromJulianDay(e){return _W(this,1948439,e)}toJulianDay(e){return _L(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function _q(e){return 460322+c[e-1300]}function _H(e,n){return(l[e-1300]&1<<11-(n-1))==0?29:30}function _K(e,n){let t=_q(e);for(let r=1;r<n;r++)t+=_H(e,r);return t}function _Y(e){return c[e+1-1300]-c[e-1300]}class _Z extends _G{fromJulianDay(e){let n=e-1948440,t=_q(1300),r=_q(1600);if(n<t||n>r)return super.fromJulianDay(e);{let e=1299,t=1,r=1;for(;r>0;){r=n-_q(++e)+1;let o=_Y(e);if(r===o){t=12;break}if(r<o){let n=_H(e,t);for(t=1;r>n;)r-=n,n=_H(e,++t);break}}return new bg(this,e,t,n-_K(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+_K(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):_H(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):_Y(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let n=1300;n<=1600;n++){c[n-1300]=e;for(let t=1;t<=12;t++)e+=_H(n,t)}}}}let _J=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],_X=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_Q=[1867,1911,1925,1988,2018],_0=["meiji","taisho","showa","heisei","reiwa"];function _1(e){let n=_J.findIndex(([n,t,r])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<r));return -1===n?_J.length-1:0===n?0:n-1}function _2(e){let n=_Q[_0.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new bg(e.year+n,e.month,e.day)}class _3 extends y5{fromJulianDay(e){let n=super.fromJulianDay(e),t=_1(n);return new bg(this,_0[t],n.year-_Q[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(_2(e))}balanceDate(e){let n=_2(e),t=_1(n);_0[t]!==e.era&&(e.era=_0[t],e.year=n.year-_Q[t]),this.constrainDate(e)}constrainDate(e){let n=_0.indexOf(e.era),t=_X[n];if(null!=t){let[r,o,a]=t,i=r-_Q[n];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&n>=0){let[,t,r]=_J[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(r,e.day))}}getEras(){return _0}getYearsInEra(e){let n=_0.indexOf(e.era),t=_J[n],r=_J[n+1];if(null==r)return 9999-t[0]+1;let o=r[0]-t[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(_2(e))}getMinimumMonthInYear(e){let n=_5(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=_5(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function _5(e){if(1===e.year)return _J[_0.indexOf(e.era)]}let _4=[0,31,62,93,124,155,186,216,246,276,306,336];class _6{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),r=n-(365*(t-1)+Math.floor((8*t+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),a=r-_4[o]+1;return new bg(this,t,o+1,a)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=_4[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>yX(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function _7(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function _8(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class _9 extends y5{fromJulianDay(e){let n=super.fromJulianDay(e),[t,r]=_8(y1(n.era,n.year));return new bg(this,t,r,n.month,n.day)}toJulianDay(e){return super.toJulianDay(ve(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=_8(_7(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(ve(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function ve(e){let[n,t]=y2(_7(e));return new bg(n,t,e.month,e.day)}function vn(e){switch(e){case"buddhist":return new _k;case"ethiopic":return new _z;case"ethioaa":return new _M;case"coptic":return new _P;case"hebrew":return new _R;case"indian":return new _F;case"islamic-civil":return new _G;case"islamic-tbla":return new _U;case"islamic-umalqura":return new _Z;case"japanese":return new _3;case"persian":return new _6;case"roc":return new _9;default:return new y5}}function vt(e,n,t){return null!=n&&0>e.compare(n)||null!=t&&e.compare(t)>0}function vr(e,n,t,r,o){let a={};for(let e in n)a[e]=Math.floor(n[e]/2),a[e]>0&&n[e]%2==0&&a[e]--;let i=vo(e,n,t).subtract(a);return vi(e,i,n,t,r,o)}function vo(e,n,t,r,o){let a=e;if(n.years)a=bq(e.subtract({months:e.month-1}));else n.months?a=bq(e):n.weeks&&(a=bK(e,t));return vi(e,a,n,t,r,o)}function va(e,n,t,r,o){let a={...n};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vo(e,n,t).subtract(a);return vi(e,i,n,t,r,o)}function vi(e,n,t,r,o,a){if(o&&e.compare(o)>=0){let e=bJ(n,vo(bM(o),t,r));e&&(n=e)}if(a&&0>=e.compare(a)){let e=bZ(n,va(bM(a),t,r));e&&(n=e)}return n}function vs(e,n,t){if(n){let t=bJ(e,bM(n));t&&(e=t)}if(t){let n=bZ(e,bM(t));n&&(e=n)}return e}function vl(e,n,t){if(!t)return e;for(;e.compare(n)>=0&&t(e);)e=e.subtract({days:1});return e.compare(n)>=0?e:null}function vc(e,n,t){let[r,o]=(0,uB.useState)(e||n),a=(0,uB.useRef)(void 0!==e),i=void 0!==e;(0,uB.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:r,l=(0,uB.useCallback)((e,...n)=>{let r=(e,...n)=>{t&&!Object.is(s,e)&&t(e,...n),i||(s=e)};"function"==typeof e?o((t,...o)=>{let a=e(i?s:t,...o);return(r(a,...n),i)?t:a}):(i||o(e),r(e,...n))},[i,s,t]);return[s,l]}function vp(e){var n,t,r;let o=(0,uB.useMemo)(()=>new b8(e.locale),[e.locale]),a=(0,uB.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:p,selectionAlignment:u,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,uB.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vc(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),b=(0,uB.useMemo)(()=>g?bT(bM(g),m):null,[g,m]),v=(0,uB.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[$,A]=vc((0,uB.useMemo)(()=>e.focusedValue?vs(bT(bM(e.focusedValue),m),c,p):void 0,[e.focusedValue,m,c,p]),(0,uB.useMemo)(()=>vs(e.defaultFocusedValue?bT(bM(e.defaultFocusedValue),m):b||bT(bL(v),m),c,p),[e.defaultFocusedValue,b,v,m,c,p]),e.onFocusChange),[w,k]=(0,uB.useState)(()=>{switch(u){case"start":return vo($,l,i,c,p);case"end":return va($,l,i,c,p);default:return vr($,l,i,c,p)}}),[x,C]=(0,uB.useState)(e.autoFocus||!1),E=(0,uB.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,w.add(e)},[w,l]),[S,D]=(0,uB.useState)(m);if(!bB(m,S)){let e=bT($,m);k(vr(e,l,i,c,p)),A(e),D(m)}function z(e){A(e=vs(e,c,p))}function M(n){if(!e.isDisabled&&!e.isReadOnly){let e=n;if(null===e)return void y(null);(e=vl(e=vs(e,c,p),w,d))&&(e=bT(e,(null==g?void 0:g.calendar)||new y5),g&&"hour"in g?y(g.set(e)):y(e))}}vt($,c,p)?A(vs($,c,p)):0>$.compare(w)?k(va($,l,i,c,p)):$.compare(E)>0&&k(vo($,l,i,c,p));let P=(0,uB.useMemo)(()=>!!b&&(!!(d&&d(b))||vt(b,c,p)),[b,d,c,p]),T=e.isInvalid||"invalid"===e.validationState||P,O=(0,uB.useMemo)(()=>"visible"===f?l:vu(l),[f,l]);return{isDisabled:null!=(t=e.isDisabled)&&t,isReadOnly:null!=(r=e.isReadOnly)&&r,value:b,setValue:M,visibleRange:{start:w,end:E},minValue:c,maxValue:p,focusedDate:$,timeZone:v,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){z(e),C(!0)},focusNextDay(){z($.add({days:1}))},focusPreviousDay(){z($.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&z($.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&z($.subtract({weeks:1}))},focusNextPage(){let e=w.add(O);A(vs($.add(O),c,p)),k(vo(vi($,e,O,i,c,p),O,i))},focusPreviousPage(){let e=w.subtract(O);A(vs($.subtract(O),c,p)),k(vo(vi($,e,O,i,c,p),O,i))},focusSectionStart(){l.days?z(w):l.weeks?z(bK($,i)):(l.months||l.years)&&z(bq($))},focusSectionEnd(){l.days?z(E):l.weeks?z(bK($,i,void 0).add({days:6})):(l.months||l.years)&&z(bH($))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?z($.add({months:1})):(l.months||l.years)&&z($.add({years:1})):z($.add(vu(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?z($.subtract({months:1})):(l.months||l.years)&&z($.subtract({years:1})):z($.subtract(vu(l)))},selectFocusedDate(){d&&d($)||M($)},selectDate(e){M(e)},isFocused:x,setFocused:C,isInvalid:e=>vt(e,c,p),isSelected(e){return null!=b&&bN(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&$&&bN(e,$),isCellDisabled(n){return e.isDisabled||0>n.compare(w)||n.compare(E)>0||this.isInvalid(n)},isCellUnavailable:n=>!!e.isDateUnavailable&&e.isDateUnavailable(n),isPreviousVisibleRangeInvalid(){let e=w.subtract({days:1});return bN(e,w)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return bN(e,E)||this.isInvalid(e)},getDatesInWeek(e,n=w){let t=n.add({weeks:e}),r=[],o=bR(t=bK(t,i,h),i,h);for(let e=0;e<o;e++)r.push(null);for(;r.length<7;){r.push(t);let e=t.add({days:1});if(bN(t,e))break;t=e}for(;r.length<7;)r.push(null);return r}}}function vu(e){let n={...e};for(let t in e)n[t]=1;return n}function vd(e,n){return e&&n?(0>n.compare(e)&&([e,n]=[n,e]),{start:bM(e),end:bM(n)}):null}function vf(e,n){return(e=bT(e,(null==n?void 0:n.calendar)||new y5),n&&"hour"in n)?n.set(e):e}function vh(e,n,t){let r=e.add({days:t});for(;(t<0?r.compare(n.visibleRange.start)>=0:0>=r.compare(n.visibleRange.end))&&!n.isCellUnavailable(r);)r=r.add({days:t});if(n.isCellUnavailable(r))return r.add({days:-t})}let vm=(0,uB.createContext)(null),vg=(0,uB.createContext)(null),vy=(0,uB.createContext)(null),vb=(0,uB.createContext)(null),v_=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,vm);let{locale:t}=yZ(),r=vp({...e,locale:t,createCalendar:e.createCalendar||vn}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=_f(e,r),c=ge({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return uj().createElement("div",{...c,...o,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},uj().createElement(m9,{values:[[yO,{slots:{previous:a,next:i}}],[yI,{"aria-hidden":!0,level:2,children:l}],[vy,r],[vm,e],[yB,{slots:{errorMessage:s}}]]},uj().createElement(_m,null,uj().createElement("h2",null,o["aria-label"])),c.children,uj().createElement(_m,null,uj().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),vv=(0,uB.forwardRef)(function(e,n){var t,r;let o,a,i;[e,n]=gt(e,n,vg);let{locale:s}=yZ(),l=function(e){let{value:n,defaultValue:t,onChange:r,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...c}=e,[p,u]=vc(n,t||null,r),[d,f]=(0,uB.useState)(null),h="center";if(p&&p.start&&p.end){let e=vr(bM(p.start),i,a,s,l).add(i).subtract({days:1});p.end.compare(e)>0&&(h="start")}let m=(0,uB.useRef)(null),[g,y]=(0,uB.useState)(null),b=(0,uB.useMemo)(()=>bJ(s,null==g?void 0:g.start),[s,g]),v=(0,uB.useMemo)(()=>bZ(l,null==g?void 0:g.end),[l,g]),$=vp({...c,value:p&&p.start,createCalendar:o,locale:a,visibleDuration:i,minValue:b,maxValue:v,selectionAlignment:h}),A=n=>{n&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:vh(n,$,-1),end:vh(n,$,1)},y(m.current)):(m.current=null,y(null))},[w,k]=(0,uB.useState)($.visibleRange);bI($.visibleRange.start,w.start)&&bI($.visibleRange.end,w.end)||(A(d),k($.visibleRange));let x=e=>{e?(f(e),A(e)):(f(null),A(null))},C=d?vd(d,$.focusedDate):p&&vd(p.start,p.end),E=n=>{if(e.isReadOnly)return;let t=vl(vs(n,b,v),$.visibleRange.start,e.isDateUnavailable);if(t)if(d){let e=vd(d,t);e&&u({start:vf(e.start,null==p?void 0:p.start),end:vf(e.end,null==p?void 0:p.end)}),x(null)}else x(t)},[S,D]=(0,uB.useState)(!1),{isDateUnavailable:z}=e,M=(0,uB.useMemo)(()=>!!p&&!d&&(!!(z&&(z(p.start)||z(p.end)))||vt(p.start,s,l)||vt(p.end,s,l)),[z,p,d,s,l]),P=e.isInvalid||"invalid"===e.validationState||M;return{...$,value:p,setValue:u,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:P?"invalid":null,isValueInvalid:P,selectFocusedDate(){E($.focusedDate)},selectDate:E,highlightDate(e){d&&$.setFocusedDate(e)},isSelected:e=>!!(C&&e.compare(C.start)>=0&&0>=e.compare(C.end)&&!$.isCellDisabled(e)&&!$.isCellUnavailable(e)),isInvalid(e){var n,t;return $.isInvalid(e)||vt(e,null==(n=m.current)?void 0:n.start,null==(t=m.current)?void 0:t.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||vn}),{calendarProps:c,prevButtonProps:p,nextButtonProps:u,errorMessageProps:d,title:f}=(t=e,r=n,o=_f(t,l),a=(0,uB.useRef)(!1),_g(i=(0,uB.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),_g(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let n=e.target;r.current&&r.current.contains(document.activeElement)&&(!r.current.contains(n)||!n.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&r.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},_g(r,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=ge({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return uj().createElement("div",{...h,...c,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},uj().createElement(m9,{values:[[yO,{slots:{previous:p,next:u}}],[yI,{"aria-hidden":!0,level:2,children:f}],[vb,l],[vg,e],[yB,{slots:{errorMessage:d}}]]},uj().createElement(_m,null,uj().createElement("h2",null,c["aria-label"])),h.children,uj().createElement(_m,null,uj().createElement("button",{"aria-label":u["aria-label"],disabled:u.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v$=(0,uB.createContext)(null),vA=(0,uB.forwardRef)(function(e,n){var t,r;let o=(0,uB.useContext)(vy),a=(0,uB.useContext)(vb),i=gn(vm),s=gn(vg),l=null!=o?o:a,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let p=null!=(t=null==i?void 0:i.firstDayOfWeek)?t:null==s?void 0:s.firstDayOfWeek,{gridProps:u,headerProps:d,weekDays:f,weeksInMonth:h}=function(e,n){let t,{startDate:r=n.visibleRange.start,endDate:o=n.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=yZ(),s=_c(r,o,n.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=_s.get(n),p=_d({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),u=_o({weekday:e.weekdayStyle||"narrow",timeZone:n.timeZone}),{locale:d}=yZ(),f=(0,uB.useMemo)(()=>{let e=bK(bL(n.timeZone),d,a);return[...Array(7).keys()].map(t=>{let r=e.add({days:t}).toDate(n.timeZone);return u.format(r)})},[d,n.timeZone,u,a]),h=(t=r.calendar.getDaysInMonth(r),Math.ceil((bR(bq(r),d,a)+t)/7));return{gridProps:m7(p,{role:"grid","aria-readonly":n.isReadOnly||void 0,"aria-disabled":n.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in n||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),n.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),n.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),n.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),n.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),n.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?n.focusNextDay():n.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),n.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?n.focusPreviousDay():n.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),n.focusNextRow();break;case"Escape":"setAnchorDate"in n&&(e.preventDefault(),n.setAnchorDate(null))}},onFocus:()=>n.setFocused(!0),onBlur:()=>n.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:h}}({startDate:c,endDate:bH(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:p},l);return uj().createElement(v$.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:h}},uj().createElement("table",{...gf(e),...u,ref:n,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:uj().createElement(uj().Fragment,null,uj().createElement(vw,null,e=>uj().createElement(vk,null,e)),uj().createElement(vx,null,e.children))))}),vw=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e,{headerProps:a,weekDays:i}=(0,uB.useContext)(v$);return uj().createElement("thead",{...gf(e),...a,ref:n,style:r,className:o||"react-aria-CalendarGridHeader"},uj().createElement("tr",null,i.map((e,n)=>uj().cloneElement(t(e),{key:n}))))}),vk=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e;return uj().createElement("th",{...gf(e),ref:n,style:r,className:o||"react-aria-CalendarHeaderCell"},t)}),vx=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e,a=(0,uB.useContext)(vy),i=(0,uB.useContext)(vb),s=null!=a?a:i,{startDate:l,weeksInMonth:c}=(0,uB.useContext)(v$);return uj().createElement("tbody",{...gf(e),ref:n,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>uj().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,n)=>e?uj().cloneElement(t(e),{key:n}):uj().createElement("td",{key:n})))))}),vC=(0,uB.forwardRef)(function({date:e,...n},t){var r,o,a;let i=(0,uB.useContext)(vy),s=(0,uB.useContext)(vb),l=null!=i?i:s,{startDate:c}=null!=(r=(0,uB.useContext)(v$))?r:{startDate:l.visibleRange.start},p=(0,uB.useRef)(null),{cellProps:u,buttonProps:d,...f}=function(e,n,t){var r;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=_s.get(n),c=b6((r=yJ)&&r.__esModule?r.default:r,"@react-aria/calendar"),p=_o({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_l(a),timeZone:n.timeZone}),u=n.isSelected(a),d=n.isCellFocused(a);i=i||n.isCellDisabled(a);let f=n.isCellUnavailable(a),h=!i&&!f,m=n.isValueInvalid&&!!("highlightedRange"in n?!n.anchorDate&&n.highlightedRange&&a.compare(n.highlightedRange.start)>=0&&0>=a.compare(n.highlightedRange.end):n.value&&bN(n.value,a));m&&(u=!0),a=_r(a,bI);let g=(0,uB.useMemo)(()=>a.toDate(n.timeZone),[a,n.timeZone]),y=bN(a,bL(n.timeZone)),b=(0,uB.useMemo)(()=>{let e="";return"highlightedRange"in n&&n.value&&!n.anchorDate&&(bN(a,n.value.start)||bN(a,n.value.end))&&(e=l+", "),e+=p.format(g),y?e=c.format(u?"todayDateSelected":"todayDate",{date:e}):u&&(e=c.format("dateSelected",{date:e})),n.minValue&&bN(a,n.minValue)?e+=", "+c.format("minimumDate"):n.maxValue&&bN(a,n.maxValue)&&(e+=", "+c.format("maximumDate")),e},[p,g,c,u,y,a,n,l]),v="";"anchorDate"in n&&d&&!n.isReadOnly&&h&&(v=n.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let $=__(v),A=(0,uB.useRef)(!1),w=(0,uB.useRef)(!1),k=(0,uB.useRef)(void 0),{pressProps:x,isPressed:C}=g6({shouldCancelOnPointerExit:"anchorDate"in n&&!!n.anchorDate,preventFocusOnPress:!0,isDisabled:!h||n.isReadOnly,onPressStart(e){if(n.isReadOnly)return void n.setFocusedDate(a);if("highlightedRange"in n&&!n.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(n.highlightedRange&&!m){if(bN(a,n.highlightedRange.start)){n.setAnchorDate(n.highlightedRange.end),n.setFocusedDate(a),n.setDragging(!0),w.current=!0;return}else if(bN(a,n.highlightedRange.end)){n.setAnchorDate(n.highlightedRange.start),n.setFocusedDate(a),n.setDragging(!0),w.current=!0;return}}let t=()=>{n.setDragging(!0),k.current=void 0,n.selectDate(a),n.setFocusedDate(a),A.current=!0};"touch"===e.pointerType?k.current=setTimeout(t,200):t()}},onPressEnd(){w.current=!1,A.current=!1,clearTimeout(k.current),k.current=void 0},onPress(){"anchorDate"in n||n.isReadOnly||(n.selectDate(a),n.setFocusedDate(a))},onPressUp(e){if(!n.isReadOnly&&("anchorDate"in n&&k.current&&(n.selectDate(a),n.setFocusedDate(a)),"anchorDate"in n))if(w.current)n.setAnchorDate(a);else if(n.anchorDate&&!A.current)n.selectDate(a),n.setFocusedDate(a);else if("keyboard"!==e.pointerType||n.anchorDate)"virtual"===e.pointerType&&(n.selectDate(a),n.setFocusedDate(a));else{n.selectDate(a);let e=a.add({days:1});n.isInvalid(e)&&(e=a.subtract({days:1})),n.isInvalid(e)||n.setFocusedDate(e)}}});i||(o=bN(a,n.focusedDate)?0:-1),(0,uB.useEffect)(()=>{d&&t.current&&(g$(t.current),"pointer"!==yr&&document.activeElement===t.current&&_A(t.current,{containingElement:_w(t.current)}))},[d,t]);let E=_o({day:"numeric",timeZone:n.timeZone,calendar:a.calendar.identifier}),S=(0,uB.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":u||void 0,"aria-invalid":m||void 0},buttonProps:m7(x,{onFocus(){i||n.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,$["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in n&&("touch"!==e.pointerType||n.isDragging)&&h&&n.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:C,isFocused:d,isSelected:u,isDisabled:i,isUnavailable:f,isOutsideVisibleRange:0>a.compare(n.visibleRange.start)||a.compare(n.visibleRange.end)>0,isInvalid:m,formattedDate:S}}({date:e},l,p),{hoverProps:h,isHovered:m}=yz({...n,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=yx();y&&(y=f.isFocused);let b=(o=c,a=bT(a=e,o.calendar),o=bq(o),a=bq(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),v=!1,$=!1;"highlightedRange"in l&&l.highlightedRange&&(v=bN(e,l.highlightedRange.start),$=bN(e,l.highlightedRange.end));let A=ge({...n,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:y,isSelectionStart:v,isSelectionEnd:$,...f}}),w={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":$||void 0,"data-invalid":f.isInvalid||void 0};return uj().createElement("td",{...u,ref:t},uj().createElement("div",{...m7(gf(n),d,g,h,w,A),ref:p}))}),vE=(0,uB.createContext)({}),vS=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,vE);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:p,isHovered:u}=yz({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:d,isFocusVisible:f,focusProps:h}=yx({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=ge({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return uj().createElement("div",{...m7(c,h,p),...m,ref:n,role:null!=(t=e.role)?t:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":d||void 0,"data-hovered":u||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},m.children)}),vD=(0,uB.createContext)({}),vz=yP(function(e,n){[e,n]=gt(e,n,vD);let{hoverProps:t,isHovered:r}=yz(e),{isFocused:o,isFocusVisible:a,focusProps:i}=yx({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=ge({...e,values:{isHovered:r,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return uj().createElement("input",{...m7((e=>{let{onHoverStart:n,onHoverChange:t,onHoverEnd:r,...o}=e;return o})(e),i,t),...l,ref:n,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var vM={};vM={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let vP=uj().createContext(null),vT="react-aria-focus-scope-restore",vO=null;function vN(e){var n,t,r,o,a,i,s,l,c,p;let u,d,f,h,{children:m,contain:g,restoreFocus:y,autoFocus:b}=e,v=(0,uB.useRef)(null),$=(0,uB.useRef)(null),A=(0,uB.useRef)([]),{parentNode:w}=(0,uB.useContext)(vP)||{},k=(0,uB.useMemo)(()=>new vZ({scopeRef:A}),[A]);mU(()=>{let e=w||vJ.root;if(vJ.getTreeNode(e.scopeRef)&&vO&&!vF(vO,e.scopeRef)){let n=vJ.getTreeNode(vO);n&&(e=n)}e.addChild(k),vJ.addNode(k)},[k,w]),mU(()=>{let e=vJ.getTreeNode(A);e&&(e.contain=!!g)},[g]),mU(()=>{var e;let n=null==(e=v.current)?void 0:e.nextSibling,t=[],r=e=>e.stopPropagation();for(;n&&n!==$.current;)t.push(n),n.addEventListener(vT,r),n=n.nextSibling;return A.current=t,()=>{for(let e of t)e.removeEventListener(vT,r)}},[m]),mU(()=>{if(t||r)return;let e=n.current,o=g_(e?e[0]:void 0),a=e=>{let t=gQ(e);vj(t,n.current)?vO=n:vR(t)||(vO=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[n=A,t=y,r=g]),o=A,a=g,u=(0,uB.useRef)(void 0),d=(0,uB.useRef)(void 0),mU(()=>{let e=o.current;if(!a){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let n=g_(e?e[0]:void 0),t=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!vB(o)||e.isComposing)return;let t=((e=document)=>e.activeElement)(n),r=o.current;if(!r||!vj(t,r))return;let a=vq(vI(r),{tabbable:!0},r);if(!t)return;a.currentNode=t;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&vL(i,!0)},r=e=>{(!vO||vF(vO,o))&&vj(gQ(e),o.current)?(vO=o,u.current=gQ(e)):vB(o)&&!vR(gQ(e),o)?u.current?u.current.focus():vO&&vO.current&&vV(vO.current):vB(o)&&(u.current=gQ(e))},i=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let t=yr,r=("virtual"===t||null===t)&&gI()&&gN(),a=((e=document)=>e.activeElement)(n);if(!r&&a&&vB(o)&&!vR(a,o)){vO=o;let n=gQ(e);if(n&&n.isConnected){var i;u.current=n,null==(i=u.current)||i.focus()}else vO.current&&vV(vO.current)}})};return n.addEventListener("keydown",t,!1),n.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{n.removeEventListener("keydown",t,!1),n.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),mU(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),i=A,s=y,l=g,f=(0,uB.useRef)("u">typeof document?((e=document)=>e.activeElement)(g_(i.current?i.current[0]:void 0)):null),mU(()=>{let e=i.current,n=g_(e?e[0]:void 0);if(!s||l)return;let t=()=>{(!vO||vF(vO,i))&&vj(((e=document)=>e.activeElement)(n),i.current)&&(vO=i)};return n.addEventListener("focusin",t,!1),null==e||e.forEach(e=>e.addEventListener("focusin",t,!1)),()=>{n.removeEventListener("focusin",t,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",t,!1))}},[i,l]),mU(()=>{let e=g_(i.current?i.current[0]:void 0);if(!s)return;let n=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey||!vB(i)||n.isComposing)return;let t=e.activeElement;if(!vR(t,i)||!vG(i))return;let r=vJ.getTreeNode(i);if(!r)return;let o=r.nodeToRestore,a=vq(e.body,{tabbable:!0});a.currentNode=t;let s=n.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!vR(s,i))&&o){a.currentNode=o;do s=n.shiftKey?a.previousNode():a.nextNode();while(vR(s,i));(n.preventDefault(),n.stopPropagation(),s)?vL(s,!0):vR(o)?vL(o,!0):t.blur()}};return l||e.addEventListener("keydown",n,!0),()=>{l||e.removeEventListener("keydown",n,!0)}},[i,s,l]),mU(()=>{var e;let n=g_(i.current?i.current[0]:void 0);if(!s)return;let t=vJ.getTreeNode(i);if(t)return t.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=vJ.getTreeNode(i);if(!e)return;let t=e.nodeToRestore,r=((e=document)=>e.activeElement)(n);if(s&&t&&(r&&vR(r,i)||r===n.body&&vG(i))){let e=vJ.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=e.getTreeNode(i);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected)return void vU(n.nodeToRestore);n=n.parent}for(n=e.getTreeNode(i);n;){if(n.scopeRef&&n.scopeRef.current&&vJ.getTreeNode(n.scopeRef))return void vU(vW(n.scopeRef.current,!0));n=n.parent}}})}}},[i,s]),c=A,p=b,h=uj().useRef(p),(0,uB.useEffect)(()=>{h.current&&(vO=c,!vj(((e=document)=>e.activeElement)(g_(c.current?c.current[0]:void 0)),vO.current)&&c.current&&vV(c.current)),h.current=!1},[c]),(0,uB.useEffect)(()=>{let e=((e=document)=>e.activeElement)(g_(A.current?A.current[0]:void 0)),n=null;if(vj(e,A.current)){for(let t of vJ.traverse())t.scopeRef&&vj(e,t.scopeRef.current)&&(n=t);n===vJ.getTreeNode(A)&&(vO=n.scopeRef)}},[A]),mU(()=>()=>{var e,n,t;let r=null!=(t=null==(n=vJ.getTreeNode(A))||null==(e=n.parent)?void 0:e.scopeRef)?t:null;(A===vO||vF(A,vO))&&(!r||vJ.getTreeNode(r))&&(vO=r),vJ.removeTreeNode(A)},[A]);let x=(0,uB.useMemo)(()=>{var e;return e=A,{focusNext(n={}){var t;let r=e.current,{from:o,tabbable:a,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(g_(null!=(t=r[0])?t:void 0)),c=r[0].previousElementSibling,p=vq(vI(r),{tabbable:a,accept:s},r);p.currentNode=vj(l,r)?l:c;let u=p.nextNode();return!u&&i&&(p.currentNode=c,u=p.nextNode()),u&&vL(u,!0),u},focusPrevious(n={}){var t;let r=e.current,{from:o,tabbable:a,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(g_(null!=(t=r[0])?t:void 0)),c=r[r.length-1].nextElementSibling,p=vq(vI(r),{tabbable:a,accept:s},r);p.currentNode=vj(l,r)?l:c;let u=p.previousNode();return!u&&i&&(p.currentNode=c,u=p.previousNode()),u&&vL(u,!0),u},focusFirst(n={}){let t=e.current,{tabbable:r,accept:o}=n,a=vq(vI(t),{tabbable:r,accept:o},t);a.currentNode=t[0].previousElementSibling;let i=a.nextNode();return i&&vL(i,!0),i},focusLast(n={}){let t=e.current,{tabbable:r,accept:o}=n,a=vq(vI(t),{tabbable:r,accept:o},t);a.currentNode=t[t.length-1].nextElementSibling;let i=a.previousNode();return i&&vL(i,!0),i}}},[]),C=(0,uB.useMemo)(()=>({focusManager:x,parentNode:k}),[k,x]);return uj().createElement(vP.Provider,{value:C},uj().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,uj().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))}function vI(e){return e[0].parentElement}function vB(e){let n=vJ.getTreeNode(vO);for(;n&&n.scopeRef!==e;){if(n.contain)return!1;n=n.parent}return!0}function vj(e,n){return!!e&&!!n&&n.some(n=>n.contains(e))}function vR(e,n=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of vJ.traverse(vJ.getTreeNode(n)))if(t&&vj(e,t.current))return!0;return!1}function vF(e,n){var t;let r=null==(t=vJ.getTreeNode(n))?void 0:t.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function vL(e,n=!1){if(null==e||n){if(null!=e)try{e.focus()}catch{}}else try{y_(e)}catch{}}function vW(e,n=!0){let t=e[0].previousElementSibling,r=vI(e),o=vq(r,{tabbable:n},e);o.currentNode=t;let a=o.nextNode();return n&&!a&&((o=vq(r=vI(e),{tabbable:!1},e)).currentNode=t,a=o.nextNode()),a}function vV(e,n=!0){vL(vW(e,n))}function vG(e){let n=vJ.getTreeNode(vO);for(;n&&n.scopeRef!==e;){if(n.nodeToRestore)return!1;n=n.parent}return(null==n?void 0:n.scopeRef)===e}function vU(e){e.dispatchEvent(new CustomEvent(vT,{bubbles:!0,cancelable:!0}))&&vL(e)}function vq(e,n,t){var r,o,a;let i=(null==n?void 0:n.tabbable)?gb:gy,s=g_((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(r=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var r;return(null==n||null==(r=n.from)?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(n,t){return"#comment"!==n.nodeName&&function(e){let n=gv(e);if(!(e instanceof n.HTMLElement)&&!(e instanceof n.SVGElement))return!1;let{display:t,visibility:r}=e.style,o="none"!==t&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:n}=e.ownerDocument.defaultView,{display:t,visibility:r}=n(e);o="none"!==t&&"hidden"!==r&&"collapse"!==r}return o}(n)&&!n.hasAttribute("hidden")&&!n.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==n.nodeName||!t||"SUMMARY"===t.nodeName||n.hasAttribute("open"))&&(!n.parentElement||e(n.parentElement,n))}(e)&&(!t||vj(e,t))&&(!(null==n?void 0:n.accept)||n.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(r,o,a));return(null==n?void 0:n.from)&&(l.currentNode=n.from),l}function vH(e,n={}){return{focusNext(t={}){let r=e.current;if(!r)return null;let{from:o,tabbable:a=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(g_(r)),c=vq(r,{tabbable:a,accept:s});r.contains(l)&&(c.currentNode=l);let p=c.nextNode();return!p&&i&&(c.currentNode=r,p=c.nextNode()),p&&vL(p,!0),p},focusPrevious(t=n){let r=e.current;if(!r)return null;let{from:o,tabbable:a=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(g_(r)),c=vq(r,{tabbable:a,accept:s});if(r.contains(l))c.currentNode=l;else{let e=vK(c);return e&&vL(e,!0),null!=e?e:null}let p=c.previousNode();if(!p&&i){c.currentNode=r;let e=vK(c);if(!e)return null;p=e}return p&&vL(p,!0),null!=p?p:null},focusFirst(t=n){let r=e.current;if(!r)return null;let{tabbable:o=n.tabbable,accept:a=n.accept}=t,i=vq(r,{tabbable:o,accept:a}).nextNode();return i&&vL(i,!0),i},focusLast(t=n){let r=e.current;if(!r)return null;let{tabbable:o=n.tabbable,accept:a=n.accept}=t,i=vK(vq(r,{tabbable:o,accept:a}));return i&&vL(i,!0),null!=i?i:null}}}function vK(e){let n,t;do(n=e.lastChild())&&(t=n);while(n);return t}class vY{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,t){let r=this.fastMap.get(null!=n?n:null);if(!r)return;let o=new vZ({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),t&&(o.nodeToRestore=t)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let n=this.fastMap.get(e);if(!n)return;let t=n.parent;for(let e of this.traverse())e!==n&&n.nodeToRestore&&e.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&vj(e.nodeToRestore,n.scopeRef.current)&&(e.nodeToRestore=n.nodeToRestore);let r=n.children;t&&(t.removeChild(n),r.size>0&&r.forEach(e=>t&&t.addChild(e))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e,n;let t=new vY;for(let r of this.traverse())t.addTreeNode(r.scopeRef,null!=(n=null==(e=r.parent)?void 0:e.scopeRef)?n:null,r.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new vZ({scopeRef:null}),this.fastMap.set(null,this.root)}}class vZ{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let vJ=new vY;function vX(e,n,t){let{direction:r}=yZ(),o=(0,uB.useMemo)(()=>vH(n),[n]),a=()=>{var e;if(!n.current)return;let t=null==(e=window.event)?void 0:e.target,r=vq(n.current,{tabbable:!0});if(t&&(r.currentNode=t,t=r.previousNode()),!t){let e;do(e=r.lastChild())&&(t=e);while(e)}for(;null==t?void 0:t.hasAttribute("data-placeholder");){let e=r.previousNode();if(e&&e.hasAttribute("data-placeholder"))t=e;else break}t&&t.focus()},{pressProps:i}=g6({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return m7(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!t))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===r){if(n.current){let e=a.target,t=vQ(n.current,e.getBoundingClientRect().left,-1);t&&t.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===r){if(n.current){let e=a.target,t=vQ(n.current,e.getBoundingClientRect().left,1);t&&t.focus()}}else o.focusNext()}}})}function vQ(e,n,t){let r=vq(e,{tabbable:!0}),o=r.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-n,s=Math.abs(e);Math.sign(e)===t&&s<i&&(a=o,i=s),o=r.nextNode()}return a}function v0(e,n,t){let r=(0,uB.useRef)(n),o=mq(()=>{t&&t(r.current)});(0,uB.useEffect)(()=>{var n;let t=null==e||null==(n=e.current)?void 0:n.form;return null==t||t.addEventListener("reset",o),()=>{null==t||t.removeEventListener("reset",o)}},[e,o])}function v1(e){let{description:n,errorMessage:t,isInvalid:r,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:n,label:t,"aria-labelledby":r,"aria-label":o,labelElementType:a="label"}=e;n=m5(n);let i=m5(),s={};return t&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===a?n:void 0}),{labelProps:s,fieldProps:_d({id:n,"aria-label":o,"aria-labelledby":r})}}(e),s=m4([!!n,!!t,r,o]),l=m4([!!n,!!t,r,o]);return{labelProps:a,fieldProps:i=m7(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function v2(e,n,t){let{validationBehavior:r,focus:o}=e;mU(()=>{if("native"===r&&(null==t?void 0:t.current)&&!t.current.disabled){var e;let r,o=n.realtimeValidation.isInvalid?n.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(o),t.current.hasAttribute("title")||(t.current.title=""),n.realtimeValidation.isInvalid||n.updateValidation({isInvalid:!(e=t.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mq(()=>{n.resetValidation()}),i=mq(e=>{var r,a;n.displayValidation.isInvalid||n.commitValidation();let i=null==t||null==(r=t.current)?void 0:r.form;!e.defaultPrevented&&t&&i&&function(e){for(let n=0;n<e.elements.length;n++){let t=e.elements[n];if(!t.validity.valid)return t}return null}(i)===t.current&&(o?o():null==(a=t.current)||a.focus(),yr="keyboard",yc("keyboard",null)),e.preventDefault()}),s=mq(()=>{n.commitValidation()});(0,uB.useEffect)(()=>{let e=null==t?void 0:t.current;if(!e)return;let n=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==n||n.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==n||n.removeEventListener("reset",a)}},[t,i,s,a,r])}let v3=new WeakMap,v5="__role_"+Date.now(),v4="__focusManager_"+Date.now();function v6(e,n,t){var r,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=n.displayValidation,{labelProps:c,fieldProps:p,descriptionProps:u,errorMessageProps:d}=v1({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,uB.useRef)(null),{focusWithinProps:h}=yk({...e,onFocusWithin(t){var r;f.current=n.value,null==(r=e.onFocus)||r.call(e,t)},onBlurWithin:t=>{var r;n.confirmPlaceholder(),n.value!==f.current&&n.commitValidation(),null==(r=e.onBlur)||r.call(e,t)},onFocusWithinChange:e.onFocusChange}),m=b6((o=vM)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===n.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===n.maxGranularity?"time":"date",b=__(n.value?m.format(g,{[y]:n.formatValue({month:"long"})}):""),v="presentation"===e[v5]?p["aria-describedby"]:[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[v4],A=(0,uB.useMemo)(()=>$||vH(t),[$,t]),w=vX(n,t,"presentation"===e[v5]);v3.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:A});let k=(0,uB.useRef)(e.autoFocus);a="presentation"===e[v5]?{role:"presentation"}:m7(p,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,uB.useEffect)(()=>{k.current&&A.focusFirst(),k.current=!1},[A]),v0(e.inputRef,n.value,n.setValue),v2({...e,focus(){A.focusFirst()}},n,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(r=n.value)?void 0:r.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=gf(e);return{labelProps:{...c,onClick:()=>{A.focusFirst()}},fieldProps:m7(C,a,w,h,{onKeyDown(n){e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){e.onKeyUp&&e.onKeyUp(n)},style:{unicodeBidi:"isolate"}}),inputProps:x,descriptionProps:u,errorMessageProps:d,isInvalid:i,validationErrors:s,validationDetails:l}}var v7={};v7={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let v8={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},v9={...v8,customError:!0,valid:!1},$e={isInvalid:!1,validationDetails:v8,validationErrors:[]},$n=(0,uB.createContext)({}),$t="__formValidationState"+Date.now();function $r(e){if(e[$t]){let{realtimeValidation:n,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:a}=e[$t];return{realtimeValidation:n,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:n,validationState:t,name:r,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;t&&(n||(n="invalid"===t));let l=void 0!==n?{isInvalid:n,validationErrors:[],validationDetails:v9}:null,c=(0,uB.useMemo)(()=>i&&null!=o?$a(function(e,n){if("function"==typeof e){let t=e(n);if(t&&"boolean"!=typeof t)return $o(t)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let p=(0,uB.useContext)($n),u=(0,uB.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>$o(p[e])):$o(p[r]):[],[p,r]),[d,f]=(0,uB.useState)(p),[h,m]=(0,uB.useState)(!1);p!==d&&(f(p),m(!1));let g=(0,uB.useMemo)(()=>$a(h?[]:u),[h,u]),y=(0,uB.useRef)($e),[b,v]=(0,uB.useState)($e),$=(0,uB.useRef)($e),[A,w]=(0,uB.useState)(!1);return(0,uB.useEffect)(()=>{if(!A)return;w(!1);let e=c||a||y.current;$i(e,$.current)||($.current=e,v(e))}),{realtimeValidation:l||g||c||a||$e,displayValidation:"native"===s?l||g||b:l||g||c||a||b,updateValidation(e){"aria"!==s||$i(b,e)?y.current=e:v(e)},resetValidation(){$i($e,$.current)||($.current=$e,v($e)),"native"===s&&w(!1),m(!0)},commitValidation(){"native"===s&&w(!0),m(!0)}}}(e)}function $o(e){return e?Array.isArray(e)?e:[e]:[]}function $a(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:v9}:null}function $i(e,n){return e===n||!!e&&!!n&&e.isInvalid===n.isInvalid&&e.validationErrors.length===n.validationErrors.length&&e.validationErrors.every((e,t)=>e===n.validationErrors[t])&&Object.entries(e.validationDetails).every(([e,t])=>n.validationDetails[e]===t)}function $s(...e){let n=new Set,t=!1,r={...v8};for(let o of e){for(let e of o.validationErrors)n.add(e);for(let e in t||(t=o.isInvalid),r)r[e]||(r[e]=o.validationDetails[e])}return r.valid=!t,{isInvalid:t,validationErrors:[...n],validationDetails:r}}let $l=new b0((ea=v7)&&ea.__esModule?ea.default:ea);function $c(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function $p(e,n,t,r,o){let a=null!=e&&null!=t&&e.compare(t)>0,i=null!=e&&null!=n&&0>e.compare(n),s=null!=e&&(null==r?void 0:r(e))||!1,l=a||i||s,c=[];if(l){let e=$c(),r=new b3(e,b0.getGlobalDictionaryForPackage("@react-stately/datepicker")||$l),l=new b8(e,$f({},o)),p=l.resolvedOptions().timeZone;i&&null!=n&&c.push(r.format("rangeUnderflow",{minValue:l.format(n.toDate(p))})),a&&null!=t&&c.push(r.format("rangeOverflow",{maxValue:l.format(t.toDate(p))})),s&&c.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let $u={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},$d={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function $f(e,n){var t;e={...n.shouldForceLeadingZeros?$d:$u,...e};let r=n.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(t=n.maxGranularity)?t:"year");a<0&&(a=0);let i=o.indexOf(r);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((n,t)=>(n[t]=e[t],n),{});return null!=n.hourCycle&&(s.hour12=12===n.hourCycle),s.timeZone=n.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&n.timeZone&&!n.hideTimeZone&&(s.timeZoneName="short"),n.showEra&&0===a&&(s.era="short"),s}function $h(e){return e&&"hour"in e?e:new bb}function $m(e,n){return null===e?null:e?bT(e,n):void 0}function $g(e,n,t,r){if(e)return $m(e,t);let o=bT(bF(null!=r?r:bU()).set({hour:0,minute:0,second:0,millisecond:0}),t);return"year"===n||"month"===n||"day"===n?bM(o):r?o:bP(o)}function $y(e,n){let t=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&n&&!(n in e))throw Error("Invalid granularity "+n+" for value "+e.toString());let[o,a]=(0,uB.useState)([r,t]);return e&&(o[0]!==r||o[1]!==t)&&a([r,t]),n||(n=e?r:o[0]),[n,e?t:o[1]]}let $b=new b0({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),$_={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$v={year:5,month:2,day:7,hour:2,minute:15,second:15},$$={dayperiod:"dayPeriod"};function $A(e){var n,t;let{locale:r,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:c,maxValue:p,isDateUnavailable:u}=e,d=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=$y(d,e.granularity),m=h||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,uB.useMemo)(()=>new b8(r),[r]),y=(0,uB.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[b,v]=vc(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),$=(0,uB.useMemo)(()=>{var e;return null!=(e=$m(b,y))?e:null},[b,y]),[A,w]=(0,uB.useState)(()=>$g(e.placeholderValue,f,y,h)),k="gregory"===y.identifier&&"BC"===($||A).era,x=(0,uB.useMemo)(()=>{var n;return{granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",timeZone:h,hideTimeZone:a,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,a,k]),C=(0,uB.useMemo)(()=>$f({},x),[x]),E=(0,uB.useMemo)(()=>new b8(r,C),[r,C]),S=(0,uB.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,uB.useMemo)(()=>E.formatToParts(new Date).filter(e=>$_[e.type]).reduce((e,n)=>(e[n.type]=!0,e),{}),[E]),[z,M]=(0,uB.useState)(()=>e.value||e.defaultValue?{...D}:{}),P=(0,uB.useRef)(null),T=(0,uB.useRef)(y);(0,uB.useEffect)(()=>{bB(y,T.current)||(T.current=y,w(n=>Object.keys(z).length>0?bT(n,y):$g(e.placeholderValue,f,y,h)))},[y,f,z,h,e.placeholderValue]),b&&Object.keys(z).length<Object.keys(D).length&&M(z={...D}),null==b&&Object.keys(z).length===Object.keys(D).length&&(M(z={}),w($g(e.placeholderValue,f,y,h)));let O=$&&Object.keys(z).length>=Object.keys(D).length?$:A,N=n=>{if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(z),r=Object.keys(D);null==n?(v(null),w($g(e.placeholderValue,f,y,h)),M({})):t.length>=r.length||t.length===r.length-1&&D.dayPeriod&&!z.dayPeriod&&"dayPeriod"!==P.current?v(n=bT(n,(null==d?void 0:d.calendar)||new y5)):w(n),P.current=null},I=(0,uB.useMemo)(()=>O.toDate(m),[O,m]),B=(0,uB.useMemo)(()=>(function(e,n,t,r,o,a,i,s){let l=["hour","minute","second"],c=t.formatToParts(e),p=[];for(let e of c){var u,d;let t=$_[e.type];"era"===e.type&&1===a.getEras().length&&(t=!1);let c=$_[e.type]&&!n[e.type],f=$_[e.type]?(u=e.type,d=e.value,"era"===u||"dayPeriod"===u?d:"year"===u||"month"===u||"day"===u?$b.getStringForLocale(u,i):"––"):null,h={type:$$[e.type]||e.type,text:c?f:e.value,...$w(o,e.type,r),isPlaceholder:c,placeholder:f,isEditable:t};"hour"===e.type?(p.push({type:"literal",text:"⁦",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1}),p.push(h),e.type===s&&p.push({type:"literal",text:"⁩",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(p.push(h),p.push({type:"literal",text:"⁩",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):p.push(h)}return p})(I,z,E,S,O,y,r,f),[I,z,E,S,O,y,r,f]);D.era&&z.year&&!z.era?(z.era=!0,M({...z})):!D.era&&z.era&&(delete z.era,M({...z}));let j=e=>{z[e]=!0,"year"===e&&D.era&&(z.era=!0),M({...z})},R=(e,n)=>{if(z[e])N(function(e,n,t,r){switch(n){case"era":case"year":case"month":case"day":return e.cycle(n,t,{round:"year"===n})}if("hour"in e)switch(n){case"dayPeriod":{let n=e.hour;return e.set({hour:n>=12?n-12:n+12})}case"hour":case"minute":case"second":return e.cycle(n,t,{round:"hour"!==n,hourCycle:r.hour12?12:24})}throw Error("Unknown segment: "+n)}(O,e,n,S));else{j(e);let n=Object.keys(z),t=Object.keys(D);(n.length>=t.length||n.length===t.length-1&&D.dayPeriod&&!z.dayPeriod)&&N(O)}},F=(0,uB.useMemo)(()=>$p(b,c,p,u,x),[b,c,p,u,x]),L=$r({...e,value:b,builtinValidation:F}),W=L.displayValidation.isInvalid,V=e.validationState||(W?"invalid":null);return{...L,value:$,dateValue:I,calendar:y,setValue:N,segments:B,dateFormatter:E,validationState:V,isInvalid:W,granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){R(e,1)},decrement(e){R(e,-1)},incrementPage(e){R(e,$v[e]||1)},decrementPage(e){R(e,-($v[e]||1))},setSegment(e,n){j(e),N(function(e,n,t,r){switch(n){case"day":case"month":case"year":case"era":return e.set({[n]:t})}if("hour"in e&&"number"==typeof t)switch(n){case"dayPeriod":{let n=e.hour,r=n>=12;if(t>=12===r)return e;return e.set({hour:r?n-12:n+12})}case"hour":if(r.hour12){let n=e.hour>=12;n||12!==t||(t=0),n&&t<12&&(t+=12)}case"minute":case"second":return e.set({[n]:t})}throw Error("Unknown segment: "+n)}(O,e,n,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(z),t=Object.keys(D);n.length===t.length-1&&D.dayPeriod&&!z.dayPeriod&&(M(z={...D}),N(O.copy()))},clearSegment(n){delete z[n],P.current=n,M({...z});let t=$g(e.placeholderValue,f,y,h),r=O;if("dayPeriod"===n&&"hour"in O&&"hour"in t){let e=O.hour>=12,n=t.hour>=12;e&&!n?r=O.set({hour:O.hour-12}):!e&&n&&(r=O.set({hour:O.hour+12}))}else"hour"===n&&"hour"in O&&O.hour>=12&&z.dayPeriod?r=O.set({hour:t.hour+12}):n in O&&(r=O.set({[n]:t[n]}));v(null),N(r)},formatValue:e=>$?new b8(r,$f(e,x)).format(I):"",getDateFormatter:(e,n)=>new b8(e,$f({},{...x,...n}))}}function $w(e,n,t){switch(n){case"era":{let n=e.calendar.getEras();return{value:n.indexOf(e.era),minValue:0,maxValue:n.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(n){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(t.hour12){let n=e.hour>=12;return{value:e.hour,minValue:12*!!n,maxValue:n?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let $k=(0,uB.createContext)(null),$x=(0,uB.createContext)(null),$C=(0,uB.createContext)(null),$E=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)($x),r=(0,uB.useContext)($C);return t||r?uj().createElement($D,{...e,ref:n}):uj().createElement($S,{...e,ref:n})}),$S=(0,uB.forwardRef)((e,n)=>{let[t,r]=gt({slot:e.slot},n,$k),{locale:o}=yZ(),a=$A({...t,locale:o,createCalendar:vn}),i=(0,uB.useRef)(null),{fieldProps:s,inputProps:l}=v6({...t,inputRef:i},a,r);return uj().createElement(m9,{values:[[$x,a],[vD,{...l,ref:i}],[vE,{...s,ref:r,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},uj().createElement($D,e))}),$D=(0,uB.forwardRef)((e,n)=>{let{className:t,children:r}=e,o=(0,uB.useContext)($x),a=(0,uB.useContext)($C),i=null!=o?o:a;return uj().createElement(uj().Fragment,null,uj().createElement(vS,{...e,ref:n,slot:e.slot||void 0,className:null!=t?t:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,n)=>(0,uB.cloneElement)(r(e),{key:n}))),uj().createElement(vz,null))}),$z=(0,uB.createContext)({});function $M({children:e}){let n=(0,uB.useMemo)(()=>({register:()=>{}}),[]);return uj().createElement(gq.Provider,{value:n},e)}uj().forwardRef(({children:e,...n},t)=>{let r=(0,uB.useRef)(!1),o=(0,uB.useContext)(gq);t=mV(t||(null==o?void 0:o.ref));let a=m7(o||{},{...n,ref:t,register(){r.current=!0,o&&o.register()}});return gZ(o,t),(0,uB.useEffect)(()=>{r.current||(r.current=!0)},[]),uj().createElement(gq.Provider,{value:a},e)});let $P=uj().createContext(null);function $T(e){var n;let t=m1(),{portalContainer:r=t?null:document.body,isExiting:o}=e,[a,i]=(0,uB.useState)(!1),s=(0,uB.useMemo)(()=>({contain:a,setContain:i}),[a,i]),{getContainer:l}=null!=(n=(0,uB.useContext)($z))?n:{};if(!e.portalContainer&&l&&(r=l()),!r)return null;let c=e.children;return e.disableFocusManagement||(c=uj().createElement(vN,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!o},c)),c=uj().createElement($P.Provider,{value:s},uj().createElement($M,null,c)),g2.createPortal(c,r)}let $O=(0,uB.createContext)(null),$N=(0,uB.createContext)(null),$I=(0,uB.forwardRef)(function(e,n){let t=e["aria-labelledby"];[e,n]=gt(e,n,$O);let{dialogProps:r,titleProps:o}=function(e,n){let t,r,{role:o="dialog"}=e,a=m4();a=e["aria-label"]?void 0:a;let i=(0,uB.useRef)(!1);return(0,uB.useEffect)(()=>{if(n.current&&!n.current.contains(document.activeElement)){y_(n.current);let e=setTimeout(()=>{document.activeElement===n.current&&(i.current=!0,n.current&&(n.current.blur(),y_(n.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[n]),mU(()=>{null==r||r(!0)},[r=null==(t=(0,uB.useContext)($P))?void 0:t.setContain]),{dialogProps:{...gf(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":t},n),a=(0,uB.useContext)($N);r["aria-label"]||r["aria-labelledby"]||e["aria-labelledby"]&&(r["aria-labelledby"]=e["aria-labelledby"]);let i=ge({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return uj().createElement("section",{...gf(e),...r,...i,ref:n,slot:e.slot||void 0},uj().createElement(m9,{values:[[yI,{slots:{[m8]:{},title:{...o,level:2}}}],[yO,{slots:{[m8]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),$B=(0,uB.createContext)(null),$j=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)($B);return(null==t?void 0:t.isInvalid)?uj().createElement($R,{...e,ref:n}):null}),$R=(0,uB.forwardRef)((e,n)=>{let t=(0,uB.useContext)($B),r=gf(e),o=ge({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===t.validationErrors.length?void 0:t.validationErrors.join(" "),values:t});return null==o.children?null:uj().createElement(yj,{slot:"errorMessage",...r,...o,ref:n})}),$F=(0,uB.createContext)(null),$L=(0,uB.createContext)({}),$W=yP(function(e,n){[e,n]=gt(e,n,$L);let{elementType:t="label",...r}=e;return uj().createElement(t,{className:"react-aria-Label",...r,ref:n})}),$V=(0,uB.createContext)({placement:"bottom"}),$G=new WeakMap,$U=[];function $q(e,n=-1/0,t=1/0){return Math.min(Math.max(e,n),t)}function $H(e,n){let t=e,r=n.toString(),o=r.indexOf("."),a=o>=0?r.length-o:0;if(a>0){let e=Math.pow(10,a);t=Math.round(t*e)/e}return t}function $K(e,n,t,r){n=Number(n),t=Number(t);let o=(e-(isNaN(n)?0:n))%r,a=$H(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(n)?!isNaN(t)&&a>t&&(a=Math.floor($H(t/r,r))*r):a<n?a=n:!isNaN(t)&&a>t&&(a=n+Math.floor($H((t-n)/r,r))*r),a=$H(a,r)}let $Y={top:"top",bottom:"top",left:"left",right:"left"},$Z={top:"bottom",bottom:"top",left:"right",right:"left"},$J={top:"left",left:"top"},$X={top:"height",left:"width"},$Q={width:"totalWidth",height:"totalHeight"},$0={},$1="u">typeof document?window.visualViewport:null;function $2(e){var n,t,r,o,a;let i=0,s=0,l=0,c=0,p=0,u=0,d={},f=(null!=(n=null==$1?void 0:$1.scale)?n:1)>1;if("BODY"===e.tagName){let n=document.documentElement;l=n.clientWidth,c=n.clientHeight,i=null!=(t=null==$1?void 0:$1.width)?t:l,s=null!=(r=null==$1?void 0:$1.height)?r:c,d.top=n.scrollTop||e.scrollTop,d.left=n.scrollLeft||e.scrollLeft,$1&&(p=$1.offsetTop,u=$1.offsetLeft)}else({width:i,height:s,top:p,left:u}=$7(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=i,c=s;return gO()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,p=null!=(o=null==$1?void 0:$1.pageTop)?o:0,u=null!=(a=null==$1?void 0:$1.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:c,scroll:d,top:p,left:u}}function $3(e,n,t,r,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,c=r[$X[e]],p=r.scroll[$Y[e]]+a,u=c+r.scroll[$Y[e]]-a,d=n-l+i[e]-r[$Y[e]],f=n-l+t+i[e]-r[$Y[e]];return d<p?p-d:f>u?Math.max(u-f,p-d):0}function $5(e){if($0[e])return $0[e];let[n,t]=e.split(" "),r=$Y[n]||"right",o=$J[r];$Y[t]||(t="center");let a=$X[r],i=$X[o];return $0[e]={placement:n,crossPlacement:t,axis:r,crossAxis:o,size:a,crossSize:i},$0[e]}function $4(e,n,t,r,o,a,i,s,l,c){var p,u,d,f,h;let{placement:m,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:$}=r,A={};A[b]=null!=(p=e[b])?p:0,"center"===g?A[b]+=((null!=(u=e[$])?u:0)-(null!=(d=t[$])?d:0))/2:g!==b&&(A[b]+=(null!=(f=e[$])?f:0)-(null!=(h=t[$])?h:0)),A[b]+=a;let w=e[b]-t[$]+l+c,k=e[b]+e[$]-l-c;if(A[b]=$q(A[b],w,k),m===y){let t=s?i[v]:n[$Q[v]];A[$Z[y]]=Math.floor(t-e[y]+o)}else A[y]=Math.floor(e[y]+e[v]+o);return A}function $6(e,n,t,r,o,a){var i,s,l;let{placement:c,axis:p,size:u}=a;return c===p?Math.max(0,t[p]-e[p]-(null!=(i=e.scroll[p])?i:0)+n[p]-(null!=(s=r[p])?s:0)-r[$Z[p]]-o):Math.max(0,e[u]+e[p]+e.scroll[p]-n[p]-t[p]-t[u]-(null!=(l=r[p])?l:0)-r[$Z[p]]-o)}function $7(e){let{top:n,left:t,width:r,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:n+a-s,left:t+i-l,width:r,height:o}}function $8(e,n){let t,r=window.getComputedStyle(e);if("fixed"===r.position){let{top:n,left:r,width:o,height:a}=e.getBoundingClientRect();t={top:n,left:r,width:o,height:a}}else{t=$7(e);let r=$7(n),o=window.getComputedStyle(n);r.top+=(parseInt(o.borderTopWidth,10)||0)-n.scrollTop,r.left+=(parseInt(o.borderLeftWidth,10)||0)-n.scrollLeft,t.top-=r.top,t.left-=r.left}return t.top-=parseInt(r.marginTop,10)||0,t.left-=parseInt(r.marginLeft,10)||0,t}function $9(e){let n=window.getComputedStyle(e);return"none"!==n.transform||/transform|perspective/.test(n.willChange)||"none"!==n.filter||"paint"===n.contain||"backdropFilter"in n&&"none"!==n.backdropFilter||"WebkitBackdropFilter"in n&&"none"!==n.WebkitBackdropFilter}let Ae=new WeakMap;function An(e){let{ref:n,box:t,onResize:r}=e;(0,uB.useEffect)(()=>{let e=null==n?void 0:n.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};else{let n=new window.ResizeObserver(e=>{e.length&&r()});return n.observe(e,{box:t}),()=>{e&&n.unobserve(e)}}},[r,n,t])}let At="u">typeof document?window.visualViewport:null;function Ar(e,n){if(e.button>0)return!1;if(e.target){let n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!n.current&&!e.composedPath().includes(n.current)}let Ao=[],Aa="u">typeof document&&window.visualViewport,Ai=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),As=0;function Al(e,n,t){let r=e.style[n];return e.style[n]=t,()=>{e.style[n]=r}}function Ac(e,n,t,r){return e.addEventListener(n,t,r),()=>{e.removeEventListener(n,t,r)}}function Ap(e){let n=document.scrollingElement||document.documentElement,t=e;for(;t&&t!==n;){let e=_w(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let n=e.getBoundingClientRect().top,r=t.getBoundingClientRect().top;r>n+t.clientHeight&&(e.scrollTop+=r-n)}t=e.parentElement}}var Au={};function Ad(e){var n;let{onDismiss:t,...r}=e,o=_d(r,b6((n=Au)&&n.__esModule?n.default:n,"@react-aria/overlays").format("dismiss"));return uj().createElement(_m,null,uj().createElement("button",{...o,tabIndex:-1,onClick:()=>{t&&t()},style:{width:1,height:1}}))}function Af(e,n,t){mU(()=>{if(n&&e.current){if(!("getAnimations"in e.current))return void t();let n=e.current.getAnimations();if(0===n.length)return void t();let r=!1;return Promise.all(n.map(e=>e.finished)).then(()=>{r||(0,g2.flushSync)(()=>{t()})}).catch(()=>{}),()=>{r=!0}}},[e,n,t])}function Ah(e){let[n,t]=vc(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,uB.useCallback)(()=>{t(!0)},[t]),o=(0,uB.useCallback)(()=>{t(!1)},[t]),a=(0,uB.useCallback)(()=>{t(!n)},[t,n]);return{isOpen:n,setOpen:t,open:r,close:o,toggle:a}}Au={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let Am=(0,uB.createContext)(null),Ag=(0,uB.createContext)(null),Ay=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,Am);let t=(0,uB.useContext)($N),r=Ah(e),o=null==e.isOpen&&null==e.defaultOpen&&t?t:r,a=function(e,n){let[t,r]=(0,uB.useState)(n?"open":"closed");switch(t){case"open":n||r("exiting");break;case"closed":case"exiting":n&&r("open")}let o="exiting"===t;return Af(e,o,(0,uB.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(n,o.isOpen)||e.isExiting||!1,i=(0,uB.useContext)(yM),{direction:s}=yZ();if(i){let n=e.children;return"function"==typeof n&&(n=n({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),uj().createElement(uj().Fragment,null,n)}return!o||o.isOpen||a?uj().createElement(Ab,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a,dir:s}):null});function Ab({state:e,isExiting:n,UNSTABLE_portalContainer:t,...r}){var o,a;let i=(0,uB.useRef)(null),[s,l]=(0,uB.useState)(0),c=(0,uB.useRef)(null),u=(0,uB.useContext)(Ag),d=u&&"SubmenuTrigger"===r.trigger;mU(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:g}=function(e,n){let{triggerRef:t,popoverRef:r,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:u,underlayProps:d}=function(e,n){let{onClose:t,shouldCloseOnBlur:r,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,uB.useEffect)(()=>{if(o&&!Ao.includes(n))return Ao.push(n),()=>{let e=Ao.indexOf(n);e>=0&&Ao.splice(e,1)}},[o,n]);let l=()=>{Ao[Ao.length-1]===n&&t&&t()};!function(e){let{ref:n,onInteractOutside:t,isDisabled:r,onInteractOutsideStart:o}=e,a=(0,uB.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mq(e=>{t&&Ar(e,n)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mq(e=>{t&&t(e)});(0,uB.useEffect)(()=>{let e=a.current;if(r)return;let t=g_(n.current);if("u">typeof PointerEvent){let r=t=>{e.isPointerDown&&Ar(t,n)&&s(t),e.isPointerDown=!1};return t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerup",r,!0),()=>{t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerup",r,!0)}}},[n,r,i,s])}({ref:n,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(Ao[Ao.length-1]===n&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&Ao[Ao.length-1]===n&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=yk({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||vR(e.relatedTarget,vO))&&(!s||s(e.relatedTarget))&&(null==t||t())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:n.isOpen,onClose:n.close,shouldCloseOnBlur:!0,isDismissable:!a||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:r),{overlayProps:f,arrowProps:h,placement:m}=function(e){var n,t,r;let{direction:o}=yZ(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:c="bottom",containerPadding:p=12,shouldFlip:u=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:g=!0,onClose:y,maxHeight:b,arrowBoundaryOffset:v=0}=e,[$,A]=(0,uB.useState)(null),w=[m,c,s.current,i.current,l.current,p,u,d,f,h,g,o,b,v,a],k=(0,uB.useRef)(null==At?void 0:At.scale);(0,uB.useEffect)(()=>{g&&(k.current=null==At?void 0:At.scale)},[g]);let x=(0,uB.useCallback)(()=>{var e,n,t,r,y,$;if(!1===m||!g||!s.current||!i.current||!d||(null==At?void 0:At.scale)!==k.current)return;let w=null;if(l.current&&l.current.contains(document.activeElement)){let r=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(w={type:"top",offset:(null!=(n=null==r?void 0:r.top)?n:0)-o.top}).offset>o.height/2&&(w.type="bottom",w.offset=(null!=(t=null==r?void 0:r.bottom)?t:0)-o.bottom)}let x=s.current;!b&&s.current&&(x.style.top="0px",x.style.bottom="",x.style.maxHeight=(null!=(y=null==(r=window.visualViewport)?void 0:r.height)?y:window.innerHeight)+"px");let C=function(e){var n,t,r,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:c,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:h,maxHeight:m,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,b=l instanceof HTMLElement?function(e){let n=e.offsetParent;if(n&&n===document.body&&"static"===window.getComputedStyle(n).position&&!$9(n)&&(n=document.documentElement),null==n)for(n=e.parentElement;n&&!$9(n);)n=n.parentElement;return n||document.documentElement}(l):document.documentElement,v=b===document.documentElement,$=window.getComputedStyle(b).position,A=v?$7(s):$8(s,b);if(!v){let{marginTop:e,marginLeft:n}=window.getComputedStyle(s);A.top+=parseInt(e,10)||0,A.left+=parseInt(n,10)||0}let w=$7(l),k={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};w.width+=(null!=(n=k.left)?n:0)+(null!=(t=k.right)?t:0),w.height+=(null!=(r=k.top)?r:0)+(null!=(o=k.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=$2(d),E=$2(b),S="BODY"===d.tagName?$7(b):$8(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,n,t,r,o,a,i,s,l,c,p,u,d,f,h,m){var g,y,b,v,$,A,w,k,x,C,E,S,D,z;let M,P,T,O=$5(e),{size:N,crossAxis:I,crossSize:B,placement:j,crossPlacement:R}=O,F=$4(n,s,t,O,p,u,c,d,h,m),L=p,W=$6(s,c,n,o,a+p,O);if(i&&r[N]>W){let e=$5(`${$Z[j]} ${R}`),r=$4(n,s,t,e,p,u,c,d,h,m);$6(s,c,n,o,a+p,e)>W&&(O=e,F=r,L=p)}let V="bottom";"top"===O.axis?"top"===O.placement?V="top":"bottom"===O.placement&&(V="bottom"):"top"===O.crossAxis&&("top"===O.crossPlacement?V="bottom":"bottom"===O.crossPlacement&&(V="top"));let G=$3(I,F[I],t[B],s,l,a,c);F[I]+=G;let U=($=F,A=t.height,w=V,M=d?c.height:s[$Q.height],P=null!=$.top?c.top+$.top:c.top+(M-(null!=(k=$.bottom)?k:0)-A),T="top"!==w?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-P-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+a)):Math.max(0,P+A-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(z=o.bottom)?z:0)+a)),Math.min(s.height-2*a,T));f&&f<U&&(U=f),t.height=Math.min(t.height,U),G=$3(I,(F=$4(n,s,t,O,L,u,c,d,h,m))[I],t[B],s,l,a,c),F[I]+=G;let q={},H=n[I]+.5*n[B]-F[I]-o[$Y[I]],K=h/2+m,Y="left"===$Y[I]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(b=o.top)?b:0)+(null!=(v=o.bottom)?v:0),Z=t[B]-Y-h/2-m,J=$q(H,n[I]+h/2-(F[I]+o[$Y[I]]),n[I]+n[B]-h/2-(F[I]+o[$Y[I]]));return q[I]=$q(J,K,Z),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:O.placement}}(i,A,w,x,k,p,u,C,E,S,f,h,!!$&&"static"!==$,m,g,y)}({placement:($=c,"rtl"===o?$.replace("start","right").replace("end","left"):$.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:h,maxHeight:b,arrowSize:a,arrowBoundaryOffset:v});if(C.position){if(x.style.top="",x.style.bottom="",x.style.left="",x.style.right="",Object.keys(C.position).forEach(e=>x.style[e]=C.position[e]+"px"),x.style.maxHeight=null!=C.maxHeight?C.maxHeight+"px":"",w&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),n=l.current.getBoundingClientRect(),t=e[w.type]-n[w.type];l.current.scrollTop+=t-w.offset}A(C)}},w);mU(x,w),mU(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=x]),An({ref:s,onResize:x}),An({ref:i,onResize:x});let C=(0,uB.useRef)(!1);mU(()=>{let e,n=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},t=()=>{C.current&&n()};return null==At||At.addEventListener("resize",n),null==At||At.addEventListener("scroll",t),()=>{null==At||At.removeEventListener("resize",n),null==At||At.removeEventListener("scroll",t)}},[x]);let E=(0,uB.useCallback)(()=>{C.current||null==y||y()},[y,C]);return!function(e){let{triggerRef:n,isOpen:t,onClose:r}=e;(0,uB.useEffect)(()=>{if(!t||null===r)return;let e=e=>{let t=e.target;if(!n.current||t instanceof Node&&!t.contains(n.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=r||Ae.get(n.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[t,r,n])}({triggerRef:i,isOpen:g,onClose:y&&E}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==$?void 0:$.position,maxHeight:null!=(n=null==$?void 0:$.maxHeight)?n:"100vh"}},placement:null!=(t=null==$?void 0:$.placement)?t:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==$?void 0:$.arrowOffsetLeft,top:null==$?void 0:$.arrowOffsetTop}},updatePosition:x}}({...l,targetRef:t,overlayRef:r,isOpen:n.isOpen,onClose:a&&!c?n.close:null});return!function(e={}){let{isDisabled:n}=e;mU(()=>{if(!n){let e,n,t,r;return 1==++As&&(p=gT()?(t=null,r=mG(Ac(document,"touchstart",t=>{((e=_w(t.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(n=Al(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),Ac(document,"touchmove",n=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&n.preventDefault():n.preventDefault()},{passive:!1,capture:!0}),Ac(document,"touchend",()=>{n&&n()},{passive:!1,capture:!0}),Ac(document,"focus",e=>{var n;let r=e.target;((n=r)instanceof HTMLInputElement&&!Ai.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable)&&((()=>{if(t)return;let e=window.pageXOffset,n=window.pageYOffset;t=mG(Ac(window,"scroll",()=>{window.scrollTo(0,0)}),Al(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Al(document.documentElement,"overflow","hidden"),Al(document.body,"marginTop",`-${n}px`),()=>{window.scrollTo(e,n)}),window.scrollTo(0,0)})(),r.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{r.style.transform="",Aa&&(Aa.height<window.innerHeight?requestAnimationFrame(()=>{Ap(r)}):Aa.addEventListener("resize",()=>Ap(r),{once:!0}))}))},!0)),()=>{null==n||n(),null==t||t(),r()}):mG(Al(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Al(document.documentElement,"overflow","hidden"))),()=>{0==--As&&p()}}},[n])}({isDisabled:a||!n.isOpen}),mU(()=>{if(n.isOpen&&r.current){if(!a)return function(e,n=document.body){let t=new Set(e),r=new Set,o=e=>{for(let n of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(n);let n=e=>{if(t.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let n of t)if(e.contains(n))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n}),i=n(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var n;let t=null!=(n=$G.get(e))?n:0;("true"!==e.getAttribute("aria-hidden")||0!==t)&&(0===t&&e.setAttribute("aria-hidden","true"),r.add(e),$G.set(e,t+1))};$U.length&&$U[$U.length-1].disconnect(),o(n);let i=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&0!==n.addedNodes.length&&![...t,...r].some(e=>e.contains(n.target))){for(let e of n.removedNodes)e instanceof Element&&(t.delete(e),r.delete(e));for(let e of n.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?t.add(e):e instanceof Element&&o(e)}});i.observe(n,{childList:!0,subtree:!0});let s={visibleNodes:t,hiddenNodes:r,observe(){i.observe(n,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return $U.push(s),()=>{for(let e of(i.disconnect(),r)){let n=$G.get(e);null!=n&&(1===n?(e.removeAttribute("aria-hidden"),$G.delete(e)):$G.set(e,n-1))}s===$U[$U.length-1]?($U.pop(),$U.length&&$U[$U.length-1].observe()):$U.splice($U.indexOf(s),1)}}([null!=(t=null==o?void 0:o.current)?t:r.current]);var e,t,i=null!=(e=null==o?void 0:o.current)?e:r.current;let n=$U[$U.length-1];return n&&!n.visibleNodes.has(i)?(n.visibleNodes.add(i),()=>{n.visibleNodes.delete(i)}):void 0}},[a,n.isOpen,r,o]),{popoverProps:m7(u,f),arrowProps:h,underlayProps:d,placement:m}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:d?u:c},e),y=r.popoverRef,b=function(e,n=!0){let[t,r]=(0,uB.useState)(!0),o=t&&n;return mU(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let n of e.current.getAnimations())n instanceof CSSTransition&&n.cancel()},[e,o]),Af(e,o,(0,uB.useCallback)(()=>r(!1),[])),o}(y,!!g)||r.isEntering||!1,v=ge({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:b,isExiting:n}}),$=!r.isNonModal||"SubmenuTrigger"===r.trigger,[A,w]=(0,uB.useState)(!1);mU(()=>{y.current&&w($&&!y.current.querySelector("[role=dialog]"))},[y,$]),(0,uB.useEffect)(()=>{A&&y.current&&!y.current.contains(document.activeElement)&&y_(y.current)},[A,y]);let k={...f.style,...v.style},x=uj().createElement("div",{...m7(gf(r),f),...v,role:A?"dialog":void 0,tabIndex:A?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:y,slot:r.slot||void 0,style:k,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":b||void 0,"data-exiting":n||void 0},!r.isNonModal&&uj().createElement(Ad,{onDismiss:e.close}),uj().createElement($V.Provider,{value:{...m,placement:g,ref:i}},v.children),uj().createElement(Ad,{onDismiss:e.close}));return d?uj().createElement($T,{...r,shouldContainFocus:A,isExiting:n,portalContainer:null!=(a=null!=t?t:null==u?void 0:u.current)?a:void 0},x):uj().createElement($T,{...r,shouldContainFocus:A,isExiting:n,portalContainer:t},!r.isNonModal&&e.isOpen&&uj().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),uj().createElement("div",{ref:c,style:{display:"contents"}},uj().createElement(Ag.Provider,{value:c},x)))}function A_(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let Av=(0,uB.createContext)(null),A$=(0,uB.createContext)(null),AA=(0,uB.createContext)(null),Aw=(0,uB.createContext)(null),Ak=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,Av);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",i=function(e){var n;let t=Ah(e),[r,o]=vc(e.value,e.defaultValue||null,e.onChange),a=r||e.placeholderValue||null,[i,s]=$y(a,e.granularity),l=null!=r?r.toDate(null!=s?s:"UTC"):null,c="hour"===i||"minute"===i||"second"===i,p=null==(n=e.shouldCloseOnSelect)||n,[u,d]=(0,uB.useState)(null),[f,h]=(0,uB.useState)(null);if(r&&(u=r,"hour"in r&&(f=r)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let m=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,g=(0,uB.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:y,maxValue:b,isDateUnavailable:v}=e,$=(0,uB.useMemo)(()=>$p(r,y,b,v,g),[r,y,b,v,g]),A=$r({...e,value:r,builtinValidation:$}),w=A.displayValidation.isInvalid,k=e.validationState||(w?"invalid":null),x=(e,n)=>{o("timeZone"in n?n.set(bM(e)):bP(e,n)),d(null),h(null),A.commitValidation()};return{...A,value:r,setValue:o,dateValue:u,timeValue:f,setDateValue:n=>{let r="function"==typeof p?p():p;c?f||r?x(n,f||$h(e.defaultValue||e.placeholderValue)):d(n):(o(n),A.commitValidation()),r&&t.setOpen(!1)},setTimeValue:e=>{u&&e?x(u,e):h(e)},granularity:i,hasTime:c,...t,setOpen(n){!n&&!r&&u&&c&&x(u,f||$h(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:k,isInvalid:w,formatValue:(e,n)=>l?new b8(e,$f(n,g)).format(l):"",getDateFormatter:(e,n)=>new b8(e,$f({},{...g,...n}))}}({...e,validationBehavior:a}),s=(0,uB.useRef)(null),[l,c]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,fieldProps:d,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var r;let o=m5(),a=m5(),i=m5(),s=b6((r=vM)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:p}=n.displayValidation,{labelProps:u,fieldProps:d,descriptionProps:f,errorMessageProps:h}=v1({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),m=vX(n,t),g=d["aria-labelledby"]||d.id,{locale:y}=yZ(),b=n.formatValue(y,{month:"long"}),v=__(b?s.format("selectedDateDescription",{date:b}):""),$=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=gf(e),w=(0,uB.useMemo)(()=>vH(t),[t]),k=(0,uB.useRef)(!1),{focusWithinProps:x}=yk({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(a);if(!(null==t?void 0:t.contains(n.relatedTarget))){var r,o;k.current=!1,null==(r=e.onBlur)||r.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!k.current){var t,r;k.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(r=e.onFocusChange)||r.call(e,!0)}}});return{groupProps:m7(A,m,d,v,x,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":$,onKeyDown(t){!n.isOpen&&e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){!n.isOpen&&e.onKeyUp&&e.onKeyUp(t)}}),labelProps:{...u,onClick:()=>{w.focusFirst()}},fieldProps:{...d,id:i,[v5]:"presentation","aria-describedby":$,value:n.value,onChange:n.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[$t]:n,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":$,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${g}`},calendarProps:{autoFocus:!0,value:n.dateValue,onChange:n.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:n.dateValue?void 0:e.placeholderValue,isInvalid:n.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(n.displayValidation):e.errorMessage||n.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:c,validationDetails:p}}({...go(e),label:c,validationBehavior:a},i,s),[v,$]=(0,uB.useState)(null),A=(0,uB.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);An({ref:s,onResize:A});let{focusProps:w,isFocused:k,isFocusVisible:x}=yx({within:!0}),C=ge({...e,values:{state:i,isFocusWithin:k,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),E=gf(e);return delete E.id,uj().createElement(m9,{values:[[AA,i],[vE,{...p,ref:s,isInvalid:i.isInvalid}],[$k,d],[yO,{...f,isPressed:i.isOpen}],[$L,{...u,ref:l,elementType:"span"}],[vm,m],[$N,i],[Am,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[$O,h],[yB,{slots:{description:g,errorMessage:y}}],[$B,b]]},uj().createElement("div",{...w,...E,...C,ref:n,slot:e.slot||void 0,"data-focus-within":k||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),Ax=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,A$);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",i=function(e){var n,t,r;let o=Ah(e),[a,i]=vc(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,uB.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let c=a||s,p=e=>{l(e||{start:null,end:null}),A_(e)?i(e):i(null)},[u,d]=$y((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===u||"minute"===u||"second"===u,h=null==(r=e.shouldCloseOnSelect)||r,[m,g]=(0,uB.useState)(null),[y,b]=(0,uB.useState)(null);c&&A_(c)&&(m=c,"hour"in c.start&&(y=c));let v=(e,n)=>{p({start:"timeZone"in n.start?n.start.set(bM(e.start)):bP(e.start,n.start),end:"timeZone"in n.end?n.end.set(bM(e.end)):bP(e.end,n.end)}),g(null),b(null),D.commitValidation()},$=n=>{let t="function"==typeof h?h():h;f?A_(n)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?v(n,{start:(null==y?void 0:y.start)||$h(e.placeholderValue),end:(null==y?void 0:y.end)||$h(e.placeholderValue)}):g(n):A_(n)?(p(n),D.commitValidation()):g(n),t&&o.setOpen(!1)},A=e=>{A_(m)&&A_(e)?v(m,e):b(e)},w=(null==c||null==(n=c.start)?void 0:n.calendar.identifier)==="gregory"&&"BC"===c.start.era||(null==c||null==(t=c.end)?void 0:t.calendar.identifier)==="gregory"&&"BC"===c.end.era,k=(0,uB.useMemo)(()=>({granularity:u,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,w]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,uB.useMemo)(()=>{var e,n;let t;return t=$s($p(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,k),$p(null!=(n=null==c?void 0:c.end)?n:null,x,C,E,k)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(t=$s(t,{isInvalid:!0,validationErrors:[(b0.getGlobalDictionaryForPackage("@react-stately/datepicker")||$l).getStringForLocale("rangeReversed",$c())],validationDetails:{...v8,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[c,x,C,E,k]),D=$r({...e,value:a,name:(0,uB.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),z=D.displayValidation.isInvalid,M=e.validationState||(z?"invalid":null);return{...D,value:c,setValue:p,dateRange:m,timeRange:y,granularity:u,hasTime:f,setDate(e,n){var t,r;"start"===e?$({start:n,end:null!=(t=null==m?void 0:m.end)?t:null}):$({start:null!=(r=null==m?void 0:m.start)?r:null,end:n})},setTime(e,n){var t,r;"start"===e?A({start:n,end:null!=(t=null==y?void 0:y.end)?t:null}):A({start:null!=(r=null==y?void 0:y.start)?r:null,end:n})},setDateTime(e,n){var t,r;"start"===e?p({start:n,end:null!=(t=null==c?void 0:c.end)?t:null}):p({start:null!=(r=null==c?void 0:c.start)?r:null,end:n})},setDateRange:$,setTimeRange:A,...o,setOpen(n){!n&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&A_(m)&&f&&v(m,{start:(null==y?void 0:y.start)||$h(e.placeholderValue),end:(null==y?void 0:y.end)||$h(e.placeholderValue)}),o.setOpen(n)},validationState:M,isInvalid:z,formatValue(n,t){let r;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,a=e.granularity||(c.start&&"minute"in c.start?"minute":"day"),i="timeZone"in c.end?c.end.timeZone:void 0,s=e.granularity||(c.end&&"minute"in c.end?"minute":"day"),l=$f(t,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===c.start.calendar.identifier&&"BC"===c.start.era||"gregory"===c.end.calendar.identifier&&"BC"===c.end.era}),p=c.start.toDate(o||"UTC"),u=c.end.toDate(i||"UTC"),d=new b8(n,l);if(o===i&&a===s&&0!==c.start.compare(c.end)){try{let e=d.formatRangeToParts(p,u),n=-1;for(let t=0;t<e.length;t++){let r=e[t];if("shared"===r.source&&"literal"===r.type)n=t;else if("endRange"===r.source)break}let t="",r="";for(let o=0;o<e.length;o++)o<n?t+=e[o].value:o>n&&(r+=e[o].value);return{start:t,end:r}}catch{}r=d}else r=new b8(n,$f(t,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(p),end:r.format(u)}},getDateFormatter:(e,n)=>new b8(e,$f({},{...k,...n}))}}({...e,validationBehavior:a}),s=(0,uB.useRef)(null),[l,c]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,startFieldProps:d,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:g,descriptionProps:y,errorMessageProps:b,...v}=function(e,n,t){var r,o,a,i,s,l;let c=b6((l=vM)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:p,validationErrors:u,validationDetails:d}=n.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:g}=v1({...e,labelElementType:"span",isInvalid:p,errorMessage:e.errorMessage||u}),y=h["aria-labelledby"]||h.id,{locale:b}=yZ(),v=n.formatValue(b,{month:"long"}),$=__(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),A={"aria-label":c.format("startDate"),"aria-labelledby":y},w={"aria-label":c.format("endDate"),"aria-labelledby":y},k=m5(),x=m5(),C=vX(n,t),E=[$["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,uB.useMemo)(()=>vH(t,{accept:e=>e.id!==k}),[t,k]),D={[v4]:S,[v5]:"presentation","aria-describedby":E,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},z=gf(e),M=(0,uB.useRef)(!1),{focusWithinProps:P}=yk({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(x);if(!(null==t?void 0:t.contains(n.relatedTarget))){var r,o;M.current=!1,null==(r=e.onBlur)||r.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!M.current){var t,r;M.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(r=e.onFocusChange)||r.call(e,!0)}}}),T=(0,uB.useRef)($e),O=(0,uB.useRef)($e);return{groupProps:m7(z,C,h,$,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(t){!n.isOpen&&e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){!n.isOpen&&e.onKeyUp&&e.onKeyUp(t)}}),labelProps:{...f,onClick:()=>{S.focusFirst()}},buttonProps:{...$,id:k,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${k} ${y}`,"aria-describedby":E,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${k} ${y}`},startFieldProps:{...A,...D,value:null!=(i=null==(r=n.value)?void 0:r.start)?i:null,onChange:e=>n.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[$t]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){T.current=e,n.updateValidation($s(e,O.current))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},endFieldProps:{...w,...D,value:null!=(s=null==(o=n.value)?void 0:o.end)?s:null,onChange:e=>n.setDateTime("end",e),name:e.endName,[$t]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){O.current=e,n.updateValidation($s(T.current,e))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},descriptionProps:m,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=n.dateRange)?void 0:a.start)&&n.dateRange.end?n.dateRange:null,onChange:n.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:n.dateRange?void 0:e.placeholderValue,isInvalid:n.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(n.displayValidation):e.errorMessage||n.displayValidation.validationErrors.join(" ")},isInvalid:p,validationErrors:u,validationDetails:d}}({...go(e),label:c,validationBehavior:a},i,s),[$,A]=(0,uB.useState)(null),w=(0,uB.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);An({ref:s,onResize:w});let{focusProps:k,isFocused:x,isFocusVisible:C}=yx({within:!0}),E=ge({...e,values:{state:i,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=gf(e);return delete S.id,uj().createElement(m9,{values:[[Aw,i],[vE,{...p,ref:s,isInvalid:i.isInvalid}],[yO,{...h,isPressed:i.isOpen}],[$L,{...u,ref:l,elementType:"span"}],[vg,g],[$N,i],[Am,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":$}}],[$O,m],[$k,{slots:{start:d,end:f}}],[yB,{slots:{description:y,errorMessage:b}}],[$B,v]]},uj().createElement("div",{...k,...S,...E,ref:n,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function AC(e){return uj().createElement(yY,e)}function AE(e,n,t=!1){if(null==e)return t?e:void 0;if("string"==typeof e&&!e)return t?null:void 0;if(e instanceof bg||e instanceof bv||e instanceof bA)return n?bT(e,n):e;{let t=fh()(e).toDate(),r=new bg(t.getFullYear(),t.getMonth()+1,t.getDate());return n?bT(r,n):r}}function AS(e){if(e)return e.toDate(bU())}function AD(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Az=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ei||"en-US"),AM=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},AP={};for(let e=1;e<100;e++)AP[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var AT={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},AO="[1234567890一二三四五六七八九〇\\d]",AN={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},AI={},AB={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Aj={zone:AB,year:AP,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},AR={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(AB).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},AF={...AR,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},AL={},AW=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(n=Az){return AL[n.toLowerCase()]||(AL[n.toLowerCase()]=new e(n)),AL[n.toLowerCase()]}constructor(e=Az){this.locale=e,this.lookups={...Aj},this.vars={...AR};let n=new Intl.NumberFormat(this.locale);this.numberingSystem=n.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let n=parseInt(e,10);if(!isNaN(n))return n}let n="";for(let t=0;t<e.length;t++)n+=String(this.lookups.digit[e[t]]);return parseInt(n,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let n=e.slice(0,3);return 1===n.length?100*this.toInt(n):2===n.length?10*this.toInt(n):this.toInt(n)}monthNameToInt(e){if("string"!=typeof e)return;let n=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[n]||12}h12ToInt(e,n){if("string"!=typeof e)return;let t=this.lookups.meridiem[n?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===t&&(r+=12),12===r&&0===t&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let n=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(n){let[,e,t,r]=n;return("-"===e||"−"===e?-1:1)*(60*this.toInt(t)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=AN:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:n}=function(e){if(AI[e])return AI[e];if("fullwide"===e||"hanidec"===e)return{group:AO,lookup:{...AN}};let n=AT[e];if(!n)return{group:"\\d",lookup:{...AN}};let t=String.fromCharCode(n),r=String.fromCharCode(n+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(n+e)]=e;return AI[e]={group:`[${t}-${r}]`,lookup:o},AI[e]}(this.numberingSystem);for(let t in this.lookups.digit=n,AF)AF.hasOwnProperty(t)&&(this.vars[t]=AF[t].replace(/\*/g,e))}buildMonthNames(){let e={},n={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((t,r)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[t+o+(a<2?"\\.?":"")]=!0,n[t+o]=r+1})});else{let t=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)t.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(t[i]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,n[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(t[a]).find(r).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,n[i]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=n}buildDaynames(){let e=[],n=e=>"weekday"===e.type;for(let n=0;n<7;n++)e.push(new Date(2017,0,n+1));let t=[],r={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(n).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),t.push(`${s}\\.?`)):t.push(s),r[s]=i}}this.vars.DAYNAME=t.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],n=e=>"dayPeriod"===e.type,t=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(n);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);t.push(s),r[s]=12*a}this.vars.MERIDIEM=t.join("|"),this.lookups.meridiem=r}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,n)=>{if(!this.vars[n])throw Error(`Template string contains invalid variable _${n}_`);return this.vars[n]}),"i")}},AV=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],AG={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},AU=()=>new Date;function Aq(e){return function(n){let t={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(t[o]=n[r])}return t}}var AH=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:n,patterns:t,formatter:r}){this.doneChecker=e,this.fallback=n,this.patterns=t,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let n=e.trim(),t={},r=!1;for(let e of this.patterns){let o=n.match(e.regex);if(!o)continue;r=!0;let a=e.handler(o);if(a){for(let[e,n]of Object.entries(a))e in t||void 0===n||(t[e]=n);if(n=(n=n.slice(0,o.index)+n.slice(o.index+o[0].length+1)).trim(),this.doneChecker(t,n))break}}return r?this.formatter(t):this.fallback(e)}},AK=["year","month","day","hour","minute","second","millisecond","offset"],AY={};function AZ(e,n){return""===n||/^\s+$/.test(n)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var AJ=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],AX={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...AJ],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:AJ,id:AJ,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function AQ(e,n=Az){let t=function(e){if(!AY[e]){var n,t;let r,o,a=AW.factory(e);AY[e]=new AH({doneChecker:AZ,fallback:(n=e,function(e){let t=String(e).slice(0,50);return""===t&&(t="(empty string)"),{invalid:`Unable to parse "${t}" with locale "${n}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${AO}{2,4})\\s*\u5E74\\s*(${AO}{1,2})\\s*\u6708\\s*(${AO}{1,2})\\s*\u65E5$`),handler:Aq(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Aq(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:Aq(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let n=AU(),t=e[1].toLowerCase();switch(t){case"tomorrow":n.setUTCDate(n.getUTCDate()+1);break;case"yesterday":n.setUTCDate(n.getUTCDate()-1)}let r={year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate()};return"now"===t&&(r.hour=n.getUTCHours(),r.minute=n.getUTCMinutes(),r.second=n.getUTCSeconds(),r.millisecond=n.getUTCMilliseconds()),console.log("today=>",t,r),r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,n,t,r]){n=parseFloat(n),"week"===(t=t.length<=2?AG[t]:(t=t.replace(/s$/,"")).toLowerCase())&&(t="day",n*=7),("-"===e||r)&&(n*=-1);let o=AU();return"millisecond"===t?o.setUTCMilliseconds(o.getUTCMilliseconds()+n):"second"===t?o.setUTCSeconds(o.getUTCSeconds()+n):"minute"===t?o.setUTCMinutes(o.getUTCMinutes()+n):"hour"===t?o.setUTCHours(o.getUTCHours()+n):"day"===t?o.setUTCDate(o.getUTCDate()+n):"month"===t?o.setUTCMonth(o.getUTCMonth()+n):"year"===t&&o.setUTCFullYear(o.getUTCFullYear()+n),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let n=new Date(1e3*parseInt(e[1],10));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let n=new Date(parseInt(e[1],10));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Aq(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Aq(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Aq(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:Aq(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Aq(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Aq(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Aq(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Aq(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Aq(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Aq(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Aq(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Aq(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Aq(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Aq(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Aq(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:Aq(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Aq(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Aq(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:Aq(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:Aq(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:Aq(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Aq(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:Aq(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:Aq(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:Aq(["zone"])}],o=a.baseName.slice(0,5),AV.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(t=a,function(e){let n={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=t.monthNameToInt(o);void 0!==e&&(n.month=e)}}else if("hour"===r&&e.meridiem){let r=t.h12ToInt(o,e.meridiem);void 0!==r&&(n.hour=r)}else if("zone"===r){if(o){let e=t.zoneToOffset(o);void 0!==e&&(n.offset=e)}}else if("offset"===r){let e=t.offsetToMinutes(o);void 0!==e&&(n.offset=e)}else if("millisecond"===r){let e=t.millisecondToInt(o);"number"==typeof e&&(n.millisecond=e)}else if(AK.includes(r)){let e=t.toInt(o);"number"==typeof e&&(n[r]=e)}return n.year<100&&(n.year=AP[n.year]),n.year&&"buddhist"===t.dateOptions.calendar&&(n.year-=543),n})})}return AY[e]}(n),r=function(e,n){let t=AX[n.slice(0,2).toLowerCase()];if(!t)return e;for(let[n,r]of t)e=e.replace(n,r);return e}(e,n);return t.attempt(r)}function A0(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let n=new AM(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new AM(n.valueOf()-60*e.offset*1e3):n}function A1(e,n=Az){let t=AQ(e,n),r=t.invalid?new AM(NaN):A0(t);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function A2(e,n=Az){return e instanceof Date?new AM(e.valueOf()):"number"==typeof e?new AM(e):A1(e,n)}Date.fromString=AM.fromString=A1,Date.fromAny=AM.fromAny=A2,"u">typeof window&&(window.anyDateParser={fromString:A1,fromAny:A2,fromObject:A0,attempt:AQ});var A3=t(4397),A5=t(7657);let A4=function(e){return null==e};function A6(e,n){var t=function(e,n){if(!n.has(e))throw TypeError("attempted to get private field on non-instance");return n.get(e)}(e,n);return t.get?t.get.call(e):t.value}fh().extend(fm),fh().extend(A5),fh().extend(A3);let A7="YYYY-MM-DDTHH:mm:ss.SSSZZ";function A8(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fh()(e,A7).isValid()}function A9(e){return fh()(e).isToday()}function we(e){return A8(e)?fh()(e,A7).toDate():null}function wn(e,n=!1){let t=fh()(e);return n&&(t=t.utc()),t.format(A7)}function wt(e){return fh()(e).toDate()}var wr=new WeakMap;let wo=new class{register(e,n){A6(this,wr).set(e,n)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let n=`${e.language}-${e.region}`;if(A6(this,wr).has(n))return A6(this,wr).get(n)}if(e.language&&A6(this,wr).has(e.language))return A6(this,wr).get(e.language);let n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return A6(this,wr).set(`${e.language}${e.region?`-${e.region}`:""}`,n),n}constructor(){!function(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}(this,wr,{writable:!0,value:new Map})}};function wa(e,n){wo.register(e,n)}function wi(e){let n=e??AD();return wo.getCalendar(n instanceof Intl.Locale?n:new Intl.Locale(n))}let ws={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function wl(e,n={}){let t=AQ(e,AD());if(t.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!A4(t.day)&&A4(t.month)&&(t=Object.assign({},n5(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},n5(t,"day"),{date:t.day}));let r=fh()().set(t).toDate();return A4(t.year)&&(n.year=!1),A4(t.month)&&(n.month=!1),A4(t.date)&&(n.day=!1),wc(r,n)}function wc(e,n){let t,r=n?.locale??AD(),o=new Intl.Locale(r),{calendar:a,mode:i,time:s,day:l,month:c,year:p,noToday:u,numberingSystem:d}={...ws,...{noToday:"am"===o.language},...n},f={calendar:a??wi(o),year:p?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},h=fh()(e).isToday();if(h&&!u)t=(t=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+t.slice(1);else{"en"===o.language&&(r="en-GB");let n=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&p&&l&&(n=n.map(wp("-"))),"wide"==i&&(n=n.map(wp(" — "))),"ethiopic"===f.calendar&&(n=n.filter((e,n,t)=>"era"!==e.type&&("literal"!==e.type||!(n<t.length-1)||"era"!==t[n+1].type))),t=n.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(t+=`, ${wu(e)}`),t}let wp=e=>(n,t,r)=>"literal"!==n.type||" "!==n.value||t<r.length-1&&"era"===r[t+1].type?n:{type:"literal",value:e};function wu(e){return e.toLocaleTimeString(AD(),{hour:"2-digit",minute:"2-digit"})}function wd(e,n){return wc(e,{...n,time:!0})}function wf(e,n){let t=wi("string"==typeof n?new Intl.Locale(n):n);return t?bT(e,vn(t)):e}function wh(e,n){return new Intl.DurationFormat(AD(),n).format(e)}function wm(e,n){if(null==e)return null;if("string"==typeof e){let t=AQ(e,AD());return t.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(t.day&&!t.month&&(t={...n5(t,"day"),...{month:t.day}}),t.month&&(t.month-=1),t.day&&(t={...n5(t,"day"),...{date:t.day}}),fh()(n).set(t))}return fh()(e)}let wg=["years","months","days","hours","minutes","seconds"],wy={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wb={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function w_(e,n=fh()(),t){let r,o=fh()(n),a=wm(e,o);if(null==a)return null;if("string"==typeof t){let e=wy[t]??t;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=t??{};if(void 0!==s||void 0!==l){let e,n=l?wy[l]??l:void 0;return e="auto"===s||void 0===s?function(e,n,t){let r=wg.indexOf(t);for(let o=0;o<wg.length;o++){let a=wg[o];if(n.diff(e,a)>0)return o<=r?a:t}return t}(a,o,n??"seconds"):wy[s]??s,function(e,n,t,r){let o=wg.indexOf(t),a=wg.indexOf(r),i=wg.slice(o,a+1),s={},l=e;for(let e of i){let t=n.diff(l,e);s[e]=t,l=l.add(t,e)}return s}(a,o,e,n??e)}let c=(r=function(e){let n={...wb};if(e)for(let[t,r]of Object.entries(e))void 0!==r&&(n[wy[t]??t]=r);return n}(i),o.diff(a,"seconds")<r.seconds?"seconds":o.diff(a,"minutes")<r.minutes?"minutes":o.diff(a,"hours")<r.hours?"hours":o.diff(a,"days")<r.days?"days":o.diff(a,"months")<r.months?"months":"years");return{[c]:o.diff(a,c)}}let wv={style:"short",localeMatcher:"lookup"};function w$(e,n=fh()(),t){let r=w_(e,n,t);return null==r?null:wh(r,"object"==typeof t&&t.formatOptions?{...wv,...t.formatOptions}:wv)}let wA=(0,uB.createContext)(null);function ww(){let e=dM({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,n=(0,uB.useMemo)(()=>{let n=AD();return e[n]&&(n=e[n]),n},[window.i18next.language]),t=(0,uB.useMemo)(()=>{let e=wi(n);return void 0!==e?vn(e):void 0},[n]),r=(0,uB.useMemo)(()=>new Intl.Locale(n,{calendar:t?.identifier}),[n,t]),o=(0,uB.useMemo)(()=>t?bT(bL(bU()),t):bL(bU()),[t]);return{calendar:t,intlLocale:r,today_:o}}let wk=new bg(1793,1,1);var wx={};function wC(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}wx={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};let wE=new Map,wS=!1;try{wS="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let wD=!1;try{wD="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let wz={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class wM{format(e){let n="";if(n=wS||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,n,t){if("auto"===n)return e.format(t);{if("never"===n)return e.format(Math.abs(t));let r=!1;if("always"===n?r=t>0||Object.is(t,0):"exceptZero"===n&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):r=t>0),!r)return e.format(t);{let n=e.format(-t),r=e.format(t),o=n.replace(r,"").replace(/\u200e|\u061C/,"");return 1!=[...o].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(r,"!!!").replace(o,"+").replace("!!!",r)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!wD){var t;let{unit:e,unitDisplay:r="short",locale:o}=this.resolvedOptions();if(!e)return n;let a=null==(t=wz[e])?void 0:t[r];n+=a[o]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,n);if(n<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(n)}`}formatRangeToParts(e,n){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw RangeError("End date must be >= start date");let t=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return wS||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),wD||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=function(e,n={}){let{numberingSystem:t}=n;if(t&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${t}`),"unit"===n.style&&!wD){var r;let{unit:e,unitDisplay:t="short"}=n;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(r=wz[e])?void 0:r[t]))throw Error(`Unsupported unit ${e} with unitDisplay = ${t}`);n={...n,style:"decimal"}}let o=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(wE.has(o))return wE.get(o);let a=new Intl.NumberFormat(e,n);return wE.set(o,a),a}(e,n),this.options=n}}function wP(e={}){let{locale:n}=yZ();return(0,uB.useMemo)(()=>new wM(n,e),[n,e])}var wT={};function wO(e){var n;let t=(0,uB.useRef)(void 0),{value:r,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:p,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,g=b6((n=wT)&&n.__esModule?n.default:n,"@react-aria/spinbutton");(0,uB.useEffect)(()=>()=>clearTimeout(t.current),[]);let y=(0,uB.useRef)(!1),b=()=>{y.current=!0},v=()=>{y.current=!1},$=""===o?g.format("Empty"):(o||`${r}`).replace("-","−");(0,uB.useEffect)(()=>{y.current&&(gi&&gi.clear("assertive"),gs($,"assertive"))},[$]);let A=mq(e=>{clearTimeout(t.current),null==p||p(),t.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&A(60)},e)}),w=mq(e=>{clearTimeout(t.current),null==d||d(),t.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r>a)&&w(60)},e)}),k=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=gJ();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":$,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(u){e.preventDefault(),null==u||u();break}case"ArrowUp":case"Up":p&&(e.preventDefault(),null==p||p());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{A(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{w(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v}}}wT={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let wN=RegExp("^.*\\(.*\\).*$"),wI=["latn","arab","hanidec","deva","beng"];class wB{parse(e){return wR(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,t){return wR(this.locale,this.options,e).isValidPartialNumber(e,n,t)}getNumberingSystem(e){return wR(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}let wj=new Map;function wR(e,n,t){let r=wF(e,n);if(!e.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let o of wI)if(o!==r.options.numberingSystem){let r=wF(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,n);if(r.isValidPartialNumber(t))return r}}return r}function wF(e,n){let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():""),r=wj.get(t);return r||(r=new wL(e,n),wj.set(t,r)),r}class wL{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=wG(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=n.indexOf("-"),t=(n=n.replace("-","")).indexOf(".");-1===t&&(t=n.length),n=n.replace(".",""),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?"0.00":`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let t=n?+n:NaN;if(isNaN(t))return NaN;if("percent"===this.options.style){var r,o;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(r=this.options.minimumFractionDigits)?r:0)+2,20),maximumFractionDigits:Math.min((null!=(o=this.options.maximumFractionDigits)?o:0)+2,20)};return new wB(this.locale,e).parse(new wM(this.locale,e).format(t))}return"accounting"===this.options.currencySign&&wN.test(e)&&(t*=-1),t}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=wG(e,".",this.symbols.group))),"fr-FR"===this.options.locale&&this.symbols.group&&(e=wG(e," ",this.symbols.group),e=wG(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,n=-1/0,t=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&t>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=wG(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,n={}){var t,r;this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,n,t,r){var o,a,i,s,l;let c=new Intl.NumberFormat(e,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),p=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=wV.map(e=>c.formatToParts(e)),f=null!=(l=null==(o=p.find(e=>"minusSign"===e.type))?void 0:o.value)?l:"-",h=null==(a=u.find(e=>"plusSign"===e.type))?void 0:a.value;h||(null==r?void 0:r.signDisplay)!=="exceptZero"&&(null==r?void 0:r.signDisplay)!=="always"||(h="+");let m=null==(i=new Intl.NumberFormat(e,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:i.value,g=null==(s=p.find(e=>"group"===e.type))?void 0:s.value,y=[...new Set([...p.filter(e=>!wW.has(e.type)).map(e=>wU(e.value)),...d.flatMap(e=>e.filter(e=>!wW.has(e.type)).map(e=>wU(e.value)))])].sort((e,n)=>n.length-e.length),b=0===y.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${y.join("|")}|[\\p{White_Space}]`,"gu"),v=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),$=new Map(v.map((e,n)=>[e,n]));return{minusSign:f,plusSign:h,decimal:m,group:g,literals:b,numeral:RegExp(`[${v.join("")}]`,"g"),index:e=>String($.get(e))}}(e,this.formatter,this.options,n),"percent"===this.options.style&&((null!=(t=this.options.minimumFractionDigits)?t:0)>18||(null!=(r=this.options.maximumFractionDigits)?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let wW=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),wV=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function wG(e,n,t){return e.replaceAll?e.replaceAll(n,t):e.split(n).join(t)}function wU(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wq(e,n,t){let r="+"===e?n+t:n-t;if(n%1!=0||t%1!=0){let o=n.toString().split("."),a=t.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));n=Math.round(n*i),t=Math.round(t*i),r=("+"===e?n+t:n-t)/i}return r}let wH=(0,uB.createContext)(null),wK=(0,uB.createContext)(null),wY=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,wH);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",{locale:i}=yZ(),s=function(e){let{minValue:n,maxValue:t,step:r,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:p}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===r||isNaN(r)?$q(a,n,t):$K(a,n,t,r)),isNaN(i)||(i=void 0===r||isNaN(r)?$q(i,n,t):$K(i,n,t,r));let[u,d]=vc(a,isNaN(i)?NaN:i,s),[f,h]=(0,uB.useState)(()=>isNaN(u)?"":new wM(l,o).format(u)),m=(0,uB.useMemo)(()=>new wB(l,o),[l,o]),g=(0,uB.useMemo)(()=>m.getNumberingSystem(f),[m,f]),y=(0,uB.useMemo)(()=>new wM(l,{...o,numberingSystem:g}),[l,o,g]),b=(0,uB.useMemo)(()=>y.resolvedOptions(),[y]),v=(0,uB.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),$=$r({...e,value:u}),A=void 0===r||isNaN(r)?1:r;"percent"===b.style&&(void 0===r||isNaN(r))&&(A=.01);let[w,k]=(0,uB.useState)(u),[x,C]=(0,uB.useState)(l),[E,S]=(0,uB.useState)(o);Object.is(u,w)&&l===x&&o===E||(h(v(u)),k(u),C(l),S(o));let D=(0,uB.useMemo)(()=>m.parse(f),[m,f]),z=(e,r=0)=>{if(isNaN(D))return $K(isNaN(r)?0:r,n,t,A);{let r=$K(D,n,t,A);return"+"===e&&r>D||"-"===e&&r<D?r:$K(wq(e,D,A),n,t,A)}},M=(0,uB.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===t||isNaN(t)||$K(D,n,t,A)>D||wq("+",D,A)<=t),[c,p,n,t,A,D]),P=(0,uB.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===n||isNaN(n)||$K(D,n,t,A)<D||wq("-",D,A)>=n),[c,p,n,t,A,D]);return{...$,validate:e=>m.isValidPartialNumber(e,n,t),increment:()=>{let e=z("+",n);e===u&&h(v(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=t&&(d($K(t,n,t,A)),$.commitValidation())},decrement:()=>{let e=z("-",t);e===u&&h(v(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=n&&(d(n),$.commitValidation())},canIncrement:M,canDecrement:P,minValue:n,maxValue:t,numberValue:D,setNumberValue:d,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),h(void 0===a?"":v(u));return}isNaN(D)?h(v(u)):(e=void 0===r||isNaN(r)?$q(D,n,t):$K(D,n,t,r),d(e=m.parse(v(e))),h(v(void 0===a?e:u)))}}}({...e,locale:i,validationBehavior:a}),l=(0,uB.useRef)(null),[c,p]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:u,groupProps:d,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var r,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:p,isRequired:u,minValue:d,maxValue:f,autoFocus:h,label:m,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:v,onKeyDown:$,onKeyUp:A,description:w,errorMessage:k,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:z,numberValue:M,inputValue:P,commit:T,commitValidation:O}=n,N=b6((o=wx)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=m5(i),{focusProps:B}=yv({onBlur(){T()}}),j=wP(g),R=(0,uB.useMemo)(()=>j.resolvedOptions(),[j]),F=wP({...g,currencySign:void 0}),L=(0,uB.useMemo)(()=>isNaN(M)?"":F.format(M),[F,M]),{spinButtonProps:W,incrementButtonProps:V,decrementButtonProps:G}=wO({isDisabled:c,isReadOnly:p,isRequired:u,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:z,value:M,textValue:L}),[U,q]=(0,uB.useState)(!1),{focusWithinProps:H}=yk({isDisabled:c,onFocusWithinChange:q});!function(e,n){let{onScroll:t,isDisabled:r}=e,o=(0,uB.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t&&t({deltaX:e.deltaX,deltaY:e.deltaY}))},[t]);_g(n,"wheel",r?void 0:o)}({onScroll:(0,uB.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?E():e.deltaY<0&&D())},[D,E]),isDisabled:x||c||p||!U},t);let K=(null!=(r=R.maximumFractionDigits)?r:0)>0,Y=void 0===n.minValue||isNaN(n.minValue)||n.minValue<0,Z="numeric";gM()?Y?Z="text":K&&(Z="decimal"):gI()&&(Y?Z="numeric":K&&(Z="decimal"));let J=gf(e),X=(0,uB.useCallback)(e=>{"Enter"===e.key?(T(),O()):e.continuePropagation()},[T,O]),{isInvalid:Q,validationErrors:ee,validationDetails:en}=n.displayValidation,{labelProps:et,inputProps:er,descriptionProps:eo,errorMessageProps:ea}=function(e,n,t){let r=mq(e=>{let r=t.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&n.validate(o)||e.preventDefault()});(0,uB.useEffect)(()=>{if(!wC()||!t.current)return;let e=t.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[t,r]);let o=wC()?null:e=>{let t=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);n.validate(t)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...c}=function(e,n){let{inputElementType:t="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,c]=vc(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=yw(e,n),u=$r({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:h}=u.displayValidation,{labelProps:m,fieldProps:g,descriptionProps:y,errorMessageProps:b}=v1({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=gf(e,{labelable:!0}),$={type:i,pattern:e.pattern};return v0(n,l,c),v2(e,u,n),(0,uB.useEffect)(()=>{if(n.current instanceof gv(n.current).HTMLTextAreaElement){let e=n.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[n]),{labelProps:m,inputProps:m7(v,"input"===t?$:void 0,{disabled:r,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":d||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>c(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(uj().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...p,...g}),descriptionProps:y,errorMessageProps:b,isInvalid:d,validationErrors:f,validationDetails:h}}(e,t),p=(0,uB.useRef)(null);return{inputProps:m7(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:n,selectionEnd:r}=t.current;p.current={value:e,selectionStart:n,selectionEnd:r}},onCompositionEnd(){if(t.current&&!n.validate(t.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=p.current;t.current.value=e,t.current.setSelectionRange(r,o),n.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...c}}({...C,...J,name:void 0,label:m,autoFocus:h,isDisabled:c,isReadOnly:p,isRequired:u,validate:void 0,[$t]:n,value:P,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Z,onChange:e=>{n.validate(e)&&n.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:v,onKeyDown:(0,uB.useMemo)(()=>mG(X,$),[X,$]),onKeyUp:A,description:w,errorMessage:k},n,t);v0(t,n.numberValue,n.setNumberValue);let ei=m7(W,B,er,{role:null,"aria-roledescription":gT()?null:N.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ei["aria-required"]=void 0);let es=e=>{var n;document.activeElement!==t.current&&("mouse"===e.pointerType?null==(n=t.current)||n.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(a=null!=e.label?et.id:e["aria-labelledby"]);let ec=m5(),ep=m5(),eu=m7(V,{"aria-label":l||N.format("increase",{fieldLabel:el}).trim(),id:a&&!l?ec:null,"aria-labelledby":a&&!l?`${ec} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canIncrement,onPressStart:es}),ed=m7(G,{"aria-label":s||N.format("decrease",{fieldLabel:el}).trim(),id:a&&!s?ep:null,"aria-labelledby":a&&!s?`${ep} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canDecrement,onPressStart:es});return{groupProps:{...H,role:"group","aria-disabled":c,"aria-invalid":Q?"true":void 0},labelProps:et,inputProps:ei,incrementButtonProps:eu,decrementButtonProps:ed,errorMessageProps:ea,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:en}}({...go(e),label:p,validationBehavior:a},s,l),v=ge({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),$=gf(e);return delete $.id,uj().createElement(m9,{values:[[wK,s],[vE,d],[vD,{...f,ref:l}],[$L,{...u,ref:c}],[yO,{slots:{increment:h,decrement:m}}],[yB,{slots:{description:g,errorMessage:y}}],[$B,b]]},uj().createElement("div",{...$,...v,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&uj().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function wZ(e,n){return Number.parseInt(wc(e,{calendar:n.calendar,locale:n.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wJ=(0,uB.forwardRef)(function(e,n){let{className:t}=e,r=(0,uB.useContext)(vy),o=(0,uB.useContext)(vb),a=r??o,i=(0,uB.useContext)(wA),s=bU(),l=wc(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),c=wZ(a.visibleRange.start.toDate(s),i),p=a.maxValue?wZ(a.maxValue.toDate(s),i):void 0,u=a.minValue?wZ(a.minValue.toDate(s),i):void 0,d=(0,uB.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,fP.jsxs)("span",{ref:n,className:t,children:[(0,fP.jsx)("span",{children:l}),(0,fP.jsxs)(wY,{formatOptions:{useGrouping:!1},maxValue:p,minValue:u,onChange:d,value:c,children:[(0,fP.jsx)(vz,{}),(0,fP.jsxs)(vS,{children:[(0,fP.jsx)(yN,{slot:"increment",children:(0,fP.jsx)(hy,{size:8})}),(0,fP.jsx)(yN,{slot:"decrement",children:(0,fP.jsx)(hh,{size:8})})]})]})]})});var wX=t(3519),wQ={};wQ.styleTagTransform=fq(),wQ.setAttributes=fW(),wQ.insert=fF().bind(null,"head"),wQ.domAPI=fj(),wQ.insertStyleElement=fG(),fI()(wX.A,wQ);let w0=wX.A&&wX.A.locals?wX.A.locals:void 0;function w1({children:e}){let n=(0,uB.useContext)(AA),t=(0,uB.useContext)(Aw),r=n??t,o=ft(()=>r?.close());return(0,fP.jsx)($I,{className:w0.dialog,ref:o,children:e})}let w2=(0,uB.forwardRef)(function({variant:e,today_:n,minDate:t,maxDate:r},o){let a="range"===e;return(0,fP.jsx)(Ay,{ref:o,className:w0.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,fP.jsx)(w1,{children:(0,fP.jsxs)(a?vv:v_,{...a?{minValue:t,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,fP.jsxs)("header",{className:w0.header,children:[(0,fP.jsx)(yN,{className:fO()(w0.flatButton,w0.flatButtonMd),slot:"previous",children:(0,fP.jsx)(hk,{size:16})}),(0,fP.jsx)(wJ,{className:w0.monthYear}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,w0.flatButtonMd),slot:"next",children:(0,fP.jsx)(hx,{size:16})})]}),(0,fP.jsx)(vA,{className:w0.calendarGrid,children:e=>(0,fP.jsx)(vC,{className:fO()("cds--date-picker__day",{[w0.today]:0===n.compare(e)}),date:e},e.toString())})]})})})}),w3=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)(AA),[r,o]=gt({slot:e.slot},n,$k),{locale:a}=yZ(),i=$A({...r,locale:a,createCalendar:vn}),s=(0,uB.useRef)(null),{fieldProps:l,inputProps:c}=v6({...r,inputRef:s},i,o),p=(0,uB.useCallback)(()=>{i.isDisabled||t.toggle()},[]);return(0,fP.jsxs)(m9,{values:[[$x,i],[vD,{...c,ref:s}],[vE,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fP.jsx)(vS,{...e,id:e.id,ref:n,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:p,children:i.segments.map((n,t)=>(0,uB.cloneElement)(e.children(n),{key:t}))}),(0,fP.jsx)(vz,{})]})}),w5=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)(AA),r=(0,uB.useContext)(Aw);return(t??r).isInvalid?(0,fP.jsx)(mz,{ref:n,size:16,...e}):(0,fP.jsx)(hf,{ref:n,size:16,...e})});class w4{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,n){this.locale=e,this.dictionary=n}}let w6=new Map,w7=(0,uB.forwardRef)(function({segment:e,...n},t){let r=(0,uB.useContext)($x),o=mV(t),{segmentProps:a}=function(e,n,t){let r,o,a,i,s=(0,uB.useRef)(""),{locale:l,direction:c}=yZ(),p=function(){var e;let{locale:n}=yZ(),t=b4((e=vM)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,uB.useMemo)(()=>{try{return new Intl.DisplayNames(n,{type:"dateTimeField"})}catch{return new w4(n,t)}},[n,t])}(),{ariaLabel:u,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:h}=v3.get(n),m=e.isPlaceholder?"":e.text,g=(0,uB.useMemo)(()=>n.dateFormatter.resolvedOptions(),[n.dateFormatter]),y=_o({month:"long",timeZone:g.timeZone}),b=_o({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(n.dateValue));else{let e=y.format(n.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=wO({value:e.value,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:n.isDisabled,isReadOnly:n.isReadOnly||!e.isEditable,isRequired:n.isRequired,onIncrement:()=>{s.current="",n.increment(e.type)},onDecrement:()=>{s.current="",n.decrement(e.type)},onIncrementPage:()=>{s.current="",n.incrementPage(e.type)},onDecrementPage:()=>{s.current="",n.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&n.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&n.setSegment(e.type,e.minValue)}}),$=(0,uB.useMemo)(()=>new wB(l,{maximumFractionDigits:0}),[l]),A=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!$.isValidPartialNumber(e.text)||n.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&n.clearSegment(e.type);else{let t=e.text.slice(0,-1),r=$.parse(t);0===(t=0===r?"":t).length||0===r?n.clearSegment(e.type):n.setSegment(e.type,r),s.current=t}},{startsWith:w}=(r=function(e){let{locale:n}=yZ(),t=n+(e?Object.entries(e).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(w6.has(t))return w6.get(t);let r=new Intl.Collator(n,e);return w6.set(t,r),r}({usage:"search",sensitivity:"base"}),o=(0,uB.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===r.compare(e.slice(0,n.length),n)),[r]),a=(0,uB.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===r.compare(e.slice(-n.length),n)),[r]),i=(0,uB.useCallback)((e,n)=>{if(0===n.length)return!0;e=e.normalize("NFC");let t=0,o=(n=n.normalize("NFC")).length;for(;t+o<=e.length;t++){let a=e.slice(t,t+o);if(0===r.compare(n,a))return!0}return!1},[r]),(0,uB.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),k=_o({hour:"numeric",hour12:!0}),x=(0,uB.useMemo)(()=>{let e=new Date;return e.setHours(0),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),C=(0,uB.useMemo)(()=>{let e=new Date;return e.setHours(12),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),E=_o({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,uB.useMemo)(()=>{if("era"!==e.type)return[];let t=bT(new bg(1,1,1),n.calendar),r=n.calendar.getEras().map(e=>{let n=t.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:E.formatToParts(n).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let n=e[0],t=e[e.length-1];for(let e=0;e<n.length;e++)if(n[e]!==t[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[E,n.calendar,e.type]),D=t=>{if(n.isDisabled||n.isReadOnly)return;let r=s.current+t;switch(e.type){case"dayPeriod":if(w(x,t))n.setSegment("dayPeriod",0);else if(w(C,t))n.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=S.find(e=>w(e.formatted,t));e&&(n.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!$.isValidPartialNumber(r))return;let o=$.parse(r),a=o,i=0===e.minValue;if("hour"===e.type&&n.dateFormatter.resolvedOptions().hour12){switch(n.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=$.parse(t));break;case"h12":i=!1,o>12&&(a=$.parse(t))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=$.parse(t));if(isNaN(o))return;let l=0!==a||i;l&&n.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=r}}};_g((0,uB.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let n=window.getSelection();(null==n?void 0:n.anchorNode)&&(null==(e=t.current)?void 0:e.contains(null==n?void 0:n.anchorNode))&&n.collapse(t.current)});let z=(0,uB.useRef)("");_g(t,"beforeinput",r=>{if(t.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":$.isValidPartialNumber(e.text)&&!n.isReadOnly&&A();break;case"insertCompositionText":z.current=t.current.textContent,t.current.textContent=t.current.textContent;break;default:null!=r.data&&D(r.data)}}),_g(t,"input",e=>{let{inputType:n,data:r}=e;"insertCompositionText"===n&&(t.current&&(t.current.textContent=z.current),null!=r&&(w(x,r)||w(C,r))&&D(r))}),mU(()=>{let e=t.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[t,h]);let M=gT()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,uB.useMemo)(()=>n.segments.find(e=>e.isEditable),[n.segments])||n.isInvalid||(f=void 0);let P=m5(),T=!n.isDisabled&&!n.isReadOnly&&e.isEditable,O="literal"===e.type?"":p.of(e.type),N=_d({"aria-label":`${O}${u?`, ${u}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===c){I.unicodeBidi="embed";let n=g[e.type];("numeric"===n||"2-digit"===n)&&(I.direction="ltr")}return{segmentProps:m7(v,N,{id:P,...M,"aria-invalid":n.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":n.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:T,suppressContentEditableWarning:T,spellCheck:T?"false":void 0,autoCorrect:T?"off":void 0,[parseInt(uj().version,10)>=17?"enterKeyHint":"enterkeyhint"]:T?"next":void 0,inputMode:n.isDisabled||"dayPeriod"===e.type||"era"===e.type||!T?void 0:"numeric",tabIndex:n.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(gz()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),A()}},onFocus:()=>{s.current="",t.current&&_A(t.current,{containingElement:_w(t.current)});let e=window.getSelection();null==e||e.collapse(t.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:i,isFocused:s,isFocusVisible:l}=yx(),{hoverProps:c,isHovered:p}=yz({...n,isDisabled:r.isDisabled||"literal"===e.type}),u=function(e){let{className:n,style:t,children:r,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,uB.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:o}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:a}):null==r?a:r,{className:e??o,style:l||i?{...i,...l}:void 0,children:c??a,"data-rac":""}},[n,t,r,o,a,i,s])}({...n,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:p,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,uB.useCallback)(e=>{e.stopPropagation()},[]);return(0,fP.jsx)("span",{...m7(gf(n),a,i,c),...u,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":p||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:d})}),w8={short:!1,size:"md"},w9=(0,uB.forwardRef)(function(e,n){let{className:t,defaultValue:r,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:c,light:p,maxDate:u,minDate:d,onChange:f,onChangeRaw:h,short:m,size:g,value:y,...b}={...w8,...e},{calendar:v,intlLocale:$,today_:A}=ww(),w=(0,uB.useId)(),k=!!(c??l),x=(0,uB.useMemo)(()=>AE(r,v),[r,v]),C=(0,uB.useMemo)(()=>AE(y,v,!0),[y,v]),E=(0,uB.useMemo)(()=>AE(u,v),[u,v]),S=(0,uB.useMemo)(()=>AE(d??wk,v),[d,v]),D=(0,uB.useMemo)(()=>a||s,[a,s]),z=(0,uB.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(AS(e)))),[h,f]);return(0,fP.jsx)(AC,{locale:$.toString(),children:(0,fP.jsx)("div",{className:fO()("cds--form-item",t),children:(0,fP.jsx)(m9,{values:[[wA,$]],children:(0,fP.jsxs)(Ak,{className:fO()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":p}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===$.language||void 0,...b,onChange:z,children:[(0,fP.jsxs)("div",{className:"cds--date-picker-container",children:[k&&(0,fP.jsx)($W,{className:fO()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:c??l}),(0,fP.jsxs)(vS,{className:w0.inputGroup,children:[(0,fP.jsx)(w3,{id:k?w:void 0,ref:n,className:fO()("cds--date-picker-input__wrapper",w0.inputWrapper,{[w0.inputWrapperSm]:"sm"===g,[w0.inputWrapperMd]:"md"===g||!g||0===g.length,[w0.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e}):(0,fP.jsx)(uj().Fragment,{})}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,{[w0.flatButtonSm]:"sm"===g,[w0.flatButtonMd]:"md"===g||!g||0===g.length,[w0.flatButtonLg]:"lg"===g}),children:(0,fP.jsx)(w5,{})})]}),(0,fP.jsx)($j,{className:w0.invalidText,children:i})]}),(0,fP.jsx)(w2,{variant:"single",today_:A})]})})})})}),ke=(0,uB.forwardRef)(function({className:e,defaultValue:n,invalid:t,invalidText:r,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:c,minDate:p,onChange:u,onChangeRaw:d,size:f="md",value:h,...m},g){let{calendar:y,intlLocale:b,today_:v}=ww(),$=(0,uB.useId)(),A=!!(s??i),w=(0,uB.useMemo)(()=>{if(h)return{start:AE(h[0],y,!1),end:AE(h[1],y,!1)}},[h,y]),k=(0,uB.useMemo)(()=>{if(n)return{start:AE(n[0],y,!1),end:AE(n[1],y,!1)}},[n,y]),x=(0,uB.useMemo)(()=>AE(p??wk,y,!0),[p,y]),C=(0,uB.useMemo)(()=>AE(c,y,!0),[c,y]),E=(0,uB.useMemo)(()=>t||a,[t,a]),S=(0,uB.useMemo)(()=>(d&&u&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),d??(e=>u?.([AS(e.start),AS(e.end)]))),[d,u]);return(0,fP.jsx)(AC,{locale:b.toString(),children:(0,fP.jsx)("div",{className:fO()("cds--form-item",e),children:(0,fP.jsx)(m9,{values:[[wA,b]],children:(0,fP.jsx)(Ax,{id:A?$:void 0,className:fO()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:E,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:C,minValue:x,value:w,defaultValue:k,ref:g,isDisabled:o,...m,onChange:S,children:(0,fP.jsxs)("div",{className:"cds--date-picker-container",children:[A&&(0,fP.jsx)($W,{className:fO()("cds--label",{"cds--label--disabled":o}),htmlFor:$,children:s??i}),(0,fP.jsxs)(vS,{className:w0.inputGroup,children:[(0,fP.jsxs)("div",{className:fO()(w0.inputsWrapper,{[w0.inputsWrapperSm]:"sm"===f,[w0.inputsWrapperMd]:"md"===f||!f||0===f.length,[w0.inputsWrapperLg]:"lg"===f}),children:[(0,fP.jsx)($E,{className:fO()("cds--date-picker-input__wrapper",w0.startInput,w0.dateInputWrapper),slot:"start",children:e=>(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e})}),(0,fP.jsx)("div",{className:w0.separator,children:(0,fP.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fP.jsx)($E,{className:fO()("cds--date-picker-input__wrapper",w0.endInput,w0.dateInputWrapper),slot:"end",children:e=>(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e})})]}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,{[w0.flatButtonSm]:"sm"===f,[w0.flatButtonMd]:"md"===f||!f||0===f.length,[w0.flatButtonLg]:"lg"===f}),children:(0,fP.jsx)(w5,{})})]}),(0,fP.jsx)($j,{className:w0.invalidText,children:r}),(0,fP.jsx)(w2,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var kn=t(3009),kt={};kt.styleTagTransform=fq(),kt.setAttributes=fW(),kt.insert=fF().bind(null,"head"),kt.domAPI=fj(),kt.insertStyleElement=fG(),fI()(kn.A,kt);let kr=kn.A&&kn.A.locals?kn.A.locals:void 0,ko=({diagnoses:e})=>{let{diagnosisTags:n}=dM({externalModuleName:"@openmrs/esm-styleguide"});return(0,fP.jsx)("div",{className:kr.container,children:e.map(e=>{let{rank:t,uuid:r,display:o}=e,a=n[1===t?"primaryColor":"secondaryColor"];return(0,fP.jsx)(f0.vwO,{type:a,children:o},r)})})};var ka=t(1719),ki={};ki.styleTagTransform=fq(),ki.setAttributes=fW(),ki.insert=fF().bind(null,"head"),ki.domAPI=fj(),ki.insertStyleElement=fG(),fI()(ka.A,ki);let ks=ka.A&&ka.A.locals?ka.A.locals:void 0,kl=({width:e="64",height:n="64"})=>(0,fP.jsx)("svg",{width:e,height:n,viewBox:"0 0 64 64",children:(0,fP.jsx)("use",{href:"#omrs-empty-data-illustration"})}),kc=e=>{let n="tablet"===d7(),t=e.launchForm;return(0,fP.jsx)(f0.Wdr,{className:ks.layer,children:(0,fP.jsxs)(f0.FAs,{className:ks.tile,children:[(0,fP.jsx)("div",{className:n?ks.tabletHeading:ks.desktopHeading,children:(0,fP.jsx)("h4",{children:e.headerTitle})}),(0,fP.jsx)(kl,{}),(0,fP.jsx)("p",{className:ks.content,children:o4("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fP.jsx)("p",{className:ks.action,children:t&&(0,fP.jsx)(f0.$nd,{onClick:()=>t(),kind:"ghost",size:n?"lg":"sm",children:o4("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var kp=t(8749),ku={};ku.styleTagTransform=fq(),ku.setAttributes=fW(),ku.insert=fF().bind(null,"head"),ku.domAPI=fj(),ku.insertStyleElement=fG(),fI()(kp.A,ku);let kd=kp.A&&kp.A.locals?kp.A.locals:void 0,kf=({error:e,headerTitle:n})=>{let t="tablet"===d7();return(0,fP.jsx)(f0.Wdr,{children:(0,fP.jsxs)(f0.FAs,{className:kd.tile,children:[(0,fP.jsx)("div",{className:t?kd.tabletHeading:kd.desktopHeading,children:(0,fP.jsx)("h4",{children:n})}),(0,fP.jsxs)("p",{className:kd.errorMessage,children:[o4("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fP.jsx)("p",{className:kd.errorCopy,children:o4("errorCopy")})]})})},kh=kf;var km=t(2849),kg={};kg.styleTagTransform=fq(),kg.setAttributes=fW(),kg.insert=fF().bind(null,"head"),kg.domAPI=fj(),kg.insertStyleElement=fG(),fI()(km.A,kg);let ky=km.A&&km.A.locals?km.A.locals:void 0,kb=uj().forwardRef((e,n)=>{let{slotName:t,basePath:r,componentContext:o,state:a}=fe(),i=window.location??{pathname:""},s=uK(t??"");return e.isChildOfHeader&&t&&s.length>0?(0,fP.jsxs)(f0.f8J,{"aria-label":o4("leftNavigation","Left navigation"),className:ky.leftNav,expanded:!0,isFixedNav:!0,ref:n,...e,children:[(0,fP.jsx)(uJ,{name:"global-nav-menu-slot"}),t?(0,fP.jsx)(dA,{value:o,fallback:(0,fP.jsx)(uJ,{name:t,state:{basePath:r,currentPath:i,...a}}),children:(0,fP.jsx)(uR.Provider,{value:o,children:(0,fP.jsx)(uJ,{name:t,state:{basePath:r,currentPath:i,...a}})})}):null]}):null});var k_=t(7553),kv={};kv.styleTagTransform=fq(),kv.setAttributes=fW(),kv.insert=fF().bind(null,"head"),kv.domAPI=fj(),kv.insertStyleElement=fG(),fI()(k_.A,kv);let k$=k_.A&&k_.A.locals?k_.A.locals:void 0,kA=({selectedLocationUuid:e,defaultLocationUuid:n,locationTag:t,locationsPerRequest:r=50,onChange:o})=>{let[a,i]=(0,uB.useState)(""),s=(0,uB.useId)(),{location:l}=function(e){let n=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:t,error:r,isLoading:o}=(0,dN.A)(n,oN,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,uB.useMemo)(()=>({location:t?.data?.entry?t.data.entry[0]:null,error:n?r:null,isLoading:!!n&&o}),[t,o,r,n])}(n),{locations:c,isLoading:p,hasMore:u,loadingNewData:d,error:f,setPage:h}=function(e,n=0,t=""){let r=dO(t),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dQ(function(t,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let n=new URL(e.url);return n.origin===window.location.origin?e.url:new URL(`${n.pathname}${n.search?`?${n.search}`:""}`,window.location.origin).toString()}let a=`${oP}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),n&&i.append("_count",""+n),t&&i.append("_getpagesoffset",""+t*n),e&&i.append("_tag",e),"string"==typeof r&&""!==r&&i.append("name:contains",r),a+i.toString()},oN);return(0,uB.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(t,r,a),m=(0,uB.useMemo)(()=>l&&!a&&n?[l,...c.filter(({resource:e})=>e.id!==n)]:c??[],[l,c,n,a]),g=(0,uB.useCallback)(e=>{o(),i(e.trim())},[o]),y=fr((0,uB.useCallback)(()=>{!d&&u&&h(e=>e+1)},[d,u,h])),b=u?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)(f0.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:o4("searchForLocation"),id:s,placeholder:o4("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,fP.jsx)("div",{className:k$.errorNotification,id:`${s}-error`,children:(0,fP.jsx)(f0.jeF,{kind:"error",subtitle:o4("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:o4("error","Error")})}),(0,fP.jsx)("div",{className:k$.searchResults,children:p?(0,fP.jsx)("div",{className:k$.loadingContainer,children:Array.from({length:5}).map((e,n)=>(0,fP.jsx)(f0.Psq,{className:k$.radioButtonSkeleton,role:"progressbar"},n))}):(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("div",{className:k$.locationResultsContainer,children:m.length>0?(0,fP.jsx)(f0.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,n)=>(0,fP.jsx)(f0.aaP,{className:k$.locationRadioButton,id:e.resource.id,labelText:(0,fP.jsx)("span",{ref:n===b?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fP.jsx)("div",{className:k$.emptyState,children:(0,fP.jsx)("p",{className:k$.locationNotFound,children:o4("noResultsToDisplay")})})}),d&&(0,fP.jsx)("div",{className:k$.loadingIcon,children:(0,fP.jsx)(f0.OuH,{description:o4("loading")})})]})})]})},kw=G("modalState",{modalContainer:null,modalStack:[]}),kk=0;async function kx(e,n,t={}){let r=uv(n),o=null;if(e){if(!r)throw Error(`No modal named '${n}' has been registered.`);let{load:a}=r,i=await a(),s=kk++;o=rT({...i,name:`${n}-${s}`},{...t,domElement:e})}else O(`Failed to launch modal. Please notify your administrator. Modal name: ${n}`);return o}let kC=window.getComputedStyle(document.body).overflow;function kE({modalStack:e,modalContainer:n}){n&&(e.length?(n.style.visibility||(addEventListener("keydown",kD),document.body.style.overflow="hidden",n.style.visibility="unset"),e.forEach((t,r)=>{switch(t.state){case"NEW":{let e=function({size:e}){let n=document.createElement("div");return n.className=`cds--modal-container cds--modal-container--${e}`,n.setAttribute("role","dialog"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-modal","true"),n}({size:t.props?.size??"md"});t.container=e,kx(e,t.modalName,t.props).then(r=>{t.parcel=r,t.state="MOUNTED",n.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":t.container&&(t.container.style.visibility=r?"hidden":"unset");break;case"TO_BE_DELETED":t.onClose(),t.parcel?.unmount?.(),t.container?.remove(),setTimeout(()=>{kw.setState({modalContainer:n,modalStack:e.filter(e=>e!==t)})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=kC,removeEventListener("keydown",kD)))}function kS(e){let n=kw.getState(),t=n.modalStack.map(n=>n===e?{...n,state:"TO_BE_DELETED"}:n);kw.setState({...n,modalStack:t})}function kD(e){"Escape"===e.key&&function(){let[e]=kw.getState().modalStack;e&&kS(e)}()}function kz(e){kw.subscribe(kE),kw.setState({...kw.getState(),modalContainer:e})}function kM(e,n={},t=()=>{}){let r=()=>{let e=kw.getState().modalStack.find(e=>e.onClose===t);e&&kS(e)};if(uv(e)){var o;let a,i;o={state:"NEW",onClose:t,modalName:e,props:{close:r,...n}},i=[o,...(a=kw.getState()).modalStack],kw.setState({...a,modalStack:i})}else O(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let kP=({notification:e})=>{let{description:n,action:t,kind:r,critical:o,title:a,onAction:i}=e;return(0,fP.jsx)(f0.kZS,{actionButtonLabel:t,kind:r||"info",lowContrast:o,subtitle:n,title:a||"",inline:!0,onActionButtonClick:i})},kT=({subject:e})=>{let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.description!==e.description||n.action!==e.action||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(kP,{notification:e},e.id))})},kO=({notification:e})=>{let{actionButtonLabel:n,onActionButtonClick:t=()=>{},subtitle:r,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...c}=e,[p,u]=(0,uB.useState)(n);return(0,fP.jsx)(f0.kZS,{kind:o||"info",actionButtonLabel:p,ariaLabel:o4("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{t(),s&&u(s)},statusIconDescription:o4("actionableNotification","Actionable notification"),subtitle:r,title:a,lowContrast:i,inline:!0,...c})},kN=({subject:e})=>{let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.subtitle!==e.subtitle||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(kO,{notification:e},e.id))})};var kI=t(3264),kB=Object.prototype.hasOwnProperty;let kj=function(e){if(null==e)return!0;if((0,eF.A)(e)&&((0,eR.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,eL.A)(e)||(0,eV.A)(e)||(0,ej.A)(e)))return!e.length;var n=(0,nd.A)(e);if("[object Map]"==n||"[object Set]"==n)return!e.size;if((0,eI.A)(e))return!(0,kI.A)(e).length;for(var t in e)if(kB.call(e,t))return!1;return!0},kR=new es.Subject,kF=0,kL=new es.Subject,kW=0;function kV(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(kT,{subject:kR}))}function kG(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&(n instanceof Error||!kj(n)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{kR.next({...e,id:kF++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function kU(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(kN,{subject:kL}))}function kq(e){var n;e&&("string"==typeof(n=e.actionButtonLabel)?n.trim().length>0:"object"==typeof n&&!kj(n))?setTimeout(()=>{kL.next({...e,id:kW++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let kH=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],kK=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var kY=t(2829),kZ={};kZ.styleTagTransform=fq(),kZ.setAttributes=fW(),kZ.insert=fF().bind(null,"head"),kZ.domAPI=fj(),kZ.insertStyleElement=fG(),fI()(kY.A,kZ);let kJ=kY.A&&kY.A.locals?kY.A.locals:void 0,kX=({value:e,unit:n,label:t,interpretation:r,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,uB.useId)(),{referenceRange:c,isLoading:p}=function(e,n){let t=null;e&&(t=n?`${oM}/conceptreferencerange/?patient=${n}&concept=${e}&v=full`:`${oM}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:a}=(0,dN.A)(t,oN),i=r?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||r?void 0:a,s),u=o??c,d=(0,uB.useMemo)(()=>{if(r)return r?"--"===r?"normal":kH.includes(r)?r.toLowerCase():kK.includes(r)?r:"normal":void 0;if(u&&!p){if(!u||null==e||""===e)return"normal";let n="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(n)?"normal":null!==u.hiAbsolute&&void 0!==u.hiAbsolute&&n>u.hiAbsolute?"off_scale_high":null!==u.hiCritical&&void 0!==u.hiCritical&&n>=u.hiCritical?"critically_high":null!==u.hiNormal&&void 0!==u.hiNormal&&n>u.hiNormal?"high":null!==u.lowAbsolute&&void 0!==u.lowAbsolute&&n<u.lowAbsolute?"off_scale_low":null!==u.lowCritical&&void 0!==u.lowCritical&&n<=u.lowCritical?"critically_low":null!==u.lowNormal&&void 0!==u.lowNormal&&n<u.lowNormal?"low":"normal"}return"normal"},[r,u,e,p])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,h="normal"!==d,m=t?`omrs-numeric-obs-label-${t.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:o4("notAvailable","Not available"),$=fO()({[kJ["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[kJ["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[kJ.low]:"low"===d,[kJ.high]:"high"===d,[kJ["off-scale-low"]]:"off_scale_low"===d,[kJ["off-scale-high"]]:"off_scale_high"===d}),A=fO()({[kJ.container]:!0,[kJ.card]:!0,[kJ["critical-value"]]:f,[kJ["abnormal-value"]]:h&&!f}),w=fO()({[kJ.cell]:!0,[$]:!0});return"cell"===i?(0,fP.jsxs)("div",{className:w,children:[v,b&&n?` ${n}`:""]}):(0,fP.jsxs)("section",{className:A,"data-testid":"numeric-observation-card",children:[t&&(0,fP.jsxs)("div",{className:kJ["label-container"],children:[(0,fP.jsx)("span",{id:m,className:kJ.label,children:t}),h&&(0,fP.jsx)("span",{className:kJ[d.replace("_","-")],title:o4("abnormalValue","Abnormal value")})]}),(0,fP.jsxs)("div",{className:kJ["value-container"],children:[(0,fP.jsx)("span",{id:g,"aria-labelledby":m&&y?`${m} ${y}`:m||y||void 0,className:kJ.value,children:v}),b&&n&&(0,fP.jsx)("span",{id:y,className:kJ.units,children:n})]})]})};var kQ=t(289),k0={};k0.styleTagTransform=fq(),k0.setAttributes=fW(),k0.insert=fF().bind(null,"head"),k0.domAPI=fj(),k0.insertStyleElement=fG(),fI()(kQ.A,k0);let k1=kQ.A&&kQ.A.locals?kQ.A.locals:void 0,k2=e=>{if("children"in e){let{children:n,className:t,...r}=e;return(0,fP.jsx)("div",{className:fO()(k1.pageHeader,t),...r,children:n})}{let{title:n,illustration:t,className:r,...o}=e;return(0,fP.jsx)("div",{className:fO()(k1.pageHeader,r),...o,children:(0,fP.jsx)(k3,{title:n,illustration:t})})}},k3=({title:e,illustration:n,className:t})=>{let[r,o]=(0,uB.useState)(null);return(0,uB.useEffect)(()=>{tx("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fP.jsxs)("div",{className:fO()(k1.pageHeaderContent,t),children:[n,(0,fP.jsxs)("div",{className:k1.pageLabels,children:[r?.implementationName&&(0,fP.jsx)("p",{children:o4(r.implementationName)}),(0,fP.jsx)("p",{className:k1.pageName,children:e})]})]})};var k5=t(8739),k4={};k4.styleTagTransform=fq(),k4.setAttributes=fW(),k4.insert=fF().bind(null,"head"),k4.domAPI=fj(),k4.insertStyleElement=fG(),fI()(k5.A,k4);let k6=k5.A&&k5.A.locals?k5.A.locals:void 0,k7=({totalItems:e,pageSize:n,onPageNumberChange:t,pageNumber:r,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=fi(n,e,r,a),c="tablet"===d7(),p=o4("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fP.jsx)(fP.Fragment,{children:e>0&&(0,fP.jsxs)("div",{className:fO()({[k6.tablet]:c,[k6.desktop]:!c}),children:[(0,fP.jsxs)("div",{children:[p,o&&(0,fP.jsx)(uF,{to:o,className:k6.configurableLink,children:i??o4("seeAll","See all")})]}),(0,fP.jsx)(f0.dKS,{className:k6.pagination,page:r,pageSize:n,pageSizes:s,totalItems:e,onChange:t,pageRangeText:(e,n)=>o4("paginationOfPages","of {{count}} pages",{count:n}),size:c?"lg":"sm"})]})})};function k8(e){return xe(xt(e,"usual","official"))}function k9(e){return k8(e)}function xe(e){var n;let t;return e?e.text??(t=(n=e).given??[],(n.family?t.concat(n.family):t).join(" ")):""}function xn(e){return xe(e)}function xt(e,...n){for(let t of(0==n.length&&(n=["usual"]),n)){let n=e.name?.find(e=>{var n,r;return n=e,r=t,n.use?n.use===r:"usual"===r});if(n)return n}}function xr(e,n=fh()()){let t=fh()(n),r=wm(e,t);if(null==r)return null;let o=t.diff(r,"hours"),a=t.diff(r,"days"),i=t.diff(r,"weeks"),s=t.diff(r,"months"),l=t.diff(r,"years"),c={};if(o<2)c.minutes=t.diff(r,"minutes");else if(a<2)c.hours=o;else if(i<4)c.days=a;else if(l<1){let e=t.subtract(i,"weeks").diff(r,"days");c.weeks=i,c.days=e}else if(l<2){let e=t.subtract(s,"months").diff(r,"days");c.months=s,c.days=e}else if(l<18){let e=t.subtract(l,"year").diff(r,"months");c.years=l,c.months=e}else c.years=l;return c}function xo(e,n=fh()()){let t=xr(e,n);if(null==t)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in t&&0===t.minutes&&(r.minutesDisplay="always"),wh(t,r)}var xa=t(6655),xi={};xi.styleTagTransform=fq(),xi.setAttributes=fW(),xi.insert=fF().bind(null,"head"),xi.domAPI=fj(),xi.insertStyleElement=fG(),fI()(xa.A,xi);let xs=xa.A&&xa.A.locals?xa.A.locals:void 0;function xl({showIdentifierLabel:e,type:n,value:t}){return(0,fP.jsx)("span",{className:xs.primaryIdentifier,children:(0,fP.jsxs)(f0.vwO,{className:xs.tag,type:"gray",children:[e&&n?.text&&(0,fP.jsxs)("span",{className:xs.label,children:[n.text,": "]}),(0,fP.jsx)("span",{className:xs.value,children:t})]})})}function xc({showIdentifierLabel:e,type:n,value:t}){return(0,fP.jsxs)(f0.lRv,{className:xs.secondaryIdentifier,id:`patient-banner-identifier-${t}`,children:[e&&(0,fP.jsxs)("span",{className:xs.label,children:[n?.text,": "]}),(0,fP.jsx)("span",{className:xs.value,children:t})]})}function xp({identifiers:e,showIdentifierLabel:n}){let{excludePatientIdentifierCodeTypes:t}=dM(),{primaryIdentifierCode:r}=fc(),o=e?.filter(e=>{let n=e.type?.coding?.[0]?.code;return n&&!t?.uuids.includes(n)})??[];return(0,fP.jsx)(fP.Fragment,{children:o?.length?o.map(({value:e,type:t},a)=>(0,fP.jsxs)(uj().Fragment,{children:[(0,fP.jsx)("span",{className:xs.identifier,children:t?.coding?.[0]?.code===r?(0,fP.jsx)(xl,{showIdentifierLabel:n,type:t,value:e}):(0,fP.jsx)(xc,{showIdentifierLabel:n,type:t,value:e})}),a<o.length-1&&(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"})]},e)):""})}let xu={Female:hB,Male:hj,Other:hR,Unknown:hF},xd=({gender:e})=>{let n=xu[e];return n?(0,fP.jsx)(n,{fill:"#525252"}):null},xf={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function xh({patient:e,renderedFrom:n}){var t;let r,o,a=k8(e),i=e?.gender&&(o=xf[r=(t=e.gender).toLowerCase()]??"Unknown",{displayText:o4(r,t),iconKey:o}),s=(0,uB.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:n}),[e.id,e,n]);return(0,fP.jsxs)("div",{className:xs.patientInfo,children:[(0,fP.jsx)("div",{className:fO()(xs.row,xs.patientNameRow),children:(0,fP.jsxs)("div",{className:xs.flexRow,children:[(0,fP.jsx)("span",{className:xs.patientName,children:a}),i&&(0,fP.jsxs)("div",{className:xs.gender,children:[(0,fP.jsx)(xd,{gender:i.iconKey}),(0,fP.jsx)("span",{children:i.displayText})]}),(0,fP.jsx)(uJ,{className:xs.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fP.jsxs)("div",{className:xs.demographics,children:[e.birthDate&&(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("span",{children:xo(e.birthDate)}),(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"}),(0,fP.jsx)("span",{children:wl(e.birthDate,{time:!1})}),(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"})]}),(0,fP.jsx)(xp,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fP.jsx)(uJ,{className:xs.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xm=t(8282),xg=t(9355),xy={};xy.styleTagTransform=fq(),xy.setAttributes=fW(),xy.insert=fF().bind(null,"head"),xy.domAPI=fj(),xy.insertStyleElement=fG(),fI()(xg.A,xy);let xb=xg.A&&xg.A.locals?xg.A.locals:void 0;function x_({patient:e,patientUuid:n,actionsSlotName:t,additionalActionsSlotState:r}){let[o,a]=(0,uB.useState)(!1),{extensions:i}=uY(t),s="tablet"===d7(),l=ft(()=>a(!1),o),c=(0,uB.useRef)(null),p=(0,uB.useRef)(null),u=(0,uB.useId)(),d=`patient-actions-menu-trigger-${u}`,f=`patient-actions-menu-${u}`,h=(0,uB.useCallback)(()=>a(e=>!e),[]),m=(0,uB.useCallback)(()=>{a(!1),c.current?.focus()},[]),g=(0,uB.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let n=p.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let t=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(n).indexOf(t);if(-1===r)return void n["ArrowDown"===e.key?0:n.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),a=o<0?n.length-1:o>=n.length?0:o;n[a]?.focus()}},[m,o]);(0,uB.useEffect)(()=>{if(o&&p.current){let e=p.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,uB.useMemo)(()=>({patientUuid:n,patient:e,closeMenu:m,...r}),[n,e,m,r]);return 0===i.length?null:(0,fP.jsx)("div",{className:xb.overflowMenuContainer,children:(0,fP.jsxs)("div",{"data-overflow-menu":!0,className:fO()("cds--overflow-menu",f4.container),ref:l,children:[(0,fP.jsxs)("button",{className:fO()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},f4.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:h,onKeyDown:g,ref:c,children:[(0,fP.jsx)("span",{className:xb.actionsButtonText,children:o4("actions","Actions")})," ",(0,fP.jsx)(xm.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fP.jsxs)("div",{className:fO()("cds--overflow-menu-options","cds--overflow-menu--flip",f4.menu,{[f4.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:p,role:"menu",tabIndex:-1,children:[(0,fP.jsx)("ul",{className:fO()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fP.jsx)(uJ,{name:t,state:y},t)}),(0,fP.jsx)("span",{})]})]})})}var xv=t(5570),x$=t.n(xv);function xA(e){let{patientPhotoConceptUuid:n}=dM({externalModuleName:"@openmrs/esm-styleguide"}),t=n?`${oM}/obs?patient=${e}&concept=${n}&v=full`:null,{data:r,error:o,isLoading:a}=(0,dr.Ay)(e?t:null,oN),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let xw=({width:e=56,height:n=56,"aria-label":t})=>{let{t:r}=(0,dt.useTranslation)();return(0,fP.jsxs)("svg",{"aria-label":t??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fP.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fP.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})};var xk=t(8689),xx={};xx.styleTagTransform=fq(),xx.setAttributes=fW(),xx.insert=fF().bind(null,"head"),xx.domAPI=fj(),xx.insertStyleElement=fG(),fI()(xk.A,xx);let xC=xk.A&&xk.A.locals?xk.A.locals:void 0;function xE({patientUuid:e,patientName:n,alt:t}){let{data:r,isLoading:o}=xA(e),[a,i]=(0,uB.useState)(null),[s,l]=(0,uB.useState)(!1),c=(0,uB.useMemo)(()=>x$().generate(e),[e]);(0,uB.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let n=!1,t=new Image;return t.onload=()=>{n||(i(e),l(!1))},t.onerror=()=>{n||(i(null),l(!1))},t.src=e,()=>{n=!0}}i(null),l(!1)},[r?.imageSrc]);let p=(0,uB.useMemo)(()=>t||(a?o4("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:n}):o4("patientAvatarAlt","Avatar for {{patientName}}",{patientName:n})),[t,a,n]);return o||s?(0,fP.jsx)(f0.ryE,{className:xC.skeleton,"data-testid":"skeleton-icon"}):r?.imageSrc&&!a?(0,fP.jsx)(xw,{"aria-label":o4("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:n})}):a?(0,fP.jsx)("div",{"aria-label":p,children:(0,fP.jsx)("img",{className:xC.avatar,src:a,alt:p,title:n})}):(0,fP.jsx)("div",{"aria-label":p,children:(0,fP.jsx)("div",{className:xC.avatar,title:n,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fP.jsx)("span",{className:xC.initials,children:function(e,n=3){return e.split(/\s+/).filter(Boolean).slice(0,n).map(e=>e[0]).join("")}(n)})})})}var xS=t(9481),xD={};xD.styleTagTransform=fq(),xD.setAttributes=fW(),xD.insert=fF().bind(null,"head"),xD.domAPI=fj(),xD.insertStyleElement=fG(),fI()(xS.A,xD);let xz=xS.A&&xS.A.locals?xS.A.locals:void 0,xM=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],xP=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-appointments",pictogramProps:e})})),xT=xP,xO=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),xN=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),xI=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),xB=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),xj=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),xR=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),xF=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),xL=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-facility",pictogramProps:e})})),xW=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),xV=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),xG=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),xU=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),xq=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),xH=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),xK=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),xY=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-patients",pictogramProps:e})})),xZ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),xJ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),xX=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),xQ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-registration",pictogramProps:e})})),x0=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),x1=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),x2=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-transfer",pictogramProps:e})})),x3=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-triage",pictogramProps:e})})),x5=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),x4=xL,x6=xY,x7=(0,uB.memo)((0,uB.forwardRef)(function({pictogram:e,fallback:n,...t},r){let o=(0,uB.useRef)(document.getElementById(e));return(0,uB.useEffect)(()=>{let n=document.getElementById("omrs-svgs-container"),t=new MutationObserver(n=>{for(let t of n)"childList"===t.type&&(o.current=document.getElementById(e))});return n&&t.observe(n,{childList:!0}),()=>t.disconnect()},[e]),(0,fP.jsx)(dA,{value:o.current,fallback:n,children:(0,fP.jsx)(x8,{ref:r,pictogram:e,pictogramProps:t})})})),x8=(0,uB.memo)((0,uB.forwardRef)(function({pictogram:e,pictogramProps:n},t){let{className:r,size:o}=Object.assign({},{size:92},n);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fP.jsx)("svg",{ref:t,className:fO()(xz.pictogram,r),height:o,width:o,children:(0,fP.jsx)("use",{href:`#${e}`})})})),x9=({children:e})=>"tablet"===d7()?(0,fP.jsx)(f0.Wdr,{children:e}):(0,fP.jsx)(fP.Fragment,{children:e});var Ce=t(514),Cn={};Cn.styleTagTransform=fq(),Cn.setAttributes=fW(),Cn.insert=fF().bind(null,"head"),Cn.domAPI=fj(),Cn.insertStyleElement=fG(),fI()(Ce.A,Cn);let Ct=Ce.A&&Ce.A.locals?Ce.A.locals:void 0,Cr=({snackbar:e,closeSnackbar:n})=>{let{actionButtonLabel:t="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==r,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==r,title:p,id:u,...d}=e,[f,h]=(0,uB.useState)(t),[m,g]=(0,uB.useState)(!0),[y,b]=(0,uB.useState)(!1),v=(0,uB.useCallback)(()=>{setTimeout(n,250)},[n]),$=(0,uB.useCallback)(()=>{b(!0),v()},[v]);return(0,uB.useEffect)(()=>{if(c){let e=setTimeout($,l);return()=>clearTimeout(e)}},[l,c,$]),(0,uB.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fP.jsx)(f0.kZS,{actionButtonLabel:f,"aria-label":o4("closeSnackbar","Close snackbar"),className:fO()(Ct.slideIn,{[Ct.animated]:m,[Ct.slideOut]:y}),kind:r,lowContrast:a,onActionButtonClick:()=>{o(),$(),i&&h(i)},onClose:v,statusIconDescription:o4("snackbarNotification","Snackbar notification"),subtitle:s,title:p,...d})},Co=({subject:e})=>{let[n,t]=(0,uB.useState)([]),r=(0,uB.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.subtitle!==e.subtitle||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(Cr,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},Ca=new es.Subject,Ci=0;function Cs(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(Co,{subject:Ca}))}function Cl(e){var n;e&&"string"==typeof(n=e.title)&&n.trim().length>0?setTimeout(()=>{Ca.next({...e,id:Ci++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Cc=({toast:e,closeToast:n})=>{let{description:t,kind:r,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,uB.useCallback)(()=>{s(),n()},[n,s]);return(0,fP.jsx)("div",{children:(0,fP.jsx)(f0.kZS,{actionButtonLabel:i,kind:r||"info",lowContrast:o,subtitle:t,title:a||"",onActionButtonClick:l,onClose:n})})},Cp=({subject:e})=>{let[n,t]=(0,uB.useState)([]),r=(0,uB.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.description!==e.description||n.kind!==e.kind||n.title!==e.title||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(Cc,{toast:e,closeToast:()=>r(e)},e.id))})},Cu=new es.Subject,Cd=0;function Cf(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(Cp,{subject:Cu}))}function Ch(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&!kj(n))?setTimeout(()=>{Cu.next({...e,id:Cd++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Cm(e,n=!1){if(n)return!0;let t=Cv[e];return!t||!t()}function Cg(e,n){let t=CS.getState()?.workspaceGroup,r=t?.name;r&&e===r&&CP(()=>{let r=CB(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof t?.cleanup&&t.cleanup(),CS.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof n&&n()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function Cy(e,n){let{name:t,additionalProps:r}=n;uC(t);let o=()=>{Cx(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Cb(t,r),closeWorkspaceGroup:!1})};Cm(e.name)?o():CO("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Cb(e,n){let t=uC(e),r=CS.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void Cg(r.name,()=>{Cb(e,n)});let o=CS.getState().workspaceGroup?.name,a={...t,title:CN(t,n),closeWorkspace:(n={})=>Cx(e,n),closeWorkspaceWithSavedChanges:n=>Cx(e,{ignoreChanges:!0,...n}),promptBeforeClosing:n=>{var t,r;return t=e,r=n,void(Cv[t]=r)},setTitle:(n,t)=>{a.title=n,a.titleNode=t,CS.setState(n=>{let t=n.openWorkspaces.map(n=>n.name===e?a:n);return{...n,openWorkspaces:t}})},currentWorkspaceGroup:o,additionalProps:n??{}};function i(e,n){CS.setState(t=>{let r=[e,...n??t.openWorkspaces],o=CM(e);return{...t,openWorkspaces:r,workspaceWindowState:o}})}o&&CB(o,n);let s=CS.getState().openWorkspaces,l=s.findIndex(n=>n.name===e),c=s.find(e=>e.type==a.type);if(0===s.length)i(a);else if(s[0].canHide||0===l)if(l>=0){let n=s[l];i({...n,additionalProps:a.additionalProps,...n.title===CN(n,n.additionalProps)&&{title:CN(a,a.additionalProps)}},s.filter(n=>n.name!=e))}else c?(i(c,CS.getState().openWorkspaces.filter(e=>e.type!=a.type)),Cy(c,{name:e,additionalProps:n})):i(a);else Cy(s[0],{name:e,additionalProps:n})}function C_({targetUrl:e,contextKey:n,workspaceName:t,additionalProps:r}){CC(n),Cb(t,r),o$({to:e})}let Cv={};function C$(e,n){Cv[e]=n}function CA(e){return Cv[e]}function Cw(){let e=CS.getState();CS.setState({...e,prompt:null})}let Ck={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Cx(e,n={}){n={...Ck,...n};let t=()=>{let t=CS.getState();t.openWorkspaces.find(n=>n.name===e);let r=t.openWorkspaces.filter(n=>n.name!=e),o=CS.getState().workspaceGroup?.name;o&&n.closeWorkspaceGroup&&Cg(o),Cv[e]=()=>!1,CS.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:CM(r?.[0])})),n?.onWorkspaceClose?.()};return Cm(e,n?.ignoreChanges)?(t(),!0):(CO("closing-workspace",t,uC(e).title??e),!1)}function CC(e){CS.getState().context!=e&&CS.setState({context:e,openWorkspaces:[],prompt:null})}let CE={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},CS=G("workspace",CE);function CD(){return CS}function Cz(e){let n=CS.getState();CS.setState({...n,workspaceWindowState:e})}function CM(e){return e?.preferredWindowSize??"normal"}function CP(e=()=>{},n=()=>!0){let t=CS.getState().openWorkspaces.filter(n).every(({name:e})=>Cm(e)),r=()=>{CI(),e?.()};t?r():CO("closing-all-workspaces",r)}function CT(){let{workspaceWindowState:e,openWorkspaces:n,prompt:t,workspaceGroup:r}=uG(CS);return(0,uB.useMemo)(()=>({active:n.length>0,prompt:t,workspaceWindowState:e,workspaces:n,workspaceGroup:r}),[n,e,t,r])}function CO(e,n=()=>{},t=""){let r;switch(e){case"closing-workspace":r={title:o4("unsavedChangesTitleText","Unsaved changes"),body:o4("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{n?.()},confirmText:o4("discard","Discard")};break;case"closing-all-workspaces":{let e=CS.getState().openWorkspaces.filter(({name:e})=>!Cm(e)).map(({title:e},n)=>`${n+1}. ${e}`);r={title:o4("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:o4("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{n?.()},confirmText:o4("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:o4("unsavedChangesTitleText","Unsaved changes"),body:o4("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:t}),onConfirm:()=>{CS.setState(e=>({...e,prompt:null})),n?.()},confirmText:o4("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),n?.();return}CS.setState(e=>({...e,prompt:r}))}function CN(e,n){return n?.workspaceTitle??e.title}function CI(){CS.setState(CE)}function CB(e,n={}){if(!e||"default"===e)return;let t=q(e,{});return n&&t.setState(e=>({...e,...n})),t}var Cj=t(4250),CR={};CR.styleTagTransform=fq(),CR.setAttributes=fW(),CR.insert=fF().bind(null,"head"),CR.domAPI=fj(),CR.insertStyleElement=fG(),fI()(Cj.A,CR);let CF=Cj.A&&Cj.A.locals?Cj.A.locals:void 0;function CL({getIcon:e,formOpenInTheBackground:n,tagContent:t}){return(0,fP.jsxs)(fP.Fragment,{children:[e({size:16}),n?(0,fP.jsx)("span",{className:CF.interruptedTag,children:"!"}):(0,fP.jsx)("span",{className:CF.countTag,children:t})]})}let CW=({getIcon:e,label:n,iconDescription:t,handler:r,type:o,tagContent:a})=>{let i=d7(),{workspaces:s,workspaceWindowState:l}=CT(),c=s?.findIndex(({type:e})=>e===o)??-1,p="hidden"!==l&&0===c,u=c>0||0===c&&"hidden"===l;return"tablet"===i||"phone"===i?(0,fP.jsxs)(f0.$nd,{className:fO()(CF.container,{[CF.active]:p}),iconDescription:t,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,fP.jsx)("span",{className:CF.elementContainer,children:(0,fP.jsx)(CL,{formOpenInTheBackground:u,getIcon:e,tagContent:a})}),(0,fP.jsx)("span",{children:n})]}):(0,fP.jsx)(f0.K0,{align:"left","aria-label":t,className:fO()(CF.container,{[CF.active]:p}),enterDelayMs:300,kind:"ghost",label:n,onClick:r,size:"md",children:(0,fP.jsx)("div",{className:CF.elementContainer,children:(0,fP.jsx)(CL,{formOpenInTheBackground:u,getIcon:e,tagContent:a})})})};var CV=t(4240),CG=t(8622),CU=/[\\^$.*+?()[\]{}|]/g,Cq=RegExp(CU.source);let CH=function(e){return(e=nq(e))&&Cq.test(e)?e.replace(CU,"\\$&"):e};var CK=t(2474),CY={};CY.styleTagTransform=fq(),CY.setAttributes=fW(),CY.insert=fF().bind(null,"head"),CY.domAPI=fj(),CY.insertStyleElement=fG(),fI()(CK.A,CY);let CZ=CK.A&&CK.A.locals?CK.A.locals:void 0;function CJ({contextKey:e}){let{prompt:n}=CT();return(0,uB.useEffect)(()=>{RegExp(`/${CH(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,uB.useEffect)(()=>(CC(e),()=>{CC(null)}),[e]),(0,uB.useEffect)(()=>{let n=n=>{let{detail:{cancelNavigation:t,newUrl:r}}=n,o=RegExp(`/${CH(e)}(/|$)`),a=new URL(r),i=o.test(a.pathname),s=CS.getState().openWorkspaces.every(({name:e})=>Cm(e));i||(s?CI():(t?.(),CP(()=>{o$({to:r})})))};return window.addEventListener("single-spa:before-routing-event",n),()=>{window.removeEventListener("single-spa:before-routing-event",n)}},[]),null!=n?(0,fP.jsxs)(f0.KXP,{open:!0,onClose:Cw,children:[(0,fP.jsx)(f0.rQ0,{title:n.title}),(0,fP.jsx)(f0.cwr,{children:(0,fP.jsx)("p",{className:CZ.messageBody,children:n.body})}),(0,fP.jsxs)(f0.jlY,{children:[(0,fP.jsx)(f0.$nd,{kind:"secondary",onClick:Cw,children:n.cancelText??o4("cancel")}),(0,fP.jsx)(f0.$nd,{kind:"danger",onClick:n.onConfirm,children:n.confirmText??o4("confirm")})]})]}):null}function CX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function CQ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CX(Object(t),!0).forEach(function(n){C1(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function C0(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C1(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C2(e){return(C2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C3(e,n){return(C3=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function C5(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var C4=function(e){var n=uB.Component;if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),n&&C3(i,n);var t,r,o,a=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=C2(i);e=t?Reflect.construct(n,arguments,C2(this).constructor):n.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return C5(this)});function i(e){var n;if(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}(this,i),C1(C5(n=a.call(this,e)),"handleRef",function(e){n.el=e}),C1(C5(n),"addThingToDo",function(e,t){n.state.hasError&&"unmount"!==e||(n.nextThingToDo=(n.nextThingToDo||Promise.resolve()).then(function(){if(!n.unmounted||"unmount"===e)return t.apply(void 0,arguments)}).catch(function(t){throw n.nextThingToDo=Promise.resolve(),n.setState({hasError:!0}),t&&t.message&&(t.message="During '".concat(e,"', parcel threw an error: ").concat(t.message)),n.props.handleError?n.props.handleError(t):setTimeout(function(){throw t}),t}))}),C1(C5(n),"getParcelProps",function(){var e=CQ(CQ({},n.props),{},{domElement:n.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),n.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return n}return r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var n,t=e.props.mountParcel||e.mountParcel;if(!t)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?n=e.el:(e.createdDomElement=n=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(t){n.style[t]=e.props.wrapStyle[t]}),e.props.appendTo.appendChild(n)),e.parcel=t(e.props.config,CQ({domElement:n},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return u5&&u5.Consumer?uB.createElement(u5.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):null;var n=u5&&u5.Consumer?uB.createElement(u5.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):void 0;return uB.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},n)}}],C0(i.prototype,r),o&&C0(i,o),i}();C1(C4,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var C6=t(6748),C7={};C7.styleTagTransform=fq(),C7.setAttributes=fW(),C7.insert=fF().bind(null,"head"),C7.domAPI=fj(),C7.insertStyleElement=fG(),fI()(C6.A,C7);let C8=C6.A&&C6.A.locals?C6.A.locals:void 0;function C9({workspace:e,additionalPropsFromPage:n}){let[t,r]=(0,uB.useState)(),o=function(e){let[n,t]=(0,uB.useState)({}),[r,o]=(0,uB.useState)(e);return(0,uB.useEffect)(()=>{r!==e&&o(e)},[e]),(0,uB.useEffect)(()=>{let e,n=CB(r);return n&&(t(n.getState()),e=n.subscribe(t)),()=>{n&&e?.()}},[r]),n}(e.currentWorkspaceGroup);(0,uB.useEffect)(()=>{let n=!0;return e.load().then(e=>{n&&r(e)}),()=>{n=!1}},[e]);let a=(0,uB.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...n,...o,...e.additionalProps},[e,n,o]);return t?(0,fP.jsx)(C4,{config:t,mountParcel:rT,...a},e.name):(0,fP.jsx)(f0.OuH,{className:C8.loader,description:`${o4("loading","Loading")} ...`})}var Ee=t(801),En={};En.styleTagTransform=fq(),En.setAttributes=fW(),En.insert=fF().bind(null,"head"),En.domAPI=fj(),En.insertStyleElement=fG(),fI()(Ee.A,En);let Et=Ee.A&&Ee.A.locals?Ee.A.locals:void 0;function Er({isWithinWorkspace:e,name:n,actionMenuProps:t={}}){let[r,o]=(0,uB.useState)(!1),a=(0,uB.useRef)(window.innerHeight),{featureName:i}=(0,uB.useContext)(uR),s=d7();(0,uB.useEffect)(()=>{let e=()=>{o(!d8(s)&&a.current>window.innerHeight),a.current!=window.innerHeight&&(a.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a]);let l=`action-menu-${n&&"default"!=n?n:i}-items-slot`;return(0,fP.jsx)("aside",{className:fO()(Et.sideRail,{[Et.withinWorkspace]:e,[Et.sideRailHidden]:r,[Et.sideRailVisible]:!r}),children:(0,fP.jsx)("div",{className:Et.container,children:(0,fP.jsx)(uJ,{className:Et.chartExtensions,name:l,state:t})})})}function Eo({contextKey:e,overlay:n,showSiderailAndBottomNav:t,additionalWorkspaceProps:r,actionMenuProps:o}){let a=d7(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=CT(),c=l?.name,p=i[0],u="hidden"===s||null==p,d=p?.width??(n?"wider":"narrow"),f=(0,uB.useMemo)(()=>t||c&&!u,[c,u,t]);return dS(!u&&!d8(a)),(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)("div",{className:t?C8.workspaceContainerWithActionMenu:C8.workspaceContainerWithoutActionMenu,children:[(0,fP.jsx)("aside",{className:fO()(n?C8.workspaceOverlayOuterContainer:C8.workspaceWindowSpacer,{[C8.hiddenRelative]:u,[C8.narrowWorkspace]:"narrow"===d,[C8.widerWorkspace]:"wider"===d,[C8.extraWideWorkspace]:"extra-wide"===d}),children:(0,fP.jsx)("div",{className:fO()(C8.workspaceFixedContainer,{[C8.maximizedWindow]:"maximized"===s,[C8.hiddenFixed]:u}),children:i.map((e,n)=>(0,fP.jsx)("div",{className:fO()(C8.workspaceInnerContainer,{[C8.hiddenExtraWorkspace]:0!==n}),children:(0,fP.jsx)(uB.Suspense,{fallback:null,children:(0,fP.jsx)(dt.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fP.jsx)(Ea,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${n}`}`))})}),(0,fP.jsx)(CJ,{contextKey:e})]}),f&&(0,fP.jsx)(Er,{name:c,isWithinWorkspace:!t,actionMenuProps:o})]})}function Ea({workspaceInstance:e,additionalWorkspaceProps:n}){let{t}=(0,dt.useTranslation)(),r=d7(),{workspaceWindowState:o,workspaceGroup:a}=CT(),i=a?.name,s="maximized"===o;(0,uB.useEffect)(()=>{let n=t(e.title);n!==e.title&&e.setTitle(n)},[e.title,t,e.setTitle]);let{featureName:l}=(0,uB.useContext)(uR),c=(0,uB.useCallback)(()=>{Cz(s?"normal":"maximized")},[s]),{canHide:p=!1,canMaximize:u=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,uB.useMemo)(()=>e??{},[e]),h=(0,uB.useMemo)(()=>({...n,...e?.additionalProps}),[n,e]);return e&&(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)(f0.Y9Y,{"aria-label":o4("workspaceHeader","Workspace Header"),className:C8.header,children:[!d8(r)&&!p&&(0,fP.jsx)(f0.dJ2,{"aria-label":o4("close","Close"),renderMenuIcon:(0,fP.jsx)(hl,{}),onClick:()=>f()}),(0,fP.jsx)(f0.bCw,{prefix:"",children:e.titleNode??t(e.title)}),(0,fP.jsx)("div",{className:C8.overlayHeaderSpacer}),(0,fP.jsxs)(f0.wdv,{className:C8.headerButtons,children:[(0,fP.jsx)(uJ,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,fP.jsx)(uJ,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,fP.jsx)(uJ,{name:`workspace-header-${l}-slot`,state:h}),d8(r)&&(0,fP.jsxs)(fP.Fragment,{children:[(u||s)&&(0,fP.jsx)(f0.V8d,{"aria-label":s?o4("minimize","Minimize"):o4("maximize","Maximize"),onClick:c,children:s?(0,fP.jsx)(CV.Xj,{}):(0,fP.jsx)(CV.hz,{})}),p&&!i?(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide","Hide"),onClick:()=>Cz("hidden"),children:(0,fP.jsx)(hc,{})}):(0,fP.jsx)(f0.V8d,{"aria-label":o4("close","Close"),onClick:()=>f?.(),children:(0,fP.jsx)(hE,{})})]}),"tablet"===r&&p&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("close","Close"),onClick:()=>f?.(),children:(0,fP.jsx)(CG.d3,{})})]})]}),(0,fP.jsx)("div",{className:fO()(C8.workspaceContent,{[C8.marginWorkspaceContent]:!!d}),children:(0,fP.jsx)(C9,{workspace:e,additionalPropsFromPage:n},e.name)})]})}async function Ei(e,n){let{openedGroup:t}=uS.getState();if(t){if(t.groupName===e&&Ec(t.props,n))return!0;else if(!await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return uS.setState(t=>({...t,openedGroup:{groupName:e,props:n},openedWindows:[]})),!0}async function Es(e){let{openedGroup:n,openedWindows:t}=uS.getState();if(n){if(t.length>0&&!(e||await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;uS.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function El(e,n=null,t=null,r=null){let o=uS.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=uD(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=uz(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let c=uM(e);if(i&&(i.groupName!==l.name||!Ec(i.props,r)))return!!await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let r=o.openedWindows[c],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:p}=r;if(Ec(r.props,t)){let u=p.find(n=>n.workspaceName===e);return u&&Ec(u.props,n)?((i||c!==o.openedWindows.length-1)&&uS.setState(Eu.restoreWindow(o,s)),!0):!!await Ep({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[Em(e,n)],props:r?.props??t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Ep({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(uS.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Ep({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Ec(e,n){return null==e||null==n||B(e,n)}function Ep(e){function n(e,n){let t=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&t.push(o),n&&o.workspaceName===n)break}return t}let{openedWindows:t,workspaceTitleByWorkspaceName:r}=uS.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=t.flatMap(e=>n(e));break;case"CLOSE_WINDOW":{let r=t.find(n=>n.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(r);break}case"CLOSE_WORKSPACE":{let r=t.find(n=>n.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=t.filter(n=>n.windowName!==e.windowNameToSpare).flatMap(e=>n(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let n=kM("workspace2-close-prompt",{onConfirm:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let Eu={setWindowMaximized(e,n,t){let r=e.openedWindows.findIndex(e=>e.windowName===n),o=[...e.openedWindows],a={...o[r],maximized:t};return o[r]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,n){let t=e.openedWindows.findIndex(e=>e.windowName===n),r=e.openedWindows[t],o=[...e.openedWindows.filter((e,n)=>n!==t),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,n){let t=uM(n);if(t<0)return e;let r={...e.openedWindows[t]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===n),a=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let n=t===e.openedWindows.length-1;a.splice(t,1),n&&a.length>0&&(i=!1)}else a[t]=r;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,n,t,r){let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);if(a.window!==o.window)throw Error(`Child workspace ${t} does not belong to the same workspace window as parent workspace ${n}`);let i=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==i)throw Error(`Cannot open child workspace ${t} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===n);if(-1===l)throw Error(`Cannot open child workspace ${t} from parent workspace ${n} as the parent is not opened within the workspace window`);let c=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,n)=>n==i?{...e,openedWorkspaces:[...c,Em(t,r)]}:e)}},setHasUnsavedChanges(e,n,t){let r=uM(n);if(r<0)return e;let o={...e.openedWindows[r]},a=o.openedWorkspaces.findIndex(e=>e.workspaceName===n);if(a<0)return e;o.openedWorkspaces[a]={...o.openedWorkspaces[a],hasUnsavedChanges:t};let i=[...e.openedWindows];return i[r]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,n,t){let r={...e.workspaceTitleByWorkspaceName};return null===t?delete r[n]:r[n]=t,{...e,workspaceTitleByWorkspaceName:r}}};function Ed(){return uU(uS,Eu)}let Ef=()=>(0,uB.useContext)(u5),Eh=()=>Object.keys(uS.getState().registeredWorkspacesByName);function Em(e,n){return{workspaceName:e,props:n??{},hasUnsavedChanges:!1,uuid:cL()}}var Eg=t(9572),Ey={};Ey.styleTagTransform=fq(),Ey.setAttributes=fW(),Ey.insert=fF().bind(null,"head"),Ey.domAPI=fj(),Ey.insertStyleElement=fG(),fI()(Eg.A,Ey);let Eb=Eg.A&&Eg.A.locals?Eg.A.locals:void 0,E_=({title:e,children:n,hasUnsavedChanges:t=!1})=>{let r=d7(),{setWindowMaximized:o,hideWindow:a,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:p,registeredWorkspacesByName:u,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=Ed(),{workspaceName:m,isRootWorkspace:g,closeWorkspace:y,showActionMenu:b}=Ef(),v=uM(m),$=s[v],A=$?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,uB.useEffect)(()=>{A?.hasUnsavedChanges!=t&&i(m,t??!1)},[A?.hasUnsavedChanges,t,m,i]),(0,uB.useEffect)(()=>{d[m]!==e&&f(m,e)},[d,m,e,f]),v<0||null==l||null==A)return null;let w=c[l.groupName];if(!w)throw Error(`Cannot find registered workspace group ${l.groupName}`);let k=u[m].window,x=p[k];if(!x)throw Error(`Cannot find registered workspace window ${k}`);let{icon:C,canMaximize:E}=x,S="closable"===w.persistence,D=!!C&&!S,{maximized:z}=$,M=x?.width??"narrow",P=Object.values(p).some(e=>e.group===l.groupName&&void 0!==e.icon),T=v<s.length-1||h;return(0,fP.jsxs)("div",{className:fO()(Eb.workspaceOuterContainer,{[Eb.narrowWorkspace]:"narrow"===M,[Eb.widerWorkspace]:"wider"===M,[Eb.extraWideWorkspace]:"extra-wide"===M,[Eb.isActionMenuOpened]:P}),children:[(0,fP.jsx)("div",{className:fO()(Eb.workspaceSpacer,{[Eb.hidden]:T})}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceMiddleContainer,{[Eb.maximized]:z,[Eb.hidden]:T,[Eb.isRootWorkspace]:g,[Eb.showActionMenu]:b}),children:(0,fP.jsxs)("div",{className:fO()(Eb.workspaceInnerContainer,{[Eb.maximized]:z,[Eb.hidden]:T,[Eb.isRootWorkspace]:g}),children:[(0,fP.jsxs)(f0.Y9Y,{"aria-label":o4("workspaceHeader"),className:Eb.header,children:[(0,fP.jsx)(f0.bCw,{prefix:"",children:e}),(0,fP.jsx)("div",{className:Eb.overlayHeaderSpacer}),(0,fP.jsx)(f0.wdv,{className:Eb.headerButtons,children:d8(r)?(0,fP.jsxs)(fP.Fragment,{children:[(E||z)&&(0,fP.jsx)(f0.V8d,{"aria-label":z?o4("minimize"):o4("maximize"),onClick:()=>o(k,!z),children:z?(0,fP.jsx)(CV.Xj,{}):(0,fP.jsx)(CV.hz,{})}),D&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide"),onClick:()=>a(),children:(0,fP.jsx)(hc,{})}),!S&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("close"),onClick:()=>y({closeWindow:!0}),children:(0,fP.jsx)(hE,{})})]}):(0,fP.jsxs)(fP.Fragment,{children:[D&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide"),onClick:()=>a(),children:(0,fP.jsx)(CG.d3,{})}),(0,fP.jsx)(f0.V8d,{"aria-label":o4("close"),onClick:()=>{S?Es():y({closeWindow:!0})},children:(0,fP.jsx)(hE,{})})]})})]}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceContent),children:n})]})})]})};var Ev=t(9625),E$={};E$.styleTagTransform=fq(),E$.setAttributes=fW(),E$.insert=fF().bind(null,"head"),E$.domAPI=fj(),E$.insertStyleElement=fG(),fI()(Ev.A,E$);let EA=Ev.A&&Ev.A.locals?Ev.A.locals:void 0;function Ew({getIcon:e,hasUnsavedChanges:n,tagContent:t}){return(0,fP.jsxs)(fP.Fragment,{children:[e({size:16}),n?(0,fP.jsx)("span",{className:EA.interruptedTag,children:"!"}):(0,fP.jsx)("span",{className:EA.countTag,children:t})]})}let Ek=({icon:e,label:n,tagContent:t,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let a=d7(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=Ed(),{extension:p}=(0,uB.useContext)(uR),u=i.findIndex(e=>e.windowName===p?.extensionId),d=i[u],f=null!=d,h=f&&(u<i.length-1||c),m=f&&!h,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)h?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:n,windowProps:t}=r;El(e,n,t)}};return"tablet"===a||"phone"===a?(0,fP.jsxs)(f0.$nd,{className:fO()(EA.container,{[EA.active]:f&&!m,[EA.focused]:m}),iconDescription:n,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fP.jsx)("span",{className:EA.elementContainer,children:(0,fP.jsx)(Ew,{hasUnsavedChanges:g,getIcon:e,tagContent:t})}),(0,fP.jsx)("span",{children:n})]}):(0,fP.jsx)(f0.K0,{align:"left","aria-label":n,className:fO()(EA.container,{[EA.active]:f&&!m,[EA.focused]:m}),enterDelayMs:300,kind:"ghost",label:n,onClick:y,size:"md",children:(0,fP.jsx)("div",{className:EA.elementContainer,children:(0,fP.jsx)(Ew,{hasUnsavedChanges:g,getIcon:e,tagContent:t})})})};function Ex({showContactDetails:e,toggleContactDetails:n,className:t}){return(0,fP.jsx)(f0.$nd,{className:t,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:e?hC:hw,children:e?o4("showLess","Show less"):o4("showMore","Show more")})}var EC=t(4745),EE={};EE.styleTagTransform=fq(),EE.setAttributes=fW(),EE.insert=fF().bind(null,"head"),EE.domAPI=fj(),EE.insertStyleElement=fG(),fI()(EC.A,EE);let ES=EC.A&&EC.A.locals?EC.A.locals:void 0,ED=({patientUuid:e})=>{let{cohorts:n=[],isLoading:t}=function(e){let n=e?`${oM}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:t,isLoading:r}=(0,dr.Ay)(n,oN),o=t?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,uB.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)("p",{className:ES.heading,children:[o4("patientLists","Patient Lists")," (",n?.length??0,")"]}),t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsxs)("ul",{children:[(()=>{if(n?.length>0){let e=n.sort((e,n)=>wt(e?.startDate).getTime()-wt(n?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fP.jsx)("li",{children:(0,fP.jsx)(uF,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fP.jsx)("li",{children:"--"})})(),n.length>3&&(0,fP.jsx)("li",{className:ES.link,children:(0,fP.jsx)(uF,{to:`${window.spaBase}/home/patient-lists`,children:o4("seeMoreLists","See {{count}} more lists",{count:n?.length-3})})})]})]})},Ez=({patientId:e})=>{let{patient:n,isLoading:t}=fl(e),r=n?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("address","Address")}),(0,fP.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,n])=>"extension"===e?r.extension?.[0]?.extension?.map((n,t)=>(0,fP.jsxs)("li",{children:[o4(o(n.url),o(n.url)),": ",n.valueString]},`address-${e}-${t}`)):(0,fP.jsxs)("li",{children:[o4(e,e),": ",n]},`address-${e}`)):(0,fP.jsx)("li",{children:"--"})})]})},EM=({patientUuid:e})=>{let{isLoading:n,contactAttributes:t}=(e=>{let{contactAttributeTypes:n=[]}=dM({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:t,error:r,isLoading:o}=(e=>{let{data:n,error:t,isLoading:r}=(0,dN.A)(`${oM}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,oN);return{isLoading:r,attributes:n?.data.person.attributes??[],error:t}})(e);return{contactAttributes:(0,uB.useMemo)(()=>t.filter(({attributeType:e})=>n?.some(n=>e.uuid===n)),[t,n]),isLoading:o,error:r}})(e),r=(0,uB.useMemo)(()=>t?[...t?.map(e=>[e.attributeType.display?o4(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[t]);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("contactDetails","Contact Details")}),n?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsx)("ul",{children:r.length?r.map(([e,n],t)=>(0,fP.jsxs)("li",{children:[e,": ",n]},`${e}-${n}-${t}`)):(0,fP.jsx)("li",{children:"--"})})]})},EP=({patientId:e})=>{let{data:n,isLoading:t}=function(e){let n=`${oM}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:t,error:r,isLoading:o,isValidating:a}=(0,dr.Ay)(e?n:null,oN),i=t?.data?.results?.length?function(e,n){let t=[];for(let r of n)e===r.personA.uuid?t.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):t.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return t}(e,t.data.results):null;return{data:t?i:null,error:r,isLoading:o,isValidating:a}}(e);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("relationships","Relationships")}),t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsx)("ul",{children:n&&n.length>0?(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsxs)("li",{className:ES.relationship,children:[(0,fP.jsx)("div",{children:(0,fP.jsx)(uF,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fP.jsx)("div",{children:e.relationshipType}),(0,fP.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?o4("yearAbbreviation","yr"):o4("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fP.jsx)("li",{children:"--"})})]})};function ET({patientId:e,deceased:n}){return(0,fP.jsxs)("div",{className:fO()(ES.contactDetails,{[ES.deceased]:n}),children:[(0,fP.jsxs)("div",{className:ES.row,children:[(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(Ez,{patientId:e})}),(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(EM,{patientUuid:e})})]}),(0,fP.jsxs)("div",{className:ES.row,children:[(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(EP,{patientId:e})}),(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(ED,{patientUuid:e})})]})]})}function EO(e){let n=document.querySelector("template#loading-spinner");if(n){let t=n.content.cloneNode(!0),r=Array.prototype.map.call(t.childNodes,e=>e);return e.appendChild(t),()=>r.forEach(e=>e.remove())}return()=>{}}var EN=t(6846),EI={};EI.styleTagTransform=fq(),EI.setAttributes=fW(),EI.insert=fF().bind(null,"head"),EI.domAPI=fj(),EI.insertStyleElement=fG(),fI()(EN.A,EI);let EB=EN.A&&EN.A.locals?EN.A.locals:void 0;function Ej({workspaceGroup:e,groupProps:n}){let t=d7(),{persistence:r}=e;return(0,fP.jsx)("aside",{className:EB.sideRail,children:(0,fP.jsxs)("div",{className:EB.container,children:["closable"==r&&d8(t)&&(0,fP.jsx)(f0.K0,{align:"left",onClick:()=>Es(),label:o4("close"),kind:"ghost",children:(0,fP.jsx)(hE,{})}),(0,fP.jsx)(uR.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fP.jsx)(uJ,{className:EB.container,name:e.name,state:{groupProps:n}})})]})})}let ER=({lifeCycle:e,openedWorkspace:n,openedWindow:t,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:a})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Ed(),c=(0,uB.useMemo)(()=>n&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await Ep({reason:"CLOSE_WINDOW",explicit:!0,windowName:t.windowName}))&&(s(t.openedWorkspaces[0].workspaceName),!0):!!(o||await Ep({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:n.workspaceName}))&&(s(n.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=n.workspaceName,{openedWorkspaces:a}=t,i=a.findIndex(e=>e.workspaceName===o);-1===i||i!==a.length-1&&a.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Ep({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:a[i+1].workspaceName})||l(o,e,r||{})},workspaceName:n.workspaceName,workspaceProps:n.props,windowProps:t.props,groupProps:i&&i.props?i.props:null,isRootWorkspace:r,isLeafWorkspace:o,windowName:t.windowName,showActionMenu:a},[n,s,i,t]);if(!e){let{registeredWorkspacesByName:e}=uS.getState(),t=e[n.workspaceName],o=t&&t.window?t.window:void 0,{registeredWindowsByName:s}=uS.getState(),l=o?s[o]:void 0,c=l&&l.width?l.width:"narrow",p=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,fP.jsxs)("div",{className:fO()(Eb.workspaceOuterContainer,{[Eb.narrowWorkspace]:"narrow"===c,[Eb.widerWorkspace]:"wider"===c,[Eb.extraWideWorkspace]:"extra-wide"===c,[Eb.isActionMenuOpened]:p}),children:[(0,fP.jsx)("div",{className:Eb.workspaceSpacer}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceMiddleContainer,{[Eb.isRootWorkspace]:r,[Eb.showActionMenu]:a}),children:(0,fP.jsx)("div",{className:fO()(Eb.workspaceInnerContainer,{[Eb.isRootWorkspace]:r}),children:(0,fP.jsx)(f0.OuH,{className:Eb.loader,description:`${o4("loading")} ...`})})})]})}return(0,fP.jsx)(C4,{config:e,mountParcel:rT,...c},n.workspaceName)},EF=({openedWindow:e,showActionMenu:n})=>{let{openedWorkspaces:t}=e,[r,o]=(0,uB.useState)({}),{registeredWorkspacesByName:a}=uS.getState();return(0,uB.useEffect)(()=>{let e=!1;return Promise.all(t.map(async e=>{let{moduleName:n,component:t}=a[e.workspaceName];return[e.uuid,await f$(n,t)]})).then(n=>{e||o(Object.fromEntries(n))}),()=>{e=!0}},[t]),(0,fP.jsx)(fP.Fragment,{children:t.map((o,a)=>(0,fP.jsx)(ER,{openedWorkspace:o,openedWindow:e,lifeCycle:r[o.uuid],isRootWorkspace:0===a,isLeafWorkspace:a===t.length-1,showActionMenu:n},o.uuid))})};var EL=t(4466),EW={};EW.styleTagTransform=fq(),EW.setAttributes=fW(),EW.insert=fF().bind(null,"head"),EW.domAPI=fj(),EW.insertStyleElement=fG(),fI()(EL.A,EW);let EV=EL.A&&EL.A.locals?EL.A.locals:void 0;function EG(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(EU,{}))}function EU(){let{openedGroup:e,openedWindows:n,registeredGroupsByName:t,registeredWindowsByName:r}=Ed();if((0,uB.useEffect)(()=>pn("before-page-changed",n=>{let{newPage:r,cancelNavigation:o,oldUrl:a,newUrl:i}=n;if(!e)return;if(r)return void o(Es().then(e=>!e));let s=t[e.groupName],l=s?.scopePattern;l&&function(e,n,t){try{let r=new URL(n,window.location.origin).pathname,o=new URL(t,window.location.origin).pathname,a=new RegExp(e),i=r.match(a),s=o.match(a);if(!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,n)=>e===s[n+1]);return!1}catch{return!0}}(l,a,i)&&o(Es().then(e=>!e))}),[e,t]),!e)return null;let o=t[e.groupName],a=n.some(e=>e.maximized),{name:i}=o,s=Object.values(r).filter(e=>e.group===i&&void 0!==e.icon).sort((e,n)=>(e.order??Number.MAX_VALUE)-(n.order??Number.MAX_VALUE)).length>0;return(0,fP.jsxs)("div",{className:fO()(EV.workspaceWindowsAndMenuContainer,{[EV.overlay]:o.overlay,[EV.hasMaximizedWindow]:a}),children:[(0,fP.jsx)("div",{className:EV.workspaceWindowsContainer,children:n.map(e=>(0,fP.jsx)(EF,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,fP.jsx)(Ej,{workspaceGroup:o,groupProps:e.props})]})}function Eq(e){if("string"!=typeof e||0===e.trim().length)return;let n=e.replaceAll("_","-");try{return new Intl.Locale(n).toString()}catch{return}}function EH(e,n,t){if(null==e)return t;let r=Eq(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),t;let o=[];for(let e of n){let n=Eq(e);if(!n){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:n,original:e})}let a=r;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let n=a+"-",t=o.find(e=>e.canonical.startsWith(n));if(t)return t.original;if("ht"===a){a="fr-HT";continue}let r=a.lastIndexOf("-");if(-1===r)break;let i=(a=a.slice(0,r)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return t}function EK(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function EY(e){return!!e&&e.constructor===Object}var EZ=t(2722);function EJ(e){let[n,t,r]=e.split(".");return`${n}.${t}.${r}`}function EX(e,n){let t=function(e){let n=e.indexOf("-");if(n>=0){let t=EJ(e.slice(0,n)),r=e.slice(n+1);return`${t}-${r}`}return EJ(e)}(n);return EZ.satisfies(t,e,{includePrerelease:!0})}async function EQ(e,n={}){let t,{shouldRetry:r,getDelay:o,onError:a}=n;r=r??(e=>e<=5),o=o??(e=>(function(e,n=!1){return 1e3*Math.pow(2,n?e+1:e)})(e));let i=0;do try{return await E0(o(i)),await e()}catch(e){a?.(e,i),t=e}while(r(i++));throw t}async function E0(e){if(!(e<=0))return new Promise(n=>setTimeout(n,e))}}}]);
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,n)}}let fS={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function fD(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<fS.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>fS.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>fS.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<fS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<fS.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<fS.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>fS.SMALL_DESKTOP_MAX)}let fz=!1;function fM(){fz||(window.addEventListener("resize",fD),fD(),fz=!0)}var fP=t(1085),fT=t(3373),fO=t.n(fT),fN=t(2591),fI=t.n(fN),fB=t(1740),fj=t.n(fB),fR=t(8128),fF=t.n(fR),fL=t(855),fW=t.n(fL),fV=t(3051),fG=t.n(fV),fU=t(3656),fq=t.n(fU),fH=t(5924),fK={};fK.styleTagTransform=fq(),fK.setAttributes=fW(),fK.insert=fF().bind(null,"head"),fK.domAPI=fj(),fK.insertStyleElement=fG(),fI()(fH.A,fK);let fY=fH.A&&fH.A.locals?fH.A.locals:void 0;function fZ({title:e,children:n}){let t="tablet"===d7();return(0,fP.jsxs)("div",{className:fO()({[fY.tabletHeader]:t,[fY.desktopHeader]:!t}),children:[(0,fP.jsx)("h4",{children:e}),n]})}let fJ=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],fX={primaryColor:{_type:n4.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[tY.oneOf(fJ)]},secondaryColor:{_type:n4.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[tY.oneOf(fJ)]}},fQ={"Brand color #1":{_default:"#005d5d",_type:n4.String},"Brand color #2":{_default:"#004144",_type:n4.String},"Brand color #3":{_default:"#007d79",_type:n4.String},excludePatientIdentifierCodeTypes:{uuids:{_type:n4.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:n4.UUID}}},implementationName:{_type:n4.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:n4.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:n4.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[tY.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:n4.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:n4.String}},diagnosisTags:fX};var f0=t(5520);let f1={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},f2=e=>(0,fP.jsx)(f0.GGC,{translateWithId:(e,n)=>{let t=f1[e];return t?o4(t,e,n):e},...e});var f3=t(3923),f5={};f5.styleTagTransform=fq(),f5.setAttributes=fW(),f5.insert=fF().bind(null,"head"),f5.domAPI=fj(),f5.insertStyleElement=fG(),fI()(f3.A,f5);let f4=f3.A&&f3.A.locals?f3.A.locals:void 0,f6=(0,uB.createContext)(null);function f7(){let e=(0,uB.useContext)(f6);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function f8({menuTitle:e,children:n}){let[t,r]=uj().useState(!1),o=ft(()=>r(!1),t),a="tablet"===d7(),i=(0,uB.useCallback)(()=>r(e=>!e),[]),s=(0,uB.useRef)(null),l=(0,uB.useRef)(null),c=(0,uB.useId)(),p=`custom-overflow-menu-trigger-${c}`,u=`custom-overflow-menu-${c}`,d=(0,uB.useCallback)(()=>{r(!1),s.current?.focus()},[]),f=(0,uB.useMemo)(()=>({closeMenu:d}),[d]),h=(0,uB.useCallback)(e=>{"Escape"===e.key&&t&&(e.stopPropagation(),d())},[d,t]),m=uB.Children.toArray(n);(0,uB.useEffect)(()=>{if(t&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[t]);let g=(0,uB.useCallback)(({currentIndex:e,direction:n})=>{let t=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,o=Array.from(t).indexOf(r);if(-1===o)return void t[n>0?0:t.length-1]?.focus();let a=o+n,i=a<0?t.length-1:a>=t.length?0:a;t[i]?.focus()},[]),y=m.map((e,n)=>(0,uB.isValidElement)(e)?(0,uB.cloneElement)(e,{closeMenu:d,handleOverflowMenuItemFocus:g,index:n}):e);return(0,fP.jsxs)("div",{"data-overflow-menu":!0,className:fO()("cds--overflow-menu",f4.container),ref:o,children:[(0,fP.jsx)("button",{className:fO()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":t},f4.overflowMenuButton),"aria-controls":u,"aria-expanded":t,"aria-haspopup":"true",id:p,onClick:i,onKeyDown:h,ref:s,children:e}),(0,fP.jsxs)("div",{className:fO()("cds--overflow-menu-options","cds--overflow-menu--flip",f4.menu,{[f4.show]:t}),"aria-labelledby":p,"data-floating-menu-direction":"bottom",id:u,onKeyDown:h,ref:l,role:"menu",tabIndex:-1,children:[(0,fP.jsx)("ul",{className:fO()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":a}),children:(0,fP.jsx)(f6.Provider,{value:f,children:y})}),(0,fP.jsx)("span",{})]})]})}function f9(e){let n=(0,uB.useContext)(f6);return(0,fP.jsx)(f0.XSD,{...e,closeMenu:n?.closeMenu})}var he=t(6311),hn=t(7781),ht={};ht.styleTagTransform=fq(),ht.setAttributes=fW(),ht.insert=fF().bind(null,"head"),ht.domAPI=fj(),ht.insertStyleElement=fG(),fI()(hn.A,ht);let hr=hn.A&&hn.A.locals?hn.A.locals:void 0,ho=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],ha=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-activity",iconProps:e})})),hi=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-add",iconProps:e})})),hs=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-down",iconProps:e})})),hl=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-left",iconProps:e})})),hc=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-right",iconProps:e})})),hp=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-arrow-up",iconProps:e})})),hu=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-baby",iconProps:e})})),hd=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),hf=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-calendar",iconProps:e})})),hh=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-down",iconProps:e})})),hm=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-left",iconProps:e})})),hg=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-right",iconProps:e})})),hy=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-caret-up",iconProps:e})})),hb=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chart-average",iconProps:e})})),h_=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chart-line",iconProps:e})})),hv=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-checkmark-filled",iconProps:e})})),h$=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-checkmark-outline",iconProps:e})})),hA=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chemistry",iconProps:e})})),hw=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-down",iconProps:e})})),hk=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-left",iconProps:e})})),hx=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-right",iconProps:e})})),hC=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-chevron-up",iconProps:e})})),hE=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close",iconProps:e})})),hS=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close-filled",iconProps:e})})),hD=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-close-outline",iconProps:e})})),hz=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-document",iconProps:e})})),hM=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-document-attachment",iconProps:e})})),hP=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-download",iconProps:e})})),hT=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-drug-order",iconProps:e})})),hO=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-edit",iconProps:e})})),hN=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-event-schedule",iconProps:e})})),hI=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-events",iconProps:e})})),hB=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-female",iconProps:e})})),hj=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-male",iconProps:e})})),hR=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-other",iconProps:e})})),hF=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-gender-unknown",iconProps:e})})),hL=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-generic-order-type",iconProps:e})})),hW=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-group",iconProps:e})})),hV=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-group-access",iconProps:e})})),hG=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-hospital-bed",iconProps:e})})),hU=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-image-medical",iconProps:e})})),hq=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information",iconProps:e})})),hH=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information-filled",iconProps:e})})),hK=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-information-square",iconProps:e})})),hY=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-inventory-management",iconProps:e})})),hZ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-lab-order",iconProps:e})})),hJ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-list-checked",iconProps:e})})),hX=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-location",iconProps:e})})),hQ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-material-order",iconProps:e})})),h0=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-maximize",iconProps:e})})),h1=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-medication",iconProps:e})})),h2=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-message-queue",iconProps:e})})),h3=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-microscope",iconProps:e})})),h5=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-money",iconProps:e})})),h4=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-mother",iconProps:e})})),h6=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-movement",iconProps:e})})),h7=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h8=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),h9=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-password",iconProps:e})})),me=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-pedestrian-family",iconProps:e})})),mn=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-pen",iconProps:e})})),mt=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-printer",iconProps:e})})),mr=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-procedure-order",iconProps:e})})),mo=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-programs",iconProps:e})})),ma=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-referral-order",iconProps:e})})),mi=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-renew",iconProps:e})})),ms=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-report",iconProps:e})})),ml=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-reset",iconProps:e})})),mc=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-save",iconProps:e})})),mp=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-search",iconProps:e})})),mu=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-settings",iconProps:e})})),md=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-switcher",iconProps:e})})),mf=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-shopping-cart",iconProps:e})})),mh=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),mm=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-sticky-note-add",iconProps:e})})),mg=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-syringe",iconProps:e})})),my=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-table-of-contents",iconProps:e})})),mb=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-table",iconProps:e})})),m_=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-time",iconProps:e})})),mv=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-tools",iconProps:e})})),m$=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-translate",iconProps:e})})),mA=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-trash-can",iconProps:e})})),mw=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-tree-view--alt",iconProps:e})})),mk=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-avatar",iconProps:e})})),mx=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-follow",iconProps:e})})),mC=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user-xray",iconProps:e})})),mE=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-user",iconProps:e})})),mS=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-view-off",iconProps:e})})),mD=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-view",iconProps:e})})),mz=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(mB,{ref:n,icon:"omrs-icon-warning",iconProps:e})})),mM=mz,mP=hM,mT=hJ,mO=hU,mN=mh,mI=(0,uB.memo)((0,uB.forwardRef)(function({icon:e,fallback:n,...t},r){let o=(0,uB.useRef)(e?document.getElementById(e):void 0);return(0,uB.useEffect)(()=>{let n=document.getElementById("omrs-svgs-container"),t=new MutationObserver(n=>{for(let t of n)"childList"===t.type&&(o.current=e?document.getElementById(e):void 0)});return n&&t.observe(n,{childList:!0}),()=>t.disconnect()},[e]),(0,fP.jsx)(dA,{value:o.current,fallback:n,children:(0,fP.jsx)(mB,{ref:r,icon:e,iconProps:t})})})),mB=(0,uB.memo)((0,uB.forwardRef)(function({icon:e,iconProps:n},t){let{className:r,fill:o,size:a}=Object.assign({},{fill:"currentColor",size:20},n);(a<=0||a>72)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 20.`),a=20);let i=(0,uB.useRef)(null);return(0,uB.useImperativeHandle)(t,()=>i.current),(0,uB.useEffect)(()=>{i.current&&"currentColor"!==o&&i.current.style.setProperty("--omrs-icon-fill",o)},[]),(0,fP.jsx)("svg",{ref:i,className:fO()("omrs-icon",hr.icon,r),height:a,width:a,viewBox:"0 0 16 16",children:(0,fP.jsx)("use",{href:`#${e}`})})}));var mj=t(3241),mR={};mR.styleTagTransform=fq(),mR.setAttributes=fW(),mR.insert=fF().bind(null,"head"),mR.domAPI=fj(),mR.insertStyleElement=fG(),fI()(mj.A,mR);let mF=mj.A&&mj.A.locals?mj.A.locals:void 0,mL=({path:e,title:n,basePath:t,icon:r})=>{let{t:o}=(0,dt.useTranslation)(),a=(0,he.useLocation)(),i=(0,uB.useMemo)(()=>{if(!e)return!1;let n=e.startsWith("/")?e.slice(1):e;if(n.startsWith("http"))return n===window.location.href;let t=n.split("/").map(e=>decodeURIComponent(e)),r=(a.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,n)=>t.every((e,t)=>r[n+t]===e))},[a.pathname,e]);return(0,fP.jsx)("div",{children:(0,fP.jsx)(uF,{className:fO()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${t}/${encodeURIComponent(e)}`,children:(0,fP.jsxs)("span",{className:mF.menu,children:[(0,fP.jsx)(mI,{icon:r,className:mF.icon,size:16}),(0,fP.jsx)("span",{children:o(n)})]})})},e)};function mW(e){return function({basePath:n}){return(0,fP.jsx)(he.BrowserRouter,{children:(0,fP.jsx)(mL,{basePath:n,...e})})}}function mV(e){let n=(0,uB.useRef)(null);return(0,uB.useMemo)(()=>({get current(){return n.current},set current(value){n.current=value,"function"==typeof e?e(value):e&&(e.current=value)}}),[e])}function mG(...e){return(...n)=>{for(let t of e)"function"==typeof t&&t(...n)}}let mU="u">typeof document?uj().useLayoutEffect:()=>{};function mq(e){let n=(0,uB.useRef)(null);return mU(()=>{n.current=e},[e]),(0,uB.useCallback)((...e)=>{let t=n.current;return null==t?void 0:t(...e)},[])}let mH={prefix:String(Math.round(1e10*Math.random())),current:0},mK=uj().createContext(mH),mY=uj().createContext(!1),mZ=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mJ="function"==typeof uj().useId?function(e){let n=uj().useId(),[t]=(0,uB.useState)(m1()),r=t?"react-aria":`react-aria${mH.prefix}`;return e||`${r}-${n}`}:function(e){let n=(0,uB.useContext)(mK),t=function(e=!1){let n=(0,uB.useContext)(mK),t=(0,uB.useRef)(null);if(null===t.current&&!e){var r,o;let e=null==(o=uj().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=o.ReactCurrentOwner)?void 0:r.current;if(e){let t=mZ.get(e);null==t?mZ.set(e,{id:n.current,state:e.memoizedState}):e.memoizedState!==t.state&&(n.current=t.id,mZ.delete(e))}t.current=++n.current}return t.current}(!!e),r=`react-aria${n.prefix}`;return e||`${r}-${t}`};function mX(){return!1}function mQ(){return!0}function m0(e){return()=>{}}function m1(){return"function"==typeof uj().useSyncExternalStore?uj().useSyncExternalStore(m0,mX,mQ):(0,uB.useContext)(mY)}let m2=!!("u">typeof window&&window.document&&window.document.createElement),m3=new Map;function m5(e){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(null),o=mJ(n),a=(0,uB.useRef)(null);if(s&&s.register(a,o),m2){let e=m3.get(o);e&&!e.includes(r)?e.push(r):m3.set(o,[r])}return mU(()=>()=>{s&&s.unregister(a),m3.delete(o)},[o]),(0,uB.useEffect)(()=>{let e=r.current;return e&&t(e),()=>{e&&(r.current=null)}}),o}function m4(e=[]){let n=m5(),[t,r]=function(e){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(null),o=mq(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}n===e.value?o():t(e.value)});mU(()=>{r.current&&o()});let a=mq(e=>{r.current=e(n),o()});return[n,a]}(n),o=(0,uB.useCallback)(()=>{r(function*(){yield n,yield document.getElementById(n)?n:void 0})},[n,r]);return mU(o,[n,o,...e]),t}"u">typeof FinalizationRegistry&&(s=new FinalizationRegistry(e=>{m3.delete(e)}));let m6=function(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=function e(n){var t,r,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var a=n.length;for(t=0;t<a;t++)n[t]&&(r=e(n[t]))&&(o&&(o+=" "),o+=r)}else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}(e))&&(r&&(r+=" "),r+=n);return r};function m7(...e){let n={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let e in r){let t=n[e],o=r[e];"function"==typeof t&&"function"==typeof o&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?n[e]=mG(t,o):("className"===e||"UNSAFE_className"===e)&&"string"==typeof t&&"string"==typeof o?n[e]=m6(t,o):"id"===e&&t&&o?n.id=function(e,n){if(e===n)return e;let t=m3.get(e);if(t)return t.forEach(e=>e.current=n),n;let r=m3.get(n);return r?(r.forEach(n=>n.current=e),e):n}(t,o):n[e]=void 0!==o?o:t}}return n}let m8=Symbol("default");function m9({values:e,children:n}){for(let[t,r]of e)n=uj().createElement(t.Provider,{value:r},n);return n}function ge(e){let{className:n,style:t,children:r,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,uB.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:o}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:a}):null==r?a:r,{className:null!=e?e:o,style:l||i?{...i,...l}:void 0,children:null!=c?c:a,"data-rac":""}},[n,t,r,o,a,i,s])}function gn(e,n){let t=(0,uB.useContext)(e);if(null===n)return null;if(t&&"object"==typeof t&&"slots"in t&&t.slots){let e=n||m8;if(!t.slots[e]){let e=new Intl.ListFormat().format(Object.keys(t.slots).map(e=>`"${e}"`)),r=n?`Invalid slot "${n}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return t.slots[e]}return t}function gt(e,n,t){let{ref:r,...o}=gn(t,e.slot)||{},a=mV((0,uB.useMemo)(()=>(function(...e){return 1===e.length&&e[0]?e[0]:n=>{for(let t of e)"function"==typeof t?t(n):null!=t&&(t.current=n)}})(n,r),[n,r])),i=m7(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&("function"==typeof o.style||"function"==typeof e.style?i.style=n=>{let t="function"==typeof o.style?o.style(n):o.style,r={...n.defaultStyle,...t},a="function"==typeof e.style?e.style({...n,defaultStyle:r}):e.style;return{...r,...a}}:i.style={...o.style,...e.style}),[i,a]}function gr(e=!0){let[n,t]=(0,uB.useState)(e),r=(0,uB.useRef)(!1),o=(0,uB.useCallback)(e=>{r.current=!0,t(!!e)},[]);return mU(()=>{r.current||t(!1)},[]),[o,n]}function go(e){let n=/^(data-.*)$/,t={};for(let r in e)n.test(r)||(t[r]=e[r]);return t}let ga=(0,uB.createContext)(null),gi=null;function gs(e,n="assertive",t=7e3){gi?gi.announce(e,n,t):(gi=new gl,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?gi.announce(e,n,t):setTimeout(()=>{(null==gi?void 0:gi.isAttached())&&(null==gi||gi.announce(e,n,t))},100))}class gl{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",t=7e3){var r,o;if(!this.node)return;let a=document.createElement("div");"object"==typeof e?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",e["aria-labelledby"])):a.textContent=e,"assertive"===n?null==(r=this.assertiveLog)||r.appendChild(a):null==(o=this.politeLog)||o.appendChild(a),""!==e&&setTimeout(()=>{a.remove()},t)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let gc=new Set(["id"]),gp=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),gu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gd=/^(data-.*)$/;function gf(e,n={}){let{labelable:t,isLink:r,propNames:o}=n,a={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(gc.has(n)||t&&gp.has(n)||r&&gu.has(n)||(null==o?void 0:o.has(n))||gd.test(n))&&(a[n]=e[n]);return a}let gh=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],gm=gh.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";gh.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let gg=gh.join(':not([hidden]):not([tabindex="-1"]),');function gy(e){return e.matches(gm)}function gb(e){return e.matches(gg)}let g_=e=>{var n;return null!=(n=null==e?void 0:e.ownerDocument)?n:document},gv=e=>e&&"window"in e&&e.window===e?e:g_(e).defaultView||window;function g$(e){if(function(){if(null==gA){gA=!1;try{document.createElement("div").focus({get preventScroll(){return gA=!0,!0}})}catch{}}return gA}())e.focus({preventScroll:!0});else{let n=function(e){let n=e.parentNode,t=[],r=document.scrollingElement||document.documentElement;for(;n instanceof HTMLElement&&n!==r;)(n.offsetHeight<n.scrollHeight||n.offsetWidth<n.scrollWidth)&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),n=n.parentNode;return r instanceof HTMLElement&&t.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),t}(e);e.focus(),function(e){for(let{element:n,scrollTop:t,scrollLeft:r}of e)n.scrollTop=t,n.scrollLeft=r}(n)}}let gA=null;function gw(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function gk(e,n){Object.defineProperty(e,"target",{value:n}),Object.defineProperty(e,"currentTarget",{value:n})}function gx(e){let n=(0,uB.useRef)({isFocused:!1,observer:null});mU(()=>{let e=n.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=mq(n=>{null==e||e(n)});return(0,uB.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){n.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{n.current.isFocused=!1,r.disabled&&t(gw(e)),n.current.observer&&(n.current.observer.disconnect(),n.current.observer=null)},{once:!0}),n.current.observer=new MutationObserver(()=>{if(n.current.isFocused&&r.disabled){var e;null==(e=n.current.observer)||e.disconnect();let t=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}}),n.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let gC=!1;function gE(e){var n;return!("u"<typeof window)&&null!=window.navigator&&((null==(n=window.navigator.userAgentData)?void 0:n.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent))}function gS(e){var n;return"u">typeof window&&null!=window.navigator&&e.test((null==(n=window.navigator.userAgentData)?void 0:n.platform)||window.navigator.platform)}function gD(e){let n=null;return()=>(null==n&&(n=e()),n)}let gz=gD(function(){return gS(/^Mac/i)}),gM=gD(function(){return gS(/^iPhone/i)}),gP=gD(function(){return gS(/^iPad/i)||gz()&&navigator.maxTouchPoints>1}),gT=gD(function(){return gM()||gP()});gD(function(){return gz()||gT()});let gO=gD(function(){return gE(/AppleWebKit/i)&&!gN()}),gN=gD(function(){return gE(/Chrome/i)}),gI=gD(function(){return gE(/Android/i)}),gB=gD(function(){return gE(/Firefox/i)}),gj=new Map,gR=new Set;function gF(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let n=t=>{if(!e(t)||!t.target)return;let r=gj.get(t.target);if(r&&(r.delete(t.propertyName),0===r.size&&(t.target.removeEventListener("transitioncancel",n),gj.delete(t.target)),0===gj.size)){for(let e of gR)e();gR.clear()}};document.body.addEventListener("transitionrun",t=>{if(!e(t)||!t.target)return;let r=gj.get(t.target);r||(r=new Set,gj.set(t.target,r),t.target.addEventListener("transitioncancel",n,{once:!0})),r.add(t.propertyName)}),document.body.addEventListener("transitionend",n)}function gL(e){requestAnimationFrame(()=>{0===gj.size?e():gR.add(e)})}"u">typeof document&&("loading"!==document.readyState?gF():document.addEventListener("DOMContentLoaded",gF));let gW="default",gV="",gG=new WeakMap;function gU(e){if(gT())"disabled"===gW&&(gW="restoring",setTimeout(()=>{gL(()=>{if("restoring"===gW){let n=g_(e);"none"===n.documentElement.style.webkitUserSelect&&(n.documentElement.style.webkitUserSelect=gV||""),gV="",gW="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&gG.has(e)){let n=gG.get(e),t="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[t]&&(e.style[t]=n),""===e.getAttribute("style")&&e.removeAttribute("style"),gG.delete(e)}}let gq=uj().createContext({register:()=>{}});function gH(e,n,t){if(!n.has(e))throw TypeError("attempted to "+t+" private field on non-instance");return n.get(e)}function gK(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}function gY(e,n,t){var r=gH(e,n,"set");if(r.set)r.set.call(e,t);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=t}return t}function gZ(e,n){mU(()=>{if(e&&e.ref&&n)return e.ref.current=n.current,()=>{e.ref&&(e.ref.current=null)}})}function gJ(){let e=(0,uB.useRef)(new Map),n=(0,uB.useCallback)((n,t,r,o)=>{let a=(null==o?void 0:o.once)?(...n)=>{e.current.delete(r),r(...n)}:r;e.current.set(r,{type:t,eventTarget:n,fn:a,options:o}),n.addEventListener(t,a,o)},[]),t=(0,uB.useCallback)((n,t,r,o)=>{var a;let i=(null==(a=e.current.get(r))?void 0:a.fn)||r;n.removeEventListener(t,i,o),e.current.delete(r)},[]),r=(0,uB.useCallback)(()=>{e.current.forEach((e,n)=>{t(e.eventTarget,e.type,n,e.options)})},[t]);return(0,uB.useEffect)(()=>r,[r]),{addGlobalListener:n,removeGlobalListener:t,removeAllGlobalListeners:r}}gq.displayName="PressResponderContext";function gX(e,n){return!!n&&!!e&&e.contains(n)}function gQ(e){return e.target}function g0(e,n,t=!0){var r,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=n;gB()&&(null==(o=window.event)||null==(r=o.type)?void 0:r.startsWith("key"))&&"_blank"===e.target&&(gz()?a=!0:i=!0);let c=gO()&&gz()&&!gP()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});g0.isOpening=t,g$(e),e.dispatchEvent(c),g0.isOpening=!1}function g1(e){return 0===e.mozInputSource&&!!e.isTrusted||(gI()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}g0.isOpening=!1;var g2=t(3144),g3=new WeakMap;class g5{continuePropagation(){gY(this,g3,!1)}get shouldStopPropagation(){var e;return e=gH(this,g3,"get"),e.get?e.get.call(this):e.value}constructor(e,n,t,r){var o;gK(this,g3,{writable:!0,value:void 0}),gY(this,g3,!0);let a=null!=(o=null==r?void 0:r.target)?o:t.currentTarget;const i=null==a?void 0:a.getBoundingClientRect();let s,l=0,c,p=null;null!=t.clientX&&null!=t.clientY&&(c=t.clientX,p=t.clientY),i&&(null!=c&&null!=p?(s=c-i.left,l=p-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=n,this.target=t.currentTarget,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.x=s,this.y=l}}let g4=Symbol("linkClicked");function g6(e){let{onPress:n,onPressChange:t,onPressStart:r,onPressEnd:o,onPressUp:a,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:c,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:d,...f}=function(e){let n=(0,uB.useContext)(gq);if(n){let{register:t,...r}=n;e=m7(r,e),t()}return gZ(n,e.ref),e}(e),[h,m]=(0,uB.useState)(!1),g=(0,uB.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:b}=gJ(),v=mq((e,n)=>{let o=g.current;if(s||o.didFirePressStart)return!1;let a=!0;if(o.isTriggeringEvent=!0,r){let t=new g5("pressstart",n,e);r(t),a=t.shouldStopPropagation}return t&&t(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,m(!0),a}),$=mq((e,r,a=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(o){let n=new g5("pressend",r,e);o(n),l=n.shouldStopPropagation}if(t&&t(!1),m(!1),n&&a&&!s){let t=new g5("press",r,e);n(t),l&&(l=t.shouldStopPropagation)}return i.isTriggeringEvent=!1,l}),A=mq((e,n)=>{let t=g.current;if(s)return!1;if(a){t.isTriggeringEvent=!0;let r=new g5("pressup",n,e);return a(r),t.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),w=mq(e=>{let n=g.current;if(n.isPressed&&n.target){for(let t of(n.didFirePressStart&&null!=n.pointerType&&$(g9(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,b(),u||gU(n.target),n.disposables))t();n.disposables=[]}}),k=mq(e=>{p&&w(e)}),x=mq(e=>{null==i||i(e)}),C=mq((e,n)=>{if(i){let t=new MouseEvent("click",e);gk(t,n),i(gw(t))}}),E=(0,uB.useMemo)(()=>{let e=g.current,n={onKeyDown(n){if(g8(n.nativeEvent,n.currentTarget)&&gX(n.currentTarget,gQ(n.nativeEvent))){var r;ye(gQ(n.nativeEvent),n.key)&&n.preventDefault();let o=!0;if(!e.isPressed&&!n.repeat){e.target=n.currentTarget,e.isPressed=!0,e.pointerType="keyboard",o=v(n,"keyboard");let r=n.currentTarget;y(g_(n.currentTarget),"keyup",mG(n=>{g8(n,r)&&!n.repeat&&gX(r,gQ(n))&&e.target&&A(g9(e.target,n),"keyboard")},t),!0)}o&&n.stopPropagation(),n.metaKey&&gz()&&(null==(r=e.metaKeyEvents)||r.set(n.key,n.nativeEvent))}else"Meta"===n.key&&(e.metaKeyEvents=new Map)},onClick(n){if((!n||gX(n.currentTarget,gQ(n.nativeEvent)))&&n&&0===n.button&&!e.isTriggeringEvent&&!g0.isOpening){let t=!0;if(s&&n.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||g1(n.nativeEvent))){let e=v(n,"virtual"),r=A(n,"virtual"),o=$(n,"virtual");x(n),t=e&&r&&o}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||n.nativeEvent.pointerType||"virtual";t=$(g9(n.currentTarget,n),r,!0),e.isOverTarget=!1,x(n),w(n)}e.ignoreEmulatedMouseEvents=!1,t&&n.stopPropagation()}}},t=n=>{var t,r,o;if(e.isPressed&&e.target&&g8(n,e.target)){ye(gQ(n),n.key)&&n.preventDefault();let t=gQ(n),o=gX(e.target,gQ(n));$(g9(e.target,n),"keyboard",o),o&&C(n,e.target),b(),"Enter"!==n.key&&g7(e.target)&&gX(e.target,t)&&!n[g4]&&(n[g4]=!0,g0(e.target,n,!1)),e.isPressed=!1,null==(r=e.metaKeyEvents)||r.delete(n.key)}else if("Meta"===n.key&&(null==(t=e.metaKeyEvents)?void 0:t.size)){let n=e.metaKeyEvents;for(let t of(e.metaKeyEvents=void 0,n.values()))null==(o=e.target)||o.dispatchEvent(new KeyboardEvent("keyup",t))}};if("u">typeof PointerEvent){n.onPointerDown=n=>{var o;if(0!==n.button||!gX(n.currentTarget,gQ(n.nativeEvent)))return;if(o=n.nativeEvent,!gI()&&0===o.width&&0===o.height||1===o.width&&1===o.height&&0===o.pressure&&0===o.detail&&"mouse"===o.pointerType){e.pointerType="virtual";return}e.pointerType=n.pointerType;let a=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=n.pointerId,e.target=n.currentTarget,u||function(e){if(gT()){if("default"===gW){let n=g_(e);gV=n.documentElement.style.webkitUserSelect,n.documentElement.style.webkitUserSelect="none"}gW="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let n="userSelect"in e.style?"userSelect":"webkitUserSelect";gG.set(e,e.style[n]),e.style[n]="none"}}(e.target),a=v(n,e.pointerType);let o=gQ(n.nativeEvent);"releasePointerCapture"in o&&o.releasePointerCapture(n.pointerId),y(g_(n.currentTarget),"pointerup",t,!1),y(g_(n.currentTarget),"pointercancel",r,!1)}a&&n.stopPropagation()},n.onMouseDown=n=>{if(gX(n.currentTarget,gQ(n.nativeEvent))&&0===n.button){if(c){let t=function(e){for(;e&&!gy(e);)e=e.parentElement;let n=gv(e),t=n.document.activeElement;if(!t||t===e)return;gC=!0;let r=!1,o=e=>{(e.target===t||r)&&e.stopImmediatePropagation()},a=n=>{(n.target===t||r)&&(n.stopImmediatePropagation(),e||r||(r=!0,g$(t),l()))},i=n=>{(n.target===e||r)&&n.stopImmediatePropagation()},s=n=>{(n.target===e||r)&&(n.stopImmediatePropagation(),r||(r=!0,g$(t),l()))};n.addEventListener("blur",o,!0),n.addEventListener("focusout",a,!0),n.addEventListener("focusin",s,!0),n.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(c),n.removeEventListener("blur",o,!0),n.removeEventListener("focusout",a,!0),n.removeEventListener("focusin",s,!0),n.removeEventListener("focus",i,!0),gC=!1,r=!1},c=requestAnimationFrame(l);return l}(n.target);t&&e.disposables.push(t)}n.stopPropagation()}},n.onPointerUp=n=>{gX(n.currentTarget,gQ(n.nativeEvent))&&"virtual"!==e.pointerType&&0===n.button&&A(n,e.pointerType||n.pointerType)},n.onPointerEnter=n=>{n.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,v(g9(e.target,n),e.pointerType))},n.onPointerLeave=n=>{n.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,$(g9(e.target,n),e.pointerType,!1),k(n))};let t=n=>{if(n.pointerId===e.activePointerId&&e.isPressed&&0===n.button&&e.target){if(gX(e.target,gQ(n))&&null!=e.pointerType){let t=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(t?w(n):(g$(e.target),e.target.click()))},80);y(n.currentTarget,"click",()=>t=!0,!0),e.disposables.push(()=>clearTimeout(r))}else w(n);e.isOverTarget=!1}},r=e=>{w(e)};n.onDragStart=e=>{gX(e.currentTarget,gQ(e.nativeEvent))&&w(e)}}return n},[y,s,c,b,u,w,k,$,v,A,x,C]);return(0,uB.useEffect)(()=>{let e=null==d?void 0:d.current;e&&e instanceof gv(e).Element&&"auto"===gv(e).getComputedStyle(e).touchAction&&(e.style.touchAction="pan-x pan-y pinch-zoom")},[d]),(0,uB.useEffect)(()=>{let e=g.current;return()=>{var n;for(let t of(u||gU(null!=(n=e.target)?n:void 0),e.disposables))t();e.disposables=[]}},[u]),{isPressed:l||h,pressProps:m7(f,E)}}function g7(e){return"A"===e.tagName&&e.hasAttribute("href")}function g8(e,n){let{key:t,code:r}=e,o=n.getAttribute("role");return("Enter"===t||" "===t||"Spacebar"===t||"Space"===r)&&!(n instanceof gv(n).HTMLInputElement&&!yt(n,t)||n instanceof gv(n).HTMLTextAreaElement||n.isContentEditable)&&!(("link"===o||!o&&g7(n))&&"Enter"!==t)}function g9(e,n){let t=n.clientX,r=n.clientY;return{currentTarget:e,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,metaKey:n.metaKey,altKey:n.altKey,clientX:t,clientY:r}}function ye(e,n){return e instanceof HTMLInputElement?!yt(e,n):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!g7(e))}let yn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function yt(e,n){return"checkbox"===e.type||"radio"===e.type?" "===n:yn.has(e.type)}let yr=null,yo=new Set,ya=new Map,yi=!1,ys=!1,yl={Tab:!0,Escape:!0};function yc(e,n){for(let t of yo)t(e,n)}function yp(e){yi=!0,e.metaKey||!gz()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(yr="keyboard",yc("keyboard",e))}function yu(e){yr="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(yi=!0,yc("pointer",e))}function yd(e){g1(e)&&(yi=!0,yr="virtual")}function yf(e){e.target!==window&&e.target!==document&&!gC&&e.isTrusted&&(yi||ys||(yr="virtual",yc("virtual",e)),yi=!1,ys=!1)}function yh(){gC||(yi=!1,ys=!0)}function ym(e){if("u"<typeof window||ya.get(gv(e)))return;let n=gv(e),t=g_(e),r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){yi=!0,r.apply(this,arguments)},t.addEventListener("keydown",yp,!0),t.addEventListener("keyup",yp,!0),t.addEventListener("click",yd,!0),n.addEventListener("focus",yf,!0),n.addEventListener("blur",yh,!1),"u">typeof PointerEvent&&(t.addEventListener("pointerdown",yu,!0),t.addEventListener("pointermove",yu,!0),t.addEventListener("pointerup",yu,!0)),n.addEventListener("beforeunload",()=>{yg(e)},{once:!0}),ya.set(n,{focus:r})}let yg=(e,n)=>{let t=gv(e),r=g_(e);n&&r.removeEventListener("DOMContentLoaded",n),ya.has(t)&&(t.HTMLElement.prototype.focus=ya.get(t).focus,r.removeEventListener("keydown",yp,!0),r.removeEventListener("keyup",yp,!0),r.removeEventListener("click",yd,!0),t.removeEventListener("focus",yf,!0),t.removeEventListener("blur",yh,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",yu,!0),r.removeEventListener("pointermove",yu,!0),r.removeEventListener("pointerup",yu,!0)),ya.delete(t))};function yy(){return"pointer"!==yr}"u">typeof document&&("loading"!==(d=g_(void 0)).readyState?ym(void 0):d.addEventListener("DOMContentLoaded",()=>{ym(void 0)}));let yb=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function y_(e){let n=g_(e),t=((e=document)=>e.activeElement)(n);"virtual"===yr?gL(()=>{((e=document)=>e.activeElement)(n)===t&&e.isConnected&&g$(e)}):g$(e)}function yv(e){let{isDisabled:n,onFocus:t,onBlur:r,onFocusChange:o}=e,a=(0,uB.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),o&&o(!1),!0},[r,o]),i=gx(a),s=(0,uB.useCallback)(e=>{let n=g_(e.target),r=n?((e=document)=>e.activeElement)(n):((e=document)=>e.activeElement)();e.target===e.currentTarget&&r===gQ(e.nativeEvent)&&(t&&t(e),o&&o(!0),i(e))},[o,t,i]);return{focusProps:{onFocus:!n&&(t||o||r)?s:void 0,onBlur:!n&&(r||o)?a:void 0}}}function y$(e){if(!e)return;let n=!0;return t=>{e({...t,preventDefault(){t.preventDefault()},isDefaultPrevented:()=>t.isDefaultPrevented(),stopPropagation(){n=!0},continuePropagation(){n=!1},isPropagationStopped:()=>n}),n&&t.stopPropagation()}}let yA=uj().createContext(null);function yw(e,n){let{focusProps:t}=yv(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:y$(e.onKeyDown),onKeyUp:y$(e.onKeyUp)}},o=m7(t,r),a=function(e){let n=(0,uB.useContext)(yA)||{};gZ(n,e);let{ref:t,...r}=n;return r}(n),i=e.isDisabled?{}:a,s=(0,uB.useRef)(e.autoFocus);(0,uB.useEffect)(()=>{s.current&&n.current&&y_(n.current),s.current=!1},[n]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:m7({...o,tabIndex:l},i)}}function yk(e){let{isDisabled:n,onBlurWithin:t,onFocusWithin:r,onFocusWithinChange:o}=e,a=(0,uB.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=gJ(),l=(0,uB.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),t&&t(e),o&&o(!1))},[t,o,a,s]),c=gx(l),p=(0,uB.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let n=g_(e.target),t=((e=document)=>e.activeElement)(n);if(!a.current.isFocusWithin&&t===gQ(e.nativeEvent)){r&&r(e),o&&o(!0),a.current.isFocusWithin=!0,c(e);let t=e.currentTarget;i(n,"focus",e=>{if(a.current.isFocusWithin&&!gX(t,e.target)){let r=new n.defaultView.FocusEvent("blur",{relatedTarget:e.target});gk(r,t),l(gw(r))}},{capture:!0})}},[r,o,c,i,l]);return n?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:l}}}function yx(e={}){var n;let{autoFocus:t=!1,isTextInput:r,within:o}=e,a=(0,uB.useRef)({isFocused:!1,isFocusVisible:t||yy()}),[i,s]=(0,uB.useState)(!1),[l,c]=(0,uB.useState)(()=>a.current.isFocused&&a.current.isFocusVisible),p=(0,uB.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]),u=(0,uB.useCallback)(e=>{a.current.isFocused=e,s(e),p()},[p]);n={isTextInput:r},ym(),(0,uB.useEffect)(()=>{let e=(e,t)=>{var r;let o,i,s,l,c;r=!!(null==n?void 0:n.isTextInput),o=g_(null==t?void 0:t.target),i="u">typeof window?gv(null==t?void 0:t.target).HTMLInputElement:HTMLInputElement,s="u">typeof window?gv(null==t?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l="u">typeof window?gv(null==t?void 0:t.target).HTMLElement:HTMLElement,c="u">typeof window?gv(null==t?void 0:t.target).KeyboardEvent:KeyboardEvent,(r=r||o.activeElement instanceof i&&!yb.has(o.activeElement.type)||o.activeElement instanceof s||o.activeElement instanceof l&&o.activeElement.isContentEditable)&&"keyboard"===e&&t instanceof c&&!yl[t.key]||(e=>{a.current.isFocusVisible=e,p()})(yy())};return yo.add(e),()=>{yo.delete(e)}},[]);let{focusProps:d}=yv({isDisabled:o,onFocusChange:u}),{focusWithinProps:f}=yk({isDisabled:!o,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:l,focusProps:o?f:d}}uj().forwardRef(function(e,n){let{children:t,...r}=e,o=mV(n),a={...r,ref:o};return uj().createElement(yA.Provider,{value:a},t)});let yC=!1,yE=0;function yS(e){"touch"===e.pointerType&&(yC=!0,setTimeout(()=>{yC=!1},50))}function yD(){if("u">typeof document)return"u">typeof PointerEvent&&document.addEventListener("pointerup",yS),yE++,()=>{!(--yE>0)&&"u">typeof PointerEvent&&document.removeEventListener("pointerup",yS)}}function yz(e){let{onHoverStart:n,onHoverChange:t,onHoverEnd:r,isDisabled:o}=e,[a,i]=(0,uB.useState)(!1),s=(0,uB.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,uB.useEffect)(yD,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=gJ(),{hoverProps:p,triggerHoverEnd:u}=(0,uB.useMemo)(()=>{let e=(e,n)=>{let o=s.target;s.pointerType="",s.target=null,"touch"!==n&&s.isHovered&&o&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:o,pointerType:n}),t&&t(!1),i(!1))},a={};return"u">typeof PointerEvent&&(a.onPointerEnter=r=>{yC&&"mouse"===r.pointerType||((r,a)=>{if(s.pointerType=a,o||"touch"===a||s.isHovered||!r.currentTarget.contains(r.target))return;s.isHovered=!0;let c=r.currentTarget;s.target=c,l(g_(r.target),"pointerover",n=>{s.isHovered&&s.target&&!gX(s.target,n.target)&&e(n,n.pointerType)},{capture:!0}),n&&n({type:"hoverstart",target:c,pointerType:a}),t&&t(!0),i(!0)})(r,r.pointerType)},a.onPointerLeave=n=>{!o&&n.currentTarget.contains(n.target)&&e(n,n.pointerType)}),{hoverProps:a,triggerHoverEnd:e}},[n,t,r,o,s,l,c]);return(0,uB.useEffect)(()=>{o&&u({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:p,isHovered:a}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let yM=(0,uB.createContext)(!1);function yP(e){let n=(n,t)=>(0,uB.useContext)(yM)?null:e(n,t);return n.displayName=e.displayName||e.name,(0,uB.forwardRef)(n)}let yT=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),yO=(0,uB.createContext)({}),yN=yP(function(e,n){var t;[e,n]=gt(e,n,yO);let r=((t=e).isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),e=t),{isPending:o}=r,{buttonProps:a,isPressed:i}=function(e,n){let t,{elementType:r="button",isDisabled:o,onPress:a,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:c,preventFocusOnPress:p,allowFocusWhenDisabled:u,onClick:d,href:f,target:h,rel:m,type:g="button"}=e;t="button"===r?{type:g,disabled:o}:{role:"button",href:"a"!==r||o?void 0:f,target:"a"===r?h:void 0,type:"input"===r?g:void 0,disabled:"input"===r?o:void 0,"aria-disabled":o&&"input"!==r?o:void 0,rel:"a"===r?m:void 0};let{pressProps:y,isPressed:b}=g6({onPressStart:i,onPressEnd:s,onPressChange:c,onPress:a,onPressUp:l,onClick:d,isDisabled:o,preventFocusOnPress:p,ref:n}),{focusableProps:v}=yw(e,n);u&&(v.tabIndex=o?-1:v.tabIndex);let $=m7(v,y,gf(e,{labelable:!0}));return{isPressed:b,buttonProps:m7(t,$,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}(e,n),{focusProps:s,isFocused:l,isFocusVisible:c}=yx(e),{hoverProps:p,isHovered:u}=yz({...e,isDisabled:e.isDisabled||o}),d={isHovered:u,isPressed:(r.isPressed||i)&&!o,isFocused:l,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:null!=o&&o},f=ge({...e,values:d,defaultClassName:"react-aria-Button"}),h=m5(a.id),m=m5(),g=a["aria-labelledby"];o&&(g?g=`${g} ${m}`:a["aria-label"]&&(g=`${h} ${m}`));let y=(0,uB.useRef)(o);return(0,uB.useEffect)(()=>{let e={"aria-labelledby":g||h};!y.current&&l&&o?gs(e,"assertive"):y.current&&l&&!o&&gs(e,"assertive"),y.current=o},[o,l,g,h]),uj().createElement("button",{...gf(e,{propNames:yT}),...m7(a,s,p),...f,type:"submit"===a.type&&o?"button":a.type,id:h,ref:n,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":o?"true":a["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":l||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},uj().createElement(ga.Provider,{value:{id:m}},f.children))});(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null),(0,uB.createContext)(null);let yI=(0,uB.createContext)({}),yB=(0,uB.createContext)({}),yj=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,yB);let{elementType:t="span",...r}=e;return uj().createElement(t,{className:"react-aria-Text",...r,ref:n})}),yR=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),yF=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yL(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),t="function"==typeof n.getTextInfo?n.getTextInfo():n.textInfo;if(t)return"rtl"===t.direction;if(n.script)return yR.has(n.script)}let n=e.split("-")[0];return yF.has(n)}let yW=Symbol.for("react-aria.i18n.locale");function yV(){let e="u">typeof window&&window[yW]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:yL(e)?"rtl":"ltr"}}let yG=yV(),yU=new Set;function yq(){for(let e of(yG=yV(),yU))e(yG)}function yH(){let e=m1(),[n,t]=(0,uB.useState)(yG);return((0,uB.useEffect)(()=>(0===yU.size&&window.addEventListener("languagechange",yq),yU.add(t),()=>{yU.delete(t),0===yU.size&&window.removeEventListener("languagechange",yq)}),[]),e)?{locale:"en-US",direction:"ltr"}:n}let yK=uj().createContext(null);function yY(e){let{locale:n,children:t}=e,r=yH(),o=uj().useMemo(()=>n?{locale:n,direction:yL(n)?"rtl":"ltr"}:r,[r,n]);return uj().createElement(yK.Provider,{value:o},t)}function yZ(){let e=yH();return(0,uB.useContext)(yK)||e}var yJ={};function yX(e,n){return e-n*Math.floor(e/n)}function yQ(e,n,t,r){let o=(n=y1(e,n))-1,a=-2;return t<=2?a=0:y0(n)&&(a=-1),1721425+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*t-362)/12+a+r)}function y0(e){return e%4==0&&(e%100!=0||e%400==0)}function y1(e,n){return"BC"===e?1-n:n}function y2(e){let n="AD";return e<=0&&(n="BC",e=1-e),[n,e]}yJ={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let y3={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class y5{fromJulianDay(e){let n=e-1721426,t=Math.floor(n/146097),r=yX(n,146097),o=Math.floor(r/36524),a=yX(r,36524),i=Math.floor(a/1461),s=Math.floor(yX(a,1461)/365),[l,c]=y2(400*t+100*o+4*i+s+ +(4!==o&&4!==s)),p=e-yQ(l,c,1,1),u=2;e<yQ(l,c,3,1)?u=0:y0(c)&&(u=1);let d=Math.floor(((p+u)*12+373)/367),f=e-yQ(l,c,d,1)+1;return new bg(l,c,d,f)}toJulianDay(e){return yQ(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return y3[y0(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return y0(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function y4(e,n){let t=e.copy(),r="hour"in t?ba(t,n):0;y6(t,n.years||0),t.calendar.balanceYearMonth&&t.calendar.balanceYearMonth(t,e),t.month+=n.months||0,y7(t),y8(t),t.day+=7*(n.weeks||0),t.day+=n.days||0,t.day+=r,function(e){for(;e.day<1;)e.month--,y7(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,y7(e)}(t),t.calendar.balanceDate&&t.calendar.balanceDate(t),t.year<1&&(t.year=1,t.month=1,t.day=1);let o=t.calendar.getYearsInEra(t);if(t.year>o){var a,i;let e=null==(a=(i=t.calendar).isInverseEra)?void 0:a.call(i,t);t.year=o,t.month=e?1:t.calendar.getMonthsInYear(t),t.day=e?1:t.calendar.getDaysInMonth(t)}t.month<1&&(t.month=1,t.day=1);let s=t.calendar.getMonthsInYear(t);return t.month>s&&(t.month=s,t.day=t.calendar.getDaysInMonth(t)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day)),t}function y6(e,n){var t,r;(null==(t=(r=e.calendar).isInverseEra)?void 0:t.call(r,e))&&(n=-n),e.year+=n}function y7(e){for(;e.month<1;)y6(e,-1),e.month+=e.calendar.getMonthsInYear(e);let n=0;for(;e.month>(n=e.calendar.getMonthsInYear(e));)e.month-=n,y6(e,1)}function y8(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function y9(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),y8(e)}function be(e){let n={};for(let t in e)"number"==typeof e[t]&&(n[t]=-e[t]);return n}function bn(e,n){let t=e.copy();return null!=n.era&&(t.era=n.era),null!=n.year&&(t.year=n.year),null!=n.month&&(t.month=n.month),null!=n.day&&(t.day=n.day),y9(t),t}function bt(e,n){let t=e.copy();return null!=n.hour&&(t.hour=n.hour),null!=n.minute&&(t.minute=n.minute),null!=n.second&&(t.second=n.second),null!=n.millisecond&&(t.millisecond=n.millisecond),br(t),t}function br(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function bo(e,n){let t=e%n;return t<0&&(t+=n),t}function ba(e,n){let t;return e.hour+=n.hours||0,e.minute+=n.minutes||0,e.second+=n.seconds||0,e.millisecond+=n.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=bo(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=bo(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=bo(e.minute,60),t=Math.floor(e.hour/24),e.hour=bo(e.hour,24),t}function bi(e,n){let t=e.copy();return ba(t,n),t}function bs(e,n,t,r){let o=e.copy();switch(n){case"era":{let n=e.calendar.getEras(),a=n.indexOf(e.era);if(a<0)throw Error("Invalid era: "+e.era);a=bc(a,t,0,n.length-1,null==r?void 0:r.round),o.era=n[a],y9(o);break}case"year":var a,i;(null==(a=(i=o.calendar).isInverseEra)?void 0:a.call(i,o))&&(t=-t),o.year=bc(e.year,t,-1/0,9999,null==r?void 0:r.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,e);break;case"month":o.month=bc(e.month,t,1,e.calendar.getMonthsInYear(e),null==r?void 0:r.round);break;case"day":o.day=bc(e.day,t,1,e.calendar.getDaysInMonth(e),null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return e.calendar.balanceDate&&e.calendar.balanceDate(o),y9(o),o}function bl(e,n,t,r){let o=e.copy();switch(n){case"hour":{let n=e.hour,a=0,i=23;if((null==r?void 0:r.hourCycle)===12){let e=n>=12;a=12*!!e,i=e?23:11}o.hour=bc(n,t,a,i,null==r?void 0:r.round);break}case"minute":o.minute=bc(e.minute,t,0,59,null==r?void 0:r.round);break;case"second":o.second=bc(e.second,t,0,59,null==r?void 0:r.round);break;case"millisecond":o.millisecond=bc(e.millisecond,t,0,999,null==r?void 0:r.round);break;default:throw Error("Unsupported field "+n)}return o}function bc(e,n,t,r,o=!1){if(o){(e+=Math.sign(n))<t&&(e=r);let o=Math.abs(n);(e=n>0?Math.ceil(e/o)*o:Math.floor(e/o)*o)>r&&(e=t)}else(e+=n)<t?e=r-(t-e-1):e>r&&(e=t+(e-r-1));return e}function bp(e,n){let t;return t=(null!=n.years&&0!==n.years||null!=n.months&&0!==n.months||null!=n.weeks&&0!==n.weeks||null!=n.days&&0!==n.days?bS(y4(bP(e),{years:n.years,months:n.months,weeks:n.weeks,days:n.days}),e.timeZone):bw(e)-e.offset)+(n.milliseconds||0),t+=1e3*(n.seconds||0),t+=6e4*(n.minutes||0),bT(bz(t+=36e5*(n.hours||0),e.timeZone),e.calendar)}function bu(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function bd(e){let n,t=bT(e,new y5);return n="BC"===t.era?1===t.year?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function bf(e){return`${bd(e)}T${bu(e)}`}function bh(e){let n,t="object"==typeof e[0]?e.shift():new y5;if("string"==typeof e[0])n=e.shift();else{let e=t.getEras();n=e[e.length-1]}return[t,n,e.shift(),e.shift(),e.shift()]}var bm=new WeakMap;class bg{copy(){return this.era?new bg(this.calendar,this.era,this.year,this.month,this.day):new bg(this.calendar,this.year,this.month,this.day)}add(e){return y4(this,e)}subtract(e){return y4(this,be(e))}set(e){return bn(this,e)}cycle(e,n,t){return bs(this,e,n,t)}toDate(e){return bD(this,e)}toString(){return bd(this)}compare(e){return bW(this,e)}constructor(...e){gK(this,bm,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e);this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,y9(this)}}var by=new WeakMap;class bb{copy(){return new bb(this.hour,this.minute,this.second,this.millisecond)}add(e){return bi(this,e)}subtract(e){return bi(this,be(e))}set(e){return bt(this,e)}cycle(e,n,t){return bl(this,e,n,t)}toString(){return bu(this)}compare(e){var n,t;return n=this,t=e,bV(n)-bV(t)}constructor(e=0,n=0,t=0,r=0){gK(this,by,{writable:!0,value:void 0}),this.hour=e,this.minute=n,this.second=t,this.millisecond=r,br(this)}}var b_=new WeakMap;class bv{copy(){return this.era?new bv(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new bv(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return y4(this,e)}subtract(e){return y4(this,be(e))}set(e){return bn(bt(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return bs(this,e,n,t);default:return bl(this,e,n,t)}}toDate(e,n){return bD(this,e,n)}toString(){return bf(this)}compare(e){var n,t;let r=bW(this,e);return 0===r?(n=this,t=bP(e),bV(n)-bV(t)):r}constructor(...e){gK(this,b_,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e);this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,y9(this)}}var b$=new WeakMap;class bA{copy(){return this.era?new bA(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new bA(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return bp(this,e)}subtract(e){return bp(this,be(e))}set(e,n){let t,r;return 0===(r=bt(bn(t=bP(this),e),e)).compare(t)?this:bT(bz(bS(r,this.timeZone,n),this.timeZone),this.calendar)}cycle(e,n,t){return function(e,n,t,r){switch(n){case"hour":{let n=0,o=23;if((null==r?void 0:r.hourCycle)===12){let t=e.hour>=12;n=12*!!t,o=t?23:11}let a=bP(e),i=bT(bt(a,{hour:n}),new y5),s=[bS(i,e.timeZone,"earlier"),bS(i,e.timeZone,"later")].filter(n=>bz(n,e.timeZone).day===i.day)[0],l=bT(bt(a,{hour:o}),new y5),c=[bS(l,e.timeZone,"earlier"),bS(l,e.timeZone,"later")].filter(n=>bz(n,e.timeZone).day===l.day).pop(),p=bw(e)-e.offset,u=Math.floor(p/36e5),d=p%36e5;return bT(bz(p=36e5*bc(u,t,Math.floor(s/36e5),Math.floor(c/36e5),null==r?void 0:r.round)+d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return bl(e,n,t,r);case"era":case"year":case"month":case"day":return bT(bz(bS(bs(bP(e),n,t,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+n)}}(this,e,n,t)}toDate(){var e;return e=this,new Date(bw(e)-e.offset)}toString(){var e;let n,t,r;return`${bf(this)}${n=0>Math.sign(e=this.offset)?"-":"+",t=Math.floor((e=Math.abs(e))/36e5),r=e%36e5/6e4,`${n}${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,n){if(e instanceof bA){var t,r;return e.timeZone===n?e:(t=e,r=n,bT(bz(bw(t)-t.offset,r),t.calendar))}return bz(bS(e,n,void 0),n)})(e,this.timeZone).toDate().getTime()}constructor(...e){gK(this,b$,{writable:!0,value:void 0});let[n,t,r,o,a]=bh(e),i=e.shift(),s=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=o,this.day=a,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,y9(this)}}function bw(e){return bk(y1((e=bT(e,new y5)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function bk(e,n,t,r,o,a,i){let s=new Date;return s.setUTCHours(r,o,a,i),s.setUTCFullYear(e,n-1,t),s.getTime()}function bx(e,n){if("UTC"===n)return 0;if(e>0&&n===bU())return -6e4*new Date(e).getTimezoneOffset();let{year:t,month:r,day:o,hour:a,minute:i,second:s}=bE(e,n);return bk(t,r,o,a,i,s,0)-1e3*Math.floor(e/1e3)}let bC=new Map;function bE(e,n){let t=bC.get(n);t||(t=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),bC.set(n,t));let r=t.formatToParts(new Date(e)),o={};for(let e of r)"literal"!==e.type&&(o[e.type]=e.value);return{year:"BC"===o.era||"B"===o.era?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:"24"===o.hour?0:+o.hour,minute:+o.minute,second:+o.second}}function bS(e,n,t="compatible"){var r,o,a;let i=bP(e);if("UTC"===n)return bw(i);if(n===bU()&&"compatible"===t){i=bT(i,new y5);let e=new Date,n=y1(i.era,i.year);return e.setFullYear(n,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=bw(i),l=bx(s-864e5,n),c=bx(s+864e5,n),p=(r=i,((o=s-l)==(a=s-c)?[o]:[o,a]).filter(e=>{var t;let o;return t=r,o=bE(e,n),t.year===o.year&&t.month===o.month&&t.day===o.day&&t.hour===o.hour&&t.minute===o.minute&&t.second===o.second}));if(1===p.length)return p[0];if(p.length>1)switch(t){case"compatible":case"earlier":return p[0];case"later":return p[p.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(t){case"earlier":return Math.min(s-l,s-c);case"compatible":case"later":return Math.max(s-l,s-c);case"reject":throw RangeError("No such absolute time found")}}function bD(e,n,t="compatible"){return new Date(bS(e,n,t))}function bz(e,n){let t=bx(e,n),r=new Date(e+t),o=r.getUTCFullYear();return new bA(o<1?"BC":"AD",o<1?-o+1:o,r.getUTCMonth()+1,r.getUTCDate(),n,t,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function bM(e){return new bg(e.calendar,e.era,e.year,e.month,e.day)}function bP(e,n){let t=0,r=0,o=0,a=0;if("timeZone"in e)({hour:t,minute:r,second:o,millisecond:a}=e);else if("hour"in e&&!n)return e;return n&&({hour:t,minute:r,second:o,millisecond:a}=n),new bv(e.calendar,e.era,e.year,e.month,e.day,t,r,o,a)}function bT(e,n){if(bB(e.calendar,n))return e;let t=n.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=n,r.era=t.era,r.year=t.year,r.month=t.month,r.day=t.day,y9(r),r}let bO={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function bN(e,n){return n=bT(n,e.calendar),e.era===n.era&&e.year===n.year&&e.month===n.month&&e.day===n.day}function bI(e,n){return bB(e.calendar,n.calendar)&&bN(e,n)}function bB(e,n){var t,r,o,a;return null!=(a=null!=(o=null==(t=e.isEqual)?void 0:t.call(e,n))?o:null==(r=n.isEqual)?void 0:r.call(n,e))?a:e.identifier===n.identifier}let bj={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function bR(e,n,t){let r,o=Math.ceil(e.calendar.toJulianDay(e)+1-(t?bj[t]:(r=function(e){if(Intl.Locale){let n=bY.get(e);return!n&&(n=new Intl.Locale(e).maximize().region)&&bY.set(e,n),n}let n=e.split("-")[1];return"u"===n?void 0:n}(n))&&bO[r]||0))%7;return o<0&&(o+=7),o}function bF(e){return bz(Date.now(),e)}function bL(e){return bM(bF(e))}function bW(e,n){return e.calendar.toJulianDay(e)-n.calendar.toJulianDay(n)}function bV(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let bG=null;function bU(){return null==bG&&(bG=new Intl.DateTimeFormat().resolvedOptions().timeZone),bG}function bq(e){return e.subtract({days:e.day-1})}function bH(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function bK(e,n,t){let r=bR(e,n,t);return e.subtract({days:r})}let bY=new Map;function bZ(e,n){return e&&n?0>=e.compare(n)?e:n:e||n}function bJ(e,n){return e&&n?e.compare(n)>=0?e:n:e||n}let bX=Symbol.for("react-aria.i18n.locale"),bQ=Symbol.for("react-aria.i18n.strings");class b0{getStringForLocale(e,n){let t=this.getStringsForLocale(n)[e];if(!t)throw Error(`Could not find intl message ${e} in ${n} locale`);return t}getStringsForLocale(e){let n=this.strings[e];return n||(n=function(e,n,t="en-US"){var r;if(n[e])return n[e];let o=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(n[o])return n[o];for(let e in n)if(e.startsWith(o+"-"))return n[e];return n[t]}(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let n=window[bX];if(void 0===f){let e=window[bQ];if(!e)return null;for(let t in f={},e)f[t]=new b0({[n]:e[t]},n)}let t=null==f?void 0:f[e];if(!t)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return t}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=n}}let b1=new Map,b2=new Map;class b3{format(e,n){let t=this.strings.getStringForLocale(e,this.locale);return"function"==typeof t?t(n,this):t}plural(e,n,t="cardinal"){let r=n["="+e];if(r)return"function"==typeof r?r():r;let o=this.locale+":"+t,a=b1.get(o);return a||(a=new Intl.PluralRules(this.locale,{type:t}),b1.set(o,a)),"function"==typeof(r=n[a.select(e)]||n.other)?r():r}number(e){let n=b2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),b2.set(this.locale,n)),n.format(e)}select(e,n){let t=e[n]||e.other;return"function"==typeof t?t():t}constructor(e,n){this.locale=e,this.strings=n}}let b5=new WeakMap;function b4(e,n){let t;return n&&b0.getGlobalDictionaryForPackage(n)||((t=b5.get(e))||(t=new b0(e),b5.set(e,t)),t)}function b6(e,n){let{locale:t}=yZ(),r=b4(e,n);return(0,uB.useMemo)(()=>new b3(t,r),[t,r])}let b7=new Map;class b8{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,n);if(n<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(n)}`}formatRangeToParts(e,n){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,n);if(n<e)throw RangeError("End date must be >= start date");let t=this.formatter.formatToParts(e),r=this.formatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==_t&&(_t="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),_t&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,n){if(!n.timeStyle&&!n.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let t=_e(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...n,timeZone:void 0}),r=parseInt(t.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),o=parseInt(t.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===o)return"h23";if(24===r&&23===o)return"h24";if(0===r&&11===o)return"h11";if(12===r&&11===o)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=_e(e,n),this.options=n}}let b9={true:{ja:"h11"},false:{}};function _e(e,n={}){if("boolean"==typeof n.hour12&&(null==_n&&(_n="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),_n)){let t=b9[String((n={...n}).hour12)][e.split("-")[0]],r=n.hour12?"h12":"h23";n.hourCycle=null!=t?t:r,delete n.hour12}let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(b7.has(t))return b7.get(t);let r=new Intl.DateTimeFormat(e,n);return b7.set(t,r),r}let _n=null,_t=null;function _r(e,n){let t=(0,uB.useRef)(null);return e&&t.current&&n(e,t.current)&&(e=t.current),t.current=e,e}function _o(e){e=_r(null!=e?e:{},_a);let{locale:n}=yZ();return(0,uB.useMemo)(()=>new b8(n,e),[n,e])}function _a(e,n){if(e===n)return!0;let t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(let r of t)if(n[r]!==e[r])return!1;return!0}function _i(e){return e&&e.__esModule?e.default:e}let _s=new WeakMap;function _l(e){return(null==e?void 0:e.calendar.identifier)==="gregory"&&"BC"===e.era?"short":void 0}function _c(e,n,t,r){let o=b6(_i(yJ),"@react-aria/calendar"),a=_l(e)||_l(n),i=_o({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:t}),s=_o({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:t});return(0,uB.useMemo)(()=>{if(bN(e,bq(e))){let a=e,s=n;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),n.calendar.getFormattableMonth&&(s=n.calendar.getFormattableMonth(n)),bN(n,bH(e)))return i.format(a.toDate(t));if(bN(n,bH(n)))return r?_p(i,o,a,s,t):i.formatRange(a.toDate(t),s.toDate(t))}return r?_p(s,o,e,n,t):s.formatRange(e.toDate(t),n.toDate(t))},[e,n,i,s,o,t,r])}function _p(e,n,t,r,o){let a=e.formatRangeToParts(t.toDate(o),r.toDate(o)),i=-1;for(let e=0;e<a.length;e++){let n=a[e];if("shared"===n.source&&"literal"===n.type)i=e;else if("endRange"===n.source)break}let s="",l="";for(let e=0;e<a.length;e++)e<i?s+=a[e].value:e>i&&(l+=a[e].value);return n.format("dateRange",{startDate:s,endDate:l})}function _u(e,n){let t=(0,uB.useRef)(!0),r=(0,uB.useRef)(null);(0,uB.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),(0,uB.useEffect)(()=>{let o=r.current;t.current?t.current=!1:(!o||n.some((e,n)=>!Object.is(e,o[n])))&&e(),r.current=n},n)}function _d(e,n){let{id:t,"aria-label":r,"aria-labelledby":o}=e;return t=m5(t),o&&r?o=[...new Set([t,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),r||o||!n||(r=n),{id:t,"aria-label":r,"aria-labelledby":o}}function _f(e,n){var t,r;let o,a,i,s,l,c=b6((t=yJ)&&t.__esModule?t.default:t,"@react-aria/calendar"),p=gf(e),u=_c(n.visibleRange.start,n.visibleRange.end,n.timeZone,!1),d=_c(n.visibleRange.start,n.visibleRange.end,n.timeZone,!0);_u(()=>{n.isFocused||gs(d)},[d]);let f=(i=b6(_i(yJ),"@react-aria/calendar"),"highlightedRange"in n?{start:o,end:a}=n.highlightedRange||{}:o=a=null!=(r=n.value)?r:void 0,s=_o({weekday:"long",month:"long",year:"numeric",day:"numeric",era:_l(o)||_l(a),timeZone:n.timeZone}),l="anchorDate"in n?n.anchorDate:null,(0,uB.useMemo)(()=>{if(!l&&o&&a)if(bN(o,a)){let e=s.format(o.toDate(n.timeZone));return i.format("selectedDateDescription",{date:e})}else{let e=_p(s,i,o,a,n.timeZone);return i.format("selectedRangeDescription",{dateRange:e})}return""},[o,a,l,n.timeZone,i,s]));_u(()=>{f&&gs(f,"polite",4e3)},[f]);let h=m4([!!e.errorMessage,e.isInvalid,e.validationState]);_s.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:h,selectedDateDescription:f});let[m,g]=(0,uB.useState)(!1),y=e.isDisabled||n.isNextVisibleRangeInvalid();y&&m&&(g(!1),n.setFocused(!0));let[b,v]=(0,uB.useState)(!1),$=e.isDisabled||n.isPreviousVisibleRangeInvalid();return $&&b&&(v(!1),n.setFocused(!0)),{calendarProps:m7(p,_d({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>n.focusNextPage(),"aria-label":c.format("next"),isDisabled:y,onFocusChange:g},prevButtonProps:{onPress:()=>n.focusPreviousPage(),"aria-label":c.format("previous"),isDisabled:$,onFocusChange:v},errorMessageProps:{id:h},title:u}}let _h={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function _m(e){let{children:n,elementType:t="div",isFocusable:r,style:o,...a}=e,{visuallyHiddenProps:i}=function(e={}){let{style:n,isFocusable:t}=e,[r,o]=(0,uB.useState)(!1),{focusWithinProps:a}=yk({isDisabled:!t,onFocusWithinChange:e=>o(e)}),i=(0,uB.useMemo)(()=>r?n:n?{..._h,...n}:_h,[r]);return{visuallyHiddenProps:{...a,style:i}}}(e);return uj().createElement(t,m7(a,i),n)}function _g(e,n,t,r){let o=mq(t),a=null==t;(0,uB.useEffect)(()=>{if(a||!e.current)return;let t=e.current;return t.addEventListener(n,o,r),()=>{t.removeEventListener(n,o,r)}},[e,n,r,a,o])}let _y=0,_b=new Map;function __(e){let[n,t]=(0,uB.useState)();return mU(()=>{if(!e)return;let n=_b.get(e);if(n)t(n.element.id);else{let r=`react-aria-description-${_y++}`;t(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),n={refCount:0,element:o},_b.set(e,n)}return n.refCount++,()=>{n&&0==--n.refCount&&(n.element.remove(),_b.delete(e))}},[e]),{"aria-describedby":e?n:void 0}}function _v(e,n){if(!e)return!1;let t=window.getComputedStyle(e),r=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return r&&n&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function _$(e,n,t){let r="left"===t?"offsetLeft":"offsetTop",o=0;for(;n.offsetParent&&(o+=n[r],n.offsetParent!==e);){if(n.offsetParent.contains(e)){o-=e[r];break}n=n.offsetParent}return o}function _A(e,n){if(e&&document.contains(e)){let i=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(i).overflow)for(let n of function(e){let n=[];for(;e&&e!==document.documentElement;)_v(e,void 0)&&n.push(e),e=e.parentElement;return n}(e))!function(e,n){let t=_$(e,n,"left"),r=_$(e,n,"top"),o=n.offsetWidth,a=n.offsetHeight,i=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:c,scrollPaddingTop:p,scrollPaddingRight:u,scrollPaddingBottom:d,scrollPaddingLeft:f}=getComputedStyle(e),h=i+parseInt(c,10),m=s+parseInt(l,10),g=h+e.clientWidth,y=m+e.clientHeight,b=parseInt(p,10)||0,v=parseInt(d,10)||0,$=parseInt(u,10)||0,A=parseInt(f,10)||0;t<=i+A?i=t-parseInt(c,10)-A:t+o>g-$&&(i+=t+o-g+$),r<=m+b?s=r-parseInt(l,10)-b:r+a>y-v&&(s+=r+a-y+v),e.scrollLeft=i,e.scrollTop=s}(n,e);else{var t,r,o,a;let{left:i,top:s}=e.getBoundingClientRect();null==e||null==(t=e.scrollIntoView)||t.call(e,{block:"nearest"});let{left:l,top:c}=e.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-c)>1)&&(null==n||null==(o=n.containingElement)||null==(r=o.scrollIntoView)||r.call(o,{block:"center",inline:"center"}),null==(a=e.scrollIntoView)||a.call(e,{block:"nearest"}))}}}function _w(e,n){let t=e;for(_v(t,n)&&(t=t.parentElement);t&&!_v(t,n);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}class _k extends y5{fromJulianDay(e){let n=super.fromJulianDay(e);return new bg(this,y1(n.era,n.year)- -543,n.month,n.day)}toJulianDay(e){return super.toJulianDay(_x(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(_x(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function _x(e){let[n,t]=y2(e.year+-543);return new bg(n,t,e.month,e.day)}function _C(e,n,t,r){return e+365*n+Math.floor(n/4)+30*(t-1)+r-1}function _E(e,n){let t=Math.floor(4*(n-e)/1461),r=1+Math.floor((n-_C(e,t,1,1))/30),o=n+1-_C(e,t,r,1);return[t,r,o]}function _S(e){return Math.floor(e%4/3)}function _D(e,n){return n%13!=0?30:_S(e)+5}class _z{fromJulianDay(e){let[n,t,r]=_E(1723856,e),o="AM";return n<=0&&(o="AA",n+=5500),new bg(this,o,n,t,r)}toJulianDay(e){let n=e.year;return"AA"===e.era&&(n-=5500),_C(1723856,n,e.month,e.day)}getDaysInMonth(e){return _D(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+_S(e.year)}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class _M extends _z{fromJulianDay(e){let[n,t,r]=_E(1723856,e);return new bg(this,"AA",n+=5500,t,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class _P extends _z{fromJulianDay(e){let[n,t,r]=_E(1824665,e),o="CE";return n<=0&&(o="BCE",n=1-n),new bg(this,o,n,t,r)}toJulianDay(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_C(1824665,n,e.month,e.day)}getDaysInMonth(e){let n=e.year;return"BCE"===e.era&&(n=1-n),_D(n,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let _T=765433;function _O(e){return 7>yX(7*e+1,19)}function _N(e){let n=Math.floor((235*e-234)/19),t=29*n+Math.floor((12084+13753*n)/25920);return 3>yX(3*(t+1),7)&&(t+=1),t}function _I(e){let n,t;return _N(e)+(n=_N(e-1),t=_N(e),_N(e+1)-t==356?2:+(t-n==382))}function _B(e){return _I(e+1)-_I(e)}function _j(e,n){if(n>=6&&!_O(e)&&n++,4===n||7===n||9===n||11===n||13===n)return 29;let t=function(e){let n=_B(e);switch(n>380&&(n-=30),n){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===n?2===t?30:29:3===n?0===t?29:30:6===n?30*!!_O(e):30}class _R{fromJulianDay(e){let n=e-347997,t=Math.floor((25920*n/_T*19+234)/235)+1,r=_I(t),o=Math.floor(n-r);for(;o<1;)o=Math.floor(n-(r=_I(--t)));let a=1,i=0;for(;i<o;)i+=_j(t,a),a++;let s=o-(i-=_j(t,--a));return new bg(this,t,a,s)}toJulianDay(e){let n=_I(e.year);for(let t=1;t<e.month;t++)n+=_j(e.year,t);return n+e.day+347997}getDaysInMonth(e){return _j(e.year,e.month)}getMonthsInYear(e){return _O(e.year)?13:12}getDaysInYear(e){return _B(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,n){n.year!==e.year&&(_O(n.year)&&!_O(e.year)&&n.month>6?e.month--:!_O(n.year)&&_O(e.year)&&n.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class _F extends y5{fromJulianDay(e){let n,t,r,o=super.fromJulianDay(e),a=o.year-78,i=e-yQ(o.era,o.year,1,1);if(i<80?(a--,i+=(n=y0(o.year-1)?31:30)+155+90+10):(n=y0(o.year)?31:30,i-=80),i<n)t=1,r=i+1;else{let e=i-n;e<155?(t=Math.floor(e/31)+2,r=e%31+1):(e-=155,t=Math.floor(e/30)+7,r=e%30+1)}return new bg(this,a,t,r)}toJulianDay(e){let n,t,[r,o]=y2(e.year+78);return(y0(o)?(n=31,t=yQ(r,o,3,21)):(n=30,t=yQ(r,o,3,22)),1===e.month)?t+e.day-1:(t+=n+31*Math.min(e.month-2,5),e.month>=8&&(t+=(e.month-7)*30),t+=e.day-1)}getDaysInMonth(e){return 1===e.month&&y0(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function _L(e,n,t,r){return r+Math.ceil(29.5*(t-1))+(n-1)*354+Math.floor((3+11*n)/30)+e-1}function _W(e,n,t){let r=Math.floor((30*(t-n)+10646)/10631),o=Math.min(12,Math.ceil((t-(29+_L(n,r,1,1)))/29.5)+1),a=t-_L(n,r,o,1)+1;return new bg(e,r,o,a)}function _V(e){return(14+11*e)%30<11}class _G{fromJulianDay(e){return _W(this,1948440,e)}toJulianDay(e){return _L(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let n=29+e.month%2;return 12===e.month&&_V(e.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(e){return _V(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class _U extends _G{fromJulianDay(e){return _W(this,1948439,e)}toJulianDay(e){return _L(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function _q(e){return 460322+c[e-1300]}function _H(e,n){return(l[e-1300]&1<<11-(n-1))==0?29:30}function _K(e,n){let t=_q(e);for(let r=1;r<n;r++)t+=_H(e,r);return t}function _Y(e){return c[e+1-1300]-c[e-1300]}class _Z extends _G{fromJulianDay(e){let n=e-1948440,t=_q(1300),r=_q(1600);if(n<t||n>r)return super.fromJulianDay(e);{let e=1299,t=1,r=1;for(;r>0;){r=n-_q(++e)+1;let o=_Y(e);if(r===o){t=12;break}if(r<o){let n=_H(e,t);for(t=1;r>n;)r-=n,n=_H(e,++t);break}}return new bg(this,e,t,n-_K(e,t)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+_K(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):_H(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):_Y(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",l||(l=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!c){c=new Uint32Array(301);let e=0;for(let n=1300;n<=1600;n++){c[n-1300]=e;for(let t=1;t<=12;t++)e+=_H(n,t)}}}}let _J=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],_X=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],_Q=[1867,1911,1925,1988,2018],_0=["meiji","taisho","showa","heisei","reiwa"];function _1(e){let n=_J.findIndex(([n,t,r])=>!!(e.year<n)||e.year===n&&!!(e.month<t)||e.year===n&&e.month===t&&!!(e.day<r));return -1===n?_J.length-1:0===n?0:n-1}function _2(e){let n=_Q[_0.indexOf(e.era)];if(!n)throw Error("Unknown era: "+e.era);return new bg(e.year+n,e.month,e.day)}class _3 extends y5{fromJulianDay(e){let n=super.fromJulianDay(e),t=_1(n);return new bg(this,_0[t],n.year-_Q[t],n.month,n.day)}toJulianDay(e){return super.toJulianDay(_2(e))}balanceDate(e){let n=_2(e),t=_1(n);_0[t]!==e.era&&(e.era=_0[t],e.year=n.year-_Q[t]),this.constrainDate(e)}constrainDate(e){let n=_0.indexOf(e.era),t=_X[n];if(null!=t){let[r,o,a]=t,i=r-_Q[n];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(o,e.month),e.month===o&&(e.day=Math.min(a,e.day)))}if(1===e.year&&n>=0){let[,t,r]=_J[n];e.month=Math.max(t,e.month),e.month===t&&(e.day=Math.max(r,e.day))}}getEras(){return _0}getYearsInEra(e){let n=_0.indexOf(e.era),t=_J[n],r=_J[n+1];if(null==r)return 9999-t[0]+1;let o=r[0]-t[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&o++,o}getDaysInMonth(e){return super.getDaysInMonth(_2(e))}getMinimumMonthInYear(e){let n=_5(e);return n?n[1]:1}getMinimumDayInMonth(e){let n=_5(e);return n&&e.month===n[1]?n[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function _5(e){if(1===e.year)return _J[_0.indexOf(e.era)]}let _4=[0,31,62,93,124,155,186,216,246,276,306,336];class _6{fromJulianDay(e){let n=e-1948320,t=1+Math.floor((33*n+3)/12053),r=n-(365*(t-1)+Math.floor((8*t+21)/33)),o=r<216?Math.floor(r/31):Math.floor((r-6)/30),a=r-_4[o]+1;return new bg(this,t,o+1,a)}toJulianDay(e){let n=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return n+=_4[e.month-1],n+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>yX(25*e.year+11,33)?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function _7(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function _8(e){let n=e-1911;return n>0?["minguo",n]:["before_minguo",1-n]}class _9 extends y5{fromJulianDay(e){let n=super.fromJulianDay(e),[t,r]=_8(y1(n.era,n.year));return new bg(this,t,r,n.month,n.day)}toJulianDay(e){return super.toJulianDay(ve(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[n,t]=_8(_7(e));e.era=n,e.year=t}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(ve(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function ve(e){let[n,t]=y2(_7(e));return new bg(n,t,e.month,e.day)}function vn(e){switch(e){case"buddhist":return new _k;case"ethiopic":return new _z;case"ethioaa":return new _M;case"coptic":return new _P;case"hebrew":return new _R;case"indian":return new _F;case"islamic-civil":return new _G;case"islamic-tbla":return new _U;case"islamic-umalqura":return new _Z;case"japanese":return new _3;case"persian":return new _6;case"roc":return new _9;default:return new y5}}function vt(e,n,t){return null!=n&&0>e.compare(n)||null!=t&&e.compare(t)>0}function vr(e,n,t,r,o){let a={};for(let e in n)a[e]=Math.floor(n[e]/2),a[e]>0&&n[e]%2==0&&a[e]--;let i=vo(e,n,t).subtract(a);return vi(e,i,n,t,r,o)}function vo(e,n,t,r,o){let a=e;if(n.years)a=bq(e.subtract({months:e.month-1}));else n.months?a=bq(e):n.weeks&&(a=bK(e,t));return vi(e,a,n,t,r,o)}function va(e,n,t,r,o){let a={...n};a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--;let i=vo(e,n,t).subtract(a);return vi(e,i,n,t,r,o)}function vi(e,n,t,r,o,a){if(o&&e.compare(o)>=0){let e=bJ(n,vo(bM(o),t,r));e&&(n=e)}if(a&&0>=e.compare(a)){let e=bZ(n,va(bM(a),t,r));e&&(n=e)}return n}function vs(e,n,t){if(n){let t=bJ(e,bM(n));t&&(e=t)}if(t){let n=bZ(e,bM(t));n&&(e=n)}return e}function vl(e,n,t){if(!t)return e;for(;e.compare(n)>=0&&t(e);)e=e.subtract({days:1});return e.compare(n)>=0?e:null}function vc(e,n,t){let[r,o]=(0,uB.useState)(e||n),a=(0,uB.useRef)(void 0!==e),i=void 0!==e;(0,uB.useEffect)(()=>{a.current,a.current=i},[i]);let s=i?e:r,l=(0,uB.useCallback)((e,...n)=>{let r=(e,...n)=>{t&&!Object.is(s,e)&&t(e,...n),i||(s=e)};"function"==typeof e?o((t,...o)=>{let a=e(i?s:t,...o);return(r(a,...n),i)?t:a}):(i||o(e),r(e,...n))},[i,s,t]);return[s,l]}function vp(e){var n,t,r;let o=(0,uB.useMemo)(()=>new b8(e.locale),[e.locale]),a=(0,uB.useMemo)(()=>o.resolvedOptions(),[o]),{locale:i,createCalendar:s,visibleDuration:l={months:1},minValue:c,maxValue:p,selectionAlignment:u,isDateUnavailable:d,pageBehavior:f="visible",firstDayOfWeek:h}=e,m=(0,uB.useMemo)(()=>s(a.calendar),[s,a.calendar]),[g,y]=vc(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),b=(0,uB.useMemo)(()=>g?bT(bM(g),m):null,[g,m]),v=(0,uB.useMemo)(()=>g&&"timeZone"in g?g.timeZone:a.timeZone,[g,a.timeZone]),[$,A]=vc((0,uB.useMemo)(()=>e.focusedValue?vs(bT(bM(e.focusedValue),m),c,p):void 0,[e.focusedValue,m,c,p]),(0,uB.useMemo)(()=>vs(e.defaultFocusedValue?bT(bM(e.defaultFocusedValue),m):b||bT(bL(v),m),c,p),[e.defaultFocusedValue,b,v,m,c,p]),e.onFocusChange),[w,k]=(0,uB.useState)(()=>{switch(u){case"start":return vo($,l,i,c,p);case"end":return va($,l,i,c,p);default:return vr($,l,i,c,p)}}),[x,C]=(0,uB.useState)(e.autoFocus||!1),E=(0,uB.useMemo)(()=>{let e={...l};return e.days?e.days--:e.days=-1,w.add(e)},[w,l]),[S,D]=(0,uB.useState)(m);if(!bB(m,S)){let e=bT($,m);k(vr(e,l,i,c,p)),A(e),D(m)}function z(e){A(e=vs(e,c,p))}function M(n){if(!e.isDisabled&&!e.isReadOnly){let e=n;if(null===e)return void y(null);(e=vl(e=vs(e,c,p),w,d))&&(e=bT(e,(null==g?void 0:g.calendar)||new y5),g&&"hour"in g?y(g.set(e)):y(e))}}vt($,c,p)?A(vs($,c,p)):0>$.compare(w)?k(va($,l,i,c,p)):$.compare(E)>0&&k(vo($,l,i,c,p));let P=(0,uB.useMemo)(()=>!!b&&(!!(d&&d(b))||vt(b,c,p)),[b,d,c,p]),T=e.isInvalid||"invalid"===e.validationState||P,O=(0,uB.useMemo)(()=>"visible"===f?l:vu(l),[f,l]);return{isDisabled:null!=(t=e.isDisabled)&&t,isReadOnly:null!=(r=e.isReadOnly)&&r,value:b,setValue:M,visibleRange:{start:w,end:E},minValue:c,maxValue:p,focusedDate:$,timeZone:v,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){z(e),C(!0)},focusNextDay(){z($.add({days:1}))},focusPreviousDay(){z($.subtract({days:1}))},focusNextRow(){l.days?this.focusNextPage():(l.weeks||l.months||l.years)&&z($.add({weeks:1}))},focusPreviousRow(){l.days?this.focusPreviousPage():(l.weeks||l.months||l.years)&&z($.subtract({weeks:1}))},focusNextPage(){let e=w.add(O);A(vs($.add(O),c,p)),k(vo(vi($,e,O,i,c,p),O,i))},focusPreviousPage(){let e=w.subtract(O);A(vs($.subtract(O),c,p)),k(vo(vi($,e,O,i,c,p),O,i))},focusSectionStart(){l.days?z(w):l.weeks?z(bK($,i)):(l.months||l.years)&&z(bq($))},focusSectionEnd(){l.days?z(E):l.weeks?z(bK($,i,void 0).add({days:6})):(l.months||l.years)&&z(bH($))},focusNextSection(e){e||l.days?l.days?this.focusNextPage():l.weeks?z($.add({months:1})):(l.months||l.years)&&z($.add({years:1})):z($.add(vu(l)))},focusPreviousSection(e){e||l.days?l.days?this.focusPreviousPage():l.weeks?z($.subtract({months:1})):(l.months||l.years)&&z($.subtract({years:1})):z($.subtract(vu(l)))},selectFocusedDate(){d&&d($)||M($)},selectDate(e){M(e)},isFocused:x,setFocused:C,isInvalid:e=>vt(e,c,p),isSelected(e){return null!=b&&bN(e,b)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&$&&bN(e,$),isCellDisabled(n){return e.isDisabled||0>n.compare(w)||n.compare(E)>0||this.isInvalid(n)},isCellUnavailable:n=>!!e.isDateUnavailable&&e.isDateUnavailable(n),isPreviousVisibleRangeInvalid(){let e=w.subtract({days:1});return bN(e,w)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return bN(e,E)||this.isInvalid(e)},getDatesInWeek(e,n=w){let t=n.add({weeks:e}),r=[],o=bR(t=bK(t,i,h),i,h);for(let e=0;e<o;e++)r.push(null);for(;r.length<7;){r.push(t);let e=t.add({days:1});if(bN(t,e))break;t=e}for(;r.length<7;)r.push(null);return r}}}function vu(e){let n={...e};for(let t in e)n[t]=1;return n}function vd(e,n){return e&&n?(0>n.compare(e)&&([e,n]=[n,e]),{start:bM(e),end:bM(n)}):null}function vf(e,n){return(e=bT(e,(null==n?void 0:n.calendar)||new y5),n&&"hour"in n)?n.set(e):e}function vh(e,n,t){let r=e.add({days:t});for(;(t<0?r.compare(n.visibleRange.start)>=0:0>=r.compare(n.visibleRange.end))&&!n.isCellUnavailable(r);)r=r.add({days:t});if(n.isCellUnavailable(r))return r.add({days:-t})}let vm=(0,uB.createContext)(null),vg=(0,uB.createContext)(null),vy=(0,uB.createContext)(null),vb=(0,uB.createContext)(null),v_=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,vm);let{locale:t}=yZ(),r=vp({...e,locale:t,createCalendar:e.createCalendar||vn}),{calendarProps:o,prevButtonProps:a,nextButtonProps:i,errorMessageProps:s,title:l}=_f(e,r),c=ge({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return uj().createElement("div",{...c,...o,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},uj().createElement(m9,{values:[[yO,{slots:{previous:a,next:i}}],[yI,{"aria-hidden":!0,level:2,children:l}],[vy,r],[vm,e],[yB,{slots:{errorMessage:s}}]]},uj().createElement(_m,null,uj().createElement("h2",null,o["aria-label"])),c.children,uj().createElement(_m,null,uj().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),vv=(0,uB.forwardRef)(function(e,n){var t,r;let o,a,i;[e,n]=gt(e,n,vg);let{locale:s}=yZ(),l=function(e){let{value:n,defaultValue:t,onChange:r,createCalendar:o,locale:a,visibleDuration:i={months:1},minValue:s,maxValue:l,...c}=e,[p,u]=vc(n,t||null,r),[d,f]=(0,uB.useState)(null),h="center";if(p&&p.start&&p.end){let e=vr(bM(p.start),i,a,s,l).add(i).subtract({days:1});p.end.compare(e)>0&&(h="start")}let m=(0,uB.useRef)(null),[g,y]=(0,uB.useState)(null),b=(0,uB.useMemo)(()=>bJ(s,null==g?void 0:g.start),[s,g]),v=(0,uB.useMemo)(()=>bZ(l,null==g?void 0:g.end),[l,g]),$=vp({...c,value:p&&p.start,createCalendar:o,locale:a,visibleDuration:i,minValue:b,maxValue:v,selectionAlignment:h}),A=n=>{n&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(m.current={start:vh(n,$,-1),end:vh(n,$,1)},y(m.current)):(m.current=null,y(null))},[w,k]=(0,uB.useState)($.visibleRange);bI($.visibleRange.start,w.start)&&bI($.visibleRange.end,w.end)||(A(d),k($.visibleRange));let x=e=>{e?(f(e),A(e)):(f(null),A(null))},C=d?vd(d,$.focusedDate):p&&vd(p.start,p.end),E=n=>{if(e.isReadOnly)return;let t=vl(vs(n,b,v),$.visibleRange.start,e.isDateUnavailable);if(t)if(d){let e=vd(d,t);e&&u({start:vf(e.start,null==p?void 0:p.start),end:vf(e.end,null==p?void 0:p.end)}),x(null)}else x(t)},[S,D]=(0,uB.useState)(!1),{isDateUnavailable:z}=e,M=(0,uB.useMemo)(()=>!!p&&!d&&(!!(z&&(z(p.start)||z(p.end)))||vt(p.start,s,l)||vt(p.end,s,l)),[z,p,d,s,l]),P=e.isInvalid||"invalid"===e.validationState||M;return{...$,value:p,setValue:u,anchorDate:d,setAnchorDate:x,highlightedRange:C,validationState:P?"invalid":null,isValueInvalid:P,selectFocusedDate(){E($.focusedDate)},selectDate:E,highlightDate(e){d&&$.setFocusedDate(e)},isSelected:e=>!!(C&&e.compare(C.start)>=0&&0>=e.compare(C.end)&&!$.isCellDisabled(e)&&!$.isCellUnavailable(e)),isInvalid(e){var n,t;return $.isInvalid(e)||vt(e,null==(n=m.current)?void 0:n.start,null==(t=m.current)?void 0:t.end)},isDragging:S,setDragging:D}}({...e,locale:s,createCalendar:e.createCalendar||vn}),{calendarProps:c,prevButtonProps:p,nextButtonProps:u,errorMessageProps:d,title:f}=(t=e,r=n,o=_f(t,l),a=(0,uB.useRef)(!1),_g(i=(0,uB.useRef)("u">typeof window?window:null),"pointerdown",e=>{a.current=0===e.width&&0===e.height}),_g(i,"pointerup",e=>{if(a.current){a.current=!1;return}if(l.setDragging(!1),!l.anchorDate)return;let n=e.target;r.current&&r.current.contains(document.activeElement)&&(!r.current.contains(n)||!n.closest('button, [role="button"]'))&&l.selectFocusedDate()}),o.calendarProps.onBlur=e=>{r.current&&(e.relatedTarget&&r.current.contains(e.relatedTarget)||!l.anchorDate||l.selectFocusedDate())},_g(r,"touchmove",e=>{l.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o),h=ge({...e,values:{state:l,isDisabled:e.isDisabled||!1,isInvalid:l.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return uj().createElement("div",{...h,...c,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":l.isValueInvalid||void 0},uj().createElement(m9,{values:[[yO,{slots:{previous:p,next:u}}],[yI,{"aria-hidden":!0,level:2,children:f}],[vb,l],[vg,e],[yB,{slots:{errorMessage:d}}]]},uj().createElement(_m,null,uj().createElement("h2",null,c["aria-label"])),h.children,uj().createElement(_m,null,uj().createElement("button",{"aria-label":u["aria-label"],disabled:u.isDisabled,onClick:()=>l.focusNextPage(),tabIndex:-1}))))}),v$=(0,uB.createContext)(null),vA=(0,uB.forwardRef)(function(e,n){var t,r;let o=(0,uB.useContext)(vy),a=(0,uB.useContext)(vb),i=gn(vm),s=gn(vg),l=null!=o?o:a,c=l.visibleRange.start;e.offset&&(c=c.add(e.offset));let p=null!=(t=null==i?void 0:i.firstDayOfWeek)?t:null==s?void 0:s.firstDayOfWeek,{gridProps:u,headerProps:d,weekDays:f,weeksInMonth:h}=function(e,n){let t,{startDate:r=n.visibleRange.start,endDate:o=n.visibleRange.end,firstDayOfWeek:a}=e,{direction:i}=yZ(),s=_c(r,o,n.timeZone,!0),{ariaLabel:l,ariaLabelledBy:c}=_s.get(n),p=_d({"aria-label":[l,s].filter(Boolean).join(", "),"aria-labelledby":c}),u=_o({weekday:e.weekdayStyle||"narrow",timeZone:n.timeZone}),{locale:d}=yZ(),f=(0,uB.useMemo)(()=>{let e=bK(bL(n.timeZone),d,a);return[...Array(7).keys()].map(t=>{let r=e.add({days:t}).toDate(n.timeZone);return u.format(r)})},[d,n.timeZone,u,a]),h=(t=r.calendar.getDaysInMonth(r),Math.ceil((bR(bq(r),d,a)+t)/7));return{gridProps:m7(p,{role:"grid","aria-readonly":n.isReadOnly||void 0,"aria-disabled":n.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in n||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),n.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),n.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),n.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),n.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),n.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===i?n.focusNextDay():n.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),n.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===i?n.focusPreviousDay():n.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),n.focusNextRow();break;case"Escape":"setAnchorDate"in n&&(e.preventDefault(),n.setAnchorDate(null))}},onFocus:()=>n.setFocused(!0),onBlur:()=>n.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f,weeksInMonth:h}}({startDate:c,endDate:bH(c),weekdayStyle:e.weekdayStyle,firstDayOfWeek:p},l);return uj().createElement(v$.Provider,{value:{headerProps:d,weekDays:f,startDate:c,weeksInMonth:h}},uj().createElement("table",{...gf(e),...u,ref:n,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:uj().createElement(uj().Fragment,null,uj().createElement(vw,null,e=>uj().createElement(vk,null,e)),uj().createElement(vx,null,e.children))))}),vw=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e,{headerProps:a,weekDays:i}=(0,uB.useContext)(v$);return uj().createElement("thead",{...gf(e),...a,ref:n,style:r,className:o||"react-aria-CalendarGridHeader"},uj().createElement("tr",null,i.map((e,n)=>uj().cloneElement(t(e),{key:n}))))}),vk=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e;return uj().createElement("th",{...gf(e),ref:n,style:r,className:o||"react-aria-CalendarHeaderCell"},t)}),vx=(0,uB.forwardRef)(function(e,n){let{children:t,style:r,className:o}=e,a=(0,uB.useContext)(vy),i=(0,uB.useContext)(vb),s=null!=a?a:i,{startDate:l,weeksInMonth:c}=(0,uB.useContext)(v$);return uj().createElement("tbody",{...gf(e),ref:n,style:r,className:o||"react-aria-CalendarGridBody"},[...Array(c).keys()].map(e=>uj().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,n)=>e?uj().cloneElement(t(e),{key:n}):uj().createElement("td",{key:n})))))}),vC=(0,uB.forwardRef)(function({date:e,...n},t){var r,o,a;let i=(0,uB.useContext)(vy),s=(0,uB.useContext)(vb),l=null!=i?i:s,{startDate:c}=null!=(r=(0,uB.useContext)(v$))?r:{startDate:l.visibleRange.start},p=(0,uB.useRef)(null),{cellProps:u,buttonProps:d,...f}=function(e,n,t){var r;let o,{date:a,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=_s.get(n),c=b6((r=yJ)&&r.__esModule?r.default:r,"@react-aria/calendar"),p=_o({weekday:"long",day:"numeric",month:"long",year:"numeric",era:_l(a),timeZone:n.timeZone}),u=n.isSelected(a),d=n.isCellFocused(a);i=i||n.isCellDisabled(a);let f=n.isCellUnavailable(a),h=!i&&!f,m=n.isValueInvalid&&!!("highlightedRange"in n?!n.anchorDate&&n.highlightedRange&&a.compare(n.highlightedRange.start)>=0&&0>=a.compare(n.highlightedRange.end):n.value&&bN(n.value,a));m&&(u=!0),a=_r(a,bI);let g=(0,uB.useMemo)(()=>a.toDate(n.timeZone),[a,n.timeZone]),y=bN(a,bL(n.timeZone)),b=(0,uB.useMemo)(()=>{let e="";return"highlightedRange"in n&&n.value&&!n.anchorDate&&(bN(a,n.value.start)||bN(a,n.value.end))&&(e=l+", "),e+=p.format(g),y?e=c.format(u?"todayDateSelected":"todayDate",{date:e}):u&&(e=c.format("dateSelected",{date:e})),n.minValue&&bN(a,n.minValue)?e+=", "+c.format("minimumDate"):n.maxValue&&bN(a,n.maxValue)&&(e+=", "+c.format("maximumDate")),e},[p,g,c,u,y,a,n,l]),v="";"anchorDate"in n&&d&&!n.isReadOnly&&h&&(v=n.anchorDate?c.format("finishRangeSelectionPrompt"):c.format("startRangeSelectionPrompt"));let $=__(v),A=(0,uB.useRef)(!1),w=(0,uB.useRef)(!1),k=(0,uB.useRef)(void 0),{pressProps:x,isPressed:C}=g6({shouldCancelOnPointerExit:"anchorDate"in n&&!!n.anchorDate,preventFocusOnPress:!0,isDisabled:!h||n.isReadOnly,onPressStart(e){if(n.isReadOnly)return void n.setFocusedDate(a);if("highlightedRange"in n&&!n.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(n.highlightedRange&&!m){if(bN(a,n.highlightedRange.start)){n.setAnchorDate(n.highlightedRange.end),n.setFocusedDate(a),n.setDragging(!0),w.current=!0;return}else if(bN(a,n.highlightedRange.end)){n.setAnchorDate(n.highlightedRange.start),n.setFocusedDate(a),n.setDragging(!0),w.current=!0;return}}let t=()=>{n.setDragging(!0),k.current=void 0,n.selectDate(a),n.setFocusedDate(a),A.current=!0};"touch"===e.pointerType?k.current=setTimeout(t,200):t()}},onPressEnd(){w.current=!1,A.current=!1,clearTimeout(k.current),k.current=void 0},onPress(){"anchorDate"in n||n.isReadOnly||(n.selectDate(a),n.setFocusedDate(a))},onPressUp(e){if(!n.isReadOnly&&("anchorDate"in n&&k.current&&(n.selectDate(a),n.setFocusedDate(a)),"anchorDate"in n))if(w.current)n.setAnchorDate(a);else if(n.anchorDate&&!A.current)n.selectDate(a),n.setFocusedDate(a);else if("keyboard"!==e.pointerType||n.anchorDate)"virtual"===e.pointerType&&(n.selectDate(a),n.setFocusedDate(a));else{n.selectDate(a);let e=a.add({days:1});n.isInvalid(e)&&(e=a.subtract({days:1})),n.isInvalid(e)||n.setFocusedDate(e)}}});i||(o=bN(a,n.focusedDate)?0:-1),(0,uB.useEffect)(()=>{d&&t.current&&(g$(t.current),"pointer"!==yr&&document.activeElement===t.current&&_A(t.current,{containingElement:_w(t.current)}))},[d,t]);let E=_o({day:"numeric",timeZone:n.timeZone,calendar:a.calendar.identifier}),S=(0,uB.useMemo)(()=>E.formatToParts(g).find(e=>"day"===e.type).value,[E,g]);return{cellProps:{role:"gridcell","aria-disabled":!h||void 0,"aria-selected":u||void 0,"aria-invalid":m||void 0},buttonProps:m7(x,{onFocus(){i||n.setFocusedDate(a)},tabIndex:o,role:"button","aria-disabled":!h||void 0,"aria-label":b,"aria-invalid":m||void 0,"aria-describedby":[m?s:void 0,$["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in n&&("touch"!==e.pointerType||n.isDragging)&&h&&n.highlightDate(a)},onPointerDown(e){"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:C,isFocused:d,isSelected:u,isDisabled:i,isUnavailable:f,isOutsideVisibleRange:0>a.compare(n.visibleRange.start)||a.compare(n.visibleRange.end)>0,isInvalid:m,formattedDate:S}}({date:e},l,p),{hoverProps:h,isHovered:m}=yz({...n,isDisabled:f.isDisabled}),{focusProps:g,isFocusVisible:y}=yx();y&&(y=f.isFocused);let b=(o=c,a=bT(a=e,o.calendar),o=bq(o),a=bq(a),o.era!==a.era||o.year!==a.year||o.month!==a.month),v=!1,$=!1;"highlightedRange"in l&&l.highlightedRange&&(v=bN(e,l.highlightedRange.start),$=bN(e,l.highlightedRange.end));let A=ge({...n,defaultChildren:f.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:m,isOutsideMonth:b,isFocusVisible:y,isSelectionStart:v,isSelectionEnd:$,...f}}),w={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":b||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":v||void 0,"data-selection-end":$||void 0,"data-invalid":f.isInvalid||void 0};return uj().createElement("td",{...u,ref:t},uj().createElement("div",{...m7(gf(n),d,g,h,w,A),ref:p}))}),vE=(0,uB.createContext)({}),vS=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,vE);let{isDisabled:o,isInvalid:a,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...c}=e,{hoverProps:p,isHovered:u}=yz({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:o}),{isFocused:d,isFocusVisible:f,focusProps:h}=yx({within:!0});null!=o||(o=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=a||(a=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let m=ge({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:o,isInvalid:a},defaultClassName:"react-aria-Group"});return uj().createElement("div",{...m7(c,h,p),...m,ref:n,role:null!=(t=e.role)?t:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":d||void 0,"data-hovered":u||void 0,"data-focus-visible":f||void 0,"data-disabled":o||void 0,"data-invalid":a||void 0},m.children)}),vD=(0,uB.createContext)({}),vz=yP(function(e,n){[e,n]=gt(e,n,vD);let{hoverProps:t,isHovered:r}=yz(e),{isFocused:o,isFocusVisible:a,focusProps:i}=yx({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=ge({...e,values:{isHovered:r,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return uj().createElement("input",{...m7((e=>{let{onHoverStart:n,onHoverChange:t,onHoverEnd:r,...o}=e;return o})(e),i,t),...l,ref:n,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})});var vM={};vM={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let vP=uj().createContext(null),vT="react-aria-focus-scope-restore",vO=null;function vN(e){var n,t,r,o,a,i,s,l,c,p;let u,d,f,h,{children:m,contain:g,restoreFocus:y,autoFocus:b}=e,v=(0,uB.useRef)(null),$=(0,uB.useRef)(null),A=(0,uB.useRef)([]),{parentNode:w}=(0,uB.useContext)(vP)||{},k=(0,uB.useMemo)(()=>new vZ({scopeRef:A}),[A]);mU(()=>{let e=w||vJ.root;if(vJ.getTreeNode(e.scopeRef)&&vO&&!vF(vO,e.scopeRef)){let n=vJ.getTreeNode(vO);n&&(e=n)}e.addChild(k),vJ.addNode(k)},[k,w]),mU(()=>{let e=vJ.getTreeNode(A);e&&(e.contain=!!g)},[g]),mU(()=>{var e;let n=null==(e=v.current)?void 0:e.nextSibling,t=[],r=e=>e.stopPropagation();for(;n&&n!==$.current;)t.push(n),n.addEventListener(vT,r),n=n.nextSibling;return A.current=t,()=>{for(let e of t)e.removeEventListener(vT,r)}},[m]),mU(()=>{if(t||r)return;let e=n.current,o=g_(e?e[0]:void 0),a=e=>{let t=gQ(e);vj(t,n.current)?vO=n:vR(t)||(vO=null)};return o.addEventListener("focusin",a,!1),null==e||e.forEach(e=>e.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",a,!1))}},[n=A,t=y,r=g]),o=A,a=g,u=(0,uB.useRef)(void 0),d=(0,uB.useRef)(void 0),mU(()=>{let e=o.current;if(!a){d.current&&(cancelAnimationFrame(d.current),d.current=void 0);return}let n=g_(e?e[0]:void 0),t=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!vB(o)||e.isComposing)return;let t=((e=document)=>e.activeElement)(n),r=o.current;if(!r||!vj(t,r))return;let a=vq(vI(r),{tabbable:!0},r);if(!t)return;a.currentNode=t;let i=e.shiftKey?a.previousNode():a.nextNode();i||(a.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,i=e.shiftKey?a.previousNode():a.nextNode()),e.preventDefault(),i&&vL(i,!0)},r=e=>{(!vO||vF(vO,o))&&vj(gQ(e),o.current)?(vO=o,u.current=gQ(e)):vB(o)&&!vR(gQ(e),o)?u.current?u.current.focus():vO&&vO.current&&vV(vO.current):vB(o)&&(u.current=gQ(e))},i=e=>{d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{let t=yr,r=("virtual"===t||null===t)&&gI()&&gN(),a=((e=document)=>e.activeElement)(n);if(!r&&a&&vB(o)&&!vR(a,o)){vO=o;let n=gQ(e);if(n&&n.isConnected){var i;u.current=n,null==(i=u.current)||i.focus()}else vO.current&&vV(vO.current)}})};return n.addEventListener("keydown",t,!1),n.addEventListener("focusin",r,!1),null==e||e.forEach(e=>e.addEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{n.removeEventListener("keydown",t,!1),n.removeEventListener("focusin",r,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",r,!1)),null==e||e.forEach(e=>e.removeEventListener("focusout",i,!1))}},[o,a]),mU(()=>()=>{d.current&&cancelAnimationFrame(d.current)},[d]),i=A,s=y,l=g,f=(0,uB.useRef)("u">typeof document?((e=document)=>e.activeElement)(g_(i.current?i.current[0]:void 0)):null),mU(()=>{let e=i.current,n=g_(e?e[0]:void 0);if(!s||l)return;let t=()=>{(!vO||vF(vO,i))&&vj(((e=document)=>e.activeElement)(n),i.current)&&(vO=i)};return n.addEventListener("focusin",t,!1),null==e||e.forEach(e=>e.addEventListener("focusin",t,!1)),()=>{n.removeEventListener("focusin",t,!1),null==e||e.forEach(e=>e.removeEventListener("focusin",t,!1))}},[i,l]),mU(()=>{let e=g_(i.current?i.current[0]:void 0);if(!s)return;let n=n=>{if("Tab"!==n.key||n.altKey||n.ctrlKey||n.metaKey||!vB(i)||n.isComposing)return;let t=e.activeElement;if(!vR(t,i)||!vG(i))return;let r=vJ.getTreeNode(i);if(!r)return;let o=r.nodeToRestore,a=vq(e.body,{tabbable:!0});a.currentNode=t;let s=n.shiftKey?a.previousNode():a.nextNode();if(o&&o.isConnected&&o!==e.body||(o=void 0,r.nodeToRestore=void 0),(!s||!vR(s,i))&&o){a.currentNode=o;do s=n.shiftKey?a.previousNode():a.nextNode();while(vR(s,i));(n.preventDefault(),n.stopPropagation(),s)?vL(s,!0):vR(o)?vL(o,!0):t.blur()}};return l||e.addEventListener("keydown",n,!0),()=>{l||e.removeEventListener("keydown",n,!0)}},[i,s,l]),mU(()=>{var e;let n=g_(i.current?i.current[0]:void 0);if(!s)return;let t=vJ.getTreeNode(i);if(t)return t.nodeToRestore=null!=(e=f.current)?e:void 0,()=>{let e=vJ.getTreeNode(i);if(!e)return;let t=e.nodeToRestore,r=((e=document)=>e.activeElement)(n);if(s&&t&&(r&&vR(r,i)||r===n.body&&vG(i))){let e=vJ.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=e.getTreeNode(i);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected)return void vU(n.nodeToRestore);n=n.parent}for(n=e.getTreeNode(i);n;){if(n.scopeRef&&n.scopeRef.current&&vJ.getTreeNode(n.scopeRef))return void vU(vW(n.scopeRef.current,!0));n=n.parent}}})}}},[i,s]),c=A,p=b,h=uj().useRef(p),(0,uB.useEffect)(()=>{h.current&&(vO=c,!vj(((e=document)=>e.activeElement)(g_(c.current?c.current[0]:void 0)),vO.current)&&c.current&&vV(c.current)),h.current=!1},[c]),(0,uB.useEffect)(()=>{let e=((e=document)=>e.activeElement)(g_(A.current?A.current[0]:void 0)),n=null;if(vj(e,A.current)){for(let t of vJ.traverse())t.scopeRef&&vj(e,t.scopeRef.current)&&(n=t);n===vJ.getTreeNode(A)&&(vO=n.scopeRef)}},[A]),mU(()=>()=>{var e,n,t;let r=null!=(t=null==(n=vJ.getTreeNode(A))||null==(e=n.parent)?void 0:e.scopeRef)?t:null;(A===vO||vF(A,vO))&&(!r||vJ.getTreeNode(r))&&(vO=r),vJ.removeTreeNode(A)},[A]);let x=(0,uB.useMemo)(()=>{var e;return e=A,{focusNext(n={}){var t;let r=e.current,{from:o,tabbable:a,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(g_(null!=(t=r[0])?t:void 0)),c=r[0].previousElementSibling,p=vq(vI(r),{tabbable:a,accept:s},r);p.currentNode=vj(l,r)?l:c;let u=p.nextNode();return!u&&i&&(p.currentNode=c,u=p.nextNode()),u&&vL(u,!0),u},focusPrevious(n={}){var t;let r=e.current,{from:o,tabbable:a,wrap:i,accept:s}=n,l=o||((e=document)=>e.activeElement)(g_(null!=(t=r[0])?t:void 0)),c=r[r.length-1].nextElementSibling,p=vq(vI(r),{tabbable:a,accept:s},r);p.currentNode=vj(l,r)?l:c;let u=p.previousNode();return!u&&i&&(p.currentNode=c,u=p.previousNode()),u&&vL(u,!0),u},focusFirst(n={}){let t=e.current,{tabbable:r,accept:o}=n,a=vq(vI(t),{tabbable:r,accept:o},t);a.currentNode=t[0].previousElementSibling;let i=a.nextNode();return i&&vL(i,!0),i},focusLast(n={}){let t=e.current,{tabbable:r,accept:o}=n,a=vq(vI(t),{tabbable:r,accept:o},t);a.currentNode=t[t.length-1].nextElementSibling;let i=a.previousNode();return i&&vL(i,!0),i}}},[]),C=(0,uB.useMemo)(()=>({focusManager:x,parentNode:k}),[k,x]);return uj().createElement(vP.Provider,{value:C},uj().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:v}),m,uj().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:$}))}function vI(e){return e[0].parentElement}function vB(e){let n=vJ.getTreeNode(vO);for(;n&&n.scopeRef!==e;){if(n.contain)return!1;n=n.parent}return!0}function vj(e,n){return!!e&&!!n&&n.some(n=>n.contains(e))}function vR(e,n=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of vJ.traverse(vJ.getTreeNode(n)))if(t&&vj(e,t.current))return!0;return!1}function vF(e,n){var t;let r=null==(t=vJ.getTreeNode(n))?void 0:t.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function vL(e,n=!1){if(null==e||n){if(null!=e)try{e.focus()}catch{}}else try{y_(e)}catch{}}function vW(e,n=!0){let t=e[0].previousElementSibling,r=vI(e),o=vq(r,{tabbable:n},e);o.currentNode=t;let a=o.nextNode();return n&&!a&&((o=vq(r=vI(e),{tabbable:!1},e)).currentNode=t,a=o.nextNode()),a}function vV(e,n=!0){vL(vW(e,n))}function vG(e){let n=vJ.getTreeNode(vO);for(;n&&n.scopeRef!==e;){if(n.nodeToRestore)return!1;n=n.parent}return(null==n?void 0:n.scopeRef)===e}function vU(e){e.dispatchEvent(new CustomEvent(vT,{bubbles:!0,cancelable:!0}))&&vL(e)}function vq(e,n,t){var r,o,a;let i=(null==n?void 0:n.tabbable)?gb:gy,s=g_((null==e?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null),l=(r=e||s,o=NodeFilter.SHOW_ELEMENT,a={acceptNode(e){var r;return(null==n||null==(r=n.from)?void 0:r.contains(e))?NodeFilter.FILTER_REJECT:i(e)&&function e(n,t){return"#comment"!==n.nodeName&&function(e){let n=gv(e);if(!(e instanceof n.HTMLElement)&&!(e instanceof n.SVGElement))return!1;let{display:t,visibility:r}=e.style,o="none"!==t&&"hidden"!==r&&"collapse"!==r;if(o){let{getComputedStyle:n}=e.ownerDocument.defaultView,{display:t,visibility:r}=n(e);o="none"!==t&&"hidden"!==r&&"collapse"!==r}return o}(n)&&!n.hasAttribute("hidden")&&!n.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==n.nodeName||!t||"SUMMARY"===t.nodeName||n.hasAttribute("open"))&&(!n.parentElement||e(n.parentElement,n))}(e)&&(!t||vj(e,t))&&(!(null==n?void 0:n.accept)||n.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}},s.createTreeWalker(r,o,a));return(null==n?void 0:n.from)&&(l.currentNode=n.from),l}function vH(e,n={}){return{focusNext(t={}){let r=e.current;if(!r)return null;let{from:o,tabbable:a=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(g_(r)),c=vq(r,{tabbable:a,accept:s});r.contains(l)&&(c.currentNode=l);let p=c.nextNode();return!p&&i&&(c.currentNode=r,p=c.nextNode()),p&&vL(p,!0),p},focusPrevious(t=n){let r=e.current;if(!r)return null;let{from:o,tabbable:a=n.tabbable,wrap:i=n.wrap,accept:s=n.accept}=t,l=o||((e=document)=>e.activeElement)(g_(r)),c=vq(r,{tabbable:a,accept:s});if(r.contains(l))c.currentNode=l;else{let e=vK(c);return e&&vL(e,!0),null!=e?e:null}let p=c.previousNode();if(!p&&i){c.currentNode=r;let e=vK(c);if(!e)return null;p=e}return p&&vL(p,!0),null!=p?p:null},focusFirst(t=n){let r=e.current;if(!r)return null;let{tabbable:o=n.tabbable,accept:a=n.accept}=t,i=vq(r,{tabbable:o,accept:a}).nextNode();return i&&vL(i,!0),i},focusLast(t=n){let r=e.current;if(!r)return null;let{tabbable:o=n.tabbable,accept:a=n.accept}=t,i=vK(vq(r,{tabbable:o,accept:a}));return i&&vL(i,!0),null!=i?i:null}}}function vK(e){let n,t;do(n=e.lastChild())&&(t=n);while(n);return t}class vY{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,t){let r=this.fastMap.get(null!=n?n:null);if(!r)return;let o=new vZ({scopeRef:e});r.addChild(o),o.parent=r,this.fastMap.set(e,o),t&&(o.nodeToRestore=t)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let n=this.fastMap.get(e);if(!n)return;let t=n.parent;for(let e of this.traverse())e!==n&&n.nodeToRestore&&e.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&vj(e.nodeToRestore,n.scopeRef.current)&&(e.nodeToRestore=n.nodeToRestore);let r=n.children;t&&(t.removeChild(n),r.size>0&&r.forEach(e=>t&&t.addChild(e))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e,n;let t=new vY;for(let r of this.traverse())t.addTreeNode(r.scopeRef,null!=(n=null==(e=r.parent)?void 0:e.scopeRef)?n:null,r.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new vZ({scopeRef:null}),this.fastMap.set(null,this.root)}}class vZ{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let vJ=new vY;function vX(e,n,t){let{direction:r}=yZ(),o=(0,uB.useMemo)(()=>vH(n),[n]),a=()=>{var e;if(!n.current)return;let t=null==(e=window.event)?void 0:e.target,r=vq(n.current,{tabbable:!0});if(t&&(r.currentNode=t,t=r.previousNode()),!t){let e;do(e=r.lastChild())&&(t=e);while(e)}for(;null==t?void 0:t.hasAttribute("data-placeholder");){let e=r.previousNode();if(e&&e.hasAttribute("data-placeholder"))t=e;else break}t&&t.focus()},{pressProps:i}=g6({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&a()},onPress(e){"mouse"!==e.pointerType&&a()}});return m7(i,{onKeyDown:a=>{if(a.currentTarget.contains(a.target)&&(a.altKey&&("ArrowDown"===a.key||"ArrowUp"===a.key)&&"setOpen"in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!t))switch(a.key){case"ArrowLeft":if(a.preventDefault(),a.stopPropagation(),"rtl"===r){if(n.current){let e=a.target,t=vQ(n.current,e.getBoundingClientRect().left,-1);t&&t.focus()}}else o.focusPrevious();break;case"ArrowRight":if(a.preventDefault(),a.stopPropagation(),"rtl"===r){if(n.current){let e=a.target,t=vQ(n.current,e.getBoundingClientRect().left,1);t&&t.focus()}}else o.focusNext()}}})}function vQ(e,n,t){let r=vq(e,{tabbable:!0}),o=r.nextNode(),a=null,i=1/0;for(;o;){let e=o.getBoundingClientRect().left-n,s=Math.abs(e);Math.sign(e)===t&&s<i&&(a=o,i=s),o=r.nextNode()}return a}function v0(e,n,t){let r=(0,uB.useRef)(n),o=mq(()=>{t&&t(r.current)});(0,uB.useEffect)(()=>{var n;let t=null==e||null==(n=e.current)?void 0:n.form;return null==t||t.addEventListener("reset",o),()=>{null==t||t.removeEventListener("reset",o)}},[e,o])}function v1(e){let{description:n,errorMessage:t,isInvalid:r,validationState:o}=e,{labelProps:a,fieldProps:i}=function(e){let{id:n,label:t,"aria-labelledby":r,"aria-label":o,labelElementType:a="label"}=e;n=m5(n);let i=m5(),s={};return t&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===a?n:void 0}),{labelProps:s,fieldProps:_d({id:n,"aria-label":o,"aria-labelledby":r})}}(e),s=m4([!!n,!!t,r,o]),l=m4([!!n,!!t,r,o]);return{labelProps:a,fieldProps:i=m7(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function v2(e,n,t){let{validationBehavior:r,focus:o}=e;mU(()=>{if("native"===r&&(null==t?void 0:t.current)&&!t.current.disabled){var e;let r,o=n.realtimeValidation.isInvalid?n.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(o),t.current.hasAttribute("title")||(t.current.title=""),n.realtimeValidation.isInvalid||n.updateValidation({isInvalid:!(e=t.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let a=mq(()=>{n.resetValidation()}),i=mq(e=>{var r,a;n.displayValidation.isInvalid||n.commitValidation();let i=null==t||null==(r=t.current)?void 0:r.form;!e.defaultPrevented&&t&&i&&function(e){for(let n=0;n<e.elements.length;n++){let t=e.elements[n];if(!t.validity.valid)return t}return null}(i)===t.current&&(o?o():null==(a=t.current)||a.focus(),yr="keyboard",yc("keyboard",null)),e.preventDefault()}),s=mq(()=>{n.commitValidation()});(0,uB.useEffect)(()=>{let e=null==t?void 0:t.current;if(!e)return;let n=e.form;return e.addEventListener("invalid",i),e.addEventListener("change",s),null==n||n.addEventListener("reset",a),()=>{e.removeEventListener("invalid",i),e.removeEventListener("change",s),null==n||n.removeEventListener("reset",a)}},[t,i,s,a,r])}let v3=new WeakMap,v5="__role_"+Date.now(),v4="__focusManager_"+Date.now();function v6(e,n,t){var r,o;let a,{isInvalid:i,validationErrors:s,validationDetails:l}=n.displayValidation,{labelProps:c,fieldProps:p,descriptionProps:u,errorMessageProps:d}=v1({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||s}),f=(0,uB.useRef)(null),{focusWithinProps:h}=yk({...e,onFocusWithin(t){var r;f.current=n.value,null==(r=e.onFocus)||r.call(e,t)},onBlurWithin:t=>{var r;n.confirmPlaceholder(),n.value!==f.current&&n.commitValidation(),null==(r=e.onBlur)||r.call(e,t)},onFocusWithinChange:e.onFocusChange}),m=b6((o=vM)&&o.__esModule?o.default:o,"@react-aria/datepicker"),g="hour"===n.maxGranularity?"selectedTimeDescription":"selectedDateDescription",y="hour"===n.maxGranularity?"time":"date",b=__(n.value?m.format(g,{[y]:n.formatValue({month:"long"})}):""),v="presentation"===e[v5]?p["aria-describedby"]:[b["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[v4],A=(0,uB.useMemo)(()=>$||vH(t),[$,t]),w=vX(n,t,"presentation"===e[v5]);v3.set(n,{ariaLabel:e["aria-label"],ariaLabelledBy:[c.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:A});let k=(0,uB.useRef)(e.autoFocus);a="presentation"===e[v5]?{role:"presentation"}:m7(p,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,uB.useEffect)(()=>{k.current&&A.focusFirst(),k.current=!1},[A]),v0(e.inputRef,n.value,n.setValue),v2({...e,focus(){A.focusFirst()}},n,e.inputRef);let x={type:"hidden",name:e.name,value:(null==(r=n.value)?void 0:r.toString())||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let C=gf(e);return{labelProps:{...c,onClick:()=>{A.focusFirst()}},fieldProps:m7(C,a,w,h,{onKeyDown(n){e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){e.onKeyUp&&e.onKeyUp(n)},style:{unicodeBidi:"isolate"}}),inputProps:x,descriptionProps:u,errorMessageProps:d,isInvalid:i,validationErrors:s,validationDetails:l}}var v7={};v7={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let v8={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},v9={...v8,customError:!0,valid:!1},$e={isInvalid:!1,validationDetails:v8,validationErrors:[]},$n=(0,uB.createContext)({}),$t="__formValidationState"+Date.now();function $r(e){if(e[$t]){let{realtimeValidation:n,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:a}=e[$t];return{realtimeValidation:n,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:a}}return function(e){let{isInvalid:n,validationState:t,name:r,value:o,builtinValidation:a,validate:i,validationBehavior:s="aria"}=e;t&&(n||(n="invalid"===t));let l=void 0!==n?{isInvalid:n,validationErrors:[],validationDetails:v9}:null,c=(0,uB.useMemo)(()=>i&&null!=o?$a(function(e,n){if("function"==typeof e){let t=e(n);if(t&&"boolean"!=typeof t)return $o(t)}return[]}(i,o)):null,[i,o]);(null==a?void 0:a.validationDetails.valid)&&(a=void 0);let p=(0,uB.useContext)($n),u=(0,uB.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>$o(p[e])):$o(p[r]):[],[p,r]),[d,f]=(0,uB.useState)(p),[h,m]=(0,uB.useState)(!1);p!==d&&(f(p),m(!1));let g=(0,uB.useMemo)(()=>$a(h?[]:u),[h,u]),y=(0,uB.useRef)($e),[b,v]=(0,uB.useState)($e),$=(0,uB.useRef)($e),[A,w]=(0,uB.useState)(!1);return(0,uB.useEffect)(()=>{if(!A)return;w(!1);let e=c||a||y.current;$i(e,$.current)||($.current=e,v(e))}),{realtimeValidation:l||g||c||a||$e,displayValidation:"native"===s?l||g||b:l||g||c||a||b,updateValidation(e){"aria"!==s||$i(b,e)?y.current=e:v(e)},resetValidation(){$i($e,$.current)||($.current=$e,v($e)),"native"===s&&w(!1),m(!0)},commitValidation(){"native"===s&&w(!0),m(!0)}}}(e)}function $o(e){return e?Array.isArray(e)?e:[e]:[]}function $a(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:v9}:null}function $i(e,n){return e===n||!!e&&!!n&&e.isInvalid===n.isInvalid&&e.validationErrors.length===n.validationErrors.length&&e.validationErrors.every((e,t)=>e===n.validationErrors[t])&&Object.entries(e.validationDetails).every(([e,t])=>n.validationDetails[e]===t)}function $s(...e){let n=new Set,t=!1,r={...v8};for(let o of e){for(let e of o.validationErrors)n.add(e);for(let e in t||(t=o.isInvalid),r)r[e]||(r[e]=o.validationDetails[e])}return r.valid=!t,{isInvalid:t,validationErrors:[...n],validationDetails:r}}let $l=new b0((ea=v7)&&ea.__esModule?ea.default:ea);function $c(){return"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US"}function $p(e,n,t,r,o){let a=null!=e&&null!=t&&e.compare(t)>0,i=null!=e&&null!=n&&0>e.compare(n),s=null!=e&&(null==r?void 0:r(e))||!1,l=a||i||s,c=[];if(l){let e=$c(),r=new b3(e,b0.getGlobalDictionaryForPackage("@react-stately/datepicker")||$l),l=new b8(e,$f({},o)),p=l.resolvedOptions().timeZone;i&&null!=n&&c.push(r.format("rangeUnderflow",{minValue:l.format(n.toDate(p))})),a&&null!=t&&c.push(r.format("rangeOverflow",{maxValue:l.format(t.toDate(p))})),s&&c.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:c,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let $u={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},$d={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function $f(e,n){var t;e={...n.shouldForceLeadingZeros?$d:$u,...e};let r=n.granularity||"minute",o=Object.keys(e),a=o.indexOf(null!=(t=n.maxGranularity)?t:"year");a<0&&(a=0);let i=o.indexOf(r);if(i<0&&(i=2),a>i)throw Error("maxGranularity must be greater than granularity");let s=o.slice(a,i+1).reduce((n,t)=>(n[t]=e[t],n),{});return null!=n.hourCycle&&(s.hour12=12===n.hourCycle),s.timeZone=n.timeZone||"UTC",("hour"===r||"minute"===r||"second"===r)&&n.timeZone&&!n.hideTimeZone&&(s.timeZoneName="short"),n.showEra&&0===a&&(s.era="short"),s}function $h(e){return e&&"hour"in e?e:new bb}function $m(e,n){return null===e?null:e?bT(e,n):void 0}function $g(e,n,t,r){if(e)return $m(e,t);let o=bT(bF(null!=r?r:bU()).set({hour:0,minute:0,second:0,millisecond:0}),t);return"year"===n||"month"===n||"day"===n?bM(o):r?o:bP(o)}function $y(e,n){let t=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&n&&!(n in e))throw Error("Invalid granularity "+n+" for value "+e.toString());let[o,a]=(0,uB.useState)([r,t]);return e&&(o[0]!==r||o[1]!==t)&&a([r,t]),n||(n=e?r:o[0]),[n,e?t:o[1]]}let $b=new b0({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en"),$_={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},$v={year:5,month:2,day:7,hour:2,minute:15,second:15},$$={dayperiod:"dayPeriod"};function $A(e){var n,t;let{locale:r,createCalendar:o,hideTimeZone:a,isDisabled:i=!1,isReadOnly:s=!1,isRequired:l=!1,minValue:c,maxValue:p,isDateUnavailable:u}=e,d=e.value||e.defaultValue||e.placeholderValue||null,[f,h]=$y(d,e.granularity),m=h||"UTC";if(d&&!(f in d))throw Error("Invalid granularity "+f+" for value "+d.toString());let g=(0,uB.useMemo)(()=>new b8(r),[r]),y=(0,uB.useMemo)(()=>o(g.resolvedOptions().calendar),[o,g]),[b,v]=vc(e.value,null!=(n=e.defaultValue)?n:null,e.onChange),$=(0,uB.useMemo)(()=>{var e;return null!=(e=$m(b,y))?e:null},[b,y]),[A,w]=(0,uB.useState)(()=>$g(e.placeholderValue,f,y,h)),k="gregory"===y.identifier&&"BC"===($||A).era,x=(0,uB.useMemo)(()=>{var n;return{granularity:f,maxGranularity:null!=(n=e.maxGranularity)?n:"year",timeZone:h,hideTimeZone:a,hourCycle:e.hourCycle,showEra:k,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,f,e.hourCycle,e.shouldForceLeadingZeros,h,a,k]),C=(0,uB.useMemo)(()=>$f({},x),[x]),E=(0,uB.useMemo)(()=>new b8(r,C),[r,C]),S=(0,uB.useMemo)(()=>E.resolvedOptions(),[E]),D=(0,uB.useMemo)(()=>E.formatToParts(new Date).filter(e=>$_[e.type]).reduce((e,n)=>(e[n.type]=!0,e),{}),[E]),[z,M]=(0,uB.useState)(()=>e.value||e.defaultValue?{...D}:{}),P=(0,uB.useRef)(null),T=(0,uB.useRef)(y);(0,uB.useEffect)(()=>{bB(y,T.current)||(T.current=y,w(n=>Object.keys(z).length>0?bT(n,y):$g(e.placeholderValue,f,y,h)))},[y,f,z,h,e.placeholderValue]),b&&Object.keys(z).length<Object.keys(D).length&&M(z={...D}),null==b&&Object.keys(z).length===Object.keys(D).length&&(M(z={}),w($g(e.placeholderValue,f,y,h)));let O=$&&Object.keys(z).length>=Object.keys(D).length?$:A,N=n=>{if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(z),r=Object.keys(D);null==n?(v(null),w($g(e.placeholderValue,f,y,h)),M({})):t.length>=r.length||t.length===r.length-1&&D.dayPeriod&&!z.dayPeriod&&"dayPeriod"!==P.current?v(n=bT(n,(null==d?void 0:d.calendar)||new y5)):w(n),P.current=null},I=(0,uB.useMemo)(()=>O.toDate(m),[O,m]),B=(0,uB.useMemo)(()=>(function(e,n,t,r,o,a,i,s){let l=["hour","minute","second"],c=t.formatToParts(e),p=[];for(let e of c){var u,d;let t=$_[e.type];"era"===e.type&&1===a.getEras().length&&(t=!1);let c=$_[e.type]&&!n[e.type],f=$_[e.type]?(u=e.type,d=e.value,"era"===u||"dayPeriod"===u?d:"year"===u||"month"===u||"day"===u?$b.getStringForLocale(u,i):"––"):null,h={type:$$[e.type]||e.type,text:c?f:e.value,...$w(o,e.type,r),isPlaceholder:c,placeholder:f,isEditable:t};"hour"===e.type?(p.push({type:"literal",text:"⁦",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1}),p.push(h),e.type===s&&p.push({type:"literal",text:"⁩",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):l.includes(e.type)&&e.type===s?(p.push(h),p.push({type:"literal",text:"⁩",...$w(o,"literal",r),isPlaceholder:!1,placeholder:"",isEditable:!1})):p.push(h)}return p})(I,z,E,S,O,y,r,f),[I,z,E,S,O,y,r,f]);D.era&&z.year&&!z.era?(z.era=!0,M({...z})):!D.era&&z.era&&(delete z.era,M({...z}));let j=e=>{z[e]=!0,"year"===e&&D.era&&(z.era=!0),M({...z})},R=(e,n)=>{if(z[e])N(function(e,n,t,r){switch(n){case"era":case"year":case"month":case"day":return e.cycle(n,t,{round:"year"===n})}if("hour"in e)switch(n){case"dayPeriod":{let n=e.hour;return e.set({hour:n>=12?n-12:n+12})}case"hour":case"minute":case"second":return e.cycle(n,t,{round:"hour"!==n,hourCycle:r.hour12?12:24})}throw Error("Unknown segment: "+n)}(O,e,n,S));else{j(e);let n=Object.keys(z),t=Object.keys(D);(n.length>=t.length||n.length===t.length-1&&D.dayPeriod&&!z.dayPeriod)&&N(O)}},F=(0,uB.useMemo)(()=>$p(b,c,p,u,x),[b,c,p,u,x]),L=$r({...e,value:b,builtinValidation:F}),W=L.displayValidation.isInvalid,V=e.validationState||(W?"invalid":null);return{...L,value:$,dateValue:I,calendar:y,setValue:N,segments:B,dateFormatter:E,validationState:V,isInvalid:W,granularity:f,maxGranularity:null!=(t=e.maxGranularity)?t:"year",isDisabled:i,isReadOnly:s,isRequired:l,increment(e){R(e,1)},decrement(e){R(e,-1)},incrementPage(e){R(e,$v[e]||1)},decrementPage(e){R(e,-($v[e]||1))},setSegment(e,n){j(e),N(function(e,n,t,r){switch(n){case"day":case"month":case"year":case"era":return e.set({[n]:t})}if("hour"in e&&"number"==typeof t)switch(n){case"dayPeriod":{let n=e.hour,r=n>=12;if(t>=12===r)return e;return e.set({hour:r?n-12:n+12})}case"hour":if(r.hour12){let n=e.hour>=12;n||12!==t||(t=0),n&&t<12&&(t+=12)}case"minute":case"second":return e.set({[n]:t})}throw Error("Unknown segment: "+n)}(O,e,n,S))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(z),t=Object.keys(D);n.length===t.length-1&&D.dayPeriod&&!z.dayPeriod&&(M(z={...D}),N(O.copy()))},clearSegment(n){delete z[n],P.current=n,M({...z});let t=$g(e.placeholderValue,f,y,h),r=O;if("dayPeriod"===n&&"hour"in O&&"hour"in t){let e=O.hour>=12,n=t.hour>=12;e&&!n?r=O.set({hour:O.hour-12}):!e&&n&&(r=O.set({hour:O.hour+12}))}else"hour"===n&&"hour"in O&&O.hour>=12&&z.dayPeriod?r=O.set({hour:t.hour+12}):n in O&&(r=O.set({[n]:t[n]}));v(null),N(r)},formatValue:e=>$?new b8(r,$f(e,x)).format(I):"",getDateFormatter:(e,n)=>new b8(e,$f({},{...x,...n}))}}function $w(e,n,t){switch(n){case"era":{let n=e.calendar.getEras();return{value:n.indexOf(e.era),minValue:0,maxValue:n.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1,maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1,maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(n){case"dayPeriod":return{value:12*(e.hour>=12),minValue:0,maxValue:12};case"hour":if(t.hour12){let n=e.hour>=12;return{value:e.hour,minValue:12*!!n,maxValue:n?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}let $k=(0,uB.createContext)(null),$x=(0,uB.createContext)(null),$C=(0,uB.createContext)(null),$E=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)($x),r=(0,uB.useContext)($C);return t||r?uj().createElement($D,{...e,ref:n}):uj().createElement($S,{...e,ref:n})}),$S=(0,uB.forwardRef)((e,n)=>{let[t,r]=gt({slot:e.slot},n,$k),{locale:o}=yZ(),a=$A({...t,locale:o,createCalendar:vn}),i=(0,uB.useRef)(null),{fieldProps:s,inputProps:l}=v6({...t,inputRef:i},a,r);return uj().createElement(m9,{values:[[$x,a],[vD,{...l,ref:i}],[vE,{...s,ref:r,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},uj().createElement($D,e))}),$D=(0,uB.forwardRef)((e,n)=>{let{className:t,children:r}=e,o=(0,uB.useContext)($x),a=(0,uB.useContext)($C),i=null!=o?o:a;return uj().createElement(uj().Fragment,null,uj().createElement(vS,{...e,ref:n,slot:e.slot||void 0,className:null!=t?t:"react-aria-DateInput",isInvalid:i.isInvalid,isDisabled:i.isDisabled},i.segments.map((e,n)=>(0,uB.cloneElement)(r(e),{key:n}))),uj().createElement(vz,null))}),$z=(0,uB.createContext)({});function $M({children:e}){let n=(0,uB.useMemo)(()=>({register:()=>{}}),[]);return uj().createElement(gq.Provider,{value:n},e)}uj().forwardRef(({children:e,...n},t)=>{let r=(0,uB.useRef)(!1),o=(0,uB.useContext)(gq);t=mV(t||(null==o?void 0:o.ref));let a=m7(o||{},{...n,ref:t,register(){r.current=!0,o&&o.register()}});return gZ(o,t),(0,uB.useEffect)(()=>{r.current||(r.current=!0)},[]),uj().createElement(gq.Provider,{value:a},e)});let $P=uj().createContext(null);function $T(e){var n;let t=m1(),{portalContainer:r=t?null:document.body,isExiting:o}=e,[a,i]=(0,uB.useState)(!1),s=(0,uB.useMemo)(()=>({contain:a,setContain:i}),[a,i]),{getContainer:l}=null!=(n=(0,uB.useContext)($z))?n:{};if(!e.portalContainer&&l&&(r=l()),!r)return null;let c=e.children;return e.disableFocusManagement||(c=uj().createElement(vN,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!o},c)),c=uj().createElement($P.Provider,{value:s},uj().createElement($M,null,c)),g2.createPortal(c,r)}let $O=(0,uB.createContext)(null),$N=(0,uB.createContext)(null),$I=(0,uB.forwardRef)(function(e,n){let t=e["aria-labelledby"];[e,n]=gt(e,n,$O);let{dialogProps:r,titleProps:o}=function(e,n){let t,r,{role:o="dialog"}=e,a=m4();a=e["aria-label"]?void 0:a;let i=(0,uB.useRef)(!1);return(0,uB.useEffect)(()=>{if(n.current&&!n.current.contains(document.activeElement)){y_(n.current);let e=setTimeout(()=>{document.activeElement===n.current&&(i.current=!0,n.current&&(n.current.blur(),y_(n.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[n]),mU(()=>{null==r||r(!0)},[r=null==(t=(0,uB.useContext)($P))?void 0:t.setContain]),{dialogProps:{...gf(e,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||a,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:a}}}({...e,"aria-labelledby":t},n),a=(0,uB.useContext)($N);r["aria-label"]||r["aria-labelledby"]||e["aria-labelledby"]&&(r["aria-labelledby"]=e["aria-labelledby"]);let i=ge({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==a?void 0:a.close)||(()=>{})}});return uj().createElement("section",{...gf(e),...r,...i,ref:n,slot:e.slot||void 0},uj().createElement(m9,{values:[[yI,{slots:{[m8]:{},title:{...o,level:2}}}],[yO,{slots:{[m8]:{},close:{onPress:()=>null==a?void 0:a.close()}}}]]},i.children))}),$B=(0,uB.createContext)(null),$j=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)($B);return(null==t?void 0:t.isInvalid)?uj().createElement($R,{...e,ref:n}):null}),$R=(0,uB.forwardRef)((e,n)=>{let t=(0,uB.useContext)($B),r=gf(e),o=ge({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===t.validationErrors.length?void 0:t.validationErrors.join(" "),values:t});return null==o.children?null:uj().createElement(yj,{slot:"errorMessage",...r,...o,ref:n})}),$F=(0,uB.createContext)(null),$L=(0,uB.createContext)({}),$W=yP(function(e,n){[e,n]=gt(e,n,$L);let{elementType:t="label",...r}=e;return uj().createElement(t,{className:"react-aria-Label",...r,ref:n})}),$V=(0,uB.createContext)({placement:"bottom"}),$G=new WeakMap,$U=[];function $q(e,n=-1/0,t=1/0){return Math.min(Math.max(e,n),t)}function $H(e,n){let t=e,r=n.toString(),o=r.indexOf("."),a=o>=0?r.length-o:0;if(a>0){let e=Math.pow(10,a);t=Math.round(t*e)/e}return t}function $K(e,n,t,r){n=Number(n),t=Number(t);let o=(e-(isNaN(n)?0:n))%r,a=$H(2*Math.abs(o)>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o,r);return isNaN(n)?!isNaN(t)&&a>t&&(a=Math.floor($H(t/r,r))*r):a<n?a=n:!isNaN(t)&&a>t&&(a=n+Math.floor($H((t-n)/r,r))*r),a=$H(a,r)}let $Y={top:"top",bottom:"top",left:"left",right:"left"},$Z={top:"bottom",bottom:"top",left:"right",right:"left"},$J={top:"left",left:"top"},$X={top:"height",left:"width"},$Q={width:"totalWidth",height:"totalHeight"},$0={},$1="u">typeof document?window.visualViewport:null;function $2(e){var n,t,r,o,a;let i=0,s=0,l=0,c=0,p=0,u=0,d={},f=(null!=(n=null==$1?void 0:$1.scale)?n:1)>1;if("BODY"===e.tagName){let n=document.documentElement;l=n.clientWidth,c=n.clientHeight,i=null!=(t=null==$1?void 0:$1.width)?t:l,s=null!=(r=null==$1?void 0:$1.height)?r:c,d.top=n.scrollTop||e.scrollTop,d.left=n.scrollLeft||e.scrollLeft,$1&&(p=$1.offsetTop,u=$1.offsetLeft)}else({width:i,height:s,top:p,left:u}=$7(e)),d.top=e.scrollTop,d.left=e.scrollLeft,l=i,c=s;return gO()&&("BODY"===e.tagName||"HTML"===e.tagName)&&f&&(d.top=0,d.left=0,p=null!=(o=null==$1?void 0:$1.pageTop)?o:0,u=null!=(a=null==$1?void 0:$1.pageLeft)?a:0),{width:i,height:s,totalWidth:l,totalHeight:c,scroll:d,top:p,left:u}}function $3(e,n,t,r,o,a,i){var s;let l=null!=(s=o.scroll[e])?s:0,c=r[$X[e]],p=r.scroll[$Y[e]]+a,u=c+r.scroll[$Y[e]]-a,d=n-l+i[e]-r[$Y[e]],f=n-l+t+i[e]-r[$Y[e]];return d<p?p-d:f>u?Math.max(u-f,p-d):0}function $5(e){if($0[e])return $0[e];let[n,t]=e.split(" "),r=$Y[n]||"right",o=$J[r];$Y[t]||(t="center");let a=$X[r],i=$X[o];return $0[e]={placement:n,crossPlacement:t,axis:r,crossAxis:o,size:a,crossSize:i},$0[e]}function $4(e,n,t,r,o,a,i,s,l,c){var p,u,d,f,h;let{placement:m,crossPlacement:g,axis:y,crossAxis:b,size:v,crossSize:$}=r,A={};A[b]=null!=(p=e[b])?p:0,"center"===g?A[b]+=((null!=(u=e[$])?u:0)-(null!=(d=t[$])?d:0))/2:g!==b&&(A[b]+=(null!=(f=e[$])?f:0)-(null!=(h=t[$])?h:0)),A[b]+=a;let w=e[b]-t[$]+l+c,k=e[b]+e[$]-l-c;if(A[b]=$q(A[b],w,k),m===y){let t=s?i[v]:n[$Q[v]];A[$Z[y]]=Math.floor(t-e[y]+o)}else A[y]=Math.floor(e[y]+e[v]+o);return A}function $6(e,n,t,r,o,a){var i,s,l;let{placement:c,axis:p,size:u}=a;return c===p?Math.max(0,t[p]-e[p]-(null!=(i=e.scroll[p])?i:0)+n[p]-(null!=(s=r[p])?s:0)-r[$Z[p]]-o):Math.max(0,e[u]+e[p]+e.scroll[p]-n[p]-t[p]-t[u]-(null!=(l=r[p])?l:0)-r[$Z[p]]-o)}function $7(e){let{top:n,left:t,width:r,height:o}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:i,clientTop:s,clientLeft:l}=document.documentElement;return{top:n+a-s,left:t+i-l,width:r,height:o}}function $8(e,n){let t,r=window.getComputedStyle(e);if("fixed"===r.position){let{top:n,left:r,width:o,height:a}=e.getBoundingClientRect();t={top:n,left:r,width:o,height:a}}else{t=$7(e);let r=$7(n),o=window.getComputedStyle(n);r.top+=(parseInt(o.borderTopWidth,10)||0)-n.scrollTop,r.left+=(parseInt(o.borderLeftWidth,10)||0)-n.scrollLeft,t.top-=r.top,t.left-=r.left}return t.top-=parseInt(r.marginTop,10)||0,t.left-=parseInt(r.marginLeft,10)||0,t}function $9(e){let n=window.getComputedStyle(e);return"none"!==n.transform||/transform|perspective/.test(n.willChange)||"none"!==n.filter||"paint"===n.contain||"backdropFilter"in n&&"none"!==n.backdropFilter||"WebkitBackdropFilter"in n&&"none"!==n.WebkitBackdropFilter}let Ae=new WeakMap;function An(e){let{ref:n,box:t,onResize:r}=e;(0,uB.useEffect)(()=>{let e=null==n?void 0:n.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)};else{let n=new window.ResizeObserver(e=>{e.length&&r()});return n.observe(e,{box:t}),()=>{e&&n.unobserve(e)}}},[r,n,t])}let At="u">typeof document?window.visualViewport:null;function Ar(e,n){if(e.button>0)return!1;if(e.target){let n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return!!n.current&&!e.composedPath().includes(n.current)}let Ao=[],Aa="u">typeof document&&window.visualViewport,Ai=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),As=0;function Al(e,n,t){let r=e.style[n];return e.style[n]=t,()=>{e.style[n]=r}}function Ac(e,n,t,r){return e.addEventListener(n,t,r),()=>{e.removeEventListener(n,t,r)}}function Ap(e){let n=document.scrollingElement||document.documentElement,t=e;for(;t&&t!==n;){let e=_w(t);if(e!==document.documentElement&&e!==document.body&&e!==t){let n=e.getBoundingClientRect().top,r=t.getBoundingClientRect().top;r>n+t.clientHeight&&(e.scrollTop+=r-n)}t=e.parentElement}}var Au={};function Ad(e){var n;let{onDismiss:t,...r}=e,o=_d(r,b6((n=Au)&&n.__esModule?n.default:n,"@react-aria/overlays").format("dismiss"));return uj().createElement(_m,null,uj().createElement("button",{...o,tabIndex:-1,onClick:()=>{t&&t()},style:{width:1,height:1}}))}function Af(e,n,t){mU(()=>{if(n&&e.current){if(!("getAnimations"in e.current))return void t();let n=e.current.getAnimations();if(0===n.length)return void t();let r=!1;return Promise.all(n.map(e=>e.finished)).then(()=>{r||(0,g2.flushSync)(()=>{t()})}).catch(()=>{}),()=>{r=!0}}},[e,n,t])}function Ah(e){let[n,t]=vc(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,uB.useCallback)(()=>{t(!0)},[t]),o=(0,uB.useCallback)(()=>{t(!1)},[t]),a=(0,uB.useCallback)(()=>{t(!n)},[t,n]);return{isOpen:n,setOpen:t,open:r,close:o,toggle:a}}Au={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let Am=(0,uB.createContext)(null),Ag=(0,uB.createContext)(null),Ay=(0,uB.forwardRef)(function(e,n){[e,n]=gt(e,n,Am);let t=(0,uB.useContext)($N),r=Ah(e),o=null==e.isOpen&&null==e.defaultOpen&&t?t:r,a=function(e,n){let[t,r]=(0,uB.useState)(n?"open":"closed");switch(t){case"open":n||r("exiting");break;case"closed":case"exiting":n&&r("open")}let o="exiting"===t;return Af(e,o,(0,uB.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),o}(n,o.isOpen)||e.isExiting||!1,i=(0,uB.useContext)(yM),{direction:s}=yZ();if(i){let n=e.children;return"function"==typeof n&&(n=n({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),uj().createElement(uj().Fragment,null,n)}return!o||o.isOpen||a?uj().createElement(Ab,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a,dir:s}):null});function Ab({state:e,isExiting:n,UNSTABLE_portalContainer:t,...r}){var o,a;let i=(0,uB.useRef)(null),[s,l]=(0,uB.useState)(0),c=(0,uB.useRef)(null),u=(0,uB.useContext)(Ag),d=u&&"SubmenuTrigger"===r.trigger;mU(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:f,underlayProps:h,arrowProps:m,placement:g}=function(e,n){let{triggerRef:t,popoverRef:r,groupRef:o,isNonModal:a,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:u,underlayProps:d}=function(e,n){let{onClose:t,shouldCloseOnBlur:r,isOpen:o,isDismissable:a=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e;(0,uB.useEffect)(()=>{if(o&&!Ao.includes(n))return Ao.push(n),()=>{let e=Ao.indexOf(n);e>=0&&Ao.splice(e,1)}},[o,n]);let l=()=>{Ao[Ao.length-1]===n&&t&&t()};!function(e){let{ref:n,onInteractOutside:t,isDisabled:r,onInteractOutsideStart:o}=e,a=(0,uB.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=mq(e=>{t&&Ar(e,n)&&(o&&o(e),a.current.isPointerDown=!0)}),s=mq(e=>{t&&t(e)});(0,uB.useEffect)(()=>{let e=a.current;if(r)return;let t=g_(n.current);if("u">typeof PointerEvent){let r=t=>{e.isPointerDown&&Ar(t,n)&&s(t),e.isPointerDown=!1};return t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerup",r,!0),()=>{t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerup",r,!0)}}},[n,r,i,s])}({ref:n,onInteractOutside:a&&o?e=>{(!s||s(e.target))&&(Ao[Ao.length-1]===n&&(e.stopPropagation(),e.preventDefault()),l())}:void 0,onInteractOutsideStart:e=>{(!s||s(e.target))&&Ao[Ao.length-1]===n&&(e.stopPropagation(),e.preventDefault())}});let{focusWithinProps:c}=yk({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||vR(e.relatedTarget,vO))&&(!s||s(e.relatedTarget))&&(null==t||t())}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),l())},...c},underlayProps:{onPointerDown:e=>{e.target===e.currentTarget&&e.preventDefault()}}}}({isOpen:n.isOpen,onClose:n.close,shouldCloseOnBlur:!0,isDismissable:!a||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},null!=o?o:r),{overlayProps:f,arrowProps:h,placement:m}=function(e){var n,t,r;let{direction:o}=yZ(),{arrowSize:a=0,targetRef:i,overlayRef:s,scrollRef:l=s,placement:c="bottom",containerPadding:p=12,shouldFlip:u=!0,boundaryElement:d="u">typeof document?document.body:null,offset:f=0,crossOffset:h=0,shouldUpdatePosition:m=!0,isOpen:g=!0,onClose:y,maxHeight:b,arrowBoundaryOffset:v=0}=e,[$,A]=(0,uB.useState)(null),w=[m,c,s.current,i.current,l.current,p,u,d,f,h,g,o,b,v,a],k=(0,uB.useRef)(null==At?void 0:At.scale);(0,uB.useEffect)(()=>{g&&(k.current=null==At?void 0:At.scale)},[g]);let x=(0,uB.useCallback)(()=>{var e,n,t,r,y,$;if(!1===m||!g||!s.current||!i.current||!d||(null==At?void 0:At.scale)!==k.current)return;let w=null;if(l.current&&l.current.contains(document.activeElement)){let r=null==(e=document.activeElement)?void 0:e.getBoundingClientRect(),o=l.current.getBoundingClientRect();(w={type:"top",offset:(null!=(n=null==r?void 0:r.top)?n:0)-o.top}).offset>o.height/2&&(w.type="bottom",w.offset=(null!=(t=null==r?void 0:r.bottom)?t:0)-o.bottom)}let x=s.current;!b&&s.current&&(x.style.top="0px",x.style.bottom="",x.style.maxHeight=(null!=(y=null==(r=window.visualViewport)?void 0:r.height)?y:window.innerHeight)+"px");let C=function(e){var n,t,r,o;let a,{placement:i,targetNode:s,overlayNode:l,scrollNode:c,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:h,maxHeight:m,arrowSize:g=0,arrowBoundaryOffset:y=0}=e,b=l instanceof HTMLElement?function(e){let n=e.offsetParent;if(n&&n===document.body&&"static"===window.getComputedStyle(n).position&&!$9(n)&&(n=document.documentElement),null==n)for(n=e.parentElement;n&&!$9(n);)n=n.parentElement;return n||document.documentElement}(l):document.documentElement,v=b===document.documentElement,$=window.getComputedStyle(b).position,A=v?$7(s):$8(s,b);if(!v){let{marginTop:e,marginLeft:n}=window.getComputedStyle(s);A.top+=parseInt(e,10)||0,A.left+=parseInt(n,10)||0}let w=$7(l),k={top:parseInt((a=window.getComputedStyle(l)).marginTop,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0,right:parseInt(a.marginRight,10)||0};w.width+=(null!=(n=k.left)?n:0)+(null!=(t=k.right)?t:0),w.height+=(null!=(r=k.top)?r:0)+(null!=(o=k.bottom)?o:0);let x={top:c.scrollTop,left:c.scrollLeft,width:c.scrollWidth,height:c.scrollHeight},C=$2(d),E=$2(b),S="BODY"===d.tagName?$7(b):$8(b,d);return"HTML"===b.tagName&&"BODY"===d.tagName&&(E.scroll.top=0,E.scroll.left=0),function(e,n,t,r,o,a,i,s,l,c,p,u,d,f,h,m){var g,y,b,v,$,A,w,k,x,C,E,S,D,z;let M,P,T,O=$5(e),{size:N,crossAxis:I,crossSize:B,placement:j,crossPlacement:R}=O,F=$4(n,s,t,O,p,u,c,d,h,m),L=p,W=$6(s,c,n,o,a+p,O);if(i&&r[N]>W){let e=$5(`${$Z[j]} ${R}`),r=$4(n,s,t,e,p,u,c,d,h,m);$6(s,c,n,o,a+p,e)>W&&(O=e,F=r,L=p)}let V="bottom";"top"===O.axis?"top"===O.placement?V="top":"bottom"===O.placement&&(V="bottom"):"top"===O.crossAxis&&("top"===O.crossPlacement?V="bottom":"bottom"===O.crossPlacement&&(V="top"));let G=$3(I,F[I],t[B],s,l,a,c);F[I]+=G;let U=($=F,A=t.height,w=V,M=d?c.height:s[$Q.height],P=null!=$.top?c.top+$.top:c.top+(M-(null!=(k=$.bottom)?k:0)-A),T="top"!==w?Math.max(0,s.height+s.top+(null!=(x=s.scroll.top)?x:0)-P-((null!=(C=o.top)?C:0)+(null!=(E=o.bottom)?E:0)+a)):Math.max(0,P+A-(s.top+(null!=(S=s.scroll.top)?S:0))-((null!=(D=o.top)?D:0)+(null!=(z=o.bottom)?z:0)+a)),Math.min(s.height-2*a,T));f&&f<U&&(U=f),t.height=Math.min(t.height,U),G=$3(I,(F=$4(n,s,t,O,L,u,c,d,h,m))[I],t[B],s,l,a,c),F[I]+=G;let q={},H=n[I]+.5*n[B]-F[I]-o[$Y[I]],K=h/2+m,Y="left"===$Y[I]?(null!=(g=o.left)?g:0)+(null!=(y=o.right)?y:0):(null!=(b=o.top)?b:0)+(null!=(v=o.bottom)?v:0),Z=t[B]-Y-h/2-m,J=$q(H,n[I]+h/2-(F[I]+o[$Y[I]]),n[I]+n[B]-h/2-(F[I]+o[$Y[I]]));return q[I]=$q(J,K,Z),{position:F,maxHeight:U,arrowOffsetLeft:q.left,arrowOffsetTop:q.top,placement:O.placement}}(i,A,w,x,k,p,u,C,E,S,f,h,!!$&&"static"!==$,m,g,y)}({placement:($=c,"rtl"===o?$.replace("start","right").replace("end","left"):$.replace("start","left").replace("end","right")),overlayNode:s.current,targetNode:i.current,scrollNode:l.current||s.current,padding:p,shouldFlip:u,boundaryElement:d,offset:f,crossOffset:h,maxHeight:b,arrowSize:a,arrowBoundaryOffset:v});if(C.position){if(x.style.top="",x.style.bottom="",x.style.left="",x.style.right="",Object.keys(C.position).forEach(e=>x.style[e]=C.position[e]+"px"),x.style.maxHeight=null!=C.maxHeight?C.maxHeight+"px":"",w&&document.activeElement&&l.current){let e=document.activeElement.getBoundingClientRect(),n=l.current.getBoundingClientRect(),t=e[w.type]-n[w.type];l.current.scrollTop+=t-w.offset}A(C)}},w);mU(x,w),mU(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r=x]),An({ref:s,onResize:x}),An({ref:i,onResize:x});let C=(0,uB.useRef)(!1);mU(()=>{let e,n=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),x()},t=()=>{C.current&&n()};return null==At||At.addEventListener("resize",n),null==At||At.addEventListener("scroll",t),()=>{null==At||At.removeEventListener("resize",n),null==At||At.removeEventListener("scroll",t)}},[x]);let E=(0,uB.useCallback)(()=>{C.current||null==y||y()},[y,C]);return!function(e){let{triggerRef:n,isOpen:t,onClose:r}=e;(0,uB.useEffect)(()=>{if(!t||null===r)return;let e=e=>{let t=e.target;if(!n.current||t instanceof Node&&!t.contains(n.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let o=r||Ae.get(n.current);o&&o()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[t,r,n])}({triggerRef:i,isOpen:g,onClose:y&&E}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...null==$?void 0:$.position,maxHeight:null!=(n=null==$?void 0:$.maxHeight)?n:"100vh"}},placement:null!=(t=null==$?void 0:$.placement)?t:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:null==$?void 0:$.arrowOffsetLeft,top:null==$?void 0:$.arrowOffsetTop}},updatePosition:x}}({...l,targetRef:t,overlayRef:r,isOpen:n.isOpen,onClose:a&&!c?n.close:null});return!function(e={}){let{isDisabled:n}=e;mU(()=>{if(!n){let e,n,t,r;return 1==++As&&(p=gT()?(t=null,r=mG(Ac(document,"touchstart",t=>{((e=_w(t.target,!0))!==document.documentElement||e!==document.body)&&e instanceof HTMLElement&&"auto"===window.getComputedStyle(e).overscrollBehavior&&(n=Al(e,"overscrollBehavior","contain"))},{passive:!1,capture:!0}),Ac(document,"touchmove",n=>{e&&e!==document.documentElement&&e!==document.body?e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&n.preventDefault():n.preventDefault()},{passive:!1,capture:!0}),Ac(document,"touchend",()=>{n&&n()},{passive:!1,capture:!0}),Ac(document,"focus",e=>{var n;let r=e.target;((n=r)instanceof HTMLInputElement&&!Ai.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable)&&((()=>{if(t)return;let e=window.pageXOffset,n=window.pageYOffset;t=mG(Ac(window,"scroll",()=>{window.scrollTo(0,0)}),Al(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Al(document.documentElement,"overflow","hidden"),Al(document.body,"marginTop",`-${n}px`),()=>{window.scrollTo(e,n)}),window.scrollTo(0,0)})(),r.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{r.style.transform="",Aa&&(Aa.height<window.innerHeight?requestAnimationFrame(()=>{Ap(r)}):Aa.addEventListener("resize",()=>Ap(r),{once:!0}))}))},!0)),()=>{null==n||n(),null==t||t(),r()}):mG(Al(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Al(document.documentElement,"overflow","hidden"))),()=>{0==--As&&p()}}},[n])}({isDisabled:a||!n.isOpen}),mU(()=>{if(n.isOpen&&r.current){if(!a)return function(e,n=document.body){let t=new Set(e),r=new Set,o=e=>{for(let n of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(n);let n=e=>{if(t.has(e)||e.parentElement&&r.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let n of t)if(e.contains(n))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n}),i=n(e);if(i===NodeFilter.FILTER_ACCEPT&&a(e),i!==NodeFilter.FILTER_REJECT){let e=o.nextNode();for(;null!=e;)a(e),e=o.nextNode()}},a=e=>{var n;let t=null!=(n=$G.get(e))?n:0;("true"!==e.getAttribute("aria-hidden")||0!==t)&&(0===t&&e.setAttribute("aria-hidden","true"),r.add(e),$G.set(e,t+1))};$U.length&&$U[$U.length-1].disconnect(),o(n);let i=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&0!==n.addedNodes.length&&![...t,...r].some(e=>e.contains(n.target))){for(let e of n.removedNodes)e instanceof Element&&(t.delete(e),r.delete(e));for(let e of n.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===e.dataset.liveAnnouncer||"true"===e.dataset.reactAriaTopLayer)?t.add(e):e instanceof Element&&o(e)}});i.observe(n,{childList:!0,subtree:!0});let s={visibleNodes:t,hiddenNodes:r,observe(){i.observe(n,{childList:!0,subtree:!0})},disconnect(){i.disconnect()}};return $U.push(s),()=>{for(let e of(i.disconnect(),r)){let n=$G.get(e);null!=n&&(1===n?(e.removeAttribute("aria-hidden"),$G.delete(e)):$G.set(e,n-1))}s===$U[$U.length-1]?($U.pop(),$U.length&&$U[$U.length-1].observe()):$U.splice($U.indexOf(s),1)}}([null!=(t=null==o?void 0:o.current)?t:r.current]);var e,t,i=null!=(e=null==o?void 0:o.current)?e:r.current;let n=$U[$U.length-1];return n&&!n.visibleNodes.has(i)?(n.visibleNodes.add(i),()=>{n.visibleNodes.delete(i)}):void 0}},[a,n.isOpen,r,o]),{popoverProps:m7(u,f),arrowProps:h,underlayProps:d,placement:m}}({...r,offset:null!=(o=r.offset)?o:8,arrowSize:s,groupRef:d?u:c},e),y=r.popoverRef,b=function(e,n=!0){let[t,r]=(0,uB.useState)(!0),o=t&&n;return mU(()=>{if(o&&e.current&&"getAnimations"in e.current)for(let n of e.current.getAnimations())n instanceof CSSTransition&&n.cancel()},[e,o]),Af(e,o,(0,uB.useCallback)(()=>r(!1),[])),o}(y,!!g)||r.isEntering||!1,v=ge({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:b,isExiting:n}}),$=!r.isNonModal||"SubmenuTrigger"===r.trigger,[A,w]=(0,uB.useState)(!1);mU(()=>{y.current&&w($&&!y.current.querySelector("[role=dialog]"))},[y,$]),(0,uB.useEffect)(()=>{A&&y.current&&!y.current.contains(document.activeElement)&&y_(y.current)},[A,y]);let k={...f.style,...v.style},x=uj().createElement("div",{...m7(gf(r),f),...v,role:A?"dialog":void 0,tabIndex:A?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:y,slot:r.slot||void 0,style:k,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":b||void 0,"data-exiting":n||void 0},!r.isNonModal&&uj().createElement(Ad,{onDismiss:e.close}),uj().createElement($V.Provider,{value:{...m,placement:g,ref:i}},v.children),uj().createElement(Ad,{onDismiss:e.close}));return d?uj().createElement($T,{...r,shouldContainFocus:A,isExiting:n,portalContainer:null!=(a=null!=t?t:null==u?void 0:u.current)?a:void 0},x):uj().createElement($T,{...r,shouldContainFocus:A,isExiting:n,portalContainer:t},!r.isNonModal&&e.isOpen&&uj().createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),uj().createElement("div",{ref:c,style:{display:"contents"}},uj().createElement(Ag.Provider,{value:c},x)))}function A_(e){return(null==e?void 0:e.start)!=null&&null!=e.end}let Av=(0,uB.createContext)(null),A$=(0,uB.createContext)(null),AA=(0,uB.createContext)(null),Aw=(0,uB.createContext)(null),Ak=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,Av);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",i=function(e){var n;let t=Ah(e),[r,o]=vc(e.value,e.defaultValue||null,e.onChange),a=r||e.placeholderValue||null,[i,s]=$y(a,e.granularity),l=null!=r?r.toDate(null!=s?s:"UTC"):null,c="hour"===i||"minute"===i||"second"===i,p=null==(n=e.shouldCloseOnSelect)||n,[u,d]=(0,uB.useState)(null),[f,h]=(0,uB.useState)(null);if(r&&(u=r,"hour"in r&&(f=r)),a&&!(i in a))throw Error("Invalid granularity "+i+" for value "+a.toString());let m=(null==r?void 0:r.calendar.identifier)==="gregory"&&"BC"===r.era,g=(0,uB.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:m}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,m]),{minValue:y,maxValue:b,isDateUnavailable:v}=e,$=(0,uB.useMemo)(()=>$p(r,y,b,v,g),[r,y,b,v,g]),A=$r({...e,value:r,builtinValidation:$}),w=A.displayValidation.isInvalid,k=e.validationState||(w?"invalid":null),x=(e,n)=>{o("timeZone"in n?n.set(bM(e)):bP(e,n)),d(null),h(null),A.commitValidation()};return{...A,value:r,setValue:o,dateValue:u,timeValue:f,setDateValue:n=>{let r="function"==typeof p?p():p;c?f||r?x(n,f||$h(e.defaultValue||e.placeholderValue)):d(n):(o(n),A.commitValidation()),r&&t.setOpen(!1)},setTimeValue:e=>{u&&e?x(u,e):h(e)},granularity:i,hasTime:c,...t,setOpen(n){!n&&!r&&u&&c&&x(u,f||$h(e.defaultValue||e.placeholderValue)),t.setOpen(n)},validationState:k,isInvalid:w,formatValue:(e,n)=>l?new b8(e,$f(n,g)).format(l):"",getDateFormatter:(e,n)=>new b8(e,$f({},{...g,...n}))}}({...e,validationBehavior:a}),s=(0,uB.useRef)(null),[l,c]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,fieldProps:d,buttonProps:f,dialogProps:h,calendarProps:m,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var r;let o=m5(),a=m5(),i=m5(),s=b6((r=vM)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:c,validationDetails:p}=n.displayValidation,{labelProps:u,fieldProps:d,descriptionProps:f,errorMessageProps:h}=v1({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||c}),m=vX(n,t),g=d["aria-labelledby"]||d.id,{locale:y}=yZ(),b=n.formatValue(y,{month:"long"}),v=__(b?s.format("selectedDateDescription",{date:b}):""),$=[v["aria-describedby"],d["aria-describedby"]].filter(Boolean).join(" ")||void 0,A=gf(e),w=(0,uB.useMemo)(()=>vH(t),[t]),k=(0,uB.useRef)(!1),{focusWithinProps:x}=yk({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(a);if(!(null==t?void 0:t.contains(n.relatedTarget))){var r,o;k.current=!1,null==(r=e.onBlur)||r.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!k.current){var t,r;k.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(r=e.onFocusChange)||r.call(e,!0)}}});return{groupProps:m7(A,m,d,v,x,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":$,onKeyDown(t){!n.isOpen&&e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){!n.isOpen&&e.onKeyUp&&e.onKeyUp(t)}}),labelProps:{...u,onClick:()=>{w.focusFirst()}},fieldProps:{...d,id:i,[v5]:"presentation","aria-describedby":$,value:n.value,onChange:n.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[$t]:n,autoFocus:e.autoFocus,name:e.name},descriptionProps:f,errorMessageProps:h,buttonProps:{...v,id:o,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${o} ${g}`,"aria-describedby":$,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:a,"aria-labelledby":`${o} ${g}`},calendarProps:{autoFocus:!0,value:n.dateValue,onChange:n.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:n.dateValue?void 0:e.placeholderValue,isInvalid:n.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(n.displayValidation):e.errorMessage||n.displayValidation.validationErrors.join(" ")},isInvalid:l,validationErrors:c,validationDetails:p}}({...go(e),label:c,validationBehavior:a},i,s),[v,$]=(0,uB.useState)(null),A=(0,uB.useCallback)(()=>{s.current&&$(s.current.offsetWidth+"px")},[]);An({ref:s,onResize:A});let{focusProps:w,isFocused:k,isFocusVisible:x}=yx({within:!0}),C=ge({...e,values:{state:i,isFocusWithin:k,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),E=gf(e);return delete E.id,uj().createElement(m9,{values:[[AA,i],[vE,{...p,ref:s,isInvalid:i.isInvalid}],[$k,d],[yO,{...f,isPressed:i.isOpen}],[$L,{...u,ref:l,elementType:"span"}],[vm,m],[$N,i],[Am,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":v}}],[$O,h],[yB,{slots:{description:g,errorMessage:y}}],[$B,b]]},uj().createElement("div",{...w,...E,...C,ref:n,slot:e.slot||void 0,"data-focus-within":k||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),Ax=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,A$);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",i=function(e){var n,t,r;let o=Ah(e),[a,i]=vc(e.value,e.defaultValue||null,e.onChange),[s,l]=(0,uB.useState)(()=>a||{start:null,end:null});null==a&&s.start&&s.end&&l(s={start:null,end:null});let c=a||s,p=e=>{l(e||{start:null,end:null}),A_(e)?i(e):i(null)},[u,d]=$y((null==c?void 0:c.start)||(null==c?void 0:c.end)||e.placeholderValue||null,e.granularity),f="hour"===u||"minute"===u||"second"===u,h=null==(r=e.shouldCloseOnSelect)||r,[m,g]=(0,uB.useState)(null),[y,b]=(0,uB.useState)(null);c&&A_(c)&&(m=c,"hour"in c.start&&(y=c));let v=(e,n)=>{p({start:"timeZone"in n.start?n.start.set(bM(e.start)):bP(e.start,n.start),end:"timeZone"in n.end?n.end.set(bM(e.end)):bP(e.end,n.end)}),g(null),b(null),D.commitValidation()},$=n=>{let t="function"==typeof h?h():h;f?A_(n)&&(null==y?void 0:y.start)&&(null==y?void 0:y.end)?v(n,{start:(null==y?void 0:y.start)||$h(e.placeholderValue),end:(null==y?void 0:y.end)||$h(e.placeholderValue)}):g(n):A_(n)?(p(n),D.commitValidation()):g(n),t&&o.setOpen(!1)},A=e=>{A_(m)&&A_(e)?v(m,e):b(e)},w=(null==c||null==(n=c.start)?void 0:n.calendar.identifier)==="gregory"&&"BC"===c.start.era||(null==c||null==(t=c.end)?void 0:t.calendar.identifier)==="gregory"&&"BC"===c.end.era,k=(0,uB.useMemo)(()=>({granularity:u,timeZone:d,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,d,e.hideTimeZone,w]),{minValue:x,maxValue:C,isDateUnavailable:E}=e,S=(0,uB.useMemo)(()=>{var e,n;let t;return t=$s($p(null!=(e=null==c?void 0:c.start)?e:null,x,C,E,k),$p(null!=(n=null==c?void 0:c.end)?n:null,x,C,E,k)),(null==c?void 0:c.end)!=null&&null!=c.start&&0>c.end.compare(c.start)&&(t=$s(t,{isInvalid:!0,validationErrors:[(b0.getGlobalDictionaryForPackage("@react-stately/datepicker")||$l).getStringForLocale("rangeReversed",$c())],validationDetails:{...v8,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[c,x,C,E,k]),D=$r({...e,value:a,name:(0,uB.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),z=D.displayValidation.isInvalid,M=e.validationState||(z?"invalid":null);return{...D,value:c,setValue:p,dateRange:m,timeRange:y,granularity:u,hasTime:f,setDate(e,n){var t,r;"start"===e?$({start:n,end:null!=(t=null==m?void 0:m.end)?t:null}):$({start:null!=(r=null==m?void 0:m.start)?r:null,end:n})},setTime(e,n){var t,r;"start"===e?A({start:n,end:null!=(t=null==y?void 0:y.end)?t:null}):A({start:null!=(r=null==y?void 0:y.start)?r:null,end:n})},setDateTime(e,n){var t,r;"start"===e?p({start:n,end:null!=(t=null==c?void 0:c.end)?t:null}):p({start:null!=(r=null==c?void 0:c.start)?r:null,end:n})},setDateRange:$,setTimeRange:A,...o,setOpen(n){!n&&!((null==c?void 0:c.start)&&(null==c?void 0:c.end))&&A_(m)&&f&&v(m,{start:(null==y?void 0:y.start)||$h(e.placeholderValue),end:(null==y?void 0:y.end)||$h(e.placeholderValue)}),o.setOpen(n)},validationState:M,isInvalid:z,formatValue(n,t){let r;if(!c||!c.start||!c.end)return null;let o="timeZone"in c.start?c.start.timeZone:void 0,a=e.granularity||(c.start&&"minute"in c.start?"minute":"day"),i="timeZone"in c.end?c.end.timeZone:void 0,s=e.granularity||(c.end&&"minute"in c.end?"minute":"day"),l=$f(t,{granularity:a,timeZone:o,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===c.start.calendar.identifier&&"BC"===c.start.era||"gregory"===c.end.calendar.identifier&&"BC"===c.end.era}),p=c.start.toDate(o||"UTC"),u=c.end.toDate(i||"UTC"),d=new b8(n,l);if(o===i&&a===s&&0!==c.start.compare(c.end)){try{let e=d.formatRangeToParts(p,u),n=-1;for(let t=0;t<e.length;t++){let r=e[t];if("shared"===r.source&&"literal"===r.type)n=t;else if("endRange"===r.source)break}let t="",r="";for(let o=0;o<e.length;o++)o<n?t+=e[o].value:o>n&&(r+=e[o].value);return{start:t,end:r}}catch{}r=d}else r=new b8(n,$f(t,{granularity:s,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(p),end:r.format(u)}},getDateFormatter:(e,n)=>new b8(e,$f({},{...k,...n}))}}({...e,validationBehavior:a}),s=(0,uB.useRef)(null),[l,c]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:p,labelProps:u,startFieldProps:d,endFieldProps:f,buttonProps:h,dialogProps:m,calendarProps:g,descriptionProps:y,errorMessageProps:b,...v}=function(e,n,t){var r,o,a,i,s,l;let c=b6((l=vM)&&l.__esModule?l.default:l,"@react-aria/datepicker"),{isInvalid:p,validationErrors:u,validationDetails:d}=n.displayValidation,{labelProps:f,fieldProps:h,descriptionProps:m,errorMessageProps:g}=v1({...e,labelElementType:"span",isInvalid:p,errorMessage:e.errorMessage||u}),y=h["aria-labelledby"]||h.id,{locale:b}=yZ(),v=n.formatValue(b,{month:"long"}),$=__(v?c.format("selectedRangeDescription",{startDate:v.start,endDate:v.end}):""),A={"aria-label":c.format("startDate"),"aria-labelledby":y},w={"aria-label":c.format("endDate"),"aria-labelledby":y},k=m5(),x=m5(),C=vX(n,t),E=[$["aria-describedby"],h["aria-describedby"]].filter(Boolean).join(" ")||void 0,S=(0,uB.useMemo)(()=>vH(t,{accept:e=>e.id!==k}),[t,k]),D={[v4]:S,[v5]:"presentation","aria-describedby":E,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},z=gf(e),M=(0,uB.useRef)(!1),{focusWithinProps:P}=yk({...e,isDisabled:n.isOpen,onBlurWithin:n=>{let t=document.getElementById(x);if(!(null==t?void 0:t.contains(n.relatedTarget))){var r,o;M.current=!1,null==(r=e.onBlur)||r.call(e,n),null==(o=e.onFocusChange)||o.call(e,!1)}},onFocusWithin:n=>{if(!M.current){var t,r;M.current=!0,null==(t=e.onFocus)||t.call(e,n),null==(r=e.onFocusChange)||r.call(e,!0)}}}),T=(0,uB.useRef)($e),O=(0,uB.useRef)($e);return{groupProps:m7(z,C,h,$,P,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":E,onKeyDown(t){!n.isOpen&&e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){!n.isOpen&&e.onKeyUp&&e.onKeyUp(t)}}),labelProps:{...f,onClick:()=>{S.focusFirst()}},buttonProps:{...$,id:k,"aria-haspopup":"dialog","aria-label":c.format("calendar"),"aria-labelledby":`${k} ${y}`,"aria-describedby":E,"aria-expanded":n.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>n.setOpen(!0)},dialogProps:{id:x,"aria-labelledby":`${k} ${y}`},startFieldProps:{...A,...D,value:null!=(i=null==(r=n.value)?void 0:r.start)?i:null,onChange:e=>n.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,[$t]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){T.current=e,n.updateValidation($s(e,O.current))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},endFieldProps:{...w,...D,value:null!=(s=null==(o=n.value)?void 0:o.end)?s:null,onChange:e=>n.setDateTime("end",e),name:e.endName,[$t]:{realtimeValidation:n.realtimeValidation,displayValidation:n.displayValidation,updateValidation(e){O.current=e,n.updateValidation($s(T.current,e))},resetValidation:n.resetValidation,commitValidation:n.commitValidation}},descriptionProps:m,errorMessageProps:g,calendarProps:{autoFocus:!0,value:(null==(a=n.dateRange)?void 0:a.start)&&n.dateRange.end?n.dateRange:null,onChange:n.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:n.dateRange?void 0:e.placeholderValue,isInvalid:n.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(n.displayValidation):e.errorMessage||n.displayValidation.validationErrors.join(" ")},isInvalid:p,validationErrors:u,validationDetails:d}}({...go(e),label:c,validationBehavior:a},i,s),[$,A]=(0,uB.useState)(null),w=(0,uB.useCallback)(()=>{s.current&&A(s.current.offsetWidth+"px")},[]);An({ref:s,onResize:w});let{focusProps:k,isFocused:x,isFocusVisible:C}=yx({within:!0}),E=ge({...e,values:{state:i,isFocusWithin:x,isFocusVisible:C,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),S=gf(e);return delete S.id,uj().createElement(m9,{values:[[Aw,i],[vE,{...p,ref:s,isInvalid:i.isInvalid}],[yO,{...h,isPressed:i.isOpen}],[$L,{...u,ref:l,elementType:"span"}],[vg,g],[$N,i],[Am,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":$}}],[$O,m],[$k,{slots:{start:d,end:f}}],[yB,{slots:{description:y,errorMessage:b}}],[$B,v]]},uj().createElement("div",{...k,...S,...E,ref:n,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":C||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function AC(e){return uj().createElement(yY,e)}function AE(e,n,t=!1){if(null==e)return t?e:void 0;if("string"==typeof e&&!e)return t?null:void 0;if(e instanceof bg||e instanceof bv||e instanceof bA)return n?bT(e,n):e;{let t=fh()(e).toDate(),r=new bg(t.getFullYear(),t.getMonth()+1,t.getDate());return n?bT(r,n):r}}function AS(e){if(e)return e.toDate(bU())}function AD(){let e=window.i18next.language;return"ht"===(e=e.replaceAll("_","-"))&&(e="fr-HT"),e}if("u">typeof navigator){let e=navigator;ei=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;ei=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var Az=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(ei||"en-US"),AM=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},AP={};for(let e=1;e<100;e++)AP[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var AT={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},AO="[1234567890一二三四五六七八九〇\\d]",AN={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},AI={},AB={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},Aj={zone:AB,year:AP,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},AR={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(AB).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},AF={...AR,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},AL={},AW=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(n=Az){return AL[n.toLowerCase()]||(AL[n.toLowerCase()]=new e(n)),AL[n.toLowerCase()]}constructor(e=Az){this.locale=e,this.lookups={...Aj},this.vars={...AR};let n=new Intl.NumberFormat(this.locale);this.numberingSystem=n.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let n=parseInt(e,10);if(!isNaN(n))return n}let n="";for(let t=0;t<e.length;t++)n+=String(this.lookups.digit[e[t]]);return parseInt(n,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let n=e.slice(0,3);return 1===n.length?100*this.toInt(n):2===n.length?10*this.toInt(n):this.toInt(n)}monthNameToInt(e){if("string"!=typeof e)return;let n=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[n]||12}h12ToInt(e,n){if("string"!=typeof e)return;let t=this.lookups.meridiem[n?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===t&&(r+=12),12===r&&0===t&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let n=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(n){let[,e,t,r]=n;return("-"===e||"−"===e?-1:1)*(60*this.toInt(t)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=AN:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:n}=function(e){if(AI[e])return AI[e];if("fullwide"===e||"hanidec"===e)return{group:AO,lookup:{...AN}};let n=AT[e];if(!n)return{group:"\\d",lookup:{...AN}};let t=String.fromCharCode(n),r=String.fromCharCode(n+9),o={};for(let e=0;e<10;e++)o[String.fromCharCode(n+e)]=e;return AI[e]={group:`[${t}-${r}]`,lookup:o},AI[e]}(this.numberingSystem);for(let t in this.lookups.digit=n,AF)AF.hasOwnProperty(t)&&(this.vars[t]=AF[t].replace(/\*/g,e))}buildMonthNames(){let e={},n={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((t,r)=>{["","k","kuu","kuuta"].forEach((o,a)=>{e[t+o+(a<2?"\\.?":"")]=!0,n[t+o]=r+1})});else{let t=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)t.push(new Date(2017,e,1));for(let o of["full","long","medium"]){let a=Intl.DateTimeFormat(this.locale,{dateStyle:o});for(let i=0;i<12;i++){let s=a.formatToParts(t[i]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===o?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,n[s]=i+1)}}let o=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let i=o.formatToParts(t[a]).find(r).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,n[i]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=n}buildDaynames(){let e=[],n=e=>"weekday"===e.type;for(let n=0;n<7;n++)e.push(new Date(2017,0,n+1));let t=[],r={};for(let o of["long","short"]){let a=Intl.DateTimeFormat(this.locale,{weekday:o});for(let i=0;i<7;i++){let s=a.formatToParts(e[i]).find(n).value.toLocaleLowerCase(this.locale);"short"===o?(s=s.replace(/\.$/,""),t.push(`${s}\\.?`)):t.push(s),r[s]=i}}this.vars.DAYNAME=t.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],n=e=>"dayPeriod"===e.type,t=[],r={},o=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let a=0;a<2;a++){let i=o.formatToParts(e[a]).find(n);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);t.push(s),r[s]=12*a}this.vars.MERIDIEM=t.join("|"),this.lookups.meridiem=r}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,n)=>{if(!this.vars[n])throw Error(`Template string contains invalid variable _${n}_`);return this.vars[n]}),"i")}},AV=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],AG={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},AU=()=>new Date;function Aq(e){return function(n){let t={};for(let r=0,o=e.length;r<o;r++){let o=e[r];o&&(t[o]=n[r])}return t}}var AH=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:n,patterns:t,formatter:r}){this.doneChecker=e,this.fallback=n,this.patterns=t,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let n=e.trim(),t={},r=!1;for(let e of this.patterns){let o=n.match(e.regex);if(!o)continue;r=!0;let a=e.handler(o);if(a){for(let[e,n]of Object.entries(a))e in t||void 0===n||(t[e]=n);if(n=(n=n.slice(0,o.index)+n.slice(o.index+o[0].length+1)).trim(),this.doneChecker(t,n))break}}return r?this.formatter(t):this.fallback(e)}},AK=["year","month","day","hour","minute","second","millisecond","offset"],AY={};function AZ(e,n){return""===n||/^\s+$/.test(n)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var AJ=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],AX={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...AJ],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:AJ,id:AJ,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function AQ(e,n=Az){let t=function(e){if(!AY[e]){var n,t;let r,o,a=AW.factory(e);AY[e]=new AH({doneChecker:AZ,fallback:(n=e,function(e){let t=String(e).slice(0,50);return""===t&&(t="(empty string)"),{invalid:`Unable to parse "${t}" with locale "${n}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:a.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:Aq(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:a.compile(`^(${AO}{2,4})\\s*\u5E74\\s*(${AO}{1,2})\\s*\u6708\\s*(${AO}{1,2})\\s*\u65E5$`),handler:Aq(["","year","month","day"])},{name:"korean",regex:a.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:Aq(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:Aq(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let n=AU(),t=e[1].toLowerCase();switch(t){case"tomorrow":n.setUTCDate(n.getUTCDate()+1);break;case"yesterday":n.setUTCDate(n.getUTCDate()-1)}let r={year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate()};return"now"===t&&(r.hour=n.getUTCHours(),r.minute=n.getUTCMinutes(),r.second=n.getUTCSeconds(),r.millisecond=n.getUTCMilliseconds()),console.log("today=>",t,r),r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,n,t,r]){n=parseFloat(n),"week"===(t=t.length<=2?AG[t]:(t=t.replace(/s$/,"")).toLowerCase())&&(t="day",n*=7),("-"===e||r)&&(n*=-1);let o=AU();return"millisecond"===t?o.setUTCMilliseconds(o.getUTCMilliseconds()+n):"second"===t?o.setUTCSeconds(o.getUTCSeconds()+n):"minute"===t?o.setUTCMinutes(o.getUTCMinutes()+n):"hour"===t?o.setUTCHours(o.getUTCHours()+n):"day"===t?o.setUTCDate(o.getUTCDate()+n):"month"===t?o.setUTCMonth(o.getUTCMonth()+n):"year"===t&&o.setUTCFullYear(o.getUTCFullYear()+n),{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate(),hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let n=new Date(1e3*parseInt(e[1],10));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let n=new Date(parseInt(e[1],10));return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:a.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:Aq(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:Aq(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:a.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","minute","second","meridiem"])},{name:"hms24",regex:a.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:Aq(["","hour","minute","second","millisecond"])},{name:"hm12",regex:a.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","minute","meridiem"])},{name:"hm24",regex:a.compile("(_H24_):(_MIN_)"),handler:Aq(["","hour","minute"])},{name:"h12",regex:a.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:Aq(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:Aq(["","year","month","day"])},{name:"yearMonthnameDay",regex:a.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:Aq(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:a.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:Aq(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:a.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:Aq(["","monthname","day","","year"])},{name:"dayMonthname",regex:a.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:Aq(["","day","","monthname"])},{name:"monthnameDay",regex:a.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:Aq(["","monthname","day"])},{name:"hmsNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:Aq(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:a.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:Aq(["","hour","minute"])},{name:"ymd",regex:a.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:Aq(["","year","","month","day"])},{name:"mdy",regex:a.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:Aq(["","month","","day","year"])},{name:"dmy",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:Aq(["","day","month","year"])},{name:"yearLoose",regex:a.compile("_YEAR4_"),handler:Aq(["year"])},{name:"dayMonthnameLoose",regex:a.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:Aq(["","day","monthname"])},{name:"monthnameDayLoose",regex:a.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:Aq(["","monthname","day"])},{name:"monthname",regex:a.compile("_MONTHNAME_"),handler:Aq(["monthname"])},{name:"year4",regex:a.compile("_YEAR4_"),handler:Aq(["year"])},{name:"md",regex:a.compile("(_MONTH_)[/-](_DAY_)"),handler:Aq(["","month","day"])},{name:"dm",regex:a.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:Aq(["","day","month"])},{name:"day",regex:a.compile("_DAY_"),handler:Aq(["day"])},{name:"year2",regex:a.compile("_YEAR2_"),handler:Aq(["year"])},{name:"onlyZone",regex:a.compile("_ZONE_"),handler:Aq(["zone"])}],o=a.baseName.slice(0,5),AV.includes(o)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(t=a,function(e){let n={};for(let[r,o]of Object.entries(e))if("monthname"===r){if(o){let e=t.monthNameToInt(o);void 0!==e&&(n.month=e)}}else if("hour"===r&&e.meridiem){let r=t.h12ToInt(o,e.meridiem);void 0!==r&&(n.hour=r)}else if("zone"===r){if(o){let e=t.zoneToOffset(o);void 0!==e&&(n.offset=e)}}else if("offset"===r){let e=t.offsetToMinutes(o);void 0!==e&&(n.offset=e)}else if("millisecond"===r){let e=t.millisecondToInt(o);"number"==typeof e&&(n.millisecond=e)}else if(AK.includes(r)){let e=t.toInt(o);"number"==typeof e&&(n[r]=e)}return n.year<100&&(n.year=AP[n.year]),n.year&&"buddhist"===t.dateOptions.calendar&&(n.year-=543),n})})}return AY[e]}(n),r=function(e,n){let t=AX[n.slice(0,2).toLowerCase()];if(!t)return e;for(let[n,r]of t)e=e.replace(n,r);return e}(e,n);return t.attempt(r)}function A0(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let n=new AM(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new AM(n.valueOf()-60*e.offset*1e3):n}function A1(e,n=Az){let t=AQ(e,n),r=t.invalid?new AM(NaN):A0(t);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function A2(e,n=Az){return e instanceof Date?new AM(e.valueOf()):"number"==typeof e?new AM(e):A1(e,n)}Date.fromString=AM.fromString=A1,Date.fromAny=AM.fromAny=A2,"u">typeof window&&(window.anyDateParser={fromString:A1,fromAny:A2,fromObject:A0,attempt:AQ});var A3=t(4397),A5=t(7657);let A4=function(e){return null==e};function A6(e,n){var t=function(e,n){if(!n.has(e))throw TypeError("attempted to get private field on non-instance");return n.get(e)}(e,n);return t.get?t.get.call(e):t.value}fh().extend(fm),fh().extend(A5),fh().extend(A3);let A7="YYYY-MM-DDTHH:mm:ss.SSSZZ";function A8(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&fh()(e,A7).isValid()}function A9(e){return fh()(e).isToday()}function we(e){return A8(e)?fh()(e,A7).toDate():null}function wn(e,n=!1){let t=fh()(e);return n&&(t=t.utc()),t.format(A7)}function wt(e){return fh()(e).toDate()}var wr=new WeakMap;let wo=new class{register(e,n){A6(this,wr).set(e,n)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let n=`${e.language}-${e.region}`;if(A6(this,wr).has(n))return A6(this,wr).get(n)}if(e.language&&A6(this,wr).has(e.language))return A6(this,wr).get(e.language);let n=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return A6(this,wr).set(`${e.language}${e.region?`-${e.region}`:""}`,n),n}constructor(){!function(e,n,t){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");n.set(e,t)}(this,wr,{writable:!0,value:new Map})}};function wa(e,n){wo.register(e,n)}function wi(e){let n=e??AD();return wo.getCalendar(n instanceof Intl.Locale?n:new Intl.Locale(n))}let ws={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function wl(e,n={}){let t=AQ(e,AD());if(t.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!A4(t.day)&&A4(t.month)&&(t=Object.assign({},n5(t,"day"),{month:t.day})),t.month&&(t.month-=1),t.day&&(t=Object.assign({},n5(t,"day"),{date:t.day}));let r=fh()().set(t).toDate();return A4(t.year)&&(n.year=!1),A4(t.month)&&(n.month=!1),A4(t.date)&&(n.day=!1),wc(r,n)}function wc(e,n){let t,r=n?.locale??AD(),o=new Intl.Locale(r),{calendar:a,mode:i,time:s,day:l,month:c,year:p,noToday:u,numberingSystem:d}={...ws,...{noToday:"am"===o.language},...n},f={calendar:a??wi(o),year:p?"numeric":void 0,month:c?"short":void 0,day:l?"2-digit":void 0,numberingSystem:d},h=fh()(e).isToday();if(h&&!u)t=(t=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+t.slice(1);else{"en"===o.language&&(r="en-GB");let n=new Intl.DateTimeFormat(r,f).formatToParts(e);("en"===o.language||"am"===o.language)&&"standard"==i&&p&&l&&(n=n.map(wp("-"))),"wide"==i&&(n=n.map(wp(" — "))),"ethiopic"===f.calendar&&(n=n.filter((e,n,t)=>"era"!==e.type&&("literal"!==e.type||!(n<t.length-1)||"era"!==t[n+1].type))),t=n.map(e=>e.value).join("")}return(!0===s||h&&"for today"===s)&&(t+=`, ${wu(e)}`),t}let wp=e=>(n,t,r)=>"literal"!==n.type||" "!==n.value||t<r.length-1&&"era"===r[t+1].type?n:{type:"literal",value:e};function wu(e){return e.toLocaleTimeString(AD(),{hour:"2-digit",minute:"2-digit"})}function wd(e,n){return wc(e,{...n,time:!0})}function wf(e,n){let t=wi("string"==typeof n?new Intl.Locale(n):n);return t?bT(e,vn(t)):e}function wh(e,n){return new Intl.DurationFormat(AD(),n).format(e)}function wm(e,n){if(null==e)return null;if("string"==typeof e){let t=AQ(e,AD());return t.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(t.day&&!t.month&&(t={...n5(t,"day"),...{month:t.day}}),t.month&&(t.month-=1),t.day&&(t={...n5(t,"day"),...{date:t.day}}),fh()(n).set(t))}return fh()(e)}let wg=["years","months","days","hours","minutes","seconds"],wy={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wb={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function w_(e,n=fh()(),t){let r,o=fh()(n),a=wm(e,o);if(null==a)return null;if("string"==typeof t){let e=wy[t]??t;return{[e]:o.diff(a,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=t??{};if(void 0!==s||void 0!==l){let e,n=l?wy[l]??l:void 0;return e="auto"===s||void 0===s?function(e,n,t){let r=wg.indexOf(t);for(let o=0;o<wg.length;o++){let a=wg[o];if(n.diff(e,a)>0)return o<=r?a:t}return t}(a,o,n??"seconds"):wy[s]??s,function(e,n,t,r){let o=wg.indexOf(t),a=wg.indexOf(r),i=wg.slice(o,a+1),s={},l=e;for(let e of i){let t=n.diff(l,e);s[e]=t,l=l.add(t,e)}return s}(a,o,e,n??e)}let c=(r=function(e){let n={...wb};if(e)for(let[t,r]of Object.entries(e))void 0!==r&&(n[wy[t]??t]=r);return n}(i),o.diff(a,"seconds")<r.seconds?"seconds":o.diff(a,"minutes")<r.minutes?"minutes":o.diff(a,"hours")<r.hours?"hours":o.diff(a,"days")<r.days?"days":o.diff(a,"months")<r.months?"months":"years");return{[c]:o.diff(a,c)}}let wv={style:"short",localeMatcher:"lookup"};function w$(e,n=fh()(),t){let r=w_(e,n,t);return null==r?null:wh(r,"object"==typeof t&&t.formatOptions?{...wv,...t.formatOptions}:wv)}let wA=(0,uB.createContext)(null);function ww(){let e=dM({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,n=(0,uB.useMemo)(()=>{let n=AD();return e[n]&&(n=e[n]),n},[window.i18next.language]),t=(0,uB.useMemo)(()=>{let e=wi(n);return void 0!==e?vn(e):void 0},[n]),r=(0,uB.useMemo)(()=>new Intl.Locale(n,{calendar:t?.identifier}),[n,t]),o=(0,uB.useMemo)(()=>t?bT(bL(bU()),t):bL(bU()),[t]);return{calendar:t,intlLocale:r,today_:o}}let wk=new bg(1793,1,1);var wx={};function wC(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}wx={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};let wE=new Map,wS=!1;try{wS="exceptZero"===new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay}catch{}let wD=!1;try{wD="unit"===new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style}catch{}let wz={degree:{narrow:{default:"\xb0","ja-JP":" 度","zh-TW":"度","sl-SI":" \xb0"}}};class wM{format(e){let n="";if(n=wS||null==this.options.signDisplay?this.numberFormatter.format(e):function(e,n,t){if("auto"===n)return e.format(t);{if("never"===n)return e.format(Math.abs(t));let r=!1;if("always"===n?r=t>0||Object.is(t,0):"exceptZero"===n&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):r=t>0),!r)return e.format(t);{let n=e.format(-t),r=e.format(t),o=n.replace(r,"").replace(/\u200e|\u061C/,"");return 1!=[...o].length&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(r,"!!!").replace(o,"+").replace("!!!",r)}}}(this.numberFormatter,this.options.signDisplay,e),"unit"===this.options.style&&!wD){var t;let{unit:e,unitDisplay:r="short",locale:o}=this.resolvedOptions();if(!e)return n;let a=null==(t=wz[e])?void 0:t[r];n+=a[o]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if("function"==typeof this.numberFormatter.formatRange)return this.numberFormatter.formatRange(e,n);if(n<e)throw RangeError("End date must be >= start date");return`${this.format(e)} \u{2013} ${this.format(n)}`}formatRangeToParts(e,n){if("function"==typeof this.numberFormatter.formatRangeToParts)return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw RangeError("End date must be >= start date");let t=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(n);return[...t.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return wS||null==this.options.signDisplay||(e={...e,signDisplay:this.options.signDisplay}),wD||"unit"!==this.options.style||(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=function(e,n={}){let{numberingSystem:t}=n;if(t&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${t}`),"unit"===n.style&&!wD){var r;let{unit:e,unitDisplay:t="short"}=n;if(!e)throw Error('unit option must be provided with style: "unit"');if(!(null==(r=wz[e])?void 0:r[t]))throw Error(`Unsupported unit ${e} with unitDisplay = ${t}`);n={...n,style:"decimal"}}let o=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(wE.has(o))return wE.get(o);let a=new Intl.NumberFormat(e,n);return wE.set(o,a),a}(e,n),this.options=n}}function wP(e={}){let{locale:n}=yZ();return(0,uB.useMemo)(()=>new wM(n,e),[n,e])}var wT={};function wO(e){var n;let t=(0,uB.useRef)(void 0),{value:r,textValue:o,minValue:a,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:c,onIncrement:p,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:m}=e,g=b6((n=wT)&&n.__esModule?n.default:n,"@react-aria/spinbutton");(0,uB.useEffect)(()=>()=>clearTimeout(t.current),[]);let y=(0,uB.useRef)(!1),b=()=>{y.current=!0},v=()=>{y.current=!1},$=""===o?g.format("Empty"):(o||`${r}`).replace("-","−");(0,uB.useEffect)(()=>{y.current&&(gi&&gi.clear("assertive"),gs($,"assertive"))},[$]);let A=mq(e=>{clearTimeout(t.current),null==p||p(),t.current=window.setTimeout(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&A(60)},e)}),w=mq(e=>{clearTimeout(t.current),null==d||d(),t.current=window.setTimeout(()=>{(void 0===a||isNaN(a)||void 0===r||isNaN(r)||r>a)&&w(60)},e)}),k=e=>{e.preventDefault()},{addGlobalListener:x,removeAllGlobalListeners:C}=gJ();return{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":$,"aria-valuemin":a,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":c||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l)switch(e.key){case"PageUp":if(u){e.preventDefault(),null==u||u();break}case"ArrowUp":case"Up":p&&(e.preventDefault(),null==p||p());break;case"PageDown":if(f){e.preventDefault(),null==f||f();break}case"ArrowDown":case"Down":d&&(e.preventDefault(),null==d||d());break;case"Home":h&&(e.preventDefault(),null==h||h());break;case"End":m&&(e.preventDefault(),null==m||m())}},onFocus:b,onBlur:v},incrementButtonProps:{onPressStart:()=>{A(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v},decrementButtonProps:{onPressStart:()=>{w(400),x(window,"contextmenu",k)},onPressEnd:()=>{clearTimeout(t.current),C()},onFocus:b,onBlur:v}}}wT={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let wN=RegExp("^.*\\(.*\\).*$"),wI=["latn","arab","hanidec","deva","beng"];class wB{parse(e){return wR(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,t){return wR(this.locale,this.options,e).isValidPartialNumber(e,n,t)}getNumberingSystem(e){return wR(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}let wj=new Map;function wR(e,n,t){let r=wF(e,n);if(!e.includes("-nu-")&&!r.isValidPartialNumber(t)){for(let o of wI)if(o!==r.options.numberingSystem){let r=wF(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,n);if(r.isValidPartialNumber(t))return r}}return r}function wF(e,n){let t=e+(n?Object.entries(n).sort((e,n)=>e[0]<n[0]?-1:1).join():""),r=wj.get(t);return r||(r=new wL(e,n),wj.set(t,r)),r}class wL{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=wG(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),"percent"===this.options.style){let e=n.indexOf("-"),t=(n=n.replace("-","")).indexOf(".");-1===t&&(t=n.length),n=n.replace(".",""),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?"0.00":`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let t=n?+n:NaN;if(isNaN(t))return NaN;if("percent"===this.options.style){var r,o;let e={...this.options,style:"decimal",minimumFractionDigits:Math.min((null!=(r=this.options.minimumFractionDigits)?r:0)+2,20),maximumFractionDigits:Math.min((null!=(o=this.options.maximumFractionDigits)?o:0)+2,20)};return new wB(this.locale,e).parse(new wM(this.locale,e).format(t))}return"accounting"===this.options.currencySign&&wN.test(e)&&(t*=-1),t}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),"arab"===this.options.numberingSystem&&(this.symbols.decimal&&(e=(e=e.replace(",",this.symbols.decimal)).replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(e=wG(e,".",this.symbols.group))),"fr-FR"===this.options.locale&&this.symbols.group&&(e=wG(e," ",this.symbols.group),e=wG(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,n=-1/0,t=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&t>0&&(e=e.slice(this.symbols.plusSign.length)),!(this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&0===this.options.maximumFractionDigits)&&(this.symbols.group&&(e=wG(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),0===e.length)}constructor(e,n={}){var t,r;this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=function(e,n,t,r){var o,a,i,s,l;let c=new Intl.NumberFormat(e,{...t,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),p=c.formatToParts(-10000.111),u=c.formatToParts(10000.111),d=wV.map(e=>c.formatToParts(e)),f=null!=(l=null==(o=p.find(e=>"minusSign"===e.type))?void 0:o.value)?l:"-",h=null==(a=u.find(e=>"plusSign"===e.type))?void 0:a.value;h||(null==r?void 0:r.signDisplay)!=="exceptZero"&&(null==r?void 0:r.signDisplay)!=="always"||(h="+");let m=null==(i=new Intl.NumberFormat(e,{...t,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>"decimal"===e.type))?void 0:i.value,g=null==(s=p.find(e=>"group"===e.type))?void 0:s.value,y=[...new Set([...p.filter(e=>!wW.has(e.type)).map(e=>wU(e.value)),...d.flatMap(e=>e.filter(e=>!wW.has(e.type)).map(e=>wU(e.value)))])].sort((e,n)=>n.length-e.length),b=0===y.length?RegExp("[\\p{White_Space}]","gu"):RegExp(`${y.join("|")}|[\\p{White_Space}]`,"gu"),v=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(0x24cb016ea)].reverse(),$=new Map(v.map((e,n)=>[e,n]));return{minusSign:f,plusSign:h,decimal:m,group:g,literals:b,numeral:RegExp(`[${v.join("")}]`,"g"),index:e=>String($.get(e))}}(e,this.formatter,this.options,n),"percent"===this.options.style&&((null!=(t=this.options.minimumFractionDigits)?t:0)>18||(null!=(r=this.options.maximumFractionDigits)?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}let wW=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),wV=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function wG(e,n,t){return e.replaceAll?e.replaceAll(n,t):e.split(n).join(t)}function wU(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wq(e,n,t){let r="+"===e?n+t:n-t;if(n%1!=0||t%1!=0){let o=n.toString().split("."),a=t.toString().split("."),i=Math.pow(10,Math.max(o[1]&&o[1].length||0,a[1]&&a[1].length||0));n=Math.round(n*i),t=Math.round(t*i),r=("+"===e?n+t:n-t)/i}return r}let wH=(0,uB.createContext)(null),wK=(0,uB.createContext)(null),wY=(0,uB.forwardRef)(function(e,n){var t,r;[e,n]=gt(e,n,wH);let{validationBehavior:o}=gn($F)||{},a=null!=(r=null!=(t=e.validationBehavior)?t:o)?r:"native",{locale:i}=yZ(),s=function(e){let{minValue:n,maxValue:t,step:r,formatOptions:o,value:a,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:c,isReadOnly:p}=e;null===a&&(a=NaN),void 0===a||isNaN(a)||(a=void 0===r||isNaN(r)?$q(a,n,t):$K(a,n,t,r)),isNaN(i)||(i=void 0===r||isNaN(r)?$q(i,n,t):$K(i,n,t,r));let[u,d]=vc(a,isNaN(i)?NaN:i,s),[f,h]=(0,uB.useState)(()=>isNaN(u)?"":new wM(l,o).format(u)),m=(0,uB.useMemo)(()=>new wB(l,o),[l,o]),g=(0,uB.useMemo)(()=>m.getNumberingSystem(f),[m,f]),y=(0,uB.useMemo)(()=>new wM(l,{...o,numberingSystem:g}),[l,o,g]),b=(0,uB.useMemo)(()=>y.resolvedOptions(),[y]),v=(0,uB.useCallback)(e=>isNaN(e)||null===e?"":y.format(e),[y]),$=$r({...e,value:u}),A=void 0===r||isNaN(r)?1:r;"percent"===b.style&&(void 0===r||isNaN(r))&&(A=.01);let[w,k]=(0,uB.useState)(u),[x,C]=(0,uB.useState)(l),[E,S]=(0,uB.useState)(o);Object.is(u,w)&&l===x&&o===E||(h(v(u)),k(u),C(l),S(o));let D=(0,uB.useMemo)(()=>m.parse(f),[m,f]),z=(e,r=0)=>{if(isNaN(D))return $K(isNaN(r)?0:r,n,t,A);{let r=$K(D,n,t,A);return"+"===e&&r>D||"-"===e&&r<D?r:$K(wq(e,D,A),n,t,A)}},M=(0,uB.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===t||isNaN(t)||$K(D,n,t,A)>D||wq("+",D,A)<=t),[c,p,n,t,A,D]),P=(0,uB.useMemo)(()=>!c&&!p&&(isNaN(D)||void 0===n||isNaN(n)||$K(D,n,t,A)<D||wq("-",D,A)>=n),[c,p,n,t,A,D]);return{...$,validate:e=>m.isValidPartialNumber(e,n,t),increment:()=>{let e=z("+",n);e===u&&h(v(e)),d(e),$.commitValidation()},incrementToMax:()=>{null!=t&&(d($K(t,n,t,A)),$.commitValidation())},decrement:()=>{let e=z("-",t);e===u&&h(v(e)),d(e),$.commitValidation()},decrementToMin:()=>{null!=n&&(d(n),$.commitValidation())},canIncrement:M,canDecrement:P,minValue:n,maxValue:t,numberValue:D,setNumberValue:d,setInputValue:h,inputValue:f,commit:()=>{let e;if(!f.length){d(NaN),h(void 0===a?"":v(u));return}isNaN(D)?h(v(u)):(e=void 0===r||isNaN(r)?$q(D,n,t):$K(D,n,t,r),d(e=m.parse(v(e))),h(v(void 0===a?e:u)))}}}({...e,locale:i,validationBehavior:a}),l=(0,uB.useRef)(null),[c,p]=gr(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:u,groupProps:d,inputProps:f,incrementButtonProps:h,decrementButtonProps:m,descriptionProps:g,errorMessageProps:y,...b}=function(e,n,t){var r,o;let a,{id:i,decrementAriaLabel:s,incrementAriaLabel:l,isDisabled:c,isReadOnly:p,isRequired:u,minValue:d,maxValue:f,autoFocus:h,label:m,formatOptions:g,onBlur:y=()=>{},onFocus:b,onFocusChange:v,onKeyDown:$,onKeyUp:A,description:w,errorMessage:k,isWheelDisabled:x,...C}=e,{increment:E,incrementToMax:S,decrement:D,decrementToMin:z,numberValue:M,inputValue:P,commit:T,commitValidation:O}=n,N=b6((o=wx)&&o.__esModule?o.default:o,"@react-aria/numberfield"),I=m5(i),{focusProps:B}=yv({onBlur(){T()}}),j=wP(g),R=(0,uB.useMemo)(()=>j.resolvedOptions(),[j]),F=wP({...g,currencySign:void 0}),L=(0,uB.useMemo)(()=>isNaN(M)?"":F.format(M),[F,M]),{spinButtonProps:W,incrementButtonProps:V,decrementButtonProps:G}=wO({isDisabled:c,isReadOnly:p,isRequired:u,maxValue:f,minValue:d,onIncrement:E,onIncrementToMax:S,onDecrement:D,onDecrementToMin:z,value:M,textValue:L}),[U,q]=(0,uB.useState)(!1),{focusWithinProps:H}=yk({isDisabled:c,onFocusWithinChange:q});!function(e,n){let{onScroll:t,isDisabled:r}=e,o=(0,uB.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t&&t({deltaX:e.deltaX,deltaY:e.deltaY}))},[t]);_g(n,"wheel",r?void 0:o)}({onScroll:(0,uB.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?E():e.deltaY<0&&D())},[D,E]),isDisabled:x||c||p||!U},t);let K=(null!=(r=R.maximumFractionDigits)?r:0)>0,Y=void 0===n.minValue||isNaN(n.minValue)||n.minValue<0,Z="numeric";gM()?Y?Z="text":K&&(Z="decimal"):gI()&&(Y?Z="numeric":K&&(Z="decimal"));let J=gf(e),X=(0,uB.useCallback)(e=>{"Enter"===e.key?(T(),O()):e.continuePropagation()},[T,O]),{isInvalid:Q,validationErrors:ee,validationDetails:en}=n.displayValidation,{labelProps:et,inputProps:er,descriptionProps:eo,errorMessageProps:ea}=function(e,n,t){let r=mq(e=>{let r=t.current;if(!r)return;let o=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":o=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":o=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":o=r.value.slice(r.selectionStart);break;default:null!=e.data&&(o=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=o&&n.validate(o)||e.preventDefault()});(0,uB.useEffect)(()=>{if(!wC()||!t.current)return;let e=t.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[t,r]);let o=wC()?null:e=>{let t=e.target.value.slice(0,e.target.selectionStart)+e.data+e.target.value.slice(e.target.selectionEnd);n.validate(t)||e.preventDefault()},{labelProps:a,inputProps:i,descriptionProps:s,errorMessageProps:l,...c}=function(e,n){let{inputElementType:t="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:a=!1,type:i="text",validationBehavior:s="aria"}=e,[l,c]=vc(e.value,e.defaultValue||"",e.onChange),{focusableProps:p}=yw(e,n),u=$r({...e,value:l}),{isInvalid:d,validationErrors:f,validationDetails:h}=u.displayValidation,{labelProps:m,fieldProps:g,descriptionProps:y,errorMessageProps:b}=v1({...e,isInvalid:d,errorMessage:e.errorMessage||f}),v=gf(e,{labelable:!0}),$={type:i,pattern:e.pattern};return v0(n,l,c),v2(e,u,n),(0,uB.useEffect)(()=>{if(n.current instanceof gv(n.current).HTMLTextAreaElement){let e=n.current;Object.defineProperty(e,"defaultValue",{get:()=>e.value,set:()=>{},configurable:!0})}},[n]),{labelProps:m,inputProps:m7(v,"input"===t?$:void 0,{disabled:r,readOnly:a,required:o&&"native"===s,"aria-required":o&&"aria"===s||void 0,"aria-invalid":d||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>c(e.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(uj().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...p,...g}),descriptionProps:y,errorMessageProps:b,isInvalid:d,validationErrors:f,validationDetails:h}}(e,t),p=(0,uB.useRef)(null);return{inputProps:m7(i,{onBeforeInput:o,onCompositionStart(){let{value:e,selectionStart:n,selectionEnd:r}=t.current;p.current={value:e,selectionStart:n,selectionEnd:r}},onCompositionEnd(){if(t.current&&!n.validate(t.current.value)){let{value:e,selectionStart:r,selectionEnd:o}=p.current;t.current.value=e,t.current.setSelectionRange(r,o),n.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:l,...c}}({...C,...J,name:void 0,label:m,autoFocus:h,isDisabled:c,isReadOnly:p,isRequired:u,validate:void 0,[$t]:n,value:P,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:I,type:"text",inputMode:Z,onChange:e=>{n.validate(e)&&n.setInputValue(e)},onBlur:y,onFocus:b,onFocusChange:v,onKeyDown:(0,uB.useMemo)(()=>mG(X,$),[X,$]),onKeyUp:A,description:w,errorMessage:k},n,t);v0(t,n.numberValue,n.setNumberValue);let ei=m7(W,B,er,{role:null,"aria-roledescription":gT()?null:N.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ei["aria-required"]=void 0);let es=e=>{var n;document.activeElement!==t.current&&("mouse"===e.pointerType?null==(n=t.current)||n.focus():e.target.focus())},el=e["aria-label"]||("string"==typeof e.label?e.label:"");el||(a=null!=e.label?et.id:e["aria-labelledby"]);let ec=m5(),ep=m5(),eu=m7(V,{"aria-label":l||N.format("increase",{fieldLabel:el}).trim(),id:a&&!l?ec:null,"aria-labelledby":a&&!l?`${ec} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canIncrement,onPressStart:es}),ed=m7(G,{"aria-label":s||N.format("decrease",{fieldLabel:el}).trim(),id:a&&!s?ep:null,"aria-labelledby":a&&!s?`${ep} ${a}`:null,"aria-controls":I,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!n.canDecrement,onPressStart:es});return{groupProps:{...H,role:"group","aria-disabled":c,"aria-invalid":Q?"true":void 0},labelProps:et,inputProps:ei,incrementButtonProps:eu,decrementButtonProps:ed,errorMessageProps:ea,descriptionProps:eo,isInvalid:Q,validationErrors:ee,validationDetails:en}}({...go(e),label:p,validationBehavior:a},s,l),v=ge({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:b.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),$=gf(e);return delete $.id,uj().createElement(m9,{values:[[wK,s],[vE,d],[vD,{...f,ref:l}],[$L,{...u,ref:c}],[yO,{slots:{increment:h,decrement:m}}],[yB,{slots:{description:g,errorMessage:y}}],[$B,b]]},uj().createElement("div",{...$,...v,ref:n,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":b.isInvalid||void 0}),e.name&&uj().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function wZ(e,n){return Number.parseInt(wc(e,{calendar:n.calendar,locale:n.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wJ=(0,uB.forwardRef)(function(e,n){let{className:t}=e,r=(0,uB.useContext)(vy),o=(0,uB.useContext)(vb),a=r??o,i=(0,uB.useContext)(wA),s=bU(),l=wc(a.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),c=wZ(a.visibleRange.start.toDate(s),i),p=a.maxValue?wZ(a.maxValue.toDate(s),i):void 0,u=a.minValue?wZ(a.minValue.toDate(s),i):void 0,d=(0,uB.useCallback)(e=>{a.setFocusedDate(a.focusedDate.cycle("year",e-a.focusedDate.year))},[]);return a&&(0,fP.jsxs)("span",{ref:n,className:t,children:[(0,fP.jsx)("span",{children:l}),(0,fP.jsxs)(wY,{formatOptions:{useGrouping:!1},maxValue:p,minValue:u,onChange:d,value:c,children:[(0,fP.jsx)(vz,{}),(0,fP.jsxs)(vS,{children:[(0,fP.jsx)(yN,{slot:"increment",children:(0,fP.jsx)(hy,{size:8})}),(0,fP.jsx)(yN,{slot:"decrement",children:(0,fP.jsx)(hh,{size:8})})]})]})]})});var wX=t(3519),wQ={};wQ.styleTagTransform=fq(),wQ.setAttributes=fW(),wQ.insert=fF().bind(null,"head"),wQ.domAPI=fj(),wQ.insertStyleElement=fG(),fI()(wX.A,wQ);let w0=wX.A&&wX.A.locals?wX.A.locals:void 0;function w1({children:e}){let n=(0,uB.useContext)(AA),t=(0,uB.useContext)(Aw),r=n??t,o=ft(()=>r?.close());return(0,fP.jsx)($I,{className:w0.dialog,ref:o,children:e})}let w2=(0,uB.forwardRef)(function({variant:e,today_:n,minDate:t,maxDate:r},o){let a="range"===e;return(0,fP.jsx)(Ay,{ref:o,className:w0.popover,placement:"bottom start",offset:1,isNonModal:!0,children:(0,fP.jsx)(w1,{children:(0,fP.jsxs)(a?vv:v_,{...a?{minValue:t,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,fP.jsxs)("header",{className:w0.header,children:[(0,fP.jsx)(yN,{className:fO()(w0.flatButton,w0.flatButtonMd),slot:"previous",children:(0,fP.jsx)(hk,{size:16})}),(0,fP.jsx)(wJ,{className:w0.monthYear}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,w0.flatButtonMd),slot:"next",children:(0,fP.jsx)(hx,{size:16})})]}),(0,fP.jsx)(vA,{className:w0.calendarGrid,children:e=>(0,fP.jsx)(vC,{className:fO()("cds--date-picker__day",{[w0.today]:0===n.compare(e)}),date:e},e.toString())})]})})})}),w3=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)(AA),[r,o]=gt({slot:e.slot},n,$k),{locale:a}=yZ(),i=$A({...r,locale:a,createCalendar:vn}),s=(0,uB.useRef)(null),{fieldProps:l,inputProps:c}=v6({...r,inputRef:s},i,o),p=(0,uB.useCallback)(()=>{i.isDisabled||t.toggle()},[]);return(0,fP.jsxs)(m9,{values:[[$x,i],[vD,{...c,ref:s}],[vE,{...l,ref:o,isInvalid:i.isInvalid}]],children:[(0,fP.jsx)(vS,{...e,id:e.id,ref:n,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:p,children:i.segments.map((n,t)=>(0,uB.cloneElement)(e.children(n),{key:t}))}),(0,fP.jsx)(vz,{})]})}),w5=(0,uB.forwardRef)(function(e,n){let t=(0,uB.useContext)(AA),r=(0,uB.useContext)(Aw);return(t??r).isInvalid?(0,fP.jsx)(mz,{ref:n,size:16,...e}):(0,fP.jsx)(hf,{ref:n,size:16,...e})});class w4{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,n){this.locale=e,this.dictionary=n}}let w6=new Map,w7=(0,uB.forwardRef)(function({segment:e,...n},t){let r=(0,uB.useContext)($x),o=mV(t),{segmentProps:a}=function(e,n,t){let r,o,a,i,s=(0,uB.useRef)(""),{locale:l,direction:c}=yZ(),p=function(){var e;let{locale:n}=yZ(),t=b4((e=vM)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,uB.useMemo)(()=>{try{return new Intl.DisplayNames(n,{type:"dateTimeField"})}catch{return new w4(n,t)}},[n,t])}(),{ariaLabel:u,ariaLabelledBy:d,ariaDescribedBy:f,focusManager:h}=v3.get(n),m=e.isPlaceholder?"":e.text,g=(0,uB.useMemo)(()=>n.dateFormatter.resolvedOptions(),[n.dateFormatter]),y=_o({month:"long",timeZone:g.timeZone}),b=_o({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(m=b.format(n.dateValue));else{let e=y.format(n.dateValue);m=e!==m?`${m} \u{2013} ${e}`:e}let{spinButtonProps:v}=wO({value:e.value,textValue:m,minValue:e.minValue,maxValue:e.maxValue,isDisabled:n.isDisabled,isReadOnly:n.isReadOnly||!e.isEditable,isRequired:n.isRequired,onIncrement:()=>{s.current="",n.increment(e.type)},onDecrement:()=>{s.current="",n.decrement(e.type)},onIncrementPage:()=>{s.current="",n.incrementPage(e.type)},onDecrementPage:()=>{s.current="",n.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",void 0!==e.maxValue&&n.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{s.current="",void 0!==e.minValue&&n.setSegment(e.type,e.minValue)}}),$=(0,uB.useMemo)(()=>new wB(l,{maximumFractionDigits:0}),[l]),A=()=>{if(e.text===e.placeholder&&h.focusPrevious(),!$.isValidPartialNumber(e.text)||n.isReadOnly||e.isPlaceholder)"dayPeriod"===e.type&&n.clearSegment(e.type);else{let t=e.text.slice(0,-1),r=$.parse(t);0===(t=0===r?"":t).length||0===r?n.clearSegment(e.type):n.setSegment(e.type,r),s.current=t}},{startsWith:w}=(r=function(e){let{locale:n}=yZ(),t=n+(e?Object.entries(e).sort((e,n)=>e[0]<n[0]?-1:1).join():"");if(w6.has(t))return w6.get(t);let r=new Intl.Collator(n,e);return w6.set(t,r),r}({usage:"search",sensitivity:"base"}),o=(0,uB.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===r.compare(e.slice(0,n.length),n)),[r]),a=(0,uB.useCallback)((e,n)=>0===n.length||(e=e.normalize("NFC"),n=n.normalize("NFC"),0===r.compare(e.slice(-n.length),n)),[r]),i=(0,uB.useCallback)((e,n)=>{if(0===n.length)return!0;e=e.normalize("NFC");let t=0,o=(n=n.normalize("NFC")).length;for(;t+o<=e.length;t++){let a=e.slice(t,t+o);if(0===r.compare(n,a))return!0}return!1},[r]),(0,uB.useMemo)(()=>({startsWith:o,endsWith:a,contains:i}),[o,a,i])),k=_o({hour:"numeric",hour12:!0}),x=(0,uB.useMemo)(()=>{let e=new Date;return e.setHours(0),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),C=(0,uB.useMemo)(()=>{let e=new Date;return e.setHours(12),k.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[k]),E=_o({year:"numeric",era:"narrow",timeZone:"UTC"}),S=(0,uB.useMemo)(()=>{if("era"!==e.type)return[];let t=bT(new bg(1,1,1),n.calendar),r=n.calendar.getEras().map(e=>{let n=t.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:E.formatToParts(n).find(e=>"era"===e.type).value}}),o=function(e){e.sort();let n=e[0],t=e[e.length-1];for(let e=0;e<n.length;e++)if(n[e]!==t[e])return e;return 0}(r.map(e=>e.formatted));if(o)for(let e of r)e.formatted=e.formatted.slice(o);return r},[E,n.calendar,e.type]),D=t=>{if(n.isDisabled||n.isReadOnly)return;let r=s.current+t;switch(e.type){case"dayPeriod":if(w(x,t))n.setSegment("dayPeriod",0);else if(w(C,t))n.setSegment("dayPeriod",12);else break;h.focusNext();break;case"era":{let e=S.find(e=>w(e.formatted,t));e&&(n.setSegment("era",e.era),h.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!$.isValidPartialNumber(r))return;let o=$.parse(r),a=o,i=0===e.minValue;if("hour"===e.type&&n.dateFormatter.resolvedOptions().hour12){switch(n.dateFormatter.resolvedOptions().hourCycle){case"h11":o>11&&(a=$.parse(t));break;case"h12":i=!1,o>12&&(a=$.parse(t))}void 0!==e.value&&e.value>=12&&o>1&&(o+=12)}else void 0!==e.maxValue&&o>e.maxValue&&(a=$.parse(t));if(isNaN(o))return;let l=0!==a||i;l&&n.setSegment(e.type,a),void 0!==e.maxValue&&(Number(o+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",l&&h.focusNext()):s.current=r}}};_g((0,uB.useRef)("u">typeof document?document:null),"selectionchange",()=>{var e;let n=window.getSelection();(null==n?void 0:n.anchorNode)&&(null==(e=t.current)?void 0:e.contains(null==n?void 0:n.anchorNode))&&n.collapse(t.current)});let z=(0,uB.useRef)("");_g(t,"beforeinput",r=>{if(t.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":$.isValidPartialNumber(e.text)&&!n.isReadOnly&&A();break;case"insertCompositionText":z.current=t.current.textContent,t.current.textContent=t.current.textContent;break;default:null!=r.data&&D(r.data)}}),_g(t,"input",e=>{let{inputType:n,data:r}=e;"insertCompositionText"===n&&(t.current&&(t.current.textContent=z.current),null!=r&&(w(x,r)||w(C,r))&&D(r))}),mU(()=>{let e=t.current;return()=>{document.activeElement===e&&(h.focusPrevious()||h.focusNext())}},[t,h]);let M=gT()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,uB.useMemo)(()=>n.segments.find(e=>e.isEditable),[n.segments])||n.isInvalid||(f=void 0);let P=m5(),T=!n.isDisabled&&!n.isReadOnly&&e.isEditable,O="literal"===e.type?"":p.of(e.type),N=_d({"aria-label":`${O}${u?`, ${u}`:""}${d?", ":""}`,"aria-labelledby":d});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let I={caretColor:"transparent"};if("rtl"===c){I.unicodeBidi="embed";let n=g[e.type];("numeric"===n||"2-digit"===n)&&(I.direction="ltr")}return{segmentProps:m7(v,N,{id:P,...M,"aria-invalid":n.isInvalid?"true":void 0,"aria-describedby":f,"aria-readonly":n.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:T,suppressContentEditableWarning:T,spellCheck:T?"false":void 0,autoCorrect:T?"off":void 0,[parseInt(uj().version,10)>=17?"enterKeyHint":"enterkeyhint"]:T?"next":void 0,inputMode:n.isDisabled||"dayPeriod"===e.type||"era"===e.type||!T?void 0:"numeric",tabIndex:n.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(gz()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),A()}},onFocus:()=>{s.current="",t.current&&_A(t.current,{containingElement:_w(t.current)});let e=window.getSelection();null==e||e.collapse(t.current)},style:I,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,o),{focusProps:i,isFocused:s,isFocusVisible:l}=yx(),{hoverProps:c,isHovered:p}=yz({...n,isDisabled:r.isDisabled||"literal"===e.type}),u=function(e){let{className:n,style:t,children:r,defaultClassName:o,defaultChildren:a,defaultStyle:i,values:s}=e;return(0,uB.useMemo)(()=>{let e,l,c;return e="function"==typeof n?n({...s,defaultClassName:o}):n,l="function"==typeof t?t({...s,defaultStyle:i||{}}):t,c="function"==typeof r?r({...s,defaultChildren:a}):null==r?a:r,{className:e??o,style:l||i?{...i,...l}:void 0,children:c??a,"data-rac":""}},[n,t,r,o,a,i,s])}({...n,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:p,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),d=(0,uB.useCallback)(e=>{e.stopPropagation()},[]);return(0,fP.jsx)("span",{...m7(gf(n),a,i,c),...u,ref:o,style:a.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":p||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:d})}),w8={short:!1,size:"md"},w9=(0,uB.forwardRef)(function(e,n){let{className:t,defaultValue:r,isDisabled:o,invalid:a,invalidText:i,isInvalid:s,label:l,labelText:c,light:p,maxDate:u,minDate:d,onChange:f,onChangeRaw:h,short:m,size:g,value:y,...b}={...w8,...e},{calendar:v,intlLocale:$,today_:A}=ww(),w=(0,uB.useId)(),k=!!(c??l),x=(0,uB.useMemo)(()=>AE(r,v),[r,v]),C=(0,uB.useMemo)(()=>AE(y,v,!0),[y,v]),E=(0,uB.useMemo)(()=>AE(u,v),[u,v]),S=(0,uB.useMemo)(()=>AE(d??wk,v),[d,v]),D=(0,uB.useMemo)(()=>a||s,[a,s]),z=(0,uB.useMemo)(()=>(h&&f&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),h??(e=>f?.(AS(e)))),[h,f]);return(0,fP.jsx)(AC,{locale:$.toString(),children:(0,fP.jsx)("div",{className:fO()("cds--form-item",t),children:(0,fP.jsx)(m9,{values:[[wA,$]],children:(0,fP.jsxs)(Ak,{className:fO()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":m,"cds--date-picker--light":p}),defaultValue:x,isDisabled:o,isInvalid:D,maxValue:E,minValue:S,value:C,shouldForceLeadingZeros:"en"===$.language||void 0,...b,onChange:z,children:[(0,fP.jsxs)("div",{className:"cds--date-picker-container",children:[k&&(0,fP.jsx)($W,{className:fO()("cds--label",{"cds--label--disabled":o}),htmlFor:w,children:c??l}),(0,fP.jsxs)(vS,{className:w0.inputGroup,children:[(0,fP.jsx)(w3,{id:k?w:void 0,ref:n,className:fO()("cds--date-picker-input__wrapper",w0.inputWrapper,{[w0.inputWrapperSm]:"sm"===g,[w0.inputWrapperMd]:"md"===g||!g||0===g.length,[w0.inputWrapperLg]:"lg"===g}),children:e=>"era"!==e.type?(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e}):(0,fP.jsx)(uj().Fragment,{})}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,{[w0.flatButtonSm]:"sm"===g,[w0.flatButtonMd]:"md"===g||!g||0===g.length,[w0.flatButtonLg]:"lg"===g}),children:(0,fP.jsx)(w5,{})})]}),(0,fP.jsx)($j,{className:w0.invalidText,children:i})]}),(0,fP.jsx)(w2,{variant:"single",today_:A})]})})})})}),ke=(0,uB.forwardRef)(function({className:e,defaultValue:n,invalid:t,invalidText:r,isDisabled:o,isInvalid:a,label:i,labelText:s,light:l,maxDate:c,minDate:p,onChange:u,onChangeRaw:d,size:f="md",value:h,...m},g){let{calendar:y,intlLocale:b,today_:v}=ww(),$=(0,uB.useId)(),A=!!(s??i),w=(0,uB.useMemo)(()=>{if(h)return{start:AE(h[0],y,!1),end:AE(h[1],y,!1)}},[h,y]),k=(0,uB.useMemo)(()=>{if(n)return{start:AE(n[0],y,!1),end:AE(n[1],y,!1)}},[n,y]),x=(0,uB.useMemo)(()=>AE(p??wk,y,!0),[p,y]),C=(0,uB.useMemo)(()=>AE(c,y,!0),[c,y]),E=(0,uB.useMemo)(()=>t||a,[t,a]),S=(0,uB.useMemo)(()=>(d&&u&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),d??(e=>u?.([AS(e.start),AS(e.end)]))),[d,u]);return(0,fP.jsx)(AC,{locale:b.toString(),children:(0,fP.jsx)("div",{className:fO()("cds--form-item",e),children:(0,fP.jsx)(m9,{values:[[wA,b]],children:(0,fP.jsx)(Ax,{id:A?$:void 0,className:fO()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":o}),isInvalid:E,shouldForceLeadingZeros:"en"===b.language||void 0,maxValue:C,minValue:x,value:w,defaultValue:k,ref:g,isDisabled:o,...m,onChange:S,children:(0,fP.jsxs)("div",{className:"cds--date-picker-container",children:[A&&(0,fP.jsx)($W,{className:fO()("cds--label",{"cds--label--disabled":o}),htmlFor:$,children:s??i}),(0,fP.jsxs)(vS,{className:w0.inputGroup,children:[(0,fP.jsxs)("div",{className:fO()(w0.inputsWrapper,{[w0.inputsWrapperSm]:"sm"===f,[w0.inputsWrapperMd]:"md"===f||!f||0===f.length,[w0.inputsWrapperLg]:"lg"===f}),children:[(0,fP.jsx)($E,{className:fO()("cds--date-picker-input__wrapper",w0.startInput,w0.dateInputWrapper),slot:"start",children:e=>(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e})}),(0,fP.jsx)("div",{className:w0.separator,children:(0,fP.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,fP.jsx)($E,{className:fO()("cds--date-picker-input__wrapper",w0.endInput,w0.dateInputWrapper),slot:"end",children:e=>(0,fP.jsx)(w7,{className:w0.inputSegment,segment:e})})]}),(0,fP.jsx)(yN,{className:fO()(w0.flatButton,{[w0.flatButtonSm]:"sm"===f,[w0.flatButtonMd]:"md"===f||!f||0===f.length,[w0.flatButtonLg]:"lg"===f}),children:(0,fP.jsx)(w5,{})})]}),(0,fP.jsx)($j,{className:w0.invalidText,children:r}),(0,fP.jsx)(w2,{variant:"range",today_:v,minDate:x,maxDate:C})]})})})})})});var kn=t(3009),kt={};kt.styleTagTransform=fq(),kt.setAttributes=fW(),kt.insert=fF().bind(null,"head"),kt.domAPI=fj(),kt.insertStyleElement=fG(),fI()(kn.A,kt);let kr=kn.A&&kn.A.locals?kn.A.locals:void 0,ko=({diagnoses:e})=>{let{diagnosisTags:n}=dM({externalModuleName:"@openmrs/esm-styleguide"});return(0,fP.jsx)("div",{className:kr.container,children:e.map(e=>{let{rank:t,uuid:r,display:o}=e,a=n[1===t?"primaryColor":"secondaryColor"];return(0,fP.jsx)(f0.vwO,{type:a,children:o},r)})})};var ka=t(1719),ki={};ki.styleTagTransform=fq(),ki.setAttributes=fW(),ki.insert=fF().bind(null,"head"),ki.domAPI=fj(),ki.insertStyleElement=fG(),fI()(ka.A,ki);let ks=ka.A&&ka.A.locals?ka.A.locals:void 0,kl=({width:e="64",height:n="64"})=>(0,fP.jsx)("svg",{width:e,height:n,viewBox:"0 0 64 64",children:(0,fP.jsx)("use",{href:"#omrs-empty-data-illustration"})}),kc=e=>{let n="tablet"===d7(),t=e.launchForm;return(0,fP.jsx)(f0.Wdr,{className:ks.layer,children:(0,fP.jsxs)(f0.FAs,{className:ks.tile,children:[(0,fP.jsx)("div",{className:n?ks.tabletHeading:ks.desktopHeading,children:(0,fP.jsx)("h4",{children:e.headerTitle})}),(0,fP.jsx)(kl,{}),(0,fP.jsx)("p",{className:ks.content,children:o4("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,fP.jsx)("p",{className:ks.action,children:t&&(0,fP.jsx)(f0.$nd,{onClick:()=>t(),kind:"ghost",size:n?"lg":"sm",children:o4("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})};var kp=t(8749),ku={};ku.styleTagTransform=fq(),ku.setAttributes=fW(),ku.insert=fF().bind(null,"head"),ku.domAPI=fj(),ku.insertStyleElement=fG(),fI()(kp.A,ku);let kd=kp.A&&kp.A.locals?kp.A.locals:void 0,kf=({error:e,headerTitle:n})=>{let t="tablet"===d7();return(0,fP.jsx)(f0.Wdr,{children:(0,fP.jsxs)(f0.FAs,{className:kd.tile,children:[(0,fP.jsx)("div",{className:t?kd.tabletHeading:kd.desktopHeading,children:(0,fP.jsx)("h4",{children:n})}),(0,fP.jsxs)("p",{className:kd.errorMessage,children:[o4("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,fP.jsx)("p",{className:kd.errorCopy,children:o4("errorCopy")})]})})},kh=kf;var km=t(2849),kg={};kg.styleTagTransform=fq(),kg.setAttributes=fW(),kg.insert=fF().bind(null,"head"),kg.domAPI=fj(),kg.insertStyleElement=fG(),fI()(km.A,kg);let ky=km.A&&km.A.locals?km.A.locals:void 0,kb=uj().forwardRef((e,n)=>{let{slotName:t,basePath:r,componentContext:o,state:a}=fe(),i=window.location??{pathname:""},s=uK(t??"");return e.isChildOfHeader&&t&&s.length>0?(0,fP.jsxs)(f0.f8J,{"aria-label":o4("leftNavigation","Left navigation"),className:ky.leftNav,expanded:!0,isFixedNav:!0,ref:n,...e,children:[(0,fP.jsx)(uJ,{name:"global-nav-menu-slot"}),t?(0,fP.jsx)(dA,{value:o,fallback:(0,fP.jsx)(uJ,{name:t,state:{basePath:r,currentPath:i,...a}}),children:(0,fP.jsx)(uR.Provider,{value:o,children:(0,fP.jsx)(uJ,{name:t,state:{basePath:r,currentPath:i,...a}})})}):null]}):null});var k_=t(7553),kv={};kv.styleTagTransform=fq(),kv.setAttributes=fW(),kv.insert=fF().bind(null,"head"),kv.domAPI=fj(),kv.insertStyleElement=fG(),fI()(k_.A,kv);let k$=k_.A&&k_.A.locals?k_.A.locals:void 0,kA=({selectedLocationUuid:e,defaultLocationUuid:n,locationTag:t,locationsPerRequest:r=50,onChange:o})=>{let[a,i]=(0,uB.useState)(""),s=(0,uB.useId)(),{location:l}=function(e){let n=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:t,error:r,isLoading:o}=(0,dN.A)(n,oN,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,uB.useMemo)(()=>({location:t?.data?.entry?t.data.entry[0]:null,error:n?r:null,isLoading:!!n&&o}),[t,o,r,n])}(n),{locations:c,isLoading:p,hasMore:u,loadingNewData:d,error:f,setPage:h}=function(e,n=0,t=""){let r=dO(t),{data:o,isLoading:a,isValidating:i,setSize:s,error:l}=dQ(function(t,o){if(o){let e=o.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let n=new URL(e.url);return n.origin===window.location.origin?e.url:new URL(`${n.pathname}${n.search?`?${n.search}`:""}`,window.location.origin).toString()}let a=`${oP}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),n&&i.append("_count",""+n),t&&i.append("_getpagesoffset",""+t*n),e&&i.append("_tag",e),"string"==typeof r&&""!==r&&i.append("name:contains",r),a+i.toString()},oN);return(0,uB.useMemo)(()=>({locations:o?.length?o?.flatMap(e=>e?.data?.entry??[]):[],isLoading:a,totalResults:o?.[0]?.data?.total,hasMore:!!o?.length&&o?.[o.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[a,o,i,s,l])}(t,r,a),m=(0,uB.useMemo)(()=>l&&!a&&n?[l,...c.filter(({resource:e})=>e.id!==n)]:c??[],[l,c,n,a]),g=(0,uB.useCallback)(e=>{o(),i(e.trim())},[o]),y=fr((0,uB.useCallback)(()=>{!d&&u&&h(e=>e+1)},[d,u,h])),b=u?Math.max(0,Math.floor(m.length-r/2)):-1;return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)(f0.vji,{"aria-describedby":f?`${s}-error`:void 0,labelText:o4("searchForLocation"),id:s,placeholder:o4("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),f&&(0,fP.jsx)("div",{className:k$.errorNotification,id:`${s}-error`,children:(0,fP.jsx)(f0.jeF,{kind:"error",subtitle:o4("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:o4("error","Error")})}),(0,fP.jsx)("div",{className:k$.searchResults,children:p?(0,fP.jsx)("div",{className:k$.loadingContainer,children:Array.from({length:5}).map((e,n)=>(0,fP.jsx)(f0.Psq,{className:k$.radioButtonSkeleton,role:"progressbar"},n))}):(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("div",{className:k$.locationResultsContainer,children:m.length>0?(0,fP.jsx)(f0.zWQ,{name:"loginLocations",onChange:e=>{o(e?.toString())},orientation:"vertical",valueSelected:e,children:m.map((e,n)=>(0,fP.jsx)(f0.aaP,{className:k$.locationRadioButton,id:e.resource.id,labelText:(0,fP.jsx)("span",{ref:n===b?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,fP.jsx)("div",{className:k$.emptyState,children:(0,fP.jsx)("p",{className:k$.locationNotFound,children:o4("noResultsToDisplay")})})}),d&&(0,fP.jsx)("div",{className:k$.loadingIcon,children:(0,fP.jsx)(f0.OuH,{description:o4("loading")})})]})})]})},kw=G("modalState",{modalContainer:null,modalStack:[]}),kk=0;async function kx(e,n,t={}){let r=uv(n),o=null;if(e){if(!r)throw Error(`No modal named '${n}' has been registered.`);let{load:a}=r,i=await a(),s=kk++;o=rT({...i,name:`${n}-${s}`},{...t,domElement:e})}else O(`Failed to launch modal. Please notify your administrator. Modal name: ${n}`);return o}let kC=window.getComputedStyle(document.body).overflow;function kE({modalStack:e,modalContainer:n}){n&&(e.length?(n.style.visibility||(addEventListener("keydown",kD),document.body.style.overflow="hidden",n.style.visibility="unset"),e.forEach((t,r)=>{switch(t.state){case"NEW":{let e=function({size:e}){let n=document.createElement("div");return n.className=`cds--modal-container cds--modal-container--${e}`,n.setAttribute("role","dialog"),n.setAttribute("tabindex","-1"),n.setAttribute("aria-modal","true"),n}({size:t.props?.size??"md"});t.container=e,kx(e,t.modalName,t.props).then(r=>{t.parcel=r,t.state="MOUNTED",n.prepend(e),e.style.visibility="unset"});break}case"MOUNTED":t.container&&(t.container.style.visibility=r?"hidden":"unset");break;case"TO_BE_DELETED":t.onClose(),t.parcel?.unmount?.(),t.container?.remove(),setTimeout(()=>{kw.setState({modalContainer:n,modalStack:e.filter(e=>e!==t)})},0)}})):(n.style.removeProperty("visibility"),document.body.style.overflow=kC,removeEventListener("keydown",kD)))}function kS(e){let n=kw.getState(),t=n.modalStack.map(n=>n===e?{...n,state:"TO_BE_DELETED"}:n);kw.setState({...n,modalStack:t})}function kD(e){"Escape"===e.key&&function(){let[e]=kw.getState().modalStack;e&&kS(e)}()}function kz(e){kw.subscribe(kE),kw.setState({...kw.getState(),modalContainer:e})}function kM(e,n={},t=()=>{}){let r=()=>{let e=kw.getState().modalStack.find(e=>e.onClose===t);e&&kS(e)};if(uv(e)){var o;let a,i;o={state:"NEW",onClose:t,modalName:e,props:{close:r,...n}},i=[o,...(a=kw.getState()).modalStack],kw.setState({...a,modalStack:i})}else O(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}let kP=({notification:e})=>{let{description:n,action:t,kind:r,critical:o,title:a,onAction:i}=e;return(0,fP.jsx)(f0.kZS,{actionButtonLabel:t,kind:r||"info",lowContrast:o,subtitle:n,title:a||"",inline:!0,onActionButtonClick:i})},kT=({subject:e})=>{let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.description!==e.description||n.action!==e.action||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(kP,{notification:e},e.id))})},kO=({notification:e})=>{let{actionButtonLabel:n,onActionButtonClick:t=()=>{},subtitle:r,kind:o,title:a,critical:i,progressActionLabel:s,id:l,...c}=e,[p,u]=(0,uB.useState)(n);return(0,fP.jsx)(f0.kZS,{kind:o||"info",actionButtonLabel:p,ariaLabel:o4("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{t(),s&&u(s)},statusIconDescription:o4("actionableNotification","Actionable notification"),subtitle:r,title:a,lowContrast:i,inline:!0,...c})},kN=({subject:e})=>{let[n,t]=(0,uB.useState)([]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.subtitle!==e.subtitle||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(kO,{notification:e},e.id))})};var kI=t(3264),kB=Object.prototype.hasOwnProperty;let kj=function(e){if(null==e)return!0;if((0,eF.A)(e)&&((0,eR.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,eL.A)(e)||(0,eV.A)(e)||(0,ej.A)(e)))return!e.length;var n=(0,nd.A)(e);if("[object Map]"==n||"[object Set]"==n)return!e.size;if((0,eI.A)(e))return!(0,kI.A)(e).length;for(var t in e)if(kB.call(e,t))return!1;return!0},kR=new es.Subject,kF=0,kL=new es.Subject,kW=0;function kV(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(kT,{subject:kR}))}function kG(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&(n instanceof Error||!kj(n)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{kR.next({...e,id:kF++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function kU(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(kN,{subject:kL}))}function kq(e){var n;e&&("string"==typeof(n=e.actionButtonLabel)?n.trim().length>0:"object"==typeof n&&!kj(n))?setTimeout(()=>{kL.next({...e,id:kW++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let kH=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],kK=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"];var kY=t(2829),kZ={};kZ.styleTagTransform=fq(),kZ.setAttributes=fW(),kZ.insert=fF().bind(null,"head"),kZ.domAPI=fj(),kZ.insertStyleElement=fG(),fI()(kY.A,kZ);let kJ=kY.A&&kY.A.locals?kY.A.locals:void 0,kX=({value:e,unit:n,label:t,interpretation:r,referenceRange:o,conceptUuid:a,variant:i="card",patientUuid:s})=>{let l=(0,uB.useId)(),{referenceRange:c,isLoading:p}=function(e,n){let t=null;e&&(t=n?`${oM}/conceptreferencerange/?patient=${n}&concept=${e}&v=full`:`${oM}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:o,isLoading:a}=(0,dN.A)(t,oN),i=r?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:o,isLoading:a}}(o||r?void 0:a,s),u=o??c,d=(0,uB.useMemo)(()=>{if(r)return r?"--"===r?"normal":kH.includes(r)?r.toLowerCase():kK.includes(r)?r:"normal":void 0;if(u&&!p){if(!u||null==e||""===e)return"normal";let n="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(n)?"normal":null!==u.hiAbsolute&&void 0!==u.hiAbsolute&&n>u.hiAbsolute?"off_scale_high":null!==u.hiCritical&&void 0!==u.hiCritical&&n>=u.hiCritical?"critically_high":null!==u.hiNormal&&void 0!==u.hiNormal&&n>u.hiNormal?"high":null!==u.lowAbsolute&&void 0!==u.lowAbsolute&&n<u.lowAbsolute?"off_scale_low":null!==u.lowCritical&&void 0!==u.lowCritical&&n<=u.lowCritical?"critically_low":null!==u.lowNormal&&void 0!==u.lowNormal&&n<u.lowNormal?"low":"normal"}return"normal"},[r,u,e,p])??"normal",f="critically_low"===d||"critically_high"===d||"off_scale_low"===d||"off_scale_high"===d,h="normal"!==d,m=t?`omrs-numeric-obs-label-${t.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,b=null!=e&&""!==e,v=b?e:o4("notAvailable","Not available"),$=fO()({[kJ["critically-low"]]:"critically_low"===d||"off_scale_low"===d,[kJ["critically-high"]]:"critically_high"===d||"off_scale_high"===d,[kJ.low]:"low"===d,[kJ.high]:"high"===d,[kJ["off-scale-low"]]:"off_scale_low"===d,[kJ["off-scale-high"]]:"off_scale_high"===d}),A=fO()({[kJ.container]:!0,[kJ.card]:!0,[kJ["critical-value"]]:f,[kJ["abnormal-value"]]:h&&!f}),w=fO()({[kJ.cell]:!0,[$]:!0});return"cell"===i?(0,fP.jsxs)("div",{className:w,children:[v,b&&n?` ${n}`:""]}):(0,fP.jsxs)("section",{className:A,"data-testid":"numeric-observation-card",children:[t&&(0,fP.jsxs)("div",{className:kJ["label-container"],children:[(0,fP.jsx)("span",{id:m,className:kJ.label,children:t}),h&&(0,fP.jsx)("span",{className:kJ[d.replace("_","-")],title:o4("abnormalValue","Abnormal value")})]}),(0,fP.jsxs)("div",{className:kJ["value-container"],children:[(0,fP.jsx)("span",{id:g,"aria-labelledby":m&&y?`${m} ${y}`:m||y||void 0,className:kJ.value,children:v}),b&&n&&(0,fP.jsx)("span",{id:y,className:kJ.units,children:n})]})]})};var kQ=t(289),k0={};k0.styleTagTransform=fq(),k0.setAttributes=fW(),k0.insert=fF().bind(null,"head"),k0.domAPI=fj(),k0.insertStyleElement=fG(),fI()(kQ.A,k0);let k1=kQ.A&&kQ.A.locals?kQ.A.locals:void 0,k2=e=>{if("children"in e){let{children:n,className:t,...r}=e;return(0,fP.jsx)("div",{className:fO()(k1.pageHeader,t),...r,children:n})}{let{title:n,illustration:t,className:r,...o}=e;return(0,fP.jsx)("div",{className:fO()(k1.pageHeader,r),...o,children:(0,fP.jsx)(k3,{title:n,illustration:t})})}},k3=({title:e,illustration:n,className:t})=>{let[r,o]=(0,uB.useState)(null);return(0,uB.useEffect)(()=>{tx("@openmrs/esm-styleguide").then(e=>{o(e)})},[]),(0,fP.jsxs)("div",{className:fO()(k1.pageHeaderContent,t),children:[n,(0,fP.jsxs)("div",{className:k1.pageLabels,children:[r?.implementationName&&(0,fP.jsx)("p",{children:o4(r.implementationName)}),(0,fP.jsx)("p",{className:k1.pageName,children:e})]})]})};var k5=t(8739),k4={};k4.styleTagTransform=fq(),k4.setAttributes=fW(),k4.insert=fF().bind(null,"head"),k4.domAPI=fj(),k4.insertStyleElement=fG(),fI()(k5.A,k4);let k6=k5.A&&k5.A.locals?k5.A.locals:void 0,k7=({totalItems:e,pageSize:n,onPageNumberChange:t,pageNumber:r,dashboardLinkUrl:o,currentItems:a,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=fi(n,e,r,a),c="tablet"===d7(),p=o4("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,fP.jsx)(fP.Fragment,{children:e>0&&(0,fP.jsxs)("div",{className:fO()({[k6.tablet]:c,[k6.desktop]:!c}),children:[(0,fP.jsxs)("div",{children:[p,o&&(0,fP.jsx)(uF,{to:o,className:k6.configurableLink,children:i??o4("seeAll","See all")})]}),(0,fP.jsx)(f0.dKS,{className:k6.pagination,page:r,pageSize:n,pageSizes:s,totalItems:e,onChange:t,pageRangeText:(e,n)=>o4("paginationOfPages","of {{count}} pages",{count:n}),size:c?"lg":"sm"})]})})};function k8(e){return xe(xt(e,"usual","official"))}function k9(e){return k8(e)}function xe(e){var n;let t;return e?e.text??(t=(n=e).given??[],(n.family?t.concat(n.family):t).join(" ")):""}function xn(e){return xe(e)}function xt(e,...n){for(let t of(0==n.length&&(n=["usual"]),n)){let n=e.name?.find(e=>{var n,r;return n=e,r=t,n.use?n.use===r:"usual"===r});if(n)return n}}function xr(e,n=fh()()){let t=fh()(n),r=wm(e,t);if(null==r)return null;let o=t.diff(r,"hours"),a=t.diff(r,"days"),i=t.diff(r,"weeks"),s=t.diff(r,"months"),l=t.diff(r,"years"),c={};if(o<2)c.minutes=t.diff(r,"minutes");else if(a<2)c.hours=o;else if(i<4)c.days=a;else if(l<1){let e=t.subtract(i,"weeks").diff(r,"days");c.weeks=i,c.days=e}else if(l<2){let e=t.subtract(s,"months").diff(r,"days");c.months=s,c.days=e}else if(l<18){let e=t.subtract(l,"year").diff(r,"months");c.years=l,c.months=e}else c.years=l;return c}function xo(e,n=fh()()){let t=xr(e,n);if(null==t)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in t&&0===t.minutes&&(r.minutesDisplay="always"),wh(t,r)}var xa=t(6655),xi={};xi.styleTagTransform=fq(),xi.setAttributes=fW(),xi.insert=fF().bind(null,"head"),xi.domAPI=fj(),xi.insertStyleElement=fG(),fI()(xa.A,xi);let xs=xa.A&&xa.A.locals?xa.A.locals:void 0;function xl({showIdentifierLabel:e,type:n,value:t}){return(0,fP.jsx)("span",{className:xs.primaryIdentifier,children:(0,fP.jsxs)(f0.vwO,{className:xs.tag,type:"gray",children:[e&&n?.text&&(0,fP.jsxs)("span",{className:xs.label,children:[n.text,": "]}),(0,fP.jsx)("span",{className:xs.value,children:t})]})})}function xc({showIdentifierLabel:e,type:n,value:t}){return(0,fP.jsxs)(f0.lRv,{className:xs.secondaryIdentifier,id:`patient-banner-identifier-${t}`,children:[e&&(0,fP.jsxs)("span",{className:xs.label,children:[n?.text,": "]}),(0,fP.jsx)("span",{className:xs.value,children:t})]})}function xp({identifiers:e,showIdentifierLabel:n}){let{excludePatientIdentifierCodeTypes:t}=dM(),{primaryIdentifierCode:r}=fc(),o=e?.filter(e=>{let n=e.type?.coding?.[0]?.code;return n&&!t?.uuids.includes(n)})??[];return(0,fP.jsx)(fP.Fragment,{children:o?.length?o.map(({value:e,type:t},a)=>(0,fP.jsxs)(uj().Fragment,{children:[(0,fP.jsx)("span",{className:xs.identifier,children:t?.coding?.[0]?.code===r?(0,fP.jsx)(xl,{showIdentifierLabel:n,type:t,value:e}):(0,fP.jsx)(xc,{showIdentifierLabel:n,type:t,value:e})}),a<o.length-1&&(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"})]},e)):""})}let xu={Female:hB,Male:hj,Other:hR,Unknown:hF},xd=({gender:e})=>{let n=xu[e];return n?(0,fP.jsx)(n,{fill:"#525252"}):null},xf={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function xh({patient:e,renderedFrom:n}){var t;let r,o,a=k8(e),i=e?.gender&&(o=xf[r=(t=e.gender).toLowerCase()]??"Unknown",{displayText:o4(r,t),iconKey:o}),s=(0,uB.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:n}),[e.id,e,n]);return(0,fP.jsxs)("div",{className:xs.patientInfo,children:[(0,fP.jsx)("div",{className:fO()(xs.row,xs.patientNameRow),children:(0,fP.jsxs)("div",{className:xs.flexRow,children:[(0,fP.jsx)("span",{className:xs.patientName,children:a}),i&&(0,fP.jsxs)("div",{className:xs.gender,children:[(0,fP.jsx)(xd,{gender:i.iconKey}),(0,fP.jsx)("span",{children:i.displayText})]}),(0,fP.jsx)(uJ,{className:xs.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,fP.jsxs)("div",{className:xs.demographics,children:[e.birthDate&&(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("span",{children:xo(e.birthDate)}),(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"}),(0,fP.jsx)("span",{children:wl(e.birthDate,{time:!1})}),(0,fP.jsx)("span",{className:xs.separator,children:"\xb7"})]}),(0,fP.jsx)(xp,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,fP.jsx)(uJ,{className:xs.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xm=t(8282),xg=t(9355),xy={};xy.styleTagTransform=fq(),xy.setAttributes=fW(),xy.insert=fF().bind(null,"head"),xy.domAPI=fj(),xy.insertStyleElement=fG(),fI()(xg.A,xy);let xb=xg.A&&xg.A.locals?xg.A.locals:void 0;function x_({patient:e,patientUuid:n,actionsSlotName:t,additionalActionsSlotState:r}){let[o,a]=(0,uB.useState)(!1),{extensions:i}=uY(t),s="tablet"===d7(),l=ft(()=>a(!1),o),c=(0,uB.useRef)(null),p=(0,uB.useRef)(null),u=(0,uB.useId)(),d=`patient-actions-menu-trigger-${u}`,f=`patient-actions-menu-${u}`,h=(0,uB.useCallback)(()=>a(e=>!e),[]),m=(0,uB.useCallback)(()=>{a(!1),c.current?.focus()},[]),g=(0,uB.useCallback)(e=>{if("Escape"===e.key&&o){e.stopPropagation(),m();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&o){e.preventDefault();let n=p.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let t=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(n).indexOf(t);if(-1===r)return void n["ArrowDown"===e.key?0:n.length-1]?.focus();let o=r+("ArrowDown"===e.key?1:-1),a=o<0?n.length-1:o>=n.length?0:o;n[a]?.focus()}},[m,o]);(0,uB.useEffect)(()=>{if(o&&p.current){let e=p.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[o]);let y=(0,uB.useMemo)(()=>({patientUuid:n,patient:e,closeMenu:m,...r}),[n,e,m,r]);return 0===i.length?null:(0,fP.jsx)("div",{className:xb.overflowMenuContainer,children:(0,fP.jsxs)("div",{"data-overflow-menu":!0,className:fO()("cds--overflow-menu",f4.container),ref:l,children:[(0,fP.jsxs)("button",{className:fO()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":o},f4.overflowMenuButton),"aria-controls":f,"aria-expanded":o,"aria-haspopup":"true",id:d,onClick:h,onKeyDown:g,ref:c,children:[(0,fP.jsx)("span",{className:xb.actionsButtonText,children:o4("actions","Actions")})," ",(0,fP.jsx)(xm.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,fP.jsxs)("div",{className:fO()("cds--overflow-menu-options","cds--overflow-menu--flip",f4.menu,{[f4.show]:o}),"aria-labelledby":d,"data-floating-menu-direction":"bottom",id:f,onKeyDown:g,ref:p,role:"menu",tabIndex:-1,children:[(0,fP.jsx)("ul",{className:fO()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,fP.jsx)(uJ,{name:t,state:y},t)}),(0,fP.jsx)("span",{})]})]})})}var xv=t(5570),x$=t.n(xv);function xA(e){let{patientPhotoConceptUuid:n}=dM({externalModuleName:"@openmrs/esm-styleguide"}),t=n?`${oM}/obs?patient=${e}&concept=${n}&v=full`:null,{data:r,error:o,isLoading:a}=(0,dr.Ay)(e?t:null,oN),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:o,isLoading:a}}let xw=({width:e=56,height:n=56,"aria-label":t})=>{let{t:r}=(0,dt.useTranslation)();return(0,fP.jsxs)("svg",{"aria-label":t??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:n,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,fP.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,fP.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})};var xk=t(8689),xx={};xx.styleTagTransform=fq(),xx.setAttributes=fW(),xx.insert=fF().bind(null,"head"),xx.domAPI=fj(),xx.insertStyleElement=fG(),fI()(xk.A,xx);let xC=xk.A&&xk.A.locals?xk.A.locals:void 0;function xE({patientUuid:e,patientName:n,alt:t}){let{data:r,isLoading:o}=xA(e),[a,i]=(0,uB.useState)(null),[s,l]=(0,uB.useState)(!1),c=(0,uB.useMemo)(()=>x$().generate(e),[e]);(0,uB.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let n=!1,t=new Image;return t.onload=()=>{n||(i(e),l(!1))},t.onerror=()=>{n||(i(null),l(!1))},t.src=e,()=>{n=!0}}i(null),l(!1)},[r?.imageSrc]);let p=(0,uB.useMemo)(()=>t||(a?o4("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:n}):o4("patientAvatarAlt","Avatar for {{patientName}}",{patientName:n})),[t,a,n]);return o||s?(0,fP.jsx)(f0.ryE,{className:xC.skeleton,"data-testid":"skeleton-icon"}):r?.imageSrc&&!a?(0,fP.jsx)(xw,{"aria-label":o4("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:n})}):a?(0,fP.jsx)("div",{"aria-label":p,children:(0,fP.jsx)("img",{className:xC.avatar,src:a,alt:p,title:n})}):(0,fP.jsx)("div",{"aria-label":p,children:(0,fP.jsx)("div",{className:xC.avatar,title:n,style:{backgroundImage:c.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,fP.jsx)("span",{className:xC.initials,children:function(e,n=3){return e.split(/\s+/).filter(Boolean).slice(0,n).map(e=>e[0]).join("")}(n)})})})}var xS=t(9481),xD={};xD.styleTagTransform=fq(),xD.setAttributes=fW(),xD.insert=fF().bind(null,"head"),xD.domAPI=fj(),xD.insertStyleElement=fG(),fI()(xS.A,xD);let xz=xS.A&&xS.A.locals?xS.A.locals:void 0,xM=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],xP=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-appointments",pictogramProps:e})})),xT=xP,xO=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),xN=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),xI=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),xB=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),xj=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),xR=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),xF=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),xL=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-facility",pictogramProps:e})})),xW=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),xV=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),xG=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),xU=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),xq=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),xH=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),xK=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),xY=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-patients",pictogramProps:e})})),xZ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),xJ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),xX=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),xQ=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-registration",pictogramProps:e})})),x0=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),x1=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),x2=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-transfer",pictogramProps:e})})),x3=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-triage",pictogramProps:e})})),x5=(0,uB.memo)((0,uB.forwardRef)(function(e,n){return(0,fP.jsx)(x8,{ref:n,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),x4=xL,x6=xY,x7=(0,uB.memo)((0,uB.forwardRef)(function({pictogram:e,fallback:n,...t},r){let o=(0,uB.useRef)(document.getElementById(e));return(0,uB.useEffect)(()=>{let n=document.getElementById("omrs-svgs-container"),t=new MutationObserver(n=>{for(let t of n)"childList"===t.type&&(o.current=document.getElementById(e))});return n&&t.observe(n,{childList:!0}),()=>t.disconnect()},[e]),(0,fP.jsx)(dA,{value:o.current,fallback:n,children:(0,fP.jsx)(x8,{ref:r,pictogram:e,pictogramProps:t})})})),x8=(0,uB.memo)((0,uB.forwardRef)(function({pictogram:e,pictogramProps:n},t){let{className:r,size:o}=Object.assign({},{size:92},n);return(o<=26||o>144)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 92.`),o=92),(0,fP.jsx)("svg",{ref:t,className:fO()(xz.pictogram,r),height:o,width:o,children:(0,fP.jsx)("use",{href:`#${e}`})})})),x9=({children:e})=>"tablet"===d7()?(0,fP.jsx)(f0.Wdr,{children:e}):(0,fP.jsx)(fP.Fragment,{children:e});var Ce=t(514),Cn={};Cn.styleTagTransform=fq(),Cn.setAttributes=fW(),Cn.insert=fF().bind(null,"head"),Cn.domAPI=fj(),Cn.insertStyleElement=fG(),fI()(Ce.A,Cn);let Ct=Ce.A&&Ce.A.locals?Ce.A.locals:void 0,Cr=({snackbar:e,closeSnackbar:n})=>{let{actionButtonLabel:t="",kind:r="success",onActionButtonClick:o=()=>{},isLowContrast:a="error"!==r,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:c="error"!==r,title:p,id:u,...d}=e,[f,h]=(0,uB.useState)(t),[m,g]=(0,uB.useState)(!0),[y,b]=(0,uB.useState)(!1),v=(0,uB.useCallback)(()=>{setTimeout(n,250)},[n]),$=(0,uB.useCallback)(()=>{b(!0),v()},[v]);return(0,uB.useEffect)(()=>{if(c){let e=setTimeout($,l);return()=>clearTimeout(e)}},[l,c,$]),(0,uB.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,fP.jsx)(f0.kZS,{actionButtonLabel:f,"aria-label":o4("closeSnackbar","Close snackbar"),className:fO()(Ct.slideIn,{[Ct.animated]:m,[Ct.slideOut]:y}),kind:r,lowContrast:a,onActionButtonClick:()=>{o(),$(),i&&h(i)},onClose:v,statusIconDescription:o4("snackbarNotification","Snackbar notification"),subtitle:s,title:p,...d})},Co=({subject:e})=>{let[n,t]=(0,uB.useState)([]),r=(0,uB.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.subtitle!==e.subtitle||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick||n.kind!==e.kind||n.title!==e.title),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(Cr,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},Ca=new es.Subject,Ci=0;function Cs(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(Co,{subject:Ca}))}function Cl(e){var n;e&&"string"==typeof(n=e.title)&&n.trim().length>0?setTimeout(()=>{Ca.next({...e,id:Ci++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let Cc=({toast:e,closeToast:n})=>{let{description:t,kind:r,critical:o,title:a,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,uB.useCallback)(()=>{s(),n()},[n,s]);return(0,fP.jsx)("div",{children:(0,fP.jsx)(f0.kZS,{actionButtonLabel:i,kind:r||"info",lowContrast:o,subtitle:t,title:a||"",onActionButtonClick:l,onClose:n})})},Cp=({subject:e})=>{let[n,t]=(0,uB.useState)([]),r=(0,uB.useCallback)(e=>{t(n=>n.filter(n=>n!==e))},[]);return(0,uB.useEffect)(()=>{let n=e.subscribe(e=>t(n=>[...n.filter(n=>n.description!==e.description||n.kind!==e.kind||n.title!==e.title||n.actionButtonLabel!==e.actionButtonLabel||n.onActionButtonClick!==e.onActionButtonClick),e]));return()=>n.unsubscribe()},[e]),(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsx)(Cc,{toast:e,closeToast:()=>r(e)},e.id))})},Cu=new es.Subject,Cd=0;function Cf(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(Cp,{subject:Cu}))}function Ch(e){var n;e&&("string"==typeof(n=e.description)?n.trim().length>0:"object"==typeof n&&!kj(n))?setTimeout(()=>{Cu.next({...e,id:Cd++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function Cm(e,n=!1){if(n)return!0;let t=Cv[e];return!t||!t()}function Cg(e,n){let t=CS.getState()?.workspaceGroup,r=t?.name;r&&e===r&&CP(()=>{let r=CB(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof t?.cleanup&&t.cleanup(),CS.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof n&&n()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function Cy(e,n){let{name:t,additionalProps:r}=n;uC(t);let o=()=>{Cx(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>Cb(t,r),closeWorkspaceGroup:!1})};Cm(e.name)?o():CO("closing-workspace-launching-new-workspace",o,e.title??e.name)}function Cb(e,n){let t=uC(e),r=CS.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void Cg(r.name,()=>{Cb(e,n)});let o=CS.getState().workspaceGroup?.name,a={...t,title:CN(t,n),closeWorkspace:(n={})=>Cx(e,n),closeWorkspaceWithSavedChanges:n=>Cx(e,{ignoreChanges:!0,...n}),promptBeforeClosing:n=>{var t,r;return t=e,r=n,void(Cv[t]=r)},setTitle:(n,t)=>{a.title=n,a.titleNode=t,CS.setState(n=>{let t=n.openWorkspaces.map(n=>n.name===e?a:n);return{...n,openWorkspaces:t}})},currentWorkspaceGroup:o,additionalProps:n??{}};function i(e,n){CS.setState(t=>{let r=[e,...n??t.openWorkspaces],o=CM(e);return{...t,openWorkspaces:r,workspaceWindowState:o}})}o&&CB(o,n);let s=CS.getState().openWorkspaces,l=s.findIndex(n=>n.name===e),c=s.find(e=>e.type==a.type);if(0===s.length)i(a);else if(s[0].canHide||0===l)if(l>=0){let n=s[l];i({...n,additionalProps:a.additionalProps,...n.title===CN(n,n.additionalProps)&&{title:CN(a,a.additionalProps)}},s.filter(n=>n.name!=e))}else c?(i(c,CS.getState().openWorkspaces.filter(e=>e.type!=a.type)),Cy(c,{name:e,additionalProps:n})):i(a);else Cy(s[0],{name:e,additionalProps:n})}function C_({targetUrl:e,contextKey:n,workspaceName:t,additionalProps:r}){CC(n),Cb(t,r),o$({to:e})}let Cv={};function C$(e,n){Cv[e]=n}function CA(e){return Cv[e]}function Cw(){let e=CS.getState();CS.setState({...e,prompt:null})}let Ck={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function Cx(e,n={}){n={...Ck,...n};let t=()=>{let t=CS.getState();t.openWorkspaces.find(n=>n.name===e);let r=t.openWorkspaces.filter(n=>n.name!=e),o=CS.getState().workspaceGroup?.name;o&&n.closeWorkspaceGroup&&Cg(o),Cv[e]=()=>!1,CS.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:CM(r?.[0])})),n?.onWorkspaceClose?.()};return Cm(e,n?.ignoreChanges)?(t(),!0):(CO("closing-workspace",t,uC(e).title??e),!1)}function CC(e){CS.getState().context!=e&&CS.setState({context:e,openWorkspaces:[],prompt:null})}let CE={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},CS=G("workspace",CE);function CD(){return CS}function Cz(e){let n=CS.getState();CS.setState({...n,workspaceWindowState:e})}function CM(e){return e?.preferredWindowSize??"normal"}function CP(e=()=>{},n=()=>!0){let t=CS.getState().openWorkspaces.filter(n).every(({name:e})=>Cm(e)),r=()=>{CI(),e?.()};t?r():CO("closing-all-workspaces",r)}function CT(){let{workspaceWindowState:e,openWorkspaces:n,prompt:t,workspaceGroup:r}=uG(CS);return(0,uB.useMemo)(()=>({active:n.length>0,prompt:t,workspaceWindowState:e,workspaces:n,workspaceGroup:r}),[n,e,t,r])}function CO(e,n=()=>{},t=""){let r;switch(e){case"closing-workspace":r={title:o4("unsavedChangesTitleText","Unsaved changes"),body:o4("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{n?.()},confirmText:o4("discard","Discard")};break;case"closing-all-workspaces":{let e=CS.getState().openWorkspaces.filter(({name:e})=>!Cm(e)).map(({title:e},n)=>`${n+1}. ${e}`);r={title:o4("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:o4("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{n?.()},confirmText:o4("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:o4("unsavedChangesTitleText","Unsaved changes"),body:o4("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:t}),onConfirm:()=>{CS.setState(e=>({...e,prompt:null})),n?.()},confirmText:o4("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),n?.();return}CS.setState(e=>({...e,prompt:r}))}function CN(e,n){return n?.workspaceTitle??e.title}function CI(){CS.setState(CE)}function CB(e,n={}){if(!e||"default"===e)return;let t=q(e,{});return n&&t.setState(e=>({...e,...n})),t}var Cj=t(4250),CR={};CR.styleTagTransform=fq(),CR.setAttributes=fW(),CR.insert=fF().bind(null,"head"),CR.domAPI=fj(),CR.insertStyleElement=fG(),fI()(Cj.A,CR);let CF=Cj.A&&Cj.A.locals?Cj.A.locals:void 0;function CL({getIcon:e,formOpenInTheBackground:n,tagContent:t}){return(0,fP.jsxs)(fP.Fragment,{children:[e({size:16}),n?(0,fP.jsx)("span",{className:CF.interruptedTag,children:"!"}):(0,fP.jsx)("span",{className:CF.countTag,children:t})]})}let CW=({getIcon:e,label:n,iconDescription:t,handler:r,type:o,tagContent:a})=>{let i=d7(),{workspaces:s,workspaceWindowState:l}=CT(),c=s?.findIndex(({type:e})=>e===o)??-1,p="hidden"!==l&&0===c,u=c>0||0===c&&"hidden"===l;return"tablet"===i||"phone"===i?(0,fP.jsxs)(f0.$nd,{className:fO()(CF.container,{[CF.active]:p}),iconDescription:t,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,fP.jsx)("span",{className:CF.elementContainer,children:(0,fP.jsx)(CL,{formOpenInTheBackground:u,getIcon:e,tagContent:a})}),(0,fP.jsx)("span",{children:n})]}):(0,fP.jsx)(f0.K0,{align:"left","aria-label":t,className:fO()(CF.container,{[CF.active]:p}),enterDelayMs:300,kind:"ghost",label:n,onClick:r,size:"md",children:(0,fP.jsx)("div",{className:CF.elementContainer,children:(0,fP.jsx)(CL,{formOpenInTheBackground:u,getIcon:e,tagContent:a})})})};var CV=t(4240),CG=t(8622),CU=/[\\^$.*+?()[\]{}|]/g,Cq=RegExp(CU.source);let CH=function(e){return(e=nq(e))&&Cq.test(e)?e.replace(CU,"\\$&"):e};var CK=t(2474),CY={};CY.styleTagTransform=fq(),CY.setAttributes=fW(),CY.insert=fF().bind(null,"head"),CY.domAPI=fj(),CY.insertStyleElement=fG(),fI()(CK.A,CY);let CZ=CK.A&&CK.A.locals?CK.A.locals:void 0;function CJ({contextKey:e}){let{prompt:n}=CT();return(0,uB.useEffect)(()=>{RegExp(`/${CH(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,uB.useEffect)(()=>(CC(e),()=>{CC(null)}),[e]),(0,uB.useEffect)(()=>{let n=n=>{let{detail:{cancelNavigation:t,newUrl:r}}=n,o=RegExp(`/${CH(e)}(/|$)`),a=new URL(r),i=o.test(a.pathname),s=CS.getState().openWorkspaces.every(({name:e})=>Cm(e));i||(s?CI():(t?.(),CP(()=>{o$({to:r})})))};return window.addEventListener("single-spa:before-routing-event",n),()=>{window.removeEventListener("single-spa:before-routing-event",n)}},[]),null!=n?(0,fP.jsxs)(f0.KXP,{open:!0,onClose:Cw,children:[(0,fP.jsx)(f0.rQ0,{title:n.title}),(0,fP.jsx)(f0.cwr,{children:(0,fP.jsx)("p",{className:CZ.messageBody,children:n.body})}),(0,fP.jsxs)(f0.jlY,{children:[(0,fP.jsx)(f0.$nd,{kind:"secondary",onClick:Cw,children:n.cancelText??o4("cancel")}),(0,fP.jsx)(f0.$nd,{kind:"danger",onClick:n.onConfirm,children:n.confirmText??o4("confirm")})]})]}):null}function CX(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function CQ(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?CX(Object(t),!0).forEach(function(n){C1(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):CX(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function C0(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C1(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C2(e){return(C2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C3(e,n){return(C3=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function C5(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var C4=function(e){var n=uB.Component;if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),n&&C3(i,n);var t,r,o,a=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=C2(i);e=t?Reflect.construct(n,arguments,C2(this).constructor):n.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return C5(this)});function i(e){var n;if(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}(this,i),C1(C5(n=a.call(this,e)),"handleRef",function(e){n.el=e}),C1(C5(n),"addThingToDo",function(e,t){n.state.hasError&&"unmount"!==e||(n.nextThingToDo=(n.nextThingToDo||Promise.resolve()).then(function(){if(!n.unmounted||"unmount"===e)return t.apply(void 0,arguments)}).catch(function(t){throw n.nextThingToDo=Promise.resolve(),n.setState({hasError:!0}),t&&t.message&&(t.message="During '".concat(e,"', parcel threw an error: ").concat(t.message)),n.props.handleError?n.props.handleError(t):setTimeout(function(){throw t}),t}))}),C1(C5(n),"getParcelProps",function(){var e=CQ(CQ({},n.props),{},{domElement:n.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),n.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return n}return r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var n,t=e.props.mountParcel||e.mountParcel;if(!t)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?n=e.el:(e.createdDomElement=n=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(t){n.style[t]=e.props.wrapStyle[t]}),e.props.appendTo.appendChild(n)),e.parcel=t(e.props.config,CQ({domElement:n},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return u5&&u5.Consumer?uB.createElement(u5.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):null;var n=u5&&u5.Consumer?uB.createElement(u5.Consumer,null,function(n){return e.mountParcel=n?n.mountParcel:null,null}):void 0;return uB.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},n)}}],C0(i.prototype,r),o&&C0(i,o),i}();C1(C4,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});var C6=t(6748),C7={};C7.styleTagTransform=fq(),C7.setAttributes=fW(),C7.insert=fF().bind(null,"head"),C7.domAPI=fj(),C7.insertStyleElement=fG(),fI()(C6.A,C7);let C8=C6.A&&C6.A.locals?C6.A.locals:void 0;function C9({workspace:e,additionalPropsFromPage:n}){let[t,r]=(0,uB.useState)(),o=function(e){let[n,t]=(0,uB.useState)({}),[r,o]=(0,uB.useState)(e);return(0,uB.useEffect)(()=>{r!==e&&o(e)},[e]),(0,uB.useEffect)(()=>{let e,n=CB(r);return n&&(t(n.getState()),e=n.subscribe(t)),()=>{n&&e?.()}},[r]),n}(e.currentWorkspaceGroup);(0,uB.useEffect)(()=>{let n=!0;return e.load().then(e=>{n&&r(e)}),()=>{n=!1}},[e]);let a=(0,uB.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...n,...o,...e.additionalProps},[e,n,o]);return t?(0,fP.jsx)(C4,{config:t,mountParcel:rT,...a},e.name):(0,fP.jsx)(f0.OuH,{className:C8.loader,description:`${o4("loading","Loading")} ...`})}var Ee=t(801),En={};En.styleTagTransform=fq(),En.setAttributes=fW(),En.insert=fF().bind(null,"head"),En.domAPI=fj(),En.insertStyleElement=fG(),fI()(Ee.A,En);let Et=Ee.A&&Ee.A.locals?Ee.A.locals:void 0;function Er({isWithinWorkspace:e,name:n,actionMenuProps:t={}}){let[r,o]=(0,uB.useState)(!1),a=(0,uB.useRef)(window.innerHeight),{featureName:i}=(0,uB.useContext)(uR),s=d7();(0,uB.useEffect)(()=>{let e=()=>{o(!d8(s)&&a.current>window.innerHeight),a.current!=window.innerHeight&&(a.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a]);let l=`action-menu-${n&&"default"!=n?n:i}-items-slot`;return(0,fP.jsx)("aside",{className:fO()(Et.sideRail,{[Et.withinWorkspace]:e,[Et.sideRailHidden]:r,[Et.sideRailVisible]:!r}),children:(0,fP.jsx)("div",{className:Et.container,children:(0,fP.jsx)(uJ,{className:Et.chartExtensions,name:l,state:t})})})}function Eo({contextKey:e,overlay:n,showSiderailAndBottomNav:t,additionalWorkspaceProps:r,actionMenuProps:o}){let a=d7(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=CT(),c=l?.name,p=i[0],u="hidden"===s||null==p,d=p?.width??(n?"wider":"narrow"),f=(0,uB.useMemo)(()=>t||c&&!u,[c,u,t]);return dS(!u&&!d8(a)),(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)("div",{className:t?C8.workspaceContainerWithActionMenu:C8.workspaceContainerWithoutActionMenu,children:[(0,fP.jsx)("aside",{className:fO()(n?C8.workspaceOverlayOuterContainer:C8.workspaceWindowSpacer,{[C8.hiddenRelative]:u,[C8.narrowWorkspace]:"narrow"===d,[C8.widerWorkspace]:"wider"===d,[C8.extraWideWorkspace]:"extra-wide"===d}),children:(0,fP.jsx)("div",{className:fO()(C8.workspaceFixedContainer,{[C8.maximizedWindow]:"maximized"===s,[C8.hiddenFixed]:u}),children:i.map((e,n)=>(0,fP.jsx)("div",{className:fO()(C8.workspaceInnerContainer,{[C8.hiddenExtraWorkspace]:0!==n}),children:(0,fP.jsx)(uB.Suspense,{fallback:null,children:(0,fP.jsx)(dt.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,fP.jsx)(Ea,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${n}`}`))})}),(0,fP.jsx)(CJ,{contextKey:e})]}),f&&(0,fP.jsx)(Er,{name:c,isWithinWorkspace:!t,actionMenuProps:o})]})}function Ea({workspaceInstance:e,additionalWorkspaceProps:n}){let{t}=(0,dt.useTranslation)(),r=d7(),{workspaceWindowState:o,workspaceGroup:a}=CT(),i=a?.name,s="maximized"===o;(0,uB.useEffect)(()=>{let n=t(e.title);n!==e.title&&e.setTitle(n)},[e.title,t,e.setTitle]);let{featureName:l}=(0,uB.useContext)(uR),c=(0,uB.useCallback)(()=>{Cz(s?"normal":"maximized")},[s]),{canHide:p=!1,canMaximize:u=!1,currentWorkspaceGroup:d="",closeWorkspace:f}=(0,uB.useMemo)(()=>e??{},[e]),h=(0,uB.useMemo)(()=>({...n,...e?.additionalProps}),[n,e]);return e&&(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)(f0.Y9Y,{"aria-label":o4("workspaceHeader","Workspace Header"),className:C8.header,children:[!d8(r)&&!p&&(0,fP.jsx)(f0.dJ2,{"aria-label":o4("close","Close"),renderMenuIcon:(0,fP.jsx)(hl,{}),onClick:()=>f()}),(0,fP.jsx)(f0.bCw,{prefix:"",children:e.titleNode??t(e.title)}),(0,fP.jsx)("div",{className:C8.overlayHeaderSpacer}),(0,fP.jsxs)(f0.wdv,{className:C8.headerButtons,children:[(0,fP.jsx)(uJ,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:h}),(0,fP.jsx)(uJ,{name:`workspace-header-type-${e.type}-slot`,state:h}),(0,fP.jsx)(uJ,{name:`workspace-header-${l}-slot`,state:h}),d8(r)&&(0,fP.jsxs)(fP.Fragment,{children:[(u||s)&&(0,fP.jsx)(f0.V8d,{"aria-label":s?o4("minimize","Minimize"):o4("maximize","Maximize"),onClick:c,children:s?(0,fP.jsx)(CV.Xj,{}):(0,fP.jsx)(CV.hz,{})}),p&&!i?(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide","Hide"),onClick:()=>Cz("hidden"),children:(0,fP.jsx)(hc,{})}):(0,fP.jsx)(f0.V8d,{"aria-label":o4("close","Close"),onClick:()=>f?.(),children:(0,fP.jsx)(hE,{})})]}),"tablet"===r&&p&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("close","Close"),onClick:()=>f?.(),children:(0,fP.jsx)(CG.d3,{})})]})]}),(0,fP.jsx)("div",{className:fO()(C8.workspaceContent,{[C8.marginWorkspaceContent]:!!d}),children:(0,fP.jsx)(C9,{workspace:e,additionalPropsFromPage:n},e.name)})]})}async function Ei(e,n){let{openedGroup:t}=uS.getState();if(t){if(t.groupName===e&&Ec(t.props,n))return!0;else if(!await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return uS.setState(t=>({...t,openedGroup:{groupName:e,props:n},openedWindows:[]})),!0}async function Es(e){let{openedGroup:n,openedWindows:t}=uS.getState();if(n){if(t.length>0&&!(e||await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;uS.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function El(e,n=null,t=null,r=null){let o=uS.getState();if(!o.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let a=uD(e);if(!a)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=o,{name:s}=a,l=uz(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${a.name} is not registered to a workspace group`);let c=uM(e);if(i&&(i.groupName!==l.name||!Ec(i.props,r)))return!!await Ep({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(c>=0){let r=o.openedWindows[c],a=o.openedGroup?.props??{},i=o.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:p}=r;if(Ec(r.props,t)){let u=p.find(n=>n.workspaceName===e);return u&&Ec(u.props,n)?((i||c!==o.openedWindows.length-1)&&uS.setState(Eu.restoreWindow(o,s)),!0):!!await Ep({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:o?.openedGroup?.props??a},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[Em(e,n)],props:r?.props??t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Ep({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:a??o?.openedGroup?.props},openedWindows:[...o.openedWindows.filter((e,n)=>n!==c),{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(uS.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[...o.openedWindows,{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Ep({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:a.name})&&(uS.setState({...o,openedGroup:{groupName:l.name,props:r??o?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Em(e,n)],props:t,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function Ec(e,n){return null==e||null==n||B(e,n)}function Ep(e){function n(e,n){let t=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let o=e.openedWorkspaces[r];if(o.hasUnsavedChanges&&t.push(o),n&&o.workspaceName===n)break}return t}let{openedWindows:t,workspaceTitleByWorkspaceName:r}=uS.getState(),o=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":o=t.flatMap(e=>n(e));break;case"CLOSE_WINDOW":{let r=t.find(n=>n.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(r);break}case"CLOSE_WORKSPACE":{let r=t.find(n=>n.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);o=n(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":o=t.filter(n=>n.windowName!==e.windowNameToSpare).flatMap(e=>n(e))}return 0===o.length?Promise.resolve(!0):new Promise(e=>{let n=kM("workspace2-close-prompt",{size:"sm",onConfirm:()=>{n(),e(!0)},onCancel:()=>{n(),e(!1)},affectedWorkspaceTitles:o.map(e=>r[e.workspaceName])})})}let Eu={setWindowMaximized(e,n,t){let r=e.openedWindows.findIndex(e=>e.windowName===n),o=[...e.openedWindows],a={...o[r],maximized:t};return o[r]=a,{...e,openedWindows:o}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,n){let t=e.openedWindows.findIndex(e=>e.windowName===n),r=e.openedWindows[t],o=[...e.openedWindows.filter((e,n)=>n!==t),r];return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,n){let t=uM(n);if(t<0)return e;let r={...e.openedWindows[t]},o=r.openedWorkspaces.findIndex(e=>e.workspaceName===n),a=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,o);let i=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let n=t===e.openedWindows.length-1;a.splice(t,1),n&&a.length>0&&(i=!1)}else a[t]=r;return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,n,t,r){let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);if(a.window!==o.window)throw Error(`Child workspace ${t} does not belong to the same workspace window as parent workspace ${n}`);let i=e.openedWindows.findIndex(e=>e.windowName===o.window);if(-1==i)throw Error(`Cannot open child workspace ${t} as window ${o.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===n);if(-1===l)throw Error(`Cannot open child workspace ${t} from parent workspace ${n} as the parent is not opened within the workspace window`);let c=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,n)=>n==i?{...e,openedWorkspaces:[...c,Em(t,r)]}:e)}},setHasUnsavedChanges(e,n,t){let r=uM(n);if(r<0)return e;let o={...e.openedWindows[r]},a=o.openedWorkspaces.findIndex(e=>e.workspaceName===n);if(a<0)return e;o.openedWorkspaces[a]={...o.openedWorkspaces[a],hasUnsavedChanges:t};let i=[...e.openedWindows];return i[r]=o,{...e,openedWindows:i}},setWorkspaceTitle(e,n,t){let r={...e.workspaceTitleByWorkspaceName};return null===t?delete r[n]:r[n]=t,{...e,workspaceTitleByWorkspaceName:r}}};function Ed(){return uU(uS,Eu)}let Ef=()=>(0,uB.useContext)(u5),Eh=()=>Object.keys(uS.getState().registeredWorkspacesByName);function Em(e,n){return{workspaceName:e,props:n??{},hasUnsavedChanges:!1,uuid:cL()}}var Eg=t(9572),Ey={};Ey.styleTagTransform=fq(),Ey.setAttributes=fW(),Ey.insert=fF().bind(null,"head"),Ey.domAPI=fj(),Ey.insertStyleElement=fG(),fI()(Eg.A,Ey);let Eb=Eg.A&&Eg.A.locals?Eg.A.locals:void 0,E_=({title:e,children:n,hasUnsavedChanges:t=!1})=>{let r=d7(),{setWindowMaximized:o,hideWindow:a,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:c,registeredWindowsByName:p,registeredWorkspacesByName:u,workspaceTitleByWorkspaceName:d,setWorkspaceTitle:f,isMostRecentlyOpenedWindowHidden:h}=Ed(),{workspaceName:m,isRootWorkspace:g,closeWorkspace:y,showActionMenu:b}=Ef(),v=uM(m),$=s[v],A=$?.openedWorkspaces.find(e=>e.workspaceName===m);if((0,uB.useEffect)(()=>{A?.hasUnsavedChanges!=t&&i(m,t??!1)},[A?.hasUnsavedChanges,t,m,i]),(0,uB.useEffect)(()=>{d[m]!==e&&f(m,e)},[d,m,e,f]),v<0||null==l||null==A)return null;let w=c[l.groupName];if(!w)throw Error(`Cannot find registered workspace group ${l.groupName}`);let k=u[m].window,x=p[k];if(!x)throw Error(`Cannot find registered workspace window ${k}`);let{icon:C,canMaximize:E}=x,S="closable"===w.persistence,D=!!C&&!S,{maximized:z}=$,M=x?.width??"narrow",P=Object.values(p).some(e=>e.group===l.groupName&&void 0!==e.icon),T=v<s.length-1||h;return(0,fP.jsxs)("div",{className:fO()(Eb.workspaceOuterContainer,{[Eb.narrowWorkspace]:"narrow"===M,[Eb.widerWorkspace]:"wider"===M,[Eb.extraWideWorkspace]:"extra-wide"===M,[Eb.isActionMenuOpened]:P}),children:[(0,fP.jsx)("div",{className:fO()(Eb.workspaceSpacer,{[Eb.hidden]:T})}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceMiddleContainer,{[Eb.maximized]:z,[Eb.hidden]:T,[Eb.isRootWorkspace]:g,[Eb.showActionMenu]:b}),children:(0,fP.jsxs)("div",{className:fO()(Eb.workspaceInnerContainer,{[Eb.maximized]:z,[Eb.hidden]:T,[Eb.isRootWorkspace]:g}),children:[(0,fP.jsxs)(f0.Y9Y,{"aria-label":o4("workspaceHeader"),className:Eb.header,children:[(0,fP.jsx)(f0.bCw,{prefix:"",children:e}),(0,fP.jsx)("div",{className:Eb.overlayHeaderSpacer}),(0,fP.jsx)(f0.wdv,{className:Eb.headerButtons,children:d8(r)?(0,fP.jsxs)(fP.Fragment,{children:[(E||z)&&(0,fP.jsx)(f0.V8d,{"aria-label":z?o4("minimize"):o4("maximize"),onClick:()=>o(k,!z),children:z?(0,fP.jsx)(CV.Xj,{}):(0,fP.jsx)(CV.hz,{})}),D&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide"),onClick:()=>a(),children:(0,fP.jsx)(hc,{})}),!S&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("close"),onClick:()=>y({closeWindow:!0}),children:(0,fP.jsx)(hE,{})})]}):(0,fP.jsxs)(fP.Fragment,{children:[D&&(0,fP.jsx)(f0.V8d,{"aria-label":o4("hide"),onClick:()=>a(),children:(0,fP.jsx)(CG.d3,{})}),(0,fP.jsx)(f0.V8d,{"aria-label":o4("close"),onClick:()=>{S?Es():y({closeWindow:!0})},children:(0,fP.jsx)(hE,{})})]})})]}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceContent),children:n})]})})]})};var Ev=t(9625),E$={};E$.styleTagTransform=fq(),E$.setAttributes=fW(),E$.insert=fF().bind(null,"head"),E$.domAPI=fj(),E$.insertStyleElement=fG(),fI()(Ev.A,E$);let EA=Ev.A&&Ev.A.locals?Ev.A.locals:void 0;function Ew({getIcon:e,hasUnsavedChanges:n,tagContent:t}){return(0,fP.jsxs)(fP.Fragment,{children:[e({size:16}),n?(0,fP.jsx)("span",{className:EA.interruptedTag,children:"!"}):(0,fP.jsx)("span",{className:EA.countTag,children:t})]})}let Ek=({icon:e,label:n,tagContent:t,workspaceToLaunch:r,onBeforeWorkspaceLaunch:o})=>{let a=d7(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:c}=Ed(),{extension:p}=(0,uB.useContext)(uR),u=i.findIndex(e=>e.windowName===p?.extensionId),d=i[u],f=null!=d,h=f&&(u<i.length-1||c),m=f&&!h,g=d?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(f)h?s(d.windowName):l();else if(await (o?.()??!0)){let{workspaceName:e,workspaceProps:n,windowProps:t}=r;El(e,n,t)}};return"tablet"===a||"phone"===a?(0,fP.jsxs)(f0.$nd,{className:fO()(EA.container,{[EA.active]:f&&!m,[EA.focused]:m}),iconDescription:n,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,fP.jsx)("span",{className:EA.elementContainer,children:(0,fP.jsx)(Ew,{hasUnsavedChanges:g,getIcon:e,tagContent:t})}),(0,fP.jsx)("span",{children:n})]}):(0,fP.jsx)(f0.K0,{align:"left","aria-label":n,className:fO()(EA.container,{[EA.active]:f&&!m,[EA.focused]:m}),enterDelayMs:300,kind:"ghost",label:n,onClick:y,size:"md",children:(0,fP.jsx)("div",{className:EA.elementContainer,children:(0,fP.jsx)(Ew,{hasUnsavedChanges:g,getIcon:e,tagContent:t})})})};function Ex({showContactDetails:e,toggleContactDetails:n,className:t}){return(0,fP.jsx)(f0.$nd,{className:t,iconDescription:"Toggle contact details",kind:"ghost",onClick:n,renderIcon:e?hC:hw,children:e?o4("showLess","Show less"):o4("showMore","Show more")})}var EC=t(4745),EE={};EE.styleTagTransform=fq(),EE.setAttributes=fW(),EE.insert=fF().bind(null,"head"),EE.domAPI=fj(),EE.insertStyleElement=fG(),fI()(EC.A,EE);let ES=EC.A&&EC.A.locals?EC.A.locals:void 0,ED=({patientUuid:e})=>{let{cohorts:n=[],isLoading:t}=function(e){let n=e?`${oM}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:t,isLoading:r}=(0,dr.Ay)(n,oN),o=t?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,uB.useMemo)(()=>({cohorts:o,isLoading:r}),[r,o])}(e);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsxs)("p",{className:ES.heading,children:[o4("patientLists","Patient Lists")," (",n?.length??0,")"]}),t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsxs)("ul",{children:[(()=>{if(n?.length>0){let e=n.sort((e,n)=>wt(e?.startDate).getTime()-wt(n?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,fP.jsx)("li",{children:(0,fP.jsx)(uF,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,fP.jsx)("li",{children:"--"})})(),n.length>3&&(0,fP.jsx)("li",{className:ES.link,children:(0,fP.jsx)(uF,{to:`${window.spaBase}/home/patient-lists`,children:o4("seeMoreLists","See {{count}} more lists",{count:n?.length-3})})})]})]})},Ez=({patientId:e})=>{let{patient:n,isLoading:t}=fl(e),r=n?.address?.find(e=>"home"===e.use),o=e=>e.split("#")[1];return t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("address","Address")}),(0,fP.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,n])=>"extension"===e?r.extension?.[0]?.extension?.map((n,t)=>(0,fP.jsxs)("li",{children:[o4(o(n.url),o(n.url)),": ",n.valueString]},`address-${e}-${t}`)):(0,fP.jsxs)("li",{children:[o4(e,e),": ",n]},`address-${e}`)):(0,fP.jsx)("li",{children:"--"})})]})},EM=({patientUuid:e})=>{let{isLoading:n,contactAttributes:t}=(e=>{let{contactAttributeTypes:n=[]}=dM({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:t,error:r,isLoading:o}=(e=>{let{data:n,error:t,isLoading:r}=(0,dN.A)(`${oM}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,oN);return{isLoading:r,attributes:n?.data.person.attributes??[],error:t}})(e);return{contactAttributes:(0,uB.useMemo)(()=>t.filter(({attributeType:e})=>n?.some(n=>e.uuid===n)),[t,n]),isLoading:o,error:r}})(e),r=(0,uB.useMemo)(()=>t?[...t?.map(e=>[e.attributeType.display?o4(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[t]);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("contactDetails","Contact Details")}),n?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsx)("ul",{children:r.length?r.map(([e,n],t)=>(0,fP.jsxs)("li",{children:[e,": ",n]},`${e}-${n}-${t}`)):(0,fP.jsx)("li",{children:"--"})})]})},EP=({patientId:e})=>{let{data:n,isLoading:t}=function(e){let n=`${oM}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:t,error:r,isLoading:o,isValidating:a}=(0,dr.Ay)(e?n:null,oN),i=t?.data?.results?.length?function(e,n){let t=[];for(let r of n)e===r.personA.uuid?t.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):t.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return t}(e,t.data.results):null;return{data:t?i:null,error:r,isLoading:o,isValidating:a}}(e);return(0,fP.jsxs)(fP.Fragment,{children:[(0,fP.jsx)("p",{className:ES.heading,children:o4("relationships","Relationships")}),t?(0,fP.jsx)(f0.OuH,{description:`${o4("loading","Loading")} ...`,role:"progressbar"}):(0,fP.jsx)("ul",{children:n&&n.length>0?(0,fP.jsx)(fP.Fragment,{children:n.map(e=>(0,fP.jsxs)("li",{className:ES.relationship,children:[(0,fP.jsx)("div",{children:(0,fP.jsx)(uF,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,fP.jsx)("div",{children:e.relationshipType}),(0,fP.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?o4("yearAbbreviation","yr"):o4("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,fP.jsx)("li",{children:"--"})})]})};function ET({patientId:e,deceased:n}){return(0,fP.jsxs)("div",{className:fO()(ES.contactDetails,{[ES.deceased]:n}),children:[(0,fP.jsxs)("div",{className:ES.row,children:[(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(Ez,{patientId:e})}),(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(EM,{patientUuid:e})})]}),(0,fP.jsxs)("div",{className:ES.row,children:[(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(EP,{patientId:e})}),(0,fP.jsx)("div",{className:ES.col,children:(0,fP.jsx)(ED,{patientUuid:e})})]})]})}function EO(e){let n=document.querySelector("template#loading-spinner");if(n){let t=n.content.cloneNode(!0),r=Array.prototype.map.call(t.childNodes,e=>e);return e.appendChild(t),()=>r.forEach(e=>e.remove())}return()=>{}}var EN=t(6846),EI={};EI.styleTagTransform=fq(),EI.setAttributes=fW(),EI.insert=fF().bind(null,"head"),EI.domAPI=fj(),EI.insertStyleElement=fG(),fI()(EN.A,EI);let EB=EN.A&&EN.A.locals?EN.A.locals:void 0;function Ej({workspaceGroup:e,groupProps:n}){let t=d7(),{persistence:r}=e;return(0,fP.jsx)("aside",{className:EB.sideRail,children:(0,fP.jsxs)("div",{className:EB.container,children:["closable"==r&&d8(t)&&(0,fP.jsx)(f0.K0,{align:"left",onClick:()=>Es(),label:o4("close"),kind:"ghost",children:(0,fP.jsx)(hE,{})}),(0,fP.jsx)(uR.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,fP.jsx)(uJ,{className:EB.container,name:e.name,state:{groupProps:n}})})]})})}let ER=({lifeCycle:e,openedWorkspace:n,openedWindow:t,isRootWorkspace:r,isLeafWorkspace:o,showActionMenu:a})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=Ed(),c=(0,uB.useMemo)(()=>n&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:o=!1}=e;return r?!!(o||await Ep({reason:"CLOSE_WINDOW",explicit:!0,windowName:t.windowName}))&&(s(t.openedWorkspaces[0].workspaceName),!0):!!(o||await Ep({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:n.workspaceName}))&&(s(n.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let o=n.workspaceName,{openedWorkspaces:a}=t,i=a.findIndex(e=>e.workspaceName===o);-1===i||i!==a.length-1&&a.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Ep({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:t.windowName,workspaceName:a[i+1].workspaceName})||l(o,e,r||{})},workspaceName:n.workspaceName,workspaceProps:n.props,windowProps:t.props,groupProps:i&&i.props?i.props:null,isRootWorkspace:r,isLeafWorkspace:o,windowName:t.windowName,showActionMenu:a},[n,s,i,t]);if(!e){let{registeredWorkspacesByName:e}=uS.getState(),t=e[n.workspaceName],o=t&&t.window?t.window:void 0,{registeredWindowsByName:s}=uS.getState(),l=o?s[o]:void 0,c=l&&l.width?l.width:"narrow",p=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,fP.jsxs)("div",{className:fO()(Eb.workspaceOuterContainer,{[Eb.narrowWorkspace]:"narrow"===c,[Eb.widerWorkspace]:"wider"===c,[Eb.extraWideWorkspace]:"extra-wide"===c,[Eb.isActionMenuOpened]:p}),children:[(0,fP.jsx)("div",{className:Eb.workspaceSpacer}),(0,fP.jsx)("div",{className:fO()(Eb.workspaceMiddleContainer,{[Eb.isRootWorkspace]:r,[Eb.showActionMenu]:a}),children:(0,fP.jsx)("div",{className:fO()(Eb.workspaceInnerContainer,{[Eb.isRootWorkspace]:r}),children:(0,fP.jsx)(f0.OuH,{className:Eb.loader,description:`${o4("loading")} ...`})})})]})}return(0,fP.jsx)(C4,{config:e,mountParcel:rT,...c},n.workspaceName)},EF=({openedWindow:e,showActionMenu:n})=>{let{openedWorkspaces:t}=e,[r,o]=(0,uB.useState)({}),{registeredWorkspacesByName:a}=uS.getState();return(0,uB.useEffect)(()=>{let e=!1;return Promise.all(t.map(async e=>{let{moduleName:n,component:t}=a[e.workspaceName];return[e.uuid,await f$(n,t)]})).then(n=>{e||o(Object.fromEntries(n))}),()=>{e=!0}},[t]),(0,fP.jsx)(fP.Fragment,{children:t.map((o,a)=>(0,fP.jsx)(ER,{openedWorkspace:o,openedWindow:e,lifeCycle:r[o.uuid],isRootWorkspace:0===a,isLeafWorkspace:a===t.length-1,showActionMenu:n},o.uuid))})};var EL=t(4466),EW={};EW.styleTagTransform=fq(),EW.setAttributes=fW(),EW.insert=fF().bind(null,"head"),EW.domAPI=fj(),EW.insertStyleElement=fG(),fI()(EL.A,EW);let EV=EL.A&&EL.A.locals?EL.A.locals:void 0;function EG(e){e&&(0,uX.createRoot)(e).render((0,fP.jsx)(EU,{}))}function EU(){let{openedGroup:e,openedWindows:n,registeredGroupsByName:t,registeredWindowsByName:r}=Ed();if((0,uB.useEffect)(()=>pn("before-page-changed",n=>{let{newPage:r,cancelNavigation:o,oldUrl:a,newUrl:i}=n;if(!e)return;if(r)return void o(Es().then(e=>!e));let s=t[e.groupName],l=s?.scopePattern;l&&function(e,n,t){try{let r=new URL(n,window.location.origin).pathname,o=new URL(t,window.location.origin).pathname,a=new RegExp(e),i=r.match(a),s=o.match(a);if(!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,n)=>e===s[n+1]);return!1}catch{return!0}}(l,a,i)&&o(Es().then(e=>!e))}),[e,t]),!e)return null;let o=t[e.groupName],a=n.some(e=>e.maximized),{name:i}=o,s=Object.values(r).filter(e=>e.group===i&&void 0!==e.icon).sort((e,n)=>(e.order??Number.MAX_VALUE)-(n.order??Number.MAX_VALUE)).length>0;return(0,fP.jsxs)("div",{className:fO()(EV.workspaceWindowsAndMenuContainer,{[EV.overlay]:o.overlay,[EV.hasMaximizedWindow]:a}),children:[(0,fP.jsx)("div",{className:EV.workspaceWindowsContainer,children:n.map(e=>(0,fP.jsx)(EF,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,fP.jsx)(Ej,{workspaceGroup:o,groupProps:e.props})]})}function Eq(e){if("string"!=typeof e||0===e.trim().length)return;let n=e.replaceAll("_","-");try{return new Intl.Locale(n).toString()}catch{return}}function EH(e,n,t){if(null==e)return t;let r=Eq(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),t;let o=[];for(let e of n){let n=Eq(e);if(!n){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}o.push({canonical:n,original:e})}let a=r;for(;a;){let e=o.find(e=>e.canonical===a);if(e)return e.original;let n=a+"-",t=o.find(e=>e.canonical.startsWith(n));if(t)return t.original;if("ht"===a){a="fr-HT";continue}let r=a.lastIndexOf("-");if(-1===r)break;let i=(a=a.slice(0,r)).lastIndexOf("-");-1!==i&&a.length-i==2&&(a=a.slice(0,i))}return t}function EK(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function EY(e){return!!e&&e.constructor===Object}var EZ=t(2722);function EJ(e){let[n,t,r]=e.split(".");return`${n}.${t}.${r}`}function EX(e,n){let t=function(e){let n=e.indexOf("-");if(n>=0){let t=EJ(e.slice(0,n)),r=e.slice(n+1);return`${t}-${r}`}return EJ(e)}(n);return EZ.satisfies(t,e,{includePrerelease:!0})}async function EQ(e,n={}){let t,{shouldRetry:r,getDelay:o,onError:a}=n;r=r??(e=>e<=5),o=o??(e=>(function(e,n=!1){return 1e3*Math.pow(2,n?e+1:e)})(e));let i=0;do try{return await E0(o(i)),await e()}catch(e){a?.(e,i),t=e}while(r(i++));throw t}async function E0(e){if(!(e<=0))return new Promise(n=>setTimeout(n,e))}}}]);